Remove winrt
Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2
.gitignore
vendored
@ -274,8 +274,6 @@ tags
|
||||
*.exe.embed.manifest
|
||||
*.exe_manifest.rc
|
||||
*.exe_manifest.res
|
||||
*.appxmanifest
|
||||
.qmake.winrt_uuid_*
|
||||
|
||||
# Visual Studio Code generated files
|
||||
.vscode
|
||||
|
@ -117,7 +117,7 @@ Build options:
|
||||
-appstore-compliant .. Disable code that is not allowed in platform app stores.
|
||||
This is on by default for platforms which require distribution
|
||||
through an app store by default, in particular Android,
|
||||
iOS, tvOS, watchOS, and Universal Windows Platform. [auto]
|
||||
iOS, tvOS, and watchOS. [auto]
|
||||
|
||||
-qtnamespace <name> .. Wrap all Qt library code in 'namespace <name> {...}'.
|
||||
-qtlibinfix <infix> .. Rename all libQt5*.so to libQt5*<infix>.so.
|
||||
@ -254,7 +254,7 @@ Core options:
|
||||
Network options:
|
||||
|
||||
-ssl ................. Enable either SSL support method [auto]
|
||||
-no-openssl .......... Do not use OpenSSL [default on Apple and WinRT]
|
||||
-no-openssl .......... Do not use OpenSSL [default on Apple]
|
||||
-openssl-linked ...... Use OpenSSL and link to libssl [no]
|
||||
-openssl-runtime ..... Use OpenSSL and dynamically load libssl [auto]
|
||||
-schannel ............ Use Secure Channel [no] (Windows only)
|
||||
|
@ -419,7 +419,7 @@ qt_feature_config("separate_debug_info" QMAKE_PUBLIC_QT_CONFIG)
|
||||
qt_feature("appstore-compliant" PUBLIC
|
||||
LABEL "App store compliance"
|
||||
PURPOSE "Disables code that is not allowed in platform app stores"
|
||||
AUTODETECT UIKIT OR ANDROID OR WINRT
|
||||
AUTODETECT UIKIT OR ANDROID
|
||||
)
|
||||
qt_feature("simulator_and_device" PUBLIC
|
||||
LABEL "Build for both simulator and device"
|
||||
@ -455,7 +455,7 @@ qt_feature_config("framework" QMAKE_PUBLIC_CONFIG
|
||||
)
|
||||
qt_feature("largefile"
|
||||
LABEL "Large file support"
|
||||
CONDITION NOT ANDROID AND NOT INTEGRITY AND NOT WINRT AND NOT rtems
|
||||
CONDITION NOT ANDROID AND NOT INTEGRITY AND NOT rtems
|
||||
)
|
||||
qt_feature_definition("largefile" "QT_LARGEFILE_SUPPORT" VALUE "64")
|
||||
qt_feature_config("largefile" QMAKE_PRIVATE_CONFIG)
|
||||
@ -756,7 +756,7 @@ qt_feature("concurrent" PUBLIC
|
||||
qt_feature_definition("concurrent" "QT_NO_CONCURRENT" NEGATE VALUE "1")
|
||||
qt_feature("dbus" PUBLIC PRIVATE
|
||||
LABEL "Qt D-Bus"
|
||||
AUTODETECT NOT UIKIT AND NOT ANDROID AND NOT WINRT
|
||||
AUTODETECT NOT UIKIT AND NOT ANDROID
|
||||
CONDITION QT_FEATURE_thread
|
||||
)
|
||||
qt_feature_definition("dbus" "QT_NO_DBUS" NEGATE VALUE "1")
|
||||
@ -930,7 +930,7 @@ qt_configure_add_summary_entry(
|
||||
qt_configure_add_summary_build_parts("Build parts")
|
||||
qt_configure_add_summary_entry(
|
||||
ARGS "appstore-compliant"
|
||||
CONDITION APPLE OR ANDROID OR WINRT OR WIN32
|
||||
CONDITION APPLE OR ANDROID OR WIN32
|
||||
)
|
||||
qt_configure_end_summary_section() # end of "Build options" section
|
||||
qt_configure_add_summary_section(NAME "Qt modules and options")
|
||||
|
@ -807,7 +807,7 @@
|
||||
"appstore-compliant": {
|
||||
"label": "App store compliance",
|
||||
"purpose": "Disables code that is not allowed in platform app stores",
|
||||
"autoDetect": "config.uikit || config.android || config.winrt",
|
||||
"autoDetect": "config.uikit || config.android",
|
||||
"output": [ "publicFeature" ]
|
||||
},
|
||||
"simulator_and_device": {
|
||||
@ -859,7 +859,7 @@
|
||||
},
|
||||
"largefile": {
|
||||
"label": "Large file support",
|
||||
"condition": "!config.android && !config.integrity && !config.winrt && !config.rtems",
|
||||
"condition": "!config.android && !config.integrity && !config.rtems",
|
||||
"output": [
|
||||
"privateConfig",
|
||||
{ "type": "define", "name": "QT_LARGEFILE_SUPPORT", "value": 64 }
|
||||
@ -1302,7 +1302,7 @@
|
||||
},
|
||||
"dbus": {
|
||||
"label": "Qt D-Bus",
|
||||
"autoDetect": "!config.uikit && !config.android && !config.winrt",
|
||||
"autoDetect": "!config.uikit && !config.android",
|
||||
"condition": "features.thread",
|
||||
"output": [ "privateFeature", "feature" ]
|
||||
},
|
||||
@ -1628,7 +1628,7 @@
|
||||
{
|
||||
"type": "feature",
|
||||
"args": "appstore-compliant",
|
||||
"condition": "config.darwin || config.android || config.winrt || config.win32"
|
||||
"condition": "config.darwin || config.android || config.win32"
|
||||
}
|
||||
]
|
||||
}, {
|
||||
|
@ -211,9 +211,7 @@ defineReplace(qtConfFunc_licenseCheck) {
|
||||
showWhat = "Type 'L' to view the GNU Lesser General Public License version 3 (LGPLv3)."
|
||||
gpl2Ok = false
|
||||
gpl3Ok = false
|
||||
winrt {
|
||||
notTheLicense = "Note: GPL version 2 is not available on WinRT."
|
||||
} else: wasm {
|
||||
wasm {
|
||||
gpl3Ok = true
|
||||
theLicense = "GNU General Public License (GPL) version 3"
|
||||
showWhat = "Type 'G' to view the GNU General Public License version 3 (GPLv3)."
|
||||
|
@ -1,6 +1,6 @@
|
||||
#
|
||||
# qmake configuration for Microsoft Visual Studio C/C++ Compiler
|
||||
# This file is used by win32-msvc and all winrt-XXX-msvcXXX specs
|
||||
# This file is used by win32-msvc
|
||||
#
|
||||
|
||||
#
|
||||
|
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 737 B |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.1 KiB |
@ -1,52 +0,0 @@
|
||||
<?xml version=\"1.0\" encoding=\"utf-8\"?>
|
||||
|
||||
<Package
|
||||
xmlns=\"http://schemas.microsoft.com/appx/manifest/foundation/windows10\"
|
||||
xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\"
|
||||
xmlns:uap=\"http://schemas.microsoft.com/appx/manifest/uap/windows10\"
|
||||
xmlns:uap3=\"http://schemas.microsoft.com/appx/manifest/uap/windows10/3\"
|
||||
xmlns:mobile=\"http://schemas.microsoft.com/appx/manifest/mobile/windows10\"
|
||||
xmlns:iot=\"http://schemas.microsoft.com/appx/manifest/iot/windows10\"
|
||||
IgnorableNamespaces=\"uap uap3 mp mobile iot\">
|
||||
|
||||
<Identity
|
||||
Name=\"$${WINRT_MANIFEST.identity}\"
|
||||
Publisher=\"$${WINRT_MANIFEST.publisherid}\"
|
||||
Version=\"$${WINRT_MANIFEST.version}\"
|
||||
ProcessorArchitecture=\"$${WINRT_MANIFEST.architecture}\" />
|
||||
|
||||
<mp:PhoneIdentity PhoneProductId=\"$${WINRT_MANIFEST.identity}\" PhonePublisherId=\"$${WINRT_MANIFEST.phone_publisher_id}\"/>
|
||||
|
||||
<Properties>
|
||||
<DisplayName>$${WINRT_MANIFEST.name}</DisplayName>
|
||||
<PublisherDisplayName>$${WINRT_MANIFEST.publisher}</PublisherDisplayName>
|
||||
<Logo>$${WINRT_MANIFEST.logo_store}</Logo>
|
||||
</Properties>
|
||||
|
||||
<Dependencies>
|
||||
<TargetDeviceFamily Name=\"Windows.Universal\"
|
||||
MinVersion=\"$${WINRT_MANIFEST.minVersion}\"
|
||||
MaxVersionTested=\"$${WINRT_MANIFEST.maxVersionTested}\" />$${WINRT_MANIFEST.dependencies}
|
||||
</Dependencies>
|
||||
|
||||
<Resources>
|
||||
<Resource Language=\"en\"/>
|
||||
</Resources>
|
||||
|
||||
<Applications>
|
||||
<Application Id=\"App\"
|
||||
Executable=\"$${WINRT_MANIFEST.target}.exe\"
|
||||
EntryPoint=\"$${WINRT_MANIFEST.target}.App\">
|
||||
<uap:VisualElements
|
||||
DisplayName=\"$${WINRT_MANIFEST.name}\"
|
||||
Description=\"$${WINRT_MANIFEST.description}\"
|
||||
BackgroundColor=\"$${WINRT_MANIFEST.background}\"
|
||||
Square150x150Logo=\"$${WINRT_MANIFEST.logo_150x150}\"
|
||||
Square44x44Logo=\"$${WINRT_MANIFEST.logo_44x44}\">
|
||||
|
||||
<uap:SplashScreen Image=\"$${WINRT_MANIFEST.logo_620x300}\" />
|
||||
</uap:VisualElements>
|
||||
</Application>
|
||||
</Applications>
|
||||
$${WINRT_MANIFEST.capabilities}
|
||||
</Package>
|
@ -1,103 +0,0 @@
|
||||
#
|
||||
# qmake configuration for winrt and windows phone 8.1
|
||||
#
|
||||
# Written for Microsoft Visual C++
|
||||
#
|
||||
|
||||
MAKEFILE_GENERATOR = MSBUILD
|
||||
QMAKE_COMPILER = msvc
|
||||
QMAKE_PLATFORM = winrt win32
|
||||
CONFIG = package_manifest $$CONFIG incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target rtti
|
||||
# MSVC 2017 15.8+ fixed std::aligned_storage but compilation fails without
|
||||
# _ENABLE_EXTENDED_ALIGNED_STORAGE flag since the fix breaks binary compatibility.
|
||||
DEFINES += UNICODE WIN32 QT_LARGEFILE_SUPPORT Q_BYTE_ORDER=Q_LITTLE_ENDIAN _ENABLE_EXTENDED_ALIGNED_STORAGE
|
||||
DEFINES_RELEASE += NDEBUG
|
||||
QMAKE_COMPILER_DEFINES += _WIN32
|
||||
|
||||
DEPLOYMENT_PLUGIN += qwinrt
|
||||
|
||||
QMAKE_CC = cl
|
||||
QMAKE_LEX = flex
|
||||
QMAKE_LEXFLAGS =
|
||||
QMAKE_YACC = bison -y
|
||||
QMAKE_YACCFLAGS = -d
|
||||
QMAKE_CFLAGS = -nologo
|
||||
QMAKE_CFLAGS_WARN_ON = -W3
|
||||
QMAKE_CFLAGS_WARN_OFF = -W0
|
||||
QMAKE_CFLAGS_RELEASE = -O2 -MD
|
||||
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi
|
||||
QMAKE_CFLAGS_DEBUG = -Zi -MDd
|
||||
QMAKE_CFLAGS_YACC =
|
||||
QMAKE_CFLAGS_LTCG = -GL
|
||||
QMAKE_CFLAGS_MP = -MP
|
||||
QMAKE_CFLAGS_SSE2 = -arch:SSE2
|
||||
QMAKE_CFLAGS_SSE3 = -arch:SSE2
|
||||
QMAKE_CFLAGS_SSSE3 = -arch:SSE2
|
||||
QMAKE_CFLAGS_SSE4_1 = -arch:SSE2
|
||||
QMAKE_CFLAGS_SSE4_2 = -arch:SSE2
|
||||
QMAKE_CFLAGS_AVX = -arch:AVX
|
||||
QMAKE_CFLAGS_AVX2 = -arch:AVX
|
||||
QMAKE_CFLAGS_AESNI = -arch:SSE2
|
||||
QMAKE_CFLAGS_SHANI = -arch:SSE2
|
||||
|
||||
QMAKE_CXX = $$QMAKE_CC
|
||||
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
|
||||
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189 -w44996
|
||||
QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
|
||||
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
|
||||
QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
|
||||
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
|
||||
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
|
||||
QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
|
||||
QMAKE_CXXFLAGS_MP = $$QMAKE_CFLAGS_MP
|
||||
QMAKE_CXXFLAGS_STL_ON = -EHsc
|
||||
QMAKE_CXXFLAGS_STL_OFF =
|
||||
QMAKE_CXXFLAGS_RTTI_ON = -GR
|
||||
QMAKE_CXXFLAGS_RTTI_OFF =
|
||||
QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc
|
||||
QMAKE_CXXFLAGS_EXCEPTIONS_OFF = /wd4530 /wd4577
|
||||
|
||||
QMAKE_INCDIR =
|
||||
|
||||
QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src
|
||||
QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $<
|
||||
QMAKE_RUN_CC_IMP_BATCH = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ @<<
|
||||
QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src
|
||||
QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $<
|
||||
QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<
|
||||
|
||||
QMAKE_LINK = link
|
||||
QMAKE_LFLAGS = /NOLOGO /DYNAMICBASE /NXCOMPAT /NODEFAULTLIB:ole32.lib /APPCONTAINER
|
||||
QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
|
||||
QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /DEBUG /OPT:REF /INCREMENTAL:NO
|
||||
QMAKE_LFLAGS_DEBUG = /DEBUG
|
||||
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS
|
||||
QMAKE_LFLAGS_EXE = /MANIFEST:NO
|
||||
QMAKE_LFLAGS_DLL = /MANIFEST:NO /DLL
|
||||
QMAKE_LFLAGS_LTCG = /LTCG
|
||||
QMAKE_PREFIX_SHLIB =
|
||||
QMAKE_EXTENSION_SHLIB = dll
|
||||
QMAKE_PREFIX_STATICLIB =
|
||||
QMAKE_EXTENSION_STATICLIB = lib
|
||||
|
||||
QMAKE_LIBS += runtimeobject.lib
|
||||
QMAKE_LIBS_GUI =
|
||||
QMAKE_LIBS_NETWORK += ws2_32.lib
|
||||
|
||||
QMAKE_LIBS_QT_ENTRY = -lqtmain
|
||||
|
||||
QMAKE_IDL = midl
|
||||
QMAKE_LIB = lib /NOLOGO
|
||||
QMAKE_RC = rc
|
||||
|
||||
VCPROJ_EXTENSION = .vcxproj
|
||||
VCSOLUTION_EXTENSION = .sln
|
||||
VCPROJ_KEYWORD = Qt4VSv1.0
|
||||
WINRT_ASSETS_PATH = $$PWD/assets
|
||||
|
||||
WINRT_MANIFEST.capabilities = defaults
|
||||
WINRT_MANIFEST.capabilities_device = defaults
|
||||
|
||||
WINDOWS_TARGET_PLATFORM_VERSION = $$(UCRTVERSION)
|
||||
|
||||
load(qt_config)
|
@ -1,139 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the qmake spec of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QPLATFORMDEFS_H
|
||||
#define QPLATFORMDEFS_H
|
||||
|
||||
#ifdef UNICODE
|
||||
#ifndef _UNICODE
|
||||
#define _UNICODE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Get Qt defines/settings
|
||||
|
||||
#include "qglobal.h"
|
||||
#include "qfunctions_winrt.h"
|
||||
|
||||
#define _POSIX_
|
||||
#include <limits.h>
|
||||
#undef _POSIX_
|
||||
|
||||
#include <tchar.h>
|
||||
#include <io.h>
|
||||
#include <direct.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef QT_LARGEFILE_SUPPORT
|
||||
#define QT_STATBUF struct _stati64 // non-ANSI defs
|
||||
#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs
|
||||
#define QT_STAT ::_stati64
|
||||
#define QT_FSTAT ::_fstati64
|
||||
#else
|
||||
#define QT_STATBUF struct _stat // non-ANSI defs
|
||||
#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs
|
||||
#define QT_STAT ::_stat
|
||||
#define QT_FSTAT ::_fstat
|
||||
#endif
|
||||
#define QT_STAT_REG _S_IFREG
|
||||
#define QT_STAT_DIR _S_IFDIR
|
||||
#define QT_STAT_MASK _S_IFMT
|
||||
#if defined(_S_IFLNK)
|
||||
# define QT_STAT_LNK _S_IFLNK
|
||||
#endif
|
||||
#define QT_FILENO _fileno
|
||||
#define QT_OPEN ::_open
|
||||
#define QT_CLOSE ::_close
|
||||
#ifdef QT_LARGEFILE_SUPPORT
|
||||
#define QT_LSEEK ::_lseeki64
|
||||
#define QT_TSTAT ::_tstati64
|
||||
#else
|
||||
#define QT_LSEEK ::_lseek
|
||||
#define QT_TSTAT ::_tstat
|
||||
#endif
|
||||
#define QT_READ ::_read
|
||||
#define QT_WRITE ::_write
|
||||
#define QT_ACCESS ::_access
|
||||
#define QT_GETCWD ::_getcwd
|
||||
#define QT_CHDIR ::_chdir
|
||||
#define QT_MKDIR ::_mkdir
|
||||
#define QT_RMDIR ::_rmdir
|
||||
#define QT_OPEN_LARGEFILE 0
|
||||
#define QT_OPEN_RDONLY _O_RDONLY
|
||||
#define QT_OPEN_WRONLY _O_WRONLY
|
||||
#define QT_OPEN_RDWR _O_RDWR
|
||||
#define QT_OPEN_CREAT _O_CREAT
|
||||
#define QT_OPEN_TRUNC _O_TRUNC
|
||||
#define QT_OPEN_APPEND _O_APPEND
|
||||
#if defined(O_TEXT)
|
||||
# define QT_OPEN_TEXT _O_TEXT
|
||||
# define QT_OPEN_BINARY _O_BINARY
|
||||
#endif
|
||||
|
||||
#include "../common/c89/qplatformdefs.h"
|
||||
|
||||
#ifdef QT_LARGEFILE_SUPPORT
|
||||
#undef QT_FSEEK
|
||||
#undef QT_FTELL
|
||||
#undef QT_OFF_T
|
||||
|
||||
#define QT_FSEEK ::_fseeki64
|
||||
#define QT_FTELL ::_ftelli64
|
||||
#define QT_OFF_T __int64
|
||||
#endif
|
||||
|
||||
#define QT_SIGNAL_ARGS int
|
||||
|
||||
#define QT_VSNPRINTF(buffer, count, format, arg) \
|
||||
vsnprintf_s(buffer, count, count-1, format, arg)
|
||||
|
||||
#define QT_SNPRINTF ::_snprintf
|
||||
|
||||
# define F_OK 0
|
||||
# define X_OK 1
|
||||
# define W_OK 2
|
||||
# define R_OK 4
|
||||
|
||||
typedef int mode_t;
|
||||
|
||||
#endif // QPLATFORMDEFS_H
|
@ -39,12 +39,6 @@ defineTest(qtCompileTest) {
|
||||
# Disable qmake features which are typically counterproductive for tests
|
||||
qmake_configs = "\"CONFIG -= qt debug_and_release app_bundle lib_bundle\""
|
||||
|
||||
# On WinRT we need to change the entry point as we cannot create windows
|
||||
# applications
|
||||
winrt {
|
||||
qmake_configs += " \"QMAKE_LFLAGS+=/ENTRY:main\""
|
||||
}
|
||||
|
||||
# Clean up after previous run
|
||||
exists($$test_out_dir/Makefile):qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE distclean")
|
||||
|
||||
|
@ -226,15 +226,6 @@ for(ever) {
|
||||
}
|
||||
}
|
||||
QMAKE_USE$$var_sfx += $$MODULE_USES
|
||||
# Add capabilities as defined by modules used in the project
|
||||
winrt {
|
||||
MODULE_WINRT_CAPABILITIES = $$eval(QT.$${QTLIB}.winrt_capabilities)
|
||||
!isEmpty(MODULE_WINRT_CAPABILITIES): \
|
||||
WINRT_MANIFEST.capabilities_default += $$MODULE_WINRT_CAPABILITIES
|
||||
MODULE_WINRT_CAPABILITIES_DEVICE = $$eval(QT.$${QTLIB}.winrt_capabilities_device)
|
||||
!isEmpty(MODULE_WINRT_CAPABILITIES_DEVICE): \
|
||||
WINRT_MANIFEST.capabilities_device_default += $$MODULE_WINRT_CAPABILITIES_DEVICE
|
||||
}
|
||||
}
|
||||
!isEmpty(BAD_QT):error("Unknown module(s) in QT$$var_sfx: $$replace(BAD_QT, _private$, -private)")
|
||||
|
||||
|
@ -85,7 +85,7 @@ CONFIG = qt_build_extra $$CONFIG
|
||||
cross_compile: \
|
||||
CONFIG += force_bootstrap
|
||||
|
||||
android|uikit|winrt: \
|
||||
android|uikit: \
|
||||
CONFIG += builtin_testdata
|
||||
|
||||
# Prevent warnings about object files without any symbols
|
||||
|
@ -1225,11 +1225,6 @@ defineTest(qtConfTest_compile) {
|
||||
qmake_args += "\"CONFIG += $$qmake_configs\""
|
||||
|
||||
!$$host|!cross_compile {
|
||||
# On WinRT we need to change the entry point as we cannot create windows
|
||||
# applications
|
||||
winrt: \
|
||||
qmake_args += " \"QMAKE_LFLAGS += /ENTRY:main\""
|
||||
|
||||
# add compiler flags, these are set for the target and should not be applied to host tests
|
||||
!isEmpty(EXTRA_DEFINES): \
|
||||
qmake_args += $$system_quote(DEFINES += $$val_escape(EXTRA_DEFINES))
|
||||
|
@ -154,9 +154,6 @@ defineReplace(qtExportLibsForModule) {
|
||||
"QT_CONFIG +=$$join(QT.$${MODULE_ID}.QT_CONFIG, " ", " ")" \
|
||||
"" \
|
||||
"QT_MODULES += $$MODULE"
|
||||
winrt: MODULE_PRI_CONT += \
|
||||
"QT.$${MODULE_ID}.winrt_capabilities =$$join(MODULE_WINRT_CAPABILITIES, " ", " ")" \
|
||||
"QT.$${MODULE_ID}.winrt_capabilities_device =$$join(MODULE_WINRT_CAPABILITIES_DEVICE, " ", " ")"
|
||||
write_file($$MODULE_PRI, MODULE_PRI_CONT)|error()
|
||||
!internal_module:!no_private_module {
|
||||
module_build_type += internal_module
|
||||
@ -233,7 +230,6 @@ defineReplace(qtExportLibsForModule) {
|
||||
for(var, $$list(VERSION MAJOR_VERSION MINOR_VERSION PATCH_VERSION \
|
||||
name module depends run_depends plugin_types module_config CONFIG DEFINES \
|
||||
priority includes bins libs frameworks \
|
||||
winrt_capabilities winrt_capabilities_device \
|
||||
)):defined(QT.$${mod}.$$var, var):cache(QT.$${mod}.$$var, transient)
|
||||
}
|
||||
cache(QT_MODULES, transient)
|
||||
|
@ -153,10 +153,10 @@ msvc {
|
||||
arch = amd64
|
||||
else: !equals(arch, arm):!equals(arch, arm64): \ # may be "win32" or undefined
|
||||
arch = x86
|
||||
# Consider only WinRT and ARM64 desktop builds to be cross-builds -
|
||||
# Consider only ARM64 desktop builds to be cross-builds -
|
||||
# the host is assumed to be Intel and capable of running the target
|
||||
# executables (so building for x64 on x86 will break).
|
||||
winrt|equals(arch, arm64): \
|
||||
equals(arch, arm64): \
|
||||
CONFIG += msvc_cross
|
||||
}
|
||||
|
||||
@ -337,7 +337,6 @@ isEmpty($${target_prefix}.INCDIRS) {
|
||||
error("Failed to find the Visual C installation directory.")
|
||||
cmd += $$system_quote($$dir\\vcvarsall.bat) $$arch
|
||||
}
|
||||
winrt: cmd += store
|
||||
|
||||
isEmpty(WINSDK_VER): \
|
||||
error("Mkspec does not specify WINSDK_VER. Cannot continue.")
|
||||
|
@ -1,5 +0,0 @@
|
||||
# This is an empty prf file to overwrite the win32 version.
|
||||
# On Windows RT all applications need to be windows applications
|
||||
# and also link to winmain. Inside winmain we create the launch
|
||||
# arguments and also initialize the UI.
|
||||
|
@ -1,14 +0,0 @@
|
||||
# Note that the order is important - ucrt(d) has to be first.
|
||||
# Otherwise, the linker might use malloc from a different library,
|
||||
# but free_dbg() from the runtime, causing an assertion failure
|
||||
# due to deleting an item from a different heap.
|
||||
# vcruntime(d) is necessary when we don't link to any libraries
|
||||
# which would pull it in transitively.
|
||||
CONFIG(debug, debug|release): \
|
||||
QMAKE_LIBS = ucrtd.lib vcruntimed.lib $$QMAKE_LIBS
|
||||
else: \
|
||||
QMAKE_LIBS = ucrt.lib vcruntime.lib $$QMAKE_LIBS
|
||||
|
||||
equals(TEMPLATE, "vcapp"):!static: CONFIG += windeployqt
|
||||
|
||||
load(default_pre)
|
@ -1,200 +0,0 @@
|
||||
# This performs basic variable replacement on the contents of the WinRT manifest template, as
|
||||
# specified by WINRT_MANIFEST. The resulting manifest file is written to the output directory.
|
||||
# While the most common options are covered by the default template, the developer is expected
|
||||
# to make an application-level copy of the template in order to customize the manifest further.
|
||||
# Afterwards, they can override the default template by assigning their template to WINRT_MANIFEST.
|
||||
#
|
||||
# All subkeys in WINRT_MANIFEST will be replaced if defined/found, so new variables can be easily
|
||||
# added.
|
||||
|
||||
# The manifest is generated for each build pass for normal apps, and only once for vcapps.
|
||||
# - Normal apps have their package root directory in the same place as the target (one for each build pass).
|
||||
# - Visual Studio requires a design-mode manifest in the same location as the vcproj.
|
||||
!isEmpty(WINRT_MANIFEST): \
|
||||
if(build_pass:equals(TEMPLATE, "app"))| \
|
||||
if(!build_pass:equals(TEMPLATE, "vcapp")) {
|
||||
|
||||
manifest_file.input = $$WINRT_MANIFEST
|
||||
|
||||
contains(TEMPLATE, "vc.*") {
|
||||
BUILD_DIR = $$OUT_PWD
|
||||
} else {
|
||||
load(resolve_target)
|
||||
BUILD_DIR = $$dirname(QMAKE_RESOLVED_TARGET)
|
||||
}
|
||||
|
||||
contains(TEMPLATE, "vc.*"): \
|
||||
manifest_file.output = $$BUILD_DIR/Package.appxmanifest
|
||||
else: \
|
||||
manifest_file.output = $$BUILD_DIR/AppxManifest.xml
|
||||
|
||||
!contains(WINRT_MANIFEST.CONFIG, "verbatim") {
|
||||
# Provide the C-runtime dependency
|
||||
equals(TEMPLATE, "app") {
|
||||
VCLIBS = Microsoft.VCLibs.$$replace(MSVC_VER, \\., ).00
|
||||
CONFIG(debug, debug|release): \
|
||||
VCLIBS = $${VCLIBS}.Debug
|
||||
else: \
|
||||
VCLIBS = $${VCLIBS}
|
||||
# VS 2017 and 2019 still use vclibs 140
|
||||
contains(MSVC_VER, "15.0"): VCLIBS = $$replace(VCLIBS, 150, 140)
|
||||
contains(MSVC_VER, "16.0"): VCLIBS = $$replace(VCLIBS, 160, 140)
|
||||
VCLIBS = "$${VCLIBS}\" MinVersion=\"14.0.0.0\" Publisher=\"CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
|
||||
WINRT_MANIFEST.dependencies += $$VCLIBS
|
||||
}
|
||||
|
||||
# Provide default values for required variables
|
||||
isEmpty(WINRT_MANIFEST.target): WINRT_MANIFEST.target = $$TARGET
|
||||
isEmpty(WINRT_MANIFEST.identity) {
|
||||
# Reuse the existing UUID if possible
|
||||
UUID_CACHE = $$OUT_PWD/.qmake.winrt_uuid_$$TARGET
|
||||
exists($$UUID_CACHE) {
|
||||
include($$UUID_CACHE)
|
||||
} else {
|
||||
WINRT_UUID = $$system(uuidgen)
|
||||
isEmpty(WINRT_UUID): error("Unable to generate a UUID. Make sure uuidgen is in your PATH.")
|
||||
WINRT_UUID = "WINRT_MANIFEST.identity = $$WINRT_UUID"
|
||||
write_file($$UUID_CACHE, WINRT_UUID)|error("Unable to write the UUID cache; aborting.")
|
||||
eval($$WINRT_UUID)
|
||||
}
|
||||
}
|
||||
isEmpty(WINRT_MANIFEST.name): WINRT_MANIFEST.name = $$TARGET
|
||||
isEmpty(WINRT_MANIFEST.architecture): WINRT_MANIFEST.architecture = $$VCPROJ_ARCH
|
||||
isEmpty(WINRT_MANIFEST.version): WINRT_MANIFEST.version = 1.0.0.0
|
||||
isEmpty(WINRT_MANIFEST.publisher): WINRT_MANIFEST.publisher = Default publisher display name
|
||||
isEmpty(WINRT_MANIFEST.publisherid): WINRT_MANIFEST.publisherid = CN=$$(USERNAME)
|
||||
isEmpty(WINRT_MANIFEST.phone_product_id): WINRT_MANIFEST.phone_product_id = $$WINRT_MANIFEST.identity
|
||||
isEmpty(WINRT_MANIFEST.phone_publisher_id): WINRT_MANIFEST.phone_publisher_id = 00000000-0000-0000-0000-000000000000
|
||||
isEmpty(WINRT_MANIFEST.description): WINRT_MANIFEST.description = Default package description
|
||||
isEmpty(WINRT_MANIFEST.background): WINRT_MANIFEST.background = green
|
||||
isEmpty(WINRT_MANIFEST.foreground): WINRT_MANIFEST.foreground = light
|
||||
isEmpty(WINRT_MANIFEST.default_language): WINRT_MANIFEST.default_language = en
|
||||
isEmpty(WINRT_MANIFEST.minVersion): \
|
||||
WINRT_MANIFEST.minVersion = $$WINDOWS_TARGET_PLATFORM_VERSION
|
||||
isEmpty(WINRT_MANIFEST.maxVersionTested): \
|
||||
WINRT_MANIFEST.maxVersionTested = $$WINDOWS_TARGET_PLATFORM_MIN_VERSION
|
||||
|
||||
INDENT = "$$escape_expand(\\r\\n) "
|
||||
|
||||
VS_XML_NAMESPACE = "m2"
|
||||
WINRT_MANIFEST.rotation_preference = $$unique(WINRT_MANIFEST.rotation_preference)
|
||||
!isEmpty(WINRT_MANIFEST.rotation_preference) {
|
||||
MANIFEST_ROTATION += "<$${VS_XML_NAMESPACE}:InitialRotationPreference>"
|
||||
for(ROTATION, WINRT_MANIFEST.rotation_preference): \
|
||||
MANIFEST_ROTATION += " <$${VS_XML_NAMESPACE}:Rotation Preference=\"$$ROTATION\" />"
|
||||
MANIFEST_ROTATION += "</$${VS_XML_NAMESPACE}:InitialRotationPreference>"
|
||||
|
||||
WINRT_MANIFEST.rotation_preference = $$join(MANIFEST_ROTATION, $$INDENT, $$INDENT)
|
||||
}
|
||||
|
||||
INDENT = "$$escape_expand(\\r\\n) "
|
||||
|
||||
# All Windows 10 applications need to have internetClient.
|
||||
WINRT_MANIFEST.capabilities += internetClient
|
||||
|
||||
contains(WINRT_MANIFEST.capabilities, defaults) {
|
||||
WINRT_MANIFEST.capabilities -= defaults
|
||||
WINRT_MANIFEST.capabilities += $$WINRT_MANIFEST.capabilities_default
|
||||
}
|
||||
|
||||
contains(WINRT_MANIFEST.capabilities_device, defaults) {
|
||||
WINRT_MANIFEST.capabilities_device -= defaults
|
||||
WINRT_MANIFEST.capabilities_device += $$WINRT_MANIFEST.capabilities_device_default
|
||||
}
|
||||
|
||||
UAP_CAPABILITIES += \
|
||||
appointments \
|
||||
blockedChatMessages \
|
||||
chat \
|
||||
contacts \
|
||||
enterpriseAuthentication \
|
||||
# internetClient is special, as it needs to be written without namespace
|
||||
#internetClient \
|
||||
musicLibrary \
|
||||
objects3D \
|
||||
phoneCall \
|
||||
picturesLibrary \
|
||||
removableStorage \
|
||||
sharedUserCertificates \
|
||||
userAccountInformation \
|
||||
videosLibrary \
|
||||
voipCall
|
||||
|
||||
UAP3_CAPABILITIES += backgroundMediaPlayback remoteSystem userNotificationListener
|
||||
|
||||
IOT_CAPABILITIES += systemManagement
|
||||
|
||||
# Capabilities are given as a string list and may change with the configuration (network, sensors, etc.)
|
||||
WINRT_MANIFEST.capabilities = $$unique(WINRT_MANIFEST.capabilities)
|
||||
WINRT_MANIFEST.capabilities_device = $$unique(WINRT_MANIFEST.capabilities_device)
|
||||
!isEmpty(WINRT_MANIFEST.capabilities)|!isEmpty(WINRT_MANIFEST.capabilities_device) {
|
||||
MANIFEST_CAPABILITIES += "<Capabilities>"
|
||||
for (CAPABILITY, WINRT_MANIFEST.capabilities) {
|
||||
contains(UAP_CAPABILITIES, $$CAPABILITY): \
|
||||
MANIFEST_CAPABILITIES += " <uap:Capability Name=\"$$CAPABILITY\" />"
|
||||
else:contains(UAP3_CAPABILITIES, $$CAPABILITY): \
|
||||
MANIFEST_CAPABILITIES += " <uap3:Capability Name=\"$$CAPABILITY\" />"
|
||||
else:contains(IOT_CAPABILITIES, $$CAPABILITY): \
|
||||
MANIFEST_CAPABILITIES += " <iot:Capability Name=\"$$CAPABILITY\" />"
|
||||
else: \
|
||||
MANIFEST_CAPABILITIES += " <Capability Name=\"$$CAPABILITY\" />"
|
||||
}
|
||||
for(CAPABILITY, WINRT_MANIFEST.capabilities_device): \
|
||||
MANIFEST_CAPABILITIES += " <DeviceCapability Name=\"$$CAPABILITY\" />"
|
||||
MANIFEST_CAPABILITIES += "</Capabilities>"
|
||||
|
||||
WINRT_MANIFEST.capabilities = $$join(MANIFEST_CAPABILITIES, $$INDENT, $$INDENT)
|
||||
}
|
||||
|
||||
# Dependencies are given as a string list. The CRT dependency is added automatically above.
|
||||
# For MSVC2015/2017 the dependencies are added in conjunction with TargetDeviceFamily
|
||||
# Due to the hard coded dependency on "Windows.Universal" the <Dependencies> tag
|
||||
# is already inside the MSVC2015 manifest.
|
||||
WINRT_MANIFEST.dependencies = $$unique(WINRT_MANIFEST.dependencies)
|
||||
!isEmpty(WINRT_MANIFEST.dependencies) {
|
||||
for(DEPENDENCY, WINRT_MANIFEST.dependencies): \
|
||||
MANIFEST_DEPENDENCIES += " <PackageDependency Name=\"$$DEPENDENCY\" />"
|
||||
|
||||
WINRT_MANIFEST.dependencies = $$join(MANIFEST_DEPENDENCIES, $$INDENT, $$INDENT)
|
||||
}
|
||||
|
||||
# Provide default icons where needed
|
||||
isEmpty(WINRT_ASSETS_PATH): WINRT_ASSETS_PATH = $$[QT_HOST_DATA/get]/mkspecs/common/winrt_winphone/assets
|
||||
TEMPLATE_CONTENTS = $$cat($$WINRT_MANIFEST, lines)
|
||||
ICONS_FOUND = $$find(TEMPLATE_CONTENTS, \\\$\\\$\\{WINRT_MANIFEST\\.(logo|tile)_)
|
||||
ICONS_FOUND ~= s/.*\\\$\\\$\\{WINRT_MANIFEST\\.((logo|tile)_[^\}]+)\\}.*/\\1/g
|
||||
for (ICON_NAME, ICONS_FOUND) {
|
||||
ICON_FILE = $$eval(WINRT_MANIFEST.$$ICON_NAME)
|
||||
isEmpty(ICON_FILE) {
|
||||
equals(ICON_NAME, "logo_310x150"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_wide)
|
||||
else: equals(ICON_NAME, "logo_150x150"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_large)
|
||||
# Windows Phone specifics
|
||||
else: equals(ICON_NAME, "logo_480x800"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_splash)
|
||||
else: equals(ICON_NAME, "logo_71x71"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_medium)
|
||||
else: equals(ICON_NAME, "logo_44x44"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_small)
|
||||
# Windows RT specifics
|
||||
else: equals(ICON_NAME, "logo_620x300"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_splash)
|
||||
else: equals(ICON_NAME, "logo_70x70"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_medium)
|
||||
else: equals(ICON_NAME, "logo_30x30"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_small)
|
||||
}
|
||||
isEmpty(ICON_FILE): ICON_FILE = $$WINRT_ASSETS_PATH/$${ICON_NAME}.png
|
||||
icon_$${ICON_NAME}.input = $$ICON_FILE
|
||||
icon_$${ICON_NAME}.output = $$BUILD_DIR/assets/$$basename(ICON_FILE)
|
||||
icon_$${ICON_NAME}.CONFIG = verbatim
|
||||
QMAKE_SUBSTITUTES += icon_$${ICON_NAME}
|
||||
WINRT_MANIFEST.$${ICON_NAME} = assets/$$basename(ICON_FILE)
|
||||
}
|
||||
|
||||
!contains(TEMPLATE, "vc.*") {
|
||||
winrt_manifest_install.files = $$manifest_file.output
|
||||
winrt_manifest_install.path = $$target.path
|
||||
winrt_assets_install.files = $$BUILD_DIR/assets/*
|
||||
winrt_assets_install.path = $$target.path/assets
|
||||
INSTALLS += winrt_manifest_install winrt_assets_install
|
||||
}
|
||||
} else {
|
||||
manifest_file.CONFIG += verbatim
|
||||
}
|
||||
|
||||
QMAKE_SUBSTITUTES += manifest_file
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
#
|
||||
# qmake configuration for winrt-arm-msvc2015
|
||||
#
|
||||
# Written for Microsoft Visual C++ 2015
|
||||
#
|
||||
|
||||
include(../common/winrt_winphone/qmake.conf)
|
||||
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 ARM __ARM__ __arm__
|
||||
|
||||
QMAKE_CFLAGS += -FS
|
||||
QMAKE_CXXFLAGS += -FS
|
||||
QMAKE_LFLAGS += /MACHINE:ARM /NODEFAULTLIB:kernel32.lib
|
||||
|
||||
QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
|
||||
|
||||
VCPROJ_ARCH = ARM
|
||||
WINSDK_VER = 10.0
|
||||
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
|
||||
WINRT_MANIFEST.architecture = arm
|
@ -1,40 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the qmake spec of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "../common/winrt_winphone/qplatformdefs.h"
|
@ -1,19 +0,0 @@
|
||||
#
|
||||
# qmake configuration for winrt-arm-msvc2017
|
||||
#
|
||||
# Written for Microsoft Visual C++ 2017
|
||||
#
|
||||
|
||||
include(../common/winrt_winphone/qmake.conf)
|
||||
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 ARM __ARM__ __arm__
|
||||
|
||||
QMAKE_CFLAGS += -FS
|
||||
QMAKE_CXXFLAGS += -FS
|
||||
QMAKE_LFLAGS += /MACHINE:ARM /NODEFAULTLIB:kernel32.lib
|
||||
|
||||
QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
|
||||
|
||||
VCPROJ_ARCH = ARM
|
||||
WINSDK_VER = 10.0
|
||||
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
|
||||
WINRT_MANIFEST.architecture = arm
|
@ -1,40 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2017 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the qmake spec of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "../common/winrt_winphone/qplatformdefs.h"
|
@ -1,19 +0,0 @@
|
||||
#
|
||||
# qmake configuration for winrt-arm-msvc2019
|
||||
#
|
||||
# Written for Microsoft Visual C++ 2019
|
||||
#
|
||||
|
||||
include(../common/winrt_winphone/qmake.conf)
|
||||
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 ARM __ARM__ __arm__
|
||||
|
||||
QMAKE_CFLAGS += -FS
|
||||
QMAKE_CXXFLAGS += -FS
|
||||
QMAKE_LFLAGS += /MACHINE:ARM /NODEFAULTLIB:kernel32.lib
|
||||
|
||||
QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
|
||||
|
||||
VCPROJ_ARCH = ARM
|
||||
WINSDK_VER = 10.0
|
||||
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
|
||||
WINRT_MANIFEST.architecture = arm
|
@ -1,40 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the qmake spec of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "../common/winrt_winphone/qplatformdefs.h"
|
@ -1,19 +0,0 @@
|
||||
#
|
||||
# qmake configuration for winrt-arm64-msvc2017
|
||||
#
|
||||
# Written for Microsoft Visual C++ 2017
|
||||
#
|
||||
|
||||
include(../common/winrt_winphone/qmake.conf)
|
||||
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 arm64 __arm64__ __arm64__
|
||||
|
||||
QMAKE_CFLAGS += -FS
|
||||
QMAKE_CXXFLAGS += -FS
|
||||
QMAKE_LFLAGS += /MACHINE:arm64 /NODEFAULTLIB:kernel32.lib
|
||||
|
||||
QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
|
||||
|
||||
VCPROJ_ARCH = arm64
|
||||
WINSDK_VER = 10.0
|
||||
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
|
||||
WINRT_MANIFEST.architecture = arm64
|
@ -1,40 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the qmake spec of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "../common/winrt_winphone/qplatformdefs.h"
|
@ -1,19 +0,0 @@
|
||||
#
|
||||
# qmake configuration for winrt-arm64-msvc2019
|
||||
#
|
||||
# Written for Microsoft Visual C++ 2019
|
||||
#
|
||||
|
||||
include(../common/winrt_winphone/qmake.conf)
|
||||
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 arm64 __arm64__ __arm64__
|
||||
|
||||
QMAKE_CFLAGS += -FS
|
||||
QMAKE_CXXFLAGS += -FS
|
||||
QMAKE_LFLAGS += /MACHINE:arm64 /NODEFAULTLIB:kernel32.lib
|
||||
|
||||
QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
|
||||
|
||||
VCPROJ_ARCH = arm64
|
||||
WINSDK_VER = 10.0
|
||||
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
|
||||
WINRT_MANIFEST.architecture = arm64
|
@ -1,40 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the qmake spec of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "../common/winrt_winphone/qplatformdefs.h"
|
@ -1,19 +0,0 @@
|
||||
#
|
||||
# qmake configuration for winrt-x64-msvc2015
|
||||
#
|
||||
# Written for Microsoft Visual C++ 2015
|
||||
#
|
||||
|
||||
include(../common/winrt_winphone/qmake.conf)
|
||||
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X64 __X64__ __x64__
|
||||
|
||||
QMAKE_CFLAGS += -FS
|
||||
QMAKE_CXXFLAGS += -FS
|
||||
QMAKE_LFLAGS += /MACHINE:X64 /NODEFAULTLIB:kernel32.lib
|
||||
|
||||
QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
|
||||
|
||||
VCPROJ_ARCH = x64
|
||||
WINSDK_VER = 10.0
|
||||
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
|
||||
WINRT_MANIFEST.architecture = x64
|
@ -1,40 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the qmake spec of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "../common/winrt_winphone/qplatformdefs.h"
|
@ -1,19 +0,0 @@
|
||||
#
|
||||
# qmake configuration for winrt-x64-msvc2017
|
||||
#
|
||||
# Written for Microsoft Visual C++ 2017
|
||||
#
|
||||
|
||||
include(../common/winrt_winphone/qmake.conf)
|
||||
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X64 __X64__ __x64__
|
||||
|
||||
QMAKE_CFLAGS += -FS
|
||||
QMAKE_CXXFLAGS += -FS
|
||||
QMAKE_LFLAGS += /MACHINE:X64 /NODEFAULTLIB:kernel32.lib
|
||||
|
||||
QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
|
||||
|
||||
VCPROJ_ARCH = x64
|
||||
WINSDK_VER = 10.0
|
||||
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
|
||||
WINRT_MANIFEST.architecture = x64
|
@ -1,40 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the qmake spec of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "../common/winrt_winphone/qplatformdefs.h"
|
@ -1,19 +0,0 @@
|
||||
#
|
||||
# qmake configuration for winrt-x64-msvc2019
|
||||
#
|
||||
# Written for Microsoft Visual C++ 2019
|
||||
#
|
||||
|
||||
include(../common/winrt_winphone/qmake.conf)
|
||||
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X64 __X64__ __x64__
|
||||
|
||||
QMAKE_CFLAGS += -FS
|
||||
QMAKE_CXXFLAGS += -FS
|
||||
QMAKE_LFLAGS += /MACHINE:X64 /NODEFAULTLIB:kernel32.lib
|
||||
|
||||
QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
|
||||
|
||||
VCPROJ_ARCH = x64
|
||||
WINSDK_VER = 10.0
|
||||
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
|
||||
WINRT_MANIFEST.architecture = x64
|
@ -1,40 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the qmake spec of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "../common/winrt_winphone/qplatformdefs.h"
|
@ -1,18 +0,0 @@
|
||||
#
|
||||
# qmake configuration for winrt-x86-msvc2015
|
||||
#
|
||||
# Written for Microsoft Visual C++ 2015
|
||||
#
|
||||
|
||||
include(../common/winrt_winphone/qmake.conf)
|
||||
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X86 __X86__ __x86__
|
||||
|
||||
QMAKE_CFLAGS += -FS
|
||||
QMAKE_CXXFLAGS += -FS
|
||||
QMAKE_LFLAGS += /SAFESEH /MACHINE:X86 /NODEFAULTLIB:kernel32.lib
|
||||
|
||||
QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
|
||||
VCPROJ_ARCH = Win32
|
||||
WINSDK_VER = 10.0
|
||||
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
|
||||
WINRT_MANIFEST.architecture = x86
|
@ -1,40 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the qmake spec of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "../common/winrt_winphone/qplatformdefs.h"
|
@ -1,18 +0,0 @@
|
||||
#
|
||||
# qmake configuration for winrt-x86-msvc2017
|
||||
#
|
||||
# Written for Microsoft Visual C++ 2017
|
||||
#
|
||||
|
||||
include(../common/winrt_winphone/qmake.conf)
|
||||
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X86 __X86__ __x86__
|
||||
|
||||
QMAKE_CFLAGS += -FS
|
||||
QMAKE_CXXFLAGS += -FS
|
||||
QMAKE_LFLAGS += /SAFESEH /MACHINE:X86 /NODEFAULTLIB:kernel32.lib
|
||||
|
||||
QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
|
||||
VCPROJ_ARCH = Win32
|
||||
WINSDK_VER = 10.0
|
||||
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
|
||||
WINRT_MANIFEST.architecture = x86
|
@ -1,40 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the qmake spec of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "../common/winrt_winphone/qplatformdefs.h"
|
@ -1,18 +0,0 @@
|
||||
#
|
||||
# qmake configuration for winrt-x86-msvc2019
|
||||
#
|
||||
# Written for Microsoft Visual C++ 2019
|
||||
#
|
||||
|
||||
include(../common/winrt_winphone/qmake.conf)
|
||||
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X86 __X86__ __x86__
|
||||
|
||||
QMAKE_CFLAGS += -FS
|
||||
QMAKE_CXXFLAGS += -FS
|
||||
QMAKE_LFLAGS += /SAFESEH /MACHINE:X86 /NODEFAULTLIB:kernel32.lib
|
||||
|
||||
QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
|
||||
VCPROJ_ARCH = Win32
|
||||
WINSDK_VER = 10.0
|
||||
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
|
||||
WINRT_MANIFEST.architecture = x86
|
@ -1,40 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the qmake spec of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "../common/winrt_winphone/qplatformdefs.h"
|
@ -3219,9 +3219,6 @@
|
||||
On desktop Windows, the default value is the value of the environment
|
||||
variable \c{WindowsSDKVersion}.
|
||||
|
||||
On Universal Windows Platform (UWP), the default value is the value of the
|
||||
environment variable \c{UCRTVERSION}.
|
||||
|
||||
\target WINDOWS_TARGET_PLATFORM_MIN_VERSION
|
||||
\section1 WINDOWS_TARGET_PLATFORM_MIN_VERSION
|
||||
|
||||
@ -3230,172 +3227,6 @@
|
||||
|
||||
Defaults to \c{WINDOWS_TARGET_PLATFORM_VERSION}.
|
||||
|
||||
\target WINRT_MANIFEST
|
||||
\section1 WINRT_MANIFEST
|
||||
|
||||
Specifies parameters to be passed to the application manifest on
|
||||
\l{Qt for UWP}{UWP}. The allowed values are:
|
||||
|
||||
\table
|
||||
\header
|
||||
\li Member
|
||||
\li Description
|
||||
\row
|
||||
\li architecture
|
||||
\li The target architecture. Defaults to \c VCPROJ_ARCH.
|
||||
\row
|
||||
\li background
|
||||
\li Tile background color. Defaults to \c{green}.
|
||||
\row
|
||||
\li capabilities
|
||||
\li Specifies capabilities to add to the capability list.
|
||||
\row
|
||||
\li capabilities_device
|
||||
\li Specifies device capabilities to add to the capability list
|
||||
(location, webcam, and so on).
|
||||
\row
|
||||
\li CONFIG
|
||||
\li Specifies additional flags for processing the input manifest file.
|
||||
Currently, \c{verbatim} is the only available option.
|
||||
\row
|
||||
\li default_language
|
||||
\li The default language code of the application. Defaults to "en".
|
||||
\row
|
||||
\li dependencies
|
||||
\li Specifies dependencies required by the package.
|
||||
\row
|
||||
\li description
|
||||
\li Package description. Defaults to \c{Default package description}.
|
||||
\row
|
||||
\li foreground
|
||||
\li Tile foreground (text) color. Defaults to \c{light}.
|
||||
\row
|
||||
\li iconic_tile_icon
|
||||
\li Image file for the \c{iconic} tile template icon. Default provided by
|
||||
the mkspec.
|
||||
\row
|
||||
\li iconic_tile_small
|
||||
\li Image file for the small \c{iconic} tile template logo. Default provided
|
||||
by the mkspec.
|
||||
\row
|
||||
\li identity
|
||||
\li The unique ID of the app. Defaults to reusing the existing generated
|
||||
manifest's UUID, or generates a new UUID if none is present.
|
||||
\row
|
||||
\li logo_30x30
|
||||
\li Logo image file of size 30x30 pixels.
|
||||
\row
|
||||
\li logo_41x41
|
||||
\li Logo image file of size 41x41 pixels. This parameter is obsolete.
|
||||
\row
|
||||
\li logo_70x70
|
||||
\li Logo image file of size 70x70 pixels.
|
||||
\row
|
||||
\li logo_71x71
|
||||
\li Logo image file of size 71x71 pixels. This parameter is obsolete.
|
||||
\row
|
||||
\li logo_150x150
|
||||
\li Logo image file of size 150x150 pixels. This is supported on all Windows
|
||||
Store App platforms.
|
||||
\row
|
||||
\li logo_310x150
|
||||
\li Logo image file of size 310x150 pixels. This is supported on all Windows
|
||||
Store App platforms.
|
||||
\row
|
||||
\li logo_310x310
|
||||
\li Logo image file of size 310x310 pixels. This is supported on all Windows
|
||||
Store App platforms.
|
||||
\row
|
||||
\li logo_620x300
|
||||
\li Splash screen image file of size 620x300 pixels.
|
||||
\row
|
||||
\li logo_480x800
|
||||
\li Splash screen image file of size 480x800 pixels.
|
||||
This parameter is obsolete.
|
||||
\row
|
||||
\li logo_large
|
||||
\li Large logo image file. This has to be 150x150 pixels. Supported on all
|
||||
Windows Store App platforms. Default provided by the mkspec.
|
||||
\row
|
||||
\li logo_medium
|
||||
\li Medium logo image file. The image must have a pixel size of 70x70.
|
||||
Default provided by the mkspec.
|
||||
\row
|
||||
\li logo_small
|
||||
\li Small logo image file. The image must have a pixel size of 30x30.
|
||||
Default provided by the mkspec.
|
||||
\row
|
||||
\li logo_splash
|
||||
\li Splash screen image file. The image must have a pixel size of
|
||||
620x300. Default provided by the mkspec.
|
||||
\row
|
||||
\li logo_store
|
||||
\li Logo image file for Windows Store. Default provided by the mkspec.
|
||||
\row
|
||||
\li logo_wide
|
||||
\li Wide logo image file. This has to be 310x150 pixels. Supported on all
|
||||
Windows Store App platforms. Default provided by the mkspec.
|
||||
\row
|
||||
\li name
|
||||
\li The name of the package as displayed to the user. Defaults to TARGET.
|
||||
\row
|
||||
\li phone_product_id
|
||||
\li The GUID of the product.
|
||||
This parameter is obsolete.
|
||||
\row
|
||||
\li phone_publisher_id
|
||||
\li The GUID of the publisher.
|
||||
This parameter is obsolete.
|
||||
\row
|
||||
\li publisher
|
||||
\li Display name of the publisher. Defaults to \c{Default publisher display name}.
|
||||
\row
|
||||
\li publisher_id
|
||||
\li The publisher's distinguished name (default: \c{CN=MyCN}).
|
||||
\row
|
||||
\li target
|
||||
\li The name of the target (.exe). Defaults to TARGET.
|
||||
\row
|
||||
\li version
|
||||
\li The version number of the package. Defaults to \c{1.0.0.0}.
|
||||
\row
|
||||
\li minVersion
|
||||
\li The minimum required Windows version to run the package.
|
||||
Defaults to \c{WINDOWS_TARGET_PLATFORM_VERSION}.
|
||||
\row
|
||||
\li maxVersionTested
|
||||
\li The maximum Windows version the package has been tested against.
|
||||
Defaults to \c{WINDOWS_TARGET_PLATFORM_MIN_VERSION}.
|
||||
|
||||
\endtable
|
||||
|
||||
You can use any combination of those values.
|
||||
|
||||
For example:
|
||||
|
||||
\code
|
||||
WINRT_MANIFEST.publisher = MyCompany
|
||||
WINRT_MANIFEST.logo_store = someImage.png
|
||||
WINRT_MANIFEST.capabilities += internetClient
|
||||
WINRT_MANIFEST.capabilities_device += location
|
||||
\endcode
|
||||
|
||||
Additionally, an input manifest file can be specified by using WINRT_MANIFEST.
|
||||
|
||||
For example:
|
||||
|
||||
\code
|
||||
WINRT_MANIFEST = someManifest.xml.in
|
||||
\endcode
|
||||
|
||||
In case the input manifest file should not be processed and only copied to
|
||||
the target directory, the verbatim configuration needs to be set.
|
||||
|
||||
\code
|
||||
WINRT_MANIFEST = someManifest.xml.in
|
||||
WINRT_MANIFEST.CONFIG += verbatim
|
||||
\endcode
|
||||
|
||||
\target YACCSOURCES
|
||||
\section1 YACCSOURCES
|
||||
|
||||
|
@ -612,16 +612,6 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
|
||||
<< tag("ItemGroup")
|
||||
<< attrTag("Label", "ProjectConfigurations");
|
||||
|
||||
bool isWinRT = false;
|
||||
for (int i = 0; i < tool.SingleProjects.count(); ++i) {
|
||||
xml << tag("ProjectConfiguration")
|
||||
<< attrTag("Include" , tool.SingleProjects.at(i).Configuration.Name)
|
||||
<< tagValue("Configuration", tool.SingleProjects.at(i).Configuration.ConfigurationName)
|
||||
<< tagValue("Platform", tool.SingleProjects.at(i).PlatformName)
|
||||
<< closetag();
|
||||
isWinRT = isWinRT || tool.SingleProjects.at(i).Configuration.WinRT;
|
||||
}
|
||||
|
||||
xml << closetag()
|
||||
<< tag("PropertyGroup")
|
||||
<< attrTag("Label", "Globals")
|
||||
@ -629,13 +619,6 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
|
||||
<< tagValue("RootNamespace", tool.Name)
|
||||
<< tagValue("Keyword", tool.Keyword);
|
||||
|
||||
if (isWinRT) {
|
||||
xml << tagValue("MinimumVisualStudioVersion", tool.Version)
|
||||
<< tagValue("DefaultLanguage", "en")
|
||||
<< tagValue("AppContainerApplication", "true")
|
||||
<< tagValue("ApplicationType", "Windows Store")
|
||||
<< tagValue("ApplicationTypeRevision", tool.SdkVersion);
|
||||
}
|
||||
if (!tool.WindowsTargetPlatformVersion.isEmpty())
|
||||
xml << tagValue("WindowsTargetPlatformVersion", tool.WindowsTargetPlatformVersion);
|
||||
if (!tool.WindowsTargetPlatformMinVersion.isEmpty())
|
||||
@ -825,41 +808,6 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
|
||||
}
|
||||
outputFilter(tool, xml, xmlFilter, "Root Files");
|
||||
|
||||
// App manifest
|
||||
if (isWinRT) {
|
||||
const QString manifest = QStringLiteral("Package.appxmanifest");
|
||||
|
||||
// Find all icons referenced in the manifest
|
||||
QSet<QString> icons;
|
||||
QFile manifestFile(Option::output_dir + QLatin1Char('/') + manifest);
|
||||
if (manifestFile.open(QFile::ReadOnly)) {
|
||||
const QString contents = manifestFile.readAll();
|
||||
QRegularExpression regexp("[\\\\/a-zA-Z0-9_\\-\\!]*\\.(png|jpg|jpeg)");
|
||||
int pos = 0;
|
||||
while (pos > -1) {
|
||||
QRegularExpressionMatch m;
|
||||
pos = contents.indexOf(regexp, pos, &m);
|
||||
if (pos >= 0) {
|
||||
const QString match = m.captured(0);
|
||||
icons.insert(match);
|
||||
pos += match.length();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Write out manifest + icons as content items
|
||||
xml << tag(_ItemGroup)
|
||||
<< tag("AppxManifest")
|
||||
<< attrTag("Include", manifest)
|
||||
<< closetag();
|
||||
for (const QString &icon : qAsConst(icons)) {
|
||||
xml << tag("Image")
|
||||
<< attrTag("Include", icon)
|
||||
<< closetag();
|
||||
}
|
||||
xml << closetag();
|
||||
}
|
||||
|
||||
xml << import("Project", "$(VCTargetsPath)\\Microsoft.Cpp.targets")
|
||||
<< tag("ImportGroup")
|
||||
<< attrTag("Label", "ExtensionTargets")
|
||||
|
@ -2166,8 +2166,7 @@ VCPreLinkEventTool::VCPreLinkEventTool()
|
||||
// VCConfiguration --------------------------------------------------
|
||||
|
||||
VCConfiguration::VCConfiguration()
|
||||
: WinRT(false),
|
||||
ATLMinimizesCRunTimeLibraryUsage(unset),
|
||||
: ATLMinimizesCRunTimeLibraryUsage(unset),
|
||||
BuildBrowserInformation(unset),
|
||||
CharacterSet(charSetNotSet),
|
||||
ConfigurationType(typeApplication),
|
||||
|
@ -872,7 +872,6 @@ public:
|
||||
|
||||
bool suppressUnknownOptionWarnings;
|
||||
DotNET CompilerVersion;
|
||||
bool WinRT;
|
||||
|
||||
// Variables
|
||||
triState ATLMinimizesCRunTimeLibraryUsage;
|
||||
|
@ -642,7 +642,6 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
|
||||
for(QList<VcsolutionDepend*>::Iterator it = solution_cleanup.begin(); it != solution_cleanup.end(); ++it) {
|
||||
QString platform = is64Bit ? "x64" : "Win32";
|
||||
QString xplatform = platform;
|
||||
const bool isWinRT = project->isActiveConfig("winrt");
|
||||
if (!project->isEmpty("VCPROJ_ARCH")) {
|
||||
xplatform = project->first("VCPROJ_ARCH").toQString();
|
||||
}
|
||||
@ -650,12 +649,8 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
|
||||
platform = xplatform;
|
||||
t << "\n\t\t" << (*it)->uuid << QString(_slnProjDbgConfTag1).arg(xplatform) << platform;
|
||||
t << "\n\t\t" << (*it)->uuid << QString(_slnProjDbgConfTag2).arg(xplatform) << platform;
|
||||
if (isWinRT)
|
||||
t << "\n\t\t" << (*it)->uuid << QString(_slnProjDbgConfTag3).arg(xplatform) << platform;
|
||||
t << "\n\t\t" << (*it)->uuid << QString(_slnProjRelConfTag1).arg(xplatform) << platform;
|
||||
t << "\n\t\t" << (*it)->uuid << QString(_slnProjRelConfTag2).arg(xplatform) << platform;
|
||||
if (isWinRT)
|
||||
t << "\n\t\t" << (*it)->uuid << QString(_slnProjRelConfTag3).arg(xplatform) << platform;
|
||||
}
|
||||
t << _slnProjConfEnd;
|
||||
t << _slnExtSections;
|
||||
@ -960,16 +955,6 @@ void VcprojGenerator::initConfiguration()
|
||||
conf.suppressUnknownOptionWarnings = project->isActiveConfig("suppress_vcproj_warnings");
|
||||
conf.CompilerVersion = vsVersionFromString(project->first("MSVC_VER"));
|
||||
|
||||
if (conf.CompilerVersion >= NET2012) {
|
||||
conf.WinRT = project->isActiveConfig("winrt");
|
||||
if (conf.WinRT) {
|
||||
// Saner defaults
|
||||
conf.compiler.UsePrecompiledHeader = pchNone;
|
||||
conf.compiler.CompileAsWinRT = _False;
|
||||
conf.linker.GenerateWindowsMetadata = _False;
|
||||
}
|
||||
}
|
||||
|
||||
initCompilerTool();
|
||||
|
||||
// Only on configuration per build
|
||||
@ -1028,7 +1013,7 @@ void VcprojGenerator::initConfiguration()
|
||||
conf.ATLMinimizesCRunTimeLibraryUsage = (project->first("ATLMinimizesCRunTimeLibraryUsage").isEmpty() ? _False : _True);
|
||||
conf.BuildBrowserInformation = triState(temp.isEmpty() ? (short)unset : temp.toShort());
|
||||
temp = project->first("CharacterSet");
|
||||
conf.CharacterSet = charSet(temp.isEmpty() ? short(conf.WinRT ? charSetUnicode : charSetNotSet) : temp.toShort());
|
||||
conf.CharacterSet = charSet(temp.isEmpty() ? short(charSetNotSet) : temp.toShort());
|
||||
conf.DeleteExtensionsOnClean = project->first("DeleteExtensionsOnClean").toQString();
|
||||
conf.ImportLibrary = conf.linker.ImportLibrary;
|
||||
conf.IntermediateDirectory = project->first("OBJECTS_DIR").toQString();
|
||||
@ -1046,7 +1031,7 @@ void VcprojGenerator::initConfiguration()
|
||||
initPreBuildEventTools();
|
||||
initPostBuildEventTools();
|
||||
// Only deploy for crosscompiled projects
|
||||
if (!project->isHostBuild() || conf.WinRT)
|
||||
if (!project->isHostBuild())
|
||||
initDeploymentTool();
|
||||
initWinDeployQtTool();
|
||||
initPreLinkEventTools();
|
||||
@ -1193,23 +1178,15 @@ void VcprojGenerator::initDeploymentTool()
|
||||
{
|
||||
VCConfiguration &conf = vcProject.Configuration;
|
||||
QString targetPath;
|
||||
if (conf.WinRT) {
|
||||
vcProject.DeploymentFiles.Name = "Deployment Files";
|
||||
vcProject.DeploymentFiles.ParseFiles = _False;
|
||||
vcProject.DeploymentFiles.Filter = "deploy";
|
||||
vcProject.DeploymentFiles.Guid = _GUIDDeploymentFiles;
|
||||
} else {
|
||||
targetPath = project->values("deploy.path").join(' ');
|
||||
if (targetPath.isEmpty())
|
||||
targetPath = QString("%CSIDL_PROGRAM_FILES%\\") + project->first("TARGET");
|
||||
if (targetPath.endsWith("/") || targetPath.endsWith("\\"))
|
||||
targetPath.chop(1);
|
||||
conf.deployment.RemoteDirectory = targetPath;
|
||||
}
|
||||
targetPath = project->values("deploy.path").join(' ');
|
||||
if (targetPath.isEmpty())
|
||||
targetPath = QString("%CSIDL_PROGRAM_FILES%\\") + project->first("TARGET");
|
||||
if (targetPath.endsWith("/") || targetPath.endsWith("\\"))
|
||||
targetPath.chop(1);
|
||||
conf.deployment.RemoteDirectory = targetPath;
|
||||
const ProStringList dllPaths = project->values("QMAKE_DLL_PATHS");
|
||||
// Only deploy Qt libs for shared build
|
||||
if (!dllPaths.isEmpty() &&
|
||||
!(conf.WinRT && project->first("MSVC_VER").toQString() == "14.0")) {
|
||||
if (!dllPaths.isEmpty()) {
|
||||
// FIXME: This code should actually resolve the libraries from all Qt modules.
|
||||
ProStringList arg = project->values("LIBS") + project->values("LIBS_PRIVATE")
|
||||
+ project->values("QMAKE_LIBS") + project->values("QMAKE_LIBS_PRIVATE");
|
||||
@ -1238,39 +1215,35 @@ void VcprojGenerator::initDeploymentTool()
|
||||
|
||||
if (!info.exists())
|
||||
continue;
|
||||
if (conf.WinRT) {
|
||||
QString absoluteFilePath(QDir::toNativeSeparators(info.absoluteFilePath()));
|
||||
vcProject.DeploymentFiles.addFile(absoluteFilePath);
|
||||
} else {
|
||||
conf.deployment.AdditionalFiles += info.fileName()
|
||||
+ "|" + QDir::toNativeSeparators(info.absolutePath())
|
||||
+ "|" + targetPath
|
||||
+ "|0;";
|
||||
if (!qpaPluginDeployed) {
|
||||
QString debugInfix;
|
||||
bool foundGuid = dllName.contains(QLatin1String("Guid"));
|
||||
if (foundGuid)
|
||||
debugInfix = QLatin1Char('d');
|
||||
|
||||
if (foundGuid || dllName.contains(QLatin1String("Gui"))) {
|
||||
QFileInfo info2;
|
||||
for (const ProString &dllPath : dllPaths) {
|
||||
QString absoluteDllFilePath = dllPath.toQString();
|
||||
if (!absoluteDllFilePath.endsWith(QLatin1Char('/')))
|
||||
absoluteDllFilePath += QLatin1Char('/');
|
||||
absoluteDllFilePath += QLatin1String("../plugins/platforms/qwindows")
|
||||
+ debugInfix + QLatin1String(".dll");
|
||||
info2 = QFileInfo(absoluteDllFilePath);
|
||||
if (info2.exists())
|
||||
break;
|
||||
}
|
||||
if (info2.exists()) {
|
||||
conf.deployment.AdditionalFiles += QLatin1String("qwindows") + debugInfix + QLatin1String(".dll")
|
||||
+ QLatin1Char('|') + QDir::toNativeSeparators(info2.absolutePath())
|
||||
+ QLatin1Char('|') + targetPath + QLatin1String("\\platforms")
|
||||
+ QLatin1String("|0;");
|
||||
qpaPluginDeployed = true;
|
||||
}
|
||||
conf.deployment.AdditionalFiles += info.fileName()
|
||||
+ "|" + QDir::toNativeSeparators(info.absolutePath())
|
||||
+ "|" + targetPath
|
||||
+ "|0;";
|
||||
if (!qpaPluginDeployed) {
|
||||
QString debugInfix;
|
||||
bool foundGuid = dllName.contains(QLatin1String("Guid"));
|
||||
if (foundGuid)
|
||||
debugInfix = QLatin1Char('d');
|
||||
|
||||
if (foundGuid || dllName.contains(QLatin1String("Gui"))) {
|
||||
QFileInfo info2;
|
||||
for (const ProString &dllPath : dllPaths) {
|
||||
QString absoluteDllFilePath = dllPath.toQString();
|
||||
if (!absoluteDllFilePath.endsWith(QLatin1Char('/')))
|
||||
absoluteDllFilePath += QLatin1Char('/');
|
||||
absoluteDllFilePath += QLatin1String("../plugins/platforms/qwindows")
|
||||
+ debugInfix + QLatin1String(".dll");
|
||||
info2 = QFileInfo(absoluteDllFilePath);
|
||||
if (info2.exists())
|
||||
break;
|
||||
}
|
||||
if (info2.exists()) {
|
||||
conf.deployment.AdditionalFiles += QLatin1String("qwindows") + debugInfix + QLatin1String(".dll")
|
||||
+ QLatin1Char('|') + QDir::toNativeSeparators(info2.absolutePath())
|
||||
+ QLatin1Char('|') + targetPath + QLatin1String("\\platforms")
|
||||
+ QLatin1String("|0;");
|
||||
qpaPluginDeployed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1280,16 +1253,14 @@ void VcprojGenerator::initDeploymentTool()
|
||||
for (const ProString &item : project->values("INSTALLS")) {
|
||||
// get item.path
|
||||
QString devicePath = project->first(ProKey(item + ".path")).toQString();
|
||||
if (!conf.WinRT) {
|
||||
if (devicePath.isEmpty())
|
||||
devicePath = targetPath;
|
||||
// check if item.path is relative (! either /,\ or %)
|
||||
if (!(devicePath.at(0) == QLatin1Char('/')
|
||||
|| devicePath.at(0) == QLatin1Char('\\')
|
||||
|| devicePath.at(0) == QLatin1Char('%'))) {
|
||||
// create output path
|
||||
devicePath = Option::fixPathToTargetOS(targetPath + QLatin1Char('\\') + devicePath);
|
||||
}
|
||||
if (devicePath.isEmpty())
|
||||
devicePath = targetPath;
|
||||
// check if item.path is relative (! either /,\ or %)
|
||||
if (!(devicePath.at(0) == QLatin1Char('/')
|
||||
|| devicePath.at(0) == QLatin1Char('\\')
|
||||
|| devicePath.at(0) == QLatin1Char('%'))) {
|
||||
// create output path
|
||||
devicePath = Option::fixPathToTargetOS(targetPath + QLatin1Char('\\') + devicePath);
|
||||
}
|
||||
// foreach d in item.files
|
||||
for (const ProString &src : project->values(ProKey(item + ".files"))) {
|
||||
@ -1314,25 +1285,16 @@ void VcprojGenerator::initDeploymentTool()
|
||||
// foreach dirIterator-entry in d
|
||||
while(iterator.hasNext()) {
|
||||
iterator.next();
|
||||
if (conf.WinRT) {
|
||||
QString absoluteItemFilePath = Option::fixPathToTargetOS(QFileInfo(iterator.filePath()).absoluteFilePath());
|
||||
vcProject.DeploymentFiles.addFile(absoluteItemFilePath);
|
||||
} else {
|
||||
QString absoluteItemPath = Option::fixPathToTargetOS(QFileInfo(iterator.filePath()).absolutePath());
|
||||
// Identify if it is just another subdir
|
||||
int diffSize = absoluteItemPath.size() - pathSize;
|
||||
// write out rules
|
||||
conf.deployment.AdditionalFiles += iterator.fileName()
|
||||
+ "|" + absoluteItemPath
|
||||
+ "|" + itemDevicePath + (diffSize ? (absoluteItemPath.right(diffSize)) : QLatin1String(""))
|
||||
+ "|0;";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (conf.WinRT) {
|
||||
vcProject.DeploymentFiles.Project = this;
|
||||
vcProject.DeploymentFiles.Config = &(vcProject.Configuration);
|
||||
QString absoluteItemPath = Option::fixPathToTargetOS(QFileInfo(iterator.filePath()).absolutePath());
|
||||
// Identify if it is just another subdir
|
||||
int diffSize = absoluteItemPath.size() - pathSize;
|
||||
// write out rules
|
||||
conf.deployment.AdditionalFiles += iterator.fileName()
|
||||
+ "|" + absoluteItemPath
|
||||
+ "|" + itemDevicePath + (diffSize ? (absoluteItemPath.right(diffSize)) : QLatin1String(""))
|
||||
+ "|0;";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
2
src/3rdparty/libjpeg.pri
vendored
@ -1,5 +1,3 @@
|
||||
winrt: DEFINES += NO_GETENV
|
||||
|
||||
# Disable warnings in 3rdparty code due to unused arguments
|
||||
gcc: QMAKE_CFLAGS_WARN_ON += -Wno-unused-parameter -Wno-main
|
||||
|
||||
|
5
src/3rdparty/libpng/pngpriv.h
vendored
@ -557,9 +557,6 @@
|
||||
#if defined(WIN32) || defined(_Windows) || defined(_WINDOWS) || \
|
||||
defined(_WIN32) || defined(__WIN32__)
|
||||
# include <windows.h> /* defines _WINDOWS_ macro */
|
||||
# if defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP)
|
||||
# define _WINRT_ /* Define a macro for Windows Runtime builds */
|
||||
# endif
|
||||
#endif
|
||||
#endif /* PNG_VERSION_INFO_ONLY */
|
||||
|
||||
@ -570,7 +567,7 @@
|
||||
|
||||
/* Memory model/platform independent fns */
|
||||
#ifndef PNG_ABORT
|
||||
# if (defined(_WINDOWS_) || defined(_WIN32_WCE)) && !defined(_WINRT_)
|
||||
# if (defined(_WINDOWS_) || defined(_WIN32_WCE))
|
||||
# define PNG_ABORT() ExitProcess(0)
|
||||
# else
|
||||
# define PNG_ABORT() abort()
|
||||
|
5
src/3rdparty/libpng/qtpatches.diff
vendored
@ -31,9 +31,6 @@ index 583c26f9bd..2ab9b70d73 100644
|
||||
#if defined(WIN32) || defined(_Windows) || defined(_WINDOWS) || \
|
||||
defined(_WIN32) || defined(__WIN32__)
|
||||
# include <windows.h> /* defines _WINDOWS_ macro */
|
||||
+# if defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP)
|
||||
+# define _WINRT_ /* Define a macro for Windows Runtime builds */
|
||||
+# endif
|
||||
#endif
|
||||
#endif /* PNG_VERSION_INFO_ONLY */
|
||||
|
||||
@ -42,7 +39,7 @@ index 583c26f9bd..2ab9b70d73 100644
|
||||
/* Memory model/platform independent fns */
|
||||
#ifndef PNG_ABORT
|
||||
-# ifdef _WINDOWS_
|
||||
+# if (defined(_WINDOWS_) || defined(_WIN32_WCE)) && !defined(_WINRT_)
|
||||
+# if (defined(_WINDOWS_) || defined(_WIN32_WCE))
|
||||
# define PNG_ABORT() ExitProcess(0)
|
||||
# else
|
||||
# define PNG_ABORT() abort()
|
||||
|
2
src/3rdparty/pcre2/CMakeLists.txt
vendored
@ -52,7 +52,7 @@ qt_set_symbol_visibility_hidden(BundledPcre2)
|
||||
## Scopes:
|
||||
#####################################################################
|
||||
|
||||
qt_extend_target(BundledPcre2 CONDITION QNX OR UIKIT OR WINRT
|
||||
qt_extend_target(BundledPcre2 CONDITION QNX OR UIKIT
|
||||
DEFINES
|
||||
PCRE2_DISABLE_JIT
|
||||
)
|
||||
|
2
src/3rdparty/pcre2/pcre2.pro
vendored
@ -8,7 +8,7 @@ CONFIG += \
|
||||
include(pcre2.pri)
|
||||
|
||||
# platform/compiler specific definitions
|
||||
uikit|qnx|winrt: DEFINES += PCRE2_DISABLE_JIT
|
||||
uikit|qnx: DEFINES += PCRE2_DISABLE_JIT
|
||||
win32:contains(QT_ARCH, "arm"): DEFINES += PCRE2_DISABLE_JIT
|
||||
win32:contains(QT_ARCH, "arm64"): DEFINES += PCRE2_DISABLE_JIT
|
||||
|
||||
|
6
src/3rdparty/sqlite.pri
vendored
@ -3,12 +3,8 @@ QT_FOR_CONFIG += core-private
|
||||
DEFINES += SQLITE_ENABLE_COLUMN_METADATA SQLITE_OMIT_COMPLETE SQLITE_ENABLE_FTS3 SQLITE_ENABLE_FTS3_PARENTHESIS SQLITE_ENABLE_FTS5 SQLITE_ENABLE_RTREE SQLITE_ENABLE_JSON1
|
||||
!contains(CONFIG, largefile):DEFINES += SQLITE_DISABLE_LFS
|
||||
qtConfig(posix_fallocate): DEFINES += HAVE_POSIX_FALLOCATE=1
|
||||
winrt {
|
||||
DEFINES += SQLITE_OS_WINRT
|
||||
QMAKE_CFLAGS += -Gy
|
||||
}
|
||||
qnx: DEFINES += _QNX_SOURCE
|
||||
!win32:!winrt:!winphone: DEFINES += HAVE_USLEEP=1
|
||||
!win32: DEFINES += HAVE_USLEEP=1
|
||||
qtConfig(dlopen) {
|
||||
QMAKE_USE += libdl
|
||||
} else {
|
||||
|
@ -338,28 +338,23 @@ qt_extend_target(Core CONDITION WIN32
|
||||
io/qfilesystemengine_win.cpp
|
||||
io/qfsfileengine_win.cpp
|
||||
io/qlockfile_win.cpp
|
||||
io/qstandardpaths_win.cpp
|
||||
io/qstorageinfo_win.cpp
|
||||
io/qwindowspipereader.cpp io/qwindowspipereader_p.h
|
||||
io/qwindowspipewriter.cpp io/qwindowspipewriter_p.h
|
||||
kernel/qcoreapplication_win.cpp
|
||||
kernel/qelapsedtimer_win.cpp
|
||||
kernel/qeventdispatcher_win.cpp kernel/qeventdispatcher_win_p.h
|
||||
kernel/qfunctions_winrt_p.h
|
||||
kernel/qsharedmemory_win.cpp
|
||||
kernel/qsystemsemaphore_win.cpp
|
||||
kernel/qwineventnotifier.cpp kernel/qwineventnotifier.h kernel/qwineventnotifier_p.h
|
||||
kernel/qwinregistry.cpp kernel/qwinregistry_p.h
|
||||
plugin/qsystemlibrary.cpp plugin/qsystemlibrary_p.h
|
||||
thread/qatomic_msvc.h
|
||||
thread/qthread_win.cpp
|
||||
DEFINES
|
||||
-QT_NO_CAST_TO_ASCII
|
||||
LIBRARIES
|
||||
ws2_32
|
||||
)
|
||||
|
||||
qt_extend_target(Core CONDITION WIN32 AND NOT WINRT
|
||||
SOURCES
|
||||
io/qstandardpaths_win.cpp
|
||||
io/qstorageinfo_win.cpp
|
||||
io/qwindowspipereader.cpp io/qwindowspipereader_p.h
|
||||
io/qwindowspipewriter.cpp io/qwindowspipewriter_p.h
|
||||
kernel/qeventdispatcher_win.cpp kernel/qeventdispatcher_win_p.h
|
||||
kernel/qwinregistry.cpp kernel/qwinregistry_p.h
|
||||
LIBRARIES
|
||||
advapi32
|
||||
kernel32
|
||||
@ -370,6 +365,7 @@ qt_extend_target(Core CONDITION WIN32 AND NOT WINRT
|
||||
uuid
|
||||
version
|
||||
winmm
|
||||
ws2_32
|
||||
PUBLIC_LIBRARIES
|
||||
mpr
|
||||
userenv
|
||||
@ -413,27 +409,27 @@ qt_extend_target(Core CONDITION INTEGRITY
|
||||
--pending_instantiations=128
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 15:.:.:corelib.pro:pathIsAbsolute(_ss_CMAKE_HOST_DATA_DIR):
|
||||
#### Keys ignored in scope 14:.:.:corelib.pro:pathIsAbsolute(_ss_CMAKE_HOST_DATA_DIR):
|
||||
# CMAKE_HOST_DATA_DIR = "$$[QT_HOST_DATA/src]/"
|
||||
# CMAKE_HOST_DATA_DIR_IS_ABSOLUTE = "True"
|
||||
|
||||
#### Keys ignored in scope 16:.:.:corelib.pro:pathIsAbsolute(_ss_CMAKE_INSTALL_DATA_DIR):
|
||||
#### Keys ignored in scope 15:.:.:corelib.pro:pathIsAbsolute(_ss_CMAKE_INSTALL_DATA_DIR):
|
||||
# CMAKE_INSTALL_DATA_DIR = "$$[QT_HOST_DATA]/"
|
||||
# CMAKE_INSTALL_DATA_DIR_IS_ABSOLUTE = "True"
|
||||
|
||||
#### Keys ignored in scope 21:.:global:global/global.pri:QT_CPU_FEATURES__ss_QT_ARCH___contains___f16c:
|
||||
#### Keys ignored in scope 20:.:global:global/global.pri:QT_CPU_FEATURES__ss_QT_ARCH___contains___f16c:
|
||||
# f16c_cxx = "true"
|
||||
|
||||
#### Keys ignored in scope 23:.:global:global/global.pri:CLANG OR intel_icl OR ICC:
|
||||
#### Keys ignored in scope 22:.:global:global/global.pri:CLANG OR intel_icl OR ICC:
|
||||
# f16c_cxx = "false"
|
||||
|
||||
#### Keys ignored in scope 25:.:global:global/global.pri:GCC AND f16c AND x86SimdAlways:
|
||||
#### Keys ignored in scope 24:.:global:global/global.pri:GCC AND f16c AND x86SimdAlways:
|
||||
# f16c_cxx = "true"
|
||||
|
||||
#### Keys ignored in scope 27:.:global:global/global.pri:MSVC AND QT_CPU_FEATURES__ss_QT_ARCH___contains___avx:
|
||||
#### Keys ignored in scope 26:.:global:global/global.pri:MSVC AND QT_CPU_FEATURES__ss_QT_ARCH___contains___avx:
|
||||
# f16c_cxx = "true"
|
||||
|
||||
#### Keys ignored in scope 28:.:global:global/global.pri:else:
|
||||
#### Keys ignored in scope 27:.:global:global/global.pri:else:
|
||||
# f16c_cxx = "false"
|
||||
|
||||
qt_extend_target(Core CONDITION _ss_f16c_cxx
|
||||
@ -460,7 +456,7 @@ qt_extend_target(Core CONDITION LINUX AND NOT static
|
||||
global/minimum-linux_p.h
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 35:.:global:global/global.pri:precompile_header:
|
||||
#### Keys ignored in scope 34:.:global:global/global.pri:precompile_header:
|
||||
# NO_PCH_ASM = "global/minimum-linux.S"
|
||||
# QMAKE_EXTRA_COMPILERS = "no_pch_assembler"
|
||||
# no_pch_assembler.commands = "$$QMAKE_CC" "-c" "$(CFLAGS)" "$(INCPATH)" "${QMAKE_FILE_IN}" "-o" "${QMAKE_FILE_OUT}"
|
||||
@ -469,7 +465,7 @@ qt_extend_target(Core CONDITION LINUX AND NOT static
|
||||
# no_pch_assembler.name = "compiling[no_pch]" "${QMAKE_FILE_IN}"
|
||||
# no_pch_assembler.output = "${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${firstQMAKE_EXT_OBJ}"
|
||||
|
||||
#### Keys ignored in scope 36:.:global:global/global.pri:silent:
|
||||
#### Keys ignored in scope 35:.:global:global/global.pri:silent:
|
||||
# no_pch_assembler.commands = "@echo" "compiling[no_pch]" "${QMAKE_FILE_IN}" "&&"
|
||||
|
||||
qt_extend_target(Core CONDITION LINUX AND NOT precompile_header AND NOT static
|
||||
@ -487,7 +483,7 @@ qt_extend_target(Core CONDITION QT_FEATURE_journald
|
||||
PkgConfig::Libsystemd
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 40:.:global:global/global.pri:GCC AND ltcg:
|
||||
#### Keys ignored in scope 39:.:global:global/global.pri:GCC AND ltcg:
|
||||
# QMAKE_EXTRA_COMPILERS = "versiontagging_compiler"
|
||||
# versiontagging_compiler.commands = "$$QMAKE_CXX" "-c" "$(CXXFLAGS)" "$(INCPATH)" "-fno-lto" "-o" "${QMAKE_FILE_OUT}" "${QMAKE_FILE_IN}"
|
||||
# versiontagging_compiler.dependency_type = "TYPE_C"
|
||||
@ -496,7 +492,7 @@ qt_extend_target(Core CONDITION QT_FEATURE_journald
|
||||
# versiontagging_compiler.output = "${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${firstQMAKE_EXT_OBJ}"
|
||||
# versiontagging_compiler.variable_out = "OBJECTS"
|
||||
|
||||
#### Keys ignored in scope 41:.:global:global/global.pri:silent:
|
||||
#### Keys ignored in scope 40:.:global:global/global.pri:silent:
|
||||
# versiontagging_compiler.commands = "@echo" "compiling[versiontagging]" "${QMAKE_FILE_IN}" "&&"
|
||||
|
||||
qt_extend_target(Core CONDITION NOT GCC OR NOT ltcg
|
||||
@ -797,7 +793,7 @@ qt_extend_target(Core CONDITION QT_FEATURE_processenvironment
|
||||
io/qprocess.cpp io/qprocess.h io/qprocess_p.h
|
||||
)
|
||||
|
||||
qt_extend_target(Core CONDITION QT_FEATURE_processenvironment AND WIN32 AND NOT WINRT
|
||||
qt_extend_target(Core CONDITION QT_FEATURE_processenvironment AND WIN32
|
||||
SOURCES
|
||||
io/qprocess_win.cpp
|
||||
)
|
||||
@ -812,16 +808,11 @@ qt_extend_target(Core CONDITION QT_FEATURE_settings
|
||||
io/qsettings.cpp io/qsettings.h io/qsettings_p.h
|
||||
)
|
||||
|
||||
qt_extend_target(Core CONDITION QT_FEATURE_settings AND WIN32 AND NOT WINRT
|
||||
qt_extend_target(Core CONDITION QT_FEATURE_settings AND WIN32
|
||||
SOURCES
|
||||
io/qsettings_win.cpp
|
||||
)
|
||||
|
||||
qt_extend_target(Core CONDITION QT_FEATURE_settings AND WINRT
|
||||
SOURCES
|
||||
io/qsettings_winrt.cpp
|
||||
)
|
||||
|
||||
qt_extend_target(Core CONDITION APPLE AND QT_FEATURE_settings AND NOT NACL
|
||||
SOURCES
|
||||
io/qsettings_mac.cpp
|
||||
@ -837,15 +828,6 @@ qt_extend_target(Core CONDITION QT_FEATURE_filesystemiterator AND WIN32
|
||||
io/qfilesystemiterator_win.cpp
|
||||
)
|
||||
|
||||
qt_extend_target(Core CONDITION WINRT
|
||||
SOURCES
|
||||
io/qstandardpaths_winrt.cpp
|
||||
io/qstorageinfo_stub.cpp
|
||||
kernel/qeventdispatcher_winrt.cpp kernel/qeventdispatcher_winrt_p.h
|
||||
kernel/qfunctions_fake_env_p.h
|
||||
kernel/qfunctions_winrt.cpp kernel/qfunctions_winrt.h
|
||||
)
|
||||
|
||||
qt_extend_target(Core CONDITION QT_FEATURE_process AND UNIX
|
||||
SOURCES
|
||||
../3rdparty/forkfd/forkfd.h
|
||||
@ -1076,7 +1058,7 @@ qt_extend_target(Core CONDITION QT_FEATURE_mimetype
|
||||
mimetypes/qmimetypeparser.cpp mimetypes/qmimetypeparser_p.h
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 197:.:mimetypes:mimetypes/mimetypes.pri:QT_FEATURE_mimetype:
|
||||
#### Keys ignored in scope 188:.:mimetypes:mimetypes/mimetypes.pri:QT_FEATURE_mimetype:
|
||||
# MIME_DATABASE = "mimetypes/mime/packages/freedesktop.org.xml"
|
||||
# OTHER_FILES = "$$MIME_DATABASE"
|
||||
|
||||
@ -1085,7 +1067,7 @@ qt_extend_target(Core CONDITION QT_FEATURE_mimetype AND QT_FEATURE_mimetype_data
|
||||
.rcc
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 198:.:mimetypes:mimetypes/mimetypes.pri:QT_FEATURE_mimetype_database:
|
||||
#### Keys ignored in scope 189:.:mimetypes:mimetypes/mimetypes.pri:QT_FEATURE_mimetype_database:
|
||||
# QMAKE_EXTRA_COMPILERS = "mimedb"
|
||||
# mimedb.commands = "${QMAKE_FILE_IN}" ">" "${QMAKE_FILE_OUT}"
|
||||
# mimedb.depends = "$$PWD/mime/generate.pl"
|
||||
@ -1093,23 +1075,23 @@ qt_extend_target(Core CONDITION QT_FEATURE_mimetype AND QT_FEATURE_mimetype_data
|
||||
# mimedb.output = "$$outpath/qmimeprovider_database.cpp"
|
||||
# mimedb.variable_out = "INCLUDED_SOURCES"
|
||||
|
||||
#### Keys ignored in scope 199:.:mimetypes:mimetypes/mimetypes.pri:ANDROID:
|
||||
#### Keys ignored in scope 190:.:mimetypes:mimetypes/mimetypes.pri:ANDROID:
|
||||
# outpath = "$$outpath/$${QT_ARCH}"
|
||||
|
||||
#### Keys ignored in scope 201:.:mimetypes:mimetypes/mimetypes.pri:(CMAKE_BUILD_TYPE STREQUAL Debug):
|
||||
#### Keys ignored in scope 192:.:mimetypes:mimetypes/mimetypes.pri:(CMAKE_BUILD_TYPE STREQUAL Debug):
|
||||
# outpath = "$$outpath/debug"
|
||||
|
||||
#### Keys ignored in scope 202:.:mimetypes:mimetypes/mimetypes.pri:else:
|
||||
#### Keys ignored in scope 193:.:mimetypes:mimetypes/mimetypes.pri:else:
|
||||
# outpath = "$$outpath/release"
|
||||
|
||||
#### Keys ignored in scope 203:.:mimetypes:mimetypes/mimetypes.pri:MAKEFILE_GENERATOR___equals___MSVC.NET OR MAKEFILE_GENERATOR___equals___MSBUILD OR QMAKE_SH_ISEMPTY:
|
||||
#### Keys ignored in scope 194:.:mimetypes:mimetypes/mimetypes.pri:MAKEFILE_GENERATOR___equals___MSVC.NET OR MAKEFILE_GENERATOR___equals___MSBUILD OR QMAKE_SH_ISEMPTY:
|
||||
# mimedb.commands = "cmd" "/c" "$$shell_path($$PWD/mime/generate.bat)"
|
||||
# mimedb.depends = "$$PWD/mime/generate.bat" "$$PWD/mime/hexdump.ps1"
|
||||
|
||||
#### Keys ignored in scope 204:.:mimetypes:mimetypes/mimetypes.pri:else:
|
||||
#### Keys ignored in scope 195:.:mimetypes:mimetypes/mimetypes.pri:else:
|
||||
# mimedb.commands = "perl" "$${mimedb.depends}"
|
||||
|
||||
#### Keys ignored in scope 205:.:mimetypes:mimetypes/mimetypes.pri:QT_FEATURE_zstd:
|
||||
#### Keys ignored in scope 196:.:mimetypes:mimetypes/mimetypes.pri:QT_FEATURE_zstd:
|
||||
# mimedb.commands = "--zstd"
|
||||
|
||||
qt_extend_target(Core CONDITION WASM
|
||||
|
@ -446,27 +446,22 @@ qt_extend_target(Core CONDITION WIN32
|
||||
io/qfilesystemengine_win.cpp
|
||||
io/qfsfileengine_win.cpp
|
||||
io/qlockfile_win.cpp
|
||||
kernel/qcoreapplication_win.cpp
|
||||
kernel/qelapsedtimer_win.cpp
|
||||
kernel/qsharedmemory_win.cpp
|
||||
kernel/qsystemsemaphore_win.cpp
|
||||
kernel/qwineventnotifier.cpp kernel/qwineventnotifier.h kernel/qwineventnotifier_p.h
|
||||
plugin/qsystemlibrary.cpp plugin/qsystemlibrary_p.h
|
||||
thread/qatomic_msvc.h
|
||||
thread/qthread_win.cpp
|
||||
# DEFINES # special case: remove
|
||||
LIBRARIES
|
||||
ws2_32
|
||||
)
|
||||
|
||||
qt_extend_target(Core CONDITION WIN32 AND NOT WINRT
|
||||
SOURCES
|
||||
io/qstandardpaths_win.cpp
|
||||
io/qstorageinfo_win.cpp
|
||||
io/qwindowspipereader.cpp io/qwindowspipereader_p.h
|
||||
io/qwindowspipewriter.cpp io/qwindowspipewriter_p.h
|
||||
kernel/qcoreapplication_win.cpp
|
||||
kernel/qelapsedtimer_win.cpp
|
||||
kernel/qeventdispatcher_win.cpp kernel/qeventdispatcher_win_p.h
|
||||
kernel/qfunctions_winrt_p.h
|
||||
kernel/qsharedmemory_win.cpp
|
||||
kernel/qsystemsemaphore_win.cpp
|
||||
kernel/qwineventnotifier.cpp kernel/qwineventnotifier.h kernel/qwineventnotifier_p.h
|
||||
kernel/qwinregistry.cpp kernel/qwinregistry_p.h
|
||||
plugin/qsystemlibrary.cpp plugin/qsystemlibrary_p.h
|
||||
thread/qatomic_msvc.h
|
||||
thread/qthread_win.cpp
|
||||
# DEFINES # special case: remove
|
||||
LIBRARIES
|
||||
advapi32
|
||||
kernel32
|
||||
@ -477,6 +472,7 @@ qt_extend_target(Core CONDITION WIN32 AND NOT WINRT
|
||||
uuid
|
||||
version
|
||||
winmm
|
||||
ws2_32
|
||||
PUBLIC_LIBRARIES
|
||||
mpr
|
||||
userenv
|
||||
@ -520,27 +516,27 @@ qt_extend_target(Core CONDITION INTEGRITY
|
||||
--pending_instantiations=128
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 15:.:.:corelib.pro:pathIsAbsolute(_ss_CMAKE_HOST_DATA_DIR):
|
||||
#### Keys ignored in scope 14:.:.:corelib.pro:pathIsAbsolute(_ss_CMAKE_HOST_DATA_DIR):
|
||||
# CMAKE_HOST_DATA_DIR = "$$[QT_HOST_DATA/src]/"
|
||||
# CMAKE_HOST_DATA_DIR_IS_ABSOLUTE = "True"
|
||||
|
||||
#### Keys ignored in scope 16:.:.:corelib.pro:pathIsAbsolute(_ss_CMAKE_INSTALL_DATA_DIR):
|
||||
#### Keys ignored in scope 15:.:.:corelib.pro:pathIsAbsolute(_ss_CMAKE_INSTALL_DATA_DIR):
|
||||
# CMAKE_INSTALL_DATA_DIR = "$$[QT_HOST_DATA]/"
|
||||
# CMAKE_INSTALL_DATA_DIR_IS_ABSOLUTE = "True"
|
||||
|
||||
#### Keys ignored in scope 21:.:global:global/global.pri:QT_CPU_FEATURES__ss_QT_ARCH___contains___f16c:
|
||||
#### Keys ignored in scope 20:.:global:global/global.pri:QT_CPU_FEATURES__ss_QT_ARCH___contains___f16c:
|
||||
# f16c_cxx = "true"
|
||||
|
||||
#### Keys ignored in scope 23:.:global:global/global.pri:CLANG OR intel_icl OR ICC:
|
||||
#### Keys ignored in scope 22:.:global:global/global.pri:CLANG OR intel_icl OR ICC:
|
||||
# f16c_cxx = "false"
|
||||
|
||||
#### Keys ignored in scope 25:.:global:global/global.pri:GCC AND f16c AND x86SimdAlways:
|
||||
#### Keys ignored in scope 24:.:global:global/global.pri:GCC AND f16c AND x86SimdAlways:
|
||||
# f16c_cxx = "true"
|
||||
|
||||
#### Keys ignored in scope 27:.:global:global/global.pri:MSVC AND QT_CPU_FEATURES__ss_QT_ARCH___contains___avx:
|
||||
#### Keys ignored in scope 26:.:global:global/global.pri:MSVC AND QT_CPU_FEATURES__ss_QT_ARCH___contains___avx:
|
||||
# f16c_cxx = "true"
|
||||
|
||||
#### Keys ignored in scope 28:.:global:global/global.pri:else:
|
||||
#### Keys ignored in scope 27:.:global:global/global.pri:else:
|
||||
# f16c_cxx = "false"
|
||||
|
||||
# extend_target(Core CONDITION _ss_f16c_cxx ... # special case remove: Handled manually
|
||||
@ -560,7 +556,7 @@ qt_extend_target(Core CONDITION LINUX AND NOT static
|
||||
global/minimum-linux_p.h
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 35:.:global:global/global.pri:precompile_header:
|
||||
#### Keys ignored in scope 34:.:global:global/global.pri:precompile_header:
|
||||
# NO_PCH_ASM = "global/minimum-linux.S"
|
||||
# QMAKE_EXTRA_COMPILERS = "no_pch_assembler"
|
||||
# no_pch_assembler.commands = "$$QMAKE_CC" "-c" "$(CFLAGS)" "$(INCPATH)" "${QMAKE_FILE_IN}" "-o" "${QMAKE_FILE_OUT}"
|
||||
@ -569,7 +565,7 @@ qt_extend_target(Core CONDITION LINUX AND NOT static
|
||||
# no_pch_assembler.name = "compiling[no_pch]" "${QMAKE_FILE_IN}"
|
||||
# no_pch_assembler.output = "${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${firstQMAKE_EXT_OBJ}"
|
||||
|
||||
#### Keys ignored in scope 36:.:global:global/global.pri:silent:
|
||||
#### Keys ignored in scope 35:.:global:global/global.pri:silent:
|
||||
# no_pch_assembler.commands = "@echo" "compiling[no_pch]" "${QMAKE_FILE_IN}" "&&"
|
||||
|
||||
qt_extend_target(Core CONDITION LINUX AND NOT precompile_header AND NOT static
|
||||
@ -587,7 +583,7 @@ qt_extend_target(Core CONDITION QT_FEATURE_journald
|
||||
PkgConfig::Libsystemd
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 40:.:global:global/global.pri:GCC AND ltcg:
|
||||
#### Keys ignored in scope 39:.:global:global/global.pri:GCC AND ltcg:
|
||||
# QMAKE_EXTRA_COMPILERS = "versiontagging_compiler"
|
||||
# versiontagging_compiler.commands = "$$QMAKE_CXX" "-c" "$(CXXFLAGS)" "$(INCPATH)" "-fno-lto" "-o" "${QMAKE_FILE_OUT}" "${QMAKE_FILE_IN}"
|
||||
# versiontagging_compiler.dependency_type = "TYPE_C"
|
||||
@ -596,7 +592,7 @@ qt_extend_target(Core CONDITION QT_FEATURE_journald
|
||||
# versiontagging_compiler.output = "${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${firstQMAKE_EXT_OBJ}"
|
||||
# versiontagging_compiler.variable_out = "OBJECTS"
|
||||
|
||||
#### Keys ignored in scope 41:.:global:global/global.pri:silent:
|
||||
#### Keys ignored in scope 40:.:global:global/global.pri:silent:
|
||||
# versiontagging_compiler.commands = "@echo" "compiling[versiontagging]" "${QMAKE_FILE_IN}" "&&"
|
||||
|
||||
qt_extend_target(Core CONDITION NOT GCC OR NOT ltcg
|
||||
@ -897,7 +893,7 @@ qt_extend_target(Core CONDITION QT_FEATURE_processenvironment
|
||||
io/qprocess.cpp io/qprocess.h io/qprocess_p.h
|
||||
)
|
||||
|
||||
qt_extend_target(Core CONDITION QT_FEATURE_processenvironment AND WIN32 AND NOT WINRT
|
||||
qt_extend_target(Core CONDITION QT_FEATURE_processenvironment AND WIN32
|
||||
SOURCES
|
||||
io/qprocess_win.cpp
|
||||
)
|
||||
@ -912,16 +908,11 @@ qt_extend_target(Core CONDITION QT_FEATURE_settings
|
||||
io/qsettings.cpp io/qsettings.h io/qsettings_p.h
|
||||
)
|
||||
|
||||
qt_extend_target(Core CONDITION QT_FEATURE_settings AND WIN32 AND NOT WINRT
|
||||
qt_extend_target(Core CONDITION QT_FEATURE_settings AND WIN32
|
||||
SOURCES
|
||||
io/qsettings_win.cpp
|
||||
)
|
||||
|
||||
qt_extend_target(Core CONDITION QT_FEATURE_settings AND WINRT
|
||||
SOURCES
|
||||
io/qsettings_winrt.cpp
|
||||
)
|
||||
|
||||
qt_extend_target(Core CONDITION APPLE AND QT_FEATURE_settings AND NOT NACL
|
||||
SOURCES
|
||||
io/qsettings_mac.cpp
|
||||
@ -937,15 +928,6 @@ qt_extend_target(Core CONDITION QT_FEATURE_filesystemiterator AND WIN32
|
||||
io/qfilesystemiterator_win.cpp
|
||||
)
|
||||
|
||||
qt_extend_target(Core CONDITION WINRT
|
||||
SOURCES
|
||||
io/qstandardpaths_winrt.cpp
|
||||
io/qstorageinfo_stub.cpp
|
||||
kernel/qeventdispatcher_winrt.cpp kernel/qeventdispatcher_winrt_p.h
|
||||
kernel/qfunctions_fake_env_p.h
|
||||
kernel/qfunctions_winrt.cpp kernel/qfunctions_winrt.h
|
||||
)
|
||||
|
||||
qt_extend_target(Core CONDITION QT_FEATURE_process AND UNIX
|
||||
SOURCES
|
||||
../3rdparty/forkfd/forkfd.h
|
||||
@ -1176,7 +1158,7 @@ qt_extend_target(Core CONDITION QT_FEATURE_mimetype
|
||||
mimetypes/qmimetypeparser.cpp mimetypes/qmimetypeparser_p.h
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 197:.:mimetypes:mimetypes/mimetypes.pri:QT_FEATURE_mimetype:
|
||||
#### Keys ignored in scope 188:.:mimetypes:mimetypes/mimetypes.pri:QT_FEATURE_mimetype:
|
||||
# MIME_DATABASE = "mimetypes/mime/packages/freedesktop.org.xml"
|
||||
# OTHER_FILES = "$$MIME_DATABASE"
|
||||
|
||||
@ -1187,7 +1169,7 @@ qt_extend_target(Core CONDITION QT_FEATURE_mimetype
|
||||
#)
|
||||
# special case end
|
||||
|
||||
#### Keys ignored in scope 198:.:mimetypes:mimetypes/mimetypes.pri:QT_FEATURE_mimetype_database:
|
||||
#### Keys ignored in scope 189:.:mimetypes:mimetypes/mimetypes.pri:QT_FEATURE_mimetype_database:
|
||||
# QMAKE_EXTRA_COMPILERS = "mimedb"
|
||||
# mimedb.commands = "${QMAKE_FILE_IN}" ">" "${QMAKE_FILE_OUT}"
|
||||
# mimedb.depends = "$$PWD/mime/generate.pl"
|
||||
@ -1195,23 +1177,23 @@ qt_extend_target(Core CONDITION QT_FEATURE_mimetype
|
||||
# mimedb.output = "$$outpath/qmimeprovider_database.cpp"
|
||||
# mimedb.variable_out = "INCLUDED_SOURCES"
|
||||
|
||||
#### Keys ignored in scope 199:.:mimetypes:mimetypes/mimetypes.pri:ANDROID:
|
||||
#### Keys ignored in scope 190:.:mimetypes:mimetypes/mimetypes.pri:ANDROID:
|
||||
# outpath = "$$outpath/$${QT_ARCH}"
|
||||
|
||||
#### Keys ignored in scope 201:.:mimetypes:mimetypes/mimetypes.pri:(CMAKE_BUILD_TYPE STREQUAL Debug):
|
||||
#### Keys ignored in scope 192:.:mimetypes:mimetypes/mimetypes.pri:(CMAKE_BUILD_TYPE STREQUAL Debug):
|
||||
# outpath = "$$outpath/debug"
|
||||
|
||||
#### Keys ignored in scope 202:.:mimetypes:mimetypes/mimetypes.pri:else:
|
||||
#### Keys ignored in scope 193:.:mimetypes:mimetypes/mimetypes.pri:else:
|
||||
# outpath = "$$outpath/release"
|
||||
|
||||
#### Keys ignored in scope 203:.:mimetypes:mimetypes/mimetypes.pri:MAKEFILE_GENERATOR___equals___MSVC.NET OR MAKEFILE_GENERATOR___equals___MSBUILD OR QMAKE_SH_ISEMPTY:
|
||||
#### Keys ignored in scope 194:.:mimetypes:mimetypes/mimetypes.pri:MAKEFILE_GENERATOR___equals___MSVC.NET OR MAKEFILE_GENERATOR___equals___MSBUILD OR QMAKE_SH_ISEMPTY:
|
||||
# mimedb.commands = "cmd" "/c" "$$shell_path($$PWD/mime/generate.bat)"
|
||||
# mimedb.depends = "$$PWD/mime/generate.bat" "$$PWD/mime/hexdump.ps1"
|
||||
|
||||
#### Keys ignored in scope 204:.:mimetypes:mimetypes/mimetypes.pri:else:
|
||||
#### Keys ignored in scope 195:.:mimetypes:mimetypes/mimetypes.pri:else:
|
||||
# mimedb.commands = "perl" "$${mimedb.depends}"
|
||||
|
||||
#### Keys ignored in scope 205:.:mimetypes:mimetypes/mimetypes.pri:QT_FEATURE_zstd:
|
||||
#### Keys ignored in scope 196:.:mimetypes:mimetypes/mimetypes.pri:QT_FEATURE_zstd:
|
||||
# mimedb.commands = "--zstd"
|
||||
# Resources:
|
||||
# special case begin
|
||||
|
@ -788,14 +788,14 @@ qt_feature("process" PUBLIC
|
||||
SECTION "File I/O"
|
||||
LABEL "QProcess"
|
||||
PURPOSE "Supports external process invocation."
|
||||
CONDITION QT_FEATURE_processenvironment AND ( QT_FEATURE_thread OR NOT UNIX ) AND NOT WINRT AND NOT UIKIT AND NOT INTEGRITY AND NOT VXWORKS AND NOT rtems
|
||||
CONDITION QT_FEATURE_processenvironment AND ( QT_FEATURE_thread OR NOT UNIX ) AND NOT UIKIT AND NOT INTEGRITY AND NOT VXWORKS AND NOT rtems
|
||||
)
|
||||
qt_feature_definition("process" "QT_NO_PROCESS" NEGATE VALUE "1")
|
||||
qt_feature("processenvironment" PUBLIC
|
||||
SECTION "File I/O"
|
||||
LABEL "QProcessEnvironment"
|
||||
PURPOSE "Provides a higher-level abstraction of environment variables."
|
||||
CONDITION NOT WINRT AND NOT INTEGRITY AND NOT rtems
|
||||
CONDITION NOT INTEGRITY AND NOT rtems
|
||||
)
|
||||
qt_feature("temporaryfile" PUBLIC
|
||||
SECTION "File I/O"
|
||||
@ -820,7 +820,6 @@ qt_feature("filesystemwatcher" PUBLIC
|
||||
SECTION "File I/O"
|
||||
LABEL "QFileSystemWatcher"
|
||||
PURPOSE "Provides an interface for monitoring files and directories for modifications."
|
||||
CONDITION NOT WINRT
|
||||
)
|
||||
qt_feature_definition("filesystemwatcher" "QT_NO_FILESYSTEMWATCHER" NEGATE VALUE "1")
|
||||
qt_feature("filesystemiterator" PUBLIC
|
||||
|
@ -895,14 +895,14 @@
|
||||
"label": "QProcess",
|
||||
"purpose": "Supports external process invocation.",
|
||||
"section": "File I/O",
|
||||
"condition": "features.processenvironment && (features.thread || !config.unix) && !config.winrt && !config.uikit && !config.integrity && !config.vxworks && !config.rtems",
|
||||
"condition": "features.processenvironment && (features.thread || !config.unix) && !config.uikit && !config.integrity && !config.vxworks && !config.rtems",
|
||||
"output": [ "publicFeature", "feature" ]
|
||||
},
|
||||
"processenvironment": {
|
||||
"label": "QProcessEnvironment",
|
||||
"purpose": "Provides a higher-level abstraction of environment variables.",
|
||||
"section": "File I/O",
|
||||
"condition": "!config.winrt && !config.integrity && !config.rtems",
|
||||
"condition": "!config.integrity && !config.rtems",
|
||||
"output": [ "publicFeature" ]
|
||||
},
|
||||
"temporaryfile": {
|
||||
@ -928,7 +928,6 @@
|
||||
"label": "QFileSystemWatcher",
|
||||
"purpose": "Provides an interface for monitoring files and directories for modifications.",
|
||||
"section": "File I/O",
|
||||
"condition": "!config.winrt",
|
||||
"output": [ "publicFeature", "feature" ]
|
||||
},
|
||||
"filesystemiterator": {
|
||||
|
@ -52,7 +52,7 @@ include(platform/platform.pri)
|
||||
|
||||
win32 {
|
||||
QMAKE_USE_PRIVATE += ws2_32
|
||||
!winrt: QMAKE_USE_PRIVATE += advapi32 kernel32 ole32 shell32 uuid user32 winmm
|
||||
QMAKE_USE_PRIVATE += advapi32 kernel32 ole32 shell32 uuid user32 winmm
|
||||
}
|
||||
|
||||
darwin {
|
||||
|
@ -95,7 +95,7 @@
|
||||
#endif
|
||||
|
||||
// pointer type
|
||||
#if defined(Q_OS_WIN64) || (defined(Q_OS_WINRT) && defined(_M_X64))
|
||||
#if defined(Q_OS_WIN64)
|
||||
# define ARCH_POINTER "llp64"
|
||||
#elif defined(__LP64__) || QT_POINTER_SIZE - 0 == 8
|
||||
# define ARCH_POINTER "lp64"
|
||||
|
@ -46,11 +46,9 @@
|
||||
#include "qdatetime.h"
|
||||
#include "qoperatingsystemversion.h"
|
||||
#include "qoperatingsystemversion_p.h"
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_CYGWIN) || defined(Q_OS_WINRT)
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_CYGWIN)
|
||||
# include "qoperatingsystemversion_win_p.h"
|
||||
# ifndef Q_OS_WINRT
|
||||
# include "private/qwinregistry_p.h"
|
||||
# endif
|
||||
# include "private/qwinregistry_p.h"
|
||||
#endif // Q_OS_WIN || Q_OS_CYGWIN
|
||||
#include <private/qlocale_tools_p.h>
|
||||
|
||||
@ -72,10 +70,6 @@
|
||||
# include <crtdbg.h>
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WINRT
|
||||
#include <Ws2tcpip.h>
|
||||
#endif // Q_OS_WINRT
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
# include <qt_windows.h>
|
||||
#endif
|
||||
@ -1463,7 +1457,7 @@ bool qSharedBuild() noexcept
|
||||
\relates <QtGlobal>
|
||||
|
||||
Defined on all supported versions of Windows. That is, if
|
||||
\l Q_OS_WIN32, \l Q_OS_WIN64, or \l Q_OS_WINRT is defined.
|
||||
\l Q_OS_WIN32 or \l Q_OS_WIN64 is defined.
|
||||
*/
|
||||
|
||||
/*!
|
||||
@ -1487,14 +1481,6 @@ bool qSharedBuild() noexcept
|
||||
Defined on 64-bit versions of Windows.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\macro Q_OS_WINRT
|
||||
\relates <QtGlobal>
|
||||
|
||||
Defined for Windows Runtime (Windows Store apps) on Windows 8, Windows RT,
|
||||
and Windows Phone 8.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\macro Q_OS_CYGWIN
|
||||
\relates <QtGlobal>
|
||||
@ -2165,7 +2151,7 @@ static const char *osVer_helper(QOperatingSystemVersion version = QOperatingSyst
|
||||
}
|
||||
#endif
|
||||
|
||||
#elif defined(Q_OS_WIN) || defined(Q_OS_CYGWIN) || defined(Q_OS_WINRT)
|
||||
#elif defined(Q_OS_WIN) || defined(Q_OS_CYGWIN)
|
||||
|
||||
QT_BEGIN_INCLUDE_NAMESPACE
|
||||
#include "qt_windows.h"
|
||||
@ -2223,7 +2209,7 @@ QT_WARNING_POP
|
||||
|
||||
static QString readVersionRegistryString(const wchar_t *subKey)
|
||||
{
|
||||
#if !defined(QT_BUILD_QMAKE) && !defined(Q_OS_WINRT)
|
||||
#if !defined(QT_BUILD_QMAKE)
|
||||
return QWinRegistryKey(HKEY_LOCAL_MACHINE, LR"(SOFTWARE\Microsoft\Windows NT\CurrentVersion)")
|
||||
.stringValue(subKey);
|
||||
#else
|
||||
@ -2834,8 +2820,7 @@ QString QSysInfo::kernelVersion()
|
||||
\b{FreeBSD note}: this function returns "debian" for Debian/kFreeBSD and
|
||||
"unknown" otherwise.
|
||||
|
||||
\b{Windows note}: this function "winrt" for WinRT builds, and "windows"
|
||||
for normal desktop builds.
|
||||
\b{Windows note}: this function return "windows"
|
||||
|
||||
For other Unix-type systems, this function usually returns "unknown".
|
||||
|
||||
@ -2844,9 +2829,7 @@ QString QSysInfo::kernelVersion()
|
||||
QString QSysInfo::productType()
|
||||
{
|
||||
// similar, but not identical to QFileSelectorPrivate::platformSelectors
|
||||
#if defined(Q_OS_WINRT)
|
||||
return QStringLiteral("winrt");
|
||||
#elif defined(Q_OS_WIN)
|
||||
#if defined(Q_OS_WIN)
|
||||
return QStringLiteral("windows");
|
||||
|
||||
#elif defined(Q_OS_QNX)
|
||||
@ -2968,7 +2951,7 @@ QString QSysInfo::prettyProductName()
|
||||
if (!name)
|
||||
return result + versionString;
|
||||
result += QLatin1String(name);
|
||||
# if !defined(Q_OS_WIN) || defined(Q_OS_WINRT)
|
||||
# if !defined(Q_OS_WIN)
|
||||
return result + QLatin1String(" (") + versionString + QLatin1Char(')');
|
||||
# else
|
||||
// (resembling winver.exe): Windows 10 "Windows 10 Version 1809"
|
||||
@ -3104,7 +3087,7 @@ QByteArray QSysInfo::machineUniqueId()
|
||||
if (len != -1)
|
||||
return QByteArray(buffer, len);
|
||||
}
|
||||
#elif defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||
#elif defined(Q_OS_WIN)
|
||||
// Let's poke at the registry
|
||||
// ### Qt 6: Use new helpers from qwinregistry.cpp (once bootstrap builds are obsolete)
|
||||
HKEY key = NULL;
|
||||
@ -3537,7 +3520,7 @@ QByteArray qgetenv(const char *varName)
|
||||
*/
|
||||
QString qEnvironmentVariable(const char *varName, const QString &defaultValue)
|
||||
{
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||
#if defined(Q_OS_WIN)
|
||||
const auto locker = qt_scoped_lock(environmentMutex);
|
||||
QVarLengthArray<wchar_t, 32> wname(int(strlen(varName)) + 1);
|
||||
for (int i = 0; i < wname.size(); ++i) // wname.size() is correct: will copy terminating null
|
||||
|
@ -507,13 +507,6 @@ static QString prefixFromQtCoreLibraryHelper(const QString &qtCoreLibraryPath)
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
#if defined(Q_OS_WINRT)
|
||||
EXTERN_C IMAGE_DOS_HEADER __ImageBase;
|
||||
static HMODULE getWindowsModuleHandle()
|
||||
{
|
||||
return reinterpret_cast<HMODULE>(&__ImageBase);
|
||||
}
|
||||
#else // Q_OS_WINRT
|
||||
static HMODULE getWindowsModuleHandle()
|
||||
{
|
||||
HMODULE hModule = NULL;
|
||||
@ -522,7 +515,6 @@ static HMODULE getWindowsModuleHandle()
|
||||
(LPCTSTR)&QLibraryInfo::isDebugBuild, &hModule);
|
||||
return hModule;
|
||||
}
|
||||
#endif // !Q_OS_WINRT
|
||||
#endif // Q_OS_WIN
|
||||
|
||||
static QString getRelocatablePrefix()
|
||||
|
@ -226,10 +226,6 @@ static bool isDefaultCategory(const char *category)
|
||||
*/
|
||||
static bool systemHasStderr()
|
||||
{
|
||||
#if defined(Q_OS_WINRT)
|
||||
return false; // WinRT has no stderr
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -268,7 +264,7 @@ static bool stderrHasConsoleAttached()
|
||||
if (qEnvironmentVariableIntValue("QT_ASSUME_STDERR_HAS_CONSOLE"))
|
||||
return true;
|
||||
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||
#if defined(Q_OS_WIN)
|
||||
return GetConsoleWindow();
|
||||
#elif defined(Q_OS_UNIX)
|
||||
# ifndef _PATH_TTY
|
||||
@ -1851,10 +1847,7 @@ static void qt_message_print(QtMsgType msgType, const QMessageLogContext &contex
|
||||
|
||||
static void qt_message_print(const QString &message)
|
||||
{
|
||||
#if defined(Q_OS_WINRT)
|
||||
win_outputDebugString_helper(message);
|
||||
return;
|
||||
#elif defined(Q_OS_WIN) && !defined(QT_BOOTSTRAPPED)
|
||||
#if defined(Q_OS_WIN) && !defined(QT_BOOTSTRAPPED)
|
||||
if (!shouldLogToStderr()) {
|
||||
win_outputDebugString_helper(message);
|
||||
return;
|
||||
|
@ -46,50 +46,17 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifdef Q_OS_WINRT
|
||||
static inline HMODULE moduleHandleForFunction(LPCVOID address)
|
||||
{
|
||||
// This is a widely used, decades-old technique for retrieving the handle
|
||||
// of a module and is effectively equivalent to GetModuleHandleEx
|
||||
// (which is unavailable on WinRT)
|
||||
MEMORY_BASIC_INFORMATION mbi = { 0, 0, 0, 0, 0, 0, 0 };
|
||||
if (VirtualQuery(address, &mbi, sizeof(mbi)) == 0)
|
||||
return 0;
|
||||
return reinterpret_cast<HMODULE>(mbi.AllocationBase);
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline OSVERSIONINFOEX determineWinOsVersion()
|
||||
{
|
||||
OSVERSIONINFOEX result = { sizeof(OSVERSIONINFOEX), 0, 0, 0, 0, {'\0'}, 0, 0, 0, 0, 0};
|
||||
|
||||
#define GetProcAddressA GetProcAddress
|
||||
|
||||
// GetModuleHandle is not supported in WinRT and linking to it at load time
|
||||
// will not pass the Windows App Certification Kit... but it exists and is functional,
|
||||
// so use some unusual but widely used techniques to get a pointer to it
|
||||
#ifdef Q_OS_WINRT
|
||||
// 1. Get HMODULE of kernel32.dll, using the address of some function exported by that DLL
|
||||
HMODULE kernelModule = moduleHandleForFunction(reinterpret_cast<LPCVOID>(VirtualQuery));
|
||||
if (Q_UNLIKELY(!kernelModule))
|
||||
return result;
|
||||
|
||||
// 2. Get pointer to GetModuleHandle so we can then load other arbitrary modules (DLLs)
|
||||
typedef HMODULE(WINAPI *GetModuleHandleFunction)(LPCWSTR);
|
||||
GetModuleHandleFunction pGetModuleHandle = reinterpret_cast<GetModuleHandleFunction>(
|
||||
GetProcAddressA(kernelModule, "GetModuleHandleW"));
|
||||
if (Q_UNLIKELY(!pGetModuleHandle))
|
||||
return result;
|
||||
#else
|
||||
#define pGetModuleHandle GetModuleHandleW
|
||||
#endif
|
||||
|
||||
HMODULE ntdll = pGetModuleHandle(L"ntdll.dll");
|
||||
if (Q_UNLIKELY(!ntdll))
|
||||
return result;
|
||||
|
||||
// NTSTATUS is not defined on WinRT
|
||||
typedef LONG NTSTATUS;
|
||||
typedef NTSTATUS (NTAPI *RtlGetVersionFunction)(LPOSVERSIONINFO);
|
||||
|
||||
// RtlGetVersion is documented public API but we must load it dynamically
|
||||
|
@ -357,8 +357,7 @@
|
||||
# define Q_BYTE_ORDER __BYTE_ORDER__
|
||||
# elif defined(__BIG_ENDIAN__) || defined(_big_endian__) || defined(_BIG_ENDIAN)
|
||||
# define Q_BYTE_ORDER Q_BIG_ENDIAN
|
||||
# elif defined(__LITTLE_ENDIAN__) || defined(_little_endian__) || defined(_LITTLE_ENDIAN) \
|
||||
|| defined(WINAPI_FAMILY) // WinRT is always little-endian according to MSDN.
|
||||
# elif defined(__LITTLE_ENDIAN__) || defined(_little_endian__) || defined(_LITTLE_ENDIAN)
|
||||
# define Q_BYTE_ORDER Q_LITTLE_ENDIAN
|
||||
# else
|
||||
# error "Unable to determine byte order!"
|
||||
|
@ -167,19 +167,13 @@ struct QRandomGenerator::SystemGenerator
|
||||
return qMax<qsizetype>(n, 0); // ignore any errors
|
||||
}
|
||||
|
||||
#elif defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||
#elif defined(Q_OS_WIN)
|
||||
qsizetype fillBuffer(void *buffer, qsizetype count) noexcept
|
||||
{
|
||||
auto RtlGenRandom = SystemFunction036;
|
||||
return RtlGenRandom(buffer, ULONG(count)) ? count: 0;
|
||||
}
|
||||
#elif defined(Q_OS_WINRT)
|
||||
qsizetype fillBuffer(void *, qsizetype) noexcept
|
||||
{
|
||||
// always use the fallback
|
||||
return 0;
|
||||
}
|
||||
#endif // Q_OS_WINRT
|
||||
#endif // Q_OS_WIN
|
||||
|
||||
static SystemGenerator &self();
|
||||
typedef quint32 result_type;
|
||||
|
@ -54,7 +54,6 @@
|
||||
WATCHOS - watchOS
|
||||
TVOS - tvOS
|
||||
WIN32 - Win32 (Windows 2000/XP/Vista/7 and Windows Server 2003/2008)
|
||||
WINRT - WinRT (Windows Runtime)
|
||||
CYGWIN - Cygwin
|
||||
SOLARIS - Sun Solaris
|
||||
HPUX - HP-UX
|
||||
@ -124,20 +123,7 @@
|
||||
# define Q_OS_WIN32
|
||||
# define Q_OS_WIN64
|
||||
#elif !defined(SAG_COM) && (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__))
|
||||
# if defined(WINAPI_FAMILY)
|
||||
# ifndef WINAPI_FAMILY_PC_APP
|
||||
# define WINAPI_FAMILY_PC_APP WINAPI_FAMILY_APP
|
||||
# endif
|
||||
# if defined(WINAPI_FAMILY_PHONE_APP) && WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP
|
||||
# define Q_OS_WINRT
|
||||
# elif WINAPI_FAMILY==WINAPI_FAMILY_PC_APP
|
||||
# define Q_OS_WINRT
|
||||
# else
|
||||
# define Q_OS_WIN32
|
||||
# endif
|
||||
# else
|
||||
# define Q_OS_WIN32
|
||||
# endif
|
||||
#elif defined(__sun) || defined(sun)
|
||||
# define Q_OS_SOLARIS
|
||||
#elif defined(hpux) || defined(__hpux)
|
||||
@ -184,7 +170,7 @@
|
||||
# error "Qt has not been ported to this OS - see http://www.qt-project.org/"
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64) || defined(Q_OS_WINRT)
|
||||
#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
|
||||
# define Q_OS_WINDOWS
|
||||
# define Q_OS_WIN
|
||||
# if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
|
@ -111,7 +111,7 @@ qtConfig(processenvironment) {
|
||||
io/qprocess.h \
|
||||
io/qprocess_p.h
|
||||
|
||||
win32:!winrt: \
|
||||
win32: \
|
||||
SOURCES += io/qprocess_win.cpp
|
||||
else: unix: \
|
||||
SOURCES += io/qprocess_unix.cpp
|
||||
@ -125,11 +125,7 @@ qtConfig(settings) {
|
||||
io/qsettings_p.h
|
||||
|
||||
win32 {
|
||||
!winrt {
|
||||
SOURCES += io/qsettings_win.cpp
|
||||
} else {
|
||||
SOURCES += io/qsettings_winrt.cpp
|
||||
}
|
||||
SOURCES += io/qsettings_win.cpp
|
||||
} else: darwin:!nacl {
|
||||
SOURCES += io/qsettings_mac.cpp
|
||||
}
|
||||
@ -137,32 +133,26 @@ qtConfig(settings) {
|
||||
}
|
||||
|
||||
win32 {
|
||||
SOURCES += io/qfsfileengine_win.cpp
|
||||
SOURCES += io/qlockfile_win.cpp
|
||||
SOURCES += io/qfilesystemengine_win.cpp
|
||||
SOURCES += io/qfsfileengine_win.cpp
|
||||
SOURCES += io/qlockfile_win.cpp
|
||||
SOURCES += io/qfilesystemengine_win.cpp
|
||||
|
||||
qtConfig(filesystemiterator) {
|
||||
SOURCES += io/qfilesystemiterator_win.cpp
|
||||
}
|
||||
|
||||
!winrt {
|
||||
HEADERS += \
|
||||
io/qwindowspipereader_p.h \
|
||||
io/qwindowspipewriter_p.h
|
||||
|
||||
SOURCES += \
|
||||
io/qstandardpaths_win.cpp \
|
||||
io/qstorageinfo_win.cpp \
|
||||
io/qwindowspipereader.cpp \
|
||||
io/qwindowspipewriter.cpp
|
||||
|
||||
LIBS += -lmpr -luserenv
|
||||
QMAKE_USE_PRIVATE += netapi32
|
||||
} else {
|
||||
SOURCES += \
|
||||
io/qstandardpaths_winrt.cpp \
|
||||
io/qstorageinfo_stub.cpp
|
||||
qtConfig(filesystemiterator) {
|
||||
SOURCES += io/qfilesystemiterator_win.cpp
|
||||
}
|
||||
|
||||
HEADERS += \
|
||||
io/qwindowspipereader_p.h \
|
||||
io/qwindowspipewriter_p.h
|
||||
|
||||
SOURCES += \
|
||||
io/qstandardpaths_win.cpp \
|
||||
io/qstorageinfo_win.cpp \
|
||||
io/qwindowspipereader.cpp \
|
||||
io/qwindowspipewriter.cpp
|
||||
|
||||
LIBS += -lmpr -luserenv
|
||||
QMAKE_USE_PRIVATE += netapi32
|
||||
} else:unix {
|
||||
SOURCES += \
|
||||
io/qfsfileengine_unix.cpp \
|
||||
|
@ -83,7 +83,7 @@ static QString driveSpec(const QString &path)
|
||||
#endif
|
||||
|
||||
enum {
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||
#if defined(Q_OS_WIN)
|
||||
OSSupportsUncPaths = true
|
||||
#else
|
||||
OSSupportsUncPaths = false
|
||||
@ -100,11 +100,6 @@ static int rootLength(const QString &name, bool allowUncPaths)
|
||||
const int nextSlash = name.indexOf(QLatin1Char('/'), 2);
|
||||
return nextSlash >= 0 ? nextSlash + 1 : len;
|
||||
}
|
||||
#if defined(Q_OS_WINRT)
|
||||
const QString rootPath = QDir::rootPath(); // rootPath contains the trailing slash
|
||||
if (name.startsWith(rootPath, Qt::CaseInsensitive))
|
||||
return rootPath.size();
|
||||
#endif // Q_OS_WINRT
|
||||
#if defined(Q_OS_WIN)
|
||||
if (len >= 2 && name.at(1) == QLatin1Char(':')) {
|
||||
// Handle a possible drive letter
|
||||
@ -196,11 +191,7 @@ inline void QDirPrivate::setPath(const QString &path)
|
||||
if (p.endsWith(QLatin1Char('/'))
|
||||
&& p.length() > 1
|
||||
#if defined(Q_OS_WIN)
|
||||
# if defined (Q_OS_WINRT)
|
||||
&& (!(p.toLower() == QDir::rootPath().toLower()))
|
||||
# else
|
||||
&& (!(p.length() == 3 && p.at(1).unicode() == ':' && p.at(0).isLetter()))
|
||||
# endif
|
||||
#endif
|
||||
) {
|
||||
p.truncate(p.length() - 1);
|
||||
@ -2373,11 +2364,7 @@ static QString qt_cleanPath(const QString &path, bool *ok)
|
||||
// Strip away last slash except for root directories
|
||||
if (ret.length() > 1 && ret.endsWith(QLatin1Char('/'))) {
|
||||
#if defined (Q_OS_WIN)
|
||||
# if defined(Q_OS_WINRT)
|
||||
if (!((ret.length() == 3 || ret.length() == QDir::rootPath().length()) && ret.at(1) == QLatin1Char(':')))
|
||||
# else
|
||||
if (!(ret.length() == 3 && ret.at(1) == QLatin1Char(':')))
|
||||
# endif
|
||||
#endif
|
||||
ret.chop(1);
|
||||
}
|
||||
|
@ -1178,7 +1178,7 @@ bool QFileInfo::isRoot() const
|
||||
return false;
|
||||
if (d->fileEngine == nullptr) {
|
||||
if (d->fileEntry.isRoot()) {
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||
#if defined(Q_OS_WIN)
|
||||
//the path is a drive root, but the drive may not exist
|
||||
//for backward compatibility, return true only if the drive exists
|
||||
if (!d->cache_enabled || !d->metaData.hasFlags(QFileSystemMetaData::ExistsAttribute))
|
||||
|
@ -346,9 +346,6 @@ QStringList QFileSelectorPrivate::platformSelectors()
|
||||
#if defined(Q_OS_WIN)
|
||||
ret << QStringLiteral("windows");
|
||||
ret << QSysInfo::kernelType(); // "winnt"
|
||||
# if defined(Q_OS_WINRT)
|
||||
ret << QStringLiteral("winrt");
|
||||
# endif
|
||||
#elif defined(Q_OS_UNIX)
|
||||
ret << QStringLiteral("unix");
|
||||
# if !defined(Q_OS_ANDROID) && !defined(Q_OS_QNX)
|
||||
|
@ -61,33 +61,16 @@
|
||||
#include <direct.h>
|
||||
#include <winioctl.h>
|
||||
#include <objbase.h>
|
||||
#ifndef Q_OS_WINRT
|
||||
# include <shlobj.h>
|
||||
# include <shobjidl.h>
|
||||
# include <shellapi.h>
|
||||
# include <lm.h>
|
||||
# include <accctrl.h>
|
||||
#endif
|
||||
#include <shlobj.h>
|
||||
#include <shobjidl.h>
|
||||
#include <shellapi.h>
|
||||
#include <lm.h>
|
||||
#include <accctrl.h>
|
||||
#include <initguid.h>
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
#ifndef Q_OS_WINRT
|
||||
# define SECURITY_WIN32
|
||||
# include <security.h>
|
||||
#else // !Q_OS_WINRT
|
||||
# include "qstandardpaths.h"
|
||||
# include "qthreadstorage.h"
|
||||
# include <wrl.h>
|
||||
# include <windows.foundation.h>
|
||||
# include <windows.storage.h>
|
||||
# include <Windows.ApplicationModel.h>
|
||||
|
||||
using namespace Microsoft::WRL;
|
||||
using namespace Microsoft::WRL::Wrappers;
|
||||
using namespace ABI::Windows::Foundation;
|
||||
using namespace ABI::Windows::Storage;
|
||||
using namespace ABI::Windows::ApplicationModel;
|
||||
#endif // Q_OS_WINRT
|
||||
#define SECURITY_WIN32
|
||||
#include <security.h>
|
||||
|
||||
#ifndef SPI_GETPLATFORMTYPE
|
||||
#define SPI_GETPLATFORMTYPE 257
|
||||
@ -153,11 +136,11 @@ typedef struct _REPARSE_DATA_BUFFER {
|
||||
# define FSCTL_GET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 42, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WINRT) || defined(QT_BOOTSTRAPPED)
|
||||
#if defined(QT_BOOTSTRAPPED)
|
||||
# define QT_FEATURE_fslibs -1
|
||||
#else
|
||||
# define QT_FEATURE_fslibs 1
|
||||
#endif // Q_OS_WINRT
|
||||
#endif // QT_BOOTSTRAPPED
|
||||
|
||||
#if QT_CONFIG(fslibs)
|
||||
#include <aclapi.h>
|
||||
@ -291,7 +274,6 @@ static inline bool toFileTime(const QDateTime &date, FILETIME *fileTime)
|
||||
static QString readSymLink(const QFileSystemEntry &link)
|
||||
{
|
||||
QString result;
|
||||
#if !defined(Q_OS_WINRT)
|
||||
HANDLE handle = CreateFile((wchar_t*)link.nativeFilePath().utf16(),
|
||||
FILE_READ_EA,
|
||||
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
|
||||
@ -346,9 +328,6 @@ static QString readSymLink(const QFileSystemEntry &link)
|
||||
}
|
||||
#endif // QT_CONFIG(fslibs)
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(link);
|
||||
#endif // Q_OS_WINRT
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -416,11 +395,7 @@ static inline bool getFindData(QString path, WIN32_FIND_DATA &findData)
|
||||
|
||||
// can't handle drives
|
||||
if (!path.endsWith(QLatin1Char(':'))) {
|
||||
#ifndef Q_OS_WINRT
|
||||
HANDLE hFind = ::FindFirstFile((wchar_t*)path.utf16(), &findData);
|
||||
#else
|
||||
HANDLE hFind = ::FindFirstFileEx((const wchar_t*)path.utf16(), FindExInfoStandard, &findData, FindExSearchNameMatch, NULL, 0);
|
||||
#endif
|
||||
if (hFind != INVALID_HANDLE_VALUE) {
|
||||
::FindClose(hFind);
|
||||
return true;
|
||||
@ -531,7 +506,6 @@ private:
|
||||
bool QFileSystemEngine::uncListSharesOnServer(const QString &server, QStringList *list)
|
||||
{
|
||||
DWORD res = ERROR_NOT_SUPPORTED;
|
||||
#ifndef Q_OS_WINRT
|
||||
SHARE_INFO_1 *BufPtr, *p;
|
||||
DWORD er = 0, tr = 0, resume = 0, i;
|
||||
do {
|
||||
@ -546,10 +520,6 @@ bool QFileSystemEngine::uncListSharesOnServer(const QString &server, QStringList
|
||||
}
|
||||
NetApiBufferFree(BufPtr);
|
||||
} while (res == ERROR_MORE_DATA);
|
||||
#else
|
||||
Q_UNUSED(server);
|
||||
Q_UNUSED(list);
|
||||
#endif
|
||||
return res == ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
@ -615,16 +585,6 @@ QString QFileSystemEngine::nativeAbsoluteFilePath(const QString &path)
|
||||
}
|
||||
if (retLen != 0)
|
||||
absPath = QString::fromWCharArray(buf.data(), retLen);
|
||||
# if defined(Q_OS_WINRT)
|
||||
// Win32 returns eg C:/ as root directory with a trailing /.
|
||||
// WinRT returns the sandbox root without /.
|
||||
// Also C:/../.. returns C:/ on Win32, while for WinRT it steps outside the package
|
||||
// and goes beyond package root. Hence force the engine to stay inside
|
||||
// the package.
|
||||
const QString rootPath = QDir::toNativeSeparators(QDir::rootPath());
|
||||
if (absPath.size() < rootPath.size() && rootPath.startsWith(absPath))
|
||||
absPath = rootPath;
|
||||
# endif // Q_OS_WINRT
|
||||
|
||||
// This is really ugly, but GetFullPathName strips off whitespace at the end.
|
||||
// If you for instance write ". " in the lineedit of QFileDialog,
|
||||
@ -652,7 +612,6 @@ QFileSystemEntry QFileSystemEngine::absoluteName(const QFileSystemEntry &entry)
|
||||
ret = QDir::cleanPath(QDir::currentPath() + QLatin1Char('/') + entry.filePath());
|
||||
}
|
||||
|
||||
#ifndef Q_OS_WINRT
|
||||
// The path should be absolute at this point.
|
||||
// From the docs :
|
||||
// Absolute paths begin with the directory separator "/"
|
||||
@ -665,7 +624,6 @@ QFileSystemEntry QFileSystemEngine::absoluteName(const QFileSystemEntry &entry)
|
||||
// Force uppercase drive letters.
|
||||
ret[0] = ret.at(0).toUpper();
|
||||
}
|
||||
#endif // !Q_OS_WINRT
|
||||
return QFileSystemEntry(ret, QFileSystemEntry::FromInternalPath());
|
||||
}
|
||||
|
||||
@ -681,7 +639,6 @@ typedef struct _FILE_ID_INFO {
|
||||
// File ID for Windows up to version 7 and FAT32 drives
|
||||
static inline QByteArray fileId(HANDLE handle)
|
||||
{
|
||||
#ifndef Q_OS_WINRT
|
||||
BY_HANDLE_FILE_INFORMATION info;
|
||||
if (GetFileInformationByHandle(handle, &info)) {
|
||||
char buffer[sizeof "01234567:0123456701234567"];
|
||||
@ -691,10 +648,6 @@ static inline QByteArray fileId(HANDLE handle)
|
||||
info.nFileIndexLow);
|
||||
return buffer;
|
||||
}
|
||||
#else // !Q_OS_WINRT
|
||||
Q_UNUSED(handle);
|
||||
Q_UNIMPLEMENTED();
|
||||
#endif // Q_OS_WINRT
|
||||
return QByteArray();
|
||||
}
|
||||
|
||||
@ -727,23 +680,10 @@ QByteArray QFileSystemEngine::id(const QFileSystemEntry &entry)
|
||||
|
||||
QByteArray result;
|
||||
|
||||
#ifndef Q_OS_WINRT
|
||||
const HANDLE handle =
|
||||
CreateFile((wchar_t*)entry.nativeFilePath().utf16(), 0,
|
||||
FILE_SHARE_READ, NULL, OPEN_EXISTING,
|
||||
FILE_FLAG_BACKUP_SEMANTICS, NULL);
|
||||
#else // !Q_OS_WINRT
|
||||
CREATEFILE2_EXTENDED_PARAMETERS params;
|
||||
params.dwSize = sizeof(params);
|
||||
params.dwFileAttributes = FILE_ATTRIBUTE_NORMAL;
|
||||
params.dwFileFlags = FILE_FLAG_BACKUP_SEMANTICS;
|
||||
params.dwSecurityQosFlags = SECURITY_ANONYMOUS;
|
||||
params.lpSecurityAttributes = NULL;
|
||||
params.hTemplateFile = NULL;
|
||||
const HANDLE handle =
|
||||
CreateFile2((const wchar_t*)entry.nativeFilePath().utf16(), 0,
|
||||
FILE_SHARE_READ, OPEN_EXISTING, ¶ms);
|
||||
#endif // Q_OS_WINRT
|
||||
if (handle != INVALID_HANDLE_VALUE) {
|
||||
result = id(handle);
|
||||
CloseHandle(handle);
|
||||
@ -994,7 +934,6 @@ static bool tryDriveUNCFallback(const QFileSystemEntry &fname, QFileSystemMetaDa
|
||||
{
|
||||
bool entryExists = false;
|
||||
DWORD fileAttrib = 0;
|
||||
#if !defined(Q_OS_WINRT)
|
||||
if (fname.isDriveRoot()) {
|
||||
// a valid drive ??
|
||||
const UINT oldErrorMode = ::SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
|
||||
@ -1006,7 +945,6 @@ static bool tryDriveUNCFallback(const QFileSystemEntry &fname, QFileSystemMetaDa
|
||||
entryExists = true;
|
||||
}
|
||||
} else {
|
||||
#endif
|
||||
const QString &path = fname.nativeFilePath();
|
||||
bool is_dir = false;
|
||||
if (path.startsWith(QLatin1String("\\\\?\\UNC"))) {
|
||||
@ -1037,9 +975,7 @@ static bool tryDriveUNCFallback(const QFileSystemEntry &fname, QFileSystemMetaDa
|
||||
fileAttrib = FILE_ATTRIBUTE_DIRECTORY;
|
||||
entryExists = true;
|
||||
}
|
||||
#if !defined(Q_OS_WINRT)
|
||||
}
|
||||
#endif
|
||||
if (entryExists)
|
||||
data.fillFromFileAttribute(fileAttrib);
|
||||
return entryExists;
|
||||
@ -1078,34 +1014,12 @@ bool QFileSystemEngine::fillMetaData(HANDLE fHandle, QFileSystemMetaData &data,
|
||||
{
|
||||
data.entryFlags &= ~what;
|
||||
clearWinStatData(data);
|
||||
#ifndef Q_OS_WINRT
|
||||
BY_HANDLE_FILE_INFORMATION fileInfo;
|
||||
UINT oldmode = SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
|
||||
if (GetFileInformationByHandle(fHandle , &fileInfo)) {
|
||||
data.fillFromFindInfo(fileInfo);
|
||||
}
|
||||
SetErrorMode(oldmode);
|
||||
#else // !Q_OS_WINRT
|
||||
FILE_BASIC_INFO fileBasicInfo;
|
||||
if (GetFileInformationByHandleEx(fHandle, FileBasicInfo, &fileBasicInfo, sizeof(fileBasicInfo))) {
|
||||
data.fillFromFileAttribute(fileBasicInfo.FileAttributes);
|
||||
data.birthTime_.dwHighDateTime = fileBasicInfo.CreationTime.HighPart;
|
||||
data.birthTime_.dwLowDateTime = fileBasicInfo.CreationTime.LowPart;
|
||||
data.changeTime_.dwHighDateTime = fileBasicInfo.ChangeTime.HighPart;
|
||||
data.changeTime_.dwLowDateTime = fileBasicInfo.ChangeTime.LowPart;
|
||||
data.lastAccessTime_.dwHighDateTime = fileBasicInfo.LastAccessTime.HighPart;
|
||||
data.lastAccessTime_.dwLowDateTime = fileBasicInfo.LastAccessTime.LowPart;
|
||||
data.lastWriteTime_.dwHighDateTime = fileBasicInfo.LastWriteTime.HighPart;
|
||||
data.lastWriteTime_.dwLowDateTime = fileBasicInfo.LastWriteTime.LowPart;
|
||||
if (!(data.fileAttribute_ & FILE_ATTRIBUTE_DIRECTORY)) {
|
||||
FILE_STANDARD_INFO fileStandardInfo;
|
||||
if (GetFileInformationByHandleEx(fHandle, FileStandardInfo, &fileStandardInfo, sizeof(fileStandardInfo)))
|
||||
data.size_ = fileStandardInfo.EndOfFile.QuadPart;
|
||||
} else
|
||||
data.size_ = 0;
|
||||
data.knownFlagsMask |= QFileSystemMetaData::Times | QFileSystemMetaData::SizeAttribute;
|
||||
}
|
||||
#endif // Q_OS_WINRT
|
||||
return data.hasFlags(what);
|
||||
}
|
||||
|
||||
@ -1138,9 +1052,7 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM
|
||||
}
|
||||
|
||||
if (what & QFileSystemMetaData::WinStatFlags) {
|
||||
#ifndef Q_OS_WINRT
|
||||
UINT oldmode = SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
|
||||
#endif
|
||||
clearWinStatData(data);
|
||||
WIN32_FIND_DATA findData;
|
||||
// The memory structure for WIN32_FIND_DATA is same as WIN32_FILE_ATTRIBUTE_DATA
|
||||
@ -1153,15 +1065,11 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM
|
||||
} else {
|
||||
if (!tryFindFallback(fname, data))
|
||||
if (!tryDriveUNCFallback(fname, data)) {
|
||||
#ifndef Q_OS_WINRT
|
||||
SetErrorMode(oldmode);
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#ifndef Q_OS_WINRT
|
||||
SetErrorMode(oldmode);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (what & QFileSystemMetaData::Permissions)
|
||||
@ -1201,16 +1109,7 @@ static bool isDirPath(const QString &dirPath, bool *existed)
|
||||
path += QLatin1Char('\\');
|
||||
|
||||
const QString longPath = QFSFileEnginePrivate::longFileName(path);
|
||||
#ifndef Q_OS_WINRT
|
||||
DWORD fileAttrib = ::GetFileAttributes(reinterpret_cast<const wchar_t*>(longPath.utf16()));
|
||||
#else // Q_OS_WINRT
|
||||
DWORD fileAttrib = INVALID_FILE_ATTRIBUTES;
|
||||
WIN32_FILE_ATTRIBUTE_DATA data;
|
||||
if (::GetFileAttributesEx(reinterpret_cast<const wchar_t*>(longPath.utf16()),
|
||||
GetFileExInfoStandard, &data)) {
|
||||
fileAttrib = data.dwFileAttributes;
|
||||
}
|
||||
#endif // Q_OS_WINRT
|
||||
if (fileAttrib == INVALID_FILE_ATTRIBUTES) {
|
||||
int errorCode = GetLastError();
|
||||
if (errorCode == ERROR_ACCESS_DENIED || errorCode == ERROR_SHARING_VIOLATION) {
|
||||
@ -1314,36 +1213,10 @@ bool QFileSystemEngine::removeDirectory(const QFileSystemEntry &entry, bool remo
|
||||
//static
|
||||
QString QFileSystemEngine::rootPath()
|
||||
{
|
||||
#if defined(Q_OS_WINRT)
|
||||
// We specify the package root as root directory
|
||||
QString ret = QLatin1String("/");
|
||||
// Get package location
|
||||
ComPtr<IPackageStatics> statics;
|
||||
if (FAILED(GetActivationFactory(HStringReference(RuntimeClass_Windows_ApplicationModel_Package).Get(), &statics)))
|
||||
return ret;
|
||||
ComPtr<IPackage> package;
|
||||
if (FAILED(statics->get_Current(&package)))
|
||||
return ret;
|
||||
ComPtr<IStorageFolder> installedLocation;
|
||||
if (FAILED(package->get_InstalledLocation(&installedLocation)))
|
||||
return ret;
|
||||
|
||||
ComPtr<IStorageItem> item;
|
||||
if (FAILED(installedLocation.As(&item)))
|
||||
return ret;
|
||||
|
||||
HString finalWinPath;
|
||||
if (FAILED(item->get_Path(finalWinPath.GetAddressOf())))
|
||||
return ret;
|
||||
|
||||
const QString qtWinPath = QDir::fromNativeSeparators(QString::fromWCharArray(finalWinPath.GetRawBuffer(nullptr)));
|
||||
ret = qtWinPath.endsWith(QLatin1Char('/')) ? qtWinPath : qtWinPath + QLatin1Char('/');
|
||||
#else
|
||||
QString ret = QString::fromLatin1(qgetenv("SystemDrive"));
|
||||
if (ret.isEmpty())
|
||||
ret = QLatin1String("c:");
|
||||
ret.append(QLatin1Char('/'));
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1391,7 +1264,6 @@ QString QFileSystemEngine::homePath()
|
||||
QString QFileSystemEngine::tempPath()
|
||||
{
|
||||
QString ret;
|
||||
#ifndef Q_OS_WINRT
|
||||
wchar_t tempPath[MAX_PATH];
|
||||
const DWORD len = GetTempPath(MAX_PATH, tempPath);
|
||||
if (len) { // GetTempPath() can return short names, expand.
|
||||
@ -1406,24 +1278,6 @@ QString QFileSystemEngine::tempPath()
|
||||
ret.chop(1);
|
||||
ret = QDir::fromNativeSeparators(ret);
|
||||
}
|
||||
#else // !Q_OS_WINRT
|
||||
ComPtr<IApplicationDataStatics> applicationDataStatics;
|
||||
if (FAILED(GetActivationFactory(HString::MakeReference(RuntimeClass_Windows_Storage_ApplicationData).Get(), &applicationDataStatics)))
|
||||
return ret;
|
||||
ComPtr<IApplicationData> applicationData;
|
||||
if (FAILED(applicationDataStatics->get_Current(&applicationData)))
|
||||
return ret;
|
||||
ComPtr<IStorageFolder> tempFolder;
|
||||
if (FAILED(applicationData->get_TemporaryFolder(&tempFolder)))
|
||||
return ret;
|
||||
ComPtr<IStorageItem> tempFolderItem;
|
||||
if (FAILED(tempFolder.As(&tempFolderItem)))
|
||||
return ret;
|
||||
HString path;
|
||||
if (FAILED(tempFolderItem->get_Path(path.GetAddressOf())))
|
||||
return ret;
|
||||
ret = QDir::fromNativeSeparators(QString::fromWCharArray(path.GetRawBuffer(nullptr)));
|
||||
#endif // Q_OS_WINRT
|
||||
if (ret.isEmpty()) {
|
||||
ret = QLatin1String("C:/tmp");
|
||||
} else if (ret.length() >= 2 && ret[1] == QLatin1Char(':'))
|
||||
@ -1478,17 +1332,8 @@ bool QFileSystemEngine::createLink(const QFileSystemEntry &source, const QFileSy
|
||||
//static
|
||||
bool QFileSystemEngine::copyFile(const QFileSystemEntry &source, const QFileSystemEntry &target, QSystemError &error)
|
||||
{
|
||||
#ifndef Q_OS_WINRT
|
||||
bool ret = ::CopyFile((wchar_t*)source.nativeFilePath().utf16(),
|
||||
(wchar_t*)target.nativeFilePath().utf16(), true) != 0;
|
||||
#else // !Q_OS_WINRT
|
||||
COPYFILE2_EXTENDED_PARAMETERS copyParams = {
|
||||
sizeof(copyParams), COPY_FILE_FAIL_IF_EXISTS, NULL, NULL, NULL
|
||||
};
|
||||
HRESULT hres = ::CopyFile2((const wchar_t*)source.nativeFilePath().utf16(),
|
||||
(const wchar_t*)target.nativeFilePath().utf16(), ©Params);
|
||||
bool ret = SUCCEEDED(hres);
|
||||
#endif // Q_OS_WINRT
|
||||
if(!ret)
|
||||
error = QSystemError(::GetLastError(), QSystemError::NativeError);
|
||||
return ret;
|
||||
@ -1500,13 +1345,8 @@ bool QFileSystemEngine::renameFile(const QFileSystemEntry &source, const QFileSy
|
||||
Q_CHECK_FILE_NAME(source, false);
|
||||
Q_CHECK_FILE_NAME(target, false);
|
||||
|
||||
#ifndef Q_OS_WINRT
|
||||
bool ret = ::MoveFile((wchar_t*)source.nativeFilePath().utf16(),
|
||||
(wchar_t*)target.nativeFilePath().utf16()) != 0;
|
||||
#else // !Q_OS_WINRT
|
||||
bool ret = ::MoveFileEx((const wchar_t*)source.nativeFilePath().utf16(),
|
||||
(const wchar_t*)target.nativeFilePath().utf16(), 0) != 0;
|
||||
#endif // Q_OS_WINRT
|
||||
if(!ret)
|
||||
error = QSystemError(::GetLastError(), QSystemError::NativeError);
|
||||
return ret;
|
||||
@ -1547,7 +1387,6 @@ bool QFileSystemEngine::removeFile(const QFileSystemEntry &entry, QSystemError &
|
||||
bool QFileSystemEngine::moveFileToTrash(const QFileSystemEntry &source,
|
||||
QFileSystemEntry &newLocation, QSystemError &error)
|
||||
{
|
||||
#ifndef Q_OS_WINRT
|
||||
// we need the "display name" of the file, so can't use nativeAbsoluteFilePath
|
||||
const QString sourcePath = QDir::toNativeSeparators(absoluteName(source).filePath());
|
||||
|
||||
@ -1626,12 +1465,6 @@ bool QFileSystemEngine::moveFileToTrash(const QFileSystemEntry &source,
|
||||
}
|
||||
return true;
|
||||
|
||||
#else // Q_OS_WINRT
|
||||
Q_UNUSED(source);
|
||||
Q_UNUSED(newLocation);
|
||||
Q_UNUSED(error);
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
//static
|
||||
|
@ -166,16 +166,6 @@ void QFileSystemEntry::resolveNativeFilePath() const
|
||||
m_nativeFilePath = QDir::toNativeSeparators(m_filePath);
|
||||
#else
|
||||
m_nativeFilePath = QFile::encodeName(QDir::toNativeSeparators(m_filePath));
|
||||
#endif
|
||||
#ifdef Q_OS_WINRT
|
||||
while (m_nativeFilePath.startsWith(QLatin1Char('\\')))
|
||||
m_nativeFilePath.remove(0,1);
|
||||
if (m_nativeFilePath.isEmpty())
|
||||
m_nativeFilePath.append(QLatin1Char('.'));
|
||||
// WinRT/MSVC2015 allows a maximum of 256 characters for a filepath
|
||||
// unless //?/ is prepended which extends the rule to have a maximum
|
||||
// of 256 characters in the filename plus the preprending path
|
||||
m_nativeFilePath.prepend("\\\\?\\");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@ -302,13 +292,9 @@ bool QFileSystemEntry::isDriveRoot() const
|
||||
|
||||
bool QFileSystemEntry::isDriveRootPath(const QString &path)
|
||||
{
|
||||
#ifndef Q_OS_WINRT
|
||||
return (path.length() == 3
|
||||
&& path.at(0).isLetter() && path.at(1) == QLatin1Char(':')
|
||||
&& path.at(2) == QLatin1Char('/'));
|
||||
#else // !Q_OS_WINRT
|
||||
return path == QDir::rootPath();
|
||||
#endif // !Q_OS_WINRT
|
||||
}
|
||||
#endif // Q_OS_WIN
|
||||
|
||||
|
@ -235,9 +235,7 @@ public:
|
||||
#if defined(Q_OS_WIN)
|
||||
inline void fillFromFileAttribute(DWORD fileAttribute, bool isDriveRoot = false);
|
||||
inline void fillFromFindData(WIN32_FIND_DATA &findData, bool setLinkType = false, bool isDriveRoot = false);
|
||||
# ifndef Q_OS_WINRT
|
||||
inline void fillFromFindInfo(BY_HANDLE_FILE_INFORMATION &fileInfo);
|
||||
# endif
|
||||
#endif
|
||||
private:
|
||||
friend class QFileSystemEngine;
|
||||
@ -372,7 +370,6 @@ inline void QFileSystemMetaData::fillFromFindData(WIN32_FIND_DATA &findData, boo
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef Q_OS_WINRT
|
||||
inline void QFileSystemMetaData::fillFromFindInfo(BY_HANDLE_FILE_INFORMATION &fileInfo)
|
||||
{
|
||||
fillFromFileAttribute(fileInfo.dwFileAttributes);
|
||||
@ -388,7 +385,6 @@ inline void QFileSystemMetaData::fillFromFindInfo(BY_HANDLE_FILE_INFORMATION &fi
|
||||
}
|
||||
knownFlagsMask |= Times | SizeAttribute;
|
||||
}
|
||||
#endif // !Q_OS_WINRT
|
||||
#endif // Q_OS_WIN
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -105,7 +105,7 @@ void QFileSystemWatcherPrivate::init()
|
||||
SIGNAL(directoryChanged(QString,bool)),
|
||||
q,
|
||||
SLOT(_q_directoryChanged(QString,bool)));
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||
#if defined(Q_OS_WIN)
|
||||
QObject::connect(static_cast<QWindowsFileSystemWatcherEngine *>(native),
|
||||
&QWindowsFileSystemWatcherEngine::driveLockForRemoval,
|
||||
q, [this] (const QString &p) { _q_winDriveLockForRemoval(p); });
|
||||
@ -115,7 +115,7 @@ void QFileSystemWatcherPrivate::init()
|
||||
QObject::connect(static_cast<QWindowsFileSystemWatcherEngine *>(native),
|
||||
&QWindowsFileSystemWatcherEngine::driveRemoved,
|
||||
q, [this] (const QString &p) { _q_winDriveRemoved(p); });
|
||||
#endif // !Q_OS_WINRT
|
||||
#endif // Q_OS_WIN
|
||||
}
|
||||
}
|
||||
|
||||
@ -162,7 +162,7 @@ void QFileSystemWatcherPrivate::_q_directoryChanged(const QString &path, bool re
|
||||
emit q->directoryChanged(path, QFileSystemWatcher::QPrivateSignal());
|
||||
}
|
||||
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||
#if defined(Q_OS_WIN)
|
||||
|
||||
void QFileSystemWatcherPrivate::_q_winDriveLockForRemoval(const QString &path)
|
||||
{
|
||||
@ -201,7 +201,7 @@ void QFileSystemWatcherPrivate::_q_winDriveRemoved(const QString &path)
|
||||
if (!path.isEmpty())
|
||||
temporarilyRemovedPaths.remove(path.at(0));
|
||||
}
|
||||
#endif // Q_OS_WIN && !Q_OS_WINRT
|
||||
#endif // Q_OS_WIN
|
||||
|
||||
/*!
|
||||
\class QFileSystemWatcher
|
||||
|
@ -108,14 +108,14 @@ public:
|
||||
void _q_fileChanged(const QString &path, bool removed);
|
||||
void _q_directoryChanged(const QString &path, bool removed);
|
||||
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||
#if defined(Q_OS_WIN)
|
||||
void _q_winDriveLockForRemoval(const QString &);
|
||||
void _q_winDriveLockForRemovalFailed(const QString &);
|
||||
void _q_winDriveRemoved(const QString &);
|
||||
|
||||
private:
|
||||
QHash<QChar, QStringList> temporarilyRemovedPaths;
|
||||
#endif // Q_OS_WIN && !Q_OS_WINRT
|
||||
#endif // Q_OS_WIN
|
||||
};
|
||||
|
||||
|
||||
|
@ -52,7 +52,6 @@
|
||||
|
||||
#include <qt_windows.h>
|
||||
|
||||
#ifndef Q_OS_WINRT
|
||||
# include <qabstractnativeeventfilter.h>
|
||||
# include <qcoreapplication.h>
|
||||
# include <qdir.h>
|
||||
@ -61,7 +60,6 @@
|
||||
# include <dbt.h>
|
||||
# include <algorithm>
|
||||
# include <vector>
|
||||
#endif // !Q_OS_WINRT
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -85,7 +83,6 @@ static Qt::HANDLE createChangeNotification(const QString &path, uint flags)
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifndef Q_OS_WINRT
|
||||
///////////
|
||||
// QWindowsRemovableDriveListener
|
||||
// Listen for the various WM_DEVICECHANGE message indicating drive addition/removal
|
||||
@ -330,7 +327,6 @@ void QWindowsRemovableDriveListener::addPath(const QString &p)
|
||||
|
||||
m_removableDrives.push_back(re);
|
||||
}
|
||||
#endif // !Q_OS_WINRT
|
||||
|
||||
///////////
|
||||
// QWindowsFileSystemWatcherEngine
|
||||
@ -343,7 +339,6 @@ QWindowsFileSystemWatcherEngine::Handle::Handle()
|
||||
QWindowsFileSystemWatcherEngine::QWindowsFileSystemWatcherEngine(QObject *parent)
|
||||
: QFileSystemWatcherEngine(parent)
|
||||
{
|
||||
#ifndef Q_OS_WINRT
|
||||
if (QAbstractEventDispatcher *eventDispatcher = QAbstractEventDispatcher::instance()) {
|
||||
m_driveListener = new QWindowsRemovableDriveListener(this);
|
||||
eventDispatcher->installNativeEventFilter(m_driveListener);
|
||||
@ -360,7 +355,6 @@ QWindowsFileSystemWatcherEngine::QWindowsFileSystemWatcherEngine(QObject *parent
|
||||
qWarning("QFileSystemWatcher: Removable drive notification will not work"
|
||||
" if there is no QCoreApplication instance.");
|
||||
}
|
||||
#endif // !Q_OS_WINRT
|
||||
}
|
||||
|
||||
QWindowsFileSystemWatcherEngine::~QWindowsFileSystemWatcherEngine()
|
||||
@ -524,14 +518,12 @@ QStringList QWindowsFileSystemWatcherEngine::addPaths(const QStringList &paths,
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef Q_OS_WINRT
|
||||
if (Q_LIKELY(m_driveListener)) {
|
||||
for (const QString &path : paths) {
|
||||
if (!unhandled.contains(path))
|
||||
m_driveListener->addPath(path);
|
||||
}
|
||||
}
|
||||
#endif // !Q_OS_WINRT
|
||||
return unhandled;
|
||||
}
|
||||
|
||||
@ -763,6 +755,4 @@ void QWindowsFileSystemWatcherEngineThread::wakeup()
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#ifndef Q_OS_WINRT
|
||||
# include "qfilesystemwatcher_win.moc"
|
||||
#endif
|
||||
|
@ -126,9 +126,7 @@ signals:
|
||||
|
||||
private:
|
||||
QList<QWindowsFileSystemWatcherEngineThread *> threads;
|
||||
#ifndef Q_OS_WINRT
|
||||
QWindowsRemovableDriveListener *m_driveListener = nullptr;
|
||||
#endif
|
||||
};
|
||||
|
||||
class QFileSystemWatcherPathKey : public QString
|
||||
|
@ -53,18 +53,14 @@
|
||||
#include <direct.h>
|
||||
#include <winioctl.h>
|
||||
#include <objbase.h>
|
||||
#ifndef Q_OS_WINRT
|
||||
# include <shlobj.h>
|
||||
# include <accctrl.h>
|
||||
#endif
|
||||
#include <shlobj.h>
|
||||
#include <accctrl.h>
|
||||
#include <initguid.h>
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#ifndef Q_OS_WINRT
|
||||
# define SECURITY_WIN32
|
||||
# include <security.h>
|
||||
#endif
|
||||
#define SECURITY_WIN32
|
||||
#include <security.h>
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX FILENAME_MAX
|
||||
@ -88,16 +84,12 @@ QString QFSFileEnginePrivate::longFileName(const QString &path)
|
||||
return path;
|
||||
|
||||
QString absPath = QFileSystemEngine::nativeAbsoluteFilePath(path);
|
||||
#if !defined(Q_OS_WINRT)
|
||||
QString prefix = QLatin1String("\\\\?\\");
|
||||
if (isUncPath(absPath)) {
|
||||
prefix.append(QLatin1String("UNC\\")); // "\\\\?\\UNC\\"
|
||||
absPath.remove(0, 2);
|
||||
}
|
||||
return prefix + absPath;
|
||||
#else
|
||||
return absPath;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@ -123,7 +115,6 @@ bool QFSFileEnginePrivate::nativeOpen(QIODevice::OpenMode openMode)
|
||||
? OPEN_ALWAYS
|
||||
: OPEN_EXISTING;
|
||||
// Create the file handle.
|
||||
#ifndef Q_OS_WINRT
|
||||
SECURITY_ATTRIBUTES securityAtts = { sizeof(SECURITY_ATTRIBUTES), NULL, FALSE };
|
||||
fileHandle = CreateFile((const wchar_t*)fileEntry.nativeFilePath().utf16(),
|
||||
accessRights,
|
||||
@ -132,13 +123,6 @@ bool QFSFileEnginePrivate::nativeOpen(QIODevice::OpenMode openMode)
|
||||
creationDisp,
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
NULL);
|
||||
#else // !Q_OS_WINRT
|
||||
fileHandle = CreateFile2((const wchar_t*)fileEntry.nativeFilePath().utf16(),
|
||||
accessRights,
|
||||
shareMode,
|
||||
creationDisp,
|
||||
NULL);
|
||||
#endif // Q_OS_WINRT
|
||||
|
||||
// Bail out on error.
|
||||
if (fileHandle == INVALID_HANDLE_VALUE) {
|
||||
@ -428,7 +412,6 @@ int QFSFileEnginePrivate::nativeHandle() const
|
||||
*/
|
||||
bool QFSFileEnginePrivate::nativeIsSequential() const
|
||||
{
|
||||
#if !defined(Q_OS_WINRT)
|
||||
HANDLE handle = fileHandle;
|
||||
if (fh || fd != -1)
|
||||
handle = (HANDLE)_get_osfhandle(fh ? QT_FILENO(fh) : fd);
|
||||
@ -438,9 +421,6 @@ bool QFSFileEnginePrivate::nativeIsSequential() const
|
||||
DWORD fileType = GetFileType(handle);
|
||||
return (fileType == FILE_TYPE_CHAR)
|
||||
|| (fileType == FILE_TYPE_PIPE);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool QFSFileEngine::caseSensitive() const
|
||||
@ -450,7 +430,6 @@ bool QFSFileEngine::caseSensitive() const
|
||||
|
||||
QString QFSFileEngine::currentPath(const QString &fileName)
|
||||
{
|
||||
#if !defined(Q_OS_WINRT)
|
||||
QString ret;
|
||||
//if filename is a drive: then get the pwd of that drive
|
||||
if (fileName.length() >= 2 &&
|
||||
@ -469,13 +448,8 @@ QString QFSFileEngine::currentPath(const QString &fileName)
|
||||
if (ret.length() >= 2 && ret[1] == QLatin1Char(':'))
|
||||
ret[0] = ret.at(0).toUpper(); // Force uppercase drive letters.
|
||||
return ret;
|
||||
#else // !Q_OS_WINRT
|
||||
Q_UNUSED(fileName);
|
||||
return QFileSystemEngine::currentPath().filePath();
|
||||
#endif // Q_OS_WINRT
|
||||
}
|
||||
|
||||
#if !defined(Q_OS_WINRT)
|
||||
// cf QStorageInfo::isReady
|
||||
static inline bool isDriveReady(const wchar_t *path)
|
||||
{
|
||||
@ -485,12 +459,10 @@ static inline bool isDriveReady(const wchar_t *path)
|
||||
|| GetVolumeInformation(path, nullptr, 0, nullptr, nullptr,
|
||||
&fileSystemFlags, nullptr, 0) == TRUE;
|
||||
}
|
||||
#endif // !Q_OS_WINRT
|
||||
|
||||
QFileInfoList QFSFileEngine::drives()
|
||||
{
|
||||
QFileInfoList ret;
|
||||
#if !defined(Q_OS_WINRT)
|
||||
const UINT oldErrorMode = ::SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
|
||||
quint32 driveBits = (quint32) GetLogicalDrives() & 0x3ffffff;
|
||||
wchar_t driveName[] = L"A:\\";
|
||||
@ -503,10 +475,6 @@ QFileInfoList QFSFileEngine::drives()
|
||||
}
|
||||
::SetErrorMode(oldErrorMode);
|
||||
return ret;
|
||||
#else // !Q_OS_WINRT
|
||||
ret.append(QFileInfo(QLatin1String("/")));
|
||||
return ret;
|
||||
#endif // Q_OS_WINRT
|
||||
}
|
||||
|
||||
bool QFSFileEnginePrivate::doStat(QFileSystemMetaData::MetaDataFlags flags) const
|
||||
@ -529,7 +497,6 @@ bool QFSFileEnginePrivate::doStat(QFileSystemMetaData::MetaDataFlags flags) cons
|
||||
|
||||
bool QFSFileEngine::link(const QString &newName)
|
||||
{
|
||||
#if !defined(Q_OS_WINRT)
|
||||
bool ret = false;
|
||||
|
||||
QString linkName = newName;
|
||||
@ -574,11 +541,6 @@ bool QFSFileEngine::link(const QString &newName)
|
||||
CoUninitialize();
|
||||
|
||||
return ret;
|
||||
#else // !Q_OS_WINRT
|
||||
Q_UNUSED(newName);
|
||||
Q_UNIMPLEMENTED();
|
||||
return false;
|
||||
#endif // Q_OS_WINRT
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -891,11 +853,7 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size,
|
||||
|
||||
// first create the file mapping handle
|
||||
DWORD protection = (openMode & QIODevice::WriteOnly) ? PAGE_READWRITE : PAGE_READONLY;
|
||||
#ifndef Q_OS_WINRT
|
||||
mapHandle = ::CreateFileMapping(handle, 0, protection, 0, 0, 0);
|
||||
#else
|
||||
mapHandle = ::CreateFileMappingFromApp(handle, 0, protection, 0, 0);
|
||||
#endif
|
||||
if (mapHandle == NULL) {
|
||||
q->setError(QFile::PermissionsError, qt_error_string());
|
||||
#ifdef Q_USE_DEPRECATED_MAP_API
|
||||
@ -908,24 +866,15 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size,
|
||||
DWORD offsetHi = offset >> 32;
|
||||
DWORD offsetLo = offset & Q_UINT64_C(0xffffffff);
|
||||
SYSTEM_INFO sysinfo;
|
||||
#ifndef Q_OS_WINRT
|
||||
::GetSystemInfo(&sysinfo);
|
||||
#else
|
||||
::GetNativeSystemInfo(&sysinfo);
|
||||
#endif
|
||||
DWORD mask = sysinfo.dwAllocationGranularity - 1;
|
||||
DWORD extra = offset & mask;
|
||||
if (extra)
|
||||
offsetLo &= ~mask;
|
||||
|
||||
// attempt to create the map
|
||||
#ifndef Q_OS_WINRT
|
||||
LPVOID mapAddress = ::MapViewOfFile(mapHandle, access,
|
||||
offsetHi, offsetLo, size + extra);
|
||||
#else
|
||||
LPVOID mapAddress = ::MapViewOfFileFromApp(mapHandle, access,
|
||||
(ULONG64(offsetHi) << 32) + offsetLo, size + extra);
|
||||
#endif
|
||||
if (mapAddress) {
|
||||
uchar *address = extra + static_cast<uchar*>(mapAddress);
|
||||
maps[address] = extra;
|
||||
|
@ -65,7 +65,6 @@ QLockFile::LockError QLockFilePrivate::tryLock_sys()
|
||||
// but Windows doesn't allow recreating it while this handle is open anyway,
|
||||
// so this would only create confusion (can't lock, but no lock file to read from).
|
||||
const DWORD dwShareMode = FILE_SHARE_READ;
|
||||
#ifndef Q_OS_WINRT
|
||||
SECURITY_ATTRIBUTES securityAtts = { sizeof(SECURITY_ATTRIBUTES), NULL, FALSE };
|
||||
HANDLE fh = CreateFile((const wchar_t*)fileEntry.nativeFilePath().utf16(),
|
||||
GENERIC_READ | GENERIC_WRITE,
|
||||
@ -74,13 +73,6 @@ QLockFile::LockError QLockFilePrivate::tryLock_sys()
|
||||
CREATE_NEW, // error if already exists
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
NULL);
|
||||
#else // !Q_OS_WINRT
|
||||
HANDLE fh = CreateFile2((const wchar_t*)fileEntry.nativeFilePath().utf16(),
|
||||
GENERIC_READ | GENERIC_WRITE,
|
||||
dwShareMode,
|
||||
CREATE_NEW, // error if already exists
|
||||
NULL);
|
||||
#endif // Q_OS_WINRT
|
||||
if (fh == INVALID_HANDLE_VALUE) {
|
||||
const DWORD lastError = GetLastError();
|
||||
switch (lastError) {
|
||||
@ -118,9 +110,6 @@ bool QLockFilePrivate::removeStaleLock()
|
||||
|
||||
bool QLockFilePrivate::isProcessRunning(qint64 pid, const QString &appname)
|
||||
{
|
||||
// On WinRT there seems to be no way of obtaining information about other
|
||||
// processes due to sandboxing
|
||||
#ifndef Q_OS_WINRT
|
||||
HANDLE procHandle = ::OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid);
|
||||
if (!procHandle)
|
||||
return false;
|
||||
@ -137,17 +126,11 @@ bool QLockFilePrivate::isProcessRunning(qint64 pid, const QString &appname)
|
||||
if (!processName.isEmpty() && processName != appname)
|
||||
return false; // PID got reused by a different application.
|
||||
|
||||
#else // !Q_OS_WINRT
|
||||
Q_UNUSED(pid);
|
||||
Q_UNUSED(appname);
|
||||
#endif // Q_OS_WINRT
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
QString QLockFilePrivate::processNameByPid(qint64 pid)
|
||||
{
|
||||
#if !defined(Q_OS_WINRT)
|
||||
typedef DWORD (WINAPI *GetModuleFileNameExFunc)(HANDLE, HMODULE, LPTSTR, DWORD);
|
||||
|
||||
HMODULE hPsapi = LoadLibraryA("psapi");
|
||||
@ -179,10 +162,6 @@ QString QLockFilePrivate::processNameByPid(qint64 pid)
|
||||
if (i >= 0)
|
||||
name.truncate(i);
|
||||
return name;
|
||||
#else
|
||||
Q_UNUSED(pid);
|
||||
return QString();
|
||||
#endif
|
||||
}
|
||||
|
||||
void QLockFile::unlock()
|
||||
|
@ -489,8 +489,7 @@ void QProcessPrivate::Channel::clear()
|
||||
You can also call error() to find the type of error that occurred
|
||||
last, and state() to find the current process state.
|
||||
|
||||
\note QProcess is not supported on VxWorks, iOS, tvOS, watchOS,
|
||||
or the Universal Windows Platform.
|
||||
\note QProcess is not supported on VxWorks, iOS, tvOS, or watchOS.
|
||||
|
||||
\section1 Communicating via Channels
|
||||
|
||||
|
@ -78,19 +78,7 @@
|
||||
|
||||
#ifdef Q_OS_WIN // for homedirpath reading from registry
|
||||
# include <qt_windows.h>
|
||||
# ifndef Q_OS_WINRT
|
||||
# include <shlobj.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WINRT
|
||||
#include <wrl.h>
|
||||
#include <windows.foundation.h>
|
||||
#include <windows.storage.h>
|
||||
using namespace Microsoft::WRL;
|
||||
using namespace Microsoft::WRL::Wrappers;
|
||||
using namespace ABI::Windows::Foundation;
|
||||
using namespace ABI::Windows::Storage;
|
||||
# include <shlobj.h>
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(Q_OS_ANDROID)
|
||||
@ -286,7 +274,7 @@ after_loop:
|
||||
return result;
|
||||
}
|
||||
|
||||
// see also qsettings_win.cpp, qsettings_winrt.cpp and qsettings_mac.cpp
|
||||
// see also qsettings_win.cpp and qsettings_mac.cpp
|
||||
|
||||
#if !defined(Q_OS_WIN) && !defined(Q_OS_MAC) && !defined(Q_OS_WASM)
|
||||
QSettingsPrivate *QSettingsPrivate::create(QSettings::Format format, QSettings::Scope scope,
|
||||
@ -945,7 +933,7 @@ void QConfFileSettingsPrivate::initAccess()
|
||||
sync(); // loads the files the first time
|
||||
}
|
||||
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||
#if defined(Q_OS_WIN)
|
||||
static QString windowsConfigPath(const KNOWNFOLDERID &type)
|
||||
{
|
||||
QString result;
|
||||
@ -966,44 +954,7 @@ static QString windowsConfigPath(const KNOWNFOLDERID &type)
|
||||
|
||||
return result;
|
||||
}
|
||||
#elif defined(Q_OS_WINRT) // Q_OS_WIN && !Q_OS_WINRT
|
||||
|
||||
enum ConfigPathType {
|
||||
ConfigPath_CommonAppData,
|
||||
ConfigPath_UserAppData
|
||||
};
|
||||
|
||||
static QString windowsConfigPath(ConfigPathType type)
|
||||
{
|
||||
static QString result;
|
||||
while (result.isEmpty()) {
|
||||
ComPtr<IApplicationDataStatics> applicationDataStatics;
|
||||
if (FAILED(GetActivationFactory(HString::MakeReference(RuntimeClass_Windows_Storage_ApplicationData).Get(), &applicationDataStatics)))
|
||||
return result;
|
||||
ComPtr<IApplicationData> applicationData;
|
||||
if (FAILED(applicationDataStatics->get_Current(&applicationData)))
|
||||
return result;
|
||||
ComPtr<IStorageFolder> localFolder;
|
||||
if (FAILED(applicationData->get_LocalFolder(&localFolder)))
|
||||
return result;
|
||||
ComPtr<IStorageItem> localFolderItem;
|
||||
if (FAILED(localFolder.As(&localFolderItem)))
|
||||
return result;
|
||||
HString path;
|
||||
if (FAILED(localFolderItem->get_Path(path.GetAddressOf())))
|
||||
return result;
|
||||
result = QString::fromWCharArray(path.GetRawBuffer(nullptr));
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case ConfigPath_CommonAppData:
|
||||
return result + QLatin1String("\\qt-common");
|
||||
case ConfigPath_UserAppData:
|
||||
return result + QLatin1String("\\qt-user");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif // Q_OS_WINRT
|
||||
#endif // Q_OS_WIN
|
||||
|
||||
static inline int pathHashKey(QSettings::Format format, QSettings::Scope scope)
|
||||
{
|
||||
@ -1056,14 +1007,8 @@ static std::unique_lock<QBasicMutex> initDefaultPaths(std::unique_lock<QBasicMut
|
||||
Windows registry and the Mac CFPreferences.)
|
||||
*/
|
||||
#ifdef Q_OS_WIN
|
||||
|
||||
# ifdef Q_OS_WINRT
|
||||
const QString roamingAppDataFolder = windowsConfigPath(ConfigPath_UserAppData);
|
||||
const QString programDataFolder = windowsConfigPath(ConfigPath_CommonAppData);
|
||||
# else
|
||||
const QString roamingAppDataFolder = windowsConfigPath(FOLDERID_RoamingAppData);
|
||||
const QString programDataFolder = windowsConfigPath(FOLDERID_ProgramData);
|
||||
# endif
|
||||
pathHash->insert(pathHashKey(QSettings::IniFormat, QSettings::UserScope),
|
||||
Path(roamingAppDataFolder + QDir::separator(), false));
|
||||
pathHash->insert(pathHashKey(QSettings::IniFormat, QSettings::SystemScope),
|
||||
|
@ -72,10 +72,6 @@ QT_BEGIN_NAMESPACE
|
||||
#define QT_QSETTINGS_ALWAYS_CASE_SENSITIVE_AND_FORGET_ORIGINAL_KEY_ORDER
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WINRT)
|
||||
#define QT_QTSETTINGS_FORGET_ORIGINAL_KEY_ORDER
|
||||
#endif
|
||||
|
||||
// used in testing framework
|
||||
#define QSETTINGS_P_H_VERSION 3
|
||||
|
||||
|
@ -1,690 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qsettings.h"
|
||||
|
||||
#include "qsettings_p.h"
|
||||
#include "qvector.h"
|
||||
#include "qmap.h"
|
||||
#include "qdebug.h"
|
||||
#include "qfunctions_winrt.h"
|
||||
|
||||
#include <wrl.h>
|
||||
#include <wrl/event.h>
|
||||
#include <Windows.ApplicationModel.h>
|
||||
#include <windows.storage.h>
|
||||
|
||||
using namespace ABI::Windows::ApplicationModel;
|
||||
using namespace ABI::Windows::Storage;
|
||||
using namespace ABI::Windows::Foundation;
|
||||
using namespace ABI::Windows::Foundation::Collections;
|
||||
using namespace Microsoft::WRL;
|
||||
using namespace Microsoft::WRL::Wrappers;
|
||||
|
||||
typedef ITypedEventHandler<ApplicationData*, IInspectable*> DataHandler;
|
||||
typedef Collections::IKeyValuePair<HSTRING, ApplicationDataContainer*> ContainerItem;
|
||||
typedef Collections::IIterable<ContainerItem*> ContainerIterable;
|
||||
typedef Collections::IIterator<ContainerItem*> ContainerIterator;
|
||||
|
||||
typedef Collections::IKeyValuePair<HSTRING, IInspectable*> ValueItem;
|
||||
typedef Collections::IIterable<ValueItem*> ValueIterable;
|
||||
typedef Collections::IIterator<ValueItem*> ValueIterator;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
static IApplicationDataContainer *subContainer(IApplicationDataContainer *parent, const QString &name)
|
||||
{
|
||||
ComPtr<IMapView<HSTRING, ApplicationDataContainer*>> childrenContainer;
|
||||
HRESULT hr = parent->get_Containers(&childrenContainer);
|
||||
if (FAILED(hr))
|
||||
return 0;
|
||||
|
||||
ComPtr< ContainerIterable > iterable;
|
||||
ComPtr< ContainerIterator > iterator;
|
||||
|
||||
hr = childrenContainer.As(&iterable);
|
||||
if (FAILED(hr))
|
||||
return 0;
|
||||
|
||||
hr = iterable->First(&iterator);
|
||||
if (FAILED(hr))
|
||||
return 0;
|
||||
boolean current;
|
||||
hr = iterator->get_HasCurrent(¤t);
|
||||
if (FAILED(hr))
|
||||
return 0;
|
||||
|
||||
while (SUCCEEDED(hr) && current) {
|
||||
ComPtr<ContainerItem> item;
|
||||
hr = iterator->get_Current(&item);
|
||||
if (FAILED(hr))
|
||||
return 0;
|
||||
|
||||
HString key;
|
||||
hr = item->get_Key(key.GetAddressOf());
|
||||
if (FAILED(hr))
|
||||
continue;
|
||||
QString subName = QString::fromWCharArray(key.GetRawBuffer(nullptr));
|
||||
if (name == subName) {
|
||||
IApplicationDataContainer *container;
|
||||
hr = item->get_Value(&container);
|
||||
return SUCCEEDED(hr) ? container : 0;
|
||||
}
|
||||
hr = iterator->MoveNext(¤t);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static QStringList subContainerNames(IApplicationDataContainer *container, bool recursive = false)
|
||||
{
|
||||
QStringList result;
|
||||
ComPtr<IMapView<HSTRING, ApplicationDataContainer*>> childrenContainer;
|
||||
HRESULT hr = container->get_Containers(&childrenContainer);
|
||||
if (FAILED(hr))
|
||||
return result;
|
||||
|
||||
ComPtr< ContainerIterable > iterable;
|
||||
ComPtr< ContainerIterator > iterator;
|
||||
|
||||
hr = childrenContainer.As(&iterable);
|
||||
if (FAILED(hr))
|
||||
return result;
|
||||
|
||||
hr = iterable->First(&iterator);
|
||||
if (FAILED(hr))
|
||||
return result;
|
||||
boolean current;
|
||||
hr = iterator->get_HasCurrent(¤t);
|
||||
if (FAILED(hr))
|
||||
return result;
|
||||
|
||||
while (SUCCEEDED(hr) && current) {
|
||||
ComPtr<ContainerItem> item;
|
||||
hr = iterator->get_Current(&item);
|
||||
if (FAILED(hr))
|
||||
return result;
|
||||
|
||||
HString key;
|
||||
hr = item->get_Key(key.GetAddressOf());
|
||||
if (SUCCEEDED(hr)) {
|
||||
QString subName = QString::fromWCharArray(key.GetRawBuffer(nullptr));
|
||||
result.append(subName);
|
||||
if (recursive) {
|
||||
ComPtr<IApplicationDataContainer> sub = subContainer(container, subName);
|
||||
QStringList subSubNames = subContainerNames(sub.Get(), recursive);
|
||||
for (int i = 0; i < subSubNames.size(); ++i)
|
||||
subSubNames[i] = subName + QLatin1Char('/') + subSubNames[i];
|
||||
result.append(subSubNames);
|
||||
}
|
||||
hr = iterator->MoveNext(¤t);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
static QStringList keyNames(IApplicationDataContainer *container) {
|
||||
HRESULT hr;
|
||||
QStringList result;
|
||||
ComPtr<IPropertySet> values;
|
||||
hr = container->get_Values(&values);
|
||||
if (FAILED(hr))
|
||||
return result;
|
||||
|
||||
ComPtr<IMap<HSTRING, IInspectable*>> settingsMap;
|
||||
|
||||
hr = values.As(&settingsMap);
|
||||
if (FAILED(hr))
|
||||
return result;
|
||||
|
||||
ComPtr<IMapView<HSTRING, IInspectable*>> mapView;
|
||||
hr = settingsMap->GetView(&mapView);
|
||||
if (FAILED(hr))
|
||||
return result;
|
||||
|
||||
ComPtr< ValueIterable > iterable;
|
||||
ComPtr< ValueIterator > iterator;
|
||||
|
||||
hr = mapView.As(&iterable);
|
||||
if (FAILED(hr))
|
||||
return result;
|
||||
|
||||
boolean current = false;
|
||||
hr = iterable->First(&iterator);
|
||||
if (FAILED(hr))
|
||||
return result;
|
||||
hr = iterator->get_HasCurrent(¤t);
|
||||
if (FAILED(hr))
|
||||
return result;
|
||||
|
||||
while (SUCCEEDED(hr) && current){
|
||||
ComPtr<ValueItem> item;
|
||||
hr = iterator->get_Current(&item);
|
||||
if (FAILED(hr))
|
||||
return result;
|
||||
|
||||
HString key;
|
||||
hr = item->get_Key(key.GetAddressOf());
|
||||
if (SUCCEEDED(hr)) {
|
||||
result += QString::fromWCharArray(key.GetRawBuffer(nullptr));
|
||||
hr = iterator->MoveNext(¤t);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
static IApplicationDataContainer *createSubContainer(IApplicationDataContainer *parent, const QString &name)
|
||||
{
|
||||
HStringReference childGroupNativeName((const wchar_t*)name.utf16(), name.size());
|
||||
|
||||
IApplicationDataContainer *result = subContainer(parent, name);
|
||||
if (!result)
|
||||
parent->CreateContainer(childGroupNativeName.Get(), ApplicationDataCreateDisposition_Always, &result);
|
||||
return result;
|
||||
}
|
||||
|
||||
#define PROP_CASE_TO_VARIANT(TYPE, VARTYPE, QTYPE) \
|
||||
case PropertyType_##TYPE: { \
|
||||
VARTYPE v; \
|
||||
value->Get##TYPE(&v); \
|
||||
result.setValue( QTYPE(v) ); \
|
||||
break; \
|
||||
}
|
||||
|
||||
static QVariant propertyValueToQVariant(IPropertyValue *value)
|
||||
{
|
||||
QVariant result;
|
||||
PropertyType type;
|
||||
value->get_Type(&type);
|
||||
switch (type) {
|
||||
PROP_CASE_TO_VARIANT(Boolean, boolean, bool)
|
||||
PROP_CASE_TO_VARIANT(UInt8, UINT8, quint8)
|
||||
PROP_CASE_TO_VARIANT(Int16, INT16, qint16)
|
||||
PROP_CASE_TO_VARIANT(UInt16, UINT16, quint16)
|
||||
PROP_CASE_TO_VARIANT(Int32, INT32, qint32)
|
||||
PROP_CASE_TO_VARIANT(UInt32, UINT32, quint32)
|
||||
PROP_CASE_TO_VARIANT(Int64, INT64, qint64)
|
||||
PROP_CASE_TO_VARIANT(UInt64, UINT64, quint64)
|
||||
PROP_CASE_TO_VARIANT(Single, FLOAT, float)
|
||||
PROP_CASE_TO_VARIANT(Double, DOUBLE, double)
|
||||
case PropertyType_StringArray: {
|
||||
UINT32 size;
|
||||
HSTRING *content;
|
||||
value->GetStringArray(&size, &content);
|
||||
QStringList list;
|
||||
// The last item is assumed to be added by us
|
||||
for (UINT32 i = 0; i < size - 1; ++i) {
|
||||
QString s = QString::fromWCharArray(WindowsGetStringRawBuffer(content[i], nullptr));
|
||||
list.append(s);
|
||||
}
|
||||
result = QSettingsPrivate::stringListToVariantList(list);
|
||||
break;
|
||||
}
|
||||
case PropertyType_String: {
|
||||
HString v;
|
||||
value->GetString(v.GetAddressOf());
|
||||
result = QSettingsPrivate::stringToVariant(QString::fromWCharArray(v.GetRawBuffer(nullptr)));
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
UINT32 size;
|
||||
BYTE *arr;
|
||||
value->GetUInt8Array(&size, &arr);
|
||||
QByteArray data = QByteArray::fromRawData((const char*)arr, size);
|
||||
QString s;
|
||||
if (size) {
|
||||
// We assume this is our qt stored data like on other platforms
|
||||
// as well. QList and others are converted to byte arrays
|
||||
s = QString::fromWCharArray((const wchar_t *)data.constData(), data.size() / 2);
|
||||
result = QSettingsPrivate::stringToVariant(s);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
class QWinRTSettingsPrivate : public QSettingsPrivate
|
||||
{
|
||||
public:
|
||||
QWinRTSettingsPrivate(QSettings::Scope scope, const QString &organization,
|
||||
const QString &application);
|
||||
QWinRTSettingsPrivate(const QString &rKey);
|
||||
~QWinRTSettingsPrivate();
|
||||
|
||||
void remove(const QString &uKey) override;
|
||||
void set(const QString &uKey, const QVariant &value) override;
|
||||
bool get(const QString &uKey, QVariant *value) const override;
|
||||
QStringList children(const QString &uKey, ChildSpec spec) const override;
|
||||
void clear() override;
|
||||
void sync() override;
|
||||
void flush() override;
|
||||
bool isWritable() const override;
|
||||
QString fileName() const override;
|
||||
|
||||
private:
|
||||
void init(QSettings::Scope scope);
|
||||
IApplicationDataContainer *getContainer(IApplicationDataContainer *parent, const QString &group, bool create = false) const;
|
||||
void clearContainerMaps();
|
||||
|
||||
HRESULT onDataChanged(IApplicationData*, IInspectable*);
|
||||
|
||||
ComPtr<IApplicationData> applicationData;
|
||||
QVector<ComPtr<IApplicationDataContainer>> readContainers;
|
||||
ComPtr<IApplicationDataContainer> writeContainer;
|
||||
EventRegistrationToken dataChangedToken;
|
||||
};
|
||||
|
||||
QWinRTSettingsPrivate::QWinRTSettingsPrivate(QSettings::Scope scope, const QString &organization,
|
||||
const QString &application)
|
||||
: QSettingsPrivate(QSettings::NativeFormat, scope, organization, application)
|
||||
, writeContainer(0)
|
||||
{
|
||||
init(scope);
|
||||
}
|
||||
|
||||
QWinRTSettingsPrivate::QWinRTSettingsPrivate(const QString &rPath)
|
||||
: QSettingsPrivate(QSettings::NativeFormat, QSettings::UserScope, rPath, QString())
|
||||
, writeContainer(0)
|
||||
{
|
||||
init(QSettings::UserScope);
|
||||
}
|
||||
|
||||
QWinRTSettingsPrivate::~QWinRTSettingsPrivate()
|
||||
{
|
||||
clearContainerMaps();
|
||||
}
|
||||
|
||||
void QWinRTSettingsPrivate::remove(const QString &uKey)
|
||||
{
|
||||
int lastIndex = uKey.lastIndexOf(QLatin1Char('/'));
|
||||
QString groupName = (lastIndex > 0) ? uKey.left(lastIndex) : QString();
|
||||
QString groupKey = uKey.mid(lastIndex + 1);
|
||||
|
||||
ComPtr<IApplicationDataContainer> container = getContainer(writeContainer.Get(), groupName, false);
|
||||
if (!container)
|
||||
return;
|
||||
|
||||
HRESULT hr;
|
||||
ComPtr<IPropertySet> values;
|
||||
hr = container->get_Values(&values);
|
||||
if (FAILED(hr))
|
||||
return;
|
||||
|
||||
ComPtr<IMap<HSTRING, IInspectable*>> settingsMap;
|
||||
|
||||
hr = values.As(&settingsMap);
|
||||
if (FAILED(hr))
|
||||
return;
|
||||
|
||||
HStringReference ref((const wchar_t*)groupKey.utf16(), groupKey.size());
|
||||
hr = settingsMap->Remove(ref.Get());
|
||||
|
||||
// groupKey can be a container as well
|
||||
hr = container->DeleteContainer(ref.Get());
|
||||
init(scope);
|
||||
}
|
||||
|
||||
void QWinRTSettingsPrivate::set(const QString &uKey, const QVariant &value)
|
||||
{
|
||||
int lastIndex = uKey.lastIndexOf(QLatin1Char('/'));
|
||||
QString groupName = (lastIndex > 0) ? uKey.left(lastIndex) : QString();
|
||||
QString groupKey = uKey.mid(lastIndex + 1);
|
||||
|
||||
ComPtr<IApplicationDataContainer> container = getContainer(writeContainer.Get(), groupName, true);
|
||||
|
||||
ComPtr<IPropertySet> values;
|
||||
HRESULT hr = container->get_Values(&values);
|
||||
if (FAILED(hr)) {
|
||||
qErrnoWarning(hr, "Could not access Windows container values");
|
||||
setStatus(QSettings::AccessError);
|
||||
return;
|
||||
}
|
||||
|
||||
ComPtr<IMap<HSTRING, IInspectable*>> settingsMap;
|
||||
hr = values.As(&settingsMap);
|
||||
if (FAILED(hr)) {
|
||||
setStatus(QSettings::AccessError);
|
||||
return;
|
||||
}
|
||||
|
||||
ComPtr<IPropertyValueStatics> valueStatics;
|
||||
hr = GetActivationFactory(HString::MakeReference(RuntimeClass_Windows_Foundation_PropertyValue).Get(), &valueStatics);
|
||||
if (FAILED(hr)) {
|
||||
setStatus(QSettings::AccessError);
|
||||
return;
|
||||
}
|
||||
|
||||
ComPtr<IInspectable> val;
|
||||
|
||||
switch (value.type()) {
|
||||
case QVariant::List:
|
||||
case QVariant::StringList: {
|
||||
QStringList l = variantListToStringList(value.toList());
|
||||
QStringList::const_iterator it = l.constBegin();
|
||||
bool containsNull = false;
|
||||
for (; it != l.constEnd(); ++it) {
|
||||
if ((*it).length() == 0 || it->contains(QChar::Null)) {
|
||||
// We can only store as binary
|
||||
containsNull = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (containsNull) {
|
||||
// Store binary
|
||||
const QString s = variantToString(value);
|
||||
hr = valueStatics->CreateUInt8Array(s.length() * 2, (BYTE*) s.utf16(), &val);
|
||||
} else {
|
||||
// Store as native string list
|
||||
int size = l.size();
|
||||
HSTRING *nativeHandleList = new HSTRING[size+1];
|
||||
for (int i = 0; i < size; ++i)
|
||||
hr = WindowsCreateString((const wchar_t*)l[i].utf16(), l[i].size(), &nativeHandleList[i]);
|
||||
// Add end marker
|
||||
hr = WindowsCreateString((const wchar_t*)L"\0\0@", 3, &nativeHandleList[size]);
|
||||
hr = valueStatics->CreateStringArray(size + 1 , nativeHandleList, &val);
|
||||
for (int i = 0; i < size; ++i)
|
||||
hr = WindowsDeleteString(nativeHandleList[i]);
|
||||
delete [] nativeHandleList;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case QVariant::Bool:
|
||||
hr = valueStatics->CreateBoolean(boolean(value.toBool()), &val);
|
||||
break;
|
||||
case QVariant::Int:
|
||||
hr = valueStatics->CreateInt32(INT32(value.toInt()), &val);
|
||||
break;
|
||||
case QVariant::UInt:
|
||||
hr = valueStatics->CreateUInt32(UINT32(value.toUInt()), &val);
|
||||
break;
|
||||
case QVariant::LongLong:
|
||||
hr = valueStatics->CreateInt64(INT64(value.toLongLong()), &val);
|
||||
break;
|
||||
case QVariant::ULongLong:
|
||||
hr = valueStatics->CreateUInt64(UINT64(value.toULongLong()), &val);
|
||||
break;
|
||||
default: {
|
||||
const QString s = variantToString(value);
|
||||
if (s.contains(QChar::Null)) {
|
||||
hr = valueStatics->CreateUInt8Array(s.length() * 2, (BYTE*) s.utf16(), &val);
|
||||
} else {
|
||||
HStringReference ref((const wchar_t*)s.utf16(), s.size());
|
||||
hr = valueStatics->CreateString(ref.Get(), &val);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
RETURN_VOID_IF_FAILED("QSettings: Could not save QVariant value into IInspectable");
|
||||
|
||||
HStringReference key((const wchar_t*)groupKey.utf16(), groupKey.size());
|
||||
boolean rep;
|
||||
|
||||
hr = settingsMap->Insert(key.Get(), val.Get(), &rep);
|
||||
RETURN_VOID_IF_FAILED("QSettings: Could not store value");
|
||||
}
|
||||
|
||||
bool QWinRTSettingsPrivate::get(const QString &uKey, QVariant *value) const
|
||||
{
|
||||
int lastIndex = uKey.lastIndexOf(QLatin1Char('/'));
|
||||
QString groupName = (lastIndex > 0) ? uKey.left(lastIndex) : QString();
|
||||
QString groupKey = uKey.mid(lastIndex + 1);
|
||||
|
||||
HRESULT hr;
|
||||
|
||||
for (int i = 0; i < readContainers.size(); ++i) {
|
||||
ComPtr<IApplicationDataContainer> container = const_cast<QWinRTSettingsPrivate*>(this)->getContainer(readContainers.at(i).Get(), groupName);
|
||||
|
||||
if (!container)
|
||||
continue;
|
||||
|
||||
ComPtr<IPropertySet> values;
|
||||
hr = container->get_Values(&values);
|
||||
if (FAILED(hr))
|
||||
continue;
|
||||
|
||||
ComPtr<IMap<HSTRING, IInspectable*>> settingsMap;
|
||||
hr = values.As(&settingsMap);
|
||||
if (FAILED(hr))
|
||||
continue;
|
||||
|
||||
HStringReference key((const wchar_t*)groupKey.utf16(), groupKey.size());
|
||||
boolean exists;
|
||||
|
||||
hr = settingsMap.Get()->HasKey(key.Get(), &exists);
|
||||
if (FAILED(hr))
|
||||
continue;
|
||||
|
||||
if (!exists) {
|
||||
if (!fallbacks)
|
||||
break;
|
||||
else
|
||||
continue;
|
||||
}
|
||||
|
||||
if (value) {
|
||||
ComPtr<IInspectable> val;
|
||||
hr = settingsMap->Lookup(key.Get(), &val);
|
||||
if (FAILED(hr))
|
||||
return false;
|
||||
|
||||
ComPtr<IPropertyValue> pVal;
|
||||
hr = val.As(&pVal);
|
||||
if (FAILED(hr))
|
||||
return false;
|
||||
|
||||
*value = propertyValueToQVariant(pVal.Get());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
setStatus(QSettings::AccessError);
|
||||
return false;
|
||||
}
|
||||
|
||||
QStringList QWinRTSettingsPrivate::children(const QString &uKey, ChildSpec spec) const
|
||||
{
|
||||
QStringList result;
|
||||
for (int i = 0; i < readContainers.size(); ++i) {
|
||||
ComPtr<IApplicationDataContainer> container = getContainer(readContainers.at(i).Get(), uKey, false);
|
||||
if (!container.Get())
|
||||
continue;
|
||||
|
||||
// Get Keys in this container
|
||||
if (spec == AllKeys || spec == ChildKeys)
|
||||
result += keyNames(container.Get());
|
||||
|
||||
// Get Subcontainer(s)
|
||||
if (spec == AllKeys || spec == ChildGroups) {
|
||||
const QStringList subContainerList = subContainerNames(container.Get(), spec == AllKeys);
|
||||
|
||||
if (spec == AllKeys) {
|
||||
for (const QString &item : subContainerList) {
|
||||
const QString subChildren = uKey.isEmpty() ? item : (uKey + QLatin1Char('/') + item);
|
||||
const QStringList subResult = children(subChildren, ChildKeys);
|
||||
for (const QString &subItem : subResult)
|
||||
result += item + QLatin1Char('/') + subItem;
|
||||
}
|
||||
}
|
||||
|
||||
if (spec == ChildGroups)
|
||||
result += subContainerList;
|
||||
}
|
||||
|
||||
}
|
||||
result.removeDuplicates();
|
||||
return result;
|
||||
}
|
||||
|
||||
void QWinRTSettingsPrivate::clear()
|
||||
{
|
||||
ComPtr<IApplicationDataContainer> container;
|
||||
HRESULT hr;
|
||||
if (scope == QSettings::UserScope)
|
||||
hr = applicationData->get_LocalSettings(&container);
|
||||
else
|
||||
hr = applicationData->get_RoamingSettings(&container);
|
||||
|
||||
RETURN_VOID_IF_FAILED("Could not access settings container");
|
||||
|
||||
QString containerName = applicationName.isEmpty() ? organizationName : applicationName;
|
||||
HStringReference containerNativeName((const wchar_t*)containerName.utf16(), containerName.size());
|
||||
|
||||
hr = container->DeleteContainer(containerNativeName.Get());
|
||||
RETURN_VOID_IF_FAILED("Could not delete Container");
|
||||
|
||||
init(scope);
|
||||
}
|
||||
|
||||
void QWinRTSettingsPrivate::sync()
|
||||
{
|
||||
// No native sync available
|
||||
}
|
||||
|
||||
void QWinRTSettingsPrivate::flush()
|
||||
{
|
||||
// No native flush available
|
||||
}
|
||||
|
||||
QString QWinRTSettingsPrivate::fileName() const
|
||||
{
|
||||
Q_UNIMPLEMENTED();
|
||||
return QString();
|
||||
}
|
||||
|
||||
HRESULT QWinRTSettingsPrivate::onDataChanged(IApplicationData *, IInspectable *)
|
||||
{
|
||||
// This only happens, if roaming data is changed by the OS.
|
||||
// To ensure sanity we clean up the map and start from scratch
|
||||
init(scope);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void QWinRTSettingsPrivate::init(QSettings::Scope scope)
|
||||
{
|
||||
clearContainerMaps();
|
||||
|
||||
ComPtr<IApplicationDataStatics> applicationDataStatics;
|
||||
HRESULT hr = GetActivationFactory(HString::MakeReference(RuntimeClass_Windows_Storage_ApplicationData).Get(), &applicationDataStatics);
|
||||
if (FAILED(hr)) {
|
||||
qErrnoWarning(hr, "Could not access Storage Factory");
|
||||
setStatus(QSettings::AccessError);
|
||||
return;
|
||||
}
|
||||
|
||||
hr = applicationDataStatics->get_Current(&applicationData);
|
||||
if (FAILED(hr)) {
|
||||
qErrnoWarning(hr, "Could not access application data statics");
|
||||
setStatus(QSettings::AccessError);
|
||||
return;
|
||||
}
|
||||
|
||||
const QString organizationString = organizationName.isEmpty() ? QLatin1String("OrganizationDefaults") : organizationName;
|
||||
ComPtr<IApplicationDataContainer> localContainer;
|
||||
if (scope == QSettings::UserScope && SUCCEEDED(applicationData->get_LocalSettings(&localContainer))) {
|
||||
if (!applicationName.isEmpty())
|
||||
readContainers.append(createSubContainer(localContainer.Get(), applicationName));
|
||||
readContainers.append(createSubContainer(localContainer.Get(), organizationString));
|
||||
}
|
||||
|
||||
ComPtr<IApplicationDataContainer> roamingContainer;
|
||||
if (SUCCEEDED(applicationData->get_RoamingSettings(&roamingContainer))) {
|
||||
if (!applicationName.isEmpty())
|
||||
readContainers.append(createSubContainer(roamingContainer.Get(), applicationName));
|
||||
readContainers.append(createSubContainer(roamingContainer.Get(), organizationString));
|
||||
}
|
||||
|
||||
ComPtr<IApplicationDataContainer> writeRootContainer = (scope == QSettings::UserScope) ? localContainer : roamingContainer;
|
||||
if (!applicationName.isEmpty())
|
||||
writeContainer = createSubContainer(writeRootContainer.Get(), applicationName);
|
||||
else
|
||||
writeContainer = createSubContainer(writeRootContainer.Get(), organizationString);
|
||||
|
||||
hr = applicationData->add_DataChanged(Callback<DataHandler>(this, &QWinRTSettingsPrivate::onDataChanged).Get(), &dataChangedToken);
|
||||
}
|
||||
|
||||
IApplicationDataContainer *QWinRTSettingsPrivate::getContainer(IApplicationDataContainer *parent, const QString &group, bool create) const
|
||||
{
|
||||
IApplicationDataContainer *current = parent;
|
||||
if (group.isEmpty())
|
||||
return current;
|
||||
const QStringList groupPath = group.split(QLatin1Char('/'), Qt::SkipEmptyParts);
|
||||
|
||||
for (const QString &subGroup : groupPath) {
|
||||
ComPtr<IApplicationDataContainer> sub = subContainer(current, subGroup);
|
||||
if (!sub && create)
|
||||
sub = createSubContainer(current, subGroup);
|
||||
if (!sub)
|
||||
return 0; // Something seriously went wrong
|
||||
current = sub.Detach();
|
||||
}
|
||||
return current;
|
||||
}
|
||||
|
||||
void QWinRTSettingsPrivate::clearContainerMaps()
|
||||
{
|
||||
readContainers.clear();
|
||||
writeContainer.Reset();
|
||||
}
|
||||
|
||||
bool QWinRTSettingsPrivate::isWritable() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
QSettingsPrivate *QSettingsPrivate::create(QSettings::Format format, QSettings::Scope scope,
|
||||
const QString &organization, const QString &application)
|
||||
{
|
||||
if (format == QSettings::NativeFormat)
|
||||
return new QWinRTSettingsPrivate(scope, organization, application);
|
||||
else
|
||||
return new QConfFileSettingsPrivate(format, scope, organization, application);
|
||||
}
|
||||
|
||||
QSettingsPrivate *QSettingsPrivate::create(const QString &fileName, QSettings::Format format)
|
||||
{
|
||||
if (format == QSettings::NativeFormat)
|
||||
return new QWinRTSettingsPrivate(fileName);
|
||||
else
|
||||
return new QConfFileSettingsPrivate(fileName, format);
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
@ -1,138 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qstandardpaths.h"
|
||||
|
||||
#include <qdir.h>
|
||||
#include <private/qsystemlibrary_p.h>
|
||||
#include <qcoreapplication.h>
|
||||
#include <qstringlist.h>
|
||||
|
||||
#include <qt_windows.h>
|
||||
|
||||
#include <wrl.h>
|
||||
#include <windows.foundation.h>
|
||||
#include <windows.storage.h>
|
||||
#include <Windows.ApplicationModel.h>
|
||||
|
||||
using namespace Microsoft::WRL;
|
||||
using namespace Microsoft::WRL::Wrappers;
|
||||
using namespace ABI::Windows::Foundation;
|
||||
using namespace ABI::Windows::Storage;
|
||||
using namespace ABI::Windows::ApplicationModel;
|
||||
|
||||
#ifndef QT_NO_STANDARDPATHS
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
static QString convertCharArray(const wchar_t *path)
|
||||
{
|
||||
return QDir::fromNativeSeparators(QString::fromWCharArray(path));
|
||||
}
|
||||
|
||||
QString QStandardPaths::writableLocation(StandardLocation type)
|
||||
{
|
||||
QString result;
|
||||
|
||||
switch (type) {
|
||||
case ConfigLocation: // same as AppLocalDataLocation, on Windows
|
||||
case GenericConfigLocation: // same as GenericDataLocation, on Windows
|
||||
case AppConfigLocation:
|
||||
case AppDataLocation:
|
||||
case AppLocalDataLocation:
|
||||
case GenericDataLocation: {
|
||||
ComPtr<IApplicationDataStatics> applicationDataStatics;
|
||||
if (FAILED(GetActivationFactory(HString::MakeReference(RuntimeClass_Windows_Storage_ApplicationData).Get(), &applicationDataStatics)))
|
||||
break;
|
||||
ComPtr<IApplicationData> applicationData;
|
||||
if (FAILED(applicationDataStatics->get_Current(&applicationData)))
|
||||
break;
|
||||
ComPtr<IStorageFolder> settingsFolder;
|
||||
if (FAILED(applicationData->get_LocalFolder(&settingsFolder)))
|
||||
break;
|
||||
ComPtr<IStorageItem> settingsFolderItem;
|
||||
if (FAILED(settingsFolder.As(&settingsFolderItem)))
|
||||
break;
|
||||
HString path;
|
||||
if (FAILED(settingsFolderItem->get_Path(path.GetAddressOf())))
|
||||
break;
|
||||
result = convertCharArray(path.GetRawBuffer(nullptr));
|
||||
if (isTestModeEnabled())
|
||||
result += QLatin1String("/qttest");
|
||||
break;
|
||||
}
|
||||
case CacheLocation:
|
||||
return writableLocation(AppLocalDataLocation) + QLatin1String("/cache");
|
||||
|
||||
case GenericCacheLocation:
|
||||
return writableLocation(GenericDataLocation) + QLatin1String("/cache");
|
||||
|
||||
case TempLocation:
|
||||
result = QDir::tempPath();
|
||||
break;
|
||||
|
||||
case ApplicationsLocation:
|
||||
case DesktopLocation:
|
||||
case FontsLocation:
|
||||
case HomeLocation:
|
||||
case RuntimeLocation:
|
||||
// these are read-only
|
||||
break;
|
||||
|
||||
case DocumentsLocation:
|
||||
case MusicLocation:
|
||||
case MoviesLocation:
|
||||
case PicturesLocation:
|
||||
case DownloadLocation:
|
||||
default:
|
||||
Q_UNIMPLEMENTED();
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
QStringList QStandardPaths::standardLocations(StandardLocation type)
|
||||
{
|
||||
const QString writable = writableLocation(type);
|
||||
return writable.isEmpty() ? QStringList() : QStringList(writable);
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_STANDARDPATHS
|
@ -71,7 +71,7 @@ public:
|
||||
static QStorageInfo root();
|
||||
|
||||
protected:
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||
#if defined(Q_OS_WIN)
|
||||
void retrieveVolumeInfo();
|
||||
void retrieveDiskFreeSpace();
|
||||
#elif defined(Q_OS_MAC)
|
||||
|
@ -1,67 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2014 Ivan Komissarov <ABBAPOH@gmail.com>
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qstorageinfo_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
void QStorageInfoPrivate::initRootPath()
|
||||
{
|
||||
Q_UNIMPLEMENTED();
|
||||
rootPath = QString();
|
||||
}
|
||||
|
||||
void QStorageInfoPrivate::doStat()
|
||||
{
|
||||
Q_UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
QList<QStorageInfo> QStorageInfoPrivate::mountedVolumes()
|
||||
{
|
||||
Q_UNIMPLEMENTED();
|
||||
return QList<QStorageInfo>();
|
||||
}
|
||||
|
||||
QStorageInfo QStorageInfoPrivate::root()
|
||||
{
|
||||
Q_UNIMPLEMENTED();
|
||||
return QStorageInfo();
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
@ -219,17 +219,10 @@ static bool createFileFromTemplate(NativeFileHandle &file, QTemporaryFileName &t
|
||||
const DWORD shareMode = (flags & QTemporaryFileEngine::Win32NonShared)
|
||||
? 0u : (FILE_SHARE_READ | FILE_SHARE_WRITE);
|
||||
|
||||
# ifndef Q_OS_WINRT
|
||||
file = CreateFile((const wchar_t *)path.constData(),
|
||||
GENERIC_READ | GENERIC_WRITE,
|
||||
shareMode, NULL, CREATE_NEW,
|
||||
FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
# else // !Q_OS_WINRT
|
||||
file = CreateFile2((const wchar_t *)path.constData(),
|
||||
GENERIC_READ | GENERIC_WRITE,
|
||||
shareMode, CREATE_NEW,
|
||||
NULL);
|
||||
# endif // Q_OS_WINRT
|
||||
|
||||
if (file != INVALID_HANDLE_VALUE)
|
||||
return true;
|
||||
@ -380,7 +373,7 @@ bool QTemporaryFileEngine::open(QIODevice::OpenMode openMode)
|
||||
return false;
|
||||
}
|
||||
|
||||
#if !defined(Q_OS_WIN) || defined(Q_OS_WINRT)
|
||||
#if !defined(Q_OS_WIN)
|
||||
d->closeFileHandle = true;
|
||||
#endif
|
||||
|
||||
|
@ -88,27 +88,15 @@ win32 {
|
||||
kernel/qsystemsemaphore_win.cpp
|
||||
HEADERS += \
|
||||
kernel/qwineventnotifier.h \
|
||||
kernel/qwineventnotifier_p.h
|
||||
kernel/qwineventnotifier_p.h \
|
||||
kernel/qfunctions_winrt_p.h
|
||||
|
||||
winrt {
|
||||
SOURCES += kernel/qeventdispatcher_winrt.cpp
|
||||
HEADERS += kernel/qeventdispatcher_winrt_p.h
|
||||
} else {
|
||||
SOURCES += kernel/qeventdispatcher_win.cpp \
|
||||
kernel/qwinregistry.cpp
|
||||
HEADERS += kernel/qeventdispatcher_win_p.h \
|
||||
kernel/qwinregistry_p.h
|
||||
}
|
||||
SOURCES += kernel/qeventdispatcher_win.cpp \
|
||||
kernel/qwinregistry.cpp
|
||||
HEADERS += kernel/qeventdispatcher_win_p.h \
|
||||
kernel/qwinregistry_p.h
|
||||
|
||||
!winrt: LIBS_PRIVATE += -lversion
|
||||
}
|
||||
|
||||
winrt {
|
||||
SOURCES += \
|
||||
kernel/qfunctions_winrt.cpp
|
||||
HEADERS += \
|
||||
kernel/qfunctions_fake_env_p.h \
|
||||
kernel/qfunctions_winrt.h
|
||||
LIBS_PRIVATE += -lversion
|
||||
}
|
||||
|
||||
mac {
|
||||
|
@ -87,16 +87,7 @@
|
||||
# include "qeventdispatcher_unix_p.h"
|
||||
#endif
|
||||
#ifdef Q_OS_WIN
|
||||
# ifdef Q_OS_WINRT
|
||||
# include "qeventdispatcher_winrt_p.h"
|
||||
# include "qfunctions_winrt.h"
|
||||
# include <wrl.h>
|
||||
# include <Windows.ApplicationModel.core.h>
|
||||
using namespace ABI::Windows::ApplicationModel::Core;
|
||||
using namespace Microsoft::WRL;
|
||||
# else
|
||||
# include "qeventdispatcher_win_p.h"
|
||||
# endif
|
||||
#include "qeventdispatcher_win_p.h"
|
||||
#endif
|
||||
#endif // QT_NO_QOBJECT
|
||||
|
||||
@ -397,7 +388,7 @@ Q_GLOBAL_STATIC(QCoreApplicationData, coreappdata)
|
||||
static bool quitLockRefEnabled = true;
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||
#if defined(Q_OS_WIN)
|
||||
// Check whether the command line arguments match those passed to main()
|
||||
// by comparing to the global __argv/__argc (MS extension).
|
||||
// Deep comparison is required since argv/argc is rebuilt by WinMain for
|
||||
@ -423,7 +414,7 @@ static inline bool contains(int argc, char **argv, const char *needle)
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif // Q_OS_WIN && !Q_OS_WINRT
|
||||
#endif // Q_OS_WIN
|
||||
|
||||
QCoreApplicationPrivate::QCoreApplicationPrivate(int &aargc, char **aargv, uint flags)
|
||||
:
|
||||
@ -432,7 +423,7 @@ QCoreApplicationPrivate::QCoreApplicationPrivate(int &aargc, char **aargv, uint
|
||||
#endif
|
||||
argc(aargc)
|
||||
, argv(aargv)
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||
#if defined(Q_OS_WIN)
|
||||
, origArgc(0)
|
||||
, origArgv(nullptr)
|
||||
#endif
|
||||
@ -451,13 +442,13 @@ QCoreApplicationPrivate::QCoreApplicationPrivate(int &aargc, char **aargv, uint
|
||||
argc = 0;
|
||||
argv = const_cast<char **>(&empty);
|
||||
}
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||
#if defined(Q_OS_WIN)
|
||||
if (!isArgvModified(argc, argv)) {
|
||||
origArgc = argc;
|
||||
origArgv = new char *[argc];
|
||||
std::copy(argv, argv + argc, QT_MAKE_CHECKED_ARRAY_ITERATOR(origArgv, argc));
|
||||
}
|
||||
#endif // Q_OS_WIN && !Q_OS_WINRT
|
||||
#endif // Q_OS_WIN
|
||||
|
||||
#ifndef QT_NO_QOBJECT
|
||||
QCoreApplicationPrivate::is_app_closing = false;
|
||||
@ -467,10 +458,6 @@ QCoreApplicationPrivate::QCoreApplicationPrivate(int &aargc, char **aargv, uint
|
||||
qFatal("FATAL: The application binary appears to be running setuid, this is a security hole.");
|
||||
# endif // Q_OS_UNIX
|
||||
|
||||
#ifdef Q_OS_WINRT
|
||||
QThreadData::setMainThread();
|
||||
#endif
|
||||
|
||||
QThread *cur = QThread::currentThread(); // note: this may end up setting theMainThread!
|
||||
if (cur != theMainThread.loadAcquire())
|
||||
qWarning("WARNING: QApplication was not created in the main() thread.");
|
||||
@ -482,7 +469,7 @@ QCoreApplicationPrivate::~QCoreApplicationPrivate()
|
||||
#ifndef QT_NO_QOBJECT
|
||||
cleanupThreadData();
|
||||
#endif
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||
#if defined(Q_OS_WIN)
|
||||
delete [] origArgv;
|
||||
#endif
|
||||
QCoreApplicationPrivate::clearApplicationFilePath();
|
||||
@ -570,10 +557,6 @@ void QCoreApplicationPrivate::appendApplicationPathToLibraryPaths()
|
||||
coreappdata()->app_libpaths.reset(app_libpaths = new QStringList);
|
||||
QString app_location = QCoreApplication::applicationFilePath();
|
||||
app_location.truncate(app_location.lastIndexOf(QLatin1Char('/')));
|
||||
#ifdef Q_OS_WINRT
|
||||
if (app_location.isEmpty())
|
||||
app_location.append(QLatin1Char('/'));
|
||||
#endif
|
||||
app_location = QDir(app_location).canonicalPath();
|
||||
if (QFile::exists(app_location) && !app_libpaths->contains(app_location))
|
||||
app_libpaths->append(app_location);
|
||||
@ -2466,7 +2449,7 @@ QStringList QCoreApplication::arguments()
|
||||
char ** const av = self->d_func()->argv;
|
||||
list.reserve(ac);
|
||||
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||
#if defined(Q_OS_WIN)
|
||||
// On Windows, it is possible to pass Unicode arguments on
|
||||
// the command line. To restore those, we split the command line
|
||||
// and filter out arguments that were deleted by derived application
|
||||
@ -2483,7 +2466,7 @@ QStringList QCoreApplication::arguments()
|
||||
}
|
||||
return list;
|
||||
} // Fall back to rebuilding from argv/argc when a modified argv was passed.
|
||||
#endif // defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||
#endif // defined(Q_OS_WIN)
|
||||
|
||||
for (int a = 0; a < ac; ++a) {
|
||||
list << QString::fromLocal8Bit(av[a]);
|
||||
@ -2622,9 +2605,6 @@ QString QCoreApplication::applicationName()
|
||||
\row
|
||||
\li Windows (classic desktop)
|
||||
\li PRODUCTVERSION parameter of the VERSIONINFO resource
|
||||
\row
|
||||
\li Universal Windows Platform
|
||||
\li version attribute of the application package manifest
|
||||
\row
|
||||
\li macOS, iOS, tvOS, watchOS
|
||||
\li CFBundleVersion property of the information property list
|
||||
|
@ -154,7 +154,7 @@ public:
|
||||
|
||||
int &argc;
|
||||
char **argv;
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||
#if defined(Q_OS_WIN)
|
||||
int origArgc;
|
||||
char **origArgv; // store unmodified arguments for QCoreApplication::arguments()
|
||||
#endif
|
||||
|
@ -53,16 +53,6 @@
|
||||
#include <ctype.h>
|
||||
#include <qt_windows.h>
|
||||
|
||||
#ifdef Q_OS_WINRT
|
||||
#include <qfunctions_winrt.h>
|
||||
#include <wrl.h>
|
||||
#include <Windows.ApplicationModel.core.h>
|
||||
#include <windows.foundation.h>
|
||||
using namespace ABI::Windows::ApplicationModel;
|
||||
using namespace Microsoft::WRL;
|
||||
using namespace Microsoft::WRL::Wrappers;
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
Q_CORE_EXPORT QString qAppFileName() // get application file name
|
||||
@ -105,33 +95,6 @@ QString QCoreApplicationPrivate::appVersion() const
|
||||
{
|
||||
QString applicationVersion;
|
||||
#ifndef QT_BOOTSTRAPPED
|
||||
# ifdef Q_OS_WINRT
|
||||
HRESULT hr;
|
||||
|
||||
ComPtr<IPackageStatics> packageFactory;
|
||||
hr = RoGetActivationFactory(
|
||||
HString::MakeReference(RuntimeClass_Windows_ApplicationModel_Package).Get(),
|
||||
IID_PPV_ARGS(&packageFactory));
|
||||
RETURN_IF_FAILED("Failed to create package instance", return QString());
|
||||
|
||||
ComPtr<IPackage> package;
|
||||
packageFactory->get_Current(&package);
|
||||
RETURN_IF_FAILED("Failed to get current application package", return QString());
|
||||
|
||||
ComPtr<IPackageId> packageId;
|
||||
package->get_Id(&packageId);
|
||||
RETURN_IF_FAILED("Failed to get current application package ID", return QString());
|
||||
|
||||
PackageVersion version;
|
||||
packageId->get_Version(&version);
|
||||
RETURN_IF_FAILED("Failed to get current application package version", return QString());
|
||||
|
||||
applicationVersion = QStringLiteral("%1.%2.%3.%4")
|
||||
.arg(version.Major)
|
||||
.arg(version.Minor)
|
||||
.arg(version.Build)
|
||||
.arg(version.Revision);
|
||||
# else
|
||||
const QString appFileName = qAppFileName();
|
||||
QVarLengthArray<wchar_t> buffer(appFileName.size() + 1);
|
||||
buffer[appFileName.toWCharArray(buffer.data())] = 0;
|
||||
@ -154,13 +117,10 @@ QString QCoreApplicationPrivate::appVersion() const
|
||||
}
|
||||
}
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
return applicationVersion;
|
||||
}
|
||||
|
||||
#ifndef Q_OS_WINRT
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
Q_CORE_EXPORT HINSTANCE qWinAppInst() // get Windows app handle
|
||||
{
|
||||
@ -913,8 +873,6 @@ QDebug operator<<(QDebug dbg, const MSG &msg)
|
||||
|
||||
#endif // QT_NO_QOBJECT
|
||||
|
||||
#endif // !defined(Q_OS_WINRT)
|
||||
|
||||
#ifndef QT_NO_QOBJECT
|
||||
void QCoreApplicationPrivate::removePostedTimerEvent(QObject *object, int timerId)
|
||||
{
|
||||
|
@ -82,17 +82,7 @@ static inline QStringList qWinCmdArgs(const QString &cmdLine)
|
||||
return result;
|
||||
}
|
||||
|
||||
#elif defined(Q_OS_WINRT) // Q_OS_WIN32
|
||||
|
||||
static inline QStringList qCmdLineArgs(int argc, char *argv[])
|
||||
{
|
||||
QStringList args;
|
||||
for (int i = 0; i != argc; ++i)
|
||||
args += QString::fromLocal8Bit(argv[i]);
|
||||
return args;
|
||||
}
|
||||
|
||||
#endif // Q_OS_WINRT
|
||||
#endif // Q_OS_WIN32
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|