MainWindow: Prevent Qt from restoring the dock widgets
[pulseview.git] / pv / mainwindow.cpp
index 8ab1a24b70b0f8ccf8c073231640880e93e3e28a..33870145232afdd654a750cac5046169d7051201 100644 (file)
@@ -807,6 +807,22 @@ void MainWindow::keyReleaseEvent(QKeyEvent *event)
        QMainWindow::keyReleaseEvent(event);
 }
 
+QMenu* MainWindow::createPopupMenu()
+{
+       return nullptr;
+}
+
+bool MainWindow::restoreState(const QByteArray &state, int version)
+{
+       (void)state;
+       (void)version;
+
+       // Do nothing. We don't want Qt to handle this, or else it
+       // will try to restore all the dock widgets and create havoc.
+
+       return false;
+}
+
 void MainWindow::show_session_error(
        const QString text, const QString info_text)
 {