summaryrefslogtreecommitdiffstats
path: root/src/winmain
diff options
context:
space:
mode:
authorYuhang Zhao <2546789017@qq.com>2019-01-31 20:36:17 +0800
committerYuhang Zhao <2546789017@qq.com>2019-02-04 01:58:42 +0000
commit3bf895c8d52a4172cd29ab8a8121e37ec790c47d (patch)
tree0c8670269d0bccb0f6328e8ad69b41f761d6244a /src/winmain
parentaea357c6bd28fd460a92980c47efbc9a6f418572 (diff)
qtmain_win.cpp: Remove unused header files
1. Removed all Qt header files and make it a pure win32 project because it doesn't use any Qt features. 2. According to MSDN, CommandLineToArgvW is in shellapi.h, so replace ShlObj.h with it. Change-Id: I3daacb97f34664ac36f8e887a2c31d38f611b16e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/winmain')
-rw-r--r--src/winmain/qtmain_win.cpp13
-rw-r--r--src/winmain/winmain.pro2
2 files changed, 4 insertions, 11 deletions
diff --git a/src/winmain/qtmain_win.cpp b/src/winmain/qtmain_win.cpp
index 0f29c6ac95..5520a447a9 100644
--- a/src/winmain/qtmain_win.cpp
+++ b/src/winmain/qtmain_win.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Windows main function of the Qt Toolkit.
@@ -48,12 +48,8 @@
**
****************************************************************************/
-#include "qt_windows.h"
-#include "qbytearray.h"
-#include "qstring.h"
-#include "qvector.h"
-
-#include <shlobj.h>
+#include <windows.h>
+#include <shellapi.h>
/*
This file contains the code in the qtmain library for Windows.
@@ -64,9 +60,6 @@
invoked.
*/
-QT_USE_NAMESPACE
-
-
#if defined(QT_NEEDS_QMAIN)
int qMain(int, char **);
#define main qMain
diff --git a/src/winmain/winmain.pro b/src/winmain/winmain.pro
index 61e9f29d23..9cb6ab0c59 100644
--- a/src/winmain/winmain.pro
+++ b/src/winmain/winmain.pro
@@ -21,8 +21,8 @@ mingw: DEFINES += QT_NEEDS_QMAIN
winrt {
SOURCES = qtmain_winrt.cpp
} else {
+ CONFIG -= qt
SOURCES = qtmain_win.cpp
-
LIBS += -lshell32
}