diff --git a/src/main.cpp b/src/main.cpp index c34c3aa5b..a23aefb20 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -94,8 +94,10 @@ int main(int argc, char** argv) #endif QApplication* guiApp = qobject_cast(app.get()); - auto window = guiApp ? new MainWindow : nullptr; + MainWindow* window = nullptr; if (guiApp) { + setupDockWidgets(); + window = new MainWindow(); guiApp->setWindowIcon(QIcon(QStringLiteral(":/images/icons/512-hotspot_app_icon.png"))); } @@ -155,8 +157,6 @@ int main(int argc, char** argv) parser.process(*app); - setupDockWidgets(); - ThreadWeaver::Queue::instance()->setMaximumNumberOfThreads(QThread::idealThreadCount()); auto applyCliArgs = [&](Settings* settings) {