forked from qt-creator/qt-creator
Squish: Clean up single (left) mouse clicks on items or objects
Do no more use pixels as offset if we can handle this without. Clicking on items by using an (x, y) offset will likely fail if running on a machine with a different DPI setting. Change-Id: I0e5a4985104bd1d68aadf8c5534583fa1b048edb Reviewed-by: Robert Loehning <robert.loehning@qt.io>
This commit is contained in:
@@ -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):
|
||||
|
@@ -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")
|
||||
|
@@ -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]
|
||||
|
@@ -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"
|
||||
|
@@ -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<version>.*?) for (?P<target>.*)")
|
||||
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:
|
||||
|
@@ -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'"
|
||||
|
@@ -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, "<Return>")
|
||||
type(editorWidget, "<Up>")
|
||||
|
@@ -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.")
|
||||
|
@@ -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)
|
||||
|
@@ -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"), "<Down>")
|
||||
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"), "<Right>")
|
||||
type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "<Return>")
|
||||
|
@@ -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 {"):
|
||||
|
@@ -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"), "<Return>")
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
@@ -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():
|
||||
|
@@ -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")
|
||||
|
@@ -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...")
|
||||
|
@@ -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:
|
||||
|
@@ -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:
|
||||
|
@@ -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():
|
||||
|
@@ -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)):
|
||||
|
@@ -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'}"))
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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)
|
||||
|
@@ -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, "<Up>")
|
||||
|
@@ -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"))
|
||||
|
Reference in New Issue
Block a user