From adfa2dde84ff7ed1a8b177c2a7e885e752e9bb0b Mon Sep 17 00:00:00 2001 From: mread Date: Thu, 1 Sep 2011 14:11:33 +0100 Subject: URLs used with scheme handler use appropriate encoding for scheme URLs passed to scheme handler always used to use raw encoding. That broke URLs containing spaces passed to the browser. Then QTBUG-18772 changed it so that they always used % encoding. That broke URLs containing spaces used to open files, resulting in QTBUG-21209. This change fixes it so that web URLs are % encoded and file URLs are raw encoded. Task-number: QTBUG-21209 Reviewed-by: Honglei Zhang --- src/gui/util/qdesktopservices_s60.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/util/qdesktopservices_s60.cpp b/src/gui/util/qdesktopservices_s60.cpp index 97d1226..ae203cd 100644 --- a/src/gui/util/qdesktopservices_s60.cpp +++ b/src/gui/util/qdesktopservices_s60.cpp @@ -309,12 +309,12 @@ static void handleUrlL(const TDesC& aUrl) CleanupStack::PopAndDestroy(); } -static bool handleUrl(const QUrl &url) +static bool handleUrl(const QUrl &url, bool useEncodedUrl) { if (!url.isValid()) return false; - QString urlString(url.toEncoded()); + QString urlString(useEncodedUrl ? url.toEncoded() : url.toString()); TPtrC urlPtr(qt_QString2TPtrC(urlString)); TRAPD( err, handleUrlL(urlPtr)); return err ? false : true; @@ -322,12 +322,12 @@ static bool handleUrl(const QUrl &url) static bool launchWebBrowser(const QUrl &url) { - return handleUrl(url); + return handleUrl(url, true); } static bool openDocument(const QUrl &file) { - return handleUrl(file); + return handleUrl(file, false); } #endif //USE_SCHEMEHANDLER -- cgit v0.12 From 941f886eab8714a02003816f347103697437e7db Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 2 Sep 2011 09:04:37 +1000 Subject: Revert readonly BorderImage::sourceSize change Revert a32728ce8cf4fa1d1dc1001b1fadc66e9c86e025 Writing to BorderImage sourceSize has never been allowed and issued a warning, however this should not have been enforced in a patch release. Change-Id: I8f8d10e6ccd4e771fd38a27ce9d68f921b761d96 Task-number: QTTH-1501 --- src/declarative/graphicsitems/qdeclarativeborderimage.cpp | 6 ++++++ src/declarative/graphicsitems/qdeclarativeborderimage_p.h | 6 ++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp index 836ad49..25b70c7 100644 --- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp @@ -291,6 +291,12 @@ void QDeclarativeBorderImage::setSource(const QUrl &url) load(); } +void QDeclarativeBorderImage::setSourceSize(const QSize& size) +{ + Q_UNUSED(size); + qmlInfo(this) << "Setting sourceSize for borderImage not supported"; +} + void QDeclarativeBorderImage::load() { Q_D(QDeclarativeBorderImage); diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage_p.h b/src/declarative/graphicsitems/qdeclarativeborderimage_p.h index 6a50c3c..6b05608 100644 --- a/src/declarative/graphicsitems/qdeclarativeborderimage_p.h +++ b/src/declarative/graphicsitems/qdeclarativeborderimage_p.h @@ -63,9 +63,6 @@ class Q_AUTOTEST_EXPORT QDeclarativeBorderImage : public QDeclarativeImageBase Q_PROPERTY(TileMode horizontalTileMode READ horizontalTileMode WRITE setHorizontalTileMode NOTIFY horizontalTileModeChanged) Q_PROPERTY(TileMode verticalTileMode READ verticalTileMode WRITE setVerticalTileMode NOTIFY verticalTileModeChanged) - // read-only for BorderImage - Q_PROPERTY(QSize sourceSize READ sourceSize NOTIFY sourceSizeChanged) - public: QDeclarativeBorderImage(QDeclarativeItem *parent=0); ~QDeclarativeBorderImage(); @@ -83,10 +80,11 @@ public: void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); void setSource(const QUrl &url); + void setSourceSize(const QSize&); + Q_SIGNALS: void horizontalTileModeChanged(); void verticalTileModeChanged(); - void sourceSizeChanged(); protected: virtual void load(); -- cgit v0.12