Bug 228849 - Hovering an URL with percent-encoded line breaks in the ircview results in a multi-line status bar
Summary: Hovering an URL with percent-encoded line breaks in the ircview results in a ...
Status: RESOLVED FIXED
Alias: None
Product: konversation
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Konversation Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-28 04:55 UTC by Eike Hein
Modified: 2010-02-28 20:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eike Hein 2010-02-28 04:55:54 UTC
Description says it all. Sample URL:

http://some.url/with_percent-encoded_line%0Abreaks%0D%0Amakes_status_bar_look_funny
Comment 1 Peter Simonsson 2010-02-28 09:31:22 UTC
commit a402a55d383ef3cba89cb467d33d593d41bd657e
Author: Peter Simonsson <peter.simonsson@gmail.com>
Date:   Sun Feb 28 09:28:56 2010 +0100

    Show URLs with % encoded linebreaks correctly in the statusbar.
    
    BUG:228849

diff --git a/src/viewer/ircview.cpp b/src/viewer/ircview.cpp
index 8b4fa23..33603ed 100644
--- a/src/viewer/ircview.cpp
+++ b/src/viewer/ircview.cpp
@@ -1530,16 +1530,12 @@ void IRCView::saveLinkAs()
     KIO::copy(srcUrl, saveUrl);
 }
 
-void IRCView::highlightedSlot(const QString& _link)
+void IRCView::highlightedSlot(const QString& /*_link*/)
 {
-    QString link = _link;
+    QString link = m_urlToCopy;
     // HACK Replace " " with %20 for channelnames, NOTE there can't be 2 channelnames in one link
     link = link.replace (' ', "%20");
 
-    //Hack to handle the fact that we get a decoded url
-    //FIXME someone who knows what it looks like when we get a decoded url can reenable this if necessary...
-    //link = KUrl(link).url();
-
     //we just saw this a second ago.  no need to reemit.
     if (link == m_lastStatusText && !link.isEmpty())
         return;
Comment 2 Bernd Buschinski 2010-02-28 20:31:25 UTC
commit 0714f669109cf3402748bcb651860c913e222bb9
Author: Bernd Buschinski <b.buschinski@web.de>
Date:   Sun Feb 28 20:04:52 2010 +0100

    - Fix crash when resend file action is used with more than one
      selected transfer.
    
    BUG:228849

diff --git a/src/dcc/transferpanel.cpp b/src/dcc/transferpanel.cpp
index 68fe48b..fb7198c 100644
--- a/src/dcc/transferpanel.cpp
+++ b/src/dcc/transferpanel.cpp
@@ -248,6 +248,7 @@ namespace Konversation
 
         void TransferPanel::resendFile()
         {
+            QList<Transfer*> transferList;
             foreach (const QModelIndex &index, m_transferView->selectedRows())
             {
                 if (index.data(TransferListModel::TransferType).toInt() == Transfer::Send &&
@@ -258,18 +259,22 @@ namespace Konversation
                     {
                         continue;
                     }
+                    transferList.append(transfer);
+                }
+            }
 
-                    TransferSend *newTransfer = Application::instance()->getDccTransferManager()->newUpload();
+            foreach (Transfer* transfer, transferList)
+            {
+                TransferSend *newTransfer = Application::instance()->getDccTransferManager()->newUpload();
 
-                    newTransfer->setConnectionId(transfer->getConnectionId());
-                    newTransfer->setPartnerNick(transfer->getPartnerNick());
-                    newTransfer->setFileURL(transfer->getFileURL());
-                    newTransfer->setFileName(transfer->getFileName());
+                newTransfer->setConnectionId(transfer->getConnectionId());
+                newTransfer->setPartnerNick(transfer->getPartnerNick());
+                newTransfer->setFileURL(transfer->getFileURL());
+                newTransfer->setFileName(transfer->getFileName());
 
-                    if (newTransfer->queue())
-                    {
-                        newTransfer->start();
-                    }
+                if (newTransfer->queue())
+                {
+                    newTransfer->start();
                 }
             }
         }
Comment 3 Bernd Buschinski 2010-02-28 20:36:28 UTC
Sorry, wrong Bug