Browse Source

Windows compilation fix improvement

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
8d1fd7ee8e
  1. 5
      src/GUI.cpp
  2. 5
      src/main.cpp

5
src/GUI.cpp

@ -68,6 +68,7 @@ @@ -68,6 +68,7 @@
#ifdef W_WS_WIN
#include <windows.h>
#include <lmcons.h>
#endif
using namespace libtorrent;
@ -167,8 +168,8 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis @@ -167,8 +168,8 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
localServer = new QLocalServer();
QString uid = "";
#ifdef Q_WS_WIN
char buffer[255] = {0};
DWORD buffer_len;
char buffer[UNLEN+1] = {0};
DWORD buffer_len = UNLEN + 1;
if (!GetUserName(buffer, &buffer_len))
uid = QString(buffer)
#else

5
src/main.cpp

@ -59,6 +59,7 @@ @@ -59,6 +59,7 @@
#include "stacktrace.h"
#else
#include <windows.h>
#include <lmcons.h>
#endif
#include <stdlib.h>
@ -181,8 +182,8 @@ int main(int argc, char *argv[]){ @@ -181,8 +182,8 @@ int main(int argc, char *argv[]){
QLocalSocket localSocket;
QString uid;
#ifdef Q_WS_WIN
char buffer[255] = {0};
DWORD buffer_len;
char buffer[UNLEN+1] = {0};
DWORD buffer_len = UNLEN + 1;
if (!GetUserName(buffer, &buffer_len))
uid = QString(buffer)
#else

Loading…
Cancel
Save