Merge remote-tracking branch 'origin/4.0'

Change-Id: I9793f0f9019b16f3725c5a9708a5ccf81557cdc6
This commit is contained in:
Eike Ziller
2016-06-03 09:49:51 +02:00
6 changed files with 83 additions and 38 deletions

12
dist/changes-4.0.1.md vendored
View File

@@ -12,6 +12,7 @@ CMake Projects
* Added notification when `CMakeCache.txt` changes and introduces a * Added notification when `CMakeCache.txt` changes and introduces a
conflict with the build configuration settings, with the option conflict with the build configuration settings, with the option
to adapt the build configuration settings to adapt the build configuration settings
* Made it possible to add arbitrary CMake variables (QTCREATORBUG-16238)
* Fixed that build configurations could not override kit settings, and added * Fixed that build configurations could not override kit settings, and added
a warning to build configurations that override kit settings a warning to build configurations that override kit settings
* Fixed that `yes` was not considered as boolean `true` value * Fixed that `yes` was not considered as boolean `true` value
@@ -28,6 +29,11 @@ Debugging
* Fixed QObject property expansion (QTCREATORBUG-15798) * Fixed QObject property expansion (QTCREATORBUG-15798)
* Fixed updating evaluated expressions * Fixed updating evaluated expressions
* Fixed crash on spontaneous debugger exit (QTCREATORBUG-16233) * Fixed crash on spontaneous debugger exit (QTCREATORBUG-16233)
* GDB
* Fixed issues with restarting debugger (QTCREATORBUG-16355)
* QML
* Restored expression evaluation by using the selection tool
(QTCREATORBUG-16300)
Valgrind Valgrind
@@ -51,3 +57,9 @@ Platform Specific
Windows Windows
* Fixed detection of Microsoft Visual C++ Build Tools * Fixed detection of Microsoft Visual C++ Build Tools
* Fixed that tool tips could stay visible even after switching applications
(QTCREATORBUG-15882)
iOS
* Added missing human readable error messages (QTCREATORBUG-16328)

View File

@@ -951,7 +951,7 @@ bool JsonFieldPage::isComplete() const
showError(message); showError(message);
hasErrorMessage = true; hasErrorMessage = true;
} }
if (f->isMandatory()) if (f->isMandatory() && !f->widget()->isHidden())
result = false; result = false;
} }
} }

View File

