File qbittorrent-4.2.5-no_HTML_in_tray_popup.patch of Package qbittorrent.16055

From ede1bd0657b6df1d98a3a78aab52a213a8c6af50 Mon Sep 17 00:00:00 2001
From: thalieht <eretrus@outlook.com>
Date: Sat, 12 Sep 2020 17:34:14 +0300
Subject: [PATCH] Don't use HTML in Linux tray tooltip

HTML is no longer allowed in Linux tray tooltip's title, only in its subtext.

Closes #13030

Index: qbittorrent-4.2.5/src/gui/mainwindow.cpp
===================================================================
--- qbittorrent-4.2.5.orig/src/gui/mainwindow.cpp
+++ qbittorrent-4.2.5/src/gui/mainwindow.cpp
@@ -1532,25 +1532,9 @@ void MainWindow::reloadSessionStats()
     }
 #else
     if (m_systrayIcon) {
-#ifdef Q_OS_UNIX
-        const QString toolTip = QString::fromLatin1(
-                "<div style='background-color: #678db2; color: #fff;height: 18px; font-weight: bold; margin-bottom: 5px;'>"
-                "qBittorrent"
-                "</div>"
-                "<div style='vertical-align: baseline; height: 18px;'>"
-                "<img src=':/icons/skin/download.svg' height='14'/>&nbsp;%1"
-                "</div>"
-                "<div style='vertical-align: baseline; height: 18px;'>"
-                "<img src=':/icons/skin/seeding.svg' height='14'/>&nbsp;%2"
-                "</div>")
-            .arg(tr("DL speed: %1", "e.g: Download speed: 10 KiB/s").arg(Utils::Misc::friendlyUnit(status.payloadDownloadRate, true))
-                 , tr("UP speed: %1", "e.g: Upload speed: 10 KiB/s").arg(Utils::Misc::friendlyUnit(status.payloadUploadRate, true)));
-#else
-        // OSes such as Windows do not support html here
         const QString toolTip = QString::fromLatin1("%1\n%2").arg(
             tr("DL speed: %1", "e.g: Download speed: 10 KiB/s").arg(Utils::Misc::friendlyUnit(status.payloadDownloadRate, true))
             , tr("UP speed: %1", "e.g: Upload speed: 10 KiB/s").arg(Utils::Misc::friendlyUnit(status.payloadUploadRate, true)));
-#endif // Q_OS_UNIX
         m_systrayIcon->setToolTip(toolTip); // tray icon
     }
 #endif  // Q_OS_MACOS
openSUSE Build Service is sponsored by