Skip to content
Permalink
Browse files

remove Qt4.3 dependency

git-svn-id: http://svn.osgeo.org/qgis/trunk@7622 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Nov 20, 2007
1 parent 194d12a commit 9597e23fb8c76c72a511ef68be6b252e677474c2
Showing with 11 additions and 3 deletions.
  1. +9 −3 src/app/qgsdbsourceselect.cpp
  2. +2 −0 src/app/qgsdbsourceselect.h
@@ -159,13 +159,15 @@ void QgsDbSourceSelect::on_cmbConnections_activated(int)
void QgsDbSourceSelect::updateTypeInfo(int row, QString type)
{
QComboBox *cb = static_cast<QComboBox *>(lstTables->cellWidget(row,dbssType));
if(cb)
lstTables->removeCellWidget(row, dbssType);
else
if(!cb)
{
QTableWidgetItem *item = lstTables->takeItem(row,dbssType);
delete item;
}
#if 0 // Qt 4.3
else
lstTables->removeCellWidget(row, dbssType);
#endif

if( type.contains(",") )
{
@@ -177,8 +179,10 @@ void QgsDbSourceSelect::updateTypeInfo(int row, QString type)
}
cb->setCurrentIndex(0);
cb->setToolTip( tr("select import type for multi type layer") );
#if 0 // Qt 4.3
cb->setMinimumContentsLength(mCbMinLength);
cb->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLengthWithIcon);
#endif
lstTables->setCellWidget(row, dbssType, cb);
}
else
@@ -442,13 +446,15 @@ void QgsDbSourceSelect::on_btnConnect_clicked()
qMakePair(tr("Unknown layer type"),
QIcon(myThemePath+"/mIconUnknownLayerType.png")));

#if 0 // Qt 4.3
mCbMinLength = 0;
QMapIterator <QString, QPair < QString, QIcon > > it(mLayerIcons);
while( it.hasNext() ) {
it.next();
int len = it.value().first.length();;
mCbMinLength = mCbMinLength<len ? len : mCbMinLength;
}
#endif
}
//qDebug("Connection succeeded");
// tell the DB that we want text encoded in UTF8
@@ -128,8 +128,10 @@ class QgsDbSourceSelect : public QDialog, private Ui::QgsDbSourceSelectBase
QStringList m_selectedTables;
// Storage for the range of layer type icons
QMap<QString, QPair<QString, QIcon> > mLayerIcons;
#if 0
// minlength of layer type combobox
int mCbMinLength;
#endif
//! Pointer to the qgis application mainwindow
QgisApp *qgisApp;
PGconn *pd;

0 comments on commit 9597e23

Please sign in to comment.
You can’t perform that action at this time.