From ae9f79c80e38bc807af39fd937e8efcc533c0893 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Wed, 26 Aug 2015 22:57:45 +0300 Subject: [PATCH] kioslave: remove windows workaround from http slave --- kioslave/http/http.cpp | 20 -------------------- kioslave/http/kcookiejar/kcookieserver.cpp | 4 ++-- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/kioslave/http/http.cpp b/kioslave/http/http.cpp index 35bdc8c9..57f554d2 100644 --- a/kioslave/http/http.cpp +++ b/kioslave/http/http.cpp @@ -4978,26 +4978,6 @@ void HTTPProtocol::cacheFileClose() tempFile->write(header); ccCommand = makeCacheCleanerCommand(m_request.cacheTag, CreateFileNotificationCommand); - - QString oldName = tempFile->fileName(); - QString newName = oldName; - int basenameStart = newName.lastIndexOf(QLatin1Char('/')) + 1; - // remove the randomized name part added by QTemporaryFile - newName.chop(newName.length() - basenameStart - s_hashedUrlNibbles); - kDebug(7113) << "Renaming temporary file" << oldName << "to" << newName; - - // on windows open files can't be renamed - tempFile->setAutoRemove(false); - delete tempFile; - file = 0; - - if (!QFile::rename(oldName, newName)) { - // ### currently this hides a minor bug when force-reloading a resource. We - // should not even open a new file for writing in that case. - kDebug(7113) << "Renaming temporary file failed, deleting it instead."; - QFile::remove(oldName); - ccCommand.clear(); // we have nothing of value to tell the cache cleaner - } } else { // oh, we've never written payload data to the cache file. // the temporary file is closed and removed and no proper cache entry is created. diff --git a/kioslave/http/kcookiejar/kcookieserver.cpp b/kioslave/http/kcookiejar/kcookieserver.cpp index 822d5ea3..e8bb7120 100644 --- a/kioslave/http/kcookiejar/kcookieserver.cpp +++ b/kioslave/http/kcookiejar/kcookieserver.cpp @@ -85,8 +85,8 @@ KCookieServer::KCookieServer(QObject* parent, const QList&) mTimer->setSingleShot(true); connect(mTimer, SIGNAL(timeout()), SLOT(slotSave())); mConfig = new KConfig("kcookiejarrc"); - mCookieJar->loadConfig( mConfig ); - mCookieJar->loadCookies( KStandardDirs::locateLocal("data", "kcookiejar/cookies")); + mCookieJar->loadConfig(mConfig); + mCookieJar->loadCookies(KStandardDirs::locateLocal("data", "kcookiejar/cookies")); connect(this, SIGNAL(windowUnregistered(qlonglong)), this, SLOT(slotDeleteSessionCookies(qlonglong)));