Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed console output in Windows
  • Loading branch information
hluk committed Feb 26, 2012
1 parent 4cd5aee commit 7cd64f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/main.cpp
Expand Up @@ -27,6 +27,10 @@
#include <QSettings>
#include <iostream>

#ifdef Q_WS_WIN
#include <windows.h>
#endif

static void usage()
{
std::cout << QObject::tr(
Expand Down Expand Up @@ -77,6 +81,10 @@ static void usage()

static int startServer(int argc, char *argv[])
{
#ifdef Q_WS_WIN
// FIXME: console window is still shown for a moment
FreeConsole();
#endif
ClipboardServer app(argc, argv);
if ( app.isListening() ) {
return app.exec();
Expand Down
3 changes: 1 addition & 2 deletions src/src.pro
Expand Up @@ -72,8 +72,7 @@ macx {
}
win32 {
SOURCES += ../qxt/qxtglobalshortcut_win.cpp
CONFIG += static
CONFIG += static console
LIBS += -luser32
RC_FILE = copyq.rc
}

0 comments on commit 7cd64f2

Please sign in to comment.