diff --git a/src/main.cpp b/src/main.cpp --- a/src/main.cpp +++ b/src/main.cpp @@ -42,7 +42,6 @@ int main(int argc, char *argv[]) pMainWindow = &w; qInstallMessageHandler(messageHandler); - w.handleCommandLineOptions(a); ToolTipFilter ttf; a.installEventFilter(&ttf); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -270,6 +270,8 @@ MainWindow::MainWindow(QWidget *parent) this->ui->tabWidget->setCurrentWidget(&commandPanel); this->ui->tabWidget->showTabs(); }); + + handleCommandLineOptions(*QApplication::instance()); } MainWindow::~MainWindow() diff --git a/src/mainwindow.h b/src/mainwindow.h --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -64,7 +64,6 @@ public: void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg); - void handleCommandLineOptions(const QCoreApplication &app); private: Ui::MainWindow *ui; @@ -94,6 +93,8 @@ private: DataTextView textView; UpdateCheckDialog updateCheckDialog; + void handleCommandLineOptions(const QCoreApplication &app); + /// Returns true if demo is running bool isDemoRunning(); /// Display a secondary plot in the splitter, removing and