Skip to content

Commit 9597e23

Browse files
author
jef
committed
remove Qt4.3 dependency
git-svn-id: http://svn.osgeo.org/qgis/trunk@7622 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 194d12a commit 9597e23

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/app/qgsdbsourceselect.cpp

+9-3
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,15 @@ void QgsDbSourceSelect::on_cmbConnections_activated(int)
159159
void QgsDbSourceSelect::updateTypeInfo(int row, QString type)
160160
{
161161
QComboBox *cb = static_cast<QComboBox *>(lstTables->cellWidget(row,dbssType));
162-
if(cb)
163-
lstTables->removeCellWidget(row, dbssType);
164-
else
162+
if(!cb)
165163
{
166164
QTableWidgetItem *item = lstTables->takeItem(row,dbssType);
167165
delete item;
168166
}
167+
#if 0 // Qt 4.3
168+
else
169+
lstTables->removeCellWidget(row, dbssType);
170+
#endif
169171

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

449+
#if 0 // Qt 4.3
445450
mCbMinLength = 0;
446451
QMapIterator <QString, QPair < QString, QIcon > > it(mLayerIcons);
447452
while( it.hasNext() ) {
448453
it.next();
449454
int len = it.value().first.length();;
450455
mCbMinLength = mCbMinLength<len ? len : mCbMinLength;
451456
}
457+
#endif
452458
}
453459
//qDebug("Connection succeeded");
454460
// tell the DB that we want text encoded in UTF8

src/app/qgsdbsourceselect.h

+2
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,10 @@ class QgsDbSourceSelect : public QDialog, private Ui::QgsDbSourceSelectBase
128128
QStringList m_selectedTables;
129129
// Storage for the range of layer type icons
130130
QMap<QString, QPair<QString, QIcon> > mLayerIcons;
131+
#if 0
131132
// minlength of layer type combobox
132133
int mCbMinLength;
134+
#endif
133135
//! Pointer to the qgis application mainwindow
134136
QgisApp *qgisApp;
135137
PGconn *pd;

0 commit comments

Comments
 (0)