diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-03-31 10:03:31 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-03-31 10:03:31 +0200 |
commit | ce9519593a0b3deb99d1dd2529770f7e9fffef92 (patch) | |
tree | c9bca05230dd68f49494240ae930bad1fe0c5956 /src/gui/util | |
parent | 509f77cca28aa3edea5523c5869bae4412ed2ccc (diff) | |
parent | 7baaec17edb06634f1d6235a55c7adbd112cba3e (diff) |
Merge remote-tracking branch 'origin/5.4' into 5.5
Conflicts:
mkspecs/android-g++/qmake.conf
qmake/generators/unix/unixmake2.cpp
src/gui/image/qimage_conversions.cpp
Change-Id: Ib76264b8c2d29a0228438ec02bd97d4b97545be0
Diffstat (limited to 'src/gui/util')
-rw-r--r-- | src/gui/util/qdesktopservices.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gui/util/qdesktopservices.cpp b/src/gui/util/qdesktopservices.cpp index 385706f09e..4c92e5d000 100644 --- a/src/gui/util/qdesktopservices.cpp +++ b/src/gui/util/qdesktopservices.cpp @@ -166,6 +166,11 @@ void QOpenUrlHandlerRegistry::handlerDestroyed(QObject *handler) Unicode-aware, the user may have configured their client without these features. Also, certain e-mail clients (e.g., Lotus Notes) have problems with long URLs. + \warning A return value of \c true indicates that the application has successfully requested + the operating system to open the URL in an external application. The external application may + still fail to launch or fail to open the requested URL. This result will not be reported back + to the application. + \sa setUrlHandler() */ bool QDesktopServices::openUrl(const QUrl &url) @@ -185,7 +190,12 @@ bool QDesktopServices::openUrl(const QUrl &url) } if (!url.isValid()) return false; - QPlatformServices *platformServices = QGuiApplicationPrivate::platformIntegration()->services(); + + QPlatformIntegration *platformIntegration = QGuiApplicationPrivate::platformIntegration(); + if (!platformIntegration) + return false; + + QPlatformServices *platformServices = platformIntegration->services(); if (!platformServices) { qWarning("%s: The platform plugin does not support services.", Q_FUNC_INFO); return false; |