mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-09 21:34:20 +00:00
Windows compilation fix improvement
This commit is contained in:
parent
a98a002d57
commit
8d1fd7ee8e
@ -68,6 +68,7 @@
|
|||||||
|
|
||||||
#ifdef W_WS_WIN
|
#ifdef W_WS_WIN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include <lmcons.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using namespace libtorrent;
|
using namespace libtorrent;
|
||||||
@ -167,8 +168,8 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
|||||||
localServer = new QLocalServer();
|
localServer = new QLocalServer();
|
||||||
QString uid = "";
|
QString uid = "";
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_WS_WIN
|
||||||
char buffer[255] = {0};
|
char buffer[UNLEN+1] = {0};
|
||||||
DWORD buffer_len;
|
DWORD buffer_len = UNLEN + 1;
|
||||||
if (!GetUserName(buffer, &buffer_len))
|
if (!GetUserName(buffer, &buffer_len))
|
||||||
uid = QString(buffer)
|
uid = QString(buffer)
|
||||||
#else
|
#else
|
||||||
|
@ -59,6 +59,7 @@
|
|||||||
#include "stacktrace.h"
|
#include "stacktrace.h"
|
||||||
#else
|
#else
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include <lmcons.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -181,8 +182,8 @@ int main(int argc, char *argv[]){
|
|||||||
QLocalSocket localSocket;
|
QLocalSocket localSocket;
|
||||||
QString uid;
|
QString uid;
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_WS_WIN
|
||||||
char buffer[255] = {0};
|
char buffer[UNLEN+1] = {0};
|
||||||
DWORD buffer_len;
|
DWORD buffer_len = UNLEN + 1;
|
||||||
if (!GetUserName(buffer, &buffer_len))
|
if (!GetUserName(buffer, &buffer_len))
|
||||||
uid = QString(buffer)
|
uid = QString(buffer)
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user