summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2020-11-22 02:47:33 +0100
committerArno <arno@disconnect.de>2020-11-22 02:47:33 +0100
commit9b0fb916acb6024988018ec5d13f52490f46d272 (patch)
tree54dfd37955cf9a3c8b954178fe9a2e4993070774
parent37207b5a188ba7b49165eacb82abc1e19434dcf2 (diff)
downloadSheMov-9b0fb916acb6024988018ec5d13f52490f46d272.tar.gz
SheMov-9b0fb916acb6024988018ec5d13f52490f46d272.tar.bz2
SheMov-9b0fb916acb6024988018ec5d13f52490f46d272.zip
Make SearchDialog parentless
Don't raise SearchDialog every time MainWindow is clicked.
-rw-r--r--shemov.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/shemov.cpp b/shemov.cpp
index 2593d76..119a6aa 100644
--- a/shemov.cpp
+++ b/shemov.cpp
@@ -48,7 +48,7 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla
//init database as early as possible
splash.showMessage(tr("Initializing globals..."), Qt::AlignHCenter, Qt::yellow);
qApp->processEvents();
- mSearchDialog = new SearchDialog(this);
+ mSearchDialog = new SearchDialog();
mSearchDialog->setHidden(true);
(void) SmGlobals::instance();
@@ -64,7 +64,7 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla
connect(mConsistencyA, &QAction::triggered, this, &SheMov::checkConsistency);
QAction *searchDialogA = new QAction(tr("Search..."), this);
searchDialogA->setShortcut(tr("CTRL+f"));
- connect(searchDialogA, &QAction::triggered, mSearchDialog, &SearchDialog::show);
+ connect(searchDialogA, &QAction::triggered, mSearchDialog, [&] { mSearchDialog->show(); mSearchDialog->raise(); });
mQuitA = new QAction(tr("Quit"), this);
mQuitA->setShortcut(tr("CTRL+q"));
connect(mQuitA, &QAction::triggered, qApp, &QApplication::closeAllWindows);