forked from qt-creator/qt-creator
Squish: Handle build systems more appropriately
Change-Id: I43e89d76c4199a741a5606dd0d6de2165b8133c6 Reviewed-by: Robert Löhning <robert.loehning@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -224,6 +224,11 @@ def __modifyAvailableTargets__(available, requiredQt, asStrings=False):
|
|||||||
if Qt5Path.toVersionTuple(found.group(1)) < Qt5Path.toVersionTuple(requiredQt):
|
if Qt5Path.toVersionTuple(found.group(1)) < Qt5Path.toVersionTuple(requiredQt):
|
||||||
available.discard(currentItem)
|
available.discard(currentItem)
|
||||||
|
|
||||||
|
def __getProjectFileName__(projectName, buildSystem):
|
||||||
|
if buildSystem is None or buildSystem == "CMake":
|
||||||
|
return "CMakeLists.txt"
|
||||||
|
else:
|
||||||
|
return projectName + (".pro" if buildSystem == "qmake" else ".qbs")
|
||||||
|
|
||||||
# Creates a Qt GUI project
|
# Creates a Qt GUI project
|
||||||
# param path specifies where to create the project
|
# param path specifies where to create the project
|
||||||
@@ -243,7 +248,7 @@ def createProject_Qt_GUI(path, projectName, checks=True, addToVersionControl="<N
|
|||||||
h_file = exp_filename + ".h"
|
h_file = exp_filename + ".h"
|
||||||
cpp_file = exp_filename + ".cpp"
|
cpp_file = exp_filename + ".cpp"
|
||||||
ui_file = exp_filename + ".ui"
|
ui_file = exp_filename + ".ui"
|
||||||
pro_file = projectName + ".pro"
|
projectFile = __getProjectFileName__(projectName, buildSystem)
|
||||||
|
|
||||||
waitFor("object.exists(':headerFileLineEdit_Utils::FileNameValidatingLineEdit')", 20000)
|
waitFor("object.exists(':headerFileLineEdit_Utils::FileNameValidatingLineEdit')", 20000)
|
||||||
waitFor("object.exists(':sourceFileLineEdit_Utils::FileNameValidatingLineEdit')", 20000)
|
waitFor("object.exists(':sourceFileLineEdit_Utils::FileNameValidatingLineEdit')", 20000)
|
||||||
@@ -263,7 +268,7 @@ def createProject_Qt_GUI(path, projectName, checks=True, addToVersionControl="<N
|
|||||||
path = os.path.abspath(path)
|
path = os.path.abspath(path)
|
||||||
path = os.path.join(path, projectName)
|
path = os.path.join(path, projectName)
|
||||||
expectedFiles = [path]
|
expectedFiles = [path]
|
||||||
expectedFiles.extend(__sortFilenamesOSDependent__(["main.cpp", cpp_file, h_file, ui_file, pro_file]))
|
expectedFiles.extend(__sortFilenamesOSDependent__(["main.cpp", cpp_file, h_file, ui_file, projectFile]))
|
||||||
__createProjectHandleLastPage__(expectedFiles, addToVersionControl)
|
__createProjectHandleLastPage__(expectedFiles, addToVersionControl)
|
||||||
|
|
||||||
waitForProjectParsing()
|
waitForProjectParsing()
|
||||||
@@ -287,9 +292,9 @@ def createProject_Qt_Console(path, projectName, checks = True, buildSystem = Non
|
|||||||
path = os.path.abspath(path)
|
path = os.path.abspath(path)
|
||||||
path = os.path.join(path, projectName)
|
path = os.path.join(path, projectName)
|
||||||
cpp_file = "main.cpp"
|
cpp_file = "main.cpp"
|
||||||
pro_file = projectName + ".pro"
|
projectFile = __getProjectFileName__(projectName, buildSystem)
|
||||||
expectedFiles = [path]
|
expectedFiles = [path]
|
||||||
expectedFiles.extend(__sortFilenamesOSDependent__([cpp_file, pro_file]))
|
expectedFiles.extend(__sortFilenamesOSDependent__([cpp_file, projectFile]))
|
||||||
__createProjectHandleLastPage__(expectedFiles)
|
__createProjectHandleLastPage__(expectedFiles)
|
||||||
|
|
||||||
waitForProjectParsing()
|
waitForProjectParsing()
|
||||||
|
Reference in New Issue
Block a user