Skip to content

Commit

Permalink
qtmain_win.cpp: Remove unused header files
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
wangwenx190 committed Feb 4, 2019
1 parent aea357c commit 3bf895c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
13 changes: 3 additions & 10 deletions src/winmain/qtmain_win.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -64,9 +60,6 @@
invoked.
*/

QT_USE_NAMESPACE


#if defined(QT_NEEDS_QMAIN)
int qMain(int, char **);
#define main qMain
Expand Down
2 changes: 1 addition & 1 deletion src/winmain/winmain.pro
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ mingw: DEFINES += QT_NEEDS_QMAIN
winrt {
SOURCES = qtmain_winrt.cpp
} else {
CONFIG -= qt
SOURCES = qtmain_win.cpp

LIBS += -lshell32
}

Expand Down

0 comments on commit 3bf895c

Please sign in to comment.