diff --git a/src/SeerCommandLogsWidget.cpp b/src/SeerCommandLogsWidget.cpp index 6e5b0d9..97b6ff9 100644 --- a/src/SeerCommandLogsWidget.cpp +++ b/src/SeerCommandLogsWidget.cpp @@ -91,6 +91,11 @@ SeerCommandLogsWidget::SeerCommandLogsWidget (QWidget* parent) : QWidget(parent) manualCommandComboBox->lineEdit()->setToolTip("Manually enter a gdb/mi command."); manualCommandComboBox->lineEdit()->setClearButtonEnabled(true); + // Restore tab ordering and manual command history. + readSettings(); + readHistorySettings(); + readLogSettings(); + // Connect things. QObject::connect(tabsContextMenuButton, &QToolButton::clicked, this, &SeerCommandLogsWidget::handleTabsContextMenuButtonClicked); QObject::connect(logsTabWidget->tabBar(), &QTabBar::tabMoved, this, &SeerCommandLogsWidget::handleLogsTabMoved); @@ -107,12 +112,6 @@ SeerCommandLogsWidget::SeerCommandLogsWidget (QWidget* parent) : QWidget(parent) QObject::connect(helpToolButton, &QToolButton::clicked, this, &SeerCommandLogsWidget::handleHelpToolButtonClicked); QObject::connect(macroButtonGroup, &QButtonGroup::buttonClicked, this, &SeerCommandLogsWidget::handleMacroToolButtonClicked); QObject::connect(qApp, &QCoreApplication::aboutToQuit, this, &SeerCommandLogsWidget::handleAboutToQuit); - - - // Restore tab ordering and manual command history. - readSettings(); - readHistorySettings(); - readLogSettings(); } SeerCommandLogsWidget::~SeerCommandLogsWidget () { @@ -586,26 +585,20 @@ void SeerCommandLogsWidget::readSettings () { //qDebug() << "Current" << current; // Move tabs to the requested order. - // Ignore signals from the tabbar as these will call 'writeSettings' - // while we're in 'readSettings'. - { - QSignalBlocker blocker(logsTabWidget->tabBar()); + for (int i=0; itabBar()->count(); j++) { - if (logsTabWidget->tabBar()->tabText(j) == tab) { - tb = j; - break; - } + for (int j=0; jtabBar()->count(); j++) { + if (logsTabWidget->tabBar()->tabText(j) == tab) { + tb = j; + break; } + } - if (tb != -1) { - logsTabWidget->tabBar()->moveTab(tb, i); - } + if (tb != -1) { + logsTabWidget->tabBar()->moveTab(tb, i); } } diff --git a/src/SeerSourceSymbolLibraryManagerWidget.cpp b/src/SeerSourceSymbolLibraryManagerWidget.cpp index 600fbae..530e60d 100644 --- a/src/SeerSourceSymbolLibraryManagerWidget.cpp +++ b/src/SeerSourceSymbolLibraryManagerWidget.cpp @@ -192,26 +192,20 @@ void SeerSourceSymbolLibraryManagerWidget::readSettings () { //qDebug() << "Current" << current; // Move tabs to the requested order. - // Ignore signals from the tabbar as these will call 'writeSettings' - // while we're in 'readSettings'. - { - QSignalBlocker blocker(tabWidget->tabBar()); + for (int i=0; itabBar()->count(); j++) { - if (tabWidget->tabBar()->tabText(j) == tab) { - tb = j; - break; - } + for (int j=0; jtabBar()->count(); j++) { + if (tabWidget->tabBar()->tabText(j) == tab) { + tb = j; + break; } + } - if (tb != -1) { - tabWidget->tabBar()->moveTab(tb, i); - } + if (tb != -1) { + tabWidget->tabBar()->moveTab(tb, i); } } diff --git a/src/SeerStackManagerWidget.cpp b/src/SeerStackManagerWidget.cpp index 7a373a3..9807dc9 100644 --- a/src/SeerStackManagerWidget.cpp +++ b/src/SeerStackManagerWidget.cpp @@ -173,26 +173,20 @@ void SeerStackManagerWidget::readSettings () { //qDebug() << "Current" << current; // Move tabs to the requested order. - // Ignore signals from the tabbar as these will call 'writeSettings' - // while we're in 'readSettings'. - { - QSignalBlocker blocker(tabWidget->tabBar()); + for (int i=0; itabBar()->count(); j++) { - if (tabWidget->tabBar()->tabText(j) == tab) { - tb = j; - break; - } + for (int j=0; jtabBar()->count(); j++) { + if (tabWidget->tabBar()->tabText(j) == tab) { + tb = j; + break; } + } - if (tb != -1) { - tabWidget->tabBar()->moveTab(tb, i); - } + if (tb != -1) { + tabWidget->tabBar()->moveTab(tb, i); } } diff --git a/src/SeerThreadManagerWidget.cpp b/src/SeerThreadManagerWidget.cpp index 9bc1a29..6b3f2b7 100644 --- a/src/SeerThreadManagerWidget.cpp +++ b/src/SeerThreadManagerWidget.cpp @@ -226,26 +226,20 @@ void SeerThreadManagerWidget::readSettings () { //qDebug() << "Current" << current; // Move tabs to the requested order. - // Ignore signals from the tabbar as these will call 'writeSettings' - // while we're in 'readSettings'. - { - QSignalBlocker blocker(tabWidget->tabBar()); + for (int i=0; itabBar()->count(); j++) { - if (tabWidget->tabBar()->tabText(j) == tab) { - tb = j; - break; - } + for (int j=0; jtabBar()->count(); j++) { + if (tabWidget->tabBar()->tabText(j) == tab) { + tb = j; + break; } + } - if (tb != -1) { - tabWidget->tabBar()->moveTab(tb, i); - } + if (tb != -1) { + tabWidget->tabBar()->moveTab(tb, i); } } diff --git a/src/SeerVariableManagerWidget.cpp b/src/SeerVariableManagerWidget.cpp index 1b7dae8..2de7f06 100644 --- a/src/SeerVariableManagerWidget.cpp +++ b/src/SeerVariableManagerWidget.cpp @@ -193,26 +193,20 @@ void SeerVariableManagerWidget::readSettings () { //qDebug() << "Current" << current; // Move tabs to the requested order. - // Ignore signals from the tabbar as these will call 'writeSettings' - // while we're in 'readSettings'. - { - QSignalBlocker blocker(tabWidget->tabBar()); + for (int i=0; itabBar()->count(); j++) { - if (tabWidget->tabBar()->tabText(j) == tab) { - tb = j; - break; - } + for (int j=0; jtabBar()->count(); j++) { + if (tabWidget->tabBar()->tabText(j) == tab) { + tb = j; + break; } + } - if (tb != -1) { - tabWidget->tabBar()->moveTab(tb, i); - } + if (tb != -1) { + tabWidget->tabBar()->moveTab(tb, i); } }