diff --git a/tests/system/shared/clang.py b/tests/system/shared/clang.py index 04cd836e66a..99bb1b6f947 100644 --- a/tests/system/shared/clang.py +++ b/tests/system/shared/clang.py @@ -53,8 +53,7 @@ def startCreatorVerifyingClang(useClang): def __openCodeModelOptions__(): invokeMenuItem("Tools", "Options...") - waitForObjectItem(":Options_QListView", "C++") - clickItem(":Options_QListView", "C++", 14, 15, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(":Options_QListView", "C++")) clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "Code Model") def getCodeModelString(useClang): diff --git a/tests/system/shared/debugger.py b/tests/system/shared/debugger.py index 77632241f3b..930e74980f3 100644 --- a/tests/system/shared/debugger.py +++ b/tests/system/shared/debugger.py @@ -55,7 +55,7 @@ def takeDebuggerLog(): debuggerLogWindow = waitForObject("{container=':DebugModeWidget.Debugger Log_QDockWidget' " "type='Debugger::Internal::DebuggerPane' unnamed='1' visible='1'}") debuggerLog = str(debuggerLogWindow.plainText) - mouseClick(debuggerLogWindow, 5, 5, 0, Qt.LeftButton) + mouseClick(debuggerLogWindow) invokeContextMenuItem(debuggerLogWindow, "Clear Contents") waitFor("str(debuggerLogWindow.plainText)==''", 5000) invokeMenuItem("Window", "Views", "Global Debugger Log") diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index 8250891b717..2337f4fc4ff 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -88,11 +88,11 @@ def __createProjectOrFileSelectType__(category, template, fromWelcome = False, i invokeMenuItem("File", "New File or Project...") categoriesView = waitForObject(":New.templateCategoryView_QTreeView") if isProject: - clickItem(categoriesView, "Projects." + category, 5, 5, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(categoriesView, "Projects." + category)) else: - clickItem(categoriesView, "Files and Classes." + category, 5, 5, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(categoriesView, "Files and Classes." + category)) templatesView = waitForObject("{name='templatesView' type='QListView'}") - clickItem(templatesView, template, 5, 5, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(templatesView, template)) text = waitForObject("{type='QTextBrowser' name='templateDescription' visible='1'}").plainText clickButton(waitForObject("{text='Choose...' type='QPushButton' unnamed='1' visible='1'}")) return __getSupportedPlatforms__(str(text), template)[0] diff --git a/tests/system/shared/suites_qtta.py b/tests/system/shared/suites_qtta.py index 73eb4ee413e..f70b3cb1036 100755 --- a/tests/system/shared/suites_qtta.py +++ b/tests/system/shared/suites_qtta.py @@ -62,7 +62,7 @@ def checkSyntaxError(issuesView, expectedTextsArray, warnIfMoreIssues = True): # change autocomplete options to manual def changeAutocompleteToManual(toManual=True): invokeMenuItem("Tools", "Options...") - mouseClick(waitForObjectItem(":Options_QListView", "Text Editor"), 5, 5, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(":Options_QListView", "Text Editor")) clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "Completion") ensureChecked(waitForObject(":Behavior.Autocomplete common prefix_QCheckBox"), not toManual) activateCompletion = "Always" diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py index 36b5fbfc4e8..ae6bfc1f5ca 100644 --- a/tests/system/shared/utils.py +++ b/tests/system/shared/utils.py @@ -65,7 +65,7 @@ def ensureChecked(objectName, shouldBeChecked = True, timeout=20000): except: # widgets not derived from QCheckbox don't have checkState() if not waitFor('widget.checked == shouldBeChecked', 1500): - mouseClick(widget, 10, 6, 0, Qt.LeftButton) + mouseClick(widget) test.verify(waitFor("widget.checked == shouldBeChecked", 1000)) test.log("New state for QCheckBox: %s" % state, str(objectName)) @@ -97,9 +97,9 @@ def selectFromCombo(objectSpec, itemName): if itemName == str(object.currentText): return False else: - mouseClick(object, 5, 5, 0, Qt.LeftButton) + mouseClick(object) snooze(1) - mouseClick(waitForObjectItem(object, itemName.replace(".", "\\.")), 5, 5, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(object, itemName.replace(".", "\\."))) test.verify(waitFor("str(object.currentText)==itemName", 5000), "Switched combo item to '%s'" % itemName) return True @@ -277,8 +277,7 @@ def selectFromFileDialog(fileName, waitForFile=False, ignoreFinalSnooze=False): # param which a list/tuple of the paths to the qch files to be added def addHelpDocumentation(which): invokeMenuItem("Tools", "Options...") - waitForObjectItem(":Options_QListView", "Help") - clickItem(":Options_QListView", "Help", 14, 15, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(":Options_QListView", "Help")) waitForObject("{container=':Options.qt_tabwidget_tabbar_QTabBar' type='TabItem' text='Documentation'}") clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "Documentation") # get rid of all docs already registered @@ -304,8 +303,7 @@ def addCurrentCreatorDocumentation(): test.fatal("Missing current Qt Creator documentation (expected in %s)" % docPath) return invokeMenuItem("Tools", "Options...") - waitForObjectItem(":Options_QListView", "Help") - clickItem(":Options_QListView", "Help", 14, 15, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(":Options_QListView", "Help")) waitForObject("{container=':Options.qt_tabwidget_tabbar_QTabBar' type='TabItem' text='Documentation'}") clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "Documentation") clickButton(waitForObject("{type='QPushButton' name='addButton' visible='1' text='Add...'}")) @@ -361,8 +359,7 @@ def getConfiguredKits(): return str(treeView.currentIndex().data().toString()) # end of internal function for iterateQtVersions def __setQtVersionForKit__(kit, kitName, kitsQtVersionName): - treeView = waitForObject(":BuildAndRun_QTreeView") - clickItem(treeView, kit, 5, 5, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(":BuildAndRun_QTreeView", kit)) qtVersionStr = str(waitForObject(":Kits_QtVersion_QComboBox").currentText) kitsQtVersionName[kitName] = qtVersionStr # end of internal function for iterate kits @@ -433,8 +430,7 @@ def iterateQtVersions(keepOptionsOpen=False, alreadyOnOptionsDialog=False, additionalResult = [] if not alreadyOnOptionsDialog: invokeMenuItem("Tools", "Options...") - waitForObjectItem(":Options_QListView", "Kits") - clickItem(":Options_QListView", "Kits", 14, 15, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(":Options_QListView", "Kits")) clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "Qt Versions") pattern = re.compile("Qt version (?P.*?) for (?P.*)") treeView = waitForObject(":qtdirList_QTreeView") @@ -443,7 +439,7 @@ def iterateQtVersions(keepOptionsOpen=False, alreadyOnOptionsDialog=False, rootChildText = str(rootIndex.data()).replace(".", "\\.").replace("_", "\\_") for subIndex in dumpIndices(model, rootIndex): subChildText = str(subIndex.data()).replace(".", "\\.").replace("_", "\\_") - clickItem(treeView, ".".join([rootChildText,subChildText]), 5, 5, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(treeView, ".".join([rootChildText,subChildText]))) currentText = str(waitForObject(":QtSupport__Internal__QtVersionManager.QLabel").text) matches = pattern.match(currentText) if matches: @@ -493,8 +489,7 @@ def iterateKits(keepOptionsOpen=False, alreadyOnOptionsDialog=False, additionalResult = [] if not alreadyOnOptionsDialog: invokeMenuItem("Tools", "Options...") - waitForObjectItem(":Options_QListView", "Build & Run") - clickItem(":Options_QListView", "Kits", 14, 15, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(":Options_QListView", "Kits")) clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "Kits") treeView = waitForObject(":BuildAndRun_QTreeView") model = treeView.model() @@ -539,8 +534,7 @@ class HelpViewer: def setFixedHelpViewer(helpViewer): invokeMenuItem("Tools", "Options...") - waitForObjectItem(":Options_QListView", "Help") - clickItem(":Options_QListView", "Help", 5, 5, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(":Options_QListView", "Help")) clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "General") mode = "Always Show " if helpViewer == HelpViewer.HELPMODE: diff --git a/tests/system/suite_APTW/tst_APTW03/test.py b/tests/system/suite_APTW/tst_APTW03/test.py index 521a3f1772e..04048854b86 100644 --- a/tests/system/suite_APTW/tst_APTW03/test.py +++ b/tests/system/suite_APTW/tst_APTW03/test.py @@ -29,7 +29,7 @@ def handleInsertVirtualFunctions(expected, toAdd): def __checkVirtualFunction(treeView, classIndex, isCheckedF, child): item = "%s.%s" % (str(classIndex.text), str(child.text)) test.log("Checking '%s'." % item) - clickItem(treeView, item.replace("_", "\\_"), 5, 5, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(treeView, item.replace("_", "\\_"))) test.verify(waitFor("isCheckedF(child)", 1000), "Function must be checked after clicking") treeView = waitForObject("{container={title='Functions to insert:' type='QGroupBox' unnamed='1'" diff --git a/tests/system/suite_CSUP/tst_CSUP02/test.py b/tests/system/suite_CSUP/tst_CSUP02/test.py index 44ea2595e45..0c0e8331563 100644 --- a/tests/system/suite_CSUP/tst_CSUP02/test.py +++ b/tests/system/suite_CSUP/tst_CSUP02/test.py @@ -52,7 +52,7 @@ def main(): # Steps 3&4: Insert text "class" to new line in Editor mode and press Ctrl+Space. # Focus "class derived from QObject" in the list and press Tab or Enter to complete the code. editorWidget = findObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget") - mouseClick(editorWidget, 5, 5, 0, Qt.LeftButton) + mouseClick(editorWidget) jumpToFirstLine(editorWidget) type(editorWidget, "") type(editorWidget, "") diff --git a/tests/system/suite_CSUP/tst_CSUP05/test.py b/tests/system/suite_CSUP/tst_CSUP05/test.py index 62be1a02e19..c9f3cb892d1 100644 --- a/tests/system/suite_CSUP/tst_CSUP05/test.py +++ b/tests/system/suite_CSUP/tst_CSUP05/test.py @@ -69,7 +69,7 @@ def main(): replaceEditorContent(waitForObject(":Qt Creator.replaceEdit_Utils::FilterLineEdit"), "find") oldCodeText = str(editorWidget.plainText) clickButton(waitForObject(":Qt Creator.Replace All_QToolButton")) - mouseClick(waitForObject(":Qt Creator.replaceEdit_Utils::FilterLineEdit"), 5, 5, 0, Qt.LeftButton) + mouseClick(waitForObject(":Qt Creator.replaceEdit_Utils::FilterLineEdit")) newCodeText = str(editorWidget.plainText) test.compare(newCodeText, oldCodeText.replace("window", "find").replace("Window", "find"), "Verifying if: Found text is replaced with new word properly.") diff --git a/tests/system/suite_HELP/tst_HELP02/test.py b/tests/system/suite_HELP/tst_HELP02/test.py index a1755679d7f..2eb09773b1b 100755 --- a/tests/system/suite_HELP/tst_HELP02/test.py +++ b/tests/system/suite_HELP/tst_HELP02/test.py @@ -68,8 +68,7 @@ def checkQtCreatorHelpVersion(expectedVersion): def setKeyboardShortcutForAboutQtC(): invokeMenuItem("Tools", "Options...") - waitForObjectItem(":Options_QListView", "Environment") - clickItem(":Options_QListView", "Environment", 14, 15, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(":Options_QListView", "Environment")) clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "Keyboard") filter = waitForObject("{container={title='Keyboard Shortcuts' type='QGroupBox' unnamed='1' " "visible='1'} type='Utils::FancyLineEdit' unnamed='1' visible='1' " @@ -79,7 +78,7 @@ def setKeyboardShortcutForAboutQtC(): modelIndex = waitForObject("{column='0' text='AboutQtCreator' type='QModelIndex' " "container={column='0' text='QtCreator' type='QModelIndex' " "container=%s}}" % objectMap.realName(treewidget)) - mouseClick(modelIndex, 5, 5, 0, Qt.LeftButton) + mouseClick(modelIndex) shortcutGB = "{title='Shortcut' type='QGroupBox' unnamed='1' visible='1'}" record = waitForObject("{container=%s type='Core::Internal::ShortcutButton' unnamed='1' " "visible='1' text~='(Stop Recording|Record)'}" % shortcutGB) diff --git a/tests/system/suite_HELP/tst_HELP06/test.py b/tests/system/suite_HELP/tst_HELP06/test.py index eebcd2168a6..e4cadad9512 100755 --- a/tests/system/suite_HELP/tst_HELP06/test.py +++ b/tests/system/suite_HELP/tst_HELP06/test.py @@ -34,7 +34,7 @@ def renameBookmarkFolder(view, item, newName): def invokeContextMenuItemOnBookmarkFolder(view, item, menuItem): aboveWidget = "{name='line' type='QFrame' visible='1' window=':Add Bookmark_BookmarkDialog'}" - mouseClick(waitForObjectItem(view, item), 5, 5, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(view, item)) openItemContextMenu(view, item, 5, 5, 0) activateItem(waitForObject("{aboveWidget=%s type='QMenu' unnamed='1' visible='1' " "window=':Add Bookmark_BookmarkDialog'}" % aboveWidget), menuItem) @@ -81,7 +81,7 @@ def main(): clickButton(waitForObject(":Add Bookmark.New Folder_QPushButton")) renameBookmarkFolder(bookmarkView, "Sample.Folder 1.New Folder*", "Folder 2") clickButton(waitForObject(":Add Bookmark.OK_QPushButton")) - mouseClick(manualQModelIndex, 5, 5, 0, Qt.LeftButton) + mouseClick(manualQModelIndex) type(waitForObject(":Qt Creator_QHelpContentWidget"), "") clickButton(waitForObject(":Qt Creator.Add Bookmark_QToolButton")) clickButton(waitForObject(":Add Bookmark.ExpandBookmarksList_QToolButton")) @@ -106,7 +106,7 @@ def main(): checkIfObjectExists(bldRunQModelIndex, verboseOnFail = True) and checkIfObjectExists(manualQModelIndex, verboseOnFail = True), "Verifying if all folders and bookmarks are present") - mouseClick(waitForObject(":Qt Creator_Bookmarks_TreeView"), 5, 5, 0, Qt.LeftButton) + mouseClick(waitForObject(":Qt Creator_Bookmarks_TreeView")) for _ in range(6): type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "") type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "") diff --git a/tests/system/suite_QMLS/tst_QMLS03/test.py b/tests/system/suite_QMLS/tst_QMLS03/test.py index 62251a9aeeb..c82568a6bce 100644 --- a/tests/system/suite_QMLS/tst_QMLS03/test.py +++ b/tests/system/suite_QMLS/tst_QMLS03/test.py @@ -103,7 +103,7 @@ def main(): "Verifying if usages were properly found using context menu.") # clear previous results & prepare for next search clickButton(waitForObject(":*Qt Creator.Clear_QToolButton")) - mouseClick(editorArea, 5, 5, 0, Qt.LeftButton) + mouseClick(editorArea) # 2. check usages using menu # place cursor to component if not placeCursorToLine(editorArea, "anchors { left: parent.left; top: parent.top; right: parent.right; bottom: parent.verticalCenter }"): @@ -122,7 +122,7 @@ def main(): "Verifying if usages were properly found using main menu.") # clear previous results & prepare for next search clickButton(waitForObject(":*Qt Creator.Clear_QToolButton")) - mouseClick(editorArea, 5, 5, 0, Qt.LeftButton) + mouseClick(editorArea) # 3. check usages using keyboard shortcut # place cursor to component if not placeCursorToLine(editorArea, "SequentialAnimation on opacity {"): diff --git a/tests/system/suite_debugger/tst_qml_js_console/test.py b/tests/system/suite_debugger/tst_qml_js_console/test.py index 18987d050c2..329839cb7fe 100644 --- a/tests/system/suite_debugger/tst_qml_js_console/test.py +++ b/tests/system/suite_debugger/tst_qml_js_console/test.py @@ -28,7 +28,7 @@ source("../../shared/qtcreator.py") def typeToDebuggerConsole(expression): editableIndex = getQModelIndexStr("text=''", ":DebugModeWidget_Debugger::Internal::ConsoleView") - mouseClick(editableIndex, 5, 5, 0, Qt.LeftButton) + mouseClick(editableIndex) type(waitForObject(":Debugger::Internal::ConsoleEdit"), expression) type(waitForObject(":Debugger::Internal::ConsoleEdit"), "") @@ -82,7 +82,7 @@ def getQmlJSConsoleOutput(): return [""] def runChecks(elementProps, parent, checks): - mouseClick(getQModelIndexStr(elementProps, parent), 5, 5, 0, Qt.LeftButton) + mouseClick(getQModelIndexStr(elementProps, parent)) for check in checks: useDebuggerConsole(*check) diff --git a/tests/system/suite_editors/tst_edit_externally/test.py b/tests/system/suite_editors/tst_edit_externally/test.py index 9c2ea61d2cf..8bfdd77b2f3 100644 --- a/tests/system/suite_editors/tst_edit_externally/test.py +++ b/tests/system/suite_editors/tst_edit_externally/test.py @@ -34,7 +34,7 @@ def modifyExternally(filePath): def switchOpenDocsTo(filename): selectFromCombo(":Qt Creator_Core::Internal::NavComboBox", "Open Documents") docs = waitForObject(":OpenDocuments_Widget") - clickItem(docs, filename.replace(".", "\\.").replace("_", "\\_"), 5, 5, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(docs, filename.replace(".", "\\.").replace("_", "\\_"))) return getEditorForFileSuffix(filename) def main(): diff --git a/tests/system/suite_editors/tst_generic_highlighter/test.py b/tests/system/suite_editors/tst_generic_highlighter/test.py index e6f4a7e117d..1a389090fe7 100644 --- a/tests/system/suite_editors/tst_generic_highlighter/test.py +++ b/tests/system/suite_editors/tst_generic_highlighter/test.py @@ -45,7 +45,7 @@ def createFile(folder, filename): __createProjectHandleLastPage__() def clickTableGetPatternLineEdit(table, row): - clickItem(table, row, 5, 5, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(table, row)) return waitForObject("{name='patternsLineEdit' type='QLineEdit' visible='1'}") def getOrModifyFilePatternsFor(mimeType, filter='', toBePresent=None): @@ -54,7 +54,7 @@ def getOrModifyFilePatternsFor(mimeType, filter='', toBePresent=None): result = [] invokeMenuItem("Tools", "Options...") waitForObjectItem(":Options_QListView", "Environment") - clickItem(":Options_QListView", "Environment", 14, 15, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(":Options_QListView", "Environment")) waitForObject("{container=':Options.qt_tabwidget_tabbar_QTabBar' type='TabItem' " "text='MIME Types'}") clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "MIME Types") @@ -118,7 +118,7 @@ def addHighlighterDefinition(*languages): test.log("Updating highlighter definitions...") invokeMenuItem("Tools", "Options...") waitForObjectItem(":Options_QListView", "Text Editor") - clickItem(":Options_QListView", "Text Editor", 14, 15, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(":Options_QListView", "Text Editor")) waitForObject("{container=':Options.qt_tabwidget_tabbar_QTabBar' type='TabItem' " "text='Generic Highlighter'}") clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "Generic Highlighter") diff --git a/tests/system/suite_general/tst_create_proj_wizard/test.py b/tests/system/suite_general/tst_create_proj_wizard/test.py index 7490427692b..534317c3d14 100644 --- a/tests/system/suite_general/tst_create_proj_wizard/test.py +++ b/tests/system/suite_general/tst_create_proj_wizard/test.py @@ -55,7 +55,7 @@ def main(): # skip non-configurable if "Import" in category: continue - clickItem(categoriesView, "Projects." + category, 5, 5, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(categoriesView, "Projects." + category)) templatesView = waitForObject("{name='templatesView' type='QListView' visible='1'}") # needed because categoriesView and templatesView using same model for template in dumpItems(templatesView.model(), templatesView.rootIndex()): @@ -147,12 +147,12 @@ def __createProject__(category, template): invokeMenuItem("File", "New File or Project...") selectFromCombo(waitForObject(":New.comboBox_QComboBox"), "All Templates") categoriesView = waitForObject(":New.templateCategoryView_QTreeView") - clickItem(categoriesView, "Projects." + category, 5, 5, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(categoriesView, "Projects." + category)) templatesView = waitForObject("{name='templatesView' type='QListView' visible='1'}") test.log("Verifying '%s' -> '%s'" % (category.replace("\\.", "."), template.replace("\\.", "."))) origTxt = safeGetTextBrowserText() - clickItem(templatesView, template, 5, 5, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(templatesView, template)) waitFor("origTxt != safeGetTextBrowserText() != ''", 2000) displayedPlatforms = __getSupportedPlatforms__(safeGetTextBrowserText(), template, True)[0] safeClickButton("Choose...") diff --git a/tests/system/suite_general/tst_default_settings/test.py b/tests/system/suite_general/tst_default_settings/test.py index 3270f619e53..b92a1c93aea 100644 --- a/tests/system/suite_general/tst_default_settings/test.py +++ b/tests/system/suite_general/tst_default_settings/test.py @@ -50,8 +50,7 @@ def __createMinimumIni__(emptyParent): iniFile.close() def __checkKits__(): - waitForObjectItem(":Options_QListView", "Kits") - clickItem(":Options_QListView", "Kits", 14, 15, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(":Options_QListView", "Kits")) # check compilers expectedCompilers = __getExpectedCompilers__() foundCompilers = [] @@ -95,7 +94,7 @@ def __processSubItems__(treeObjStr, section, parModelIndexStr, doneItems, itObj = "%s occurrence='%d'}" % (itObj[:-1], alreadyDone + 1) currentSelectedTreeItem = waitForObject(itObj, 3000) tree.scrollTo(it) - mouseClick(currentSelectedTreeItem, 5, 5, 0, Qt.LeftButton) + mouseClick(currentSelectedTreeItem) additionalFunc(indexName, *additionalParameters) currentSelectedTreeItem = None if model.rowCount(it) > 0: diff --git a/tests/system/suite_general/tst_installed_languages/test.py b/tests/system/suite_general/tst_installed_languages/test.py index a6e104ceb31..a1ac0177427 100644 --- a/tests/system/suite_general/tst_installed_languages/test.py +++ b/tests/system/suite_general/tst_installed_languages/test.py @@ -31,8 +31,7 @@ def main(): if not startedWithoutPluginError(): return invokeMenuItem("Tools", "Options...") - waitForObjectItem(":Options_QListView", "Environment") - clickItem(":Options_QListView", "Environment", 14, 15, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(":Options_QListView", "Environment")) clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "Interface") languageName = testData.field(lang, "language") if "%1" in languageName: diff --git a/tests/system/suite_general/tst_remove_kits/test.py b/tests/system/suite_general/tst_remove_kits/test.py index d48930ba350..b3376d71601 100644 --- a/tests/system/suite_general/tst_remove_kits/test.py +++ b/tests/system/suite_general/tst_remove_kits/test.py @@ -47,8 +47,7 @@ def __removeKit__(kit, kitName): # The following kits will be the default kit at that time kitNameTemplate += " (default)" item = kitNameTemplate % kitName.replace(".", "\\.") - waitForObjectItem(":BuildAndRun_QTreeView", item) - clickItem(":BuildAndRun_QTreeView", item, 5, 5, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(":BuildAndRun_QTreeView", item)) clickButton(waitForObject(":Remove_QPushButton")) def main(): diff --git a/tests/system/suite_general/tst_save_before_build/test.py b/tests/system/suite_general/tst_save_before_build/test.py index 65e95dea8f1..728f849975a 100644 --- a/tests/system/suite_general/tst_save_before_build/test.py +++ b/tests/system/suite_general/tst_save_before_build/test.py @@ -27,8 +27,7 @@ source("../../shared/qtcreator.py") def ensureSaveBeforeBuildChecked(shouldBeChecked): invokeMenuItem("Tools", "Options...") - waitForObjectItem(":Options_QListView", "Build & Run") - clickItem(":Options_QListView", "Build & Run", 14, 15, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(":Options_QListView", "Build & Run")) clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "General") if test.compare(waitForObject(":Build and Run.Save all files before build_QCheckBox").checked, shouldBeChecked, "'Save all files before build' should be %s" % str(shouldBeChecked)): diff --git a/tests/system/suite_general/tst_session_handling/test.py b/tests/system/suite_general/tst_session_handling/test.py index a6751de0dd7..3a536975f2e 100644 --- a/tests/system/suite_general/tst_session_handling/test.py +++ b/tests/system/suite_general/tst_session_handling/test.py @@ -84,9 +84,9 @@ def prepareTestExamples(): def switchSession(toSession): test.log("Switching to session '%s'" % toSession) invokeMenuItem("File", "Sessions", "Manage...") - clickItem(waitForObject("{name='sessionView' type='ProjectExplorer::Internal::SessionView' visible='1' " - "window=':Session Manager_ProjectExplorer::Internal::SessionDialog'}"), - toSession, 5, 5, 0, Qt.LeftButton) + sessionView = ("{name='sessionView' type='ProjectExplorer::Internal::SessionView' visible='1' " + "window=':Session Manager_ProjectExplorer::Internal::SessionDialog'}") + mouseClick(waitForObjectItem(sessionView, toSession)) clickButton(waitForObject("{name='btSwitch' text='Switch to' type='QPushButton' visible='1' " "window=':Session Manager_ProjectExplorer::Internal::SessionDialog'}")) diff --git a/tests/system/suite_tools/tst_codepasting/test.py b/tests/system/suite_tools/tst_codepasting/test.py index 35f85ab9488..7329bdac2e4 100644 --- a/tests/system/suite_tools/tst_codepasting/test.py +++ b/tests/system/suite_tools/tst_codepasting/test.py @@ -157,8 +157,7 @@ def fetchSnippet(protocol, description, pasteId, skippedPasting): replaceEditorContent(waitForObject(":PasteSelectDialog.pasteEdit_QLineEdit"), pasteId) if foundSnippet: pasteLine = pasteLine.replace(".", "\\.") - waitForObjectItem(":PasteSelectDialog.listWidget_QListWidget", pasteLine) - clickItem(":PasteSelectDialog.listWidget_QListWidget", pasteLine, 5, 5, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(":PasteSelectDialog.listWidget_QListWidget", pasteLine)) clickButton(waitForObject(":PasteSelectDialog.OK_QPushButton")) return pasteId diff --git a/tests/system/suite_tools/tst_designer_edit/test.py b/tests/system/suite_tools/tst_designer_edit/test.py index bcbadd7409a..8790ff84e14 100644 --- a/tests/system/suite_tools/tst_designer_edit/test.py +++ b/tests/system/suite_tools/tst_designer_edit/test.py @@ -135,7 +135,7 @@ def performEditCombo(): test.compare(dumpItems(itemListWidget.model()), expectedItems, "Verifying last item has moved to top of the list.") # remove the "Combo Item 1" item from the list - clickItem(itemListWidget, "Combo Item 1", 5, 5, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(itemListWidget, "Combo Item 1")) clickButton("{name='deleteListItemButton' type='QToolButton' visible='1' window=%s}" % edComboWin) waitFor("itemListWidget.model().rowCount() == len(expectedItems) - 1", 2000) diff --git a/tests/system/suite_tools/tst_designer_goto_slot/test.py b/tests/system/suite_tools/tst_designer_goto_slot/test.py index f1e47727db0..f07c0faa8e6 100644 --- a/tests/system/suite_tools/tst_designer_goto_slot/test.py +++ b/tests/system/suite_tools/tst_designer_goto_slot/test.py @@ -52,8 +52,7 @@ def main(): activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1'}", "Go to slot...")) signalWidgetObject = waitForObject(":Select signal.signalList_QTreeView") signalName = con[1] + "." + con[2] - waitForObjectItem(signalWidgetObject, signalName) - clickItem(signalWidgetObject, signalName, 5, 5, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(signalWidgetObject, signalName)) clickButton(waitForObject(":Go to slot.OK_QPushButton")) editor = waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget") type(editor, "") diff --git a/tests/system/suite_tools/tst_git_local/test.py b/tests/system/suite_tools/tst_git_local/test.py index 8cbdfc42c69..0b2331926eb 100644 --- a/tests/system/suite_tools/tst_git_local/test.py +++ b/tests/system/suite_tools/tst_git_local/test.py @@ -41,7 +41,7 @@ def commit(commitMessage, expectedLogMessage, uncheckUntracked=False): model = treeView.model() for indexStr in dumpItems(model): if 'untracked' in indexStr: - clickItem(treeView, indexStr, 5, 5, 0, Qt.LeftButton) + mouseClick(waitForObjectItem(treeView, indexStr)) checkOrFixCommitterInformation('invalidAuthorLabel', 'authorLineEdit', 'Nobody') checkOrFixCommitterInformation('invalidEmailLabel', 'emailLineEdit', 'nobody@nowhere.com') clickButton(waitForObject(":splitter.Commit File(s)_VcsBase::QActionPushButton"))