summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2020-02-05 10:19:52 +0100
committerEike Ziller <eike.ziller@qt.io>2020-02-05 11:59:35 +0100
commit5c121d57911d91f19b066803ad38ca4815255dde (patch)
tree728e9206d48968ccbc72dafcd284da4c47b2a9e7 /tests
parentaeb7ef6b37030ed4beb8f431167d2ef88172486b (diff)
parentb2ddeacfb5c54d3b0e15c8e6087d21aefaed4d7a (diff)
downloadqt-creator-5c121d57911d91f19b066803ad38ca4815255dde.tar.gz
Merge remote-tracking branch 'origin/4.11'
Conflicts: src/plugins/genericprojectmanager/genericproject.cpp Change-Id: Ib54f1645ec70a9e6460a888a13190ede130bccca
Diffstat (limited to 'tests')
-rw-r--r--tests/system/shared/editor_utils.py7
-rw-r--r--tests/system/shared/project_explorer.py6
-rw-r--r--tests/system/shared/workarounds.py27
-rw-r--r--tests/system/suite_general/tst_rename_file/test.py12
-rw-r--r--tests/system/suite_general/tst_tasks_handling/test.py9
-rw-r--r--tests/system/suite_tools/tst_designer_autocomplete/test.py6
-rw-r--r--tests/system/suite_tools/tst_designer_goto_slot/test.py6
-rw-r--r--tests/unit/unittest/unittest.pro8
8 files changed, 14 insertions, 67 deletions
diff --git a/tests/system/shared/editor_utils.py b/tests/system/shared/editor_utils.py
index b1ea1bb1bd..8410e986ef 100644
--- a/tests/system/shared/editor_utils.py
+++ b/tests/system/shared/editor_utils.py
@@ -70,13 +70,6 @@ def placeCursorToLine(editor, line, isRegex=False):
def menuVisibleAtEditor(editor, menuInList):
menuInList[0] = None
try:
- # Hack for Squish 5.0.1 handling menus of Qt5.2 on Mac (avoids crash) - remove asap
- if platform.system() == 'Darwin':
- for obj in object.topLevelObjects():
- if className(obj) == "QMenu" and obj.visible and widgetContainsPoint(editor, obj.mapToGlobal(QPoint(0, 0))):
- menuInList[0] = obj
- return True
- return False
menu = waitForObject("{type='QMenu' unnamed='1' visible='1'}", 500)
topLeft = menu.mapToGlobal(QPoint(0, 0))
bottomLeft = menu.mapToGlobal(QPoint(0, menu.height))
diff --git a/tests/system/shared/project_explorer.py b/tests/system/shared/project_explorer.py
index 60b3af9f20..01a2e81c99 100644
--- a/tests/system/shared/project_explorer.py
+++ b/tests/system/shared/project_explorer.py
@@ -143,11 +143,7 @@ def invokeContextMenuOnProject(projectName, menuItem):
return
openItemContextMenu(waitForObject(":Qt Creator_Utils::NavigationTreeView"),
str(projItem.text).replace("_", "\\_").replace(".", "\\."), 5, 5, 0)
- # Hack for Squish 5.0.1 handling menus of Qt5.2 on Mac (avoids crash) - remove asap
- if platform.system() == 'Darwin':
- waitFor("macHackActivateContextMenuItem(menuItem)", 6000)
- else:
- activateItem(waitForObjectItem("{name='Project.Menu.Project' type='QMenu' visible='1'}", menuItem))
+ activateItem(waitForObjectItem("{name='Project.Menu.Project' type='QMenu' visible='1'}", menuItem))
return projItem
def addAndActivateKit(kit):
diff --git a/tests/system/shared/workarounds.py b/tests/system/shared/workarounds.py
index 697625945f..ab8e338ad7 100644
--- a/tests/system/shared/workarounds.py
+++ b/tests/system/shared/workarounds.py
@@ -25,33 +25,6 @@
import urllib2
-############ functions not related to issues tracked inside jira ############
-
-def __checkWithoutWidget__(*args):
- return className(args[0]) == 'QMenu' and args[0].visible
-
-def __checkWithWidget__(*args):
- return (__checkWithoutWidget__(args[0])
- and widgetContainsPoint(waitForObject(args[1]), args[0].mapToGlobal(QPoint(0 ,0))))
-
-# hack for activating context menus on Mac because of Squish5/Qt5.2 problems
-# param item a string holding the menu item to invoke (just the label)
-# param widget an object; if provided there will be an additional check if the menu's top left
-# corner is placed on this widget
-def macHackActivateContextMenuItem(item, widget=None):
- if widget:
- func = __checkWithWidget__
- else:
- func = __checkWithoutWidget__
- for obj in object.topLevelObjects():
- try:
- if func(obj, widget):
- activateItem(waitForObjectItem(obj, item))
- return True
- except:
- pass
- return False
-
################ workarounds for issues tracked inside jira #################
JIRA_URL='https://bugreports.qt.io/browse'
diff --git a/tests/system/suite_general/tst_rename_file/test.py b/tests/system/suite_general/tst_rename_file/test.py
index a5568f85b5..5c296973b0 100644
--- a/tests/system/suite_general/tst_rename_file/test.py
+++ b/tests/system/suite_general/tst_rename_file/test.py
@@ -96,15 +96,11 @@ def renameFile(projectDir, proFile, branch, oldname, newname):
itemWithWildcard = addBranchWildcardToRoot(itemText)
waitForObjectItem(treeview, itemWithWildcard, 10000)
openItemContextMenu(treeview, itemWithWildcard, 5, 5, 0)
- # hack for Squish5/Qt5.2 problems of handling menus on Mac - remove asap
- if platform.system() == 'Darwin':
- waitFor("macHackActivateContextMenuItem('Rename...')", 5000)
+ if oldname.lower().endswith(".qrc"):
+ menu = ":Qt Creator.Project.Menu.Folder_QMenu"
else:
- if oldname.lower().endswith(".qrc"):
- menu = ":Qt Creator.Project.Menu.Folder_QMenu"
- else:
- menu = ":Qt Creator.Project.Menu.File_QMenu"
- activateItem(waitForObjectItem(menu, "Rename..."))
+ menu = ":Qt Creator.Project.Menu.File_QMenu"
+ activateItem(waitForObjectItem(menu, "Rename..."))
replaceEdit = waitForObject(":Qt Creator_Utils::NavigationTreeView::QExpandingLineEdit")
test.compare(replaceEdit.selectedText, oldname.rsplit(".", 1)[0],
"Only the filename without the extension is selected?")
diff --git a/tests/system/suite_general/tst_tasks_handling/test.py b/tests/system/suite_general/tst_tasks_handling/test.py
index d7acc4c940..429e711f5c 100644
--- a/tests/system/suite_general/tst_tasks_handling/test.py
+++ b/tests/system/suite_general/tst_tasks_handling/test.py
@@ -75,12 +75,9 @@ def generateMockTasksFile():
def checkOrUncheckMyTasks():
filterButton = waitForObject(toolButton % 'Filter by categories')
clickButton(filterButton)
- if platform.system() == 'Darwin':
- waitFor("macHackActivateContextMenuItem('My Tasks')", 5000)
- else:
- activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1' "
- "window=':Qt Creator_Core::Internal::MainWindow'}",
- "My Tasks"))
+ activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1' "
+ "window=':Qt Creator_Core::Internal::MainWindow'}",
+ "My Tasks"))
def getBuildIssuesTypeCounts(model):
issueTypes = map(lambda x: x.data(Qt.UserRole + 5).toInt(), dumpIndices(model))
diff --git a/tests/system/suite_tools/tst_designer_autocomplete/test.py b/tests/system/suite_tools/tst_designer_autocomplete/test.py
index 0b97efec6a..6e49d7ba48 100644
--- a/tests/system/suite_tools/tst_designer_autocomplete/test.py
+++ b/tests/system/suite_tools/tst_designer_autocomplete/test.py
@@ -38,11 +38,7 @@ def main():
if buttonName:
openContextMenu(waitForObject("{container=':*Qt Creator.FormEditorStack_Designer::Internal::FormEditorStack'"
"text='PushButton' type='QPushButton' visible='1'}"), 5, 5, 1)
- # hack for Squish5/Qt5.2 problems of handling menus on Mac - remove asap
- if platform.system() == 'Darwin':
- waitFor("macHackActivateContextMenuItem('Change objectName...')", 6000)
- else:
- activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1'}", "Change objectName..."))
+ activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1'}", "Change objectName..."))
typeLines(waitForObject(":FormEditorStack_qdesigner_internal::PropertyLineEdit"), buttonName)
else:
# Verify that everything works without ever changing the name
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 11a1b4d671..5e6352454a 100644
--- a/tests/system/suite_tools/tst_designer_goto_slot/test.py
+++ b/tests/system/suite_tools/tst_designer_goto_slot/test.py
@@ -45,11 +45,7 @@ def main():
selectFromLocator("mainwindow.ui")
openContextMenu(waitForObject(con[0]), 5, 5, 0)
snooze(1)
- # hack for Squish 5/Qt5.2 problems of handling menus on Mac - remove asap
- if platform.system() == 'Darwin':
- waitFor("macHackActivateContextMenuItem('Go to slot...', con[0])", 6000)
- else:
- activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1'}", "Go to slot..."))
+ activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1'}", "Go to slot..."))
signalWidgetObject = waitForObject(":Select signal.signalList_QTreeView")
signalName = con[1] + "." + con[2]
mouseClick(waitForObjectItem(signalWidgetObject, signalName), 5, 5, 0, Qt.LeftButton)
diff --git a/tests/unit/unittest/unittest.pro b/tests/unit/unittest/unittest.pro
index 8f7ca8032a..1db48813e8 100644
--- a/tests/unit/unittest/unittest.pro
+++ b/tests/unit/unittest/unittest.pro
@@ -138,7 +138,6 @@ SOURCES += \
clangdocumentprocessors-test.cpp \
clangdocumentprocessor-test.cpp \
clangdocuments-test.cpp \
- clangdocumentsuspenderresumer-test.cpp \
clangdocument-test.cpp \
clangfixitoperation-test.cpp \
clangfollowsymbol-test.cpp \
@@ -146,7 +145,6 @@ SOURCES += \
clangjobqueue-test.cpp \
clangjobs-test.cpp \
clangparsesupportivetranslationunitjob-test.cpp \
- clangreferencescollector-test.cpp \
clangrequestannotationsjob-test.cpp \
clangrequestreferencesjob-test.cpp \
clangresumedocumentjob-test.cpp \
@@ -177,7 +175,6 @@ SOURCES += \
sqlitetable-test.cpp \
sqlstatementbuilder-test.cpp \
token-test.cpp \
- tokenprocessor-test.cpp \
translationunitupdater-test.cpp \
unsavedfiles-test.cpp \
unsavedfile-test.cpp \
@@ -187,9 +184,11 @@ SOURCES += \
!isEmpty(LIBTOOLING_LIBS) {
SOURCES += \
gtest-llvm-printing.cpp \
+ clangdocumentsuspenderresumer-test.cpp \
clangquerygatherer-test.cpp \
clangqueryprojectfindfilter-test.cpp \
clangquery-test.cpp \
+ clangreferencescollector-test.cpp \
gtest-clang-printing.cpp \
pchcreator-test.cpp \
refactoringclientserverinprocess-test.cpp \
@@ -202,7 +201,8 @@ SOURCES += \
symbolscollector-test.cpp \
testclangtool.cpp \
usedmacrocollector-test.cpp \
- builddependencycollector-test.cpp
+ builddependencycollector-test.cpp \
+ tokenprocessor-test.cpp
}
!isEmpty(CLANGFORMAT_LIBS) {