Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
remove Qt4.3 dependency
git-svn-id: http://svn.osgeo.org/qgis/trunk@7622 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Nov 20, 2007
1 parent 194d12a commit 9597e23
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/app/qgsdbsourceselect.cpp
Expand Up @@ -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(",") )
{
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/app/qgsdbsourceselect.h
Expand Up @@ -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;
Expand Down

0 comments on commit 9597e23

Please sign in to comment.