diff options
| author | 2015-01-30 17:00:24 -0500 | |
|---|---|---|
| committer | 2015-01-30 17:00:24 -0500 | |
| commit | e4767514ed04e6a0bddf3f4a47f5f0b09e65e0ee (patch) | |
| tree | 86cadc2137831d44fa29fd40a2964f7fb1326de4 /SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.cpp | |
| parent | 26ddfe11c2b7fac52e5f57dcd9f5223a50b2a9a7 (diff) | |
| parent | 016003905ca0e8e459e3dc33e786beda8ec92f45 (diff) | |
Merge tag 'upstream/3.0.2'
Upstream version 3.0.2
# gpg: Signature made Fri 30 Jan 2015 05:00:11 PM EST using RSA key ID EBE9BD91
# gpg: Good signature from "Unit 193 <unit193@gmail.com>"
# gpg: aka "Unit 193 <unit193@ninthfloor.org>"
# gpg: aka "Unit 193 <unit193@ubuntu.com>"
Diffstat (limited to 'SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.cpp')
| -rw-r--r-- | SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.cpp b/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.cpp index 7856a5e..590a2fd 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.cpp @@ -17,13 +17,13 @@ #include "parser/lexer.h" #include "common/utils_sql.h" #include "parser/parser.h" +#include "dbobjectdialogs.h" +#include "dialogs/exportdialog.h" #include <QComboBox> #include <QDebug> #include <QStringListModel> #include <QActionGroup> #include <QMessageBox> -#include <dbobjectdialogs.h> -#include <dialogs/exportdialog.h> CFG_KEYS_DEFINE(EditorWindow) EditorWindow::ResultsDisplayMode EditorWindow::resultsDisplayMode; @@ -94,6 +94,10 @@ void EditorWindow::init() initActions(); updateShortcutTips(); + Db* treeSelectedDb = DBTREE->getSelectedOpenDb(); + if (treeSelectedDb) + dbCombo->setCurrentIndex(dbComboModel->getIndexForDb(treeSelectedDb)); + Db* currentDb = getCurrentDb(); resultsModel->setDb(currentDb); ui->sqlEdit->setDb(currentDb); @@ -484,7 +488,16 @@ void EditorWindow::executionSuccessful() { double secs = ((double)resultsModel->getExecutionTime()) / 1000; QString time = QString::number(secs, 'f', 3); - notifyInfo(tr("Query finished in %2 second(s).").arg(time)); + + if (resultsModel->wasDataModifyingQuery()) + { + QString rowsAffected = QString::number(resultsModel->getTotalRowsAffected()); + notifyInfo(tr("Query finished in %1 second(s). Rows affected: %2").arg(time, rowsAffected)); + } + else + { + notifyInfo(tr("Query finished in %1 second(s).").arg(time)); + } lastQueryHistoryId = CFG->addSqlHistory(resultsModel->getQuery(), resultsModel->getDb()->getName(), resultsModel->getExecutionTime(), 0); |
