MainWindow: Prevent Qt from restoring the dock widgets
[pulseview.git] / pv / mainwindow.cpp
index 59f4369e2990ca902d15d1a0c3dc5fbcaea9b560..33870145232afdd654a750cac5046169d7051201 100644 (file)
@@ -812,6 +812,17 @@ 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)
 {