From ea01be4a49902dd79302d3e10cce4a81c68375a9 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 5 Oct 2023 14:37:43 +0200 Subject: [PATCH] SquishTests: Fix debugger test Assign a name for a label for easier retrieval and fix the used objects inside the shared script. Change-Id: I1769b87d776a2dc9fee9ca9eb26805f6a8475fc0 Reviewed-by: Christian Stenger Reviewed-by: Marcus Tillmanns --- src/plugins/debugger/debuggermainwindow.cpp | 1 + tests/system/objects.map | 2 +- tests/system/shared/debugger.py | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/debugger/debuggermainwindow.cpp b/src/plugins/debugger/debuggermainwindow.cpp index 8949322d0e9..81e3a4435aa 100644 --- a/src/plugins/debugger/debuggermainwindow.cpp +++ b/src/plugins/debugger/debuggermainwindow.cpp @@ -162,6 +162,7 @@ DebuggerMainWindowPrivate::DebuggerMainWindowPrivate(DebuggerMainWindow *parent) { m_centralWidgetStack = new QStackedWidget; m_statusLabel = new Utils::StatusLabel; + m_statusLabel->setObjectName("DebuggerStatusLabel"); // used by Squish StyleHelper::setPanelWidget(m_statusLabel); m_statusLabel->setIndent(2 * QFontMetrics(q->font()).horizontalAdvance(QChar('x'))); m_editorPlaceHolder = new EditorManagerPlaceHolder; diff --git a/tests/system/objects.map b/tests/system/objects.map index a321ad26081..39961ffb4f3 100644 --- a/tests/system/objects.map +++ b/tests/system/objects.map @@ -53,7 +53,7 @@ :DebugModeWidget_QComboBox {container=':Qt Creator_Core::Internal::MainWindow' occurrence='3' type='QComboBox' unnamed='1' visible='1'} :Debugger Toolbar.Continue_QToolButton {container=':DebugModeWidget.Toolbar_QDockWidget' toolTip?='Continue*' type='QToolButton' unnamed='1' visible='1'} :Debugger Toolbar.Exit Debugger_QToolButton {container=':DebugModeWidget.Toolbar_QDockWidget' text='Stop Debugger' type='QToolButton' unnamed='1' visible='1'} -:Debugger Toolbar.StatusText_Utils::StatusLabel {container=':DebugModeWidget.Toolbar_QDockWidget' type='Utils::StatusLabel' unnamed='1'} +:Debugger Toolbar.StatusText_Utils::StatusLabel {container=':DebugModeWidget.Toolbar_QDockWidget' name='DebuggerStatusLabel' type='QLabel'} :Debugger.Docks.BreakDockWidget.Debugger.Docks.Break_QFrame {container=':DebugModeWidget.Debugger.Docks.BreakDockWidget_QDockWidget' name='Debugger.Docks.BreakpointManager' type='QFrame' visible='1'} :Debugger.Docks.LocalsAndWatchersDockWidget.Inspector_QFrame {container=':DebugModeWidget.Debugger.Docks.LocalsAndInspectorDockWidget_QDockWidget' name~='Debugger\\\\.Dock\\\\.Inspector\\\\.\\\\d+' type='QFrame' visible='1'} :Debugger::Internal::ConsoleEdit {columnIndex='0' container=':DebugModeWidget_Debugger::Internal::ConsoleView' rowIndex='0' type='Debugger::Internal::ConsoleEdit' unnamed='1' visible='1'} diff --git a/tests/system/shared/debugger.py b/tests/system/shared/debugger.py index b878f9efef6..d409d5b0668 100644 --- a/tests/system/shared/debugger.py +++ b/tests/system/shared/debugger.py @@ -53,8 +53,7 @@ def setBreakpointsForCurrentProject(filesAndLines): if not filesAndLines or not isinstance(filesAndLines, (list,tuple)): test.fatal("This function only takes a non-empty list/tuple holding dicts.") return None - waitForObject("{type='Utils::NavigationTreeView' unnamed='1' visible='1' " - "window=':Qt Creator_Core::Internal::MainWindow'}") + waitForObject(":Qt Creator_Utils::NavigationTreeView") breakPointList = [] for current in filesAndLines: for curFile,curLine in current.items():