Skip to content

Commit cbcadb4

Browse files
author
jef
committed
fix some ui warnings and the attribute file selection
git-svn-id: http://svn.osgeo.org/qgis/trunk@12201 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 3b51919 commit cbcadb4

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

src/app/attributetable/qgsattributetabledelegate.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,12 @@ QWidget *QgsAttributeTableDelegate::createEditor(
6262
if ( vl == NULL )
6363
return NULL;
6464

65-
QWidget *widget = QgsAttributeEditor::createAttributeEditor( parent, 0, vl, fieldIdx( index ), index.model()->data( index, Qt::EditRole ) );
66-
67-
return widget;
65+
return QgsAttributeEditor::createAttributeEditor( parent, 0, vl, fieldIdx( index ), index.model()->data( index, Qt::EditRole ) );
6866
}
6967

7068
void QgsAttributeTableDelegate::setModelData( QWidget *editor, QAbstractItemModel *model, const QModelIndex &index ) const
7169
{
72-
QgsVectorLayer *vl = layer( index.model() );
70+
QgsVectorLayer *vl = layer( model );
7371
if ( vl == NULL )
7472
return;
7573

@@ -87,6 +85,7 @@ void QgsAttributeTableDelegate::setEditorData( QWidget *editor, const QModelInde
8785
return;
8886

8987
QgsAttributeEditor::setValue( editor, vl, fieldIdx( index ), index.model()->data( index, Qt::EditRole ) );
88+
editor->adjustSize();
9089
}
9190

9291
void QgsAttributeTableDelegate::paint( QPainter * painter,

src/app/qgsattributeeditor.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ QWidget *QgsAttributeEditor::createAttributeEditor( QWidget *parent, QWidget *ed
325325
myWidget = te;
326326
}
327327

328-
#if QT_VERSION < 0x040400
328+
#if QT_VERSION >= 0x040400
329329
if ( pte )
330330
{
331331
myWidget = pte;
@@ -356,13 +356,15 @@ QWidget *QgsAttributeEditor::createAttributeEditor( QWidget *parent, QWidget *ed
356356
{
357357
le = new QLineEdit();
358358

359-
QPushButton *pb = new QPushButton( tr( "..." ) );
359+
pb = new QPushButton( tr( "..." ) );
360360

361361
QHBoxLayout *hbl = new QHBoxLayout();
362362
hbl->addWidget( le );
363363
hbl->addWidget( pb );
364364

365365
myWidget = new QWidget( parent );
366+
myWidget->setBackgroundRole( QPalette::Window );
367+
myWidget->setAutoFillBackground( true );
366368
myWidget->setLayout( hbl );
367369
}
368370

src/ui/qgsoptionsbase.ui

+2-2
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@
397397
</widget>
398398
</item>
399399
<item row="2" column="0">
400-
<widget class="QGroupBox" name="groupBox_2">
400+
<widget class="QGroupBox" name="groupBox_3">
401401
<property name="title">
402402
<string>Compatibility</string>
403403
</property>
@@ -1159,7 +1159,7 @@
11591159
<property name="checkable">
11601160
<bool>true</bool>
11611161
</property>
1162-
<layout class="QGridLayout" name="gridLayout">
1162+
<layout class="QGridLayout" name="gridLayout_1">
11631163
<item row="0" column="0">
11641164
<widget class="QLabel" name="lblProxyHost">
11651165
<property name="text">

0 commit comments

Comments
 (0)