mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
Windows compilation fixes (Thanks LiHuiShuo)
This commit is contained in:
@@ -170,8 +170,8 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
#ifdef Q_WS_WIN
|
||||
char buffer[UNLEN+1] = {0};
|
||||
DWORD buffer_len = UNLEN + 1;
|
||||
if (!GetUserName(buffer, &buffer_len))
|
||||
uid = QString(buffer)
|
||||
if (!GetUserNameA(buffer, &buffer_len))
|
||||
uid = QString(buffer);
|
||||
#else
|
||||
uid = QString::number(getuid());
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user