[QGIS Commit] r12201 - in trunk/qgis/src: app app/attributetable ui

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Nov 19 18:49:18 EST 2009


Author: jef
Date: 2009-11-19 18:49:17 -0500 (Thu, 19 Nov 2009)
New Revision: 12201

Modified:
   trunk/qgis/src/app/attributetable/qgsattributetabledelegate.cpp
   trunk/qgis/src/app/qgsattributeeditor.cpp
   trunk/qgis/src/ui/qgsoptionsbase.ui
Log:
fix some ui warnings and the attribute file selection

Modified: trunk/qgis/src/app/attributetable/qgsattributetabledelegate.cpp
===================================================================
--- trunk/qgis/src/app/attributetable/qgsattributetabledelegate.cpp	2009-11-19 20:26:42 UTC (rev 12200)
+++ trunk/qgis/src/app/attributetable/qgsattributetabledelegate.cpp	2009-11-19 23:49:17 UTC (rev 12201)
@@ -62,14 +62,12 @@
   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;
 
@@ -87,6 +85,7 @@
     return;
 
   QgsAttributeEditor::setValue( editor, vl, fieldIdx( index ), index.model()->data( index, Qt::EditRole ) );
+  editor->adjustSize();
 }
 
 void QgsAttributeTableDelegate::paint( QPainter * painter,

Modified: trunk/qgis/src/app/qgsattributeeditor.cpp
===================================================================
--- trunk/qgis/src/app/qgsattributeeditor.cpp	2009-11-19 20:26:42 UTC (rev 12200)
+++ trunk/qgis/src/app/qgsattributeeditor.cpp	2009-11-19 23:49:17 UTC (rev 12201)
@@ -325,7 +325,7 @@
         myWidget = te;
       }
 
-#if QT_VERSION < 0x040400
+#if QT_VERSION >= 0x040400
       if ( pte )
       {
         myWidget = pte;
@@ -356,13 +356,15 @@
       {
         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 );
       }
 

Modified: trunk/qgis/src/ui/qgsoptionsbase.ui
===================================================================
--- trunk/qgis/src/ui/qgsoptionsbase.ui	2009-11-19 20:26:42 UTC (rev 12200)
+++ trunk/qgis/src/ui/qgsoptionsbase.ui	2009-11-19 23:49:17 UTC (rev 12201)
@@ -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>
@@ -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">



More information about the QGIS-commit mailing list