Commit e2adf9b7 authored by Christian Stenger's avatar Christian Stenger

Squish: Fix tst_HELP05

Additionally move Qt5Path helper class into classes.py as it's now
used in more than one test suite.

Change-Id: I0a1faed7fa8c082316c5568e4150091812af8979
Reviewed-by: default avatarRobert Loehning <robert.loehning@theqtcompany.com>
parent 75dc7287
......@@ -172,3 +172,33 @@ class LibType:
if libType == LibType.QT_PLUGIN:
return "Qt Plugin"
return None
class Qt5Path:
DOCS = 0
EXAMPLES = 1
@staticmethod
def getPaths(pathSpec):
if pathSpec == Qt5Path.DOCS:
path52 = "/doc"
path53 = "/Docs/Qt-5.3"
path54 = "/Docs/Qt-5.4"
elif pathSpec == Qt5Path.EXAMPLES:
path52 = "/examples"
path53 = "/Examples/Qt-5.3"
path54 = "/Examples/Qt-5.4"
else:
test.fatal("Unknown pathSpec given: %s" % str(pathSpec))
return []
if platform.system() in ('Microsoft', 'Windows'):
return ["C:/Qt/Qt5.2.1/5.2.1/msvc2010" + path52,
"C:/Qt/Qt5.3.1" + path53, "C:/Qt/Qt5.4.1" + path54]
elif platform.system() == 'Linux':
if __is64BitOS__():
return map(os.path.expanduser, ["~/Qt5.2.1/5.2.1/gcc_64" + path52,
"~/Qt5.3.1" + path53, "~/Qt5.4.1" + path54])
return map(os.path.expanduser, ["~/Qt5.2.1/5.2.1/gcc" + path52,
"~/Qt5.3.1" + path53, "~/Qt5.4.1" + path54])
else:
return map(os.path.expanduser, ["~/Qt5.2.1/5.2.1/clang_64" + path52,
"~/Qt5.3.1" + path53])
......@@ -52,14 +52,17 @@ def main():
startApplication("qtcreator" + SettingsPath)
if not startedWithoutPluginError():
return
addHelpDocumentation([os.path.join(sdkPath, "Documentation", "qt.qch")])
qchs = []
for p in Qt5Path.getPaths(Qt5Path.DOCS):
qchs.append(os.path.join(p, "qtquick.qch"))
addHelpDocumentation(qchs)
# create qt quick application
createNewQtQuickApplication(tempDir(), "SampleApp")
# verify Rectangle help
verifyInteractiveQMLHelp("Rectangle {", "QML Rectangle Element")
verifyInteractiveQMLHelp("Window {", "Window QML Type")
# go back to edit mode
switchViewTo(ViewConstants.EDIT)
# verify MouseArea help
verifyInteractiveQMLHelp("MouseArea {", "QML MouseArea Element")
verifyInteractiveQMLHelp("MouseArea {", "MouseArea QML Type")
# exit
invokeMenuItem("File","Exit")
......@@ -31,36 +31,6 @@
source("../../shared/qtcreator.py")
source("../../shared/suites_qtta.py")
class Qt5Path:
DOCS = 0
EXAMPLES = 1
@staticmethod
def getPaths(pathSpec):
if pathSpec == Qt5Path.DOCS:
path52 = "/doc"
path53 = "/Docs/Qt-5.3"
path54 = "/Docs/Qt-5.4"
elif pathSpec == Qt5Path.EXAMPLES:
path52 = "/examples"
path53 = "/Examples/Qt-5.3"
path54 = "/Examples/Qt-5.4"
else:
test.fatal("Unknown pathSpec given: %s" % str(pathSpec))
return []
if platform.system() in ('Microsoft', 'Windows'):
return ["C:/Qt/Qt5.2.1/5.2.1/msvc2010" + path52,
"C:/Qt/Qt5.3.1" + path53, "C:/Qt/Qt5.4.1" + path54]
elif platform.system() == 'Linux':
if __is64BitOS__():
return map(os.path.expanduser, ["~/Qt5.2.1/5.2.1/gcc_64" + path52,
"~/Qt5.3.1" + path53, "~/Qt5.4.1" + path54])
return map(os.path.expanduser, ["~/Qt5.2.1/5.2.1/gcc" + path52,
"~/Qt5.3.1" + path53, "~/Qt5.4.1" + path54])
else:
return map(os.path.expanduser, ["~/Qt5.2.1/5.2.1/clang_64" + path52,
"~/Qt5.3.1" + path53])
def handlePackagingMessageBoxes():
if platform.system() == "Darwin":
messageBox = "{type='QMessageBox' unnamed='1' visible='1'}"
......
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