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

List:       kde-commits
Subject:    =?utf-8?q?=5Bkdelibs/KDE/4=2E6=5D_kio/kio=3A_Re-read_the_remote_?=
From:       Dawit Alemayehu <adawit () kde ! org>
Date:       2011-05-04 17:28:50
Message-ID: 20110504172850.DB855A60A4 () git ! kde ! org
[Download RAW message or body]

Git commit 36bf56dd909c4e195821f3265840d5c8a3079eb4 by Dawit Alemayehu.
Committed on 04/05/2011 at 19:27.
Pushed by adawit into branch 'KDE/4.6'.

Re-read the remote chosen by the user when configuration change notification
is received.

BUG: 144046
FIXED-IN: 4.6.4

M  +5    -3    kio/kio/slavebase.cpp     

http://commits.kde.org/kdelibs/36bf56dd909c4e195821f3265840d5c8a3079eb4

diff --git a/kio/kio/slavebase.cpp b/kio/kio/slavebase.cpp
index 4400cda..ff4e641 100644
--- a/kio/kio/slavebase.cpp
+++ b/kio/kio/slavebase.cpp
@@ -376,11 +376,11 @@ void SlaveBase::sendAndKeepMetaData()
 
 KRemoteEncoding *SlaveBase::remoteEncoding()
 {
-   if (d->remotefile != 0)
+   if (d->remotefile)
       return d->remotefile;
 
-   QByteArray charset = metaData("Charset").toLatin1();
-   return d->remotefile = new KRemoteEncoding( charset );
+   const QByteArray charset (metaData("Charset").toLatin1());
+   return (d->remotefile = new KRemoteEncoding( charset ));
 }
 
 void SlaveBase::data( const QByteArray &data )
@@ -817,6 +817,8 @@ void SlaveBase::slave_status()
 
 void SlaveBase::reparseConfiguration()
 {
+    delete d->remotefile;
+    d->remotefile = 0;
 }
 
 bool SlaveBase::openPasswordDialog( AuthInfo& info, const QString &errorMsg )

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

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