From 5aba9179c46f5b6fd6ad02cc2f400f4e134264e3 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Mon, 5 Apr 2010 19:32:06 +0000 Subject: [PATCH] Similar fixes --- Changelog | 3 +++ src/bittorrent.cpp | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Changelog b/Changelog index ace2efe6d..2f50523ba 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,6 @@ +* Unreleased - Christophe Dumez - v2.2.4 + - BUGFIX: Fix possible crash when adding a torrent + * Sun Apr 04 2010 - Christophe Dumez - v2.2.3 - BUGFIX: Fix possible crash when deleting a torrent just after pausing it - BUGFIX: Enable Apply button when alternative rate limits are changed diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 0b0b0953f..2a7a3493a 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -1323,7 +1323,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); @@ -1335,7 +1335,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); @@ -1576,7 +1576,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); }