[QGIS Commit] r11106 - trunk/qgis/src/app

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sat Jul 18 15:03:34 EDT 2009


Author: jef
Date: 2009-07-18 15:03:34 -0400 (Sat, 18 Jul 2009)
New Revision: 11106

Modified:
   trunk/qgis/src/app/qgspgquerybuilder.cpp
   trunk/qgis/src/app/qgspgquerybuilder.h
Log:
fix #1789 (take 2)

Modified: trunk/qgis/src/app/qgspgquerybuilder.cpp
===================================================================
--- trunk/qgis/src/app/qgspgquerybuilder.cpp	2009-07-18 17:52:06 UTC (rev 11105)
+++ trunk/qgis/src/app/qgspgquerybuilder.cpp	2009-07-18 19:03:34 UTC (rev 11106)
@@ -187,7 +187,6 @@
 
   // determine the field type
   QgsField field = mFieldMap[mModelFields->data( lstFields->currentIndex() ).toString()];
-  mQuoteValue = field.typeName().contains( "char" ) || field.typeName().contains( "text" ) || field.typeName().contains("bool"); // really should be: field.type()==QVariant::String - but is not set correctly above
 
   PGresult *result = PQexec( mPgConnection, theSQL.toUtf8() );
 
@@ -429,14 +428,7 @@
 
 void QgsPgQueryBuilder::on_lstValues_doubleClicked( const QModelIndex &index )
 {
-  if ( mQuoteValue )
-  {
-    txtSQL->insertPlainText( "'" + mModelValues->data( index ).toString() + "'" );
-  }
-  else
-  {
-    txtSQL->insertPlainText( mModelValues->data( index ).toString() );
-  }
+  txtSQL->insertPlainText( "'" + mModelValues->data( index ).toString() + "'" );
 }
 
 void QgsPgQueryBuilder::on_btnLessEqual_clicked()

Modified: trunk/qgis/src/app/qgspgquerybuilder.h
===================================================================
--- trunk/qgis/src/app/qgspgquerybuilder.h	2009-07-18 17:52:06 UTC (rev 11105)
+++ trunk/qgis/src/app/qgspgquerybuilder.h	2009-07-18 19:03:34 UTC (rev 11106)
@@ -153,8 +153,6 @@
     QStandardItemModel *mModelFields;
     //! Model for values ListView
     QStandardItemModel *mModelValues;
-    //! value needs to be quoted (char, boolean)
-    bool mQuoteValue;
     //! Previous field row to delete model
     int mPreviousFieldRow;
 };



More information about the QGIS-commit mailing list