mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-10 23:42:46 -07:00
Use proper type to represent a path
This commit is contained in:
parent
bf8d993743
commit
8a708fd97e
2 changed files with 8 additions and 17 deletions
|
@ -61,7 +61,6 @@
|
|||
#include <QDBusInterface>
|
||||
#endif
|
||||
|
||||
#include "base/path.h"
|
||||
#include "base/types.h"
|
||||
#include "base/unicodestrings.h"
|
||||
#include "base/utils/fs.h"
|
||||
|
@ -510,13 +509,13 @@ QString Utils::Misc::zlibVersionString()
|
|||
}
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
QString Utils::Misc::windowsSystemPath()
|
||||
Path Utils::Misc::windowsSystemPath()
|
||||
{
|
||||
static const QString path = []() -> QString
|
||||
static const Path path = []() -> Path
|
||||
{
|
||||
WCHAR systemPath[MAX_PATH] = {0};
|
||||
GetSystemDirectoryW(systemPath, sizeof(systemPath) / sizeof(WCHAR));
|
||||
return QString::fromWCharArray(systemPath);
|
||||
return Path(QString::fromWCharArray(systemPath));
|
||||
}();
|
||||
return path;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue