diff --git a/src/misc.cpp b/src/misc.cpp index a91adfd99..ff0b5825e 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -432,33 +432,6 @@ QString misc::updateLabelInSavePath(const QString& defaultSavePath, const QStrin return new_save_path; } -void misc::moveToXDGFolders() { - QDir old_qBtPath(QDir::homePath().replace("\\","/")+"/"+".qbittorrent"); - if(old_qBtPath.exists()) { - // Copy BT_backup folder - const QString old_BTBackupPath = old_qBtPath.absoluteFilePath("BT_backup"); - if(QDir(old_BTBackupPath).exists()) { - copyDir(old_BTBackupPath, BTBackupLocation()); - } - // Copy search engine folder - const QString old_searchPath = old_qBtPath.absoluteFilePath("nova"); - if(QDir(old_searchPath).exists()) { - copyDir(old_searchPath, searchEngineLocation()); - } - // Copy *_state files - if(QFile::exists(old_qBtPath.absoluteFilePath("dht_state"))) { - QFile::copy(old_qBtPath.absoluteFilePath("dht_state"), QDir(cacheLocation()).absoluteFilePath("dht_state")); - safeRemove(old_qBtPath.absoluteFilePath("dht_state")); - } - if(QFile::exists(old_qBtPath.absoluteFilePath("ses_state"))) { - QFile::copy(old_qBtPath.absoluteFilePath("ses_state"), QDir(cacheLocation()).absoluteFilePath("ses_state")); - safeRemove(old_qBtPath.absoluteFilePath("ses_state")); - } - // Remove .qbittorrent folder if empty - QDir::home().rmdir(".qbittorrent"); - } -} - QString misc::toValidFileSystemName(QString filename) { qDebug("toValidFSName: %s", qPrintable(filename)); filename = filename.replace("\\", "/").trimmed(); diff --git a/src/misc.h b/src/misc.h index 3af3bfb75..ab5c5c2de 100644 --- a/src/misc.h +++ b/src/misc.h @@ -127,9 +127,6 @@ public: static bool sameFiles(const QString &path1, const QString &path2); static void copyDir(QString src_path, QString dst_path); - // Introduced in v2.1.0 for backward compatibility - // Remove after some releases - static void moveToXDGFolders(); static QString toValidFileSystemName(QString filename); static bool isValidFileSystemName(QString filename); diff --git a/src/qtlibtorrent/qbtsession.cpp b/src/qtlibtorrent/qbtsession.cpp index 1b589cd9b..7707cfc58 100644 --- a/src/qtlibtorrent/qbtsession.cpp +++ b/src/qtlibtorrent/qbtsession.cpp @@ -92,15 +92,11 @@ QBtSession::QBtSession() #ifndef DISABLE_GUI , geoipDBLoaded(false), resolve_countries(false) #endif + , m_tracker(0) { Preferences pref; - m_tracker = 0; // To avoid some exceptions boost::filesystem::path::default_name_check(boost::filesystem::no_check); - // For backward compatibility - // Move .qBittorrent content to XDG folder - // TODO: Remove after some releases (introduced in v2.1.0) - misc::moveToXDGFolders(); // Creating Bittorrent session // Check if we should spoof utorrent QList version;