diff options
Diffstat (limited to 'src/gui/platform/unix/qdesktopunixservices.cpp')
| -rw-r--r-- | src/gui/platform/unix/qdesktopunixservices.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/gui/platform/unix/qdesktopunixservices.cpp b/src/gui/platform/unix/qdesktopunixservices.cpp index be472414ee5..226bd338a2c 100644 --- a/src/gui/platform/unix/qdesktopunixservices.cpp +++ b/src/gui/platform/unix/qdesktopunixservices.cpp @@ -46,8 +46,6 @@ using namespace Qt::StringLiterals; #if QT_CONFIG(multiprocess) -enum { debug = 0 }; - static inline QByteArray detectDesktopEnvironment() { const QByteArray xdgCurrentDesktop = qgetenv("XDG_CURRENT_DESKTOP"); @@ -136,8 +134,7 @@ static inline bool launch(const QString &launcher, const QUrl &url, { const QString command = launcher + u' ' + QLatin1StringView(url.toEncoded()); - if (debug) - qDebug("Launching %s", qPrintable(command)); + qCDebug(lcQpaServices, "Launching %s", qPrintable(command)); #if !QT_CONFIG(process) if (!xdgActivationToken.isEmpty()) qputenv("XDG_ACTIVATION_TOKEN", xdgActivationToken.toUtf8()); @@ -162,8 +159,7 @@ static inline bool launch(const QString &launcher, const QUrl &url, } # endif if (!ok) - qWarning("Launch failed (%s)", qPrintable(command)); - + qCWarning(lcQpaServices, "Launch failed (%s)", qPrintable(command)); return ok; } @@ -501,7 +497,7 @@ bool QDesktopUnixServices::openUrl(const QUrl &url) if (m_webBrowser.isEmpty() && !detectWebBrowser(desktopEnvironment(), true, &m_webBrowser)) { - qWarning("Unable to detect a web browser to launch '%s'", qPrintable(url.toString())); + qCWarning(lcQpaServices, "Unable to detect a web browser to launch '%s'", qPrintable(url.toString())); return false; } return launch(m_webBrowser, url, xdgActivationToken); @@ -535,7 +531,7 @@ bool QDesktopUnixServices::openDocument(const QUrl &url) if (m_documentLauncher.isEmpty() && !detectWebBrowser(desktopEnvironment(), false, &m_documentLauncher)) { - qWarning("Unable to detect a launcher for '%s'", qPrintable(url.toString())); + qCWarning(lcQpaServices, "Unable to detect a launcher for '%s'", qPrintable(url.toString())); return false; } return launch(m_documentLauncher, url, xdgActivationToken); @@ -616,7 +612,7 @@ void QDesktopUnixServices::setApplicationBadge(qint64 number) { #if QT_CONFIG(dbus) if (qGuiApp->desktopFileName().isEmpty()) { - qWarning("QGuiApplication::desktopFileName() is empty"); + qCWarning(lcQpaServices, "Cannot set badge number - QGuiApplication::desktopFileName() is empty"); return; } |
