forked from qt-creator/qt-creator
Squish: Use examples and docs from Qt 5 in suite_WELP
Change-Id: Iddfa426e9c6133bd1f12ec8e119816c2d38ba55a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
committed by
Christian Stenger
parent
309be8277d
commit
b252733e63
@@ -38,8 +38,8 @@ def main():
|
||||
test.log("Welcome mode is not scriptable with this Squish version")
|
||||
return
|
||||
# prepare example project
|
||||
sourceExample = os.path.join(sdkPath, "Examples", "4.7", "declarative", "animation", "basics",
|
||||
"property-animation")
|
||||
sourceExample = os.path.join(Qt5Path.examplesPath(Targets.DESKTOP_561_DEFAULT),
|
||||
"quick", "animation")
|
||||
if not neededFilePresent(sourceExample):
|
||||
return
|
||||
# open Qt Creator
|
||||
@@ -72,16 +72,16 @@ def main():
|
||||
checkTypeAndProperties(typePropDet)
|
||||
|
||||
# select "Open project" and select a project
|
||||
examplePath = os.path.join(prepareTemplate(sourceExample), "propertyanimation.pro")
|
||||
examplePath = os.path.join(prepareTemplate(sourceExample), "animation.pro")
|
||||
openQmakeProject(examplePath, fromWelcome = True)
|
||||
progressBarWait(30000)
|
||||
test.verify(checkIfObjectExists("{column='0' container=':Qt Creator_Utils::NavigationTreeView'"
|
||||
" text~='propertyanimation( \(.*\))?' type='QModelIndex'}"),
|
||||
" text~='animation( \(.*\))?' type='QModelIndex'}"),
|
||||
"Verifying: The project is opened in 'Edit' mode after configuring.")
|
||||
# go to "Welcome page" again and check if there is an information about recent projects
|
||||
switchViewTo(ViewConstants.WELCOME)
|
||||
test.verify(checkIfObjectExists(getQmlItem("Text", welcomePage, False,
|
||||
"text='propertyanimation'")) and
|
||||
"text='animation'")) and
|
||||
checkIfObjectExists(getQmlItem("Text", welcomePage, False,
|
||||
"text='SampleApp'")),
|
||||
"Verifying: 'Welcome page' displays information about recently created and "
|
||||
|
@@ -44,13 +44,12 @@ def main():
|
||||
if not canTestEmbeddedQtQuick():
|
||||
test.log("Welcome mode is not scriptable with this Squish version")
|
||||
return
|
||||
global sdkPath
|
||||
welcomePage = ":Qt Creator.WelcomePage_QQuickWidget"
|
||||
# open Qt Creator
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
qchs = [os.path.join(sdkPath, "Documentation", "qt.qch")]
|
||||
qchs = []
|
||||
for p in Qt5Path.getPaths(Qt5Path.DOCS):
|
||||
qchs.extend([os.path.join(p, "qtopengl.qch"), os.path.join(p, "qtwidgets.qch")])
|
||||
addHelpDocumentation(qchs)
|
||||
@@ -67,13 +66,8 @@ def main():
|
||||
5, 5, 0, Qt.LeftButton)
|
||||
test.verify(checkIfObjectExists(getQmlItem("Text", welcomePage, False, "text='Examples'")),
|
||||
"Verifying: 'Examples' topic is opened and the examples are shown.")
|
||||
basePath = "opengl/2dpainting/2dpainting.pro"
|
||||
qt4Exmpl = os.path.join(sdkPath, "Examples", "4.7", basePath)
|
||||
qt5Exmpls = []
|
||||
for p in Qt5Path.getPaths(Qt5Path.EXAMPLES):
|
||||
qt5Exmpls.append(os.path.join(p, basePath))
|
||||
proFiles = [qt4Exmpl]
|
||||
proFiles.extend(qt5Exmpls)
|
||||
proFiles = map(lambda p: os.path.join(p, "opengl", "2dpainting", "2dpainting.pro"),
|
||||
Qt5Path.getPaths(Qt5Path.EXAMPLES))
|
||||
cleanUpUserFiles(proFiles)
|
||||
for p in proFiles:
|
||||
removePackagingDirectory(os.path.dirname(p))
|
||||
@@ -115,13 +109,8 @@ def main():
|
||||
|
||||
# go to "Welcome" page and choose another example
|
||||
switchViewTo(ViewConstants.WELCOME)
|
||||
basePath = "itemviews/addressbook/addressbook.pro"
|
||||
qt4Exmpl = os.path.join(sdkPath, "Examples", "4.7", basePath)
|
||||
qt5Exmpls = []
|
||||
for p in Qt5Path.getPaths(Qt5Path.EXAMPLES):
|
||||
qt5Exmpls.append(os.path.join(p, "widgets", basePath))
|
||||
proFiles = [qt4Exmpl]
|
||||
proFiles.extend(qt5Exmpls)
|
||||
proFiles = map(lambda p: os.path.join(p, "widgets", "itemviews", "addressbook", "addressbook.pro"),
|
||||
Qt5Path.getPaths(Qt5Path.EXAMPLES))
|
||||
cleanUpUserFiles(proFiles)
|
||||
for p in proFiles:
|
||||
removePackagingDirectory(os.path.dirname(p))
|
||||
|
Reference in New Issue
Block a user