Merge remote-tracking branch 'origin/4.9'

Conflicts:
	src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp

Change-Id: I473084232ab99c18e2316154656de0035af02628
This commit is contained in:
Eike Ziller
2019-05-17 09:42:58 +02:00
28 changed files with 213 additions and 132 deletions

View File

@@ -339,24 +339,17 @@
Besides \c docs, you have the following options:
\list
\li html_docs - build \QC Manual in help format, but do not generate a
help file
\li html_docs_qtcreator - build \QC Manual in help format, but do not
generate a help file
\li dev_html_docs - build Extending \QC Manual in help format, but do
not generate a help file
\li html_docs_qtcreator-dev - build Extending \QC Manual in help
format, but do not generate a help file
\li qch_docs - build \QC Manual in help format and generate a help file
(.qch)
\li qch_docs_qtcreator - build \QC Manual in help format and generate
a help file (.qch)
\li dev_qch_docs - build Extending \QC Manual in help format and
generate a help file (.qch)
\li docs_online - build \QC Manual and Extending \QC Manual in online
format
\li html_docs_online - build \QC Manual in online format
\li dev_html_docs_online - build Extending \QC Manual in online format
\li qch_docs_qtcreator-dev - build Extending \QC Manual in help format
and generate a help file (.qch)
\endlist
*/

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2018 The Qt Company Ltd.
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -26,13 +26,8 @@
/*!
\contentspage index.html
\page qtquick-iso-icon-browser.html
\if defined(qtdesignstudio)
\previouspage qmldesigner-pathview-editor.html
\nextpage creator-quick-ui-forms.html
\else
\previouspage quick-states.html
\nextpage quick-export-to-qml.html
\endif
\title Browsing ISO 7000 Icons

View File

@@ -92,24 +92,24 @@
You can use the following QML types to create components:
\list
\li \l [QML]{AnimatedImage}{Animated Image} provides a way to play
\li \l [QtQuick]{AnimatedImage}{Animated Image} provides a way to play
animations stored as images containing a series of frames, such
as those stored in GIF files.
\li \l [QML]{BorderImage}{Border Image} uses an image as a border or
\li \l [QtQuick]{BorderImage}{Border Image} uses an image as a border or
background.
\li \l [QML]{Image} adds a bitmap to the scene. You can stretch and
\li \l [QtQuick]{Image} adds a bitmap to the scene. You can stretch and
tile images.
\li \l [QML]{Item} is the most basic of all visual types in QML. Even
\li \l [QtQuick]{Item} is the most basic of all visual types in QML. Even
though it has no visual appearance, it defines all the properties
that are common across visual types, such as the x and y position,
width and height, anchoring, and key handling.
\li \l [QML]{Rectangle} adds a rectangle that is painted with a solid
\li \l [QtQuick] {Rectangle} adds a rectangle that is painted with a solid
fill color and an optional border. You can use the radius property
to create rounded rectangles.
\li \l [QML]{Text} adds formatted read-only text.
\li \l [QML]{TextEdit}{Text Edit} adds a single line of editable
\li \l [QtQuick]{Text} adds formatted read-only text.
\li \l [QtQuick]{TextEdit}{Text Edit} adds a single line of editable
formatted text that can be validated.
\li \l [QML]{TextInput}{Text Input} adds a single line of editable
\li \l [QtQuick]{TextInput}{Text Input} adds a single line of editable
plain text that can be validated.
\endlist
@@ -267,12 +267,12 @@
You can use the following positioners to arrange items in UIs:
\list
\li \l[QML] {Column} arranges its child items vertically.
\li \l[QML] {Row} arranges its child items horizontally.
\li \l[QML] {Grid}
\li \l[QtQuick] {Column} arranges its child items vertically.
\li \l[QtQuick] {Row} arranges its child items horizontally.
\li \l[QtQuick] {Grid}
arranges its child items so that they are aligned in a grid and
are not overlapping.
\li \l[QML] {Flow}
\li \l[QtQuick] {Flow}
arranges its child items side by side, wrapping as necessary.
\endlist
@@ -365,7 +365,7 @@
\li \l{FocusScope}{Focus Scope}
assists in keyboard focus handling when building reusable QML
components.
\li \l [QML]{MouseArea}{Mouse Area} enables simple mouse handling.
\li \l [QtQuick]{MouseArea}{Mouse Area} enables simple mouse handling.
\endlist
Since Qt 5.7, you can also use the following \l{Qt Quick Controls} types

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2018 The Qt Company Ltd.
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -56,14 +56,14 @@
\li In the \uicontrol {Connections} view, select the
\uicontrol {Bindings} tab.
\li Select the \inlineimage plus.png
(\uicontrol Add) button to add a binding.
\li Select \uicontrol Item to select the target object whose property
you want to change dynamically.
\li Select \uicontrol Property to select the property to bind to a
source property.
\li Select \uicontrol {Source Item} to select the object whose property
you want to use to determine the behavior of the target object.
\li Select \uicontrol {Source Property} to select the property to bind
the target property to.
(\uicontrol Add) button to add a binding for the currently selected
item. The ID is displayed in the \uicontrol Item column.
\li Double-click the value in the \uicontrol Property column to select
the property to bind to a source property.
\li Double-click the value in the \uicontrol {Source Item} column to
select the object whose property you want to use to determine the
behavior of the target object.
\li Double-click the value in the \uicontrol {Source Property} column
to select the property to bind the target property to.
\endlist
*/

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2018 The Qt Company Ltd.
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -46,13 +46,16 @@
\list 1
\li In the \uicontrol {Connections} view, select the
\uicontrol {Properties} tab.
\li Select \uicontrol Item to select the object to specify the property
for.
\li Select \uicontrol Property to give a name to the property.
\li Select \uicontrol {Property Type} to specify the type of the
property.
\li Select \uicontrol {Property Value} to specify the value of the
property.
\li Select the \inlineimage plus.png
(\uicontrol Add) button to add a dynamic property for the currently
selected item. The item ID is displayed in the \uicontrol Item
column.
\li Double-click the value in the \uicontrol Property column to give a
name to the property.
\li Double-click the value in the \uicontrol {Property Type} column to
specify the type of the property.
\li Double-click the value in the \uicontrol {Property Value} column
to specify the value of the property.
\endlist
*/

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -61,11 +61,18 @@
\uicontrol {Connections} tab.
\li Select the \inlineimage plus.png
(\uicontrol Add) button to add a connection.
\li Select \uicontrol Target to add the object to connect to a signal.
\li Select \uicontrol {Signal Handler} to select the signal that the
connection will listen to from a list of all signals available for
the object.
\li Select \uicontrol Actions to specify the action to perform when
the signal is emitted. You use JavaScript to specify the actions.
\li Double-click the value in the \uicontrol Target column to add the
object to connect to a signal.
\li Double-click the value in the \uicontrol {Signal Handler} column to
select the signal that the connection will listen to from a list of
all signals available for the object.
\li Double-click the value in the \uicontrol Actions column to specify
the action to perform when the signal is emitted. You use JavaScript
to specify the actions.
\endlist
\if defined(qtdesignstudio)
For an example of connecting the \c clicked signal of a button to a
\l{Adding States}{state}, see \l {Log In UI - Part 3}.
\endif
*/

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2018 The Qt Company Ltd.
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -70,4 +70,7 @@
\li \l{Managing C++ Backend Objects}
\endif
\endlist
For an example of using properties, bindings, and connections to create a
scalable push button, see \l{Creating Scalable Buttons and Borders}.
*/

