[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [ktorrent/5.0] ktorrent: blindly fix "Download to:" adds "/"
From:       Nick Shaforostoff <shafff () ukr ! net>
Date:       2016-03-28 23:50:50
Message-ID: E1akgvq-0005TZ-0N () scm ! kde ! org
[Download RAW message or body]

Git commit f567a34fabf2eabef3d1d19c4ac6dacaa23d62d7 by Nick Shaforostoff.
Committed on 28/03/2016 at 23:48.
Pushed by shaforo into branch '5.0'.

blindly fix "Download to:" adds "/"
BUG: 360787

fix tray icon tooltip layout
BUG: 340275

M  +1    -1    ktorrent/core.cpp
M  +4    -2    ktorrent/dialogs/fileselectdlg.cpp
M  +4    -6    ktorrent/trayicon.cpp

http://commits.kde.org/ktorrent/f567a34fabf2eabef3d1d19c4ac6dacaa23d62d7

diff --git a/ktorrent/core.cpp b/ktorrent/core.cpp
index 96892f0..d579ae4 100644
--- a/ktorrent/core.cpp
+++ b/ktorrent/core.cpp
@@ -83,7 +83,7 @@ namespace kt
 
         data_dir = Settings::tempDir();
         bool dd_not_exist = !bt::Exists(data_dir);
-        if (data_dir == QString::null || dd_not_exist)
+        if (data_dir.isEmpty() || dd_not_exist)
         {
             data_dir = kt::DataDir();
             if (dd_not_exist)
diff --git a/ktorrent/dialogs/fileselectdlg.cpp b/ktorrent/dialogs/fileselectdlg.cpp
index 58d4050..b7126af 100644
--- a/ktorrent/dialogs/fileselectdlg.cpp
+++ b/ktorrent/dialogs/fileselectdlg.cpp
@@ -179,11 +179,13 @@ namespace kt
     {
         QStringList pe_ex;
 
-        QString cn = m_completedLocation->url().toLocalFile() + '/';
+        QString cn = m_completedLocation->url().toLocalFile();
+        if (!cn.endsWith('/')) cn += '/';
         if (m_moveCompleted->isChecked() && !cn.isEmpty())
             move_on_completion_location_history.insert(cn);
 
-        QString dn = m_downloadLocation->url().toLocalFile() + '/';
+        QString dn = m_downloadLocation->url().toLocalFile();
+        if (!dn.endsWith('/')) dn += '/';
         if (!dn.isEmpty())
             download_location_history.insert(dn);
 
diff --git a/ktorrent/trayicon.cpp b/ktorrent/trayicon.cpp
index a2de484..cb5622e 100644
--- a/ktorrent/trayicon.cpp
+++ b/ktorrent/trayicon.cpp
@@ -142,12 +142,10 @@ namespace kt
 
         status_notifier_item->setStatus(core->getQueueManager()->getNumRunning(QueueManager::DOWNLOADS) \
>                 0 ?
                                         KStatusNotifierItem::Active : \
                KStatusNotifierItem::Passive);
-        QString tip = i18n("<table>"
-                           \
                "<tr><td>Download&nbsp;speed:</td><td><b>%1</b></td></tr>"
-                           "<tr><td>Upload&nbsp;speed:</td><td><b>%2</b></td></tr>"
-                           "<tr><td>Received:</td><td><b>%3</b></td></tr>"
-                           "<tr><td>Transmitted:</td><td><b>%4</b></td></tr>"
-                           "</table>",
+        QString tip = i18n("Download speed: <b>%1</b><br/>"
+                           "Upload speed: <b>%2</b><br/>"
+                           "Received: <b>%3</b><br/>"
+                           "Transmitted: <b>%4</b>",
                            BytesPerSecToString((double)stats.download_speed),
                            BytesPerSecToString((double)stats.upload_speed),
                            BytesToString(stats.bytes_downloaded),


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic