From f937d985e9599c16e72b504c404bc8232787c98e Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 30 Jul 2010 09:10:47 +0200 Subject: Fixed additional case differences between Gnupoc and Symbian^3. RevBy: Trust me --- mkspecs/common/symbian/header-wrappers/AknBitmapAnimation.h | 1 + mkspecs/common/symbian/header-wrappers/AknFontAccess.h | 1 + mkspecs/common/symbian/header-wrappers/AknInputLanguageInfo.h | 1 + mkspecs/common/symbian/header-wrappers/ApAccessPointItem.h | 1 + mkspecs/common/symbian/header-wrappers/ApDataHandler.h | 1 + mkspecs/common/symbian/header-wrappers/ApUtils.h | 1 + mkspecs/common/symbian/symbian-makefile.conf | 7 ++++++- src/gui/inputmethod/qinputcontextfactory.cpp | 2 +- src/gui/s60framework/qs60maindocument.h | 2 +- src/gui/styles/qs60style_s60.cpp | 6 +++--- src/plugins/bearer/symbian/3_1/3_1.pro | 6 +++++- src/plugins/bearer/symbian/symbian.pri | 10 ++++++++-- src/plugins/bearer/symbian/symbian_3/symbian_3.pro | 6 +++++- src/plugins/bearer/symbian/symbianengine.cpp | 6 +++--- 14 files changed, 38 insertions(+), 13 deletions(-) create mode 100644 mkspecs/common/symbian/header-wrappers/AknBitmapAnimation.h create mode 100644 mkspecs/common/symbian/header-wrappers/AknFontAccess.h create mode 100644 mkspecs/common/symbian/header-wrappers/AknInputLanguageInfo.h create mode 100644 mkspecs/common/symbian/header-wrappers/ApAccessPointItem.h create mode 100644 mkspecs/common/symbian/header-wrappers/ApDataHandler.h create mode 100644 mkspecs/common/symbian/header-wrappers/ApUtils.h diff --git a/mkspecs/common/symbian/header-wrappers/AknBitmapAnimation.h b/mkspecs/common/symbian/header-wrappers/AknBitmapAnimation.h new file mode 100644 index 0000000..d53605e --- /dev/null +++ b/mkspecs/common/symbian/header-wrappers/AknBitmapAnimation.h @@ -0,0 +1 @@ +#include diff --git a/mkspecs/common/symbian/header-wrappers/AknFontAccess.h b/mkspecs/common/symbian/header-wrappers/AknFontAccess.h new file mode 100644 index 0000000..e33baaf --- /dev/null +++ b/mkspecs/common/symbian/header-wrappers/AknFontAccess.h @@ -0,0 +1 @@ +#include diff --git a/mkspecs/common/symbian/header-wrappers/AknInputLanguageInfo.h b/mkspecs/common/symbian/header-wrappers/AknInputLanguageInfo.h new file mode 100644 index 0000000..5f993d7 --- /dev/null +++ b/mkspecs/common/symbian/header-wrappers/AknInputLanguageInfo.h @@ -0,0 +1 @@ +#include diff --git a/mkspecs/common/symbian/header-wrappers/ApAccessPointItem.h b/mkspecs/common/symbian/header-wrappers/ApAccessPointItem.h new file mode 100644 index 0000000..75b6c69 --- /dev/null +++ b/mkspecs/common/symbian/header-wrappers/ApAccessPointItem.h @@ -0,0 +1 @@ +#include diff --git a/mkspecs/common/symbian/header-wrappers/ApDataHandler.h b/mkspecs/common/symbian/header-wrappers/ApDataHandler.h new file mode 100644 index 0000000..b7b972d --- /dev/null +++ b/mkspecs/common/symbian/header-wrappers/ApDataHandler.h @@ -0,0 +1 @@ +#include diff --git a/mkspecs/common/symbian/header-wrappers/ApUtils.h b/mkspecs/common/symbian/header-wrappers/ApUtils.h new file mode 100644 index 0000000..09cedce --- /dev/null +++ b/mkspecs/common/symbian/header-wrappers/ApUtils.h @@ -0,0 +1 @@ +#include diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf index b1ca367..364e91b 100644 --- a/mkspecs/common/symbian/symbian-makefile.conf +++ b/mkspecs/common/symbian/symbian-makefile.conf @@ -29,7 +29,12 @@ QMAKE_PREFIX_STATICLIB = QMAKE_EXTENSION_STATICLIB = lib QMAKE_SYMBIAN_SHLIB = 1 -DEFINES *= __PRODUCT_INCLUDE__=\\<$${EPOCROOT}epoc32/include/variant/symbian_os.hrh\\> \ +is_using_gnupoc { + DEFINES *= __PRODUCT_INCLUDE__=\\<$${EPOCROOT}epoc32/include/variant/symbian_os.hrh\\> +} else { + DEFINES *= __PRODUCT_INCLUDE__=\\<$${EPOCROOT}epoc32/include/variant/Symbian_OS.hrh\\> +} +DEFINES *= \ __SYMBIAN32__ \ __MARM_INTERWORK__ \ _UNICODE \ diff --git a/src/gui/inputmethod/qinputcontextfactory.cpp b/src/gui/inputmethod/qinputcontextfactory.cpp index ec8d8e2..865c1b2 100644 --- a/src/gui/inputmethod/qinputcontextfactory.cpp +++ b/src/gui/inputmethod/qinputcontextfactory.cpp @@ -73,7 +73,7 @@ #endif #ifdef Q_WS_S60 #include "qcoefepinputcontext_p.h" -#include "akninputlanguageinfo.h" +#include "AknInputLanguageInfo.h" #endif #include "private/qfactoryloader_p.h" diff --git a/src/gui/s60framework/qs60maindocument.h b/src/gui/s60framework/qs60maindocument.h index 2f0564f..fc32d8b 100644 --- a/src/gui/s60framework/qs60maindocument.h +++ b/src/gui/s60framework/qs60maindocument.h @@ -47,7 +47,7 @@ #ifdef Q_OS_SYMBIAN #ifdef Q_WS_S60 -#include +#include typedef CAknDocument QS60MainDocumentBase; #else #include diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index 2527662..f44b85e 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -58,12 +58,12 @@ #include #include #include -#include -#include +#include +#include #include #include #include -#include +#include #if !defined(QT_NO_STYLE_S60) || defined(QT_PLUGIN) diff --git a/src/plugins/bearer/symbian/3_1/3_1.pro b/src/plugins/bearer/symbian/3_1/3_1.pro index 2d721a8..b7c6aef 100644 --- a/src/plugins/bearer/symbian/3_1/3_1.pro +++ b/src/plugins/bearer/symbian/3_1/3_1.pro @@ -1,5 +1,9 @@ include(../symbian.pri) -LIBS += -lapengine +is_using_gnupoc { + LIBS += -lapengine +} else { + LIBS += -lAPEngine +} TARGET = $${TARGET}_3_1 TARGET.UID3 = 0x2002131C diff --git a/src/plugins/bearer/symbian/symbian.pri b/src/plugins/bearer/symbian/symbian.pri index afe84dc..9b3f50c 100644 --- a/src/plugins/bearer/symbian/symbian.pri +++ b/src/plugins/bearer/symbian/symbian.pri @@ -14,8 +14,6 @@ INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE symbian-abld:INCLUDEPATH += $$QT_BUILD_TREE/include/QtNetwork/private LIBS += -lcommdb \ - -lapsettingshandlerui \ - -lconnmon \ -lcentralrepository \ -lesock \ -linsock \ @@ -23,6 +21,14 @@ LIBS += -lcommdb \ -lefsrv \ -lnetmeta +is_using_gnupoc { + LIBS += -lconnmon \ + -lapsettingshandlerui +} else { + LIBS += -lConnMon \ + -lApSettingsHandlerUI +} + QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/bearer target.path += $$[QT_INSTALL_PLUGINS]/bearer INSTALLS += target diff --git a/src/plugins/bearer/symbian/symbian_3/symbian_3.pro b/src/plugins/bearer/symbian/symbian_3/symbian_3.pro index ff0f11c..fd66198 100644 --- a/src/plugins/bearer/symbian/symbian_3/symbian_3.pro +++ b/src/plugins/bearer/symbian/symbian_3/symbian_3.pro @@ -12,7 +12,11 @@ symbian { } } else { # Fall back to 3_1 implementation on platforms that do not have cmmanager - LIBS += -lapengine + is_using_gnupoc { + LIBS += -lapengine + } else { + LIBS += -lAPEngine + } } } diff --git a/src/plugins/bearer/symbian/symbianengine.cpp b/src/plugins/bearer/symbian/symbianengine.cpp index 4bd6d2f..a7e2936 100644 --- a/src/plugins/bearer/symbian/symbianengine.cpp +++ b/src/plugins/bearer/symbian/symbianengine.cpp @@ -63,9 +63,9 @@ #include #include #else - #include - #include - #include + #include + #include + #include #endif #ifndef QT_NO_BEARERMANAGEMENT -- cgit v0.12 From b7702b2dcbc36f81759dea0ad74fb19e97b2358f Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Tue, 3 Aug 2010 15:31:58 +1000 Subject: Ensure dataChanged doesn't force request for unwanted data in QML views. If a model emits dataChanged() every role was be updated, rather than just the roles required. Now only roles which have been used are updated. Task-number: QTBUG-12598 Reviewed-by: Michael Brasser --- .../graphicsitems/qdeclarativevisualitemmodel.cpp | 15 ++++++++++----- src/declarative/util/qdeclarativeopenmetaobject.cpp | 12 ++++++++++++ src/declarative/util/qdeclarativeopenmetaobject_p.h | 1 + 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index 79c1c43..ceb1961 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -444,6 +444,9 @@ public: int propForRole(int) const; void setValue(int, const QVariant &); + bool hasValue(int id) const { + return m_meta->hasValue(id); + } void ensureProperties(); @@ -1216,11 +1219,13 @@ void QDeclarativeVisualDataModel::_q_itemsChanged(int index, int count, int role = roles.at(roleIdx); int propId = data->propForRole(role); if (propId != -1) { - if (d->m_listModelInterface) { - data->setValue(propId, d->m_listModelInterface->data(idx, QList() << role).value(role)); - } else if (d->m_abstractItemModel) { - QModelIndex index = d->m_abstractItemModel->index(idx, 0, d->m_root); - data->setValue(propId, d->m_abstractItemModel->data(index, role)); + if (data->hasValue(propId)) { + if (d->m_listModelInterface) { + data->setValue(propId, d->m_listModelInterface->data(idx, QList() << role).value(role)); + } else if (d->m_abstractItemModel) { + QModelIndex index = d->m_abstractItemModel->index(idx, 0, d->m_root); + data->setValue(propId, d->m_abstractItemModel->data(index, role)); + } } } else { QString roleName; diff --git a/src/declarative/util/qdeclarativeopenmetaobject.cpp b/src/declarative/util/qdeclarativeopenmetaobject.cpp index ba5d534..40485bd 100644 --- a/src/declarative/util/qdeclarativeopenmetaobject.cpp +++ b/src/declarative/util/qdeclarativeopenmetaobject.cpp @@ -161,6 +161,12 @@ public: prop.second = true; } + inline bool hasData(int idx) const { + if (idx >= data.count()) + return false; + return data[idx].second; + } + bool autoCreate; QDeclarativeOpenMetaObject *q; QAbstractDynamicMetaObject *parent; @@ -295,6 +301,12 @@ void QDeclarativeOpenMetaObject::setValue(const QByteArray &name, const QVariant activate(d->object, id + d->type->d->signalOffset, 0); } +// returns true if this value has been initialized by a call to either value() or setValue() +bool QDeclarativeOpenMetaObject::hasValue(int id) const +{ + return d->hasData(id); +} + void QDeclarativeOpenMetaObject::setCached(bool c) { if (c == d->cacheProperties || !d->type->d->engine) diff --git a/src/declarative/util/qdeclarativeopenmetaobject_p.h b/src/declarative/util/qdeclarativeopenmetaobject_p.h index 9bb4c34..c18fa3d 100644 --- a/src/declarative/util/qdeclarativeopenmetaobject_p.h +++ b/src/declarative/util/qdeclarativeopenmetaobject_p.h @@ -91,6 +91,7 @@ public: void setValue(int, const QVariant &); QVariant &operator[](const QByteArray &); QVariant &operator[](int); + bool hasValue(int) const; int count() const; QByteArray name(int) const; -- cgit v0.12 From a0b531163a79c9097185b580fdf4aa8157cead41 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Tue, 3 Aug 2010 15:43:48 +1000 Subject: Fix Flickable.StopAtBounds behavior when content size < flickable size Clip the content position to the beginning rather than the end, if both apply. Task-number: QTBUG-12573 Reviewed-by: Michael Brasser --- .../graphicsitems/qdeclarativeflickable.cpp | 26 +++++++++++++--------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index 998b33a..19cabdd 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -681,12 +681,15 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent if (newY < maxY && maxY - minY <= 0) newY = maxY + (newY - maxY) / 2; if (boundsBehavior == QDeclarativeFlickable::StopAtBounds && (newY > minY || newY < maxY)) { - if (newY > minY) - newY = minY; - else if (newY < maxY) + rejectY = true; + if (newY < maxY) { newY = maxY; - else - rejectY = true; + rejectY = false; + } + if (newY > minY) { + newY = minY; + rejectY = false; + } } if (!rejectY && stealMouse) { vData.move.setValue(qRound(newY)); @@ -708,12 +711,15 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent if (newX < maxX && maxX - minX <= 0) newX = maxX + (newX - maxX) / 2; if (boundsBehavior == QDeclarativeFlickable::StopAtBounds && (newX > minX || newX < maxX)) { - if (newX > minX) - newX = minX; - else if (newX < maxX) + rejectX = true; + if (newX < maxX) { newX = maxX; - else - rejectX = true; + rejectX = false; + } + if (newX > minX) { + newX = minX; + rejectX = false; + } } if (!rejectX && stealMouse) { hData.move.setValue(qRound(newX)); -- cgit v0.12 From b5c6f77bf0a84e7411d64d6f486ffcbd79ad9494 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Tue, 3 Aug 2010 16:30:53 +1000 Subject: Fix photo positioning bug in flickr demo. Task-number: QTBUG-3669 --- demos/declarative/flickr/flickr.qml | 22 ++-- demos/declarative/flickr/mobile/GridDelegate.qml | 130 +++++++++++------------ demos/declarative/flickr/mobile/ImageDetails.qml | 22 ++-- 3 files changed, 87 insertions(+), 87 deletions(-) diff --git a/demos/declarative/flickr/flickr.qml b/demos/declarative/flickr/flickr.qml index 48db476..152f9f9 100644 --- a/demos/declarative/flickr/flickr.qml +++ b/demos/declarative/flickr/flickr.qml @@ -57,21 +57,20 @@ Item { Item { id: views - x: 2; width: parent.width - 4 + width: parent.width anchors.top: titleBar.bottom; anchors.bottom: toolBar.top - Mobile.GridDelegate { id: gridDelegate } GridView { - x: (width/4-79)/2; y: x - id: photoGridView; model: rssModel; delegate: gridDelegate; cacheBuffer: 100 - cellWidth: (parent.width-2)/4; cellHeight: cellWidth; width: parent.width; height: parent.height - 1; z: 6 + id: photoGridView; model: rssModel; delegate: Mobile.GridDelegate {} + cacheBuffer: 100 + cellWidth: (parent.width-2)/4; cellHeight: cellWidth; width: parent.width; height: parent.height } - Mobile.ListDelegate { id: listDelegate } ListView { - id: photoListView; model: rssModel; delegate: listDelegate; z: 6 + id: photoListView; model: rssModel; delegate: Mobile.ListDelegate { } width: parent.width; height: parent.height; x: -(parent.width * 1.5); cacheBuffer: 100; } + states: State { name: "ListView"; when: screen.inListView == true PropertyChanges { target: photoListView; x: 0 } @@ -81,13 +80,16 @@ Item { transitions: Transition { NumberAnimation { properties: "x"; duration: 500; easing.type: Easing.InOutQuad } } + + Mobile.ImageDetails { id: imageDetails; width: parent.width; anchors.left: views.right; height: parent.height } + + Item { id: foreground; anchors.fill: parent } } - Mobile.ImageDetails { id: imageDetails; width: parent.width; anchors.left: views.right; height: parent.height; z:1 } - Mobile.TitleBar { id: titleBar; z: 5; width: parent.width; height: 40; opacity: 0.9 } + Mobile.TitleBar { id: titleBar; width: parent.width; height: 40; opacity: 0.9 } Mobile.ToolBar { - id: toolBar; z: 5 + id: toolBar height: 40; anchors.bottom: parent.bottom; width: parent.width; opacity: 0.9 button1Label: "Update"; button2Label: "View mode" onButton1Clicked: rssModel.reload() diff --git a/demos/declarative/flickr/mobile/GridDelegate.qml b/demos/declarative/flickr/mobile/GridDelegate.qml index cbb00a2..c368e95 100644 --- a/demos/declarative/flickr/mobile/GridDelegate.qml +++ b/demos/declarative/flickr/mobile/GridDelegate.qml @@ -39,75 +39,73 @@ ** ****************************************************************************/ - import Qt 4.7 +import Qt 4.7 - Component { - id: photoDelegate - Item { - id: wrapper; width: 79; height: 79 +Item { + id: wrapper; width: GridView.view.cellWidth; height: GridView.view.cellHeight - function photoClicked() { - imageDetails.photoTitle = title; - imageDetails.photoTags = tags; - imageDetails.photoWidth = photoWidth; - imageDetails.photoHeight = photoHeight; - imageDetails.photoType = photoType; - imageDetails.photoAuthor = photoAuthor; - imageDetails.photoDate = photoDate; - imageDetails.photoUrl = url; - imageDetails.rating = 0; - scaleMe.state = "Details"; - } + function photoClicked() { + imageDetails.photoTitle = title; + imageDetails.photoTags = tags; + imageDetails.photoWidth = photoWidth; + imageDetails.photoHeight = photoHeight; + imageDetails.photoType = photoType; + imageDetails.photoAuthor = photoAuthor; + imageDetails.photoDate = photoDate; + imageDetails.photoUrl = url; + imageDetails.rating = 0; + scaleMe.state = "Details"; + } - Item { - anchors.centerIn: parent - scale: 0.0 - Behavior on scale { NumberAnimation { easing.type: Easing.InOutQuad} } - id: scaleMe + Item { + anchors.centerIn: parent + scale: 0.0 + Behavior on scale { NumberAnimation { easing.type: Easing.InOutQuad} } + id: scaleMe - Rectangle { height: 79; width: 79; id: blackRect; anchors.centerIn: parent; color: "black"; smooth: true } - Rectangle { - id: whiteRect; width: 77; height: 77; anchors.centerIn: parent; color: "#dddddd"; smooth: true - Image { id: thumb; source: imagePath; x: 1; y: 1; smooth: true} - Image { source: "images/gloss.png" } - } + Item { + width: 77; height: 77; anchors.centerIn: parent + Rectangle { + id: whiteRect; width: 77; height: 77; color: "#dddddd"; smooth: true + Image { id: thumb; source: imagePath; x: 1; y: 1; smooth: true } + Image { source: "images/gloss.png" } + } + } - Connections { - target: toolBar - onButton2Clicked: if (scaleMe.state == 'Details' ) scaleMe.state = 'Show' - } + Connections { + target: toolBar + onButton2Clicked: if (scaleMe.state == 'Details' ) scaleMe.state = 'Show' + } + + states: [ + State { + name: "Show"; when: thumb.status == Image.Ready + PropertyChanges { target: scaleMe; scale: 1 } + }, + State { + name: "Details" + PropertyChanges { target: scaleMe; scale: 1 } + ParentChange { target: whiteRect; x: 10; y: 20; parent: imageDetails.frontContainer } + PropertyChanges { target: background; state: "DetailedView" } + } + ] + transitions: [ + Transition { + from: "Show"; to: "Details" + ParentAnimation { + via: foreground + NumberAnimation { properties: "x,y"; duration: 500; easing.type: Easing.InOutQuad } + } + }, + Transition { + from: "Details"; to: "Show" + ParentAnimation { + via: foreground + NumberAnimation { properties: "x,y"; duration: 500; easing.type: Easing.InOutQuad } + } + } + ] + } + MouseArea { anchors.fill: wrapper; onClicked: photoClicked() } +} - states: [ - State { - name: "Show"; when: thumb.status == Image.Ready - PropertyChanges { target: scaleMe; scale: 1 } - }, - State { - name: "Details" - PropertyChanges { target: scaleMe; scale: 1 } - ParentChange { target: wrapper; parent: imageDetails.frontContainer } - PropertyChanges { target: wrapper; x: 20; y: 60; z: 1000 } - PropertyChanges { target: background; state: "DetailedView" } - } - ] - transitions: [ - Transition { - from: "Show"; to: "Details" - ParentAnimation { - NumberAnimation { properties: "x,y"; duration: 500; easing.type: Easing.InOutQuad } - } - }, - Transition { - from: "Details"; to: "Show" - SequentialAnimation { - ParentAnimation { - NumberAnimation { properties: "x,y"; duration: 500; easing.type: Easing.InOutQuad } - } - PropertyAction { targets: wrapper; properties: "z" } - } - } - ] - } - MouseArea { anchors.fill: wrapper; onClicked: { photoClicked() } } - } - } diff --git a/demos/declarative/flickr/mobile/ImageDetails.qml b/demos/declarative/flickr/mobile/ImageDetails.qml index b1a7359..ff902ce 100644 --- a/demos/declarative/flickr/mobile/ImageDetails.qml +++ b/demos/declarative/flickr/mobile/ImageDetails.qml @@ -45,7 +45,7 @@ import "../common" as Common Flipable { id: container - property variant frontContainer: containerFront + property alias frontContainer: containerFront property string photoTitle: "" property string photoTags: "" property int photoWidth @@ -76,17 +76,17 @@ Flipable { Column { spacing: 10 anchors { - left: parent.left; leftMargin: 20 - right: parent.right; rightMargin: 20 - top: parent.top; topMargin: 180 + left: parent.left; leftMargin: 10 + right: parent.right; rightMargin: 10 + top: parent.top; topMargin: 120 } - Text { font.bold: true; color: "white"; elide: Text.ElideRight; text: container.photoTitle } - Text { color: "white"; elide: Text.ElideRight; text: "Size: " + container.photoWidth + 'x' + container.photoHeight } - Text { color: "white"; elide: Text.ElideRight; text: "Type: " + container.photoType } - Text { color: "white"; elide: Text.ElideRight; text: "Author: " + container.photoAuthor } - Text { color: "white"; elide: Text.ElideRight; text: "Published: " + container.photoDate } - Text { color: "white"; elide: Text.ElideRight; text: container.photoTags == "" ? "" : "Tags: " } - Text { color: "white"; elide: Text.ElideRight; text: container.photoTags } + Text { font.bold: true; color: "white"; elide: Text.ElideRight; text: container.photoTitle; width: parent.width } + Text { color: "white"; elide: Text.ElideRight; text: "Size: " + container.photoWidth + 'x' + container.photoHeight; width: parent.width } + Text { color: "white"; elide: Text.ElideRight; text: "Type: " + container.photoType; width: parent.width } + Text { color: "white"; elide: Text.ElideRight; text: "Author: " + container.photoAuthor; width: parent.width } + Text { color: "white"; elide: Text.ElideRight; text: "Published: " + container.photoDate; width: parent.width } + Text { color: "white"; elide: Text.ElideRight; text: container.photoTags == "" ? "" : "Tags: "; width: parent.width } + Text { color: "white"; elide: Text.ElideRight; text: container.photoTags; width: parent.width } } } -- cgit v0.12 From ee9d985f1a3d7071a83fc025c8b8d163effffbc0 Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 30 Jul 2010 09:12:03 +0200 Subject: Prevented makefile build system from using platform provided paths. Platform paths provided by Symbian do not provide the full path to headers. Ideally they should be used, by looking for and replacing /epoc32 with the correct path. However, for now this is a good enough solution. RevBy: Miikka Heikkinen --- mkspecs/features/symbian/platform_paths.prf | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mkspecs/features/symbian/platform_paths.prf b/mkspecs/features/symbian/platform_paths.prf index 5c190c8..f19898f 100644 --- a/mkspecs/features/symbian/platform_paths.prf +++ b/mkspecs/features/symbian/platform_paths.prf @@ -65,8 +65,11 @@ symbian-abld|symbian-sbsv2 { epocroot_prefix = $${EPOCROOT} } -exists($${EPOCROOT}epoc32/include/platform_paths.prf) { - +symbian-abld|symbian-sbsv2:exists($${EPOCROOT}epoc32/include/platform_paths.prf) { + + # Symbian does not provide correct profiles for non-mmp based systems, so + # we only should get in here with abld and sbsv2. + # Load platform specific paths load($${EPOCROOT}epoc32/include/platform_paths.prf) -- cgit v0.12 From 6e449acfb98b31fbbdd44830af61376db45fdd8c Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 30 Jul 2010 09:22:17 +0200 Subject: Included libstdcppv5 support for the makefile build system. RevBy: Miikka Heikkinen --- mkspecs/features/symbian/stl.prf | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/mkspecs/features/symbian/stl.prf b/mkspecs/features/symbian/stl.prf index 3091fce..2a3bce4 100644 --- a/mkspecs/features/symbian/stl.prf +++ b/mkspecs/features/symbian/stl.prf @@ -15,18 +15,24 @@ INCLUDEPATH += $$OS_LAYER_STDCPP_SYSTEMINCLUDE INCLUDEPATH -= $$[QT_INSTALL_PREFIX]/mkspecs/common/symbian/stl-off # libstdcppv5 is preferred over libstdcpp as it has/uses the throwing version of operator new -STL_LIB = -llibstdcppv5.dll - # STDCPP turns on standard C++ new behaviour (ie. throwing new) -STL_MMP_RULE = "STDCPP" +use_libstdcppv5 = true # Fall back to old implementation if that is the only one that is found exists($${EPOCROOT}epoc32/release/armv5/lib/libstdcpp.dso)|exists($${EPOCROOT}epoc32/release/winscw/udeb/libstdcpp.dll) { !exists($${EPOCROOT}epoc32/release/armv5/lib/libstdcppv5.dso):!exists($${EPOCROOT}epoc32/release/winscw/udeb/libstdcppv5.dll) { - STL_LIB = -llibstdcpp.dll - STL_MMP_RULE = + use_libstdcppv5 = false } } -LIBS *= $$STL_LIB -MMP_RULES *= $$STL_MMP_RULE +equals(use_libstdcppv5, true) { + LIBS *= -llibstdcppv5.dll + symbian-abld|symbian-sbsv2 { + MMP_RULES *= "STDCPP" + } else { + DEFINES *= __SYMBIAN_STDCPP_SUPPORT__ + LIBS *= -lstdnew.dll + } +} else { + LIBS *= -llibstdcpp.dll +} -- cgit v0.12 From 737552b90fce50cd3a3eb6ab44be373d2aacf371 Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 30 Jul 2010 09:24:17 +0200 Subject: Fixed rvct.h header inclusion on Symbian^3. RevBy: Trust me --- mkspecs/symbian/linux-armcc/qmake.conf | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf index f8072e3..f058421 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -31,7 +31,7 @@ QMAKE_QtWebKit_CXXFLAGS = --arm # Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000. QMAKE_QtWebKit_LFLAGS = --rw-base 0xE00000 -QMAKE_CFLAGS += --dllimport_runtime --preinclude rvct2_2.h --diag_suppress 186,611,654,1300 --thumb --fpu softvfp --cpu 5T --enum_is_int -Ono_known_library --fpmode ieee_no_fenv --no_vfe --apcs /inter +QMAKE_CFLAGS += --dllimport_runtime --diag_suppress 186,611,654,1300 --thumb --fpu softvfp --cpu 5T --enum_is_int -Ono_known_library --fpmode ieee_no_fenv --no_vfe --apcs /inter QMAKE_CXXFLAGS += $$QMAKE_CFLAGS QMAKE_LFLAGS += --symver_soname --diag_suppress 6331,6780 --bpabi --reloc --datacompressor=off --split --dll --no_scanlib QMAKE_LFLAGS_APP += --entry _E32Startup @@ -47,7 +47,16 @@ QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/lib QMAKE_LIBDIR *= $$(RVCT22LIB) INCLUDEPATH = $${EPOCROOT}epoc32/include \ - $${EPOCROOT}epoc32/include/rvct2_2 \ $${EPOCROOT}epoc32/include/variant \ $${EPOCROOT}epoc32/include/stdapis \ $$INCLUDEPATH + +exists($${EPOCROOT}epoc32/include/rvct2_2) { + INCLUDEPATH += $${EPOCROOT}epoc32/include/rvct2_2 + QMAKE_CFLAGS += --preinclude rvct2_2.h + QMAKE_CXXFLAGS += --preinclude rvct2_2.h +} else { + INCLUDEPATH += $${EPOCROOT}epoc32/include/rvct + QMAKE_CFLAGS += --preinclude rvct.h + QMAKE_CXXFLAGS += --preinclude rvct.h +} -- cgit v0.12 From 053e703fda93dcb31bfda8b4ea90631191a77f84 Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 30 Jul 2010 09:24:56 +0200 Subject: Fixed circular dependency warning. RevBy: Trust me --- src/src.pro | 1 + 1 file changed, 1 insertion(+) diff --git a/src/src.pro b/src/src.pro index 9704716..f856a0c 100644 --- a/src/src.pro +++ b/src/src.pro @@ -112,6 +112,7 @@ src_webkit_declarative.target = sub-webkitdeclarative src_declarative.depends = src_gui src_script src_network src_plugins.depends = src_gui src_sql src_svg src_multimedia src_s60installs.depends = $$TOOLS_SUBDIRS $$SRC_SUBDIRS + src_s60installs.depends -= src_s60installs src_imports.depends = src_gui src_declarative contains(QT_CONFIG, webkit) { src_webkit.depends = src_gui src_sql src_network -- cgit v0.12 From 4e5622a850783264ecb6cb9f944bccc49cc73b86 Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 30 Jul 2010 11:48:24 +0200 Subject: Moved the S60 version detection to the common symbian profile. RevBy: Trust me --- mkspecs/common/symbian/symbian-mmp.conf | 19 +------------------ mkspecs/common/symbian/symbian.conf | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/mkspecs/common/symbian/symbian-mmp.conf b/mkspecs/common/symbian/symbian-mmp.conf index 5a7b2d2..4230ad7 100644 --- a/mkspecs/common/symbian/symbian-mmp.conf +++ b/mkspecs/common/symbian/symbian-mmp.conf @@ -38,24 +38,7 @@ INCLUDEPATH = \ # RVCT seems to do this automatically, but WINSCW compiler does not, so add it here. MMP_RULES += "USERINCLUDE ." -exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.2.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.2.sis) { - S60_VERSION = 5.2 symbian3 -} else { - exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.1.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.1.sis) { - S60_VERSION = 5.1 symbian2 - } else { - exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.0.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.0.sis) { - S60_VERSION = 5.0 - } else { - exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v3.2.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v3.2.sis) { - S60_VERSION = 3.2 - } else { - S60_VERSION = 3.1 - MMP_RULES -= PAGED BYTEPAIRCOMPRESSTARGET - } - } - } -} +contains(S60_VERSION, 3.1):MMP_RULES -= PAGED BYTEPAIRCOMPRESSTARGET QMAKE_CXXFLAGS_FAST_VFP.ARMCC = --fpmode fast # [TODO] QMAKE_CXXFLAGS_FAST_VFP.GCCE = diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index 7ec5c6c..161cfe9 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -119,6 +119,24 @@ QT_IMPORTS_BASE_DIR = /resource/qt/imports load(qt_config) load(symbian/platform_paths) +exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.2.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.2.sis) { + S60_VERSION = 5.2 symbian3 +} else { + exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.1.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.1.sis) { + S60_VERSION = 5.1 symbian2 + } else { + exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.0.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.0.sis) { + S60_VERSION = 5.0 + } else { + exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v3.2.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v3.2.sis) { + S60_VERSION = 3.2 + } else { + S60_VERSION = 3.1 + } + } + } +} + # pkg_depends_webkit, pkg_depends_core, and pkg_platform_dependencies can be removed by developer # if multiple languages need to be supported by pkg file. In that case the developer should declare # multiple language compatible dependency statements him/herself. -- cgit v0.12 From ca3c76a567602533ccdd2f7700ec915f675e6bef Mon Sep 17 00:00:00 2001 From: axis Date: Mon, 2 Aug 2010 16:30:32 +0200 Subject: Added SYMBIAN_VERSION variable to qmake. In addition, made Symbian^3 detection depend on libstdcppv5, which seems like the only option in the public Symbian^3 PDK. RevBy: Miikka Heikkinen --- doc/src/development/qmake-manual.qdoc | 7 +++++++ mkspecs/common/symbian/symbian.conf | 20 +++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc index 0fdeff8..baa30fc 100644 --- a/doc/src/development/qmake-manual.qdoc +++ b/doc/src/development/qmake-manual.qdoc @@ -3015,6 +3015,13 @@ For example: \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 150 + \target SYMBIAN_VERSION + \section1 SYMBIAN_VERSION + + \e {This is only used on the Symbian platform.} + + Contains the version number of the underlying Symbian SDK; e.g. "9.2" or "Symbian3". + \target TARGET \section1 TARGET diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index 161cfe9..6d96b01 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -119,11 +119,13 @@ QT_IMPORTS_BASE_DIR = /resource/qt/imports load(qt_config) load(symbian/platform_paths) -exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.2.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.2.sis) { - S60_VERSION = 5.2 symbian3 +# The Symbian^3 PDK does not necessarily contain the required sis files. +# However, libstdcppv5 first appeared in Symbian^3 (S60 5.2), so check for that too. +exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.2.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.2.sis)|exists($${EPOCROOT}epoc32/release/armv5/lib/libstdcppv5.dso) { + S60_VERSION = 5.2 } else { exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.1.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.1.sis) { - S60_VERSION = 5.1 symbian2 + S60_VERSION = 5.1 } else { exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.0.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.0.sis) { S60_VERSION = 5.0 @@ -137,6 +139,18 @@ exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.2.sis) } } +contains(S60_VERSION, "3\\.1") { + SYMBIAN_VERSION = 9.2 +} else:contains(S60_VERSION, "3\\.2") { + SYMBIAN_VERSION = 9.3 +} else:contains(S60_VERSION, "5\\.0") { + SYMBIAN_VERSION = 9.4 +} else:contains(S60_VERSION, "5\\.1") { + SYMBIAN_VERSION = Symbian2 +} else:contains(S60_VERSION, "5\\.2") { + SYMBIAN_VERSION = Symbian3 +} + # pkg_depends_webkit, pkg_depends_core, and pkg_platform_dependencies can be removed by developer # if multiple languages need to be supported by pkg file. In that case the developer should declare # multiple language compatible dependency statements him/herself. -- cgit v0.12 From d18e3ec7e4e63e2612af18796dd6a3171df6fdca Mon Sep 17 00:00:00 2001 From: axis Date: Mon, 2 Aug 2010 16:20:57 +0200 Subject: Switched from using hardlinks to copies in Symbian building. The problem with hardlinks is that things start to behave funny when you build several times, because on the next compile, the target from armlink is moved to the .sym file location, and in this case it will be hardlinked too. In the end you have all three files (bare, .exe and .sym) being hardlinked together, when the .sym should be an ELF file and the other two should be an E32 image. RevBy: Trust me --- mkspecs/features/symbian/symbian_building.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf index c119c90..374fe21 100644 --- a/mkspecs/features/symbian/symbian_building.prf +++ b/mkspecs/features/symbian/symbian_building.prf @@ -186,7 +186,7 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") { $$elf2e32_LIBPATH \ $$capability \ $$QMAKE_ELF2E32_FLAGS \ - && ln "$${symbianDestdir}/$${baseTarget}.exe" "$${symbianDestdir}/$${baseTarget}" \ + && $$QMAKE_COPY "$${symbianDestdir}/$${baseTarget}.exe" "$${symbianDestdir}/$${baseTarget}" \ $$QMAKE_POST_LINK silent:QMAKE_POST_LINK = @echo postlinking $@ && $$QMAKE_POST_LINK QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}.sym -- cgit v0.12 From 63d56a0815fead98b4bedc5b039458eea455495e Mon Sep 17 00:00:00 2001 From: axis Date: Tue, 3 Aug 2010 09:15:40 +0200 Subject: Fixed incorrect values for QSysInfo::symbianVersion(). RevBy: Miikka Heikkinen --- src/corelib/global/qglobal.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 861d77d..0e3a8d3 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -1877,9 +1877,9 @@ QSysInfo::SymbianVersion QSysInfo::symbianVersion() case SV_S60_5_0: return SV_9_4; case SV_S60_5_1: - return SV_9_4; + return SV_SF_2; case SV_S60_5_2: - return SV_9_4; + return SV_SF_3; default: return SV_Unknown; } -- cgit v0.12 From a53b98f9269e6ee0b524fe7477e8fb46f189f9d3 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Tue, 3 Aug 2010 09:49:14 +0200 Subject: Made changes to qdoc to allow it to accept a "style level" flag --- tools/qdoc3/config.h | 1 + tools/qdoc3/main.cpp | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/tools/qdoc3/config.h b/tools/qdoc3/config.h index b087b1c..7665f1a 100644 --- a/tools/qdoc3/config.h +++ b/tools/qdoc3/config.h @@ -119,6 +119,7 @@ class Config }; #define CONFIG_ALIAS "alias" +#define CONFIG_APPLICATION "application" #define CONFIG_BASE "base" // ### don't document for now #define CONFIG_CODEINDENT "codeindent" #define CONFIG_DEFINES "defines" diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp index 616ae2f..44f9572 100644 --- a/tools/qdoc3/main.cpp +++ b/tools/qdoc3/main.cpp @@ -105,6 +105,8 @@ static bool showInternal = false; static bool obsoleteLinks = false; static QStringList defines; static QHash trees; +static QString application = "base"; //application +static bool applicationArg = 0; //if 1, then the argument is provided and it will override the qdocconf file /*! Find the Tree for language \a lang and return a pointer to it. @@ -192,6 +194,38 @@ static void processQdocconfFile(const QString &fileName) config.load(fileName); /* + Set the application to which qdoc will create the output. + The three applications are: + base: simple, basic html output. Best suited for offline viewing + creator: additional formatting. + online: full-featured online version with search and links to Qt topics + + Note: This will override the offline, online, creator defines. + */ + if(applicationArg == false){ + + QString appConfig = config.getString(CONFIG_APPLICATION); + if (!appConfig.isEmpty()){ + application = appConfig; + } + } + if(application == "online"){ + config.setStringList(CONFIG_ONLINE, QStringList("true")); + config.setStringList(CONFIG_OFFLINE, QStringList("false")); + config.setStringList(CONFIG_CREATOR, QStringList("false")); + } + else if(application == "creator"){ + config.setStringList(CONFIG_ONLINE, QStringList("false")); + config.setStringList(CONFIG_OFFLINE, QStringList("true")); + config.setStringList(CONFIG_CREATOR, QStringList("false")); + } + else if(application == "base"){ + config.setStringList(CONFIG_ONLINE, QStringList("false")); + config.setStringList(CONFIG_OFFLINE, QStringList("false")); + config.setStringList(CONFIG_CREATOR, QStringList("true")); + } + + /* Add the defines to the configuration variables. */ QStringList defs = defines + config.getStringList(CONFIG_DEFINES); @@ -462,12 +496,24 @@ int main(int argc, char **argv) else if (opt == "-obsoletelinks") { obsoleteLinks = true; } + else if (opt == "-base") { + application = "base"; + applicationArg = true; + } + else if (opt == "-creator") { + application = "creator"; + applicationArg = true; + } + else if (opt == "-online") { + application = "online"; + applicationArg = true; + } else { qdocFiles.append(opt); } } - if (qdocFiles.isEmpty()) { + if (qdocFiles.isEmpty()) { printHelp(); return EXIT_FAILURE; } -- cgit v0.12 From 44e11692549f1d6a4fed01066a06085dacfaa444 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Tue, 3 Aug 2010 10:35:35 +0200 Subject: Cocoa: Active QDockWidget does not stay on top of inactive QDockWidget If a window has several child windows, it was not be possible to click on a child window to make it stack in front of the other children. The reason is that cocoa held a fixed stacking order of the child windows (sub-windows). This patch will release, and then reestablish, the stacking order of the children upon acitvation. Task-number: QTBUG-11780 Reviewed-by: prasanth --- src/gui/kernel/qapplication.cpp | 7 +++++++ src/gui/kernel/qt_cocoa_helpers_mac.mm | 16 ++++++++++++++++ src/gui/kernel/qt_cocoa_helpers_mac_p.h | 1 + 3 files changed, 24 insertions(+) diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 5c333b0..3303800 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -2540,6 +2540,13 @@ void QApplication::setActiveWindow(QWidget* act) sendSpontaneousEvent(w, &activationChange); } +#ifdef QT_MAC_USE_COCOA + // In case the user clicked on a child window, we need to + // reestablish the stacking order of the window so + // it pops in front of other child windows in cocoa: + qt_cocoaStackChildWindowOnTopOfOtherChildren(window); +#endif + for(int i = 0; i < toBeDeactivated.size(); ++i) { QWidget *w = toBeDeactivated.at(i); sendSpontaneousEvent(w, &windowDeactivate); diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index 3fc27f4..647cb86 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -1527,6 +1527,22 @@ void macSyncDrawingOnFirstInvocation(void * /*OSWindowRef */window) [theWindow display]; } } + +void qt_cocoaStackChildWindowOnTopOfOtherChildren(QWidget *childWidget) +{ + if (!childWidget) + return; + + QWidget *parent = childWidget->parentWidget(); + if (childWidget->isWindow() && parent) { + if ([[qt_mac_window_for(parent) childWindows] containsObject:qt_mac_window_for(childWidget)]) { + QWidgetPrivate *d = qt_widget_private(childWidget); + d->setSubWindowStacking(false); + d->setSubWindowStacking(true); + } + } +} + #endif // QT_MAC_USE_COCOA QT_END_NAMESPACE diff --git a/src/gui/kernel/qt_cocoa_helpers_mac_p.h b/src/gui/kernel/qt_cocoa_helpers_mac_p.h index 44fb4f0..c6c2db2 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac_p.h +++ b/src/gui/kernel/qt_cocoa_helpers_mac_p.h @@ -148,6 +148,7 @@ void qt_cocoaChangeOverrideCursor(const QCursor &cursor); // These methods exists only for supporting unified mode. void macDrawRectOnTop(void * /*OSWindowRef */ window); void macSyncDrawingOnFirstInvocation(void * /*OSWindowRef */window); +void qt_cocoaStackChildWindowOnTopOfOtherChildren(QWidget *widget); #endif void qt_mac_menu_collapseSeparators(void * /*NSMenu */ menu, bool collapse); bool qt_dispatchKeyEvent(void * /*NSEvent * */ keyEvent, QWidget *widgetToGetEvent); -- cgit v0.12 From 79797d175c41198b0dffad1dced021a07c5873ae Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Tue, 3 Aug 2010 10:54:31 +0200 Subject: Doc: Adding content to installation guide and fixing printing bugs --- doc/src/getting-started/installation.qdoc | 7 +++++-- doc/src/template/style/style.css | 7 +++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc index 90723ec..629d8b7 100644 --- a/doc/src/getting-started/installation.qdoc +++ b/doc/src/getting-started/installation.qdoc @@ -30,10 +30,13 @@ \title Installation \brief Installing Qt on supported platforms. -The installation procedure is different on each Qt platform. -Please follow the instructions for your platform from the following list. +The installation procedure is different on each Qt platform. This page provides +information on how to install Qt, as well as software and hardware requirements +for using Qt on each of the supported platforms. Please follow the instructions +for your platform from the following list. \generatelist{related} + */ /*! \page install-x11.html diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index 259591f..9b37693 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -1552,18 +1552,17 @@ @media print { - input, textarea, .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft + input, textarea, .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft, #feedbackBox, #blurpage, .toc, .breadcrumb, .toolbar, .floatingResult { display: none; background: none; } .content { - position: absolute; - top: 0px; - left: 0px; background: none; display: block; + width: 100%; margin: 0; float: none; + } } /* end of print media */ -- cgit v0.12 From 307601da8d3b64de7b7d83a6de0b5dac290b0eb6 Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Tue, 3 Aug 2010 14:49:28 +0200 Subject: =?UTF-8?q?Crash=20when=20pressing=20the=20'=C2=A3'=20key=20on=20B?= =?UTF-8?q?elgian=20Keyboard=20layout=20(Cocoa)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In some cases the NSKeyDown event won't have fully constructed string in the [NSEvent characters]. So we need to add a guard before accessing the elements of this NSString. Task-number: QTBUG-12474 Reviewed-by: Richard Moe Gustavsen --- src/gui/kernel/qt_cocoa_helpers_mac.mm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index 647cb86..7d23abf 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -685,9 +685,11 @@ bool qt_dispatchKeyEvent(void * /*NSEvent * */ keyEvent, QWidget *widgetToGetEve unsigned int info = 0; if ([event type] == NSKeyDown) { NSString *characters = [event characters]; - unichar value = [characters characterAtIndex:0]; - qt_keymapper_private()->updateKeyMap(0, key_event, (void *)&value); - info = value; + if ([characters length]) { + unichar value = [characters characterAtIndex:0]; + qt_keymapper_private()->updateKeyMap(0, key_event, (void *)&value); + info = value; + } } // Redirect keys to alien widgets. -- cgit v0.12 From 544d31b68c05ab70538bd34fd747b64d8b19f5de Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 3 Aug 2010 11:18:18 +0200 Subject: Unbreak QImage::rgbSwapped() for many image formats. These formats had broken rgbSwapped() implementations: argb8565, argb6666, rgb555, argb8555, rgb444, argb4444 Reviewed-by: Benjamin Poulain --- src/gui/image/qimage.cpp | 76 ++++++++++++++++++---------------------- tests/auto/qimage/tst_qimage.cpp | 66 ++++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 41 deletions(-) diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 30cf758..cb834c0 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -4829,7 +4829,7 @@ QImage QImage::rgbSwapped() const QIMAGE_SANITYCHECK_MEMORY(res); for (int i = 0; i < d->height; i++) { uint *q = (uint*)res.scanLine(i); - uint *p = (uint*)scanLine(i); + uint *p = (uint*)constScanLine(i); uint *end = p + d->width; while (p < end) { *q = ((*p << 16) & 0xff0000) | ((*p >> 16) & 0xff) | (*p & 0xff00ff00); @@ -4843,7 +4843,7 @@ QImage QImage::rgbSwapped() const QIMAGE_SANITYCHECK_MEMORY(res); for (int i = 0; i < d->height; i++) { ushort *q = (ushort*)res.scanLine(i); - const ushort *p = (const ushort*)scanLine(i); + const ushort *p = (const ushort*)constScanLine(i); const ushort *end = p + d->width; while (p < end) { *q = ((*p << 11) & 0xf800) | ((*p >> 11) & 0x1f) | (*p & 0x07e0); @@ -4856,12 +4856,15 @@ QImage QImage::rgbSwapped() const res = QImage(d->width, d->height, d->format); QIMAGE_SANITYCHECK_MEMORY(res); for (int i = 0; i < d->height; i++) { - quint8 *p = (quint8*)scanLine(i); + const quint8 *p = constScanLine(i); + quint8 *q = res.scanLine(i); const quint8 *end = p + d->width * sizeof(qargb8565); while (p < end) { - quint16 *q = reinterpret_cast(p + 1); - *q = ((*q << 11) & 0xf800) | ((*q >> 11) & 0x1f) | (*q & 0x07e0); + q[0] = p[0]; + q[1] = (p[1] & 0xe0) | (p[2] >> 3); + q[2] = (p[2] & 0x07) | (p[1] << 3); p += sizeof(qargb8565); + q += sizeof(qargb8565); } } break; @@ -4870,7 +4873,7 @@ QImage QImage::rgbSwapped() const QIMAGE_SANITYCHECK_MEMORY(res); for (int i = 0; i < d->height; i++) { qrgb666 *q = reinterpret_cast(res.scanLine(i)); - const qrgb666 *p = reinterpret_cast(scanLine(i)); + const qrgb666 *p = reinterpret_cast(constScanLine(i)); const qrgb666 *end = p + d->width; while (p < end) { const QRgb rgb = quint32(*p++); @@ -4882,12 +4885,15 @@ QImage QImage::rgbSwapped() const res = QImage(d->width, d->height, d->format); QIMAGE_SANITYCHECK_MEMORY(res); for (int i = 0; i < d->height; i++) { - qargb6666 *q = reinterpret_cast(res.scanLine(i)); - const qargb6666 *p = reinterpret_cast(scanLine(i)); - const qargb6666 *end = p + d->width; + const quint8 *p = constScanLine(i); + const quint8 *end = p + d->width * sizeof(qargb6666); + quint8 *q = res.scanLine(i); while (p < end) { - const QRgb rgb = quint32(*p++); - *q++ = qRgba(qBlue(rgb), qGreen(rgb), qRed(rgb), qAlpha(rgb)); + q[0] = (p[1] >> 4) | ((p[2] & 0x3) << 4) | (p[0] & 0xc0); + q[1] = (p[1] & 0xf) | (p[0] << 4); + q[2] = (p[2] & 0xfc) | ((p[0] >> 4) & 0x3); + p += sizeof(qargb6666); + q += sizeof(qargb6666); } } break; @@ -4895,11 +4901,11 @@ QImage QImage::rgbSwapped() const res = QImage(d->width, d->height, d->format); QIMAGE_SANITYCHECK_MEMORY(res); for (int i = 0; i < d->height; i++) { - ushort *q = (ushort*)res.scanLine(i); - const ushort *p = (const ushort*)scanLine(i); - const ushort *end = p + d->width; + quint16 *q = (quint16*)res.scanLine(i); + const quint16 *p = (const quint16*)constScanLine(i); + const quint16 *end = p + d->width; while (p < end) { - *q = ((*p << 10) & 0x7800) | ((*p >> 10) & 0x1f) | (*p & 0x83e0); + *q = ((*p << 10) & 0x7c00) | ((*p >> 10) & 0x1f) | (*p & 0x3e0); p++; q++; } @@ -4909,12 +4915,15 @@ QImage QImage::rgbSwapped() const res = QImage(d->width, d->height, d->format); QIMAGE_SANITYCHECK_MEMORY(res); for (int i = 0; i < d->height; i++) { - quint8 *p = (quint8*)scanLine(i); + const quint8 *p = constScanLine(i); + quint8 *q = res.scanLine(i); const quint8 *end = p + d->width * sizeof(qargb8555); while (p < end) { - quint16 *q = reinterpret_cast(p + 1); - *q = ((*q << 10) & 0x7800) | ((*q >> 10) & 0x1f) | (*q & 0x83e0); + q[0] = p[0]; + q[1] = (p[1] & 0xe0) | (p[2] >> 2); + q[2] = (p[2] & 0x03) | ((p[1] << 2) & 0x7f); p += sizeof(qargb8555); + q += sizeof(qargb8555); } } break; @@ -4922,8 +4931,8 @@ QImage QImage::rgbSwapped() const res = QImage(d->width, d->height, d->format); QIMAGE_SANITYCHECK_MEMORY(res); for (int i = 0; i < d->height; i++) { - quint8 *q = reinterpret_cast(res.scanLine(i)); - const quint8 *p = reinterpret_cast(scanLine(i)); + quint8 *q = res.scanLine(i); + const quint8 *p = constScanLine(i); const quint8 *end = p + d->width * sizeof(qrgb888); while (p < end) { q[0] = p[2]; @@ -4935,32 +4944,17 @@ QImage QImage::rgbSwapped() const } break; case Format_RGB444: - res = QImage(d->width, d->height, d->format); - QIMAGE_SANITYCHECK_MEMORY(res); - for (int i = 0; i < d->height; i++) { - quint8 *q = reinterpret_cast(res.scanLine(i)); - const quint8 *p = reinterpret_cast(scanLine(i)); - const quint8 *end = p + d->width * sizeof(qrgb444); - while (p < end) { - q[0] = (p[0] & 0xf0) | ((p[1] & 0x0f) << 8); - q[1] = ((p[0] & 0x0f) >> 8) | (p[1] & 0xf0); - q += sizeof(qrgb444); - p += sizeof(qrgb444); - } - } - break; case Format_ARGB4444_Premultiplied: res = QImage(d->width, d->height, d->format); QIMAGE_SANITYCHECK_MEMORY(res); for (int i = 0; i < d->height; i++) { - quint8 *q = reinterpret_cast(res.scanLine(i)); - const quint8 *p = reinterpret_cast(scanLine(i)); - const quint8 *end = p + d->width * sizeof(qargb4444); + quint16 *q = reinterpret_cast(res.scanLine(i)); + const quint16 *p = reinterpret_cast(constScanLine(i)); + const quint16 *end = p + d->width; while (p < end) { - q[0] = (p[0] & 0xf0) | ((p[1] & 0x0f) << 8); - q[1] = ((p[0] & 0x0f) >> 8) | (p[1] & 0xf0); - q += sizeof(qargb4444); - p += sizeof(qargb4444); + *q = (*p & 0xf0f0) | ((*p & 0x0f) << 8) | ((*p & 0xf00) >> 8); + p++; + q++; } } break; diff --git a/tests/auto/qimage/tst_qimage.cpp b/tests/auto/qimage/tst_qimage.cpp index 1330d96..49514dc 100644 --- a/tests/auto/qimage/tst_qimage.cpp +++ b/tests/auto/qimage/tst_qimage.cpp @@ -139,6 +139,9 @@ private slots: void premultipliedAlphaConsistency(); void compareIndexed(); + + void rgbSwapped_data(); + void rgbSwapped(); }; tst_QImage::tst_QImage() @@ -1820,5 +1823,68 @@ void tst_QImage::compareIndexed() QCOMPARE(img, imgInverted); } +void tst_QImage::rgbSwapped_data() +{ + QTest::addColumn("format"); + + QTest::newRow("Format_Indexed8") << QImage::Format_Indexed8; + QTest::newRow("Format_RGB32") << QImage::Format_RGB32; + QTest::newRow("Format_ARGB32") << QImage::Format_ARGB32; + QTest::newRow("Format_ARGB32_Premultiplied") << QImage::Format_ARGB32_Premultiplied; + QTest::newRow("Format_RGB16") << QImage::Format_RGB16; + QTest::newRow("Format_ARGB8565_Premultiplied") << QImage::Format_ARGB8565_Premultiplied; + QTest::newRow("Format_ARGB6666_Premultiplied") << QImage::Format_ARGB6666_Premultiplied; + QTest::newRow("Format_ARGB4444_Premultiplied") << QImage::Format_ARGB4444_Premultiplied; + QTest::newRow("Format_RGB666") << QImage::Format_RGB666; + QTest::newRow("Format_RGB555") << QImage::Format_RGB555; + QTest::newRow("Format_ARGB8555_Premultiplied") << QImage::Format_ARGB8555_Premultiplied; + QTest::newRow("Format_RGB888") << QImage::Format_RGB888; + QTest::newRow("Format_RGB444") << QImage::Format_RGB444; +} + +void tst_QImage::rgbSwapped() +{ + QFETCH(QImage::Format, format); + + QImage image(100, 1, format); + image.fill(0); + + QVector testColor(image.width()); + + for (int i = 0; i < image.width(); ++i) + testColor[i] = QColor(i, 10 + i, 20 + i * 2, 30 + i); + + if (format != QImage::Format_Indexed8) { + QPainter p(&image); + p.setCompositionMode(QPainter::CompositionMode_Source); + for (int i = 0; i < image.width(); ++i) + p.fillRect(QRect(i, 0, 1, 1), testColor[i].rgb()); + } else { + image.setColorCount(image.width()); + for (int i = 0; i < image.width(); ++i) { + image.setColor(0, testColor[i].rgba()); + image.setPixel(i, 0, i); + } + } + + QImage imageSwapped = image.rgbSwapped(); + + for (int i = 0; i < image.width(); ++i) { + QColor referenceColor = QColor(image.pixel(i, 0)); + QColor swappedColor = QColor(imageSwapped.pixel(i, 0)); + + QCOMPARE(swappedColor.alpha(), referenceColor.alpha()); + QCOMPARE(swappedColor.red(), referenceColor.blue()); + QCOMPARE(swappedColor.green(), referenceColor.green()); + QCOMPARE(swappedColor.blue(), referenceColor.red()); + } + + QImage imageSwappedTwice = imageSwapped.rgbSwapped(); + + QCOMPARE(image, imageSwappedTwice); + + QCOMPARE(memcmp(image.constBits(), imageSwappedTwice.constBits(), image.numBytes()), 0); +} + QTEST_MAIN(tst_QImage) #include "tst_qimage.moc" -- cgit v0.12 From 14e17d5fe5f925a768aab9db9401e04bbaca224d Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Tue, 3 Aug 2010 16:19:12 +0200 Subject: Fixed the addressbook tutorial and some spelling mistakes. Fix for QTBUG-7071 and QTBUG-10173 --- doc/src/development/debug.qdoc | 2 +- examples/tutorials/addressbook-fr/part2/addressbook.cpp | 2 +- examples/tutorials/addressbook-fr/part3/addressbook.cpp | 3 ++- examples/tutorials/addressbook-fr/part4/addressbook.cpp | 3 ++- examples/tutorials/addressbook-fr/part5/addressbook.cpp | 5 +++-- examples/tutorials/addressbook-fr/part6/addressbook.cpp | 3 ++- examples/tutorials/addressbook-fr/part7/addressbook.cpp | 3 ++- examples/tutorials/addressbook/part2/addressbook.cpp | 2 +- examples/tutorials/addressbook/part3/addressbook.cpp | 2 +- examples/tutorials/addressbook/part4/addressbook.cpp | 2 +- examples/tutorials/addressbook/part5/addressbook.cpp | 2 +- examples/tutorials/addressbook/part6/addressbook.cpp | 2 +- examples/tutorials/addressbook/part7/addressbook.cpp | 2 +- 13 files changed, 19 insertions(+), 14 deletions(-) diff --git a/doc/src/development/debug.qdoc b/doc/src/development/debug.qdoc index 36970ee..bfb2355 100644 --- a/doc/src/development/debug.qdoc +++ b/doc/src/development/debug.qdoc @@ -49,7 +49,7 @@ The basic stuff you need to know about debug libraries and frameworks is found at developer.apple.com in: \l{http://developer.apple.com/technotes/tn2004/tn2124.html#SECDEBUGLIB} - {Apple Technicle Note TN2124} Qt follows that. + {Apple Technical Note TN2124} Qt follows that. When you build Qt, frameworks are built by default, and inside the framework you will find both a release and a debug version (e.g., diff --git a/examples/tutorials/addressbook-fr/part2/addressbook.cpp b/examples/tutorials/addressbook-fr/part2/addressbook.cpp index 1fa9d52..8d5b0e1 100644 --- a/examples/tutorials/addressbook-fr/part2/addressbook.cpp +++ b/examples/tutorials/addressbook-fr/part2/addressbook.cpp @@ -111,7 +111,7 @@ void AddressBook::submitContact() QString name = nameLine->text(); QString address = addressText->toPlainText(); - if (name == "" || address == "") { + if ( name.isEmpty()|| address.isEmpty()) { QMessageBox::information(this, tr("Empty Field"), tr("Please enter a name and address.")); return; diff --git a/examples/tutorials/addressbook-fr/part3/addressbook.cpp b/examples/tutorials/addressbook-fr/part3/addressbook.cpp index 840f529..2d182c5 100644 --- a/examples/tutorials/addressbook-fr/part3/addressbook.cpp +++ b/examples/tutorials/addressbook-fr/part3/addressbook.cpp @@ -122,9 +122,10 @@ void AddressBook::submitContact() QString name = nameLine->text(); QString address = addressText->toPlainText(); - if (name == "" || address == "") { + if (name.isEmpty() || address.isEmpty()) { QMessageBox::information(this, tr("Empty Field"), tr("Please enter a name and address.")); + return; } if (!contacts.contains(name)) { diff --git a/examples/tutorials/addressbook-fr/part4/addressbook.cpp b/examples/tutorials/addressbook-fr/part4/addressbook.cpp index f6390a4..d3bf030 100644 --- a/examples/tutorials/addressbook-fr/part4/addressbook.cpp +++ b/examples/tutorials/addressbook-fr/part4/addressbook.cpp @@ -131,9 +131,10 @@ void AddressBook::submitContact() QString name = nameLine->text(); QString address = addressText->toPlainText(); - if (name == "" || address == "") { + if (name.isEmpty() || address.isEmpty()) { QMessageBox::information(this, tr("Empty Field"), tr("Please enter a name and address.")); + return; } //! [submitContact() function part1] if (currentMode == AddingMode) { diff --git a/examples/tutorials/addressbook-fr/part5/addressbook.cpp b/examples/tutorials/addressbook-fr/part5/addressbook.cpp index 80c18c3..d5f5778 100644 --- a/examples/tutorials/addressbook-fr/part5/addressbook.cpp +++ b/examples/tutorials/addressbook-fr/part5/addressbook.cpp @@ -138,10 +138,11 @@ void AddressBook::submitContact() QString name = nameLine->text(); QString address = addressText->toPlainText(); - if (name == "" || address == "") { + if (name.isEmpty() || address.isEmpty()) { QMessageBox::information(this, tr("Empty Field"), tr("Please enter a name and address.")); - } + return; + } if (currentMode == AddingMode) { diff --git a/examples/tutorials/addressbook-fr/part6/addressbook.cpp b/examples/tutorials/addressbook-fr/part6/addressbook.cpp index fc41190..7c57db7 100644 --- a/examples/tutorials/addressbook-fr/part6/addressbook.cpp +++ b/examples/tutorials/addressbook-fr/part6/addressbook.cpp @@ -144,9 +144,10 @@ void AddressBook::submitContact() QString name = nameLine->text(); QString address = addressText->toPlainText(); - if (name == "" || address == "") { + if (name.isEmpty() || address.isEmpty()) { QMessageBox::information(this, tr("Empty Field"), tr("Please enter a name and address.")); + return; } if (currentMode == AddingMode) { diff --git a/examples/tutorials/addressbook-fr/part7/addressbook.cpp b/examples/tutorials/addressbook-fr/part7/addressbook.cpp index 3ab8702..b0f35a7 100644 --- a/examples/tutorials/addressbook-fr/part7/addressbook.cpp +++ b/examples/tutorials/addressbook-fr/part7/addressbook.cpp @@ -146,9 +146,10 @@ void AddressBook::submitContact() QString name = nameLine->text(); QString address = addressText->toPlainText(); - if (name == "" || address == "") { + if (name.isEmpty() || address.isEmpty()) { QMessageBox::information(this, tr("Empty Field"), tr("Please enter a name and address.")); + return; } if (currentMode == AddingMode) { diff --git a/examples/tutorials/addressbook/part2/addressbook.cpp b/examples/tutorials/addressbook/part2/addressbook.cpp index 1fa9d52..f2f0d65 100644 --- a/examples/tutorials/addressbook/part2/addressbook.cpp +++ b/examples/tutorials/addressbook/part2/addressbook.cpp @@ -111,7 +111,7 @@ void AddressBook::submitContact() QString name = nameLine->text(); QString address = addressText->toPlainText(); - if (name == "" || address == "") { + if (name.isEmpty() || address.isEmpty()) { QMessageBox::information(this, tr("Empty Field"), tr("Please enter a name and address.")); return; diff --git a/examples/tutorials/addressbook/part3/addressbook.cpp b/examples/tutorials/addressbook/part3/addressbook.cpp index 28a570a..4e58fa1 100644 --- a/examples/tutorials/addressbook/part3/addressbook.cpp +++ b/examples/tutorials/addressbook/part3/addressbook.cpp @@ -122,7 +122,7 @@ void AddressBook::submitContact() QString name = nameLine->text(); QString address = addressText->toPlainText(); - if (name == "" || address == "") { + if (name.isEmpty() || address.isEmpty()) { QMessageBox::information(this, tr("Empty Field"), tr("Please enter a name and address.")); return; diff --git a/examples/tutorials/addressbook/part4/addressbook.cpp b/examples/tutorials/addressbook/part4/addressbook.cpp index 55d551f..896a427 100644 --- a/examples/tutorials/addressbook/part4/addressbook.cpp +++ b/examples/tutorials/addressbook/part4/addressbook.cpp @@ -131,7 +131,7 @@ void AddressBook::submitContact() QString name = nameLine->text(); QString address = addressText->toPlainText(); - if (name == "" || address == "") { + if (name.isEmpty() || address.isEmpty()) { QMessageBox::information(this, tr("Empty Field"), tr("Please enter a name and address.")); return; diff --git a/examples/tutorials/addressbook/part5/addressbook.cpp b/examples/tutorials/addressbook/part5/addressbook.cpp index 1b3f451..874b151 100644 --- a/examples/tutorials/addressbook/part5/addressbook.cpp +++ b/examples/tutorials/addressbook/part5/addressbook.cpp @@ -138,7 +138,7 @@ void AddressBook::submitContact() QString name = nameLine->text(); QString address = addressText->toPlainText(); - if (name == "" || address == "") { + if (name.isEmpty() || address.isEmpty()) { QMessageBox::information(this, tr("Empty Field"), tr("Please enter a name and address.")); return; diff --git a/examples/tutorials/addressbook/part6/addressbook.cpp b/examples/tutorials/addressbook/part6/addressbook.cpp index 724971c..a6bb4a5 100644 --- a/examples/tutorials/addressbook/part6/addressbook.cpp +++ b/examples/tutorials/addressbook/part6/addressbook.cpp @@ -144,7 +144,7 @@ void AddressBook::submitContact() QString name = nameLine->text(); QString address = addressText->toPlainText(); - if (name == "" || address == "") { + if (name.isEmpty() || address.isEmpty()) { QMessageBox::information(this, tr("Empty Field"), tr("Please enter a name and address.")); return; diff --git a/examples/tutorials/addressbook/part7/addressbook.cpp b/examples/tutorials/addressbook/part7/addressbook.cpp index bf00298..fb70ba4 100644 --- a/examples/tutorials/addressbook/part7/addressbook.cpp +++ b/examples/tutorials/addressbook/part7/addressbook.cpp @@ -146,7 +146,7 @@ void AddressBook::submitContact() QString name = nameLine->text(); QString address = addressText->toPlainText(); - if (name == "" || address == "") { + if (name.isEmpty() || address.isEmpty()) { QMessageBox::information(this, tr("Empty Field"), tr("Please enter a name and address.")); return; -- cgit v0.12 From 79c6710c7785d915f64bd31e28ce48eed8493a41 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Tue, 3 Aug 2010 16:28:35 +0200 Subject: Removed the unfinished sentence. Fix for QTBUG-10173. --- doc/src/development/debug.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/development/debug.qdoc b/doc/src/development/debug.qdoc index bfb2355..9e881d1 100644 --- a/doc/src/development/debug.qdoc +++ b/doc/src/development/debug.qdoc @@ -49,7 +49,7 @@ The basic stuff you need to know about debug libraries and frameworks is found at developer.apple.com in: \l{http://developer.apple.com/technotes/tn2004/tn2124.html#SECDEBUGLIB} - {Apple Technical Note TN2124} Qt follows that. + {Apple Technical Note TN2124}. When you build Qt, frameworks are built by default, and inside the framework you will find both a release and a debug version (e.g., -- cgit v0.12