View File

@@ -28,10 +28,12 @@
\page qmldesigner-pathview-editor.html
\if defined(qtdesignstudio)
\previouspage studio-fonts.html
\nextpage creator-quick-ui-forms.html
\else
\previouspage quick-states.html
\endif
\nextpage qtquick-iso-icon-browser.html
\endif
\title Editing PathView Properties
@@ -64,4 +66,8 @@
initiates mouse dragging and what is the rate at which a flick will
decelerate.
\if defined(qtdesignstudio)
\note You can also use the \l SvgPath Qt Quick Studio Component to
specify an SVG path data string that draws a path.
\endif
*/

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2018 The Qt Company Ltd.
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -161,4 +161,8 @@
You can use the \uicontrol {Text Editor} to specify transitions. For more
information, see \l{Transition}.
Alternatively, you can use the \uicontrol Timeline view to animate the
properties of UI components and to bind the animations to states. For more
information, see \l {Binding Animations to States}.
*/

View File

@@ -312,11 +312,11 @@
You can use the Studio components to animate the following shapes:
\list
\li Arc
\li Border
\li Pie
\li Rectangle
\li Triangle
\li \l Arc
\li \l Border
\li \l Pie
\li \l Rectangle
\li \l Triangle
\endlist
\endif
*/

View File

