mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 08:27:24 -06:00
Add function windowsSystemPath()
This commit is contained in:
committed by
sledgehammer999
parent
fe54da80cd
commit
7590d0fdad
@@ -670,3 +670,15 @@ QString Utils::Misc::libtorrentVersionString()
|
||||
static const QString ver = LIBTORRENT_VERSION;
|
||||
return ver;
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
QString Utils::Misc::windowsSystemPath()
|
||||
{
|
||||
static const QString path = []() -> QString {
|
||||
WCHAR systemPath[64] = {0};
|
||||
GetSystemDirectoryW(systemPath, sizeof(systemPath) / sizeof(WCHAR));
|
||||
return QString::fromWCharArray(systemPath);
|
||||
}();
|
||||
return path;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -102,12 +102,16 @@ namespace Utils
|
||||
QList<int> intListfromStringList(const QStringList &l);
|
||||
QList<bool> boolListfromStringList(const QStringList &l);
|
||||
|
||||
void msleep(unsigned long msecs);
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
void openPath(const QString& absolutePath);
|
||||
void openFolderSelect(const QString& absolutePath);
|
||||
#endif
|
||||
|
||||
void msleep(unsigned long msecs);
|
||||
#ifdef Q_OS_WIN
|
||||
QString windowsSystemPath();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user