@@ -23,6 +23,7 @@
# #
############################################################################ ############################################################################
import __builtin__
import operator import operator
# for easier re-usage (because Python hasn't an enum type) # for easier re-usage (because Python hasn't an enum type)
@@ -177,26 +178,65 @@ class Qt5Path:
@staticmethod @staticmethod
def getPaths(pathSpec): def getPaths(pathSpec):
qt5targets = [Targets.DESKTOP_521_DEFAULT, Targets.DESKTOP_531_DEFAULT]
if platform.system() != 'Darwin':
qt5targets.append(Targets.DESKTOP_541_GCC)
if pathSpec == Qt5Path.DOCS: if pathSpec == Qt5Path.DOCS:
path52 = "/doc" return map(lambda target: Qt5Path.docsPath(target), qt5targets)
path53 = "/Docs/Qt-5.3"
path54 = "/Docs/Qt-5.4"
elif pathSpec == Qt5Path.EXAMPLES: elif pathSpec == Qt5Path.EXAMPLES:
path52 = "/examples" return map(lambda target: Qt5Path.examplesPath(target), qt5targets)
path53 = "/Examples/Qt-5.3"
path54 = "/Examples/Qt-5.4"
else: else:
test.fatal("Unknown pathSpec given: %s" % str(pathSpec)) test.fatal("Unknown pathSpec given: %s" % str(pathSpec))
return [] return []
@staticmethod
def __preCheckAndExtractQtVersionStr__(target):
if target not in Targets.ALL_TARGETS:
raise Exception("Unexpected target '%s'" % str(target))
matcher = re.match("^Desktop (5\\d{2}).*$", Targets.getStringForTarget(target))
if matcher is None:
raise Exception("Currently this is supported for Desktop Qt5 only, got target '%s'"
% str(Targets.getStringForTarget(target)))
return matcher.group(1)
@staticmethod
def __createPlatformQtPath__(qt5Minor):
# special handling for Qt5.2
if qt5Minor == 2:
if platform.system() in ('Microsoft', 'Windows'):
return "C:/Qt/Qt5.2.1/5.2.1/msvc2010"
elif platform.system() == 'Linux':
if __is64BitOS__():
return os.path.expanduser("~/Qt5.2.1/5.2.1/gcc_64")
else:
return os.path.expanduser("~/Qt5.2.1/5.2.1/gcc")
else:
return os.path.expanduser("~/Qt5.2.1/5.2.1/clang_64")
# Qt5.3+
if platform.system() in ('Microsoft', 'Windows'): if platform.system() in ('Microsoft', 'Windows'):
return ["C:/Qt/Qt5.2.1/5.2.1/msvc2010" + path52, return "C:/Qt/Qt5.%d.1" % qt5Minor
"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: else:
return map(os.path.expanduser, ["~/Qt5.2.1/5.2.1/clang_64" + path52, return os.path.expanduser("~/Qt5.%d.1" % qt5Minor)
"~/Qt5.3.1" + path53])
@staticmethod
def examplesPath(target):
qtVersionStr = Qt5Path.__preCheckAndExtractQtVersionStr__(target)
qtMinorVersion = __builtin__.int(qtVersionStr[1])
if qtMinorVersion == 2:
path = "examples"
else:
path = "Examples/Qt-5.%d" % qtMinorVersion
return os.path.join(Qt5Path.__createPlatformQtPath__(qtMinorVersion), path)
@staticmethod
def docsPath(target):
qtVersionStr = Qt5Path.__preCheckAndExtractQtVersionStr__(target)
qtMinorVersion = __builtin__.int(qtVersionStr[1])
if qtMinorVersion == 2:
path = "doc"
else:
path = "Docs/Qt-5.%d" % qtMinorVersion
return os.path.join(Qt5Path.__createPlatformQtPath__(qtMinorVersion), path)

View File

@@ -316,7 +316,8 @@ def __configureFW__(workingDir, projectName, isReleaseBuild, addToFW=True):
# Needs admin privileges on Windows 7 # Needs admin privileges on Windows 7
# Using the deprecated "netsh firewall" because the newer # Using the deprecated "netsh firewall" because the newer
# "netsh advfirewall" would need admin privileges on Windows Vista, too. # "netsh advfirewall" would need admin privileges on Windows Vista, too.
return subprocess.call('netsh firewall %s allowedprogram "%s.exe" %s %s' % (mode, path, projectName, enable)) return subprocess.call(["netsh", "firewall", mode, "allowedprogram",
"%s.exe" % path, projectName, enable])
# helper to check whether win firewall is running or not # helper to check whether win firewall is running or not
# this doesn't check for other firewalls! # this doesn't check for other firewalls!
@@ -333,11 +334,6 @@ def __isWinFirewallRunning__():
return __isWinFirewallRunning__.fireWallState return __isWinFirewallRunning__.fireWallState
return None return None
def __fixQuotes__(string):
if platform.system() in ('Windows', 'Microsoft'):
string = '"' + string + '"'
return string
# this function adds the given executable as an attachable AUT # this function adds the given executable as an attachable AUT
# Bad: executable/port could be empty strings - you should be aware of this # Bad: executable/port could be empty strings - you should be aware of this
def addExecutableAsAttachableAUT(executable, port, host=None): def addExecutableAsAttachableAUT(executable, port, host=None):
@@ -348,8 +344,8 @@ def addExecutableAsAttachableAUT(executable, port, host=None):
squishSrv = __getSquishServer__() squishSrv = __getSquishServer__()
if (squishSrv == None): if (squishSrv == None):
return False return False
result = subprocess.call(__fixQuotes__('"%s" --config addAttachableAUT "%s" %s:%s') result = subprocess.call([squishSrv, "--config", "addAttachableAUT",
% (squishSrv, executable, host, port), shell=True) executable, "%s:%s" % (host, port)])
if result == 0: if result == 0:
test.passes("Added %s as attachable AUT" % executable) test.passes("Added %s as attachable AUT" % executable)
else: else:
@@ -366,8 +362,8 @@ def removeExecutableAsAttachableAUT(executable, port, host=None):
squishSrv = __getSquishServer__() squishSrv = __getSquishServer__()
if (squishSrv == None): if (squishSrv == None):
return False return False
result = subprocess.call(__fixQuotes__('"%s" --config removeAttachableAUT "%s" %s:%s') result = subprocess.call([squishSrv, "--config", "removeAttachableAUT",
% (squishSrv, executable, host, port), shell=True) executable, "%s:%s" % (host, port)])
if result == 0: if result == 0:
test.passes("Removed %s as attachable AUT" % executable) test.passes("Removed %s as attachable AUT" % executable)
else: else:

View File

@@ -99,9 +99,8 @@ def waitForCleanShutdown(timeOut=10):
# following work-around because os.kill() works for win not until python 2.7 # following work-around because os.kill() works for win not until python 2.7
if appCtxt.pid==-1: if appCtxt.pid==-1:
break break
tasks = subprocess.Popen("tasklist /FI \"PID eq %d\"" % appCtxt.pid, shell=True,stdout=subprocess.PIPE) output = getOutputFromCmdline(["tasklist", "/FI", "PID eq %d" % appCtxt.pid],
output = tasks.communicate()[0] acceptedError=1)
tasks.stdout.close()
if (output=="INFO: No tasks are running which match the specified criteria." if (output=="INFO: No tasks are running which match the specified criteria."
or output=="" or output.find("ERROR")==0): or output=="" or output.find("ERROR")==0):
shutdownDone=True shutdownDone=True
@@ -131,14 +130,11 @@ def waitForCleanShutdown(timeOut=10):
def checkForStillRunningQmlExecutable(possibleNames): def checkForStillRunningQmlExecutable(possibleNames):
for qmlHelper in possibleNames: for qmlHelper in possibleNames:
tasks = subprocess.Popen("tasklist /FI \"IMAGENAME eq %s\"" % qmlHelper, shell=True, output = getOutputFromCmdline(["tasklist", "/FI", "IMAGENAME eq %s" % qmlHelper])
stdout=subprocess.PIPE)
output = tasks.communicate()[0]
tasks.stdout.close()
if "INFO: No tasks are running which match the specified criteria." in output: if "INFO: No tasks are running which match the specified criteria." in output:
continue continue
else: else:
if subprocess.call("taskkill /F /FI \"IMAGENAME eq %s\"" % qmlHelper, shell=True) == 0: if subprocess.call(["taskkill", "/F", "/FI", "IMAGENAME eq %s" % qmlHelper]) == 0:
print "Killed still running %s" % qmlHelper print "Killed still running %s" % qmlHelper
else: else:
print "%s is still running - failed to kill it" % qmlHelper print "%s is still running - failed to kill it" % qmlHelper

View File

@@ -26,7 +26,8 @@
source("../../shared/qtcreator.py") source("../../shared/qtcreator.py")
def main(): def main():
sourceExample = os.path.abspath(Qt5Path.getPaths(Qt5Path.EXAMPLES)[0] + "/declarative/keyinteraction/focus") target = Targets.DESKTOP_521_DEFAULT
sourceExample = os.path.join(Qt5Path.examplesPath(target), "declarative/keyinteraction/focus")
proFile = "focus.pro" proFile = "focus.pro"
if not neededFilePresent(os.path.join(sourceExample, proFile)): if not neededFilePresent(os.path.join(sourceExample, proFile)):
return return
@@ -34,9 +35,9 @@ def main():
if not startedWithoutPluginError(): if not startedWithoutPluginError():
return return
# add docs to have the correct tool tips # add docs to have the correct tool tips
addHelpDocumentation([os.path.join(Qt5Path.getPaths(Qt5Path.DOCS)[0], "qtquick.qch")]) addHelpDocumentation([os.path.join(Qt5Path.docsPath(target), "qtquick.qch")])
templateDir = prepareTemplate(sourceExample, "/../../helper") templateDir = prepareTemplate(sourceExample, "/../../helper")
openQmakeProject(os.path.join(templateDir, proFile), Targets.DESKTOP_521_DEFAULT) openQmakeProject(os.path.join(templateDir, proFile), target)
openDocument("focus.QML.qml" + os.sep + "focus.focus\\.qml") openDocument("focus.QML.qml" + os.sep + "focus.focus\\.qml")
testRenameId() testRenameId()
testFindUsages() testFindUsages()