@@ -33,10 +33,11 @@
\contentspage index.html
\page creator-quick-ui-forms.html
\previouspage qtquick-iso-icon-browser.html
\if defined(qtdesignstudio)
\previouspage qmldesigner-pathview-editor.html
\nextpage studio-live-preview.html
\else
\previouspage qtquick-iso-icon-browser.html
\nextpage quick-export-to-qml.html
\endif

View File

@@ -108,14 +108,17 @@
"QtQuick.Controls 2.3",
"QtQuick.Controls 2.4",
"QtQuick.Controls 2.5",
"QtQuick.Controls 2.12",
"QtQuick.Controls.Material 2.0",
"QtQuick.Controls.Material 2.1",
"QtQuick.Controls.Material 2.2",
"QtQuick.Controls.Material 2.3",
"QtQuick.Controls.Material 2.12",
"QtQuick.Controls.Universal 2.0",
"QtQuick.Controls.Universal 2.1",
"QtQuick.Controls.Universal 2.2",
"QtQuick.Controls.Universal 2.3",
"QtQuick.Controls.Universal 2.12",
"QtQuick.Controls.Styles 1.0",
"QtQuick.Controls.Styles 1.1",
"QtQuick.Controls.Styles 1.2",
@@ -140,6 +143,7 @@
"QtQuick.Templates 2.1",
"QtQuick.Templates 2.2",
"QtQuick.Templates 2.5",
"QtQuick.Templates 2.12",
"QtQuick.Window 2.0",
"QtQuick.Window 2.1",
"QtQuick.Window 2.2",

View File

