Skip to content

Commit

Permalink
fix some ui warnings and the attribute file selection
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@12201 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Nov 19, 2009
1 parent 3b51919 commit cbcadb4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
7 changes: 3 additions & 4 deletions src/app/attributetable/qgsattributetabledelegate.cpp
Expand Up @@ -62,14 +62,12 @@ QWidget *QgsAttributeTableDelegate::createEditor(
if ( vl == NULL )
return NULL;

QWidget *widget = QgsAttributeEditor::createAttributeEditor( parent, 0, vl, fieldIdx( index ), index.model()->data( index, Qt::EditRole ) );

return widget;
return QgsAttributeEditor::createAttributeEditor( parent, 0, vl, fieldIdx( index ), index.model()->data( index, Qt::EditRole ) );
}

void QgsAttributeTableDelegate::setModelData( QWidget *editor, QAbstractItemModel *model, const QModelIndex &index ) const
{
QgsVectorLayer *vl = layer( index.model() );
QgsVectorLayer *vl = layer( model );
if ( vl == NULL )
return;

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

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

void QgsAttributeTableDelegate::paint( QPainter * painter,
Expand Down
6 changes: 4 additions & 2 deletions src/app/qgsattributeeditor.cpp
Expand Up @@ -325,7 +325,7 @@ QWidget *QgsAttributeEditor::createAttributeEditor( QWidget *parent, QWidget *ed
myWidget = te;
}

#if QT_VERSION < 0x040400
#if QT_VERSION >= 0x040400
if ( pte )
{
myWidget = pte;
Expand Down Expand Up @@ -356,13 +356,15 @@ QWidget *QgsAttributeEditor::createAttributeEditor( QWidget *parent, QWidget *ed
{
le = new QLineEdit();

QPushButton *pb = new QPushButton( tr( "..." ) );
pb = new QPushButton( tr( "..." ) );

QHBoxLayout *hbl = new QHBoxLayout();
hbl->addWidget( le );
hbl->addWidget( pb );

myWidget = new QWidget( parent );
myWidget->setBackgroundRole( QPalette::Window );
myWidget->setAutoFillBackground( true );
myWidget->setLayout( hbl );
}

Expand Down
4 changes: 2 additions & 2 deletions src/ui/qgsoptionsbase.ui
Expand Up @@ -397,7 +397,7 @@
</widget>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="groupBox_2">
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Compatibility</string>
</property>
Expand Down Expand Up @@ -1159,7 +1159,7 @@
<property name="checkable">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="gridLayout_1">
<item row="0" column="0">
<widget class="QLabel" name="lblProxyHost">
<property name="text">
Expand Down

0 comments on commit cbcadb4

Please sign in to comment.