mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-31 03:50:20 -07:00
Use simpler DEFINE for detecting Qt5 so moc will work too.
This commit is contained in:
parent
18a520c9f9
commit
9b1090332b
28 changed files with 71 additions and 70 deletions
|
@ -55,7 +55,7 @@
|
|||
#include <winbase.h>
|
||||
#endif
|
||||
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
|
||||
#ifndef QBT_USES_QT5
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
#include <QDesktopServices>
|
||||
|
@ -182,7 +182,7 @@ bool Utils::Fs::forceRemove(const QString& file_path)
|
|||
*/
|
||||
void Utils::Fs::removeDirRecursive(const QString& dirName)
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||
#ifdef QBT_USES_QT5
|
||||
QDir(dirName).removeRecursively();
|
||||
#else
|
||||
QDir dir(dirName);
|
||||
|
@ -439,7 +439,7 @@ QString Utils::Fs::QDesktopServicesCacheLocation()
|
|||
|
||||
QString Utils::Fs::QDesktopServicesDownloadLocation()
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||
#ifdef QBT_USES_QT5
|
||||
#if defined(Q_OS_WIN)
|
||||
if (QSysInfo::windowsVersion() <= QSysInfo::WV_XP) // Windows XP
|
||||
return QDir(QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation)).absoluteFilePath(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue