fix isSelect ( QSqlQuery::isSelect() does not work as expected )

This commit is contained in:
Filip Bucek 2019-11-13 14:56:22 +01:00
parent f1d78192f7
commit dfe6d3bb03

View File

@ -93,12 +93,10 @@ QSqlQuery DatabaseManager::executeQuery(QSqlQuery &query, const QString &sqlText
bool isSelect = false; bool isSelect = false;
if ( sqlText.isEmpty()) { if ( sqlText.isEmpty()) {
sqlStatement = getLastQuery(query); sqlStatement = getLastQuery(query);
isSelect = query.isSelect(); }
} else {
if (sqlText.startsWith("SELECT", Qt::CaseInsensitive)) { if (sqlText.startsWith("SELECT", Qt::CaseInsensitive)) {
isSelect = true; isSelect = true;
} }
}
if (mDryMode) { if (mDryMode) {
qCInfo(sdkdb) << "SQL statement: " << sqlStatement; qCInfo(sdkdb) << "SQL statement: " << sqlStatement;