summaryrefslogtreecommitdiffstats
path: root/src/gui/util/qdesktopservices_x11.cpp
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2010-08-03 10:53:57 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2010-08-03 10:53:57 (GMT)
commitd5491ecdde14659a913c9f476f18c45f1d9489bb (patch)
tree06cc52249feda9bd9e50ca47abb8ebd676c8a309 /src/gui/util/qdesktopservices_x11.cpp
parent42cdfaf86d34afeb6448723839fef70fe477deed (diff)
parenta41128af5373a0225c3548abd3eb82cd7e8f7a0e (diff)
downloadQt-d5491ecdde14659a913c9f476f18c45f1d9489bb.zip
Qt-d5491ecdde14659a913c9f476f18c45f1d9489bb.tar.gz
Qt-d5491ecdde14659a913c9f476f18c45f1d9489bb.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into lighthouse
Conflicts: configure
Diffstat (limited to 'src/gui/util/qdesktopservices_x11.cpp')
-rw-r--r--src/gui/util/qdesktopservices_x11.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/util/qdesktopservices_x11.cpp b/src/gui/util/qdesktopservices_x11.cpp
index fe7f9a6..75e7209 100644
--- a/src/gui/util/qdesktopservices_x11.cpp
+++ b/src/gui/util/qdesktopservices_x11.cpp
@@ -71,10 +71,12 @@ static bool openDocument(const QUrl &url)
if (launch(url, QLatin1String("xdg-open")))
return true;
- if (X11->desktopEnvironment == DE_GNOME && launch(url, QLatin1String("gnome-open"))) {
+ // Use the X11->desktopEnvironment value if X11 is non-NULL,
+ // otherwise just attempt to launch command regardless of the desktop environment
+ if ((!X11 || (X11 && X11->desktopEnvironment == DE_GNOME)) && launch(url, QLatin1String("gnome-open"))) {
return true;
} else {
- if (X11->desktopEnvironment == DE_KDE && launch(url, QLatin1String("kfmclient exec")))
+ if ((!X11 || (X11 && X11->desktopEnvironment == DE_KDE)) && launch(url, QLatin1String("kfmclient exec")))
return true;
}
@@ -104,10 +106,12 @@ static bool launchWebBrowser(const QUrl &url)
if (launch(url, QString::fromLocal8Bit(getenv("BROWSER"))))
return true;
- if (X11->desktopEnvironment == DE_GNOME && launch(url, QLatin1String("gnome-open"))) {
+ // Use the X11->desktopEnvironment value if X11 is non-NULL,
+ // otherwise just attempt to launch command regardless of the desktop environment
+ if ((!X11 || (X11 && X11->desktopEnvironment == DE_GNOME)) && launch(url, QLatin1String("gnome-open"))) {
return true;
} else {
- if (X11->desktopEnvironment == DE_KDE && launch(url, QLatin1String("kfmclient openURL")))
+ if ((!X11 || (X11 && X11->desktopEnvironment == DE_KDE)) && launch(url, QLatin1String("kfmclient openURL")))
return true;
}