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

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 @@
\list
\li Select \gui {Qt Quick Controls 1.1} or \gui {Qt Quick 2.2} to
develop for platforms that run Qt 5.
\li Select \gui {Qt Quick Controls} or \gui {Qt Quick 2.1}, or
later, to develop for platforms that run Qt 5.
\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
......
......@@ -17,11 +17,14 @@
****************************************************************************/
//! [0]
\badcode
otool -L /Developer/Applications/Qt/plugins/designer/libqwt_designer_plugin.dylib
\endcode
//! [0]
//! [1]
\badcode
/Developer/Applications/Qt/plugins/designer/libqwt_designer_plugin.dylib:
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)
......@@ -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/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)
\endcode
//! [1]
//! [2]
\badcode
otool -L /usr/local/qwt-5.2.1/lib/libqwt.5.dylib
\endcode
//! [2]
//! [3]
\badcode
/usr/local/qwt-5.2.1/lib/libqwt.5.dylib:
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)
......@@ -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/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)
\endcode
//! [3]
//! [4]
\badcode
sudo cp /Developer/Applications/Qt/plugins/designer/libqwt_designer_plugin.dylib \
/Developer/Applications/Qt/Qt\ Creator.app/Contents/MacOS/designer
sudo cp -R /usr/local/qwt-5.2.1/lib/* \
/Developer/Applications/Qt/Qt\ Creator.app/Contents/Frameworks/
\endcode
//! [4]
//! [5]
\badcode
cd /Developer/Applications/Qt/Qt\ Creator.app/Contents/MacOS/designer
sudo install_name_tool -change
QtCore.framework/Versions/4/QtCore \
......@@ -90,4 +101,6 @@ sudo install_name_tool -change \
QtGui.framework/Versions/4/QtGui \
@executable_path/../Frameworks/libQtGui.4.dylib \
libqwt.5.2.1.dylib
\endcode
//! [5]
......@@ -85,13 +85,13 @@
\li To check the paths used in the Qwt library, enter the following
\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
libraries (QtDesigner, QtScript, QtXml, QtGui and QtCore) and
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
......@@ -108,21 +108,21 @@
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
used by the Qwt library:
\snippet doc_src_plugins.qdoc 2
\include doc_src_plugins.qdocinc 2
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
references of the libraries:
\snippet doc_src_plugins.qdoc 5
\include doc_src_plugins.qdocinc 5
\endlist
......
......@@ -24,12 +24,12 @@ if [ -d "$5" ]; then
fi
qmlpuppetapp="$1/Contents/MacOS/qmlpuppet"
if [ -d "$qmlpuppetapp" ]; then
if [ -f "$qmlpuppetapp" ]; then
qmlpuppetArgument="-executable=$qmlpuppetapp"
fi
qml2puppetapp="$1/Contents/MacOS/qml2puppet"
if [ -d "$qml2puppetapp" ]; then
if [ -f "$qml2puppetapp" ]; then
qml2puppetArgument="-executable=$qml2puppetapp"
fi
......
......@@ -13,6 +13,12 @@ Rectangle {
onStatusBarChanged: { if (statusBar) { statusBar.parent = statusBarArea } }
onToolBarChanged: { if (toolBar) { toolBar.parent = toolBarArea } }
property int maximumWidth: 0
property int minimumWidth: 0
property int maximumHeight: 0
property int minimumHeight: 0
Item {
id: contentArea
anchors.top: toolBarArea.bottom
......
......@@ -475,33 +475,21 @@ PropertyNameList ObjectNodeInstance::ignoredProperties() const
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;
}
Q_ASSERT(value.canConvert<Enumeration>());
int propertyIndex = object()->metaObject()->indexOfProperty(name);
QMetaProperty metaProperty = object()->metaObject()->property(propertyIndex);
QVariant adjustedValue;
Enumeration enumeration = value.value<Enumeration>();
if (metaProperty.isValid() && metaProperty.isEnumType()) {
adjustedValue = metaProperty.enumerator().keyToValue(enumeration.name());
} else {
QQmlExpression expression(context(), object(), enumeration.toString());
adjustedValue = expression.evaluate();
if (expression.hasError())
qDebug() << "Enumeration can not be evaluated:" << object() << name << enumeration;
}
return fixedValue;
return adjustedValue;
}
void ObjectNodeInstance::setPropertyVariant(const PropertyName &name, const QVariant &value)
......@@ -514,8 +502,12 @@ void ObjectNodeInstance::setPropertyVariant(const PropertyName &name, const QVar
if (!property.isValid())
return;
QVariant fixedValue = fixResourcePaths(value);
fixedValue = convertEnumToValue(fixedValue, name);
QVariant adjustedValue;
if (value.canConvert<Enumeration>())
adjustedValue = convertEnumToValue(value, name);
else
adjustedValue = fixResourcePaths(value);
QVariant oldValue = property.read();
if (oldValue.type() == QVariant::Url) {
......@@ -529,10 +521,10 @@ void ObjectNodeInstance::setPropertyVariant(const PropertyName &name, const QVar
QQmlPropertyPrivate::setBinding(property, 0, QQmlPropertyPrivate::BypassInterceptor | QQmlPropertyPrivate::DontRemoveBinding);
}
bool isWritten = property.write(convertSpecialCharacter(fixedValue));
bool isWritten = property.write(convertSpecialCharacter(adjustedValue));
if (!isWritten)
qDebug() << "ObjectNodeInstance.setPropertyVariant: Cannot be written: " << object() << name << fixedValue;
qDebug() << "ObjectNodeInstance.setPropertyVariant: Cannot be written: " << object() << name << adjustedValue;
QVariant newValue = property.read();
if (newValue.type() == QVariant::Url) {
......
......@@ -57,7 +57,8 @@ ButtonRow {
onClicked: {
if (checked) {
anchorBackend.verticalCentered = false;
if (anchorBackend.bottomAnchored)
anchorBackend.verticalCentered = false;
anchorBackend.topAnchored = true;
} else {
anchorBackend.topAnchored = false;
......@@ -75,7 +76,8 @@ ButtonRow {
onClicked: {
if (checked) {
anchorBackend.verticalCentered = false;
if (anchorBackend.topAnchored)
anchorBackend.verticalCentered = false;
anchorBackend.bottomAnchored = true;
} else {
anchorBackend.bottomAnchored = false;
......@@ -94,7 +96,8 @@ ButtonRow {
onClicked: {
if (checked) {
anchorBackend.horizontalCentered = false;
if (anchorBackend.rightAnchored)
anchorBackend.horizontalCentered = false;
anchorBackend.leftAnchored = true;
} else {
anchorBackend.leftAnchored = false;
......@@ -112,7 +115,8 @@ ButtonRow {
onClicked: {
if (checked) {
anchorBackend.horizontalCentered = false;
if (anchorBackend.leftAnchored)
anchorBackend.horizontalCentered = false;
anchorBackend.rightAnchored = true;
} else {
anchorBackend.rightAnchored = false;
......@@ -156,8 +160,10 @@ ButtonRow {
onClicked: {
if (checked) {
anchorBackend.topAnchored = false;
anchorBackend.bottomAnchored = false;
if (anchorBackend.topAnchored && anchorBackend.bottomAnchored) {
anchorBackend.topAnchored = false;
anchorBackend.bottomAnchored = false;
}
anchorBackend.verticalCentered = true;
} else {
anchorBackend.verticalCentered = false;
......@@ -175,8 +181,10 @@ ButtonRow {
onClicked: {
if (checked) {
anchorBackend.leftAnchored = false;
anchorBackend.rightAnchored = false;
if (anchorBackend.leftAnchored && anchorBackend.rightAnchored) {
anchorBackend.leftAnchored = false;
anchorBackend.rightAnchored = false;
}
anchorBackend.horizontalCentered = true;
} else {
anchorBackend.horizontalCentered = false;
......
......@@ -6,6 +6,7 @@ SpinBox {
maximumValue: 9999999
minimumValue: -9999999
decimals: 2
stepSize: 0.1
backendValue: backendValues.%2
Layout.fillWidth: true
Layout.maximumWidth: 100
......
......@@ -22,8 +22,9 @@ AutoTypes {
typeNames: ["bool", "boolean"]
sourceFile: "BooleanEditorTemplate.template"
}
Type {
typeNames: ["color", "QColor"]
sourceFile: "ColorEditorTemplate.template"
sourceFile: "StringEditorTemplate.template"
}
}
......@@ -47,8 +47,8 @@ Column {
SecondColumnLayout {
SpinBox {
backendValue: backendValues.spacing
minimumValue: 0
maximumValue: 2000
minimumValue: -4000
maximumValue: 4000
decimals: 0
}
......
......@@ -78,8 +78,8 @@ Column {
SecondColumnLayout {
SpinBox {
backendValue: backendValues.spacing
minimumValue: 0
maximumValue: 2000
minimumValue: -4000
maximumValue: 4000
decimals: 0
}
......
......@@ -109,8 +109,8 @@ Column {
SecondColumnLayout {
SpinBox {
backendValue: backendValues.spacing
minimumValue: 0
maximumValue: 2000
minimumValue: -4000
maximumValue: 4000
decimals: 0
}
......
......@@ -61,8 +61,8 @@ Column {
SecondColumnLayout {
SpinBox {
backendValue: backendValues.spacing
minimumValue: 0
maximumValue: 2000
minimumValue: -4000
maximumValue: 4000
decimals: 0
}
......
/* File generated by Qt Creator, version 2.7.0 */
/* File generated by Qt Creator */
import QmlProject 1.1
......
/* File generated by Qt Creator, version 2.7.0 */
/* File generated by Qt Creator */
import QmlProject 1.1
......
/* File generated by Qt Creator, version 2.7.0 */
/* File generated by Qt Creator */
import QmlProject 1.1
......
/* File generated by Qt Creator, version 2.7.0 */
/* File generated by Qt Creator */
import QmlProject 1.1
......
/* File generated by Qt Creator, version 2.7.0 */
/* File generated by Qt Creator */
import QmlProject 1.1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment