mirror of
https://github.com/qgis/QGIS.git
synced 2025-06-18 00:04:02 -04:00
remove Qt4.3 dependency
git-svn-id: http://svn.osgeo.org/qgis/trunk@7622 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
194d12ae51
commit
9597e23fb8
@ -159,13 +159,15 @@ void QgsDbSourceSelect::on_cmbConnections_activated(int)
|
|||||||
void QgsDbSourceSelect::updateTypeInfo(int row, QString type)
|
void QgsDbSourceSelect::updateTypeInfo(int row, QString type)
|
||||||
{
|
{
|
||||||
QComboBox *cb = static_cast<QComboBox *>(lstTables->cellWidget(row,dbssType));
|
QComboBox *cb = static_cast<QComboBox *>(lstTables->cellWidget(row,dbssType));
|
||||||
if(cb)
|
if(!cb)
|
||||||
lstTables->removeCellWidget(row, dbssType);
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
QTableWidgetItem *item = lstTables->takeItem(row,dbssType);
|
QTableWidgetItem *item = lstTables->takeItem(row,dbssType);
|
||||||
delete item;
|
delete item;
|
||||||
}
|
}
|
||||||
|
#if 0 // Qt 4.3
|
||||||
|
else
|
||||||
|
lstTables->removeCellWidget(row, dbssType);
|
||||||
|
#endif
|
||||||
|
|
||||||
if( type.contains(",") )
|
if( type.contains(",") )
|
||||||
{
|
{
|
||||||
@ -177,8 +179,10 @@ void QgsDbSourceSelect::updateTypeInfo(int row, QString type)
|
|||||||
}
|
}
|
||||||
cb->setCurrentIndex(0);
|
cb->setCurrentIndex(0);
|
||||||
cb->setToolTip( tr("select import type for multi type layer") );
|
cb->setToolTip( tr("select import type for multi type layer") );
|
||||||
|
#if 0 // Qt 4.3
|
||||||
cb->setMinimumContentsLength(mCbMinLength);
|
cb->setMinimumContentsLength(mCbMinLength);
|
||||||
cb->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLengthWithIcon);
|
cb->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLengthWithIcon);
|
||||||
|
#endif
|
||||||
lstTables->setCellWidget(row, dbssType, cb);
|
lstTables->setCellWidget(row, dbssType, cb);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -442,6 +446,7 @@ void QgsDbSourceSelect::on_btnConnect_clicked()
|
|||||||
qMakePair(tr("Unknown layer type"),
|
qMakePair(tr("Unknown layer type"),
|
||||||
QIcon(myThemePath+"/mIconUnknownLayerType.png")));
|
QIcon(myThemePath+"/mIconUnknownLayerType.png")));
|
||||||
|
|
||||||
|
#if 0 // Qt 4.3
|
||||||
mCbMinLength = 0;
|
mCbMinLength = 0;
|
||||||
QMapIterator <QString, QPair < QString, QIcon > > it(mLayerIcons);
|
QMapIterator <QString, QPair < QString, QIcon > > it(mLayerIcons);
|
||||||
while( it.hasNext() ) {
|
while( it.hasNext() ) {
|
||||||
@ -449,6 +454,7 @@ void QgsDbSourceSelect::on_btnConnect_clicked()
|
|||||||
int len = it.value().first.length();;
|
int len = it.value().first.length();;
|
||||||
mCbMinLength = mCbMinLength<len ? len : mCbMinLength;
|
mCbMinLength = mCbMinLength<len ? len : mCbMinLength;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
//qDebug("Connection succeeded");
|
//qDebug("Connection succeeded");
|
||||||
// tell the DB that we want text encoded in UTF8
|
// tell the DB that we want text encoded in UTF8
|
||||||
|
@ -128,8 +128,10 @@ class QgsDbSourceSelect : public QDialog, private Ui::QgsDbSourceSelectBase
|
|||||||
QStringList m_selectedTables;
|
QStringList m_selectedTables;
|
||||||
// Storage for the range of layer type icons
|
// Storage for the range of layer type icons
|
||||||
QMap<QString, QPair<QString, QIcon> > mLayerIcons;
|
QMap<QString, QPair<QString, QIcon> > mLayerIcons;
|
||||||
|
#if 0
|
||||||
// minlength of layer type combobox
|
// minlength of layer type combobox
|
||||||
int mCbMinLength;
|
int mCbMinLength;
|
||||||
|
#endif
|
||||||
//! Pointer to the qgis application mainwindow
|
//! Pointer to the qgis application mainwindow
|
||||||
QgisApp *qgisApp;
|
QgisApp *qgisApp;
|
||||||
PGconn *pd;
|
PGconn *pd;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user