Skip to content
Permalink
Browse files

fix #1789 (take 2)

git-svn-id: http://svn.osgeo.org/qgis/trunk@11106 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Jul 18, 2009
1 parent bcf09ab commit 69841f7f433a71206384170348e00ff4862dfacd
Showing with 1 addition and 11 deletions.
  1. +1 −9 src/app/qgspgquerybuilder.cpp
  2. +0 −2 src/app/qgspgquerybuilder.h
@@ -187,7 +187,6 @@ void QgsPgQueryBuilder::fillValues( QString theSQL )

// 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_lstFields_doubleClicked( const QModelIndex &index )

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()
@@ -153,8 +153,6 @@ class QgsPgQueryBuilder : public QDialog, private Ui::QgsPgQueryBuilderBase
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;
};

0 comments on commit 69841f7

Please sign in to comment.
You can’t perform that action at this time.