Commit 914adeab authored by Eike Ziller's avatar Eike Ziller

Merge remote-tracking branch 'origin/3.2'

Conflicts:
	src/plugins/qmldesigner/designercore/model/plaintexteditmodifier.cpp
	src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp

Change-Id: I1627f6aa98a442413f8b08b579ecaf9647dc887b
parents 11f89ece a4db6db3
Qt Creator version 3.2.1 is a bugfix release.
The most important changes are listed in this document. For a complete
list of changes, see the Git log for the Qt Creator sources that
you can check out from the public Git repository. For example:
git clone git://gitorious.org/qt-creator/qt-creator.git
git log --cherry-pick --pretty=oneline v3.2.0..v3.2.1
General
* Fixed freeze when using shortcut for all projects or current project
locator filters (QTCREATORBUG-12875)
* Fixed crash when activating timers by removing the unsupported UpdateInfo
plugin that triggered it (QTCREATORBUG-11262)
Qbs Projects
* Fixed adding and removing files when project file is write protected by VCS
* Fixed crash when removing empty install step
C++ Support
* Fixed crash when opening context menu on macro parameter (QTCREATORBUG-12853)
QML Support
* Added missing members to date objects
* Added templates for Qt Quick 2.3 and Qt Quick Controls 1.2 applications
* Fixed keyboard shortcuts in QML/JS console (QTCREATORBUG-12956)
Qt Quick Designer
* Added option to use fallback QML puppet and set it to be the default
* Fixed updating of color properties (QTCREATORBUG-12841)
* Fixed duplication of ApplicationWindow properties (QTCREATORBUG-12910)
Platform Specific
OS X
* Fixed deployment of Clang library in binary packages
* Fixed deployment of fallback QML puppets in binary packages
* Removed wrong File > Exit menu item
iOS
* Fixed determination of newest SDK version when no version is explicitly stated
Remote Linux
* Fixed mixed QML and C++ debugging (QTCREATORBUG-12928)
* Fixed check for maximum packet size for SSH connections (QTCREATORBUG-12884)
Windows Phone
* Fixed font deployment for Windows Phone 8.0
...@@ -75,8 +75,8 @@ ...@@ -75,8 +75,8 @@
\list \list
\li Select \gui {Qt Quick Controls 1.1} or \gui {Qt Quick 2.2} to \li Select \gui {Qt Quick Controls} or \gui {Qt Quick 2.1}, or
develop for platforms that run Qt 5. later, to develop for platforms that run Qt 5.
\li Select \gui {Qt Quick 1.1} to develop for platforms that run \li Select \gui {Qt Quick 1.1} to develop for platforms that run
Qt 4.7.4. To develop for platforms that run Qt 4.7.1, 4.7.2, or Qt 4.7.4. To develop for platforms that run Qt 4.7.1, 4.7.2, or
......
...@@ -17,11 +17,14 @@ ...@@ -17,11 +17,14 @@
****************************************************************************/ ****************************************************************************/
//! [0] //! [0]
\badcode
otool -L /Developer/Applications/Qt/plugins/designer/libqwt_designer_plugin.dylib otool -L /Developer/Applications/Qt/plugins/designer/libqwt_designer_plugin.dylib
\endcode
//! [0] //! [0]
//! [1] //! [1]
\badcode
/Developer/Applications/Qt/plugins/designer/libqwt_designer_plugin.dylib: /Developer/Applications/Qt/plugins/designer/libqwt_designer_plugin.dylib:
libqwt_designer_plugin.dylib (compatibility version 0.0.0, current version 0.0.0) libqwt_designer_plugin.dylib (compatibility version 0.0.0, current version 0.0.0)
libqwt.5.dylib (compatibility version 5.2.0, current version 5.2.1) libqwt.5.dylib (compatibility version 5.2.0, current version 5.2.1)
...@@ -33,14 +36,18 @@ otool -L /Developer/Applications/Qt/plugins/designer/libqwt_designer_plugin.dyli ...@@ -33,14 +36,18 @@ otool -L /Developer/Applications/Qt/plugins/designer/libqwt_designer_plugin.dyli
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 438.0.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 438.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.1) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.1)
\endcode
//! [1] //! [1]
//! [2] //! [2]
\badcode
otool -L /usr/local/qwt-5.2.1/lib/libqwt.5.dylib otool -L /usr/local/qwt-5.2.1/lib/libqwt.5.dylib
\endcode
//! [2] //! [2]
//! [3] //! [3]
\badcode
/usr/local/qwt-5.2.1/lib/libqwt.5.dylib: /usr/local/qwt-5.2.1/lib/libqwt.5.dylib:
libqwt.5.dylib (compatibility version 5.2.0, current version 5.2.1) libqwt.5.dylib (compatibility version 5.2.0, current version 5.2.1)
QtGui.framework/Versions/4/QtGui (compatibility version 4.6.0, current version 4.6.2) QtGui.framework/Versions/4/QtGui (compatibility version 4.6.0, current version 4.6.2)
...@@ -48,18 +55,22 @@ otool -L /usr/local/qwt-5.2.1/lib/libqwt.5.dylib ...@@ -48,18 +55,22 @@ otool -L /usr/local/qwt-5.2.1/lib/libqwt.5.dylib
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 438.0.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 438.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.1) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.1)
\endcode
//! [3] //! [3]
//! [4] //! [4]
\badcode
sudo cp /Developer/Applications/Qt/plugins/designer/libqwt_designer_plugin.dylib \ sudo cp /Developer/Applications/Qt/plugins/designer/libqwt_designer_plugin.dylib \
/Developer/Applications/Qt/Qt\ Creator.app/Contents/MacOS/designer /Developer/Applications/Qt/Qt\ Creator.app/Contents/MacOS/designer
sudo cp -R /usr/local/qwt-5.2.1/lib/* \ sudo cp -R /usr/local/qwt-5.2.1/lib/* \
/Developer/Applications/Qt/Qt\ Creator.app/Contents/Frameworks/ /Developer/Applications/Qt/Qt\ Creator.app/Contents/Frameworks/
\endcode
//! [4] //! [4]
//! [5] //! [5]
\badcode
cd /Developer/Applications/Qt/Qt\ Creator.app/Contents/MacOS/designer cd /Developer/Applications/Qt/Qt\ Creator.app/Contents/MacOS/designer
sudo install_name_tool -change sudo install_name_tool -change
QtCore.framework/Versions/4/QtCore \ QtCore.framework/Versions/4/QtCore \
...@@ -90,4 +101,6 @@ sudo install_name_tool -change \ ...@@ -90,4 +101,6 @@ sudo install_name_tool -change \
QtGui.framework/Versions/4/QtGui \ QtGui.framework/Versions/4/QtGui \
@executable_path/../Frameworks/libQtGui.4.dylib \ @executable_path/../Frameworks/libQtGui.4.dylib \
libqwt.5.2.1.dylib libqwt.5.2.1.dylib
\endcode
//! [5] //! [5]
...@@ -85,13 +85,13 @@ ...@@ -85,13 +85,13 @@
\li To check the paths used in the Qwt library, enter the following \li To check the paths used in the Qwt library, enter the following
\c otool command: \c otool command:
\snippet doc_src_plugins.qdoc 0 \include doc_src_plugins.qdocinc 0
The output for Qwt 5.2.1 indicates that the plugin uses Qt core The output for Qwt 5.2.1 indicates that the plugin uses Qt core
libraries (QtDesigner, QtScript, QtXml, QtGui and QtCore) and libraries (QtDesigner, QtScript, QtXml, QtGui and QtCore) and
libqwt.5.dylib: libqwt.5.dylib:
\snippet doc_src_plugins.qdoc 1 \include doc_src_plugins.qdocinc 1
\li You must copy the \QD plugin and the Qwt library files to the \li You must copy the \QD plugin and the Qwt library files to the
...@@ -108,21 +108,21 @@ ...@@ -108,21 +108,21 @@
Enter the following commands: Enter the following commands:
\snippet doc_src_plugins.qdoc 4 \include doc_src_plugins.qdocinc 4
\li Enter the following \c otool command to check the libraries that are \li Enter the following \c otool command to check the libraries that are
used by the Qwt library: used by the Qwt library:
\snippet doc_src_plugins.qdoc 2 \include doc_src_plugins.qdocinc 2
The command returns the following output: The command returns the following output:
\snippet doc_src_plugins.qdoc 3 \include doc_src_plugins.qdocinc 3
\li Enter the following \c install_name_tool command to fix the \li Enter the following \c install_name_tool command to fix the
references of the libraries: references of the libraries:
\snippet doc_src_plugins.qdoc 5 \include doc_src_plugins.qdocinc 5
\endlist \endlist
......
...@@ -24,12 +24,12 @@ if [ -d "$5" ]; then ...@@ -24,12 +24,12 @@ if [ -d "$5" ]; then
fi fi
qmlpuppetapp="$1/Contents/MacOS/qmlpuppet" qmlpuppetapp="$1/Contents/MacOS/qmlpuppet"
if [ -d "$qmlpuppetapp" ]; then if [ -f "$qmlpuppetapp" ]; then
qmlpuppetArgument="-executable=$qmlpuppetapp" qmlpuppetArgument="-executable=$qmlpuppetapp"
fi fi
qml2puppetapp="$1/Contents/MacOS/qml2puppet" qml2puppetapp="$1/Contents/MacOS/qml2puppet"
if [ -d "$qml2puppetapp" ]; then if [ -f "$qml2puppetapp" ]; then
qml2puppetArgument="-executable=$qml2puppetapp" qml2puppetArgument="-executable=$qml2puppetapp"
fi fi
......
...@@ -13,6 +13,12 @@ Rectangle { ...@@ -13,6 +13,12 @@ Rectangle {
onStatusBarChanged: { if (statusBar) { statusBar.parent = statusBarArea } } onStatusBarChanged: { if (statusBar) { statusBar.parent = statusBarArea } }
onToolBarChanged: { if (toolBar) { toolBar.parent = toolBarArea } } onToolBarChanged: { if (toolBar) { toolBar.parent = toolBarArea } }
property int maximumWidth: 0
property int minimumWidth: 0
property int maximumHeight: 0
property int minimumHeight: 0
Item { Item {
id: contentArea id: contentArea
anchors.top: toolBarArea.bottom anchors.top: toolBarArea.bottom
......
...@@ -475,33 +475,21 @@ PropertyNameList ObjectNodeInstance::ignoredProperties() const ...@@ -475,33 +475,21 @@ PropertyNameList ObjectNodeInstance::ignoredProperties() const
QVariant ObjectNodeInstance::convertEnumToValue(const QVariant &value, const PropertyName &name) QVariant ObjectNodeInstance::convertEnumToValue(const QVariant &value, const PropertyName &name)
{ {
int idx = object()->metaObject()->indexOfProperty(name); Q_ASSERT(value.canConvert<Enumeration>());
QMetaProperty metaProperty = object()->metaObject()->property(idx); int propertyIndex = object()->metaObject()->indexOfProperty(name);
QMetaProperty metaProperty = object()->metaObject()->property(propertyIndex);
QVariant fixedValue = fixResourcePaths(value);
QVariant adjustedValue;
if (value.canConvert<Enumeration>()) { Enumeration enumeration = value.value<Enumeration>();
Enumeration enumeration = value.value<Enumeration>(); if (metaProperty.isValid() && metaProperty.isEnumType()) {
if (metaProperty.isValid() && metaProperty.isEnumType()) { adjustedValue = metaProperty.enumerator().keyToValue(enumeration.name());
fixedValue = metaProperty.enumerator().keyToValue(enumeration.name()); } else {
} else if (metaProperty.isValid() QQmlExpression expression(context(), object(), enumeration.toString());
&& (QLatin1String(metaProperty.typeName()) == QLatin1String("int"))) { adjustedValue = expression.evaluate();
if (expression.hasError())
//If the target property is an integer handle an enum as binding qDebug() << "Enumeration can not be evaluated:" << object() << name << enumeration;
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 adjustedValue;
return fixedValue;
} }
void ObjectNodeInstance::setPropertyVariant(const PropertyName &name, const QVariant &value) void ObjectNodeInstance::setPropertyVariant(const PropertyName &name, const QVariant &value)
...@@ -514,8 +502,12 @@ void ObjectNodeInstance::setPropertyVariant(const PropertyName &name, const QVar ...@@ -514,8 +502,12 @@ void ObjectNodeInstance::setPropertyVariant(const PropertyName &name, const QVar
if (!property.isValid()) if (!property.isValid())
return; return;
QVariant fixedValue = fixResourcePaths(value); QVariant adjustedValue;
fixedValue = convertEnumToValue(fixedValue, name); if (value.canConvert<Enumeration>())
adjustedValue = convertEnumToValue(value, name);
else
adjustedValue = fixResourcePaths(value);
QVariant oldValue = property.read(); QVariant oldValue = property.read();
if (oldValue.type() == QVariant::Url) { if (oldValue.type() == QVariant::Url) {
...@@ -529,10 +521,10 @@ void ObjectNodeInstance::setPropertyVariant(const PropertyName &name, const QVar ...@@ -529,10 +521,10 @@ void ObjectNodeInstance::setPropertyVariant(const PropertyName &name, const QVar
QQmlPropertyPrivate::setBinding(property, 0, QQmlPropertyPrivate::BypassInterceptor | QQmlPropertyPrivate::DontRemoveBinding); QQmlPropertyPrivate::setBinding(property, 0, QQmlPropertyPrivate::BypassInterceptor | QQmlPropertyPrivate::DontRemoveBinding);
} }
bool isWritten = property.write(convertSpecialCharacter(fixedValue)); bool isWritten = property.write(convertSpecialCharacter(adjustedValue));
if (!isWritten) if (!isWritten)
qDebug() << "ObjectNodeInstance.setPropertyVariant: Cannot be written: " << object() << name << fixedValue; qDebug() << "ObjectNodeInstance.setPropertyVariant: Cannot be written: " << object() << name << adjustedValue;
QVariant newValue = property.read(); QVariant newValue = property.read();
if (newValue.type() == QVariant::Url) { if (newValue.type() == QVariant::Url) {
......
...@@ -57,7 +57,8 @@ ButtonRow { ...@@ -57,7 +57,8 @@ ButtonRow {
onClicked: { onClicked: {
if (checked) { if (checked) {
anchorBackend.verticalCentered = false; if (anchorBackend.bottomAnchored)
anchorBackend.verticalCentered = false;
anchorBackend.topAnchored = true; anchorBackend.topAnchored = true;
} else { } else {
anchorBackend.topAnchored = false; anchorBackend.topAnchored = false;
...@@ -75,7 +76,8 @@ ButtonRow { ...@@ -75,7 +76,8 @@ ButtonRow {
onClicked: { onClicked: {
if (checked) { if (checked) {
anchorBackend.verticalCentered = false; if (anchorBackend.topAnchored)
anchorBackend.verticalCentered = false;
anchorBackend.bottomAnchored = true; anchorBackend.bottomAnchored = true;
} else { } else {
anchorBackend.bottomAnchored = false; anchorBackend.bottomAnchored = false;
...@@ -94,7 +96,8 @@ ButtonRow { ...@@ -94,7 +96,8 @@ ButtonRow {
onClicked: { onClicked: {
if (checked) { if (checked) {
anchorBackend.horizontalCentered = false; if (anchorBackend.rightAnchored)
anchorBackend.horizontalCentered = false;
anchorBackend.leftAnchored = true; anchorBackend.leftAnchored = true;
} else { } else {
anchorBackend.leftAnchored = false; anchorBackend.leftAnchored = false;
...@@ -112,7 +115,8 @@ ButtonRow { ...@@ -112,7 +115,8 @@ ButtonRow {
onClicked: { onClicked: {
if (checked) { if (checked) {
anchorBackend.horizontalCentered = false; if (anchorBackend.leftAnchored)
anchorBackend.horizontalCentered = false;
anchorBackend.rightAnchored = true; anchorBackend.rightAnchored = true;
} else { } else {
anchorBackend.rightAnchored = false; anchorBackend.rightAnchored = false;
...@@ -156,8 +160,10 @@ ButtonRow { ...@@ -156,8 +160,10 @@ ButtonRow {
onClicked: { onClicked: {
if (checked) { if (checked) {
anchorBackend.topAnchored = false; if (anchorBackend.topAnchored && anchorBackend.bottomAnchored) {
anchorBackend.bottomAnchored = false; anchorBackend.topAnchored = false;
anchorBackend.bottomAnchored = false;
}
anchorBackend.verticalCentered = true; anchorBackend.verticalCentered = true;
} else { } else {
anchorBackend.verticalCentered = false; anchorBackend.verticalCentered = false;
...@@ -175,8 +181,10 @@ ButtonRow { ...@@ -175,8 +181,10 @@ ButtonRow {
onClicked: { onClicked: {
if (checked) { if (checked) {
anchorBackend.leftAnchored = false; if (anchorBackend.leftAnchored && anchorBackend.rightAnchored) {
anchorBackend.rightAnchored = false; anchorBackend.leftAnchored = false;
anchorBackend.rightAnchored = false;
}
anchorBackend.horizontalCentered = true; anchorBackend.horizontalCentered = true;
} else { } else {
anchorBackend.horizontalCentered = false; anchorBackend.horizontalCentered = false;
......
...@@ -6,6 +6,7 @@ SpinBox { ...@@ -6,6 +6,7 @@ SpinBox {
maximumValue: 9999999 maximumValue: 9999999
minimumValue: -9999999 minimumValue: -9999999
decimals: 2 decimals: 2
stepSize: 0.1
backendValue: backendValues.%2 backendValue: backendValues.%2
Layout.fillWidth: true Layout.fillWidth: true
Layout.maximumWidth: 100 Layout.maximumWidth: 100
......
...@@ -22,8 +22,9 @@ AutoTypes { ...@@ -22,8 +22,9 @@ AutoTypes {
typeNames: ["bool", "boolean"] typeNames: ["bool", "boolean"]
sourceFile: "BooleanEditorTemplate.template" sourceFile: "BooleanEditorTemplate.template"
} }
Type { Type {
typeNames: ["color", "QColor"] typeNames: ["color", "QColor"]
sourceFile: "ColorEditorTemplate.template" sourceFile: "StringEditorTemplate.template"
} }
} }
...@@ -47,8 +47,8 @@ Column { ...@@ -47,8 +47,8 @@ Column {
SecondColumnLayout { SecondColumnLayout {
SpinBox { SpinBox {
backendValue: backendValues.spacing backendValue: backendValues.spacing
minimumValue: 0 minimumValue: -4000
maximumValue: 2000 maximumValue: 4000
decimals: 0 decimals: 0
} }
......
...@@ -78,8 +78,8 @@ Column { ...@@ -78,8 +78,8 @@ Column {
SecondColumnLayout { SecondColumnLayout {
SpinBox { SpinBox {
backendValue: backendValues.spacing backendValue: backendValues.spacing
minimumValue: 0 minimumValue: -4000
maximumValue: 2000 maximumValue: 4000
decimals: 0 decimals: 0
} }
......
...@@ -109,8 +109,8 @@ Column { ...@@ -109,8 +109,8 @@ Column {
SecondColumnLayout { SecondColumnLayout {
SpinBox { SpinBox {
backendValue: backendValues.spacing backendValue: backendValues.spacing
minimumValue: 0 minimumValue: -4000
maximumValue: 2000 maximumValue: 4000
decimals: 0 decimals: 0
} }
......
...@@ -61,8 +61,8 @@ Column { ...@@ -61,8 +61,8 @@ Column {
SecondColumnLayout { SecondColumnLayout {
SpinBox { SpinBox {
backendValue: backendValues.spacing backendValue: backendValues.spacing
minimumValue: 0 minimumValue: -4000
maximumValue: 2000 maximumValue: 4000
decimals: 0 decimals: 0
} }
......
/* File generated by Qt Creator, version 2.7.0 */ /* File generated by Qt Creator */
import QmlProject 1.1 import QmlProject 1.1
......
/* File generated by Qt Creator, version 2.7.0 */ /* File generated by Qt Creator */
import QmlProject 1.1 import QmlProject 1.1
......
/* File generated by Qt Creator, version 2.7.0 */ /* File generated by Qt Creator */
import QmlProject 1.1 import QmlProject 1.1
......
/* File generated by Qt Creator, version 2.7.0 */ /* File generated by Qt Creator */
import QmlProject 1.1 import QmlProject 1.1
......
/* File generated by Qt Creator, version 2.7.0 */ /* File generated by Qt Creator */
import QmlProject 1.1 import QmlProject 1.1
......
...@@ -525,10 +525,24 @@ public: ...@@ -525,10 +525,24 @@ public:
} }