Autotest: Adapt to changed settings access pattern again

Settings are created on first access now, even though this
doesn't matter much here as this happens unconditionally in
AutotestPluginPrivate ctor via m_frameworkManager.synchronizeSettings()

Change-Id: I340927cf107d7e4b2268e842d23f1a89898e8a92
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2023-07-06 17:46:57 +02:00
parent 60fb0fd902
commit 694d81ad63
18 changed files with 43 additions and 51 deletions

View File

@@ -291,7 +291,7 @@ void TestResultsPane::clearContents()
setIconBadgeNumber(0);
navigateStateChanged();
m_summaryWidget->setVisible(false);
m_autoScroll = TestSettings::instance()->autoScroll();
m_autoScroll = testSettings().autoScroll();
connect(m_treeView->verticalScrollBar(), &QScrollBar::rangeChanged,
this, &TestResultsPane::onScrollBarRangeChanged, Qt::UniqueConnection);
m_textOutput->clear();
@@ -437,7 +437,7 @@ void TestResultsPane::onRunSelectedTriggered()
void TestResultsPane::initializeFilterMenu()
{
const bool omitIntern = TestSettings::instance()->omitInternalMsg();
const bool omitIntern = testSettings().omitInternalMsg();
// FilterModel has all messages enabled by default
if (omitIntern)
m_filterModel->toggleTestResultType(ResultType::MessageInternal);
@@ -553,8 +553,7 @@ void TestResultsPane::onTestRunFinished()
m_model->removeCurrentTestMessage();
disconnect(m_treeView->verticalScrollBar(), &QScrollBar::rangeChanged,
this, &TestResultsPane::onScrollBarRangeChanged);
if (TestSettings::instance()->popupOnFinish()
&& (!TestSettings::instance()->popupOnFail() || hasFailedTests(m_model))) {
if (testSettings().popupOnFinish() && (!testSettings().popupOnFail() || hasFailedTests(m_model))) {
popup(IOutputPane::NoModeSwitch);
}
createMarks();