From d744968ea633e9295120c62ec0f80f331cd172ec Mon Sep 17 00:00:00 2001 From: sledgehammer_999 Date: Tue, 4 Oct 2011 23:17:49 +0300 Subject: [PATCH] Fix compilation on Windows after code cleanups. --- src/misc.cpp | 6 +++++- src/preferences/preferences.h | 8 -------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/misc.cpp b/src/misc.cpp index 8c42801a7..b5bd2df98 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -75,6 +75,10 @@ const int UNLEN = 256; #endif #endif // DISABLE_GUI +#ifdef Q_WS_WIN +#include +#endif + using namespace libtorrent; const int MAX_FILENAME_LENGTH = 255; @@ -159,7 +163,7 @@ QString misc::QDesktopServicesDownloadLocation() { // TODO: Use IKnownFolderManager to get path of FOLDERID_Downloads // instead of hardcoding "Downloads" // Unfortunately, this would break compatibility with WinXP - return QDir(QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation)).absoluteFilePath(tr("Downloads")).toString(); + return QDir(QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation)).absoluteFilePath(tr("Downloads")); #endif #ifdef Q_WS_X11 diff --git a/src/preferences/preferences.h b/src/preferences/preferences.h index 1e082b2e4..c33606b0c 100644 --- a/src/preferences/preferences.h +++ b/src/preferences/preferences.h @@ -45,14 +45,6 @@ #include #endif -#ifdef Q_WS_WIN -#include -#endif - -#ifdef Q_OS_LINUX -#include -#endif - #include "misc.h" #include "qinisettings.h"