mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
Add function windowsSystemPath()
This commit is contained in:
parent
fe54da80cd
commit
7590d0fdad
3 changed files with 18 additions and 7 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue