forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.11'
Conflicts: src/plugins/genericprojectmanager/genericproject.cpp Change-Id: Ib54f1645ec70a9e6460a888a13190ede130bccca
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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?")
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user