@@ -159,13 +159,15 @@ void QgsDbSourceSelect::on_cmbConnections_activated(int)
159
159
void QgsDbSourceSelect::updateTypeInfo (int row, QString type)
160
160
{
161
161
QComboBox *cb = static_cast <QComboBox *>(lstTables->cellWidget (row,dbssType));
162
- if (cb)
163
- lstTables->removeCellWidget (row, dbssType);
164
- else
162
+ if (!cb)
165
163
{
166
164
QTableWidgetItem *item = lstTables->takeItem (row,dbssType);
167
165
delete item;
168
166
}
167
+ #if 0 // Qt 4.3
168
+ else
169
+ lstTables->removeCellWidget(row, dbssType);
170
+ #endif
169
171
170
172
if ( type.contains (" ," ) )
171
173
{
@@ -177,8 +179,10 @@ void QgsDbSourceSelect::updateTypeInfo(int row, QString type)
177
179
}
178
180
cb->setCurrentIndex (0 );
179
181
cb->setToolTip ( tr (" select import type for multi type layer" ) );
182
+ #if 0 // Qt 4.3
180
183
cb->setMinimumContentsLength(mCbMinLength);
181
184
cb->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLengthWithIcon);
185
+ #endif
182
186
lstTables->setCellWidget (row, dbssType, cb);
183
187
}
184
188
else
@@ -442,13 +446,15 @@ void QgsDbSourceSelect::on_btnConnect_clicked()
442
446
qMakePair (tr (" Unknown layer type" ),
443
447
QIcon (myThemePath+" /mIconUnknownLayerType.png" )));
444
448
449
+ #if 0 // Qt 4.3
445
450
mCbMinLength = 0;
446
451
QMapIterator <QString, QPair < QString, QIcon > > it(mLayerIcons);
447
452
while( it.hasNext() ) {
448
453
it.next();
449
454
int len = it.value().first.length();;
450
455
mCbMinLength = mCbMinLength<len ? len : mCbMinLength;
451
456
}
457
+ #endif
452
458
}
453
459
// qDebug("Connection succeeded");
454
460
// tell the DB that we want text encoded in UTF8
0 commit comments