Skip to content

Commit 69841f7

Browse files
author
jef
committed
fix #1789 (take 2)
git-svn-id: http://svn.osgeo.org/qgis/trunk@11106 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent bcf09ab commit 69841f7

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

src/app/qgspgquerybuilder.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ void QgsPgQueryBuilder::fillValues( QString theSQL )
187187

188188
// determine the field type
189189
QgsField field = mFieldMap[mModelFields->data( lstFields->currentIndex() ).toString()];
190-
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
191190

192191
PGresult *result = PQexec( mPgConnection, theSQL.toUtf8() );
193192

@@ -429,14 +428,7 @@ void QgsPgQueryBuilder::on_lstFields_doubleClicked( const QModelIndex &index )
429428

430429
void QgsPgQueryBuilder::on_lstValues_doubleClicked( const QModelIndex &index )
431430
{
432-
if ( mQuoteValue )
433-
{
434-
txtSQL->insertPlainText( "'" + mModelValues->data( index ).toString() + "'" );
435-
}
436-
else
437-
{
438-
txtSQL->insertPlainText( mModelValues->data( index ).toString() );
439-
}
431+
txtSQL->insertPlainText( "'" + mModelValues->data( index ).toString() + "'" );
440432
}
441433

442434
void QgsPgQueryBuilder::on_btnLessEqual_clicked()

src/app/qgspgquerybuilder.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,6 @@ class QgsPgQueryBuilder : public QDialog, private Ui::QgsPgQueryBuilderBase
153153
QStandardItemModel *mModelFields;
154154
//! Model for values ListView
155155
QStandardItemModel *mModelValues;
156-
//! value needs to be quoted (char, boolean)
157-
bool mQuoteValue;
158156
//! Previous field row to delete model
159157
int mPreviousFieldRow;
160158
};

0 commit comments

Comments
 (0)