From 846372e48b77d77631df1c28e308b6765c30581b Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Mon, 5 Apr 2010 19:32:44 +0000 Subject: [PATCH] Similar fixes --- src/bittorrent.cpp | 6 +++--- src/searchengine.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 715c1da53..c3dd4c5e1 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -1325,7 +1325,7 @@ void Bittorrent::enableLSD(bool b) { } void Bittorrent::loadSessionState() { - const QString &state_path = misc::cacheLocation()+QDir::separator()+QString::fromUtf8("ses_state"); + const QString state_path = misc::cacheLocation()+QDir::separator()+QString::fromUtf8("ses_state"); boost::filesystem::ifstream ses_state_file(state_path.toLocal8Bit().constData() , std::ios_base::binary); ses_state_file.unsetf(std::ios_base::skipws); @@ -1337,7 +1337,7 @@ void Bittorrent::loadSessionState() { void Bittorrent::saveSessionState() { qDebug("Saving session state to disk..."); entry session_state = s->state(); - const QString &state_path = misc::cacheLocation()+QDir::separator()+QString::fromUtf8("ses_state"); + const QString state_path = misc::cacheLocation()+QDir::separator()+QString::fromUtf8("ses_state"); boost::filesystem::ofstream out(state_path.toLocal8Bit().constData() , std::ios_base::binary); out.unsetf(std::ios_base::skipws); @@ -1578,7 +1578,7 @@ void Bittorrent::addConsoleMessage(QString msg, QString) { if(file_size > 0 && (fp[i]/(double)file_size) < 1.) { const QString &name = misc::toQString(h.get_torrent_info().file_at(i).path.string()); if(!name.endsWith(".!qB")) { - const QString &new_name = name+".!qB"; + const QString new_name = name+".!qB"; qDebug("Renaming %s to %s", qPrintable(name), qPrintable(new_name)); h.rename_file(i, new_name); } diff --git a/src/searchengine.cpp b/src/searchengine.cpp index a7571bf6f..1a133f48f 100644 --- a/src/searchengine.cpp +++ b/src/searchengine.cpp @@ -437,7 +437,7 @@ void SearchEngine::updateNova() { QString shipped_file = shipped_subDir.path()+"/"+file; // Copy python classes if(file.endsWith(".py")) { - const QString &dest_file = destDir+file; + const QString dest_file = destDir+file; if(getPluginVersion(shipped_file) > getPluginVersion(dest_file) ) { qDebug("shippped %s is more recent then local plugin, updating", qPrintable(file)); if(QFile::exists(dest_file)) {