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

List:       kde-commits
Subject:    KDE/kdebase/workspace/plasma/applets/systemtray
From:       Rob Scheepmaker <r.scheepmaker () student ! utwente ! nl>
Date:       2009-09-03 10:44:56
Message-ID: 1251974696.482653.9180.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1019337 by scheepmaker:

Properly escape URL's in the job completed widgets. Will backport...
BUG: 199544



 M  +5 -1      core/job.cpp  
 M  +3 -0      ui/applet.cpp  


--- trunk/KDE/kdebase/workspace/plasma/applets/systemtray/core/job.cpp #1019336:1019337
@@ -20,6 +20,7 @@
 #include "job.h"
 
 #include <QtCore/QTimer>
+#include <QTextDocument>
 
 #include <KDebug>
 #include <KUrl>
@@ -165,7 +166,10 @@
             destinationString = location.prettyUrl();
         }
 
-        QString destinationLink = QString("<a href=\"%1\">%1</a>").arg(destinationString);
+        kDebug() << "href = " << location.url();
+        QString destinationLink = QString("<a href=\"%1\">%2</a>").arg(location.url())
+                                                                  .arg(Qt::escape(destinationString));
+
         if (totalAmounts().value("files") > 1) {
             return i18np("%1 file, to: %2", "%1 files, to: %2", totalAmounts().value("files"),
                          destinationLink);
--- trunk/KDE/kdebase/workspace/plasma/applets/systemtray/ui/applet.cpp #1019336:1019337
@@ -739,6 +739,8 @@
         label->setMinimumWidth(300);
         label->setText(extenderItem->config().readEntry("text", ""));
         label->setPreferredSize(label->minimumSize());
+        connect(label, SIGNAL(linkActivated(const QString &)),
+                this, SLOT(open(const QString &)));
 
         extenderItem->setWidget(label);
         extenderItem->showCloseButton();
@@ -831,6 +833,7 @@
 
 void Applet::open(const QString &url)
 {
+    kDebug() << "open " << url;
     QProcess::startDetached("kde-open", QStringList() << url);
 }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

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