From: Soeren Apel Date: Thu, 18 Aug 2016 18:02:18 +0000 (+0200) Subject: MainWindow: Prevent Qt from restoring the dock widgets X-Git-Url: http://git.code-monkey.de/?a=commitdiff_plain;ds=sidebyside;h=55547a4510d8ff310ab1ac57e69e3e51132b2c2f;hp=d290e89f9b28f90b898a57c9f5e288602367cb3d;p=pulseview.git MainWindow: Prevent Qt from restoring the dock widgets --- diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index 59f4369..3387014 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -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) { diff --git a/pv/mainwindow.hpp b/pv/mainwindow.hpp index 9a66b34..618a10e 100644 --- a/pv/mainwindow.hpp +++ b/pv/mainwindow.hpp @@ -150,6 +150,8 @@ private: virtual QMenu* createPopupMenu(); + virtual bool restoreState(const QByteArray &state, int version = 0); + private Q_SLOTS: void show_session_error( const QString text, const QString info_text);