forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/3.2'
Conflicts: qtcreator.pri qtcreator.qbs src/plugins/coreplugin/editormanager/editormanager.cpp src/plugins/cppeditor/cppeditor.cpp src/plugins/remotelinux/remotelinuxdebugsupport.cpp src/plugins/texteditor/basetexteditor.cpp Change-Id: I0da7c1cf2506b12d0563795aa8177fc45e97050f
This commit is contained in:
Vendored
-4
@@ -1,4 +0,0 @@
|
||||
[Paths]
|
||||
Imports = ../../../Imports/qtquick1
|
||||
Qml2Imports = ../../../Imports/qtquick2
|
||||
Plugins = ../../../PlugIns
|
||||
@@ -23,20 +23,14 @@ if [ -d "$5" ]; then
|
||||
cp -R "$5"/ "$imports2Dir"/
|
||||
fi
|
||||
|
||||
qmlpuppetapp="$1/Contents/MacOS/qmlpuppet.app"
|
||||
qmlpuppetapp="$1/Contents/MacOS/qmlpuppet"
|
||||
if [ -d "$qmlpuppetapp" ]; then
|
||||
qmlpuppetArgument="-executable=$qmlpuppetapp/Contents/MacOS/qmlpuppet"
|
||||
qmlpuppetResources="$1/Contents/MacOS/qmlpuppet.app/Contents/Resources"
|
||||
test -d "$qmlpuppetResources" || mkdir -p "$qmlpuppetResources"
|
||||
cp "$(dirname "${BASH_SOURCE[0]}")/../dist/installer/mac/qmlpuppet_qt.conf" "$qmlpuppetResources/qt.conf" || exit 1
|
||||
qmlpuppetArgument="-executable=$qmlpuppetapp"
|
||||
fi
|
||||
|
||||
qml2puppetapp="$1/Contents/MacOS/qml2puppet.app"
|
||||
qml2puppetapp="$1/Contents/MacOS/qml2puppet"
|
||||
if [ -d "$qml2puppetapp" ]; then
|
||||
qml2puppetArgument="-executable=$qml2puppetapp/Contents/MacOS/qml2puppet"
|
||||
qml2puppetResources="$1/Contents/MacOS/qml2puppet.app/Contents/Resources"
|
||||
test -d "$qml2puppetResources" || mkdir -p "$qml2puppetResources"
|
||||
cp "$(dirname "${BASH_SOURCE[0]}")/../dist/installer/mac/qmlpuppet_qt.conf" "$qml2puppetResources/qt.conf" || exit 1
|
||||
qml2puppetArgument="-executable=$qml2puppetapp"
|
||||
fi
|
||||
|
||||
macdeployqt "$1" \
|
||||
@@ -66,6 +60,6 @@ if [ $LLVM_INSTALL_DIR ]; then
|
||||
if [ ! -f "$_CLANG_CODEMODEL_LIB" ]; then
|
||||
_CLANG_CODEMODEL_LIB="$1/Contents/PlugIns/libClangCodeModel.dylib"
|
||||
fi
|
||||
xcrun install_name_tool -rpath "$LLVM_INSTALL_DIR/lib" "@loader_path/.." "$_CLANG_CODEMODEL_LIB" || true
|
||||
xcrun install_name_tool -rpath "$LLVM_INSTALL_DIR/lib" "@loader_path/" "$_CLANG_CODEMODEL_LIB" || true
|
||||
fi
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
#include <private/qquickanimation_p.h>
|
||||
#include <private/qqmltimer_p.h>
|
||||
#include <private/qqmlengine_p.h>
|
||||
#include <private/qqmlexpression_p.h>
|
||||
#include <designersupport.h>
|
||||
|
||||
|
||||
@@ -102,8 +103,6 @@ static bool isSimpleExpression(const QString &expression)
|
||||
namespace QmlDesigner {
|
||||
namespace Internal {
|
||||
|
||||
QHash<EnumerationName, QVariant> ObjectNodeInstance::m_enumationValueHash;
|
||||
|
||||
ObjectNodeInstance::ObjectNodeInstance(QObject *object)
|
||||
: m_object(object),
|
||||
m_metaObject(0),
|
||||
@@ -474,6 +473,37 @@ PropertyNameList ObjectNodeInstance::ignoredProperties() const
|
||||
return PropertyNameList();
|
||||
}
|
||||
|
||||
QVariant ObjectNodeInstance::convertEnumToValue(const QVariant &value, const PropertyName &name)
|
||||
{
|
||||
int idx = object()->metaObject()->indexOfProperty(name);
|
||||
QMetaProperty metaProperty = object()->metaObject()->property(idx);
|
||||
|
||||
QVariant fixedValue = fixResourcePaths(value);
|
||||
|
||||
if (value.canConvert<Enumeration>()) {
|
||||
Enumeration enumeration = value.value<Enumeration>();
|
||||
if (metaProperty.isValid() && metaProperty.isEnumType()) {
|
||||
fixedValue = metaProperty.enumerator().keyToValue(enumeration.name());
|
||||
} else if (metaProperty.isValid()
|
||||
&& (QLatin1String(metaProperty.typeName()) == QLatin1String("int"))) {
|
||||
|
||||
//If the target property is an integer handle an enum as binding
|
||||
QQmlExpression expression(context(), object(), enumeration.toString());
|
||||
fixedValue = expression.evaluate();
|
||||
if (expression.hasError())
|
||||
qDebug() << "Enum can not be evaluated:" << object() << name << enumeration;
|
||||
} else if (!metaProperty.isValid()) { //In this case this is most likely an attached property
|
||||
QQmlExpression expression(context(), object(), enumeration.toString());
|
||||
fixedValue = expression.evaluate();
|
||||
|
||||
if (expression.hasError())
|
||||
qDebug() << "Enum can not be evaluated:" << object() << name << enumeration;
|
||||
}
|
||||
}
|
||||
|
||||
return fixedValue;
|
||||
}
|
||||
|
||||
void ObjectNodeInstance::setPropertyVariant(const PropertyName &name, const QVariant &value)
|
||||
{
|
||||
if (ignoredProperties().contains(name))
|
||||
@@ -485,9 +515,7 @@ void ObjectNodeInstance::setPropertyVariant(const PropertyName &name, const QVar
|
||||
return;
|
||||
|
||||
QVariant fixedValue = fixResourcePaths(value);
|
||||
|
||||
if (value.canConvert<Enumeration>())
|
||||
fixedValue = enumationValue(value.value<Enumeration>());
|
||||
fixedValue = convertEnumToValue(fixedValue, name);
|
||||
|
||||
QVariant oldValue = property.read();
|
||||
if (oldValue.type() == QVariant::Url) {
|
||||
@@ -1342,43 +1370,6 @@ void ObjectNodeInstance::doComponentCompleteRecursive(QObject *object, NodeInsta
|
||||
}
|
||||
}
|
||||
|
||||
static QHash<EnumerationName, QVariant> enumationValuesFromMetaEnum(const QMetaEnum &metaEnum)
|
||||
{
|
||||
QHash<EnumerationName, QVariant> enumationValues;
|
||||
for (int index = 0; index < metaEnum.keyCount(); index++) {
|
||||
EnumerationName enumerationName = EnumerationName(metaEnum.scope()) + "." + metaEnum.key(index);
|
||||
enumationValues.insert(enumerationName, QVariant::fromValue(metaEnum.value(index)));
|
||||
qDebug() << __FUNCTION__ << enumerationName << metaEnum.value(index);
|
||||
}
|
||||
|
||||
return enumationValues;
|
||||
}
|
||||
|
||||
static QHash<EnumerationName, QVariant> collectEnumationValues(const Enumeration &enumeration)
|
||||
{
|
||||
QHash<EnumerationName, QVariant> enumationValues;
|
||||
EnumerationName enumerationScope = enumeration.scope();
|
||||
const QMetaObject *metaObject = QMetaType::metaObjectForType(QMetaType::type(enumerationScope.constData()));
|
||||
if (metaObject) {
|
||||
int enumeratorCount = metaObject->enumeratorOffset() + metaObject->enumeratorCount();
|
||||
for (int index = metaObject->enumeratorOffset(); index < enumeratorCount; index++)
|
||||
enumationValues.unite(enumationValuesFromMetaEnum(metaObject->enumerator(index)));
|
||||
} else {
|
||||
enumationValues.insert(enumeration.toEnumerationName(), QVariant::fromValue(enumeration.nameToString()));
|
||||
}
|
||||
|
||||
return enumationValues;
|
||||
}
|
||||
|
||||
QVariant ObjectNodeInstance::enumationValue(const Enumeration &enumeration)
|
||||
{
|
||||
EnumerationName enumerationName = enumeration.toEnumerationName();
|
||||
if (!m_enumationValueHash.contains(enumerationName))
|
||||
m_enumationValueHash.unite(collectEnumationValues(enumeration));
|
||||
|
||||
return m_enumationValueHash.value(enumerationName);
|
||||
}
|
||||
|
||||
ObjectNodeInstance::Pointer ObjectNodeInstance::parentInstance() const
|
||||
{
|
||||
QObject *parentHolder = parent();
|
||||
|
||||
@@ -200,6 +200,7 @@ protected:
|
||||
void addToNewProperty(QObject *object, QObject *newParent, const PropertyName &newParentProperty);
|
||||
void deleteObjectsInList(const QQmlProperty &metaProperty);
|
||||
QVariant convertSpecialCharacter(const QVariant& value) const;
|
||||
QVariant convertEnumToValue(const QVariant &value, const PropertyName &name);
|
||||
static QObject *parentObject(QObject *object);
|
||||
static void doComponentCompleteRecursive(QObject *object, NodeInstanceServer *nodeInstanceServer);
|
||||
static QVariant enumationValue(const Enumeration &enumeration);
|
||||
|
||||
@@ -44,17 +44,21 @@ Column {
|
||||
|
||||
property alias caption: label.text
|
||||
|
||||
property variant backendendValue
|
||||
property variant backendValue
|
||||
|
||||
property variant value: backendendValue.value
|
||||
property variant value: backendValue.value
|
||||
|
||||
property alias gradientPropertyName: gradientLine.gradientPropertyName
|
||||
|
||||
function isNotInGradientMode() {
|
||||
return (buttonRow.checkedIndex !== 1)
|
||||
}
|
||||
|
||||
onValueChanged: {
|
||||
colorEditor.color = colorEditor.value
|
||||
}
|
||||
|
||||
onBackendendValueChanged: {
|
||||
onBackendValueChanged: {
|
||||
colorEditor.color = colorEditor.value
|
||||
}
|
||||
|
||||
@@ -64,8 +68,8 @@ Column {
|
||||
interval: 100
|
||||
running: false
|
||||
onTriggered: {
|
||||
if (backendendValue !== undefined)
|
||||
backendendValue.value = colorEditor.color
|
||||
if (backendValue !== undefined)
|
||||
backendValue.value = colorEditor.color
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,7 +82,7 @@ Column {
|
||||
gradientLine.currentColor = color
|
||||
}
|
||||
|
||||
if (buttonRow.checkedIndex !== 1) {
|
||||
if (isNotInGradientMode()) {
|
||||
//Delay setting the color to keep ui responsive
|
||||
colorEditorTimer.restart()
|
||||
}
|
||||
@@ -164,12 +168,18 @@ Column {
|
||||
|
||||
showTranslateCheckBox: false
|
||||
|
||||
backendValue: colorEditor.backendendValue
|
||||
backendValue: colorEditor.backendValue
|
||||
|
||||
onAccepted: {
|
||||
colorEditor.color = colorFromString(textField.text)
|
||||
}
|
||||
|
||||
onCommitData: {
|
||||
colorEditor.color = colorFromString(textField.text)
|
||||
if (isNotInGradientMode())
|
||||
backendValue.value = colorEditor.color
|
||||
}
|
||||
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
ColorCheckButton {
|
||||
@@ -185,7 +195,7 @@ Column {
|
||||
ButtonRowButton {
|
||||
iconSource: "images/icon_color_solid.png"
|
||||
onClicked: {
|
||||
colorEditor.backendendValue.resetValue()
|
||||
colorEditor.backendValue.resetValue()
|
||||
gradientLine.deleteGradient()
|
||||
}
|
||||
toolTip: qsTr("Solid Color")
|
||||
@@ -194,7 +204,7 @@ Column {
|
||||
visible: supportGradient
|
||||
iconSource: "images/icon_color_gradient.png"
|
||||
onClicked: {
|
||||
colorEditor.backendendValue.resetValue()
|
||||
colorEditor.backendValue.resetValue()
|
||||
gradientLine.addGradient()
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,8 @@ Controls.TextField {
|
||||
|
||||
property bool showExtendedFunctionButton: true
|
||||
|
||||
signal commitData
|
||||
|
||||
ExtendedFunctionButton {
|
||||
x: 2
|
||||
y: 4
|
||||
@@ -82,7 +84,10 @@ Controls.TextField {
|
||||
onSelectionToBeChanged: {
|
||||
if (__dirty && !writeValueManually) {
|
||||
lineEdit.backendValue.value = text
|
||||
} else if (__dirty) {
|
||||
commitData()
|
||||
}
|
||||
|
||||
__dirty = false
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -3,6 +3,6 @@ Item {
|
||||
|
||||
ColorEditor {
|
||||
caption: "%1"
|
||||
backendColor: backendValues.%2
|
||||
backendValue: backendValues.%2
|
||||
supportGradient: false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ Column {
|
||||
|
||||
ColorEditor {
|
||||
caption: qsTr("Color")
|
||||
backendendValue: backendValues.color
|
||||
backendValue: backendValues.color
|
||||
supportGradient: true
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ Column {
|
||||
|
||||
ColorEditor {
|
||||
caption: qsTr("Border Color")
|
||||
backendendValue: backendValues.border_color
|
||||
backendValue: backendValues.border_color
|
||||
supportGradient: false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ Column {
|
||||
|
||||
ColorEditor {
|
||||
caption: qsTr("Text Color")
|
||||
backendendValue: backendValues.color
|
||||
backendValue: backendValues.color
|
||||
supportGradient: false
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ Column {
|
||||
|
||||
ColorEditor {
|
||||
caption: qsTr("Selection Color")
|
||||
backendendValue: backendValues.selectionColor
|
||||
backendValue: backendValues.selectionColor
|
||||
supportGradient: false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ Column {
|
||||
|
||||
ColorEditor {
|
||||
caption: qsTr("Text Color")
|
||||
backendendValue: backendValues.color
|
||||
backendValue: backendValues.color
|
||||
supportGradient: false
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ Column {
|
||||
|
||||
ColorEditor {
|
||||
caption: qsTr("Selection Color")
|
||||
backendendValue: backendValues.selectionColor
|
||||
backendValue: backendValues.selectionColor
|
||||
supportGradient: false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ Column {
|
||||
|
||||
ColorEditor {
|
||||
caption: qsTr("Text Color")
|
||||
backendendValue: backendValues.color
|
||||
backendValue: backendValues.color
|
||||
supportGradient: false
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ Column {
|
||||
|
||||
ColorEditor {
|
||||
caption: qsTr("Style Color")
|
||||
backendendValue: backendValues.styleColor
|
||||
backendValue: backendValues.styleColor
|
||||
supportGradient: false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<template openeditor="main.qml" priority="E"
|
||||
<template openeditor="main.qml" priority="BZ"
|
||||
featuresRequired="QtSupport.Wizards.FeatureQtQuickProject, QtSupport.Wizards.FeatureQtQuick.1.1">
|
||||
<displayname>Qt Quick 1.1</displayname>
|
||||
<description>Creates a Qt Quick 1 UI project with a single QML file that contains the main view. You can review Qt Quick 1 UI projects in the QML Viewer and you need not build them. You do not need to have the development environment installed on your computer to create and run this type of project. Requires Qt 4.8 or newer.</description>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<template openeditor="main.qml" priority="D"
|
||||
<template openeditor="main.qml" priority="BY"
|
||||
featuresRequired="QtSupport.Wizards.FeatureQtQuickProject, QtSupport.Wizards.FeatureQtQuick.2.1">
|
||||
<displayname>Qt Quick 2.1</displayname>
|
||||
<description>Creates a Qt Quick 2 UI project with a single QML file that contains the main view. You can review Qt Quick 2 UI projects in the QML Scene and you need not build them. You do not need to have the development environment installed on your computer to create and run this type of project. Requires Qt 5.1 or newer.</description>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<template openeditor="main.qml" priority="C"
|
||||
<template openeditor="main.qml" priority="BX"
|
||||
featuresRequired="QtSupport.Wizards.FeatureQtQuickProject, QtSupport.Wizards.FeatureQtQuick.2.2">
|
||||
<displayname>Qt Quick 2.2</displayname>
|
||||
<description>Creates a Qt Quick 2 UI project with a single QML file that contains the main view. You can review Qt Quick 2 UI projects in the QML Scene and you need not build them. You do not need to have the development environment installed on your computer to create and run this type of project. Requires Qt 5.2 or newer.</description>
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import QtQuick 2.3
|
||||
|
||||
Rectangle {
|
||||
width: 360
|
||||
height: 360
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
Qt.quit();
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: "Hello World"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/* File generated by Qt Creator, version 2.7.0 */
|
||||
|
||||
import QmlProject 1.1
|
||||
|
||||
Project {
|
||||
// QTC_REPLACE main.qml WITH main
|
||||
mainFile: "main.qml"
|
||||
|
||||
/* Include .qml, .js, and image files from current directory and subdirectories */
|
||||
QmlFiles {
|
||||
directory: "."
|
||||
}
|
||||
JavaScriptFiles {
|
||||
directory: "."
|
||||
}
|
||||
ImageFiles {
|
||||
directory: "."
|
||||
}
|
||||
/* List of plugin directories passed to QML runtime */
|
||||
// importPaths: [ "../exampleplugin" ]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<template openeditor="main.qml" priority="BW"
|
||||
featuresRequired="QtSupport.Wizards.FeatureQtQuickProject, QtSupport.Wizards.FeatureQtQuick.2.3">
|
||||
<displayname>Qt Quick 2.3</displayname>
|
||||
<description>Creates a Qt Quick 2 UI project with a single QML file that contains the main view. You can review Qt Quick 2 UI projects in the QML Scene and you need not build them. You do not need to have the development environment installed on your computer to create and run this type of project. Requires Qt 5.3 or newer.</description>
|
||||
</template>
|
||||
@@ -10,6 +10,10 @@ ApplicationWindow {
|
||||
menuBar: MenuBar {
|
||||
Menu {
|
||||
title: qsTr("File")
|
||||
MenuItem {
|
||||
text: qsTr("&Open")
|
||||
onTriggered: console.log("Open action triggered");
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr("Exit")
|
||||
onTriggered: Qt.quit();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<template openeditor="main.qml" priority="B"
|
||||
<template openeditor="main.qml" priority="AZ"
|
||||
featuresRequired="QtSupport.Wizards.FeatureQtQuickProject, QtSupport.Wizards.FeatureQtQuick.Controls.1.0">
|
||||
<displayname>Qt Quick Controls 1.0</displayname>
|
||||
<description>Creates a Qt Quick 2 UI project with a single QML file that contains the main view and uses Qt Quick Controls. You can review Qt Quick 2 UI projects in the QML Scene and you need not build them. This project requires that you have installed Qt Quick Controls for your Qt version. Requires Qt 5.1 or newer.</description>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Window 2.0
|
||||
import QtQuick.Window 2.1
|
||||
|
||||
ApplicationWindow {
|
||||
title: qsTr("Hello World")
|
||||
@@ -10,6 +10,10 @@ ApplicationWindow {
|
||||
menuBar: MenuBar {
|
||||
Menu {
|
||||
title: qsTr("File")
|
||||
MenuItem {
|
||||
text: qsTr("&Open")
|
||||
onTriggered: console.log("Open action triggered");
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr("Exit")
|
||||
onTriggered: Qt.quit();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<template openeditor="main.qml" priority="A"
|
||||
<template openeditor="main.qml" priority="AY"
|
||||
featuresRequired="QtSupport.Wizards.FeatureQtQuickProject, QtSupport.Wizards.FeatureQtQuick.Controls.1.1">
|
||||
<displayname>Qt Quick Controls 1.1</displayname>
|
||||
<description>Creates a Qt Quick 2 UI project with a single QML file that contains the main view and uses Qt Quick Controls. You can review Qt Quick 2 UI projects in the QML Scene and you need not build them. This project requires that you have installed Qt Quick Controls for your Qt version. Requires Qt 5.2 or newer.</description>
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
import QtQuick 2.3
|
||||
import QtQuick.Controls 1.2
|
||||
import QtQuick.Window 2.2
|
||||
|
||||
ApplicationWindow {
|
||||
title: qsTr("Hello World")
|
||||
width: 640
|
||||
height: 480
|
||||
|
||||
menuBar: MenuBar {
|
||||
Menu {
|
||||
title: qsTr("File")
|
||||
MenuItem {
|
||||
text: qsTr("&Open")
|
||||
onTriggered: console.log("Open action triggered");
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr("Exit")
|
||||
onTriggered: Qt.quit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
text: qsTr("Hello World")
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
/* File generated by Qt Creator, version 2.7.0 */
|
||||
|
||||
import QmlProject 1.1
|
||||
|
||||
Project {
|
||||
// QTC_REPLACE main.qml WITH main
|
||||
mainFile: "main.qml"
|
||||
|
||||
/* Include .qml, .js, and image files from current directory and subdirectories */
|
||||
QmlFiles {
|
||||
directory: "."
|
||||
}
|
||||
JavaScriptFiles {
|
||||
directory: "."
|
||||
}
|
||||
ImageFiles {
|
||||
directory: "."
|
||||
}
|
||||
/* List of plugin directories passed to QML runtime */
|
||||
// importPaths: [ "../exampleplugin" ]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<template openeditor="main.qml" priority="AX"
|
||||
featuresRequired="QtSupport.Wizards.FeatureQtQuickProject, QtSupport.Wizards.FeatureQtQuick.Controls.1.2">
|
||||
<displayname>Qt Quick Controls 1.2</displayname>
|
||||
<description>Creates a Qt Quick 2 UI project with a single QML file that contains the main view and uses Qt Quick Controls. You can review Qt Quick 2 UI projects in the QML Scene and you need not build them. This project requires that you have installed Qt Quick Controls for your Qt version. Requires Qt 5.3 or newer.</description>
|
||||
</template>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<template openeditor="main.qml" priority="E"
|
||||
<template openeditor="main.qml" priority="BZ"
|
||||
featuresRequired="QtSupport.Wizards.FeatureQtQuick.1.1"
|
||||
qrcdeployment="qrcdeployment.pri"
|
||||
viewerdir="qtquick1applicationviewer"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import QtQuick 2.1
|
||||
import QtQuick.Window 2.1
|
||||
import QtQuick.Window 2.0
|
||||
|
||||
Window {
|
||||
visible: true
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<template openeditor="main.qml" priority="D"
|
||||
<template openeditor="main.qml" priority="BY"
|
||||
featuresRequired="QtSupport.Wizards.FeatureQtQuick.2.1"
|
||||
qrcdeployment="qrcdeployment.pri"
|
||||
stubversionminor="5">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<template openeditor="main.qml" priority="C"
|
||||
<template openeditor="main.qml" priority="BX"
|
||||
featuresRequired="QtSupport.Wizards.FeatureQtQuick.2.2"
|
||||
qrcdeployment="qrcdeployment.pri"
|
||||
stubversionminor="5">
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
TEMPLATE = app
|
||||
|
||||
QT += qml quick
|
||||
|
||||
SOURCES += main.cpp
|
||||
|
||||
RESOURCES += qml.qrc
|
||||
|
||||
# Additional import path used to resolve QML modules in Qt Creator's code model
|
||||
# QML_IMPORT_PATH #
|
||||
QML_IMPORT_PATH =
|
||||
|
||||
# Default rules for deployment.
|
||||
include(../../shared/qrcdeployment.pri)
|
||||
@@ -0,0 +1,12 @@
|
||||
#include <QGuiApplication>
|
||||
#include <QQmlApplicationEngine>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QGuiApplication app(argc, argv);
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import QtQuick 2.3
|
||||
import QtQuick.Window 2.2
|
||||
|
||||
Window {
|
||||
visible: true
|
||||
width: 360
|
||||
height: 360
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
Qt.quit();
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
text: qsTr("Hello World")
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>main.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<template openeditor="main.qml" priority="BW"
|
||||
featuresRequired="QtSupport.Wizards.FeatureQtQuick.2.3"
|
||||
qrcdeployment="qrcdeployment.pri"
|
||||
stubversionminor="5">
|
||||
<displayname>Qt Quick 2.3</displayname>
|
||||
<description>Creates a deployable Qt Quick 2 application using the QtQuick 2.3 import. Requires Qt 5.3 or newer.</description>
|
||||
</template>
|
||||
@@ -10,6 +10,10 @@ ApplicationWindow {
|
||||
menuBar: MenuBar {
|
||||
Menu {
|
||||
title: qsTr("File")
|
||||
MenuItem {
|
||||
text: qsTr("&Open")
|
||||
onTriggered: console.log("Open action triggered");
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr("Exit")
|
||||
onTriggered: Qt.quit();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<template openeditor="main.qml" priority="B"
|
||||
<template openeditor="main.qml" priority="AZ"
|
||||
featuresRequired="QtSupport.Wizards.FeatureQtQuick.Controls.1.0"
|
||||
qrcdeployment="qrcdeployment.pri"
|
||||
stubversionminor="1">
|
||||
|
||||
@@ -10,6 +10,10 @@ ApplicationWindow {
|
||||
menuBar: MenuBar {
|
||||
Menu {
|
||||
title: qsTr("File")
|
||||
MenuItem {
|
||||
text: qsTr("&Open")
|
||||
onTriggered: console.log("Open action triggered");
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr("Exit")
|
||||
onTriggered: Qt.quit();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<template openeditor="main.qml" priority="A"
|
||||
<template openeditor="main.qml" priority="AY"
|
||||
featuresRequired="QtSupport.Wizards.FeatureQtQuick.Controls.1.1"
|
||||
qrcdeployment="qrcdeployment.pri"
|
||||
stubversionminor="1">
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
TEMPLATE = app
|
||||
|
||||
QT += qml quick widgets
|
||||
|
||||
SOURCES += main.cpp
|
||||
|
||||
RESOURCES += qml.qrc
|
||||
|
||||
# Additional import path used to resolve QML modules in Qt Creator's code model
|
||||
QML_IMPORT_PATH =
|
||||
|
||||
# Default rules for deployment.
|
||||
include(../../shared/qrcdeployment.pri)
|
||||
@@ -0,0 +1,12 @@
|
||||
#include <QApplication>
|
||||
#include <QQmlApplicationEngine>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import QtQuick 2.3
|
||||
import QtQuick.Controls 1.2
|
||||
|
||||
ApplicationWindow {
|
||||
visible: true
|
||||
width: 640
|
||||
height: 480
|
||||
title: qsTr("Hello World")
|
||||
|
||||
menuBar: MenuBar {
|
||||
Menu {
|
||||
title: qsTr("File")
|
||||
MenuItem {
|
||||
text: qsTr("&Open")
|
||||
onTriggered: console.log("Open action triggered");
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr("Exit")
|
||||
onTriggered: Qt.quit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
text: qsTr("Hello World")
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>main.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<template openeditor="main.qml" priority="AX"
|
||||
featuresRequired="QtSupport.Wizards.FeatureQtQuick.Controls.1.2"
|
||||
qrcdeployment="qrcdeployment.pri"
|
||||
stubversionminor="1">
|
||||
<displayname>Qt Quick Controls 1.2</displayname>
|
||||
<description>Creates a deployable Qt Quick 2 application using Qt Quick Controls. Requires Qt 5.3 or newer.</description>
|
||||
</template>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -70079,7 +70079,7 @@ Le fichier APL ne sera pas utilisable sur d'autres périphériques.</transl
|
||||
</message>
|
||||
<message>
|
||||
<source>Refresh Device List</source>
|
||||
<translation>Rafréchir la liste des périphériques</translation>
|
||||
<translation>Rafraîchir la liste des périphériques</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create Android Virtual Device</source>
|
||||
|
||||
@@ -297,8 +297,10 @@ Document::Document(const QString &fileName)
|
||||
Document::~Document()
|
||||
{
|
||||
delete _translationUnit;
|
||||
_translationUnit = 0;
|
||||
delete _control->diagnosticClient();
|
||||
delete _control;
|
||||
_control = 0;
|
||||
}
|
||||
|
||||
Control *Document::control() const
|
||||
|
||||
@@ -123,7 +123,7 @@ public:
|
||||
QString fileName = url.toLocalFile();
|
||||
if (!fileName.isEmpty()) {
|
||||
if (QFileInfo(fileName).isRelative()) {
|
||||
fileName.prepend(QDir::separator());
|
||||
fileName.prepend(QLatin1Char('/'));
|
||||
fileName.prepend(_doc->path());
|
||||
}
|
||||
if (!QFileInfo(fileName).exists())
|
||||
|
||||
@@ -448,6 +448,7 @@ void Snapshot::insert(const Document::Ptr &document, bool allowInvalid)
|
||||
|
||||
void Snapshot::insertLibraryInfo(const QString &path, const LibraryInfo &info)
|
||||
{
|
||||
QTC_CHECK(!path.isEmpty());
|
||||
QTC_CHECK(info.fingerprint() == info.calculateFingerprint());
|
||||
_libraries.insert(QDir::cleanPath(path), info);
|
||||
if (!info.wasFound()) return;
|
||||
|
||||
@@ -2242,7 +2242,7 @@ ImportInfo ImportInfo::moduleImport(QString uri, ComponentVersion version,
|
||||
info.m_type = ImportType::Library;
|
||||
info.m_name = uri;
|
||||
info.m_path = uri;
|
||||
info.m_path.replace(QLatin1Char('.'), QDir::separator());
|
||||
info.m_path.replace(QLatin1Char('.'), QLatin1Char('/'));
|
||||
info.m_version = version;
|
||||
info.m_as = as;
|
||||
info.m_ast = ast;
|
||||
@@ -2257,7 +2257,7 @@ ImportInfo ImportInfo::pathImport(const QString &docPath, const QString &path,
|
||||
|
||||
QFileInfo importFileInfo(path);
|
||||
if (!importFileInfo.isAbsolute())
|
||||
importFileInfo = QFileInfo(docPath + QDir::separator() + path);
|
||||
importFileInfo = QFileInfo(docPath + QLatin1Char('/') + path);
|
||||
info.m_path = importFileInfo.absoluteFilePath();
|
||||
|
||||
if (importFileInfo.isFile()) {
|
||||
@@ -2369,8 +2369,10 @@ const Value *TypeScope::lookupMember(const QString &name, const Context *context
|
||||
continue;
|
||||
}
|
||||
|
||||
if (const Value *v = import->lookupMember(name, context, foundInObject))
|
||||
if (const Value *v = import->lookupMember(name, context, foundInObject)) {
|
||||
i.used = true;
|
||||
return v;
|
||||
}
|
||||
}
|
||||
if (foundInObject)
|
||||
*foundInObject = 0;
|
||||
@@ -2548,7 +2550,7 @@ bool Imports::importFailed() const
|
||||
return m_importFailed;
|
||||
}
|
||||
|
||||
QList<Import> Imports::all() const
|
||||
const QList<Import> &Imports::all() const
|
||||
{
|
||||
return m_imports;
|
||||
}
|
||||
|
||||
@@ -1011,7 +1011,7 @@ public:
|
||||
// Other: non-absolute path
|
||||
QString name() const;
|
||||
|
||||
// LibraryImport: uri with QDir::separator separator
|
||||
// LibraryImport: uri with '/' separator
|
||||
// Other: absoluteFilePath
|
||||
QString path() const;
|
||||
|
||||
@@ -1088,7 +1088,7 @@ public:
|
||||
QString nameForImportedObject(const ObjectValue *value, const Context *context) const;
|
||||
bool importFailed() const;
|
||||
|
||||
QList<Import> all() const;
|
||||
const QList<Import> &all() const;
|
||||
|
||||
const TypeScope *typeScope() const;
|
||||
const JSImportScope *jsImportScope() const;
|
||||
|
||||
@@ -438,15 +438,21 @@ Import LinkPrivate::importNonFile(Document::Ptr doc, const ImportInfo &importInf
|
||||
}
|
||||
|
||||
bool LinkPrivate::importLibrary(Document::Ptr doc,
|
||||
const QString &libraryPath,
|
||||
const QString &libraryPath_,
|
||||
Import *import,
|
||||
const QString &importPath)
|
||||
{
|
||||
const ImportInfo &importInfo = import->info;
|
||||
QString libraryPath = libraryPath_;
|
||||
|
||||
const LibraryInfo libraryInfo = snapshot.libraryInfo(libraryPath);
|
||||
if (!libraryInfo.isValid())
|
||||
return false;
|
||||
LibraryInfo libraryInfo = snapshot.libraryInfo(libraryPath);
|
||||
if (!libraryInfo.isValid()) {
|
||||
// try canonical path
|
||||
libraryPath = QFileInfo(libraryPath).canonicalFilePath();
|
||||
libraryInfo = snapshot.libraryInfo(libraryPath);
|
||||
if (!libraryInfo.isValid())
|
||||
return false;
|
||||
}
|
||||
|
||||
import->libraryPath = libraryPath;
|
||||
|
||||
@@ -551,7 +557,7 @@ void LinkPrivate::loadQmldirComponents(ObjectValue *import, ComponentVersion ver
|
||||
|
||||
importedTypes.insert(component.typeName);
|
||||
if (Document::Ptr importedDoc = snapshot.document(
|
||||
libraryPath + QDir::separator() + component.fileName)) {
|
||||
libraryPath + QLatin1Char('/') + component.fileName)) {
|
||||
if (ObjectValue *v = importedDoc->bind()->rootObjectValue())
|
||||
import->setMember(component.typeName, v);
|
||||
}
|
||||
|
||||
@@ -118,9 +118,11 @@ ModelManagerInterface::ModelManagerInterface(QObject *parent)
|
||||
qRegisterMetaType<QmlJS::PathAndLanguage>("QmlJS::PathAndLanguage");
|
||||
qRegisterMetaType<QmlJS::PathsAndLanguages>("QmlJS::PathsAndLanguages");
|
||||
|
||||
m_defaultProjectInfo.qtImportsPath = QLibraryInfo::location(QLibraryInfo::ImportsPath);
|
||||
m_defaultProjectInfo.qtImportsPath = QFileInfo(
|
||||
QLibraryInfo::location(QLibraryInfo::ImportsPath)).canonicalFilePath();
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||
m_defaultProjectInfo.qtQmlPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath);
|
||||
m_defaultProjectInfo.qtQmlPath = QFileInfo(
|
||||
QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath)).canonicalFilePath();
|
||||
#endif
|
||||
|
||||
m_defaultImportPaths << environmentImportPaths();
|
||||
|
||||
@@ -90,8 +90,6 @@ public:
|
||||
bool isNull() const
|
||||
{ return project.isNull(); }
|
||||
|
||||
QStringList completeImportPaths();
|
||||
|
||||
public: // attributes
|
||||
QPointer<ProjectExplorer::Project> project;
|
||||
QStringList sourceFiles;
|
||||
|
||||
@@ -138,7 +138,7 @@ static QString makeAbsolute(const QString &path, const QString &base)
|
||||
{
|
||||
if (QFileInfo(path).isAbsolute())
|
||||
return path;
|
||||
return QString::fromLatin1("%1%2%3").arg(base, QDir::separator(), path);
|
||||
return QString::fromLatin1("%1/%3").arg(base, path);
|
||||
}
|
||||
|
||||
void PluginDumper::onLoadPluginTypes(const QString &libraryPath, const QString &importPath, const QString &importUri, const QString &importVersion)
|
||||
|
||||
@@ -365,6 +365,8 @@ SharedValueOwner::SharedValueOwner(SharedValueOwnerKind kind)
|
||||
addFunction(_datePrototype, QLatin1String("getTime"), numberValue(), 0);
|
||||
addFunction(_datePrototype, QLatin1String("getFullYear"), numberValue(), 0);
|
||||
addFunction(_datePrototype, QLatin1String("getUTCFullYear"), numberValue(), 0);
|
||||
addFunction(_datePrototype, QLatin1String("getDay"), numberValue(), 0);
|
||||
addFunction(_datePrototype, QLatin1String("getUTCDay"), numberValue(), 0);
|
||||
addFunction(_datePrototype, QLatin1String("getMonth"), numberValue(), 0);
|
||||
addFunction(_datePrototype, QLatin1String("getUTCMonth"), numberValue(), 0);
|
||||
addFunction(_datePrototype, QLatin1String("getDate"), numberValue(), 0);
|
||||
|
||||
@@ -50,7 +50,7 @@ qmake and rebuild Qt Creator. Watch out for a message like
|
||||
Project MESSAGE: INCLUDEPATH += /usr/lib/llvm-3.4/include
|
||||
Project MESSAGE: LIBS += -L/usr/lib/llvm-3.4/lib -lclang
|
||||
|
||||
This indicates that the ClangCodeModel plugin will be build.
|
||||
This indicates that the ClangCodeModel plugin will be built.
|
||||
|
||||
Enable the plugin
|
||||
-----------------
|
||||
|
||||
@@ -166,6 +166,7 @@ Parser::Parser(QObject *parent)
|
||||
d(new ParserPrivate())
|
||||
{
|
||||
d->timer = new QTimer(this);
|
||||
d->timer->setObjectName(QLatin1String("ClassViewParser::timer"));
|
||||
d->timer->setSingleShot(true);
|
||||
|
||||
// connect signal/slots
|
||||
|
||||
@@ -472,6 +472,7 @@ void EditorManagerPrivate::init()
|
||||
m_windowPopup->hide();
|
||||
|
||||
m_autoSaveTimer = new QTimer(this);
|
||||
m_autoSaveTimer->setObjectName(QLatin1String("EditorManager::m_autoSaveTimer"));
|
||||
connect(m_autoSaveTimer, SIGNAL(timeout()), SLOT(autoSave()));
|
||||
updateAutoSave();
|
||||
|
||||
|
||||
@@ -484,7 +484,6 @@ void LocatorWidget::updateCompletionList(const QString &text)
|
||||
|
||||
// cancel the old future
|
||||
m_entriesWatcher->future().cancel();
|
||||
m_entriesWatcher->future().waitForFinished();
|
||||
|
||||
QFuture<LocatorFilterEntry> future = QtConcurrent::run(runSearch, filters, searchText);
|
||||
m_entriesWatcher->setFuture(future);
|
||||
|
||||
@@ -554,6 +554,7 @@ void MainWindow::registerDefaultActions()
|
||||
m_exitAction = new QAction(icon, tr("E&xit"), this);
|
||||
cmd = ActionManager::registerAction(m_exitAction, Constants::EXIT, globalContext);
|
||||
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Q")));
|
||||
cmd->action()->setMenuRole(QAction::QuitRole);
|
||||
mfile->addAction(cmd, Constants::G_FILE_OTHER);
|
||||
connect(m_exitAction, SIGNAL(triggered()), this, SLOT(exit()));
|
||||
|
||||
|
||||
@@ -778,7 +778,8 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
|
||||
Utils::StyleHelper::menuGradient(painter, option->rect, option->rect);
|
||||
painter->save();
|
||||
painter->setPen(Utils::StyleHelper::borderColor());
|
||||
painter->drawLine(option->rect.bottomLeft(), option->rect.bottomRight());
|
||||
painter->drawLine(option->rect.bottomLeft() + QPointF(0.5, 0.5),
|
||||
option->rect.bottomRight() + QPointF(0.5, 0.5));
|
||||
painter->restore();
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -253,8 +253,9 @@ void VariableManager::registerVariable(const QByteArray &variable,
|
||||
void VariableManager::registerIntVariable(const QByteArray &variable,
|
||||
const QString &description, const VariableManager::IntFunction &value)
|
||||
{
|
||||
const VariableManager::IntFunction valuecopy = value; // do not capture a reference in a lambda
|
||||
registerVariable(variable, description,
|
||||
[value]() { return QString::number(value ? value() : 0); });
|
||||
[valuecopy]() { return QString::number(valuecopy ? valuecopy() : 0); });
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -191,7 +191,6 @@ void CppEditorWidget::finalizeInitialization()
|
||||
});
|
||||
connect(&d->m_localRenaming, &CppLocalRenaming::processKeyPressNormally,
|
||||
this, &CppEditorWidget::processKeyNormally);
|
||||
|
||||
connect(this, SIGNAL(cursorPositionChanged()),
|
||||
d->m_cppEditorOutline, SLOT(updateIndex()));
|
||||
|
||||
@@ -684,6 +683,10 @@ void CppEditorWidget::updateFunctionDeclDefLink()
|
||||
|
||||
void CppEditorWidget::updateFunctionDeclDefLinkNow()
|
||||
{
|
||||
static bool noTracking = qgetenv("QTC_NO_FUNCTION_DECL_DEF_LINK_TRACKING").trimmed() == "1";
|
||||
if (noTracking)
|
||||
return;
|
||||
|
||||
if (Core::EditorManager::currentEditor()->widget() != this)
|
||||
return;
|
||||
|
||||
|
||||
@@ -82,9 +82,10 @@ private:
|
||||
CPlusPlus::OverviewModel *m_sourceModel;
|
||||
};
|
||||
|
||||
QTimer *newSingleShotTimer(QObject *parent, int msInternal)
|
||||
QTimer *newSingleShotTimer(QObject *parent, int msInternal, const QString &objectName)
|
||||
{
|
||||
QTimer *timer = new QTimer(parent);
|
||||
timer->setObjectName(objectName);
|
||||
timer->setSingleShot(true);
|
||||
timer->setInterval(msInternal);
|
||||
return timer;
|
||||
@@ -131,10 +132,12 @@ CppEditorOutline::CppEditorOutline(CppEditorWidget *editorWidget)
|
||||
connect(m_combo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateToolTip()));
|
||||
|
||||
// Set up timers
|
||||
m_updateTimer = newSingleShotTimer(this, UpdateOutlineIntervalInMs);
|
||||
m_updateTimer = newSingleShotTimer(this, UpdateOutlineIntervalInMs,
|
||||
QLatin1String("CppEditorOutline::m_updateTimer"));
|
||||
connect(m_updateTimer, SIGNAL(timeout()), this, SLOT(updateNow()));
|
||||
|
||||
m_updateIndexTimer = newSingleShotTimer(this, UpdateOutlineIntervalInMs);
|
||||
m_updateIndexTimer = newSingleShotTimer(this, UpdateOutlineIntervalInMs,
|
||||
QLatin1String("CppEditorOutline::m_updateIndexTimer"));
|
||||
connect(m_updateIndexTimer, SIGNAL(timeout()), this, SLOT(updateIndexNow()));
|
||||
}
|
||||
|
||||
|
||||
@@ -334,7 +334,9 @@ void CheckSymbols::run()
|
||||
_potentialStatics = collectTypes.statics();
|
||||
|
||||
Utils::sort(_macroUses, sortByLinePredicate);
|
||||
_doc->clearDiagnosticMessages();
|
||||
// TODO: Handle concurrent (write) access of diagnostic messages and ensure
|
||||
// propagation to the editor widget
|
||||
// _doc->clearDiagnosticMessages();
|
||||
|
||||
if (!isCanceled()) {
|
||||
if (_doc->translationUnit()) {
|
||||
@@ -350,7 +352,9 @@ void CheckSymbols::run()
|
||||
bool CheckSymbols::warning(unsigned line, unsigned column, const QString &text, unsigned length)
|
||||
{
|
||||
Document::DiagnosticMessage m(Document::DiagnosticMessage::Warning, _fileName, line, column, text, length);
|
||||
_doc->addDiagnosticMessage(m);
|
||||
// TODO: Handle concurrent (write) access of diagnostic messages and ensure
|
||||
// propagation to the editor widget
|
||||
// _doc->addDiagnosticMessage(m);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -233,6 +233,7 @@ CppModelManager::CppModelManager(QObject *parent)
|
||||
m_dirty = true;
|
||||
|
||||
m_delayedGcTimer = new QTimer(this);
|
||||
m_delayedGcTimer->setObjectName(QLatin1String("CppModelManager::m_delayedGcTimer"));
|
||||
m_delayedGcTimer->setSingleShot(true);
|
||||
connect(m_delayedGcTimer, SIGNAL(timeout()), this, SLOT(GC()));
|
||||
|
||||
|
||||
@@ -114,10 +114,6 @@ CppRefactoringFileConstPtr CppRefactoringChanges::fileNoEditor(const QString &fi
|
||||
CppRefactoringFilePtr result(new CppRefactoringFile(document, fileName));
|
||||
result->m_data = m_data;
|
||||
|
||||
Document::Ptr cppDocument = data()->m_snapshot.document(fileName);
|
||||
if (cppDocument)
|
||||
result->setCppDocument(cppDocument);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -138,11 +138,13 @@ CppEditorSupport::CppEditorSupport(CppModelManager *modelManager, BaseTextEditor
|
||||
}
|
||||
|
||||
m_updateDocumentTimer = new QTimer(this);
|
||||
m_updateDocumentTimer->setObjectName(QLatin1String("CppEditorSupport::m_updateDocumentTimer"));
|
||||
m_updateDocumentTimer->setSingleShot(true);
|
||||
m_updateDocumentTimer->setInterval(m_updateDocumentInterval);
|
||||
connect(m_updateDocumentTimer, SIGNAL(timeout()), this, SLOT(updateDocumentNow()));
|
||||
|
||||
m_updateEditorTimer = new QTimer(this);
|
||||
m_updateEditorTimer->setObjectName(QLatin1String("CppEditorSupport::m_updateEditorTimer"));
|
||||
m_updateEditorTimer->setInterval(UpdateEditorInterval);
|
||||
m_updateEditorTimer->setSingleShot(true);
|
||||
connect(m_updateEditorTimer, SIGNAL(timeout()),
|
||||
@@ -162,6 +164,7 @@ CppEditorSupport::CppEditorSupport(CppModelManager *modelManager, BaseTextEditor
|
||||
connect(Core::EditorManager::instance(), SIGNAL(currentEditorChanged(Core::IEditor*)),
|
||||
this, SLOT(onCurrentEditorChanged()));
|
||||
m_editorGCTimer = new QTimer(this);
|
||||
m_editorGCTimer->setObjectName(QLatin1String("CppEditorSupport::m_editorGCTimer"));
|
||||
m_editorGCTimer->setSingleShot(true);
|
||||
m_editorGCTimer->setInterval(EditorHiddenGCTimeout);
|
||||
connect(m_editorGCTimer, SIGNAL(timeout()), this, SLOT(releaseResources()));
|
||||
|
||||
@@ -49,6 +49,7 @@ StringTable::StringTable()
|
||||
|
||||
m_gcRunner.setAutoDelete(false);
|
||||
|
||||
m_gcCountDown.setObjectName(QLatin1String("StringTable::m_gcCountDown"));
|
||||
m_gcCountDown.setSingleShot(true);
|
||||
m_gcCountDown.setInterval(GCTimeOut);
|
||||
connect(&m_gcCountDown, SIGNAL(timeout()),
|
||||
|
||||
@@ -2828,10 +2828,7 @@ static CPlusPlus::Document::Ptr getParsedDocument(const QString &fileName,
|
||||
unsigned BreakpointCorrectionContext::fixLineNumber(const QString &fileName,
|
||||
unsigned lineNumber) const
|
||||
{
|
||||
CPlusPlus::Document::Ptr doc = m_snapshot.document(fileName);
|
||||
if (!doc || !doc->translationUnit()->ast())
|
||||
doc = getParsedDocument(fileName, m_workingCopy, m_snapshot);
|
||||
|
||||
const CPlusPlus::Document::Ptr doc = getParsedDocument(fileName, m_workingCopy, m_snapshot);
|
||||
CPlusPlus::FindCdbBreakpoint findVisitor(doc->translationUnit());
|
||||
const unsigned correctedLine = findVisitor(lineNumber);
|
||||
if (!correctedLine) {
|
||||
|
||||
@@ -378,21 +378,21 @@ void DebuggerItemManager::saveDebuggers()
|
||||
|
||||
QVariant DebuggerItemManager::registerDebugger(const DebuggerItem &item)
|
||||
{
|
||||
// Force addition when Id is set.
|
||||
if (item.id().isValid())
|
||||
return addDebugger(item);
|
||||
|
||||
// Otherwise, try re-using existing item first.
|
||||
// Try re-using existing item first.
|
||||
foreach (const DebuggerItem &d, m_debuggers) {
|
||||
if (d.command() == item.command()
|
||||
&& d.isAutoDetected() == item.isAutoDetected()
|
||||
&& d.engineType() == item.engineType()
|
||||
&& d.displayName() == item.displayName()
|
||||
&& d.abis() == item.abis())
|
||||
&& d.abis() == item.abis()) {
|
||||
return d.id();
|
||||
}
|
||||
}
|
||||
|
||||
// Nothing suitable. Create a new id and add the item.
|
||||
// If item already has an id, add it. Otherwise, create a new id.
|
||||
if (item.id().isValid())
|
||||
return addDebugger(item);
|
||||
|
||||
DebuggerItem di = item;
|
||||
di.createId();
|
||||
return addDebugger(di);
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <utility>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Utils;
|
||||
@@ -73,19 +74,7 @@ QVariant DebuggerKitInformation::defaultValue(Kit *k) const
|
||||
|
||||
void DebuggerKitInformation::setup(Kit *k)
|
||||
{
|
||||
// Get one of the available debugger matching the kit's toolchain.
|
||||
const ToolChain *tc = ToolChainKitInformation::toolChain(k);
|
||||
const Abi toolChainAbi = tc ? tc->targetAbi() : Abi::hostAbi();
|
||||
|
||||
// This can be anything (Id, binary path, "auto")
|
||||
const QVariant rawId = k->value(DebuggerKitInformation::id());
|
||||
|
||||
enum {
|
||||
NotDetected, DetectedAutomatically, DetectedByFile, DetectedById
|
||||
} detection = NotDetected;
|
||||
DebuggerEngineType autoEngine = NoEngineType;
|
||||
FileName fileName;
|
||||
|
||||
// With 3.0 we have:
|
||||
// <value type="QString" key="Debugger.Information">{75ecf347-f221-44c3-b613-ea1d29929cd4}</value>
|
||||
// Before we had:
|
||||
@@ -98,68 +87,87 @@ void DebuggerKitInformation::setup(Kit *k)
|
||||
// <value type="QString" key="Binary">auto</value>
|
||||
// <value type="int" key="EngineType">4</value>
|
||||
// </valuemap>
|
||||
const QVariant rawId = k->value(DebuggerKitInformation::id());
|
||||
|
||||
if (rawId.isNull()) {
|
||||
// Initial setup of a kit
|
||||
detection = NotDetected;
|
||||
} else if (rawId.type() == QVariant::String) {
|
||||
detection = DetectedById;
|
||||
} else {
|
||||
QMap<QString, QVariant> map = rawId.toMap();
|
||||
QString binary = map.value(QLatin1String("Binary")).toString();
|
||||
if (binary == QLatin1String("auto")) {
|
||||
detection = DetectedAutomatically;
|
||||
autoEngine = DebuggerEngineType(map.value(QLatin1String("EngineType")).toInt());
|
||||
} else {
|
||||
detection = DetectedByFile;
|
||||
fileName = FileName::fromUserInput(binary);
|
||||
}
|
||||
}
|
||||
const ToolChain *tc = ToolChainKitInformation::toolChain(k);
|
||||
|
||||
// Get the best of the available debugger matching the kit's toolchain.
|
||||
// The general idea is to find an item that exactly matches what
|
||||
// is stored in the kit information, but also accept item based
|
||||
// on toolchain matching as fallback with a lower priority.
|
||||
|
||||
const DebuggerItem *bestItem = 0;
|
||||
DebuggerItem::MatchLevel bestLevel = DebuggerItem::DoesNotMatch;
|
||||
foreach (const DebuggerItem &item, DebuggerItemManager::debuggers()) {
|
||||
const DebuggerItem *goodItem = 0;
|
||||
if (detection == DetectedById && item.id() == rawId)
|
||||
goodItem = &item;
|
||||
if (detection == DetectedByFile && item.command() == fileName)
|
||||
goodItem = &item;
|
||||
if (detection == DetectedAutomatically && item.engineType() == autoEngine)
|
||||
goodItem = &item;
|
||||
if (item.isAutoDetected())
|
||||
goodItem = &item;
|
||||
|
||||
if (goodItem) {
|
||||
DebuggerItem::MatchLevel level = goodItem->matchTarget(toolChainAbi);
|
||||
if (level > bestLevel) {
|
||||
bestLevel = level;
|
||||
bestItem = goodItem;
|
||||
foreach (const DebuggerItem &item, DebuggerItemManager::debuggers()) {
|
||||
DebuggerItem::MatchLevel level = DebuggerItem::DoesNotMatch;
|
||||
|
||||
if (rawId.isNull()) {
|
||||
// Initial setup of a kit.
|
||||
if (tc) {
|
||||
// Use item if target toolchain fits.
|
||||
level = item.matchTarget(tc->targetAbi());
|
||||
} else {
|
||||
// Use item if host toolchain fits, but only as fallback.
|
||||
level = std::min(item.matchTarget(Abi::hostAbi()), DebuggerItem::MatchesSomewhat);
|
||||
}
|
||||
} else if (rawId.type() == QVariant::String) {
|
||||
// New structure.
|
||||
if (item.id() == rawId) {
|
||||
// Detected by ID.
|
||||
level = DebuggerItem::MatchesPerfectly;
|
||||
} else {
|
||||
// This item does not match by ID, and is an unlikely candidate.
|
||||
// However, consider using it as fallback if the tool chain fits.
|
||||
if (tc)
|
||||
level = std::min(item.matchTarget(tc->targetAbi()), DebuggerItem::MatchesSomewhat);
|
||||
}
|
||||
} else {
|
||||
// Old structure.
|
||||
const QMap<QString, QVariant> map = rawId.toMap();
|
||||
QString binary = map.value(QLatin1String("Binary")).toString();
|
||||
if (binary == QLatin1String("auto")) {
|
||||
// This is close to the "new kit" case, except that we know
|
||||
// an engine type.
|
||||
DebuggerEngineType autoEngine = DebuggerEngineType(map.value(QLatin1String("EngineType")).toInt());
|
||||
if (item.engineType() == autoEngine) {
|
||||
if (tc) {
|
||||
// Use item if target toolchain fits.
|
||||
level = item.matchTarget(tc->targetAbi());
|
||||
} else {
|
||||
// Use item if host toolchain fits, but only as fallback.
|
||||
level = std::min(item.matchTarget(Abi::hostAbi()), DebuggerItem::MatchesSomewhat);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// We have an executable path.
|
||||
FileName fileName = FileName::fromUserInput(binary);
|
||||
if (item.command() == fileName) {
|
||||
// And it's is the path of this item.
|
||||
if (tc) {
|
||||
// Use item if target toolchain fits.
|
||||
level = item.matchTarget(tc->targetAbi());
|
||||
} else {
|
||||
// Use item if host toolchain fits, but only as fallback.
|
||||
level = std::min(item.matchTarget(Abi::hostAbi()), DebuggerItem::MatchesSomewhat);
|
||||
}
|
||||
} else {
|
||||
// This item does not match by filename, and is an unlikely candidate.
|
||||
// However, consider using it as fallback if the tool chain fits.
|
||||
if (tc)
|
||||
level = std::min(item.matchTarget(tc->targetAbi()), DebuggerItem::MatchesSomewhat);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If we have an existing debugger with matching id _and_
|
||||
// matching target ABI we are fine.
|
||||
if (bestItem) {
|
||||
k->setValue(DebuggerKitInformation::id(), bestItem->id());
|
||||
return;
|
||||
}
|
||||
|
||||
// We didn't find an existing debugger that matched by whatever
|
||||
// data we found in the kit (i.e. no id, filename, "auto")
|
||||
// (or what we found did not match ABI-wise)
|
||||
// Let's try to pick one with matching ABI.
|
||||
QVariant bestId;
|
||||
bestLevel = DebuggerItem::DoesNotMatch;
|
||||
foreach (const DebuggerItem &item, DebuggerItemManager::debuggers()) {
|
||||
DebuggerItem::MatchLevel level = item.matchTarget(toolChainAbi);
|
||||
if (level > bestLevel) {
|
||||
bestLevel = level;
|
||||
bestId = item.id();
|
||||
bestItem = &item;
|
||||
}
|
||||
}
|
||||
|
||||
k->setValue(DebuggerKitInformation::id(), bestId);
|
||||
// Use the best id we found, or an invalid one.
|
||||
k->setValue(DebuggerKitInformation::id(), bestItem ? bestItem->id() : QVariant());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3079,7 +3079,6 @@ void DebuggerPluginPrivate::extensionsInitialized()
|
||||
cmd = ActionManager::registerAction(m_resetAction,
|
||||
Constants::RESET, globalcontext);
|
||||
cmd->setDescription(tr("Restart Debugging"));
|
||||
cmd->setDefaultKeySequence(QKeySequence(tr("Shift+Ctrl+R")));
|
||||
debugMenu->addAction(cmd, CC::G_DEFAULT_ONE);
|
||||
|
||||
debugMenu->addSeparator(globalcontext);
|
||||
|
||||
@@ -184,8 +184,10 @@ void DebuggerRunConfigWidget::useCppDebuggerClicked(bool on)
|
||||
m_aspect->m_useCppDebugger = on
|
||||
? DebuggerRunConfigurationAspect::EnabledLanguage
|
||||
: DebuggerRunConfigurationAspect::DisabledLanguage;
|
||||
if (!on && !m_useQmlDebugger->isChecked())
|
||||
if (!on && !m_useQmlDebugger->isChecked()) {
|
||||
m_useQmlDebugger->setChecked(true);
|
||||
useQmlDebuggerClicked(true);
|
||||
}
|
||||
}
|
||||
|
||||
void DebuggerRunConfigWidget::useQmlDebuggerToggled(bool on)
|
||||
@@ -199,8 +201,10 @@ void DebuggerRunConfigWidget::useQmlDebuggerClicked(bool on)
|
||||
m_aspect->m_useQmlDebugger = on
|
||||
? DebuggerRunConfigurationAspect::EnabledLanguage
|
||||
: DebuggerRunConfigurationAspect::DisabledLanguage;
|
||||
if (!on && !m_useCppDebugger->isChecked())
|
||||
if (!on && !m_useCppDebugger->isChecked()) {
|
||||
m_useCppDebugger->setChecked(true);
|
||||
useCppDebuggerClicked(true);
|
||||
}
|
||||
}
|
||||
|
||||
void DebuggerRunConfigWidget::useMultiProcessToggled(bool on)
|
||||
|
||||
@@ -480,21 +480,27 @@ void GdbRemoteServerEngine::notifyEngineRemoteSetupDone(int gdbServerPort, int q
|
||||
QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state());
|
||||
DebuggerEngine::notifyEngineRemoteSetupDone(gdbServerPort, qmlPort);
|
||||
|
||||
if (m_isMulti) {
|
||||
// Has been done in notifyEngineRemoteServerRunning
|
||||
} else {
|
||||
if (qmlPort != -1)
|
||||
startParameters().qmlServerPort = qmlPort;
|
||||
if (gdbServerPort != -1) {
|
||||
QString &rc = startParameters().remoteChannel;
|
||||
const int sepIndex = rc.lastIndexOf(QLatin1Char(':'));
|
||||
if (sepIndex != -1) {
|
||||
rc.replace(sepIndex + 1, rc.count() - sepIndex - 1,
|
||||
QString::number(gdbServerPort));
|
||||
}
|
||||
DebuggerStartParameters ¶ms = isMasterEngine()
|
||||
? startParameters() : masterEngine()->startParameters();
|
||||
if (gdbServerPort != -1) {
|
||||
QString &rc = params.remoteChannel;
|
||||
const int sepIndex = rc.lastIndexOf(QLatin1Char(':'));
|
||||
if (sepIndex != -1) {
|
||||
rc.replace(sepIndex + 1, rc.count() - sepIndex - 1,
|
||||
QString::number(gdbServerPort));
|
||||
}
|
||||
startGdb();
|
||||
}
|
||||
if (qmlPort != -1) {
|
||||
params.qmlServerPort = qmlPort;
|
||||
params.processArgs.replace(_("%qml_port%"), QString::number(qmlPort));
|
||||
}
|
||||
|
||||
// TODO: Aren't these redundant?
|
||||
m_isMulti = params.multiProcess;
|
||||
m_targetPid = -1;
|
||||
m_serverChannel = params.remoteChannel.toLatin1();
|
||||
|
||||
startGdb();
|
||||
}
|
||||
|
||||
void GdbRemoteServerEngine::notifyEngineRemoteSetupFailed(const QString &reason)
|
||||
|
||||
@@ -246,7 +246,7 @@ void IosProbe::setupDefaultToolchains(const QString &devPath, const QString &xco
|
||||
continue;
|
||||
}
|
||||
if (sdkName.isEmpty()) {
|
||||
if (compareVersions(maxVersion, versionStr) > 0) {
|
||||
if (maxVersion.isEmpty() || compareVersions(maxVersion, versionStr) > 0) {
|
||||
maxVersion = versionStr;
|
||||
sdkPath = sdkDirInfo.canonicalFilePath();
|
||||
sdkSettings = sdkInfo;
|
||||
|
||||
@@ -69,11 +69,11 @@ isEmpty(LLVM_INSTALL_DIR):LLVM_INSTALL_DIR=$$(LLVM_INSTALL_DIR)
|
||||
|
||||
isEmpty(IDE_PACKAGE_MODE) {
|
||||
SUBDIRS += \
|
||||
helloworld \
|
||||
updateinfo
|
||||
} else:!isEmpty(UPDATEINFO_ENABLE) {
|
||||
SUBDIRS += \
|
||||
updateinfo
|
||||
helloworld #\
|
||||
#updateinfo
|
||||
#} else:!isEmpty(UPDATEINFO_ENABLE) {
|
||||
# SUBDIRS += \
|
||||
# updateinfo
|
||||
}
|
||||
|
||||
for(p, SUBDIRS) {
|
||||
|
||||
@@ -471,7 +471,7 @@ Abi Abi::abiFromTargetTriplet(const QString &triple)
|
||||
width = 32;
|
||||
} else if (p.startsWith(QLatin1String("mips"))) {
|
||||
arch = Abi::MipsArchitecture;
|
||||
width = p.endsWith(QLatin1String("64")) ? 64 : 32;
|
||||
width = p.contains(QLatin1String("64")) ? 64 : 32;
|
||||
} else if (p == QLatin1String("x86_64") || p == QLatin1String("amd64")) {
|
||||
arch = Abi::X86Architecture;
|
||||
width = 64;
|
||||
@@ -1065,6 +1065,10 @@ void ProjectExplorer::ProjectExplorerPlugin::testAbiFromTargetTriplet_data()
|
||||
QTest::newRow("mips64-linux-octeon-gnu") << int(Abi::MipsArchitecture)
|
||||
<< int(Abi::LinuxOS) << int(Abi::GenericLinuxFlavor)
|
||||
<< int(Abi::ElfFormat) << 64;
|
||||
|
||||
QTest::newRow("mips64el-linux-gnuabi") << int(Abi::MipsArchitecture)
|
||||
<< int(Abi::LinuxOS) << int(Abi::GenericLinuxFlavor)
|
||||
<< int(Abi::ElfFormat) << 64;
|
||||
}
|
||||
|
||||
void ProjectExplorer::ProjectExplorerPlugin::testAbiFromTargetTriplet()
|
||||
|
||||
@@ -678,6 +678,11 @@ QVariantMap SettingsAccessor::upgradeSettings(const QVariantMap &data, int toVer
|
||||
else
|
||||
result = data;
|
||||
|
||||
if (version < 15 && toVersion < 15) {
|
||||
result.insert(QLatin1String(USER_STICKY_KEYS_KEY),
|
||||
data.value(QLatin1String("ProjectExplorer.Project.UserStickyKeys")));
|
||||
}
|
||||
|
||||
if (version >= toVersion
|
||||
|| version < d->firstVersion()
|
||||
|| toVersion > d->currentVersion())
|
||||
|
||||
@@ -39,6 +39,9 @@
|
||||
#include <coreplugin/documentmanager.h>
|
||||
#include <coreplugin/icontext.h>
|
||||
#include <coreplugin/id.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/iversioncontrol.h>
|
||||
#include <coreplugin/vcsmanager.h>
|
||||
#include <coreplugin/messagemanager.h>
|
||||
#include <coreplugin/progressmanager/progressmanager.h>
|
||||
#include <coreplugin/mimedatabase.h>
|
||||
@@ -68,6 +71,7 @@
|
||||
#include <QCoreApplication>
|
||||
#include <QDir>
|
||||
#include <QFileInfo>
|
||||
#include <QMessageBox>
|
||||
#include <QVariantMap>
|
||||
|
||||
using namespace Core;
|
||||
@@ -130,6 +134,11 @@ QbsProject::~QbsProject()
|
||||
{
|
||||
m_codeModelFuture.cancel();
|
||||
delete m_qbsProjectParser;
|
||||
if (m_qbsUpdateFutureInterface) {
|
||||
m_qbsUpdateFutureInterface->reportCanceled();
|
||||
delete m_qbsUpdateFutureInterface;
|
||||
m_qbsUpdateFutureInterface = 0;
|
||||
}
|
||||
|
||||
// Deleting the root node triggers a few things, make sure rootProjectNode
|
||||
// returns 0 already
|
||||
@@ -223,6 +232,27 @@ private:
|
||||
bool m_wasInDocumentManager;
|
||||
};
|
||||
|
||||
bool QbsProject::ensureWriteableQbsFile(const QString &file)
|
||||
{
|
||||
// Ensure that the file is not read only
|
||||
QFileInfo fi(file);
|
||||
if (!fi.isWritable()) {
|
||||
// Try via vcs manager
|
||||
Core::IVersionControl *versionControl =
|
||||
Core::VcsManager::findVersionControlForDirectory(fi.absolutePath());
|
||||
if (!versionControl || !versionControl->vcsOpen(file)) {
|
||||
bool makeWritable = QFile::setPermissions(file, fi.permissions() | QFile::WriteUser);
|
||||
if (!makeWritable) {
|
||||
QMessageBox::warning(Core::ICore::mainWindow(),
|
||||
tr("Failed!"),
|
||||
tr("Could not write project file %1.").arg(file));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool QbsProject::addFilesToProduct(QbsBaseProjectNode *node, const QStringList &filePaths,
|
||||
const qbs::ProductData &productData, const qbs::GroupData &groupData, QStringList *notAdded)
|
||||
{
|
||||
@@ -230,6 +260,7 @@ bool QbsProject::addFilesToProduct(QbsBaseProjectNode *node, const QStringList &
|
||||
QStringList allPaths = groupData.allFilePaths();
|
||||
const QString productFilePath = productData.location().fileName();
|
||||
ChangeExpector expector(productFilePath, m_qbsDocuments);
|
||||
ensureWriteableQbsFile(productFilePath);
|
||||
foreach (const QString &path, filePaths) {
|
||||
qbs::ErrorInfo err = m_qbsProject.addFiles(productData, groupData, QStringList() << path);
|
||||
if (err.hasError()) {
|
||||
@@ -255,6 +286,7 @@ bool QbsProject::removeFilesFromProduct(QbsBaseProjectNode *node, const QStringL
|
||||
QStringList allPaths = groupData.allFilePaths();
|
||||
const QString productFilePath = productData.location().fileName();
|
||||
ChangeExpector expector(productFilePath, m_qbsDocuments);
|
||||
ensureWriteableQbsFile(productFilePath);
|
||||
foreach (const QString &path, filePaths) {
|
||||
qbs::ErrorInfo err
|
||||
= m_qbsProject.removeFiles(productData, groupData, QStringList() << path);
|
||||
|
||||
@@ -135,6 +135,8 @@ private:
|
||||
void updateDeploymentInfo(const qbs::Project &project);
|
||||
void updateBuildTargetData();
|
||||
|
||||
static bool ensureWriteableQbsFile(const QString &file);
|
||||
|
||||
QbsManager *const m_manager;
|
||||
const QString m_projectName;
|
||||
const QString m_fileName;
|
||||
|
||||
@@ -194,6 +194,8 @@ void QbsRunConfiguration::installStepChanged()
|
||||
|
||||
if (m_currentBuildStepList) {
|
||||
connect(m_currentBuildStepList, SIGNAL(stepInserted(int)), this, SLOT(installStepChanged()));
|
||||
connect(m_currentBuildStepList, SIGNAL(aboutToRemoveStep(int)), this,
|
||||
SLOT(installStepToBeRemoved(int)));
|
||||
connect(m_currentBuildStepList, SIGNAL(stepRemoved(int)), this, SLOT(installStepChanged()));
|
||||
connect(m_currentBuildStepList, SIGNAL(stepMoved(int,int)), this, SLOT(installStepChanged()));
|
||||
}
|
||||
@@ -201,6 +203,17 @@ void QbsRunConfiguration::installStepChanged()
|
||||
emit targetInformationChanged();
|
||||
}
|
||||
|
||||
void QbsRunConfiguration::installStepToBeRemoved(int pos)
|
||||
{
|
||||
QTC_ASSERT(m_currentBuildStepList, return);
|
||||
// TODO: Our logic is rather broken. Users can create as many qbs install steps as they want,
|
||||
// but we ignore all but the first one.
|
||||
if (m_currentBuildStepList->steps().at(pos) != m_currentInstallStep)
|
||||
return;
|
||||
disconnect(m_currentInstallStep, SIGNAL(changed()), this, SIGNAL(targetInformationChanged()));
|
||||
m_currentInstallStep = 0;
|
||||
}
|
||||
|
||||
QString QbsRunConfiguration::executable() const
|
||||
{
|
||||
QbsProject *pro = static_cast<QbsProject *>(target()->project());
|
||||
|
||||
@@ -105,6 +105,7 @@ protected:
|
||||
|
||||
private slots:
|
||||
void installStepChanged();
|
||||
void installStepToBeRemoved(int pos);
|
||||
|
||||
private:
|
||||
void setBaseWorkingDirectory(const QString &workingDirectory);
|
||||
|
||||
@@ -1712,17 +1712,13 @@ void QmakeProFileNode::setupReader()
|
||||
|
||||
QmakeProFileNode::EvalResult QmakeProFileNode::evaluate()
|
||||
{
|
||||
EvalResult evalResult = EvalOk;
|
||||
if (ProFile *pro = m_readerExact->parsedProFile(m_projectFilePath)) {
|
||||
if (!m_readerExact->accept(pro, QMakeEvaluator::LoadAll))
|
||||
evalResult = EvalPartial;
|
||||
if (!m_readerCumulative->accept(pro, QMakeEvaluator::LoadPreFiles))
|
||||
evalResult = EvalFail;
|
||||
bool exactOk = m_readerExact->accept(pro, QMakeEvaluator::LoadAll);
|
||||
bool cumulOk = m_readerCumulative->accept(pro, QMakeEvaluator::LoadPreFiles);
|
||||
pro->deref();
|
||||
} else {
|
||||
evalResult = EvalFail;
|
||||
return exactOk ? EvalOk : cumulOk ? EvalPartial : EvalFail;
|
||||
}
|
||||
return evalResult;
|
||||
return EvalFail;
|
||||
}
|
||||
|
||||
void QmakeProFileNode::asyncEvaluate(QFutureInterface<EvalResult> &fi)
|
||||
|
||||
@@ -650,10 +650,9 @@ static inline ProjectExplorer::Kit *getActiveKit(DesignDocument *designDocument)
|
||||
if (!isFileInProject(designDocument, currentProject))
|
||||
return 0;
|
||||
|
||||
designDocument->disconnect(designDocument, SLOT(updateActiveQtVersion()));
|
||||
designDocument->connect(projectExplorer, SIGNAL(currentProjectChanged(ProjectExplorer::Project*)), designDocument, SLOT(updateActiveQtVersion()));
|
||||
designDocument->connect(projectExplorer, SIGNAL(currentProjectChanged(ProjectExplorer::Project*)), designDocument, SLOT(updateActiveQtVersion()), Qt::UniqueConnection);
|
||||
|
||||
designDocument->connect(currentProject, SIGNAL(activeTargetChanged(ProjectExplorer::Target*)), designDocument, SLOT(updateActiveQtVersion()));
|
||||
designDocument->connect(currentProject, SIGNAL(activeTargetChanged(ProjectExplorer::Target*)), designDocument, SLOT(updateActiveQtVersion()), Qt::UniqueConnection);
|
||||
|
||||
|
||||
ProjectExplorer::Target *target = currentProject->activeTarget();
|
||||
@@ -661,7 +660,7 @@ static inline ProjectExplorer::Kit *getActiveKit(DesignDocument *designDocument)
|
||||
if (!target)
|
||||
return 0;
|
||||
|
||||
designDocument->connect(target, SIGNAL(kitChanged()), designDocument, SLOT(updateActiveQtVersion()));
|
||||
designDocument->connect(target, SIGNAL(kitChanged()), designDocument, SLOT(updateActiveQtVersion()), Qt::UniqueConnection);
|
||||
|
||||
return target->kit();
|
||||
}
|
||||
|
||||
@@ -721,7 +721,7 @@ void NavigatorTreeModel::handleItemLibraryItemDrop(const QMimeData *mimeData, in
|
||||
|
||||
if (foundTarget) {
|
||||
ItemLibraryEntry itemLibraryEntry = itemLibraryEntryFromData(mimeData->data("application/vnd.bauhaus.itemlibraryinfo"));
|
||||
QmlItemNode newQmlItemNode = QmlItemNode::createQmlItemNode(m_view, itemLibraryEntry, QPointF(0., 0.), targetProperty);
|
||||
QmlItemNode newQmlItemNode = QmlItemNode::createQmlItemNode(m_view, itemLibraryEntry, QPointF(), targetProperty);
|
||||
|
||||
if (newQmlItemNode.isValid() && targetProperty.isNodeListProperty()) {
|
||||
QList<ModelNode> newModelNodeList;
|
||||
@@ -742,7 +742,7 @@ void NavigatorTreeModel::handleItemLibraryImageDrop(const QMimeData *mimeData, i
|
||||
|
||||
if (foundTarget) {
|
||||
QString imageFileName = QString::fromUtf8(mimeData->data("application/vnd.bauhaus.libraryresource"));
|
||||
QmlItemNode newQmlItemNode = QmlItemNode::createQmlItemNodeFromImage(m_view, imageFileName, QPointF(0., 0.), targetProperty);
|
||||
QmlItemNode newQmlItemNode = QmlItemNode::createQmlItemNodeFromImage(m_view, imageFileName, QPointF(), targetProperty);
|
||||
|
||||
if (newQmlItemNode.isValid()) {
|
||||
QList<ModelNode> newModelNodeList;
|
||||
|
||||
@@ -39,7 +39,7 @@ Column {
|
||||
Section {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
caption: qsTr("TabView")
|
||||
caption: qsTr("Tab View")
|
||||
|
||||
SectionLayout {
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ Column {
|
||||
|
||||
ColorEditor {
|
||||
caption: qsTr("Color")
|
||||
backendendValue: backendValues.textColor
|
||||
backendValue: backendValues.textColor
|
||||
supportGradient: false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -786,8 +786,10 @@ void NodeMetaInfoPrivate::setupLocalPropertyInfo(QList<PropertyInfo> localProper
|
||||
void NodeMetaInfoPrivate::setupPropertyInfo(QList<PropertyInfo> propertyInfos)
|
||||
{
|
||||
foreach (const PropertyInfo &propertyInfo, propertyInfos) {
|
||||
m_properties.append(propertyInfo.first);
|
||||
m_propertyTypes.append(propertyInfo.second);
|
||||
if (!m_properties.contains(propertyInfo.first)) {
|
||||
m_properties.append(propertyInfo.first);
|
||||
m_propertyTypes.append(propertyInfo.second);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -117,8 +117,10 @@ QmlItemNode QmlItemNode::createQmlItemNode(AbstractView *view, const ItemLibrary
|
||||
QList<PropertyBindingEntry> propertyBindingList;
|
||||
if (itemLibraryEntry.qmlSource().isEmpty()) {
|
||||
QList<QPair<PropertyName, QVariant> > propertyPairList;
|
||||
propertyPairList.append(qMakePair(PropertyName("x"), QVariant(qRound(position.x()))));
|
||||
propertyPairList.append(qMakePair(PropertyName("y"), QVariant(qRound(position.y()))));
|
||||
if (!position.isNull()) {
|
||||
propertyPairList.append(qMakePair(PropertyName("x"), QVariant(qRound(position.x()))));
|
||||
propertyPairList.append(qMakePair(PropertyName("y"), QVariant(qRound(position.y()))));
|
||||
}
|
||||
|
||||
foreach (const PropertyContainer &property, itemLibraryEntry.properties()) {
|
||||
if (property.type() == QStringLiteral("binding")) {
|
||||
|
||||
@@ -74,7 +74,8 @@ static inline QStringList supportedVersionsList()
|
||||
static inline QStringList globalQtEnums()
|
||||
{
|
||||
static QStringList list = QStringList() << QStringLiteral("Horizontal") << QStringLiteral("Vertical") << QStringLiteral("AlignVCenter")
|
||||
<< QStringLiteral("AlignLeft") << QStringLiteral("LeftToRight") << QStringLiteral("RightToLeft")
|
||||
<< QStringLiteral("AlignLeft") << QStringLiteral("LeftToRight") << QStringLiteral("RightToLeft") << QStringLiteral("AlignHCenter")
|
||||
<< QStringLiteral("AlignRight") << QStringLiteral("AlignBottom") << QStringLiteral("AlignBaseline") << QStringLiteral("AlignTop")
|
||||
<< QStringLiteral("BottomLeft") << QStringLiteral("LeftEdge") << QStringLiteral("RightEdge") << QStringLiteral("BottomEdge");
|
||||
|
||||
return list;
|
||||
@@ -867,7 +868,6 @@ bool TextToModelMerger::load(const QString &data, DifferenceHandler &differenceH
|
||||
|
||||
setupImports(doc, differenceHandler);
|
||||
setupPossibleImports(snapshot, vContext);
|
||||
setupUsedImports();
|
||||
|
||||
if (m_rewriterView->model()->imports().isEmpty()) {
|
||||
const QmlJS::DiagnosticMessage diagnosticMessage(QmlJS::Severity::Error, AST::SourceLocation(0, 0, 0, 0), QCoreApplication::translate("QmlDesigner::TextToModelMerger", "No import statements found"));
|
||||
@@ -943,6 +943,7 @@ bool TextToModelMerger::load(const QString &data, DifferenceHandler &differenceH
|
||||
}
|
||||
}
|
||||
}
|
||||
setupUsedImports();
|
||||
|
||||
UiObjectMember *astRootNode = 0;
|
||||
if (UiProgram *program = doc->qmlProgram())
|
||||
|
||||
@@ -112,14 +112,14 @@ ModelManagerInterface::ProjectInfo QmlJSTools::Internal::ModelManager::defaultPr
|
||||
projectInfo.tryQmlDump = project && (
|
||||
qtVersion->type() == QLatin1String(QtSupport::Constants::DESKTOPQT)
|
||||
|| qtVersion->type() == QLatin1String(QtSupport::Constants::SIMULATORQT));
|
||||
projectInfo.qtQmlPath = qtVersion->qmakeProperty("QT_INSTALL_QML");
|
||||
projectInfo.qtImportsPath = qtVersion->qmakeProperty("QT_INSTALL_IMPORTS");
|
||||
projectInfo.qtQmlPath = QFileInfo(qtVersion->qmakeProperty("QT_INSTALL_QML")).canonicalFilePath();
|
||||
projectInfo.qtImportsPath = QFileInfo(qtVersion->qmakeProperty("QT_INSTALL_IMPORTS")).canonicalFilePath();
|
||||
projectInfo.qtVersionString = qtVersion->qtVersionString();
|
||||
} else {
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||
projectInfo.qtQmlPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath);
|
||||
projectInfo.qtQmlPath = QFileInfo(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath)).canonicalFilePath();
|
||||
#endif
|
||||
projectInfo.qtImportsPath = QLibraryInfo::location(QLibraryInfo::ImportsPath);
|
||||
projectInfo.qtImportsPath = QFileInfo(QLibraryInfo::location(QLibraryInfo::ImportsPath)).canonicalFilePath();
|
||||
projectInfo.qtVersionString = QLatin1String(qVersion());
|
||||
}
|
||||
|
||||
|
||||
@@ -264,6 +264,12 @@ FeatureSet BaseQtVersion::availableFeatures() const
|
||||
features |= FeatureSet(Constants::FEATURE_QT_QUICK_2_2);
|
||||
features |= FeatureSet(Constants::FEATURE_QT_QUICK_CONTROLS_1_1);
|
||||
|
||||
if (qtVersion() < QtVersionNumber(5, 3, 0))
|
||||
return features;
|
||||
|
||||
features |= FeatureSet(Constants::FEATURE_QT_QUICK_2_3);
|
||||
features |= FeatureSet(Constants::FEATURE_QT_QUICK_CONTROLS_1_2);
|
||||
|
||||
return features;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,10 +60,12 @@ const char FEATURE_QT_QUICK_2[] = "QtSupport.Wizards.FeatureQtQuick.2";
|
||||
const char FEATURE_QT_QUICK_2_0[] = "QtSupport.Wizards.FeatureQtQuick.2.0";
|
||||
const char FEATURE_QT_QUICK_2_1[] = "QtSupport.Wizards.FeatureQtQuick.2.1";
|
||||
const char FEATURE_QT_QUICK_2_2[] = "QtSupport.Wizards.FeatureQtQuick.2.2";
|
||||
const char FEATURE_QT_QUICK_2_3[] = "QtSupport.Wizards.FeatureQtQuick.2.3";
|
||||
const char FEATURE_QT_QUICK_CONTROLS[] = "QtSupport.Wizards.FeatureQtQuick.Controls";
|
||||
const char FEATURE_QT_QUICK_CONTROLS_1[] = "QtSupport.Wizards.FeatureQtQuick.Controls.1";
|
||||
const char FEATURE_QT_QUICK_CONTROLS_1_0[] = "QtSupport.Wizards.FeatureQtQuick.Controls.1.0";
|
||||
const char FEATURE_QT_QUICK_CONTROLS_1_1[] = "QtSupport.Wizards.FeatureQtQuick.Controls.1.1";
|
||||
const char FEATURE_QT_QUICK_CONTROLS_1_2[] = "QtSupport.Wizards.FeatureQtQuick.Controls.1.2";
|
||||
const char FEATURE_QT_WEBKIT[] = "QtSupport.Wizards.FeatureQtWebkit";
|
||||
const char FEATURE_QT_CONSOLE[] = "QtSupport.Wizards.FeatureQtConsole";
|
||||
const char FEATURE_MOBILE[] = "QtSupport.Wizards.FeatureMobile";
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <projectexplorer/devicesupport/deviceapplicationrunner.h>
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
|
||||
#include <QPointer>
|
||||
|
||||
@@ -60,7 +61,6 @@ public:
|
||||
: engine(engine),
|
||||
qmlDebugging(runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>()->useQmlDebugger()),
|
||||
cppDebugging(runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>()->useCppDebugger()),
|
||||
target(DeviceKitInformation::device(runConfig->target()->kit())->sshParameters().host.toLatin1()),
|
||||
gdbServerPort(-1), qmlPort(-1)
|
||||
{
|
||||
}
|
||||
@@ -69,7 +69,6 @@ public:
|
||||
bool qmlDebugging;
|
||||
bool cppDebugging;
|
||||
QByteArray gdbserverOutput;
|
||||
QByteArray target;
|
||||
int gdbServerPort;
|
||||
int qmlPort;
|
||||
};
|
||||
@@ -99,8 +98,12 @@ DebuggerStartParameters LinuxDeviceDebugSupport::startParameters(const AbstractR
|
||||
params.qmlServerPort = 0; // port is selected later on
|
||||
}
|
||||
if (aspect->useCppDebugger()) {
|
||||
params.multiProcess = true;
|
||||
params.languages |= CppLanguage;
|
||||
params.processArgs = runConfig->arguments().join(QLatin1Char(' '));
|
||||
QStringList args = runConfig->arguments();
|
||||
if (aspect->useQmlDebugger())
|
||||
args.prepend(QString::fromLatin1("-qmljsdebugger=port:%qml_port%,block"));
|
||||
params.processArgs = Utils::QtcProcess::joinArgs(args, Utils::OsTypeLinux);
|
||||
params.startMode = AttachToRemoteServer;
|
||||
params.executable = runConfig->localExecutableFilePath();
|
||||
params.remoteChannel = device->sshParameters().host + QLatin1String(":-1");
|
||||
@@ -265,8 +268,6 @@ void LinuxDeviceDebugSupport::handleAdapterSetupFailed(const QString &error)
|
||||
void LinuxDeviceDebugSupport::handleAdapterSetupDone()
|
||||
{
|
||||
AbstractRemoteLinuxRunSupport::handleAdapterSetupDone();
|
||||
QByteArray remote = d->target + ':' + QByteArray::number(d->gdbServerPort);
|
||||
d->engine->notifyEngineRemoteServerRunning(remote, -1);
|
||||
d->engine->notifyEngineRemoteSetupDone(d->gdbServerPort, d->qmlPort);
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ RunControl *WinRtDebugSupport::createDebugRunControl(WinRtRunConfiguration *runC
|
||||
+ QLatin1String("/winrtdebughelper.exe"));
|
||||
if (!debuggerHelper.isExecutable()) {
|
||||
*errorMessage = tr("The WinRT debugging helper is missing from your Qt Creator "
|
||||
"installation. It was assumed to be located at").arg(
|
||||
"installation. It was assumed to be located at %1").arg(
|
||||
debuggerHelper.absoluteFilePath());
|
||||
return 0;
|
||||
}
|
||||
|
||||
+1
-1
Submodule src/shared/qbs updated: 82c459ea14...1358bf739a
Vendored
+1
-1
@@ -42,7 +42,7 @@ include(../../../rpath.pri)
|
||||
OBJECTIVE_SOURCES += \
|
||||
main.mm \
|
||||
nsprintf.mm \
|
||||
nsstringexpandPath.mm \
|
||||
nsstringexpandpath.mm \
|
||||
iphonesimulator.mm
|
||||
|
||||
HEADERS += \
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ include(../../../rpath.pri)
|
||||
OBJECTIVE_SOURCES += \
|
||||
main.mm \
|
||||
nsprintf.mm \
|
||||
nsstringexpandPath.mm \
|
||||
nsstringexpandpath.mm \
|
||||
iphonesimulator.mm
|
||||
|
||||
HEADERS += \
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ Fourth - you'll have to provide some additional repositories (and for the hookin
|
||||
These additional repositories are located inside ~/QtSDK/src or C:\QtSDK\src (depending on the OS you're on).
|
||||
You can also just provide them inside a different folder and specify the folder with the environment variable SYSTEST_SRCPATH.
|
||||
This folder must contain the following:
|
||||
* a QtCreator repository (or source copy) of tag v3.1.0 named 'creator' including the submodule src/shared/qbs
|
||||
* a QtCreator repository (or source copy) of tag v3.2.0 named 'creator' including the submodule src/shared/qbs
|
||||
* a subfolder called 'creator-test-data'
|
||||
* a speedcrunch 0.11 repository (or source copy) inside 'creator-test-data' named 'speedcrunch'
|
||||
* additional Squish versions for hooking into subprocesses inside different folders inside 'creator-test-data' following the information below
|
||||
|
||||
@@ -30,6 +30,11 @@
|
||||
import __builtin__
|
||||
import re
|
||||
|
||||
def openQbsProject(projectPath):
|
||||
cleanUpUserFiles(projectPath)
|
||||
invokeMenuItem("File", "Open File or Project...")
|
||||
selectFromFileDialog(projectPath)
|
||||
|
||||
def openQmakeProject(projectPath, targets=Targets.desktopTargetClasses(), fromWelcome=False):
|
||||
cleanUpUserFiles(projectPath)
|
||||
if fromWelcome:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user