Commit e94de191 authored by Robert Loehning's avatar Robert Loehning
Browse files

Squish: Update objects of Qt version settings



Change-Id: I2fce4d860a70230519d7f56e58d88a03dbb379ba
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent b26920c3
......@@ -180,7 +180,6 @@
:QtSupport__Internal__QtVersionManager.QLabel {container=':qt_tabwidget_stackedwidget.QtSupport__Internal__QtVersionManager_QtSupport::Internal::QtOptionsPageWidget' text?='Qt version *' type='QLabel' unnamed='1' visible='1'}
:QtSupport__Internal__QtVersionManager.errorLabel.QLabel {container=':qt_tabwidget_stackedwidget.QtSupport__Internal__QtVersionManager_QtSupport::Internal::QtOptionsPageWidget' name='errorLabel' type='QLabel' visible='1'}
:QtSupport__Internal__QtVersionManager.qmake_QLabel {container=':qt_tabwidget_stackedwidget.QtSupport__Internal__QtVersionManager_QtSupport::Internal::QtOptionsPageWidget' name='qmakePath' type='QLabel' visible='1'}
:QtSupport__Internal__QtVersionManager.qtdirList_QTreeWidget {container=':qt_tabwidget_stackedwidget.QtSupport__Internal__QtVersionManager_QtSupport::Internal::QtOptionsPageWidget' name='qtdirList' type='QTreeWidget' visible='1'}
:QtVersionLabel_KitPage {container=':qt_tabwidget_stackedwidget_QWidget' text='Qt version:' type='QLabel' unnamed='1' visible='1'}
:Restart required.OK_QPushButton {text='OK' type='QPushButton' unnamed='1' visible='1' window=':Restart required_QMessageBox'}
:Restart required_QMessageBox {text='The language change will take effect after a restart of Qt Creator.' type='QMessageBox' unnamed='1' visible='1'}
......@@ -225,7 +224,9 @@
:qt_tabwidget_stackedwidget.CppTools__Internal__CompletionSettingsPage_QWidget {container=':Options.qt_tabwidget_stackedwidget_QStackedWidget' name='CppTools__Internal__CompletionSettingsPage' type='QWidget' visible='1'}
:qt_tabwidget_stackedwidget.Form_QWidget {container=':Options.qt_tabwidget_stackedwidget_QStackedWidget' name='Help__Internal__GeneralSettingsPage' type='QWidget' visible='1' windowTitle='Form'}
:qt_tabwidget_stackedwidget.QtSupport__Internal__QtVersionManager_QtSupport::Internal::QtOptionsPageWidget {container=':Options.qt_tabwidget_stackedwidget_QStackedWidget' name='QtSupport__Internal__QtVersionManager' type='QtSupport::Internal::QtOptionsPageWidget' visible='1'}
:qt_tabwidget_stackedwidget_QScrollArea {container=':Options.qt_tabwidget_stackedwidget_QStackedWidget' type='QScrollArea' unnamed='1' visible='1'}
:qt_tabwidget_stackedwidget_QWidget {container=':Options.qt_tabwidget_stackedwidget_QStackedWidget' type='QWidget' unnamed='1' visible='1'}
:qtdirList_QTreeView {container=':qt_tabwidget_stackedwidget_QScrollArea' name='qtdirList' type='QTreeView' visible='1'}
:scrollArea.Details_Utils::DetailsButton {text='Details' type='Utils::DetailsButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:scrollArea.Edit build configuration:_QComboBox {leftWidget=':scrollArea.Edit build configuration:_QLabel' type='QComboBox' unnamed='1' visible='1'}
:scrollArea.Edit build configuration:_QLabel {text='Edit build configuration:' type='QLabel' unnamed='1' visible='1'}
......
......@@ -194,8 +194,8 @@ def getQtInformationForQmlProject():
qtVersionStr = str(waitForObject(":Kits_QtVersion_QComboBox").currentText)
test.log("Kit '%s' uses Qt Version '%s'" % (kit, qtVersionStr))
clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "Qt Versions")
treeWidget = waitForObject(":QtSupport__Internal__QtVersionManager.qtdirList_QTreeWidget")
if not __selectTreeItemOnBuildAndRun__(treeWidget, qtVersionStr):
treeView = waitForObject(":qtdirList_QTreeView")
if not __selectTreeItemOnBuildAndRun__(treeView, qtVersionStr):
test.fatal("Found no matching Qt Version for kit - this shouldn't happen.")
clickButton(waitForObject(":Options.Cancel_QPushButton"))
return None, None, None, None
......
......@@ -363,8 +363,8 @@ def __checkParentAccess__(filePath):
# and a list of information of its configured Qt
def getConfiguredKits():
def __retrieveQtVersionName__(target, version):
treeWidget = waitForObject(":QtSupport__Internal__QtVersionManager.qtdirList_QTreeWidget")
return treeWidget.currentItem().text(0)
treeView = waitForObject(":qtdirList_QTreeView")
return str(treeView.currentIndex().data().toString())
# end of internal function for iterateQtVersions
def __setQtVersionForKit__(kit, kitName, kitsQtVersionName):
treeView = waitForObject(":BuildAndRun_QTreeView")
......@@ -443,13 +443,13 @@ def iterateQtVersions(keepOptionsOpen=False, alreadyOnOptionsDialog=False,
clickItem(":Options_QListView", "Build & Run", 14, 15, 0, Qt.LeftButton)
clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "Qt Versions")
pattern = re.compile("Qt version (?P<version>.*?) for (?P<target>.*)")
treeWidget = waitForObject(":QtSupport__Internal__QtVersionManager.qtdirList_QTreeWidget")
root = treeWidget.invisibleRootItem()
for rootChild in dumpChildren(root):
rootChildText = str(rootChild.text(0)).replace(".", "\\.").replace("_", "\\_")
for subChild in dumpChildren(rootChild):
subChildText = str(subChild.text(0)).replace(".", "\\.").replace("_", "\\_")
clickItem(treeWidget, ".".join([rootChildText,subChildText]), 5, 5, 0, Qt.LeftButton)
treeView = waitForObject(":qtdirList_QTreeView")
model = treeView.model()
for rootIndex in dumpIndices(model):
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)
currentText = str(waitForObject(":QtSupport__Internal__QtVersionManager.QLabel").text)
matches = pattern.match(currentText)
if matches:
......
......@@ -80,8 +80,7 @@ def __checkBuildAndRun__():
qmakePath = which("qmake")
foundQt = []
clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "Qt Versions")
__iterateTree__(":QtSupport__Internal__QtVersionManager.qtdirList_QTreeWidget",
__qtFunc__, foundQt, qmakePath)
__iterateTree__(":qtdirList_QTreeView", __qtFunc__, foundQt, qmakePath)
test.verify(not qmakePath or len(foundQt) == 1,
"Was qmake from %s autodetected? Found %s" % (qmakePath, foundQt))
if foundQt:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment