diff options
| author | 2015-02-22 14:06:38 -0500 | |
|---|---|---|
| committer | 2015-02-22 14:06:38 -0500 | |
| commit | 6d42c08a54f15ddfdd8ee73643e3ddf8907bccc2 (patch) | |
| tree | 0a6554677b6a7fea5c81134c0804f0acdb00e632 /SQLiteStudio3/guiSQLiteStudio/mainwindow.cpp | |
| parent | a0cf2bb71de2b70a2b293c4ce907ecaaf24275bf (diff) | |
| parent | 306d6d3ca9c9ad774d19135681a7f9805f77035f (diff) | |
Merge tag 'upstream/3.0.3'
Upstream version 3.0.3
# gpg: Signature made Sun 22 Feb 2015 02:06:37 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>"
# gpg: aka "Unit 193 <unit193@ninthfloor.com>"
Diffstat (limited to 'SQLiteStudio3/guiSQLiteStudio/mainwindow.cpp')
| -rw-r--r-- | SQLiteStudio3/guiSQLiteStudio/mainwindow.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/SQLiteStudio3/guiSQLiteStudio/mainwindow.cpp b/SQLiteStudio3/guiSQLiteStudio/mainwindow.cpp index bc492df..fe61b95 100644 --- a/SQLiteStudio3/guiSQLiteStudio/mainwindow.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/mainwindow.cpp @@ -571,6 +571,10 @@ FormManager* MainWindow::getFormManager() const void MainWindow::setupDefShortcuts() { BIND_SHORTCUTS(MainWindow, Action); + + QList<QKeySequence> bindings = QKeySequence::keyBindings(QKeySequence::Close); + if (bindings.size() > 0) + actionMap[Action::CLOSE_WINDOW]->setShortcut(bindings.first()); } void MainWindow::openSqlEditorSlot() @@ -831,11 +835,18 @@ QToolBar* MainWindow::getToolBar(int toolbar) const void MainWindow::openDb(const QString& path) { + Db* db = DBLIST->getByPath(path); + if (db) + { + notifyInfo(tr("Database passed in command line parameters (%1) was already on the list under name: %2").arg(path, db->getName())); + return; + } + QString name = DBLIST->quickAddDb(path, QHash<QString,QVariant>()); if (!name.isNull()) { notifyInfo(tr("Database passed in command line parameters (%1) has been temporarily added to the list under name: %2").arg(path, name)); - Db* db = DBLIST->getByName(name); + db = DBLIST->getByName(name); db->open(); } else |