@@ -295,12 +295,12 @@ Column {
anchors.leftMargin: 12
anchors.rightMargin: 6
anchors.topMargin: 24
anchors.topMargin: 28
anchors.bottomMargin: 6
Label {
text: "X1"
width: 16
width: 18
tooltip: qsTr("Defines the start point for color interpolation.")
}
@@ -310,7 +310,7 @@ Column {
Label {
text: "X2"
width: 16
width: 18
tooltip: qsTr("Defines the end point for color interpolation.")
}
@@ -320,7 +320,7 @@ Column {
Label {
text: "y1"
width: 16
width: 18
tooltip: qsTr("Defines the start point for color interpolation.")
}
@@ -330,7 +330,7 @@ Column {
Label {
text: "Y2"
width: 16
width: 18
tooltip: qsTr("Defines the end point for color interpolation.")
}
@@ -361,7 +361,6 @@ Column {
GradientDialogPopup {
id: gradientDialogPopupRadial
dialogHeight: 140
dialogWidth: 340
content: GridLayout {
rowSpacing: 4
anchors.fill: parent
@@ -373,12 +372,12 @@ Column {
anchors.leftMargin: 12
anchors.rightMargin: 6
anchors.topMargin: 24
anchors.topMargin: 28
anchors.bottomMargin: 6
Label {
text: "CenterX"
width: 54
width: 64
tooltip: qsTr("Defines the center point.")
}
@@ -388,7 +387,7 @@ Column {
Label {
text: "CenterY"
width: 54
width: 64
tooltip: qsTr("Defines the center point.")
}
@@ -398,7 +397,7 @@ Column {
Label {
text: "FocalX"
width: 54
width: 64
tooltip: qsTr("Defines the focal point.")
}
@@ -408,7 +407,7 @@ Column {
Label {
text: "FocalY"
width: 54
width: 64
tooltip: qsTr("Defines the focal point.")
}
@@ -418,7 +417,7 @@ Column {
Label {
text: "Center Radius"
width: 54
width: 64
tooltip: qsTr("Defines the center point.")
}
@@ -428,7 +427,7 @@ Column {
Label {
text: "Focal Radius"
width: 54
width: 64
tooltip: qsTr("Defines the focal radius. Set to 0 for simple radial gradients.")
}
@@ -471,12 +470,12 @@ Column {
anchors.leftMargin: 12
anchors.rightMargin: 6
anchors.topMargin: 24
anchors.topMargin: 28
anchors.bottomMargin: 6
Label {
text: "CenterX"
width: 32
width: 64
tooltip: qsTr("Defines the center point.")
}
@@ -486,7 +485,7 @@ Column {
Label {
text: "CenterY"
width: 32
width: 64
tooltip: qsTr("Defines the center point.")
}
@@ -496,7 +495,7 @@ Column {
Label {
text: "Angle"
width: 32
width: 64
tooltip: qsTr("Defines the start angle for the conical gradient. The value is in degrees (0-360).")
}

View File

@@ -44,7 +44,7 @@ Loader {
property Component content
property int dialogHeight: 240
property int dialogWidth: 280
property int dialogWidth: 440
sourceComponent: Component {
FocusScope {

View File

@@ -31,6 +31,8 @@ import QtQuick.Controls.Styles 1.1
DoubleSpinBox {
id: spinBox
width: 82
Layout.minimumWidth: 82
property string propertyName

View File

@@ -45,7 +45,8 @@
{
"source": "file.pro",
"target": "%{ProFileName}",
"openAsProject": true
"openAsProject": true,
"openInEditor": true
},
{
"source": "../../git.ignore",

View File

@@ -234,8 +234,12 @@ static inline QStringList getPluginPaths()
Core::Constants::IDE_DISPLAY_NAME :
Core::Constants::IDE_ID);
pluginPath += QLatin1String("/plugins/");
pluginPath += QLatin1String(Core::Constants::IDE_VERSION_LONG);
rc.push_back(pluginPath);
// Qt Creator X.Y.Z can load plugins from X.Y.(Z-1) etc, so add current and previous
// patch versions
const QString minorVersion = QString::number(IDE_VERSION_MAJOR) + '.'
+ QString::number(IDE_VERSION_MINOR) + '.';
for (int patchVersion = IDE_VERSION_RELEASE; patchVersion >= 0; --patchVersion)
rc.push_back(pluginPath + minorVersion + QString::number(patchVersion));
return rc;
}

View File

@@ -53,8 +53,8 @@ Utils::optional<Diagnostic::Code> Diagnostic::code() const
if (codeValue.isUndefined())
return Utils::nullopt;
QJsonValue::Type type = it.value().type();
QTC_ASSERT(type == QJsonValue::String || type == QJsonValue::Double,
return Utils::make_optional(Code(QString())));
if (type != QJsonValue::String && type != QJsonValue::Double)
return Utils::make_optional(Code(QString()));
return Utils::make_optional(codeValue.isDouble() ? Code(codeValue.toInt())
: Code(codeValue.toString()));
}
@@ -81,8 +81,7 @@ Utils::optional<WorkspaceEdit::Changes> WorkspaceEdit::changes() const
auto it = find(changesKey);
if (it == end())
return Utils::nullopt;
QTC_ASSERT(it.value().type() == QJsonValue::Object, return Changes());
QJsonObject changesObject(it.value().toObject());
const QJsonObject &changesObject = it.value().toObject();
Changes changesResult;
for (const QString &key : changesObject.keys())
changesResult[DocumentUri::fromProtocol(key)] = LanguageClientArray<TextEdit>(changesObject.value(key)).toList();
@@ -122,12 +121,14 @@ MarkupOrString::MarkupOrString(const MarkupContent &val)
MarkupOrString::MarkupOrString(const QJsonValue &val)
{
QTC_ASSERT(val.isString() | val.isObject(), return);
if (val.isString())
if (val.isString()) {
emplace<QString>(val.toString());
else
} else {
MarkupContent markupContent(val.toObject());
if (markupContent.isValid(nullptr))
emplace<MarkupContent>(MarkupContent(val.toObject()));
}
}
bool MarkupOrString::isValid(QStringList *error) const
{
@@ -401,9 +402,7 @@ Utils::Link Location::toLink() const
DocumentUri::DocumentUri(const QString &other)
: QUrl(QUrl::fromPercentEncoding(other.toLocal8Bit()))
{
QTC_ASSERT(isValid(), qWarning() << other);
}
{ }
DocumentUri::DocumentUri(const Utils::FileName &other)
: QUrl(QUrl::fromLocalFile(other.toString()))

View File

@@ -28,42 +28,50 @@
#include <utils/mimetypes/mimedatabase.h>
#include <QHash>
#include <QLoggingCategory>
#include <QVector>
namespace LanguageServerProtocol {
Q_LOGGING_CATEGORY(conversionLog, "qtc.languageserverprotocol.conversion", QtWarningMsg)
template<>
QString fromJsonValue<QString>(const QJsonValue &value)
{
QTC_ASSERT(value.isString(), return QString());
if (conversionLog().isDebugEnabled() && !value.isString())
qCDebug(conversionLog) << "Expected String in json value but got: " << value;
return value.toString();
}
template<>
int fromJsonValue<int>(const QJsonValue &value)
{
QTC_ASSERT(value.isDouble(), return 0);
return int(value.toDouble());
if (conversionLog().isDebugEnabled() && !value.isDouble())
qCDebug(conversionLog) << "Expected double in json value but got: " << value;
return value.toInt();
}
template<>
double fromJsonValue<double>(const QJsonValue &value)
{
QTC_ASSERT(value.isDouble(), return 0);
if (conversionLog().isDebugEnabled() && !value.isDouble())
qCDebug(conversionLog) << "Expected double in json value but got: " << value;
return value.toDouble();
}
template<>
bool fromJsonValue<bool>(const QJsonValue &value)
{
QTC_ASSERT(value.isBool(), return false);
if (conversionLog().isDebugEnabled() && !value.isBool())
qCDebug(conversionLog) << "Expected bool in json value but got: " << value;
return value.toBool();
}
template<>
QJsonArray fromJsonValue<QJsonArray>(const QJsonValue &value)
{
QTC_ASSERT(value.isArray(), return QJsonArray());
if (conversionLog().isDebugEnabled() && !value.isArray())
qCDebug(conversionLog) << "Expected Array in json value but got: " << value;
return value.toArray();
}

View File

@@ -35,13 +35,17 @@
#include <QJsonArray>
#include <QJsonObject>
#include <QLoggingCategory>
namespace LanguageServerProtocol {
LANGUAGESERVERPROTOCOL_EXPORT Q_DECLARE_LOGGING_CATEGORY(conversionLog)
template <typename T>
T fromJsonValue(const QJsonValue &value)
{
QTC_ASSERT(value.isObject(), return T());
if (conversionLog().isDebugEnabled() && !value.isObject())
qCDebug(conversionLog) << "Expected Object in json value but got: " << value;
return T(value.toObject());
}

View File

@@ -2306,7 +2306,9 @@ void EditorManagerPrivate::findInDirectory()
{
if (!d->m_contextMenuEntry || d->m_contextMenuEntry->fileName().isEmpty())
return;
emit m_instance->findOnFileSystemRequest(d->m_contextMenuEntry->fileName().parentDir().toString());
const FileName path = d->m_contextMenuEntry->fileName();
emit m_instance->findOnFileSystemRequest(
(path.toFileInfo().isDir() ? path : path.parentDir()).toString());
}
void EditorManagerPrivate::togglePinned()

View File

@@ -869,6 +869,16 @@ static void getExpandedCompilerFlags(QStringList &cFlags, QStringList &cxxFlags,
cFlags << "-std=c99";
else if (!cLanguageVersion.isEmpty())
cFlags << ("-std=" + cLanguageVersion.first());
if (targetOS.contains("darwin")) {
const auto darwinVersion = getCppProp("minimumDarwinVersion").toString();
if (!darwinVersion.isEmpty()) {
const auto darwinVersionFlag = getCppProp("minimumDarwinVersionCompilerFlag")
.toString();
if (!darwinVersionFlag.isEmpty())
cxxFlags << (darwinVersionFlag + '=' + darwinVersion);
}
}
} else if (toolchain.contains("msvc")) {
if (enableExceptions.toBool()) {
const QString exceptionModel = getCppProp("exceptionHandlingModel").toString();

View File

@@ -26,9 +26,11 @@
#include "qbsrunconfiguration.h"
#include "qbsnodes.h"
#include "qbspmlogging.h"
#include "qbsprojectmanagerconstants.h"
#include "qbsproject.h"
#include <projectexplorer/buildmanager.h>
#include <projectexplorer/deploymentdata.h>
#include <projectexplorer/localenvironmentaspect.h>
#include <projectexplorer/project.h>
@@ -64,8 +66,13 @@ QbsRunConfiguration::QbsRunConfiguration(Target *target, Core::Id id)
return;
}
BuildTargetInfo bti = buildTargetInfo();
if (bti.runEnvModifier)
if (bti.runEnvModifier) {
if (project()->isParsing() || BuildManager::isBuilding(this->target())) {
qCDebug(qbsPmLog) << "qbs project in flux, cannot modify environment";
return; // Intentionally skips the cache update below.
}
bti.runEnvModifier(env, usingLibraryPaths);
}
m_envCache.insert(key, env);
});

View File

@@ -234,6 +234,16 @@ QSet<FileName> QmakePriFile::files(const FileType &type) const
return m_files.value(type);
}
const QSet<FileName> QmakePriFile::collectFiles(const FileType &type) const
{
QSet<FileName> allFiles = files(type);
for (const QmakePriFile * const priFile : qAsConst(m_children)) {
if (!dynamic_cast<const QmakeProFile *>(priFile))
allFiles.unite(priFile->collectFiles(type));
}
return allFiles;
}
QmakePriFile::~QmakePriFile()
{
watchFolders( {} );
@@ -1957,13 +1967,12 @@ QList<ExtraCompiler *> QmakeProFile::extraCompilers() const
void QmakeProFile::setupExtraCompiler(const FileName &buildDir,
const FileType &fileType, ExtraCompilerFactory *factory)
{
foreach (const FileName &fn, files(fileType)) {
for (const FileName &fn : collectFiles(fileType)) {
const FileNameList generated = generatedFiles(buildDir, fn, fileType);
if (!generated.isEmpty()) {
if (!generated.isEmpty())
m_extraCompilers.append(factory->create(m_project, fn, generated));
}
}
}
void QmakeProFile::updateGeneratedFiles(const FileName &buildDir)
{

View File

@@ -133,8 +133,12 @@ public:
void makeEmpty();
// Files of the specified type declared in this file.
QSet<Utils::FileName> files(const ProjectExplorer::FileType &type) const;
// Files of the specified type declared in this file and in included .pri files.
const QSet<Utils::FileName> collectFiles(const ProjectExplorer::FileType &type) const;
void update(const Internal::QmakePriFileEvalResult &result);
bool canAddSubProject(const QString &proFilePath) const;

View File

@@ -85,7 +85,6 @@ void Exception::setShouldAssert(bool assert)
bool Exception::shouldAssert()
{
return true;
return s_shouldAssert;
}

View File

@@ -463,20 +463,19 @@ def __createProjectHandleClassInformation__(className, baseClass=None):
def waitForProcessRunning(running=True):
outputButton = waitForObject(":Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton")
if not waitFor("outputButton.checked", 10000):
if not waitFor("outputButton.checked", 5000):
ensureChecked(outputButton)
waitFor("object.exists(':Qt Creator.ReRun_QToolButton')", 20000)
reRunButton = findObject(":Qt Creator.ReRun_QToolButton")
waitFor("object.exists(':Qt Creator.Stop_QToolButton')", 20000)
stopButton = findObject(":Qt Creator.Stop_QToolButton")
return waitFor("(reRunButton.enabled != running) and (stopButton.enabled == running)", 10000)
return waitFor("(reRunButton.enabled != running) and (stopButton.enabled == running)", 5000)
# run and close an application
# returns None if the build failed, False if the subprocess did not start, and True otherwise
def runAndCloseApp(isQtQuickUI=False):
def runAndCloseApp():
runButton = waitForObject(":*Qt Creator.Run_Core::Internal::FancyToolButton")
clickButton(runButton)
if not isQtQuickUI:
waitForCompile(300000)
buildSucceeded = checkLastBuild()
ensureChecked(waitForObject(":Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton"))
@@ -486,7 +485,7 @@ def runAndCloseApp(isQtQuickUI=False):
if not waitForProcessRunning():
test.fatal("Couldn't start application - leaving test")
return False
__closeSubprocessByPushingStop__(isQtQuickUI)
__closeSubprocessByPushingStop__(False)
return True
def __closeSubprocessByPushingStop__(isQtQuickUI):

View File

@@ -25,21 +25,39 @@
source("../../shared/qtcreator.py")
def _exactlyOne_(iterable):
trueElements = 0
for element in iterable:
if element:
trueElements += 1
return trueElements == 1
def main():
startQC()
if not startedWithoutPluginError():
return
available = ["5.6"]
available = ["5.6", "5.10"]
for qtVersion in available:
# using a temporary directory won't mess up a potentially existing
workingDir = tempDir()
createNewQtQuickUI(workingDir, qtVersion)
if runAndCloseApp(True) == None:
checkCompile()
else:
checkedKits, projectName = createNewQtQuickUI(workingDir, qtVersion)
checkedKitNames = Targets.getTargetsAsStrings(checkedKits)
test.verify(_exactlyOne_(map(lambda name: qtVersion in name, checkedKitNames)),
"The requested kit should have been checked")
if qtVersion == "5.10":
test.verify(not any(map(lambda name: "5.6" in name, checkedKitNames)),
"The 5.6 kit should not have been checked when 5.10 is required")
clickButton(waitForObject(":*Qt Creator.Run_Core::Internal::FancyToolButton"))
if not waitForProcessRunning():
test.fatal("Couldn't start application - leaving test")
continue
if test.verify(not waitForProcessRunning(False), "The application should keep running"):
__closeSubprocessByPushingStop__(True)
appOutput = logApplicationOutput()
test.verify(not ("untitled.qml" in appOutput or "MainForm.ui.qml" in appOutput),
test.verify(_exactlyOne_(map(lambda ver: ver in appOutput, available)),
"Does Creator use qmlscene from a checked kit?")
test.verify(projectName + ".qml:" not in appOutput,
"Does the Application Output indicate QML errors?")
invokeMenuItem("File", "Close All Projects and Editors")
invokeMenuItem("File", "Exit")