Merge remote-tracking branch 'origin/4.7'

Change-Id: Ifb51ca9893549c478e99c9fc3ea6c32d5d5a28a2
This commit is contained in:
Eike Ziller
2018-09-07 14:39:42 +02:00
82 changed files with 186 additions and 150 deletions

3
.gitignore vendored
View File

@@ -97,6 +97,9 @@ phony.c
*.jsc
*.qmlc
# Squish generated files
/tests/system/suite_*/config.xml
# Directories to ignore
# ---------------------

View File

@@ -12,6 +12,10 @@ Editing
* Fixed that generic highlighting could use unreadable colors
(QTCREATORBUG-20919)
All Projects
* Fixed jumping text cursor when editing custom executable path
Qbs Projects
* Fixed C++ version passed to code model (QTCREATORBUG-20909)

View File

@@ -108,7 +108,7 @@ ProgressBarColorNormal=b4ffffff
ProgressBarTitleColor=ffffffff
ProgressBarBackgroundColor=18ffffff
SplitterColor=splitterColor
TextColorDisabled=ff000000
TextColorDisabled=55000000
TextColorError=ffff0000
TextColorHighlight=ffa0a0a4
TextColorHighlightBackground=ffef0b

View File

@@ -108,9 +108,12 @@ void TimelineAbstractRenderer::setModel(TimelineModel *model)
this, &TimelineAbstractRenderer::setRowHeightsDirty);
disconnect(d->model, &TimelineModel::contentChanged,
this, &TimelineAbstractRenderer::setModelDirty);
disconnect(d->model, &QObject::destroyed, this, nullptr);
d->renderPasses.clear();
}
d->model = model;
if (d->model) {
connect(d->model, &TimelineModel::expandedChanged, this, &QQuickItem::update);
connect(d->model, &TimelineModel::hiddenChanged, this, &QQuickItem::update);
@@ -118,6 +121,13 @@ void TimelineAbstractRenderer::setModel(TimelineModel *model)
this, &TimelineAbstractRenderer::setRowHeightsDirty);
connect(d->model, &TimelineModel::contentChanged,
this, &TimelineAbstractRenderer::setModelDirty);
connect(d->model, &QObject::destroyed, this, [this, d]() {
// Weak pointers are supposed to be notified before the destroyed() signal is sent.
Q_ASSERT(d->model.isNull());
d->renderPasses.clear();
setModelDirty();
emit modelChanged(d->model);
});
d->renderPasses = d->model->supportedRenderPasses();
}
@@ -137,14 +147,23 @@ void TimelineAbstractRenderer::setNotes(TimelineNotesModel *notes)
if (d->notes == notes)
return;
if (d->notes)
if (d->notes) {
disconnect(d->notes, &TimelineNotesModel::changed,
this, &TimelineAbstractRenderer::setNotesDirty);
disconnect(d->notes, &QObject::destroyed, this, nullptr);
}
d->notes = notes;
if (d->notes)
if (d->notes) {
connect(d->notes, &TimelineNotesModel::changed,
this, &TimelineAbstractRenderer::setNotesDirty);
connect(d->notes, &QObject::destroyed, this, [this, d]() {
// Weak pointers are supposed to be notified before the destroyed() signal is sent.
Q_ASSERT(d->notes.isNull());
setNotesDirty();
emit notesChanged(d->notes);
});
}
setNotesDirty();
emit notesChanged(d->notes);
@@ -160,11 +179,20 @@ void TimelineAbstractRenderer::setZoomer(TimelineZoomControl *zoomer)
{
Q_D(TimelineAbstractRenderer);
if (zoomer != d->zoomer) {
if (d->zoomer != 0)
if (d->zoomer) {
disconnect(d->zoomer, &TimelineZoomControl::windowChanged, this, &QQuickItem::update);
disconnect(d->zoomer, &QObject::destroyed, this, nullptr);
}
d->zoomer = zoomer;
if (d->zoomer != 0)
if (d->zoomer) {
connect(d->zoomer, &TimelineZoomControl::windowChanged, this, &QQuickItem::update);
connect(d->zoomer, &QObject::destroyed, this, [this, d]() {
// Weak pointers are supposed to be notified before the destroyed() signal is sent.
Q_ASSERT(d->zoomer.isNull());
emit zoomerChanged(d->zoomer);
update();
});
}
emit zoomerChanged(zoomer);
update();
}
@@ -191,22 +219,28 @@ bool TimelineAbstractRenderer::rowHeightsDirty() const
void TimelineAbstractRenderer::setModelDirty()
{
Q_D(TimelineAbstractRenderer);
d->modelDirty = true;
update();
if (!d->modelDirty) {
d->modelDirty = true;
update();
}
}
void TimelineAbstractRenderer::setRowHeightsDirty()
{
Q_D(TimelineAbstractRenderer);
d->rowHeightsDirty = true;
update();
if (!d->rowHeightsDirty) {
d->rowHeightsDirty = true;
update();
}
}
void TimelineAbstractRenderer::setNotesDirty()
{
Q_D(TimelineAbstractRenderer);
d->notesDirty = true;
update();
if (!d->notesDirty) {
d->notesDirty = true;
update();
}
}
// Reset the dirty flags, delete the old node (if given), and return 0

View File

@@ -231,24 +231,24 @@ void TestRunner::scheduleNext()
void TestRunner::cancelCurrent(TestRunner::CancelReason reason)
{
m_canceled = true;
if (reason == UserCanceled) {
// when using the stop button we need to report, for progress bar this happens automatically
if (m_fakeFutureInterface && !m_fakeFutureInterface->isCanceled())
m_fakeFutureInterface->reportCanceled();
} else if (reason == KitChanged) {
if (m_fakeFutureInterface)
m_fakeFutureInterface->reportCanceled();
emit testResultReady(TestResultPtr(new FaultyTestResult(Result::MessageWarn,
tr("Current kit has changed. Canceling test run."))));
}
if (m_fakeFutureInterface)
m_fakeFutureInterface->reportCanceled();
auto reportResult = [this](Result::Type type, const QString &detail){
emit testResultReady(TestResultPtr(new FaultyTestResult(type, detail)));
};
if (reason == KitChanged)
reportResult(Result::MessageWarn, tr("Current kit has changed. Canceling test run."));
else if (reason == Timeout)
reportResult(Result::MessageFatal, tr("Test case canceled due to timeout.\nMaybe raise the timeout?"));
// if user or timeout cancels the current run ensure to kill the running process
if (m_currentProcess && m_currentProcess->state() != QProcess::NotRunning) {
m_currentProcess->kill();
m_currentProcess->waitForFinished();
}
if (reason == Timeout) {
emit testResultReady(TestResultPtr(new FaultyTestResult(Result::MessageFatal,
tr("Test case canceled due to timeout.\nMaybe raise the timeout?"))));
}
}
void TestRunner::onProcessFinished()

View File

@@ -25,6 +25,7 @@
#include "spotlightlocatorfilter.h"
#include <coreplugin/editormanager/editormanager.h>
#include <utils/qtcassert.h>
#include <QMutex>
@@ -180,19 +181,20 @@ void SpotlightIterator::ensureNext()
void SpotlightLocatorFilter::prepareSearch(const QString &entry)
{
if (entry.isEmpty()) {
const EditorManager::FilePathInfo fp = EditorManager::splitLineAndColumnNumber(entry);
if (fp.filePath.isEmpty()) {
setFileIterator(new BaseFileFilter::ListIterator(QStringList()));
} else {
// only pass the file name part to spotlight to allow searches like "somepath/*foo"
int lastSlash = entry.lastIndexOf(QLatin1Char('/'));
QString quoted = entry.mid(lastSlash + 1);
int lastSlash = fp.filePath.lastIndexOf(QLatin1Char('/'));
QString quoted = fp.filePath.mid(lastSlash + 1);
quoted.replace(QLatin1Char('\\'), QLatin1String("\\\\"))
.replace(QLatin1Char('\''), QLatin1String("\\\'"))
.replace(QLatin1Char('\"'), QLatin1String("\\\""));
setFileIterator(new SpotlightIterator(
QString::fromLatin1("kMDItemFSName like%1 \"*%2*\"")
.arg(caseSensitivity(entry) == Qt::CaseInsensitive ? QLatin1String("[c]")
: QString())
.arg(caseSensitivity(fp.filePath) == Qt::CaseInsensitive ? QLatin1String("[c]")
: QString())
.arg(quoted)));
}
BaseFileFilter::prepareSearch(entry);

View File

@@ -436,6 +436,11 @@ void StartApplicationDialog::run(bool attachRemote)
debugger->setServerStartScript(newParameters.serverStartScript); // Note: This requires inferior.
bool isLocal = !dev || (dev->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE);
if (isLocal) {
Environment inferiorEnvironment = Environment::systemEnvironment();
k->addToEnvironment(inferiorEnvironment);
debugger->setInferiorEnvironment(inferiorEnvironment);
}
if (!attachRemote)
debugger->setStartMode(isLocal ? StartExternal : StartRemoteProcess);

View File

@@ -58,7 +58,7 @@ void QmlProfilerToolTest::testAttachToWaitingApplication()
QUrl serverUrl = Utils::urlFromLocalHostAndFreePort();
QVERIFY(serverUrl.port() >= 0);
QVERIFY(serverUrl.port() <= std::numeric_limits<quint16>::max());
server.listen(QHostAddress(serverUrl.host()), static_cast<quint16>(serverUrl.port()));
server.listen(QHostAddress::Any, static_cast<quint16>(serverUrl.port()));
QScopedPointer<QTcpSocket> connection;
connect(&server, &QTcpServer::newConnection, this, [&]() {

View File

@@ -93,7 +93,14 @@ bool WinRtPackageDeploymentStep::init(QList<const BuildStep *> &earlierSteps)
}
ProcessParameters *params = processParameters();
params->setCommand(QLatin1String("windeployqt.exe"));
const QString windeployqtPath
= Utils::FileUtils::resolvePath(qt->binPath().toString(), "windeployqt.exe");
if (!QFile::exists(windeployqtPath)) {
raiseError(tr("Cannot find windeployqt.exe in \"%1\".").arg(
QDir::toNativeSeparators(qt->binPath().toString())));
return false;
}
params->setCommand(windeployqtPath);
params->setArguments(args);
params->setEnvironment(buildConfiguration()->environment());

View File

@@ -65,7 +65,8 @@ void tst_TimelineModelAggregator::height()
void tst_TimelineModelAggregator::addRemoveModel()
{
Timeline::TimelineNotesModel notes;
Timeline::TimelineModelAggregator aggregator(&notes);
Timeline::TimelineModelAggregator aggregator;
aggregator.setNotes(&notes);
QSignalSpy spy(&aggregator, SIGNAL(modelsChanged()));
QCOMPARE(aggregator.notes(), &notes);

View File

@@ -23,10 +23,11 @@
#
############################################################################
def startCreatorTryingClang():
def startCreatorVerifyingClang(useClang):
try:
# start Qt Creator with enabled ClangCodeModel plugin (without modifying settings)
startApplication("qtcreator -load ClangCodeModel" + SettingsPath)
# start Qt Creator with / without enabled ClangCodeModel plugin (without modifying settings)
loadOrNoLoad = '-load' if useClang else '-noload'
startQC([loadOrNoLoad, 'ClangCodeModel'])
except RuntimeError:
t, v = sys.exc_info()[:2]
strv = str(v)
@@ -35,26 +36,17 @@ def startCreatorTryingClang():
else:
test.fatal("Exception caught", "%s(%s)" % (str(t), strv))
return False
if platform.system() not in ('Microsoft', 'Windows'): # only Win uses dialogs for this
return startedWithoutPluginError()
errorMsg = "{type='QMessageBox' unnamed='1' visible='1' windowTitle='Qt Creator'}"
errorOK = "{text='OK' type='QPushButton' unnamed='1' visible='1' window=%s}" % errorMsg
if not waitFor("object.exists(errorOK)", 5000):
return True
return startedWithoutPluginError()
clickButton(errorOK) # Error message
clickButton(errorOK) # Help message
test.fatal("ClangCodeModel plugin not available.")
return False
def startCreator(useClang):
try:
if useClang:
if not startCreatorTryingClang():
return False
else:
startApplication("qtcreator -noload ClangCodeModel" + SettingsPath)
finally:
overrideStartApplication()
return startedWithoutPluginError()
def __openCodeModelOptions__():
invokeMenuItem("Tools", "Options...")
waitForObjectItem(":Options_QListView", "C++")

View File

@@ -37,11 +37,10 @@ from datetime import datetime,timedelta;
import __builtin__
srcPath = ''
SettingsPath = ''
SettingsPath = []
tmpSettingsDir = ''
testSettings.logScreenshotOnFail = True
testSettings.logScreenshotOnError = True
__origStartApplication__ = None
source("../../shared/classes.py")
source("../../shared/utils.py")
@@ -55,34 +54,28 @@ source("../../shared/clang.py")
source("../../shared/welcome.py")
source("../../shared/workarounds.py") # include this at last
# ATTENTION: if a test case calls startApplication("qtcreator...") for several times this
# function must be called BEFORE any call except the first (which is done always automatically)
def overrideStartApplication():
global startApplication, __origStartApplication__
if (platform.system() == "Linux"):
return
if (__origStartApplication__ == None):
__origStartApplication__ = startApplication
def startApplication(*args):
args = list(args)
if str(args[0]).startswith('qtcreator'):
if platform.system() == 'Darwin':
args[0] = args[0].replace('qtcreator', '"Qt Creator"', 1)
test.log("Using workaround for MacOS (different AUT name)")
else:
args[0] = args[0] + ' -platform windows:dialogs=none'
test.log("Using workaround for Windows (failing to hook into native FileDialog)")
return __origStartApplication__(*args)
# additionalParameters must be a list or tuple of strings or None
def startQC(additionalParameters=None, withPreparedSettingsPath=True):
global SettingsPath
appWithOptions = ['"Qt Creator"' if platform.system() == 'Darwin' else "qtcreator"]
if withPreparedSettingsPath:
appWithOptions.extend(SettingsPath)
if additionalParameters is not None:
appWithOptions.extend(additionalParameters)
if platform.system() in ('Microsoft', 'Windows'): # for hooking into native file dialog
appWithOptions.extend(('-platform', 'windows:dialogs=none'))
test.log("Starting now: %s" % ' '.join(appWithOptions))
startApplication(' '.join(appWithOptions))
def startedWithoutPluginError():
try:
loaderErrorWidgetName = ("{name='ExtensionSystem__Internal__PluginErrorOverview' "
"type='ExtensionSystem::PluginErrorOverview' visible='1' "
"windowTitle='Qt Creator - Plugin loader messages'}")
loaderError = waitForObject(loaderErrorWidgetName, 1000)
"windowTitle='Plugin Loader Messages'}")
waitForObject(loaderErrorWidgetName, 1000)
test.fatal("Could not perform clean start of Qt Creator - Plugin error occurred.",
waitForObject("{name='pluginError' type='QTextEdit' visible='1' window=%s}"
% loaderErrorWidgetName, 1000).plainText)
str(waitForObject("{name='pluginError' type='QTextEdit' visible='1' window=%s}"
% loaderErrorWidgetName, 1000).plainText))
clickButton("{text~='(Next.*|Continue)' type='QPushButton' visible='1'}")
invokeMenuItem("File", "Exit")
return False
@@ -304,7 +297,7 @@ def copySettingsToTmpDir(destination=None, omitFiles=[]):
elif platform.system() in ('Windows', 'Microsoft'):
substituteCdb(tmpSettingsDir)
substituteUnchosenTargetABIs(tmpSettingsDir)
SettingsPath = ' -settingspath "%s"' % tmpSettingsDir
SettingsPath = ['-settingspath', '"%s"' % tmpSettingsDir]
# current dir is directory holding qtcreator.py
origSettingsDir = os.path.abspath(os.path.join(os.getcwd(), "..", "..", "settings"))
@@ -320,8 +313,6 @@ else:
srcPath = os.getenv("SYSTEST_SRCPATH", os.path.expanduser(os.path.join("~", "squish-data")))
overrideStartApplication()
# the following only doesn't work if the test ends in an exception
if os.getenv("SYSTEST_NOSETTINGSPATH") != "1":
copySettingsToTmpDir()

View File

@@ -29,8 +29,7 @@ source("../../shared/qtcreator.py")
def main():
# Start Creator with built-in code model, to avoid having
# warnings from the clang code model in "issues" view
startCreator(False)
if not startedWithoutPluginError():
if not startCreatorVerifyingClang(False):
return
createProject_Qt_GUI(tempDir(), "SampleApp")
# run project for debug and release and verify results

View File

@@ -27,7 +27,7 @@ source("../../shared/qtcreator.py")
# test New Qt Quick Application build and run for release and debug option
def main():
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
createNewQtQuickApplication(tempDir(), "SampleApp")

View File

@@ -72,7 +72,7 @@ def addReturn(editor, toFunction, returnValue):
type(editor, "return %s;" % returnValue)
def main():
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return

View File

@@ -36,7 +36,7 @@ def main():
# copy example project to temp directory
templateDir = prepareTemplate(sourceExample, "/../shared")
examplePath = os.path.join(templateDir, proFile)
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
# open example project, supports only Qt 5

View File

@@ -37,7 +37,7 @@ def main():
# copy example project to temp directory
templateDir = prepareTemplate(sourceExample, "/../shared")
examplePath = os.path.join(templateDir, proFile)
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
# open example project

View File

@@ -45,7 +45,7 @@ def triggerCompletion(editorWidget):
def main():
for useClang in [False, True]:
with TestSection(getCodeModelString(useClang)):
if not startCreator(useClang):
if not startCreatorVerifyingClang(useClang):
continue
# create qt quick application
# Step 1: Open test .pro project.

View File

@@ -29,7 +29,7 @@ source("../../shared/qtcreator.py")
def main():
for useClang in [False, True]:
with TestSection(getCodeModelString(useClang)):
if not startCreator(useClang):
if not startCreatorVerifyingClang(useClang):
continue
# create qt quick application
# Step 1: Open test .pro project.

View File

@@ -81,7 +81,7 @@ def main():
and JIRA.isBugStillOpen(18607)):
test.warning("Skipping unstable tests on Windows", "See QTCREATORBUG-18607")
continue
if not startCreator(useClang):
if not startCreatorVerifyingClang(useClang):
continue
projectName = createNewNonQtProject(tempDir(), "project_csup03",
[Targets.DESKTOP_4_8_7_DEFAULT])

View File

@@ -39,7 +39,7 @@ def main():
examplePath = os.path.join(templateDir, proFile)
for useClang in [False, True]:
with TestSection(getCodeModelString(useClang)):
if not startCreator(useClang):
if not startCreatorVerifyingClang(useClang):
continue
# open example project
openQmakeProject(examplePath)

View File

@@ -38,7 +38,7 @@ def main():
examplePath = os.path.join(templateDir, proFile)
for useClang in [False, True]:
with TestSection(getCodeModelString(useClang)):
if not startCreator(useClang):
if not startCreatorVerifyingClang(useClang):
continue
# open example project
openQmakeProject(examplePath)

View File

@@ -52,6 +52,7 @@ def performAutoCompletionTest(editor, lineToStartRegEx, linePrefix, testFunc, *f
while currentLine.startswith(linePrefix):
type(editor, eol)
type(editor, "<Ctrl+/>") # uncomment current line
snooze(1)
type(editor, autoComp) # invoke auto-completion
testFunc(currentLine, *funcArgs)
type(editor, "<Ctrl+/>") # comment current line again
@@ -163,7 +164,7 @@ def main():
examplePath = os.path.join(templateDir, "cplusplus-tools.pro")
for useClang in [False, True]:
with TestSection(getCodeModelString(useClang)):
if not startCreator(useClang):
if not startCreatorVerifyingClang(useClang):
continue
openQmakeProject(examplePath, [Targets.DESKTOP_5_6_1_DEFAULT])
checkCodeModelSettings(useClang)

View File

@@ -106,7 +106,7 @@ def main():
if not expectedVersion:
test.fatal("Can't find version from file.")
return
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
setKeyboardShortcutForAboutQtC()

View File

@@ -76,7 +76,7 @@ def verifyUrl(expected):
def main():
noMatch = "Your search did not match any documents."
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
addHelpDocumentation([os.path.join(qt4Path, "doc", "qch", "qt.qch")])

View File

@@ -45,7 +45,7 @@ def verifyInteractiveQMLHelp(lineText, helpText):
% (helpText, getHelpTitle()))
def main():
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
qchs = []

View File

@@ -46,7 +46,7 @@ def textForQtVersion(text):
return text
def main():
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
# goto help mode and click on topic

View File

@@ -26,7 +26,7 @@
source("../../shared/qtcreator.py")
def startQtCreatorWithNewAppAtQMLEditor(projectDir, projectName, line = None):
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return None
# create qt quick application

View File

@@ -76,7 +76,7 @@ def main():
templateDir = prepareTemplate(sourceExample)
examplePath = os.path.join(templateDir, proFile)
templateDir = os.path.join(templateDir, "basics") # only check subproject
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
# open example project

View File

@@ -27,7 +27,7 @@ source("../../shared/qtcreator.py")
# entry of test
def main():
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
# create qt quick application

View File

@@ -28,7 +28,7 @@ source("../../shared/suites_qtta.py")
# entry of test
def main():
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
# create qt quick application

View File

@@ -35,7 +35,7 @@ def main():
"'SyntaxError': undeclared identifier", # MSVC2015
"use of undeclared identifier 'SyntaxError'",
"unknown type name 'SyntaxError'"]
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
# create qt quick application

View File

@@ -35,7 +35,7 @@ def verifyChangeProject(projectName):
def main():
projectName1 = "SampleApp1"
projectName2 = "SampleApp2"
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
# create qt quick application 1

View File

@@ -75,7 +75,7 @@ def checkTableViewForContent(tableViewStr, expectedRegExTitle, section, atLeastO
def main():
global getStarted
# open Qt Creator
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return

View File

@@ -70,7 +70,7 @@ def main():
if not neededFilePresent(sourceExample):
return
# open Qt Creator
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return

View File

@@ -59,7 +59,7 @@ def openExample(examplesLineEdit, input, exampleRegex, exampleName):
def main():
# open Qt Creator
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
qchs = []

View File

@@ -27,7 +27,7 @@ source("../../shared/qtcreator.py")
def main():
# open Qt Creator
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
wsButtonFrame, wsButtonLabel = getWelcomeScreenSideBarButton('Get Started Now')

View File

@@ -28,7 +28,7 @@ source("../../shared/qtcreator.py")
project = "SquishProject"
def main():
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
createProject_Qt_Console(tempDir(), project)

View File

@@ -31,7 +31,7 @@ def main():
outputQDebug = "Output from qDebug()."
outputStdOut = "Output from std::cout."
outputStdErr = "Output from std::cerr."
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
createProject_Qt_Console(tempDir(), project)

View File

@@ -43,7 +43,7 @@ def addFileToProject(projectPath, category, fileTemplate, fileName):
__createProjectHandleLastPage__()
def main():
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
targets = Targets.desktopTargetClasses()

View File

@@ -119,7 +119,7 @@ def main():
return
qmlProjFile = os.path.join(qmlProjDir, projName)
# start Creator by passing a .qmlproject file
startApplication('qtcreator' + SettingsPath + ' "%s"' % qmlProjFile)
startQC(['"%s"' % qmlProjFile])
if not startedWithoutPluginError():
return

View File

@@ -40,7 +40,7 @@ def main():
return
qmlProjFile = os.path.join(qmlProjDir, projName)
# start Creator by passing a .qmlproject file
startApplication('qtcreator' + SettingsPath + ' "%s"' % qmlProjFile)
startQC(['"%s"' % qmlProjFile])
if not startedWithoutPluginError():
return
waitFor('object.exists(":Qt Creator_Utils::NavigationTreeView")', 10000)

View File

@@ -26,7 +26,7 @@
source("../../shared/qtcreator.py")
def main():
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
# using a temporary directory won't mess up a potentially existing

View File

@@ -26,7 +26,7 @@
source("../../shared/qtcreator.py")
def main():
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
# using a temporary directory won't mess up a potentially existing

View File

@@ -38,7 +38,7 @@ def main():
proFile = os.path.join(tempDir, proFileName)
cleanUpUserFiles(proFile)
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
openQmakeProject(proFile)

View File

@@ -29,7 +29,7 @@ def main():
files = checkAndCopyFiles(testData.dataset("files.tsv"), "filename", tempDir())
if not files:
return
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
for currentFile in files:

View File

@@ -41,7 +41,7 @@ def main():
files = checkAndCopyFiles(testData.dataset("files.tsv"), "filename", tempDir())
if not files:
return
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return

View File

@@ -171,7 +171,7 @@ def displayHintForHighlighterDefinition(fileName, patterns, lPatterns, added, ad
def main():
miss = "A highlight definition was not found for this file. Would you like to try to find one?"
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
uncheckGenericHighlighterFallback()

View File

@@ -28,7 +28,7 @@ source("../../shared/qtcreator.py")
def main():
for useClang in [False, True]:
with TestSection(getCodeModelString(useClang)):
if not startCreator(useClang):
if not startCreatorVerifyingClang(useClang):
continue
createProject_Qt_Console(tempDir(), "SquishProject")
checkCodeModelSettings(useClang)

View File

@@ -36,7 +36,7 @@ def main():
return
if not changeFilePermissions(testFolder, True, False, "testfiles.pro"):
test.fatal("Could not set permissions for files to read-only - test will likely fail.")
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
openQmakeProject(os.path.join(testFolder, "testfiles.pro"))

View File

@@ -33,7 +33,7 @@ def main():
proFile = "keyinteraction.pro"
if not neededFilePresent(os.path.join(sourceExample, proFile)):
return
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
# add docs to have the correct tool tips

View File

@@ -26,7 +26,7 @@
source("../../shared/qtcreator.py")
def main():
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
# using a temporary directory won't mess up a potentially existing

View File

@@ -35,7 +35,7 @@ def main():
test.fatal("Could not prepare test files - leaving test")
return
proFile = os.path.join(folder, "testfiles.pro")
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
openQmakeProject(proFile)

View File

@@ -44,7 +44,7 @@ def main():
test.fatal("Could not prepare test files - leaving test")
return
proFile = os.path.join(folder, "testfiles.pro")
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
openQmakeProject(proFile)

View File

@@ -35,7 +35,7 @@ def main():
if not neededFilePresent(currentFile):
return
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
for currentFile in files:

View File

@@ -38,7 +38,7 @@ def buildConfigFromFancyToolButton(fancyToolButton):
def main():
if not neededFilePresent(SpeedCrunchPath):
return
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
openQmakeProject(SpeedCrunchPath, [Targets.DESKTOP_4_8_7_DEFAULT])

View File

@@ -52,7 +52,7 @@ def main():
if not neededFilePresent(SpeedCrunchPath):
return
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
result = openCmakeProject(SpeedCrunchPath, BuildPath)

View File

@@ -33,7 +33,7 @@ def main():
else:
test.warning("Could not find cmake in PATH - several tests won't run without.")
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
kits = getConfiguredKits()

View File

@@ -26,7 +26,7 @@
source("../../shared/qtcreator.py")
def main():
startApplication("qtcreator" + SettingsPath + " -customwizard-verbose")
startQC(["-customwizard-verbose"])
if not startedWithoutPluginError():
return

View File

@@ -31,8 +31,7 @@ warningOrError = re.compile('<p><b>((Error|Warning).*?)</p>')
def main():
emptySettings = tempDir()
__createMinimumIni__(emptySettings)
SettingsPath = ' -settingspath "%s"' % emptySettings
startApplication("qtcreator" + SettingsPath)
startQC(['-settingspath', '"%s"' % emptySettings], False)
if not startedWithoutPluginError():
return
invokeMenuItem("Tools", "Options...")

View File

@@ -27,8 +27,7 @@ source("../../shared/qtcreator.py")
def main():
for lang in testData.dataset("languages.tsv"):
overrideStartApplication()
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
invokeMenuItem("Tools", "Options...")
@@ -47,8 +46,7 @@ def main():
invokeMenuItem("File", "Exit")
waitForCleanShutdown()
snooze(4) # wait for complete unloading of Creator
overrideStartApplication()
startApplication("qtcreator" + SettingsPath)
startQC()
try:
# Use Locator for menu items which wouldn't work on macOS
exitCommand = testData.field(lang, "Exit")

View File

@@ -31,7 +31,7 @@ def main():
sourceFileName = newClassName.lower() + ".cpp"
basePath = tempDir()
notOverwrittenComment = "// If you can read this, the file was not overwritten."
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
addCPlusPlusFile(newClassName, "C++ Class", None, newBasePath=basePath,

View File

@@ -30,7 +30,7 @@ def main():
if not neededFilePresent(pathCreator):
return
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
openQbsProject(pathCreator)

View File

@@ -31,7 +31,7 @@ def main():
if not neededFilePresent(pathCreator) or not neededFilePresent(pathSpeedcrunch):
return
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return

View File

@@ -52,7 +52,7 @@ def __removeKit__(kit, kitName):
clickButton(waitForObject(":Remove_QPushButton"))
def main():
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
createProject_Qt_Console(tempDir(), "SquishProject")

View File

@@ -36,7 +36,7 @@ def main():
# copy example project to temp directory
templateDir = prepareTemplate(sourceExample)
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
usedProFile = os.path.join(templateDir, proFile)

View File

@@ -38,7 +38,7 @@ def ensureSaveBeforeBuildChecked(shouldBeChecked):
clickButton(waitForObject(":Options.OK_QPushButton"))
def main():
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
ensureSaveBeforeBuildChecked(False)

View File

@@ -30,7 +30,7 @@ def main():
if not projects:
return
sessionName = "SampleSession"
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
createAndSwitchToSession(sessionName)

View File

@@ -92,7 +92,7 @@ def getBuildIssuesTypeCounts(model):
def main():
tasksFile, issueTypes = generateMockTasksFile()
expectedNo = sum(issueTypes)
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
ensureChecked(":Qt Creator_Issues_Core::Internal::OutputPaneToggleButton")

View File

@@ -36,7 +36,7 @@ def main():
if not neededFilePresent(os.path.join(sourceExample, proFile)):
return
templateDir = prepareTemplate(sourceExample)
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
openQmakeProject(os.path.join(templateDir, proFile), [Targets.DESKTOP_5_6_1_DEFAULT])

View File

@@ -26,7 +26,7 @@
source("../../shared/qtcreator.py")
def main():
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return

View File

@@ -26,7 +26,7 @@
source("../../shared/qtcreator.py")
def main():
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
available = ["5.6"]

View File

@@ -26,7 +26,7 @@
source("../../shared/qtcreator.py")
def main():
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
for target in [Targets.DESKTOP_5_6_1_DEFAULT, Targets.DESKTOP_5_10_1_DEFAULT]:

View File

@@ -172,7 +172,7 @@ def fetchSnippet(protocol, description, pasteId, skippedPasting):
return pasteId
def main():
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
protocolsToTest = [NAME_KDE, NAME_PBCA, NAME_PBCOM]

View File

@@ -26,7 +26,7 @@
source("../../shared/qtcreator.py")
def main():
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
createProject_Qt_GUI(tempDir(), "DesignerTestApp")

View File

@@ -186,7 +186,7 @@ def verifyPreview(menuItems, comboItems):
sendEvent("QCloseEvent", waitForObject(prev))
def main():
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
createProject_Qt_GUI(tempDir(), "DesignerTestApp", False)

View File

@@ -26,7 +26,7 @@
source("../../shared/qtcreator.py")
def main():
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
createProject_Qt_GUI(tempDir(), "DesignerTestApp")

View File

@@ -82,7 +82,7 @@ def verifyFiles(targetDir):
"Verify the existence of %s" % file)
def main():
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
for button in ["Cancel immediately",

View File

@@ -30,7 +30,7 @@ def main():
if not neededFilePresent(pathReadme):
return
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return

View File

@@ -161,7 +161,7 @@ def addEmptyFileOutsideProject(filename):
__createProjectHandleLastPage__([filename], "Git", "<None>")
def main():
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
createProject_Qt_GUI(srcPath, projectName, addToVersionControl = "Git")

View File

@@ -26,7 +26,7 @@
source("../../shared/qtcreator.py")
def main():
startApplication("qtcreator" + SettingsPath)
startQC()
if not startedWithoutPluginError():
return
invokeMenuItem("File", "Open File or Project...")