Remove support for WinRT 8.1 and Windows Phone 8.1
[ChangeLog][QtBase][General] Removed support for WinRT/Windows Phone 8.1. Task-number: QTBUG-57288 Change-Id: Ifd6d6780cbbdb710d99556ba3d2fb2e514d4f789 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
parent
b9887f3d9a
commit
d3eec16862
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# qmake configuration for Microsoft Visual Studio C/C++ Compiler
|
# qmake configuration for Microsoft Visual Studio C/C++ Compiler
|
||||||
# This mkspec is used for all win32-msvcXXXX, winrt-XXX-msvcXXX
|
# This mkspec is used for all win32-msvcXXXX and
|
||||||
# and winphone-XXX-msvcXXX specs
|
# winrt-XXX-msvcXXX specs
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
<?xml version=\"1.0\" encoding=\"utf-8\"?>
|
|
||||||
<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:m2=\"http://schemas.microsoft.com/appx/2013/manifest\">
|
|
||||||
<Identity
|
|
||||||
Name=\"$${WINRT_MANIFEST.identity}\"
|
|
||||||
ProcessorArchitecture=\"$${WINRT_MANIFEST.architecture}\"
|
|
||||||
Publisher=\"$${WINRT_MANIFEST.publisherid}\"
|
|
||||||
Version=\"$${WINRT_MANIFEST.version}\" />
|
|
||||||
<Properties>
|
|
||||||
<DisplayName>$${WINRT_MANIFEST.name}</DisplayName>
|
|
||||||
<PublisherDisplayName>$${WINRT_MANIFEST.publisher}</PublisherDisplayName>
|
|
||||||
<Logo>$${WINRT_MANIFEST.logo_store}</Logo>
|
|
||||||
</Properties>
|
|
||||||
<Prerequisites>
|
|
||||||
<OSMinVersion>6.3.0</OSMinVersion>
|
|
||||||
<OSMaxVersionTested>6.3.0</OSMaxVersionTested>
|
|
||||||
</Prerequisites>
|
|
||||||
<Resources>
|
|
||||||
<Resource Language=\"en\" />
|
|
||||||
</Resources>
|
|
||||||
<Applications>
|
|
||||||
<Application
|
|
||||||
Id=\"App\"
|
|
||||||
Executable=\"$${WINRT_MANIFEST.target}.exe\"
|
|
||||||
EntryPoint=\"$${WINRT_MANIFEST.target}.App\">
|
|
||||||
<m2:VisualElements
|
|
||||||
DisplayName=\"$${WINRT_MANIFEST.name}\"
|
|
||||||
Description=\"$${WINRT_MANIFEST.description}\"
|
|
||||||
BackgroundColor=\"$${WINRT_MANIFEST.background}\"
|
|
||||||
ForegroundText=\"$${WINRT_MANIFEST.foreground}\"
|
|
||||||
Square150x150Logo=\"$${WINRT_MANIFEST.logo_150x150}\"
|
|
||||||
Square30x30Logo=\"$${WINRT_MANIFEST.logo_30x30}\">
|
|
||||||
<m2:DefaultTile Square310x310Logo=\"$${WINRT_MANIFEST.logo_310x310}\"
|
|
||||||
Wide310x150Logo=\"$${WINRT_MANIFEST.logo_310x150}\"
|
|
||||||
Square70x70Logo=\"$${WINRT_MANIFEST.logo_70x70}\">
|
|
||||||
<m2:ShowNameOnTiles>
|
|
||||||
<m2:ShowOn Tile=\"square150x150Logo\" />
|
|
||||||
<m2:ShowOn Tile=\"wide310x150Logo\" />
|
|
||||||
<m2:ShowOn Tile=\"square310x310Logo\" />
|
|
||||||
</m2:ShowNameOnTiles>
|
|
||||||
</m2:DefaultTile>
|
|
||||||
<m2:SplashScreen Image=\"$${WINRT_MANIFEST.logo_620x300}\" />$${WINRT_MANIFEST.rotation_preference}
|
|
||||||
</m2:VisualElements>
|
|
||||||
</Application>
|
|
||||||
</Applications>$${WINRT_MANIFEST.capabilities}
|
|
||||||
$${WINRT_MANIFEST.dependencies}
|
|
||||||
</Package>
|
|
||||||
<!-- Generated by qmake using the $$[QMAKE_XSPEC] mkspec. -->
|
|
@ -1,48 +0,0 @@
|
|||||||
<?xml version=\"1.0\" encoding=\"utf-8\"?>
|
|
||||||
<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:m2=\"http://schemas.microsoft.com/appx/2013/manifest\" xmlns:m3=\"http://schemas.microsoft.com/appx/2014/manifest\" xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\">
|
|
||||||
<Identity
|
|
||||||
Name=\"$${WINRT_MANIFEST.identity}\"
|
|
||||||
ProcessorArchitecture=\"$${WINRT_MANIFEST.architecture}\"
|
|
||||||
Publisher=\"$${WINRT_MANIFEST.publisherid}\"
|
|
||||||
Version=\"$${WINRT_MANIFEST.version}\" />
|
|
||||||
<mp:PhoneIdentity
|
|
||||||
PhoneProductId=\"$${WINRT_MANIFEST.phone_product_id}\"
|
|
||||||
PhonePublisherId=\"$${WINRT_MANIFEST.phone_publisher_id}\" />
|
|
||||||
<Properties>
|
|
||||||
<DisplayName>$${WINRT_MANIFEST.name}</DisplayName>
|
|
||||||
<PublisherDisplayName>$${WINRT_MANIFEST.publisher}</PublisherDisplayName>
|
|
||||||
<Logo>$${WINRT_MANIFEST.logo_store}</Logo>
|
|
||||||
</Properties>
|
|
||||||
<Prerequisites>
|
|
||||||
<OSMinVersion>6.3.1</OSMinVersion>
|
|
||||||
<OSMaxVersionTested>6.3.1</OSMaxVersionTested>
|
|
||||||
</Prerequisites>
|
|
||||||
<Resources>
|
|
||||||
<Resource Language=\"en\" />
|
|
||||||
</Resources>
|
|
||||||
<Applications>
|
|
||||||
<Application
|
|
||||||
Id=\"App\"
|
|
||||||
Executable=\"$${WINRT_MANIFEST.target}.exe\"
|
|
||||||
EntryPoint=\"$${WINRT_MANIFEST.target}.App\">
|
|
||||||
<m3:VisualElements
|
|
||||||
DisplayName=\"$${WINRT_MANIFEST.name}\"
|
|
||||||
Description=\"$${WINRT_MANIFEST.description}\"
|
|
||||||
BackgroundColor=\"$${WINRT_MANIFEST.background}\"
|
|
||||||
ForegroundText=\"$${WINRT_MANIFEST.foreground}\"
|
|
||||||
Square150x150Logo=\"$${WINRT_MANIFEST.logo_150x150}\"
|
|
||||||
Square44x44Logo=\"$${WINRT_MANIFEST.logo_44x44}\">
|
|
||||||
<m3:DefaultTile Square71x71Logo=\"$${WINRT_MANIFEST.logo_71x71}\"
|
|
||||||
Wide310x150Logo=\"$${WINRT_MANIFEST.logo_310x150}\">
|
|
||||||
<m3:ShowNameOnTiles>
|
|
||||||
<m3:ShowOn Tile=\"square150x150Logo\" />
|
|
||||||
<m3:ShowOn Tile=\"wide310x150Logo\" />
|
|
||||||
</m3:ShowNameOnTiles>
|
|
||||||
</m3:DefaultTile>
|
|
||||||
<m3:SplashScreen Image=\"$${WINRT_MANIFEST.logo_480x800}\" />$${WINRT_MANIFEST.rotation_preference}
|
|
||||||
</m3:VisualElements>
|
|
||||||
</Application>
|
|
||||||
</Applications>$${WINRT_MANIFEST.capabilities}
|
|
||||||
$${WINRT_MANIFEST.dependencies}
|
|
||||||
</Package>
|
|
||||||
<!-- Generated by qmake using the $$[QMAKE_XSPEC] mkspec. -->
|
|
@ -1,4 +1,3 @@
|
|||||||
*msvc2015 {
|
|
||||||
# Note that the order is important - ucrt(d) has to be first.
|
# Note that the order is important - ucrt(d) has to be first.
|
||||||
# Otherwise, the linker might use malloc from a different library,
|
# Otherwise, the linker might use malloc from a different library,
|
||||||
# but free_dbg() from the runtime, causing an assertion failure
|
# but free_dbg() from the runtime, causing an assertion failure
|
||||||
@ -9,7 +8,6 @@
|
|||||||
QMAKE_LIBS = ucrtd.lib vcruntimed.lib $$QMAKE_LIBS
|
QMAKE_LIBS = ucrtd.lib vcruntimed.lib $$QMAKE_LIBS
|
||||||
else: \
|
else: \
|
||||||
QMAKE_LIBS = ucrt.lib vcruntime.lib $$QMAKE_LIBS
|
QMAKE_LIBS = ucrt.lib vcruntime.lib $$QMAKE_LIBS
|
||||||
}
|
|
||||||
|
|
||||||
equals(TEMPLATE, "vcapp"): CONFIG += windeployqt
|
equals(TEMPLATE, "vcapp"): CONFIG += windeployqt
|
||||||
|
|
||||||
|
@ -59,7 +59,6 @@
|
|||||||
# Provide the C-runtime dependency
|
# Provide the C-runtime dependency
|
||||||
equals(TEMPLATE, "app") {
|
equals(TEMPLATE, "app") {
|
||||||
VCLIBS = Microsoft.VCLibs.$$replace(MSVC_VER, \\., ).00
|
VCLIBS = Microsoft.VCLibs.$$replace(MSVC_VER, \\., ).00
|
||||||
winphone: VCLIBS = $${VCLIBS}.Phone
|
|
||||||
CONFIG(debug, debug|release): \
|
CONFIG(debug, debug|release): \
|
||||||
VCLIBS = $${VCLIBS}.Debug
|
VCLIBS = $${VCLIBS}.Debug
|
||||||
else: \
|
else: \
|
||||||
@ -103,7 +102,6 @@
|
|||||||
INDENT = "$$escape_expand(\\r\\n) "
|
INDENT = "$$escape_expand(\\r\\n) "
|
||||||
|
|
||||||
VS_XML_NAMESPACE = "m2"
|
VS_XML_NAMESPACE = "m2"
|
||||||
winphone: VS_XML_NAMESPACE = "m3"
|
|
||||||
WINRT_MANIFEST.rotation_preference = $$unique(WINRT_MANIFEST.rotation_preference)
|
WINRT_MANIFEST.rotation_preference = $$unique(WINRT_MANIFEST.rotation_preference)
|
||||||
!isEmpty(WINRT_MANIFEST.rotation_preference) {
|
!isEmpty(WINRT_MANIFEST.rotation_preference) {
|
||||||
MANIFEST_ROTATION += "<$${VS_XML_NAMESPACE}:InitialRotationPreference>"
|
MANIFEST_ROTATION += "<$${VS_XML_NAMESPACE}:InitialRotationPreference>"
|
||||||
@ -150,10 +148,8 @@
|
|||||||
# is already inside the MSVC2015 manifest.
|
# is already inside the MSVC2015 manifest.
|
||||||
WINRT_MANIFEST.dependencies = $$unique(WINRT_MANIFEST.dependencies)
|
WINRT_MANIFEST.dependencies = $$unique(WINRT_MANIFEST.dependencies)
|
||||||
!isEmpty(WINRT_MANIFEST.dependencies) {
|
!isEmpty(WINRT_MANIFEST.dependencies) {
|
||||||
*-msvc2013: MANIFEST_DEPENDENCIES += "<Dependencies>"
|
|
||||||
for(DEPENDENCY, WINRT_MANIFEST.dependencies): \
|
for(DEPENDENCY, WINRT_MANIFEST.dependencies): \
|
||||||
MANIFEST_DEPENDENCIES += " <PackageDependency Name=\"$$DEPENDENCY\" />"
|
MANIFEST_DEPENDENCIES += " <PackageDependency Name=\"$$DEPENDENCY\" />"
|
||||||
*-msvc2013: MANIFEST_DEPENDENCIES += "</Dependencies>"
|
|
||||||
|
|
||||||
WINRT_MANIFEST.dependencies = $$join(MANIFEST_DEPENDENCIES, $$INDENT, $$INDENT)
|
WINRT_MANIFEST.dependencies = $$join(MANIFEST_DEPENDENCIES, $$INDENT, $$INDENT)
|
||||||
}
|
}
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
#
|
|
||||||
# qmake configuration for winphone-arm-msvc2013
|
|
||||||
#
|
|
||||||
# Written for Microsoft Visual C++ 2013
|
|
||||||
#
|
|
||||||
|
|
||||||
include(../common/winrt_winphone/qmake.conf)
|
|
||||||
QMAKE_COMPILER_DEFINES += _MSC_VER=1800
|
|
||||||
QMAKE_PLATFORM = winphone $$QMAKE_PLATFORM
|
|
||||||
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP ARM __ARM__ __ARM__
|
|
||||||
CONFIG += no_generated_target_info
|
|
||||||
|
|
||||||
QMAKE_CFLAGS += -FS
|
|
||||||
QMAKE_CXXFLAGS += -FS
|
|
||||||
QMAKE_LFLAGS += /MACHINE:ARM /NODEFAULTLIB:kernel32.lib
|
|
||||||
|
|
||||||
QMAKE_LIBS += WindowsPhoneCore.lib PhoneAppModelHost.lib
|
|
||||||
|
|
||||||
VCPROJ_ARCH = ARM
|
|
||||||
MSVC_VER = 12.0
|
|
||||||
WINSDK_VER = 8.1
|
|
||||||
WINTARGET_VER = WP81
|
|
||||||
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/8.1_wp/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,24 +0,0 @@
|
|||||||
#
|
|
||||||
# qmake configuration for winphone-x86-msvc2013
|
|
||||||
#
|
|
||||||
# Written for Microsoft Visual C++ 2013
|
|
||||||
#
|
|
||||||
|
|
||||||
include(../common/winrt_winphone/qmake.conf)
|
|
||||||
QMAKE_COMPILER_DEFINES += _MSC_VER=1800
|
|
||||||
QMAKE_PLATFORM = winphone $$QMAKE_PLATFORM
|
|
||||||
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP X86 __X86__ __x86__
|
|
||||||
CONFIG += no_generated_target_info
|
|
||||||
|
|
||||||
QMAKE_CFLAGS += -FS
|
|
||||||
QMAKE_CXXFLAGS += -FS
|
|
||||||
QMAKE_LFLAGS += /MACHINE:X86 /NODEFAULTLIB:kernel32.lib
|
|
||||||
|
|
||||||
QMAKE_LIBS += WindowsPhoneCore.lib PhoneAppModelHost.lib
|
|
||||||
|
|
||||||
VCPROJ_ARCH = Win32
|
|
||||||
MSVC_VER = 12.0
|
|
||||||
WINSDK_VER = 8.1
|
|
||||||
WINTARGET_VER = WP81
|
|
||||||
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/8.1_wp/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,22 +0,0 @@
|
|||||||
#
|
|
||||||
# qmake configuration for winrt-arm-msvc2013
|
|
||||||
#
|
|
||||||
# Written for Microsoft Visual C++ 2013
|
|
||||||
#
|
|
||||||
|
|
||||||
include(../common/winrt_winphone/qmake.conf)
|
|
||||||
QMAKE_COMPILER_DEFINES += _MSC_VER=1800
|
|
||||||
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP ARM __ARM__ __arm__
|
|
||||||
|
|
||||||
QMAKE_CFLAGS += -FS
|
|
||||||
QMAKE_CXXFLAGS += -FS
|
|
||||||
QMAKE_LFLAGS += /MACHINE:ARM
|
|
||||||
|
|
||||||
QMAKE_LIBS += windowscodecs.lib kernel32.lib ole32.lib
|
|
||||||
|
|
||||||
VCPROJ_ARCH = ARM
|
|
||||||
MSVC_VER = 12.0
|
|
||||||
WINSDK_VER = 8.1
|
|
||||||
WINTARGET_VER = winv6.3
|
|
||||||
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/8.1/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,22 +0,0 @@
|
|||||||
#
|
|
||||||
# qmake configuration for winrt-x64-msvc2013
|
|
||||||
#
|
|
||||||
# Written for Microsoft Visual C++ 2013
|
|
||||||
#
|
|
||||||
|
|
||||||
include(../common/winrt_winphone/qmake.conf)
|
|
||||||
QMAKE_COMPILER_DEFINES += _MSC_VER=1800
|
|
||||||
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_APP X64 __X64__ __x64__
|
|
||||||
|
|
||||||
QMAKE_CFLAGS += -FS
|
|
||||||
QMAKE_CXXFLAGS += -FS
|
|
||||||
QMAKE_LFLAGS += /MACHINE:X64
|
|
||||||
|
|
||||||
QMAKE_LIBS += windowscodecs.lib kernel32.lib ole32.lib
|
|
||||||
|
|
||||||
VCPROJ_ARCH = x64
|
|
||||||
MSVC_VER = 12.0
|
|
||||||
WINSDK_VER = 8.1
|
|
||||||
WINTARGET_VER = winv6.3
|
|
||||||
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/8.1/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,22 +0,0 @@
|
|||||||
#
|
|
||||||
# qmake configuration for winrt-x86-msvc2013
|
|
||||||
#
|
|
||||||
# Written for Microsoft Visual C++ 2013
|
|
||||||
#
|
|
||||||
|
|
||||||
include(../common/winrt_winphone/qmake.conf)
|
|
||||||
QMAKE_COMPILER_DEFINES += _MSC_VER=1800 _WIN32
|
|
||||||
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP X86 __X86__ __x86__
|
|
||||||
|
|
||||||
QMAKE_CFLAGS += -FS
|
|
||||||
QMAKE_CXXFLAGS += -FS
|
|
||||||
QMAKE_LFLAGS += /SAFESEH /MACHINE:X86
|
|
||||||
|
|
||||||
QMAKE_LIBS += windowscodecs.lib kernel32.lib ole32.lib
|
|
||||||
|
|
||||||
VCPROJ_ARCH = Win32
|
|
||||||
MSVC_VER = 12.0
|
|
||||||
WINSDK_VER = 8.1
|
|
||||||
WINTARGET_VER = winv6.3
|
|
||||||
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/8.1/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"
|
|
@ -615,7 +615,6 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
|
|||||||
<< attrTag("Label", "ProjectConfigurations");
|
<< attrTag("Label", "ProjectConfigurations");
|
||||||
|
|
||||||
bool isWinRT = false;
|
bool isWinRT = false;
|
||||||
bool isWinPhone = false;
|
|
||||||
for (int i = 0; i < tool.SingleProjects.count(); ++i) {
|
for (int i = 0; i < tool.SingleProjects.count(); ++i) {
|
||||||
xml << tag("ProjectConfiguration")
|
xml << tag("ProjectConfiguration")
|
||||||
<< attrTag("Include" , tool.SingleProjects.at(i).Configuration.Name)
|
<< attrTag("Include" , tool.SingleProjects.at(i).Configuration.Name)
|
||||||
@ -623,7 +622,6 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
|
|||||||
<< tagValue("Platform", tool.SingleProjects.at(i).PlatformName)
|
<< tagValue("Platform", tool.SingleProjects.at(i).PlatformName)
|
||||||
<< closetag();
|
<< closetag();
|
||||||
isWinRT = isWinRT || tool.SingleProjects.at(i).Configuration.WinRT;
|
isWinRT = isWinRT || tool.SingleProjects.at(i).Configuration.WinRT;
|
||||||
isWinPhone = isWinPhone || tool.SingleProjects.at(i).Configuration.WinPhone;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
xml << closetag()
|
xml << closetag()
|
||||||
@ -637,7 +635,7 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
|
|||||||
xml << tagValue("MinimumVisualStudioVersion", tool.Version)
|
xml << tagValue("MinimumVisualStudioVersion", tool.Version)
|
||||||
<< tagValue("DefaultLanguage", "en")
|
<< tagValue("DefaultLanguage", "en")
|
||||||
<< tagValue("AppContainerApplication", "true")
|
<< tagValue("AppContainerApplication", "true")
|
||||||
<< tagValue("ApplicationType", isWinPhone ? "Windows Phone" : "Windows Store")
|
<< tagValue("ApplicationType", "Windows Store")
|
||||||
<< tagValue("ApplicationTypeRevision", tool.SdkVersion);
|
<< tagValue("ApplicationTypeRevision", tool.SdkVersion);
|
||||||
if (tool.SdkVersion == "10.0") {
|
if (tool.SdkVersion == "10.0") {
|
||||||
const QString ucrtVersion = qgetenv("UCRTVERSION");
|
const QString ucrtVersion = qgetenv("UCRTVERSION");
|
||||||
|
@ -105,7 +105,6 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool isPhone = project->isActiveConfig(QStringLiteral("winphone"));
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
QString regKey = QStringLiteral("Software\\Microsoft\\VisualStudio\\") + msvcVer + ("\\Setup\\VC\\ProductDir");
|
QString regKey = QStringLiteral("Software\\Microsoft\\VisualStudio\\") + msvcVer + ("\\Setup\\VC\\ProductDir");
|
||||||
const QString vcInstallDir = qt_readRegistryKey(HKEY_LOCAL_MACHINE, regKey, KEY_WOW64_32KEY);
|
const QString vcInstallDir = qt_readRegistryKey(HKEY_LOCAL_MACHINE, regKey, KEY_WOW64_32KEY);
|
||||||
@ -114,12 +113,7 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString windowsPath;
|
const QString windowsPath = "Software\\Microsoft\\Microsoft SDKs\\Windows\\v";
|
||||||
if (isPhone) {
|
|
||||||
windowsPath = "Software\\Microsoft\\Microsoft SDKs\\WindowsPhoneApp\\v";
|
|
||||||
} else {
|
|
||||||
windowsPath = "Software\\Microsoft\\Microsoft SDKs\\Windows\\v";
|
|
||||||
}
|
|
||||||
|
|
||||||
regKey = windowsPath + winsdkVer + QStringLiteral("\\InstallationFolder");
|
regKey = windowsPath + winsdkVer + QStringLiteral("\\InstallationFolder");
|
||||||
const QString kitDir = qt_readRegistryKey(HKEY_LOCAL_MACHINE, regKey, KEY_WOW64_32KEY);
|
const QString kitDir = qt_readRegistryKey(HKEY_LOCAL_MACHINE, regKey, KEY_WOW64_32KEY);
|
||||||
@ -166,23 +160,6 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t)
|
|||||||
|
|
||||||
libDirs << crtLib + QStringLiteral("/ucrt/") + arch;
|
libDirs << crtLib + QStringLiteral("/ucrt/") + arch;
|
||||||
libDirs << crtLib + QStringLiteral("/um/") + arch;
|
libDirs << crtLib + QStringLiteral("/um/") + arch;
|
||||||
} else if (isPhone) {
|
|
||||||
QString sdkDir = vcInstallDir;
|
|
||||||
if (!QDir(sdkDir).exists()) {
|
|
||||||
fprintf(stderr, "Failed to find the Windows Phone SDK in %s.\n"
|
|
||||||
"Check that it is properly installed.\n",
|
|
||||||
qPrintable(QDir::toNativeSeparators(sdkDir)));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
incDirs << sdkDir + QStringLiteral("/include");
|
|
||||||
libDirs << sdkDir + QStringLiteral("/lib/store/") + compilerArch
|
|
||||||
<< sdkDir + QStringLiteral("/lib/") + compilerArch;
|
|
||||||
binDirs << sdkDir + QStringLiteral("/bin/") + compiler;
|
|
||||||
libDirs << kitDir + QStringLiteral("/lib/") + arch;
|
|
||||||
incDirs << kitDir + QStringLiteral("/include")
|
|
||||||
<< kitDir + QStringLiteral("/include/abi")
|
|
||||||
<< kitDir + QStringLiteral("/include/mincore")
|
|
||||||
<< kitDir + QStringLiteral("/include/minwin");
|
|
||||||
} else {
|
} else {
|
||||||
incDirs << vcInstallDir + QStringLiteral("/include");
|
incDirs << vcInstallDir + QStringLiteral("/include");
|
||||||
libDirs << vcInstallDir + QStringLiteral("/lib/store/") + compilerArch
|
libDirs << vcInstallDir + QStringLiteral("/lib/store/") + compilerArch
|
||||||
|
@ -2165,7 +2165,6 @@ VCPreLinkEventTool::VCPreLinkEventTool()
|
|||||||
|
|
||||||
VCConfiguration::VCConfiguration()
|
VCConfiguration::VCConfiguration()
|
||||||
: WinRT(false),
|
: WinRT(false),
|
||||||
WinPhone(false),
|
|
||||||
ATLMinimizesCRunTimeLibraryUsage(unset),
|
ATLMinimizesCRunTimeLibraryUsage(unset),
|
||||||
BuildBrowserInformation(unset),
|
BuildBrowserInformation(unset),
|
||||||
CharacterSet(charSetNotSet),
|
CharacterSet(charSetNotSet),
|
||||||
|
@ -870,7 +870,7 @@ public:
|
|||||||
|
|
||||||
bool suppressUnknownOptionWarnings;
|
bool suppressUnknownOptionWarnings;
|
||||||
DotNET CompilerVersion;
|
DotNET CompilerVersion;
|
||||||
bool WinRT, WinPhone;
|
bool WinRT;
|
||||||
|
|
||||||
// Variables
|
// Variables
|
||||||
triState ATLMinimizesCRunTimeLibraryUsage;
|
triState ATLMinimizesCRunTimeLibraryUsage;
|
||||||
|
@ -291,20 +291,16 @@ QString VcprojGenerator::retrievePlatformToolSet() const
|
|||||||
if (!envVar.isEmpty())
|
if (!envVar.isEmpty())
|
||||||
return envVar;
|
return envVar;
|
||||||
|
|
||||||
QString suffix;
|
|
||||||
if (project->isActiveConfig("winphone"))
|
|
||||||
suffix = '_' + project->first("WINTARGET_VER").toQString().toLower();
|
|
||||||
|
|
||||||
switch (vcProject.Configuration.CompilerVersion)
|
switch (vcProject.Configuration.CompilerVersion)
|
||||||
{
|
{
|
||||||
case NET2012:
|
case NET2012:
|
||||||
return QStringLiteral("v110") + suffix;
|
return QStringLiteral("v110");
|
||||||
case NET2013:
|
case NET2013:
|
||||||
return QStringLiteral("v120") + suffix;
|
return QStringLiteral("v120");
|
||||||
case NET2015:
|
case NET2015:
|
||||||
return QStringLiteral("v140") + suffix;
|
return QStringLiteral("v140");
|
||||||
case NET2017:
|
case NET2017:
|
||||||
return QStringLiteral("v141") + suffix;
|
return QStringLiteral("v141");
|
||||||
default:
|
default:
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
@ -921,7 +917,6 @@ void VcprojGenerator::initConfiguration()
|
|||||||
if (conf.CompilerVersion >= NET2012) {
|
if (conf.CompilerVersion >= NET2012) {
|
||||||
conf.WinRT = project->isActiveConfig("winrt");
|
conf.WinRT = project->isActiveConfig("winrt");
|
||||||
if (conf.WinRT) {
|
if (conf.WinRT) {
|
||||||
conf.WinPhone = project->isActiveConfig("winphone");
|
|
||||||
// Saner defaults
|
// Saner defaults
|
||||||
conf.compiler.UsePrecompiledHeader = pchNone;
|
conf.compiler.UsePrecompiledHeader = pchNone;
|
||||||
conf.compiler.CompileAsWinRT = _False;
|
conf.compiler.CompileAsWinRT = _False;
|
||||||
@ -1322,18 +1317,9 @@ void VcprojGenerator::initWinDeployQtTool()
|
|||||||
// structure (for instance for plugins). However, the MDILXapCompile call
|
// structure (for instance for plugins). However, the MDILXapCompile call
|
||||||
// itself contains the original subdirectories as parameters and hence the
|
// itself contains the original subdirectories as parameters and hence the
|
||||||
// call fails.
|
// call fails.
|
||||||
// Neither there is a way to disable this behavior for Windows Phone, nor
|
// Hence the only way to get a build done is to recreate the directory
|
||||||
// to influence the parameters. Hence the only way to get a build
|
// structure manually by invoking windeployqt a second time, so that
|
||||||
// done is to recreate the directory structure manually by invoking
|
// the MDILXapCompile call succeeds and deployment continues.
|
||||||
// windeployqt a second time, so that the MDILXapCompile call succeeds and
|
|
||||||
// deployment continues.
|
|
||||||
if (conf.WinPhone) {
|
|
||||||
conf.windeployqt.CommandLine = commandLine
|
|
||||||
+ QStringLiteral(" -list relative -dir \"$(MSBuildProjectDirectory)\\")
|
|
||||||
+ var("OBJECTS_DIR")
|
|
||||||
+ QStringLiteral("MSIL\" \"$(OutDir)\\$(TargetName).exe\" ")
|
|
||||||
+ QLatin1String(" && ");
|
|
||||||
}
|
|
||||||
conf.windeployqt.CommandLine += commandLine
|
conf.windeployqt.CommandLine += commandLine
|
||||||
+ QStringLiteral(" -list relative -dir \"$(MSBuildProjectDirectory)\" \"$(OutDir)\\$(TargetName).exe\" > ")
|
+ QStringLiteral(" -list relative -dir \"$(MSBuildProjectDirectory)\" \"$(OutDir)\\$(TargetName).exe\" > ")
|
||||||
+ MakefileGenerator::shellQuote(conf.windeployqt.Record);
|
+ MakefileGenerator::shellQuote(conf.windeployqt.Record);
|
||||||
|
1
src/3rdparty/sqlite.pri
vendored
1
src/3rdparty/sqlite.pri
vendored
@ -3,7 +3,6 @@ DEFINES += SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE SQLITE_ENABLE_FTS3 SQ
|
|||||||
!contains(CONFIG, largefile):DEFINES += SQLITE_DISABLE_LFS
|
!contains(CONFIG, largefile):DEFINES += SQLITE_DISABLE_LFS
|
||||||
qtConfig(posix_fallocate): DEFINES += HAVE_POSIX_FALLOCATE=1
|
qtConfig(posix_fallocate): DEFINES += HAVE_POSIX_FALLOCATE=1
|
||||||
winrt: DEFINES += SQLITE_OS_WINRT
|
winrt: DEFINES += SQLITE_OS_WINRT
|
||||||
winphone: DEFINES += SQLITE_WIN32_FILEMAPPING_API=1
|
|
||||||
qnx: DEFINES += _QNX_SOURCE
|
qnx: DEFINES += _QNX_SOURCE
|
||||||
integrity: QMAKE_CFLAGS += -include qplatformdefs.h
|
integrity: QMAKE_CFLAGS += -include qplatformdefs.h
|
||||||
INCLUDEPATH += $$PWD/sqlite
|
INCLUDEPATH += $$PWD/sqlite
|
||||||
|
@ -1338,13 +1338,6 @@ bool qSharedBuild() Q_DECL_NOTHROW
|
|||||||
and Windows Phone 8.
|
and Windows Phone 8.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
|
||||||
\macro Q_OS_WINPHONE
|
|
||||||
\relates <QtGlobal>
|
|
||||||
|
|
||||||
Defined on Windows Phone 8.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\macro Q_OS_CYGWIN
|
\macro Q_OS_CYGWIN
|
||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
@ -2622,8 +2615,8 @@ QString QSysInfo::kernelVersion()
|
|||||||
\b{FreeBSD note}: this function returns "debian" for Debian/kFreeBSD and
|
\b{FreeBSD note}: this function returns "debian" for Debian/kFreeBSD and
|
||||||
"unknown" otherwise.
|
"unknown" otherwise.
|
||||||
|
|
||||||
\b{Windows note}: this function returns "winphone" for builds for Windows
|
\b{Windows note}: this function "winrt" for WinRT builds, and "windows"
|
||||||
Phone, "winrt" for WinRT builds, and "windows" for normal desktop builds.
|
for normal desktop builds.
|
||||||
|
|
||||||
For other Unix-type systems, this function usually returns "unknown".
|
For other Unix-type systems, this function usually returns "unknown".
|
||||||
|
|
||||||
@ -2632,9 +2625,7 @@ QString QSysInfo::kernelVersion()
|
|||||||
QString QSysInfo::productType()
|
QString QSysInfo::productType()
|
||||||
{
|
{
|
||||||
// similar, but not identical to QFileSelectorPrivate::platformSelectors
|
// similar, but not identical to QFileSelectorPrivate::platformSelectors
|
||||||
#if defined(Q_OS_WINPHONE)
|
#if defined(Q_OS_WINRT)
|
||||||
return QStringLiteral("winphone");
|
|
||||||
#elif defined(Q_OS_WINRT)
|
|
||||||
return QStringLiteral("winrt");
|
return QStringLiteral("winrt");
|
||||||
#elif defined(Q_OS_WIN)
|
#elif defined(Q_OS_WIN)
|
||||||
return QStringLiteral("windows");
|
return QStringLiteral("windows");
|
||||||
@ -2746,9 +2737,7 @@ QString QSysInfo::productVersion()
|
|||||||
*/
|
*/
|
||||||
QString QSysInfo::prettyProductName()
|
QString QSysInfo::prettyProductName()
|
||||||
{
|
{
|
||||||
#if defined(Q_OS_WINPHONE)
|
#if defined(Q_OS_ANDROID) || defined(Q_OS_DARWIN) || defined(Q_OS_WIN)
|
||||||
return QLatin1String("Windows Phone ") + QLatin1String(osVer_helper());
|
|
||||||
#elif defined(Q_OS_ANDROID) || defined(Q_OS_DARWIN) || defined(Q_OS_WIN)
|
|
||||||
const auto version = QOperatingSystemVersion::current();
|
const auto version = QOperatingSystemVersion::current();
|
||||||
const char *name = osVer_helper(version);
|
const char *name = osVer_helper(version);
|
||||||
if (name)
|
if (name)
|
||||||
|
@ -134,7 +134,6 @@
|
|||||||
# define WINAPI_FAMILY_PC_APP WINAPI_FAMILY_APP
|
# define WINAPI_FAMILY_PC_APP WINAPI_FAMILY_APP
|
||||||
# endif
|
# endif
|
||||||
# if defined(WINAPI_FAMILY_PHONE_APP) && WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP
|
# if defined(WINAPI_FAMILY_PHONE_APP) && WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP
|
||||||
# define Q_OS_WINPHONE
|
|
||||||
# define Q_OS_WINRT
|
# define Q_OS_WINRT
|
||||||
# elif WINAPI_FAMILY==WINAPI_FAMILY_PC_APP
|
# elif WINAPI_FAMILY==WINAPI_FAMILY_PC_APP
|
||||||
# define Q_OS_WINRT
|
# define Q_OS_WINRT
|
||||||
|
@ -368,14 +368,10 @@ QStringList QFileSelectorPrivate::platformSelectors()
|
|||||||
// similar, but not identical to QSysInfo::osType
|
// similar, but not identical to QSysInfo::osType
|
||||||
QStringList ret;
|
QStringList ret;
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
// can't fall back to QSysInfo because we need both "winphone" and "winrt" for the Windows Phone case
|
|
||||||
ret << QStringLiteral("windows");
|
ret << QStringLiteral("windows");
|
||||||
ret << QSysInfo::kernelType(); // "winnt"
|
ret << QSysInfo::kernelType(); // "winnt"
|
||||||
# if defined(Q_OS_WINRT)
|
# if defined(Q_OS_WINRT)
|
||||||
ret << QStringLiteral("winrt");
|
ret << QStringLiteral("winrt");
|
||||||
# if defined(Q_OS_WINPHONE)
|
|
||||||
ret << QStringLiteral("winphone");
|
|
||||||
# endif
|
|
||||||
# endif
|
# endif
|
||||||
#elif defined(Q_OS_UNIX)
|
#elif defined(Q_OS_UNIX)
|
||||||
ret << QStringLiteral("unix");
|
ret << QStringLiteral("unix");
|
||||||
|
@ -81,11 +81,6 @@ using namespace Microsoft::WRL::Wrappers;
|
|||||||
using namespace ABI::Windows::Foundation;
|
using namespace ABI::Windows::Foundation;
|
||||||
using namespace ABI::Windows::Storage;
|
using namespace ABI::Windows::Storage;
|
||||||
using namespace ABI::Windows::ApplicationModel;
|
using namespace ABI::Windows::ApplicationModel;
|
||||||
|
|
||||||
#if _MSC_VER < 1900
|
|
||||||
#define Q_OS_WINRT_WIN81
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // Q_OS_WINRT
|
#endif // Q_OS_WINRT
|
||||||
|
|
||||||
#ifndef SPI_GETPLATFORMTYPE
|
#ifndef SPI_GETPLATFORMTYPE
|
||||||
@ -157,7 +152,6 @@ QT_BEGIN_NAMESPACE
|
|||||||
Q_CORE_EXPORT int qt_ntfs_permission_lookup = 0;
|
Q_CORE_EXPORT int qt_ntfs_permission_lookup = 0;
|
||||||
|
|
||||||
#if defined(Q_OS_WINRT)
|
#if defined(Q_OS_WINRT)
|
||||||
static QString qfsPrivateCurrentDir = QLatin1String("");
|
|
||||||
// As none of the functions we try to resolve do exist on WinRT
|
// As none of the functions we try to resolve do exist on WinRT
|
||||||
// we use QT_NO_LIBRARY to shorten everything up a little bit.
|
// we use QT_NO_LIBRARY to shorten everything up a little bit.
|
||||||
# ifndef QT_NO_LIBRARY
|
# ifndef QT_NO_LIBRARY
|
||||||
@ -503,7 +497,6 @@ QString QFileSystemEngine::nativeAbsoluteFilePath(const QString &path)
|
|||||||
{
|
{
|
||||||
// can be //server or //server/share
|
// can be //server or //server/share
|
||||||
QString absPath;
|
QString absPath;
|
||||||
#if !defined(Q_OS_WINRT_WIN81)
|
|
||||||
QVarLengthArray<wchar_t, MAX_PATH> buf(qMax(MAX_PATH, path.size() + 1));
|
QVarLengthArray<wchar_t, MAX_PATH> buf(qMax(MAX_PATH, path.size() + 1));
|
||||||
wchar_t *fileName = 0;
|
wchar_t *fileName = 0;
|
||||||
DWORD retLen = GetFullPathName((wchar_t*)path.utf16(), buf.size(), buf.data(), &fileName);
|
DWORD retLen = GetFullPathName((wchar_t*)path.utf16(), buf.size(), buf.data(), &fileName);
|
||||||
@ -523,12 +516,7 @@ QString QFileSystemEngine::nativeAbsoluteFilePath(const QString &path)
|
|||||||
if (absPath.size() < rootPath.size() && rootPath.startsWith(absPath))
|
if (absPath.size() < rootPath.size() && rootPath.startsWith(absPath))
|
||||||
absPath = rootPath;
|
absPath = rootPath;
|
||||||
# endif // Q_OS_WINRT
|
# endif // Q_OS_WINRT
|
||||||
#else // !Q_OS_WINRT_WIN81
|
|
||||||
if (QDir::isRelativePath(path))
|
|
||||||
absPath = QDir::toNativeSeparators(QDir::cleanPath(QDir::currentPath() + QLatin1Char('/') + path));
|
|
||||||
else
|
|
||||||
absPath = QDir::toNativeSeparators(QDir::cleanPath(path));
|
|
||||||
#endif // Q_OS_WINRT_WIN81
|
|
||||||
// This is really ugly, but GetFullPathName strips off whitespace at the end.
|
// This is really ugly, but GetFullPathName strips off whitespace at the end.
|
||||||
// If you for instance write ". " in the lineedit of QFileDialog,
|
// If you for instance write ". " in the lineedit of QFileDialog,
|
||||||
// (which is an invalid filename) this function will strip the space off and viola,
|
// (which is an invalid filename) this function will strip the space off and viola,
|
||||||
@ -550,14 +538,7 @@ QFileSystemEntry QFileSystemEngine::absoluteName(const QFileSystemEntry &entry)
|
|||||||
else
|
else
|
||||||
ret = QDir::fromNativeSeparators(nativeAbsoluteFilePath(entry.filePath()));
|
ret = QDir::fromNativeSeparators(nativeAbsoluteFilePath(entry.filePath()));
|
||||||
} else {
|
} else {
|
||||||
#ifndef Q_OS_WINRT_WIN81
|
|
||||||
ret = QDir::cleanPath(QDir::currentPath() + QLatin1Char('/') + entry.filePath());
|
ret = QDir::cleanPath(QDir::currentPath() + QLatin1Char('/') + entry.filePath());
|
||||||
#else
|
|
||||||
// Some WinRT APIs do not support absolute paths (due to sandboxing).
|
|
||||||
// Thus the port uses the executable's directory as its root directory
|
|
||||||
// and treats paths relative to that as absolute paths.
|
|
||||||
ret = QDir::cleanPath(QDir::current().relativeFilePath(entry.filePath()));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef Q_OS_WINRT
|
#ifndef Q_OS_WINRT
|
||||||
@ -1218,9 +1199,6 @@ QString QFileSystemEngine::tempPath()
|
|||||||
ret = QDir::fromNativeSeparators(ret);
|
ret = QDir::fromNativeSeparators(ret);
|
||||||
}
|
}
|
||||||
#else // !Q_OS_WINRT
|
#else // !Q_OS_WINRT
|
||||||
// According to http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.applicationdata.temporaryfolder.aspx
|
|
||||||
// the API is not available on winphone which should cause one of the functions
|
|
||||||
// below to fail
|
|
||||||
ComPtr<IApplicationDataStatics> applicationDataStatics;
|
ComPtr<IApplicationDataStatics> applicationDataStatics;
|
||||||
if (FAILED(GetActivationFactory(HString::MakeReference(RuntimeClass_Windows_Storage_ApplicationData).Get(), &applicationDataStatics)))
|
if (FAILED(GetActivationFactory(HString::MakeReference(RuntimeClass_Windows_Storage_ApplicationData).Get(), &applicationDataStatics)))
|
||||||
return ret;
|
return ret;
|
||||||
@ -1252,20 +1230,14 @@ bool QFileSystemEngine::setCurrentPath(const QFileSystemEntry &entry)
|
|||||||
if(!(meta.exists() && meta.isDirectory()))
|
if(!(meta.exists() && meta.isDirectory()))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
#if !defined(Q_OS_WINRT_WIN81)
|
|
||||||
//TODO: this should really be using nativeFilePath(), but that returns a path in long format \\?\c:\foo
|
//TODO: this should really be using nativeFilePath(), but that returns a path in long format \\?\c:\foo
|
||||||
//which causes many problems later on when it's returned through currentPath()
|
//which causes many problems later on when it's returned through currentPath()
|
||||||
return ::SetCurrentDirectory(reinterpret_cast<const wchar_t*>(QDir::toNativeSeparators(entry.filePath()).utf16())) != 0;
|
return ::SetCurrentDirectory(reinterpret_cast<const wchar_t*>(QDir::toNativeSeparators(entry.filePath()).utf16())) != 0;
|
||||||
#else
|
|
||||||
qfsPrivateCurrentDir = entry.filePath();
|
|
||||||
return true;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QFileSystemEntry QFileSystemEngine::currentPath()
|
QFileSystemEntry QFileSystemEngine::currentPath()
|
||||||
{
|
{
|
||||||
QString ret;
|
QString ret;
|
||||||
#if !defined(Q_OS_WINRT_WIN81)
|
|
||||||
DWORD size = 0;
|
DWORD size = 0;
|
||||||
wchar_t currentName[PATH_MAX];
|
wchar_t currentName[PATH_MAX];
|
||||||
size = ::GetCurrentDirectory(PATH_MAX, currentName);
|
size = ::GetCurrentDirectory(PATH_MAX, currentName);
|
||||||
@ -1281,13 +1253,6 @@ QFileSystemEntry QFileSystemEngine::currentPath()
|
|||||||
}
|
}
|
||||||
if (ret.length() >= 2 && ret[1] == QLatin1Char(':'))
|
if (ret.length() >= 2 && ret[1] == QLatin1Char(':'))
|
||||||
ret[0] = ret.at(0).toUpper(); // Force uppercase drive letters.
|
ret[0] = ret.at(0).toUpper(); // Force uppercase drive letters.
|
||||||
#else // !Q_OS_WINRT_WIN81
|
|
||||||
//TODO - a race condition exists when using currentPath / setCurrentPath from multiple threads
|
|
||||||
if (qfsPrivateCurrentDir.isEmpty())
|
|
||||||
qfsPrivateCurrentDir = QDir::rootPath();
|
|
||||||
|
|
||||||
ret = qfsPrivateCurrentDir;
|
|
||||||
#endif // Q_OS_WINRT_WIN81
|
|
||||||
return QFileSystemEntry(ret, QFileSystemEntry::FromNativePath());
|
return QFileSystemEntry(ret, QFileSystemEntry::FromNativePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,9 +175,7 @@ void QFileSystemEntry::resolveNativeFilePath() const
|
|||||||
// WinRT/MSVC2015 allows a maximum of 256 characters for a filepath
|
// WinRT/MSVC2015 allows a maximum of 256 characters for a filepath
|
||||||
// unless //?/ is prepended which extends the rule to have a maximum
|
// unless //?/ is prepended which extends the rule to have a maximum
|
||||||
// of 256 characters in the filename plus the preprending path
|
// of 256 characters in the filename plus the preprending path
|
||||||
#if _MSC_VER >= 1900
|
|
||||||
m_nativeFilePath.prepend("\\\\?\\");
|
m_nativeFilePath.prepend("\\\\?\\");
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,10 +69,6 @@ QFileSystemIterator::QFileSystemIterator(const QFileSystemEntry &entry, QDir::Fi
|
|||||||
nativePath.append(QLatin1Char('\\'));
|
nativePath.append(QLatin1Char('\\'));
|
||||||
nativePath.append(QLatin1Char('*'));
|
nativePath.append(QLatin1Char('*'));
|
||||||
// In MSVC2015+ case we prepend //?/ for longer file-name support
|
// In MSVC2015+ case we prepend //?/ for longer file-name support
|
||||||
#if defined(Q_OS_WINRT) && _MSC_VER < 1900
|
|
||||||
if (nativePath.startsWith(QLatin1Char('\\')))
|
|
||||||
nativePath.remove(0, 1);
|
|
||||||
#endif
|
|
||||||
if (!dirPath.endsWith(QLatin1Char('/')))
|
if (!dirPath.endsWith(QLatin1Char('/')))
|
||||||
dirPath.append(QLatin1Char('/'));
|
dirPath.append(QLatin1Char('/'));
|
||||||
if ((filters & (QDir::Dirs|QDir::Drives)) && (!(filters & (QDir::Files))))
|
if ((filters & (QDir::Dirs|QDir::Drives)) && (!(filters & (QDir::Files))))
|
||||||
|
@ -850,7 +850,6 @@ QDateTime QFSFileEngine::fileTime(FileTime time) const
|
|||||||
uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size,
|
uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size,
|
||||||
QFile::MemoryMapFlags flags)
|
QFile::MemoryMapFlags flags)
|
||||||
{
|
{
|
||||||
#ifndef Q_OS_WINPHONE
|
|
||||||
Q_Q(QFSFileEngine);
|
Q_Q(QFSFileEngine);
|
||||||
Q_UNUSED(flags);
|
Q_UNUSED(flags);
|
||||||
if (openMode == QFile::NotOpen) {
|
if (openMode == QFile::NotOpen) {
|
||||||
@ -960,18 +959,11 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size,
|
|||||||
|
|
||||||
::CloseHandle(mapHandle);
|
::CloseHandle(mapHandle);
|
||||||
mapHandle = NULL;
|
mapHandle = NULL;
|
||||||
#else // !Q_OS_WINPHONE
|
|
||||||
Q_UNUSED(offset);
|
|
||||||
Q_UNUSED(size);
|
|
||||||
Q_UNUSED(flags);
|
|
||||||
Q_UNIMPLEMENTED();
|
|
||||||
#endif // Q_OS_WINPHONE
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QFSFileEnginePrivate::unmap(uchar *ptr)
|
bool QFSFileEnginePrivate::unmap(uchar *ptr)
|
||||||
{
|
{
|
||||||
#ifndef Q_OS_WINPHONE
|
|
||||||
Q_Q(QFSFileEngine);
|
Q_Q(QFSFileEngine);
|
||||||
if (!maps.contains(ptr)) {
|
if (!maps.contains(ptr)) {
|
||||||
q->setError(QFile::PermissionsError, qt_error_string(ERROR_ACCESS_DENIED));
|
q->setError(QFile::PermissionsError, qt_error_string(ERROR_ACCESS_DENIED));
|
||||||
@ -990,11 +982,6 @@ bool QFSFileEnginePrivate::unmap(uchar *ptr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
#else // !Q_OS_WINPHONE
|
|
||||||
Q_UNUSED(ptr);
|
|
||||||
Q_UNIMPLEMENTED();
|
|
||||||
return false;
|
|
||||||
#endif // Q_OS_WINPHONE
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -65,23 +65,6 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
int appCmdShow = 0;
|
int appCmdShow = 0;
|
||||||
|
|
||||||
// GetModuleFileName only exists for MSVC2015 and upwards for WinRT, meaning
|
|
||||||
// Windows 10 (Mobile). Hence take the first argument passed to the
|
|
||||||
// QCoreApplication contructor for older versions as a fallback on older platforms.
|
|
||||||
#if defined(Q_OS_WINRT) && _MSC_VER < 1900
|
|
||||||
|
|
||||||
Q_CORE_EXPORT QString qAppFileName()
|
|
||||||
{
|
|
||||||
return QFileInfo(QCoreApplication::arguments().constFirst()).filePath();
|
|
||||||
}
|
|
||||||
|
|
||||||
QString QCoreApplicationPrivate::appName() const
|
|
||||||
{
|
|
||||||
return QFileInfo(QCoreApplication::arguments().constFirst()).baseName();
|
|
||||||
}
|
|
||||||
|
|
||||||
#else // !(defined(Q_OS_WINRT) && _MSC_VER < 1900)
|
|
||||||
|
|
||||||
Q_CORE_EXPORT QString qAppFileName() // get application file name
|
Q_CORE_EXPORT QString qAppFileName() // get application file name
|
||||||
{
|
{
|
||||||
// We do MAX_PATH + 2 here, and request with MAX_PATH + 1, so we can handle all paths
|
// We do MAX_PATH + 2 here, and request with MAX_PATH + 1, so we can handle all paths
|
||||||
@ -186,8 +169,6 @@ QString QCoreApplicationPrivate::appVersion() const
|
|||||||
return applicationVersion;
|
return applicationVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // !(defined(Q_OS_WINRT) && _MSC_VER < 1900)
|
|
||||||
|
|
||||||
#ifndef Q_OS_WINRT
|
#ifndef Q_OS_WINRT
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
@ -64,11 +64,6 @@ void QSharedMemoryPrivate::setErrorString(QLatin1String function)
|
|||||||
errorString = QSharedMemory::tr("%1: already exists").arg(function);
|
errorString = QSharedMemory::tr("%1: already exists").arg(function);
|
||||||
break;
|
break;
|
||||||
case ERROR_FILE_NOT_FOUND:
|
case ERROR_FILE_NOT_FOUND:
|
||||||
#if defined(Q_OS_WINRT) && _MSC_VER < 1900
|
|
||||||
// This happens on WinRT only if no file is present as CreateFileMappingW
|
|
||||||
// bails out with this error code
|
|
||||||
case ERROR_INVALID_PARAMETER:
|
|
||||||
#endif
|
|
||||||
error = QSharedMemory::NotFound;
|
error = QSharedMemory::NotFound;
|
||||||
errorString = QSharedMemory::tr("%1: doesn't exist").arg(function);
|
errorString = QSharedMemory::tr("%1: doesn't exist").arg(function);
|
||||||
break;
|
break;
|
||||||
@ -103,15 +98,8 @@ HANDLE QSharedMemoryPrivate::handle()
|
|||||||
errorString = QSharedMemory::tr("%1: unable to make key").arg(function);
|
errorString = QSharedMemory::tr("%1: unable to make key").arg(function);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#if defined(Q_OS_WINPHONE)
|
#if defined(Q_OS_WINRT)
|
||||||
Q_UNIMPLEMENTED();
|
|
||||||
hand = 0;
|
|
||||||
#elif defined(Q_OS_WINRT)
|
|
||||||
#if _MSC_VER >= 1900
|
|
||||||
hand = OpenFileMappingFromApp(FILE_MAP_ALL_ACCESS, FALSE, reinterpret_cast<PCWSTR>(nativeKey.utf16()));
|
hand = OpenFileMappingFromApp(FILE_MAP_ALL_ACCESS, FALSE, reinterpret_cast<PCWSTR>(nativeKey.utf16()));
|
||||||
#else
|
|
||||||
hand = CreateFileMappingFromApp(INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, 0, (PCWSTR)nativeKey.utf16());
|
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
hand = OpenFileMapping(FILE_MAP_ALL_ACCESS, false, (wchar_t*)nativeKey.utf16());
|
hand = OpenFileMapping(FILE_MAP_ALL_ACCESS, false, (wchar_t*)nativeKey.utf16());
|
||||||
#endif
|
#endif
|
||||||
@ -144,11 +132,7 @@ bool QSharedMemoryPrivate::create(int size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create the file mapping.
|
// Create the file mapping.
|
||||||
#if defined(Q_OS_WINPHONE)
|
#if defined(Q_OS_WINRT)
|
||||||
Q_UNIMPLEMENTED();
|
|
||||||
Q_UNUSED(size)
|
|
||||||
hand = 0;
|
|
||||||
#elif defined(Q_OS_WINRT)
|
|
||||||
hand = CreateFileMappingFromApp(INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, size, (PCWSTR)nativeKey.utf16());
|
hand = CreateFileMappingFromApp(INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, size, (PCWSTR)nativeKey.utf16());
|
||||||
#else
|
#else
|
||||||
hand = CreateFileMapping(INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, 0, size, (wchar_t*)nativeKey.utf16());
|
hand = CreateFileMapping(INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, 0, size, (wchar_t*)nativeKey.utf16());
|
||||||
@ -166,12 +150,7 @@ bool QSharedMemoryPrivate::attach(QSharedMemory::AccessMode mode)
|
|||||||
{
|
{
|
||||||
// Grab a pointer to the memory block
|
// Grab a pointer to the memory block
|
||||||
int permissions = (mode == QSharedMemory::ReadOnly ? FILE_MAP_READ : FILE_MAP_ALL_ACCESS);
|
int permissions = (mode == QSharedMemory::ReadOnly ? FILE_MAP_READ : FILE_MAP_ALL_ACCESS);
|
||||||
#if defined(Q_OS_WINPHONE)
|
#if defined(Q_OS_WINRT)
|
||||||
Q_UNIMPLEMENTED();
|
|
||||||
Q_UNUSED(mode)
|
|
||||||
Q_UNUSED(permissions)
|
|
||||||
memory = 0;
|
|
||||||
#elif defined(Q_OS_WINRT)
|
|
||||||
memory = (void *)MapViewOfFileFromApp(handle(), permissions, 0, 0);
|
memory = (void *)MapViewOfFileFromApp(handle(), permissions, 0, 0);
|
||||||
#else
|
#else
|
||||||
memory = (void *)MapViewOfFile(handle(), permissions, 0, 0, 0);
|
memory = (void *)MapViewOfFile(handle(), permissions, 0, 0, 0);
|
||||||
@ -199,15 +178,10 @@ bool QSharedMemoryPrivate::attach(QSharedMemory::AccessMode mode)
|
|||||||
bool QSharedMemoryPrivate::detach()
|
bool QSharedMemoryPrivate::detach()
|
||||||
{
|
{
|
||||||
// umap memory
|
// umap memory
|
||||||
#if defined(Q_OS_WINPHONE)
|
|
||||||
Q_UNIMPLEMENTED();
|
|
||||||
return false;
|
|
||||||
#else
|
|
||||||
if (!UnmapViewOfFile(memory)) {
|
if (!UnmapViewOfFile(memory)) {
|
||||||
setErrorString(QLatin1String("QSharedMemory::detach"));
|
setErrorString(QLatin1String("QSharedMemory::detach"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
memory = 0;
|
memory = 0;
|
||||||
size = 0;
|
size = 0;
|
||||||
|
|
||||||
|
@ -126,7 +126,6 @@ else:unix {
|
|||||||
}
|
}
|
||||||
else:win32 {
|
else:win32 {
|
||||||
SOURCES += tools/qlocale_win.cpp
|
SOURCES += tools/qlocale_win.cpp
|
||||||
winphone: LIBS_PRIVATE += -lWindowsPhoneGlobalizationUtil
|
|
||||||
winrt-*-msvc2013: LIBS += advapi32.lib
|
winrt-*-msvc2013: LIBS += advapi32.lib
|
||||||
} else:integrity {
|
} else:integrity {
|
||||||
SOURCES += tools/qlocale_unix.cpp
|
SOURCES += tools/qlocale_unix.cpp
|
||||||
|
@ -108,9 +108,6 @@
|
|||||||
#elif defined(Q_OS_WIN)
|
#elif defined(Q_OS_WIN)
|
||||||
# include <QtCore/qt_windows.h>
|
# include <QtCore/qt_windows.h>
|
||||||
# include <QtCore/QLibraryInfo>
|
# include <QtCore/QLibraryInfo>
|
||||||
# if defined(Q_OS_WINPHONE)
|
|
||||||
# include <Objbase.h>
|
|
||||||
# endif
|
|
||||||
#endif // Q_OS_WIN
|
#endif // Q_OS_WIN
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
@ -779,7 +779,6 @@ void QNativeSocketEngine::close()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if _MSC_VER >= 1900
|
|
||||||
if (d->socketType == QAbstractSocket::TcpSocket) {
|
if (d->socketType == QAbstractSocket::TcpSocket) {
|
||||||
hr = QEventDispatcherWinRT::runOnXamlThread([d]() {
|
hr = QEventDispatcherWinRT::runOnXamlThread([d]() {
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
@ -803,7 +802,6 @@ void QNativeSocketEngine::close()
|
|||||||
});
|
});
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
Q_ASSERT_SUCCEEDED(hr);
|
||||||
}
|
}
|
||||||
#endif // _MSC_VER >= 1900
|
|
||||||
|
|
||||||
if (d->socketDescriptor != -1) {
|
if (d->socketDescriptor != -1) {
|
||||||
ComPtr<IClosable> socket;
|
ComPtr<IClosable> socket;
|
||||||
|
@ -61,7 +61,6 @@ QT_BEGIN_NAMESPACE
|
|||||||
QWinRTClipboard::QWinRTClipboard()
|
QWinRTClipboard::QWinRTClipboard()
|
||||||
: m_mimeData(Q_NULLPTR)
|
: m_mimeData(Q_NULLPTR)
|
||||||
{
|
{
|
||||||
#ifndef Q_OS_WINPHONE
|
|
||||||
QEventDispatcherWinRT::runOnXamlThread([this]() {
|
QEventDispatcherWinRT::runOnXamlThread([this]() {
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
hr = GetActivationFactory(HString::MakeReference(RuntimeClass_Windows_ApplicationModel_DataTransfer_Clipboard).Get(),
|
hr = GetActivationFactory(HString::MakeReference(RuntimeClass_Windows_ApplicationModel_DataTransfer_Clipboard).Get(),
|
||||||
@ -74,7 +73,6 @@ QWinRTClipboard::QWinRTClipboard()
|
|||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
});
|
});
|
||||||
#endif // !Q_OS_WINPHONE
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QMimeData *QWinRTClipboard::mimeData(QClipboard::Mode mode)
|
QMimeData *QWinRTClipboard::mimeData(QClipboard::Mode mode)
|
||||||
@ -82,7 +80,6 @@ QMimeData *QWinRTClipboard::mimeData(QClipboard::Mode mode)
|
|||||||
if (!supportsMode(mode))
|
if (!supportsMode(mode))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
#ifndef Q_OS_WINPHONE
|
|
||||||
ComPtr<IDataPackageView> view;
|
ComPtr<IDataPackageView> view;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
hr = m_nativeClipBoard->GetContent(&view);
|
hr = m_nativeClipBoard->GetContent(&view);
|
||||||
@ -114,9 +111,6 @@ QMimeData *QWinRTClipboard::mimeData(QClipboard::Mode mode)
|
|||||||
m_mimeData->setText(text);
|
m_mimeData->setText(text);
|
||||||
|
|
||||||
return m_mimeData;
|
return m_mimeData;
|
||||||
#else // Q_OS_WINPHONE
|
|
||||||
return QPlatformClipboard::mimeData(mode);
|
|
||||||
#endif // Q_OS_WINPHONE
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Inspired by QWindowsMimeText::convertFromMime
|
// Inspired by QWindowsMimeText::convertFromMime
|
||||||
@ -153,7 +147,6 @@ void QWinRTClipboard::setMimeData(QMimeData *data, QClipboard::Mode mode)
|
|||||||
if (!supportsMode(mode))
|
if (!supportsMode(mode))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifndef Q_OS_WINPHONE
|
|
||||||
const bool newData = !m_mimeData || m_mimeData != data;
|
const bool newData = !m_mimeData || m_mimeData != data;
|
||||||
if (newData) {
|
if (newData) {
|
||||||
if (m_mimeData)
|
if (m_mimeData)
|
||||||
@ -178,18 +171,11 @@ void QWinRTClipboard::setMimeData(QMimeData *data, QClipboard::Mode mode)
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
});
|
});
|
||||||
RETURN_VOID_IF_FAILED("Could not set clipboard text.");
|
RETURN_VOID_IF_FAILED("Could not set clipboard text.");
|
||||||
#else // Q_OS_WINPHONE
|
|
||||||
QPlatformClipboard::setMimeData(data, mode);
|
|
||||||
#endif // Q_OS_WINPHONE
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QWinRTClipboard::supportsMode(QClipboard::Mode mode) const
|
bool QWinRTClipboard::supportsMode(QClipboard::Mode mode) const
|
||||||
{
|
{
|
||||||
#ifndef Q_OS_WINPHONE
|
|
||||||
return mode == QClipboard::Clipboard;
|
return mode == QClipboard::Clipboard;
|
||||||
#else
|
|
||||||
return QPlatformClipboard::supportsMode(mode);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT QWinRTClipboard::onContentChanged(IInspectable *, IInspectable *)
|
HRESULT QWinRTClipboard::onContentChanged(IInspectable *, IInspectable *)
|
||||||
|
@ -45,7 +45,6 @@
|
|||||||
|
|
||||||
#include <wrl.h>
|
#include <wrl.h>
|
||||||
|
|
||||||
#ifndef Q_OS_WINPHONE
|
|
||||||
namespace ABI {
|
namespace ABI {
|
||||||
namespace Windows {
|
namespace Windows {
|
||||||
namespace ApplicationModel {
|
namespace ApplicationModel {
|
||||||
@ -55,7 +54,6 @@ namespace ABI {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // !Q_OS_WINPHONE
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@ -70,9 +68,7 @@ public:
|
|||||||
|
|
||||||
HRESULT onContentChanged(IInspectable *, IInspectable *);
|
HRESULT onContentChanged(IInspectable *, IInspectable *);
|
||||||
private:
|
private:
|
||||||
#ifndef Q_OS_WINPHONE
|
|
||||||
Microsoft::WRL::ComPtr<ABI::Windows::ApplicationModel::DataTransfer::IClipboardStatics> m_nativeClipBoard;
|
Microsoft::WRL::ComPtr<ABI::Windows::ApplicationModel::DataTransfer::IClipboardStatics> m_nativeClipBoard;
|
||||||
#endif
|
|
||||||
QMimeData *m_mimeData;
|
QMimeData *m_mimeData;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -61,11 +61,9 @@ using namespace ABI::Windows::Foundation::Collections;
|
|||||||
using namespace ABI::Windows::Storage;
|
using namespace ABI::Windows::Storage;
|
||||||
using namespace ABI::Windows::Storage::Pickers;
|
using namespace ABI::Windows::Storage::Pickers;
|
||||||
|
|
||||||
#ifndef Q_OS_WINPHONE
|
|
||||||
typedef IAsyncOperationCompletedHandler<StorageFile *> SingleFileHandler;
|
typedef IAsyncOperationCompletedHandler<StorageFile *> SingleFileHandler;
|
||||||
typedef IAsyncOperationCompletedHandler<IVectorView<StorageFile *> *> MultipleFileHandler;
|
typedef IAsyncOperationCompletedHandler<IVectorView<StorageFile *> *> MultipleFileHandler;
|
||||||
typedef IAsyncOperationCompletedHandler<StorageFolder *> SingleFolderHandler;
|
typedef IAsyncOperationCompletedHandler<StorageFolder *> SingleFolderHandler;
|
||||||
#endif
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@ -152,16 +150,6 @@ private:
|
|||||||
QVector<HSTRING> impl;
|
QVector<HSTRING> impl;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef Q_OS_WINPHONE
|
|
||||||
class QActivationEvent : public QEvent
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
IInspectable *args() const {
|
|
||||||
return reinterpret_cast<IInspectable *>(d);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
static bool initializePicker(HSTRING runtimeId, T **picker, const QSharedPointer<QFileDialogOptions> &options)
|
static bool initializePicker(HSTRING runtimeId, T **picker, const QSharedPointer<QFileDialogOptions> &options)
|
||||||
{
|
{
|
||||||
@ -225,23 +213,6 @@ static bool pickFiles(IFileOpenPicker *picker, QWinRTFileDialogHelper *helper, b
|
|||||||
Q_ASSERT(picker);
|
Q_ASSERT(picker);
|
||||||
Q_ASSERT(helper);
|
Q_ASSERT(helper);
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
#ifdef Q_OS_WINPHONE
|
|
||||||
hr = QEventDispatcherWinRT::runOnXamlThread([picker, singleFile]() {
|
|
||||||
HRESULT hr;
|
|
||||||
ComPtr<IFileOpenPicker2> picker2;
|
|
||||||
hr = picker->QueryInterface(IID_PPV_ARGS(picker2.GetAddressOf()));
|
|
||||||
RETURN_HR_IF_FAILED("Failed to cast file picker");
|
|
||||||
if (singleFile)
|
|
||||||
return picker2->PickSingleFileAndContinue();
|
|
||||||
else
|
|
||||||
return picker2->PickMultipleFilesAndContinue();
|
|
||||||
});
|
|
||||||
RETURN_FALSE_IF_FAILED("Failed to open file picker");
|
|
||||||
QAbstractEventDispatcher *eventDispatcher = QCoreApplication::eventDispatcher();
|
|
||||||
Q_ASSERT(eventDispatcher);
|
|
||||||
eventDispatcher->installEventFilter(helper);
|
|
||||||
return true;
|
|
||||||
#else
|
|
||||||
hr = QEventDispatcherWinRT::runOnXamlThread([picker, helper, singleFile]() {
|
hr = QEventDispatcherWinRT::runOnXamlThread([picker, helper, singleFile]() {
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
if (singleFile) {
|
if (singleFile) {
|
||||||
@ -260,7 +231,6 @@ static bool pickFiles(IFileOpenPicker *picker, QWinRTFileDialogHelper *helper, b
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
});
|
});
|
||||||
return SUCCEEDED(hr);
|
return SUCCEEDED(hr);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool pickFolder(IFolderPicker *picker, QWinRTFileDialogHelper *helper)
|
static bool pickFolder(IFolderPicker *picker, QWinRTFileDialogHelper *helper)
|
||||||
@ -268,19 +238,6 @@ static bool pickFolder(IFolderPicker *picker, QWinRTFileDialogHelper *helper)
|
|||||||
Q_ASSERT(picker);
|
Q_ASSERT(picker);
|
||||||
Q_ASSERT(helper);
|
Q_ASSERT(helper);
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
#ifdef Q_OS_WINPHONE
|
|
||||||
hr = QEventDispatcherWinRT::runOnXamlThread([picker]() {
|
|
||||||
HRESULT hr;
|
|
||||||
ComPtr<IFolderPicker2> picker2;
|
|
||||||
hr = picker->QueryInterface(IID_PPV_ARGS(picker2.GetAddressOf()));
|
|
||||||
RETURN_HR_IF_FAILED("Failed to cast folder picker");
|
|
||||||
return picker2->PickFolderAndContinue();
|
|
||||||
});
|
|
||||||
RETURN_FALSE_IF_FAILED("Failed to open folder picker");
|
|
||||||
QAbstractEventDispatcher *eventDispatcher = QCoreApplication::eventDispatcher();
|
|
||||||
Q_ASSERT(eventDispatcher);
|
|
||||||
eventDispatcher->installEventFilter(helper);
|
|
||||||
#else
|
|
||||||
hr = QEventDispatcherWinRT::runOnXamlThread([picker, helper]() {
|
hr = QEventDispatcherWinRT::runOnXamlThread([picker, helper]() {
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
ComPtr<IAsyncOperation<StorageFolder *>> op;
|
ComPtr<IAsyncOperation<StorageFolder *>> op;
|
||||||
@ -290,7 +247,6 @@ static bool pickFolder(IFolderPicker *picker, QWinRTFileDialogHelper *helper)
|
|||||||
RETURN_HR_IF_FAILED("Failed to attach folder picker callback");
|
RETURN_HR_IF_FAILED("Failed to attach folder picker callback");
|
||||||
return S_OK;
|
return S_OK;
|
||||||
});
|
});
|
||||||
#endif
|
|
||||||
return SUCCEEDED(hr);
|
return SUCCEEDED(hr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -299,19 +255,6 @@ static bool pickSaveFile(IFileSavePicker *picker, QWinRTFileDialogHelper *helper
|
|||||||
Q_ASSERT(picker);
|
Q_ASSERT(picker);
|
||||||
Q_ASSERT(helper);
|
Q_ASSERT(helper);
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
#ifdef Q_OS_WINPHONE
|
|
||||||
hr = QEventDispatcherWinRT::runOnXamlThread([picker]() {
|
|
||||||
HRESULT hr;
|
|
||||||
ComPtr<IFileSavePicker2> picker2;
|
|
||||||
hr = picker->QueryInterface(IID_PPV_ARGS(picker2.GetAddressOf()));
|
|
||||||
RETURN_HR_IF_FAILED("Failed to cast save file picker");
|
|
||||||
return picker2->PickSaveFileAndContinue();
|
|
||||||
});
|
|
||||||
RETURN_FALSE_IF_FAILED("Failed to open single file picker");
|
|
||||||
QAbstractEventDispatcher *eventDispatcher = QCoreApplication::eventDispatcher();
|
|
||||||
Q_ASSERT(eventDispatcher);
|
|
||||||
eventDispatcher->installEventFilter(helper);
|
|
||||||
#else
|
|
||||||
hr = QEventDispatcherWinRT::runOnXamlThread([picker, helper]() {
|
hr = QEventDispatcherWinRT::runOnXamlThread([picker, helper]() {
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
ComPtr<IAsyncOperation<StorageFile *>> op;
|
ComPtr<IAsyncOperation<StorageFile *>> op;
|
||||||
@ -321,7 +264,6 @@ static bool pickSaveFile(IFileSavePicker *picker, QWinRTFileDialogHelper *helper
|
|||||||
RETURN_HR_IF_FAILED("Failed to attach save file picker callback");
|
RETURN_HR_IF_FAILED("Failed to attach save file picker callback");
|
||||||
return S_OK;
|
return S_OK;
|
||||||
});
|
});
|
||||||
#endif
|
|
||||||
return SUCCEEDED(hr);
|
return SUCCEEDED(hr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -488,68 +430,6 @@ void QWinRTFileDialogHelper::hide()
|
|||||||
d->shown = false;
|
d->shown = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_OS_WINPHONE
|
|
||||||
bool QWinRTFileDialogHelper::eventFilter(QObject *, QEvent *e)
|
|
||||||
{
|
|
||||||
if (e->type() != QEvent::WinEventAct)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
HRESULT hr;
|
|
||||||
QActivationEvent *event = static_cast<QActivationEvent *>(e);
|
|
||||||
ComPtr<IInspectable> inspectable = event->args();
|
|
||||||
ComPtr<IActivatedEventArgs> arguments;
|
|
||||||
hr = inspectable.As(&arguments);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
|
|
||||||
ActivationKind activationKind;
|
|
||||||
hr = arguments->get_Kind(&activationKind);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
|
|
||||||
// Handle only File, Folder and Save file pick continuation here.
|
|
||||||
if (activationKind != ActivationKind_PickFileContinuation
|
|
||||||
&& activationKind != ActivationKind_PickFolderContinuation
|
|
||||||
&& activationKind != ActivationKind_PickSaveFileContinuation) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
QAbstractEventDispatcher *eventDispatcher = QCoreApplication::eventDispatcher();
|
|
||||||
Q_ASSERT(eventDispatcher);
|
|
||||||
eventDispatcher->removeEventFilter(this);
|
|
||||||
e->accept();
|
|
||||||
|
|
||||||
if (activationKind == ActivationKind_PickFileContinuation) {
|
|
||||||
ComPtr<IFileOpenPickerContinuationEventArgs> fileContinuationArgs;
|
|
||||||
hr = arguments.As(&fileContinuationArgs);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
ComPtr<IVectorView<StorageFile *>> files;
|
|
||||||
hr = fileContinuationArgs->get_Files(&files);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
hr = onFilesPicked(files.Get());
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
} else if (activationKind == ActivationKind_PickFolderContinuation) {
|
|
||||||
ComPtr<IFolderPickerContinuationEventArgs> folderContinuationArgs;
|
|
||||||
hr = arguments.As(&folderContinuationArgs);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
ComPtr<IStorageFolder> folder;
|
|
||||||
hr = folderContinuationArgs->get_Folder(&folder);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
hr = onFolderPicked(folder.Get());
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
} else {
|
|
||||||
ComPtr<IFileSavePickerContinuationEventArgs> saveFileContinuationArgs;
|
|
||||||
hr = arguments.As(&saveFileContinuationArgs);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
ComPtr<IStorageFile> file;
|
|
||||||
hr = saveFileContinuationArgs->get_File(&file);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
hr = onFilePicked(file.Get());
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void QWinRTFileDialogHelper::setDirectory(const QUrl &directory)
|
void QWinRTFileDialogHelper::setDirectory(const QUrl &directory)
|
||||||
{
|
{
|
||||||
Q_D(QWinRTFileDialogHelper);
|
Q_D(QWinRTFileDialogHelper);
|
||||||
@ -586,7 +466,6 @@ QString QWinRTFileDialogHelper::selectedNameFilter() const
|
|||||||
return d->selectedNameFilter;
|
return d->selectedNameFilter;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef Q_OS_WINPHONE
|
|
||||||
HRESULT QWinRTFileDialogHelper::onSingleFilePicked(IAsyncOperation<StorageFile *> *args, AsyncStatus status)
|
HRESULT QWinRTFileDialogHelper::onSingleFilePicked(IAsyncOperation<StorageFile *> *args, AsyncStatus status)
|
||||||
{
|
{
|
||||||
Q_D(QWinRTFileDialogHelper);
|
Q_D(QWinRTFileDialogHelper);
|
||||||
@ -643,17 +522,9 @@ HRESULT QWinRTFileDialogHelper::onSingleFolderPicked(IAsyncOperation<StorageFold
|
|||||||
Q_ASSERT_SUCCEEDED(hr);
|
Q_ASSERT_SUCCEEDED(hr);
|
||||||
return onFolderPicked(folder.Get());
|
return onFolderPicked(folder.Get());
|
||||||
}
|
}
|
||||||
#endif //Q_OS_WINPHONE
|
|
||||||
|
|
||||||
HRESULT QWinRTFileDialogHelper::onFilesPicked(IVectorView<StorageFile *> *files)
|
HRESULT QWinRTFileDialogHelper::onFilesPicked(IVectorView<StorageFile *> *files)
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_WINPHONE
|
|
||||||
Q_D(QWinRTFileDialogHelper);
|
|
||||||
QEventLoopLocker locker(&d->loop);
|
|
||||||
d->shown = false;
|
|
||||||
d->selectedFiles.clear();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
quint32 size;
|
quint32 size;
|
||||||
hr = files->get_Size(&size);
|
hr = files->get_Size(&size);
|
||||||
@ -676,13 +547,6 @@ HRESULT QWinRTFileDialogHelper::onFilesPicked(IVectorView<StorageFile *> *files)
|
|||||||
|
|
||||||
HRESULT QWinRTFileDialogHelper::onFolderPicked(IStorageFolder *folder)
|
HRESULT QWinRTFileDialogHelper::onFolderPicked(IStorageFolder *folder)
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_WINPHONE
|
|
||||||
Q_D(QWinRTFileDialogHelper);
|
|
||||||
QEventLoopLocker locker(&d->loop);
|
|
||||||
d->shown = false;
|
|
||||||
d->selectedFiles.clear();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!folder) {
|
if (!folder) {
|
||||||
emit reject();
|
emit reject();
|
||||||
return S_OK;
|
return S_OK;
|
||||||
@ -695,13 +559,6 @@ HRESULT QWinRTFileDialogHelper::onFolderPicked(IStorageFolder *folder)
|
|||||||
|
|
||||||
HRESULT QWinRTFileDialogHelper::onFilePicked(IStorageFile *file)
|
HRESULT QWinRTFileDialogHelper::onFilePicked(IStorageFile *file)
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_WINPHONE
|
|
||||||
Q_D(QWinRTFileDialogHelper);
|
|
||||||
QEventLoopLocker locker(&d->loop);
|
|
||||||
d->shown = false;
|
|
||||||
d->selectedFiles.clear();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!file) {
|
if (!file) {
|
||||||
emit reject();
|
emit reject();
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
@ -75,9 +75,6 @@ public:
|
|||||||
void exec() override;
|
void exec() override;
|
||||||
bool show(Qt::WindowFlags, Qt::WindowModality, QWindow *) override;
|
bool show(Qt::WindowFlags, Qt::WindowModality, QWindow *) override;
|
||||||
void hide() override;
|
void hide() override;
|
||||||
#ifdef Q_OS_WINPHONE
|
|
||||||
bool eventFilter(QObject *o, QEvent *e) override;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool defaultNameFilterDisables() const override { return false; }
|
bool defaultNameFilterDisables() const override { return false; }
|
||||||
void setDirectory(const QUrl &directory) override;
|
void setDirectory(const QUrl &directory) override;
|
||||||
@ -88,14 +85,12 @@ public:
|
|||||||
void selectNameFilter(const QString &selectedNameFilter) override;
|
void selectNameFilter(const QString &selectedNameFilter) override;
|
||||||
QString selectedNameFilter() const override;
|
QString selectedNameFilter() const override;
|
||||||
|
|
||||||
#ifndef Q_OS_WINPHONE
|
|
||||||
HRESULT onSingleFilePicked(ABI::Windows::Foundation::IAsyncOperation<ABI::Windows::Storage::StorageFile *> *,
|
HRESULT onSingleFilePicked(ABI::Windows::Foundation::IAsyncOperation<ABI::Windows::Storage::StorageFile *> *,
|
||||||
ABI::Windows::Foundation::AsyncStatus);
|
ABI::Windows::Foundation::AsyncStatus);
|
||||||
HRESULT onMultipleFilesPicked(ABI::Windows::Foundation::IAsyncOperation<ABI::Windows::Foundation::Collections::IVectorView<ABI::Windows::Storage::StorageFile *> *> *,
|
HRESULT onMultipleFilesPicked(ABI::Windows::Foundation::IAsyncOperation<ABI::Windows::Foundation::Collections::IVectorView<ABI::Windows::Storage::StorageFile *> *> *,
|
||||||
ABI::Windows::Foundation::AsyncStatus);
|
ABI::Windows::Foundation::AsyncStatus);
|
||||||
HRESULT onSingleFolderPicked(ABI::Windows::Foundation::IAsyncOperation<ABI::Windows::Storage::StorageFolder *> *,
|
HRESULT onSingleFolderPicked(ABI::Windows::Foundation::IAsyncOperation<ABI::Windows::Storage::StorageFolder *> *,
|
||||||
ABI::Windows::Foundation::AsyncStatus);
|
ABI::Windows::Foundation::AsyncStatus);
|
||||||
#endif
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
HRESULT onFilesPicked(ABI::Windows::Foundation::Collections::IVectorView<ABI::Windows::Storage::StorageFile *> *files);
|
HRESULT onFilesPicked(ABI::Windows::Foundation::Collections::IVectorView<ABI::Windows::Storage::StorageFile *> *files);
|
||||||
|
@ -153,7 +153,6 @@ static HRESULT getDestinationFolder(const QString &fileName, const QString &newF
|
|||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
ComPtr<IAsyncOperation<StorageFolder *>> op;
|
ComPtr<IAsyncOperation<StorageFolder *>> op;
|
||||||
QFileInfo newFileInfo(newFileName);
|
QFileInfo newFileInfo(newFileName);
|
||||||
#ifndef Q_OS_WINPHONE
|
|
||||||
QFileInfo fileInfo(fileName);
|
QFileInfo fileInfo(fileName);
|
||||||
if (fileInfo.dir() == newFileInfo.dir()) {
|
if (fileInfo.dir() == newFileInfo.dir()) {
|
||||||
ComPtr<IStorageItem2> item;
|
ComPtr<IStorageItem2> item;
|
||||||
@ -161,12 +160,7 @@ static HRESULT getDestinationFolder(const QString &fileName, const QString &newF
|
|||||||
Q_ASSERT_SUCCEEDED(hr);
|
Q_ASSERT_SUCCEEDED(hr);
|
||||||
|
|
||||||
hr = item->GetParentAsync(&op);
|
hr = item->GetParentAsync(&op);
|
||||||
} else
|
} else {
|
||||||
#else
|
|
||||||
Q_UNUSED(fileName);
|
|
||||||
Q_UNUSED(file)
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
ComPtr<IStorageFolderStatics> folderFactory;
|
ComPtr<IStorageFolderStatics> folderFactory;
|
||||||
hr = RoGetActivationFactory(HString::MakeReference(RuntimeClass_Windows_Storage_StorageFolder).Get(),
|
hr = RoGetActivationFactory(HString::MakeReference(RuntimeClass_Windows_Storage_StorageFolder).Get(),
|
||||||
IID_PPV_ARGS(&folderFactory));
|
IID_PPV_ARGS(&folderFactory));
|
||||||
|
@ -74,11 +74,9 @@
|
|||||||
|
|
||||||
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE_APP)
|
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE_APP)
|
||||||
# include <windows.phone.ui.input.h>
|
# include <windows.phone.ui.input.h>
|
||||||
# if _MSC_VER >= 1900
|
|
||||||
# include <windows.foundation.metadata.h>
|
# include <windows.foundation.metadata.h>
|
||||||
using namespace ABI::Windows::Foundation::Metadata;
|
using namespace ABI::Windows::Foundation::Metadata;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
using namespace Microsoft::WRL;
|
using namespace Microsoft::WRL;
|
||||||
@ -153,7 +151,6 @@ QWinRTIntegration::QWinRTIntegration() : d_ptr(new QWinRTIntegrationPrivate)
|
|||||||
Q_ASSERT_SUCCEEDED(hr);
|
Q_ASSERT_SUCCEEDED(hr);
|
||||||
|
|
||||||
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE_APP)
|
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE_APP)
|
||||||
#if _MSC_VER >= 1900
|
|
||||||
d->hasHardwareButtons = false;
|
d->hasHardwareButtons = false;
|
||||||
ComPtr<IApiInformationStatics> apiInformationStatics;
|
ComPtr<IApiInformationStatics> apiInformationStatics;
|
||||||
hr = RoGetActivationFactory(HString::MakeReference(RuntimeClass_Windows_Foundation_Metadata_ApiInformation).Get(),
|
hr = RoGetActivationFactory(HString::MakeReference(RuntimeClass_Windows_Foundation_Metadata_ApiInformation).Get(),
|
||||||
@ -163,9 +160,6 @@ QWinRTIntegration::QWinRTIntegration() : d_ptr(new QWinRTIntegrationPrivate)
|
|||||||
const HStringReference valueRef(L"Windows.Phone.UI.Input.HardwareButtons");
|
const HStringReference valueRef(L"Windows.Phone.UI.Input.HardwareButtons");
|
||||||
hr = apiInformationStatics->IsTypePresent(valueRef.Get(), &d->hasHardwareButtons);
|
hr = apiInformationStatics->IsTypePresent(valueRef.Get(), &d->hasHardwareButtons);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
d->hasHardwareButtons = true;
|
|
||||||
#endif // _MSC_VER >= 1900
|
|
||||||
|
|
||||||
if (d->hasHardwareButtons) {
|
if (d->hasHardwareButtons) {
|
||||||
hr = RoGetActivationFactory(HString::MakeReference(RuntimeClass_Windows_Phone_UI_Input_HardwareButtons).Get(),
|
hr = RoGetActivationFactory(HString::MakeReference(RuntimeClass_Windows_Phone_UI_Input_HardwareButtons).Get(),
|
||||||
@ -226,12 +220,11 @@ QWinRTIntegration::~QWinRTIntegration()
|
|||||||
// Do not execute this on Windows Phone as the application is already
|
// Do not execute this on Windows Phone as the application is already
|
||||||
// shutting down and trying to unregister suspending/resume handler will
|
// shutting down and trying to unregister suspending/resume handler will
|
||||||
// cause exceptions and assert in debug mode
|
// cause exceptions and assert in debug mode
|
||||||
#ifndef Q_OS_WINPHONE
|
|
||||||
for (QHash<CoreApplicationCallbackRemover, EventRegistrationToken>::const_iterator i = d->applicationTokens.begin(); i != d->applicationTokens.end(); ++i) {
|
for (QHash<CoreApplicationCallbackRemover, EventRegistrationToken>::const_iterator i = d->applicationTokens.begin(); i != d->applicationTokens.end(); ++i) {
|
||||||
hr = (d->application.Get()->*i.key())(i.value());
|
hr = (d->application.Get()->*i.key())(i.value());
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
Q_ASSERT_SUCCEEDED(hr);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
destroyScreen(d->mainScreen);
|
destroyScreen(d->mainScreen);
|
||||||
Windows::Foundation::Uninitialize();
|
Windows::Foundation::Uninitialize();
|
||||||
}
|
}
|
||||||
@ -318,11 +311,7 @@ QPlatformClipboard *QWinRTIntegration::clipboard() const
|
|||||||
#ifndef QT_NO_DRAGANDDROP
|
#ifndef QT_NO_DRAGANDDROP
|
||||||
QPlatformDrag *QWinRTIntegration::drag() const
|
QPlatformDrag *QWinRTIntegration::drag() const
|
||||||
{
|
{
|
||||||
#if _MSC_VER >= 1900
|
|
||||||
return QWinRTDrag::instance();
|
return QWinRTDrag::instance();
|
||||||
#else
|
|
||||||
return QPlatformIntegration::drag();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif // QT_NO_DRAGANDDROP
|
#endif // QT_NO_DRAGANDDROP
|
||||||
|
|
||||||
|
@ -562,7 +562,7 @@ QWinRTScreen::QWinRTScreen()
|
|||||||
ComPtr<Xaml::IUIElement> uiElement;
|
ComPtr<Xaml::IUIElement> uiElement;
|
||||||
hr = canvas.As(&uiElement);
|
hr = canvas.As(&uiElement);
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
Q_ASSERT_SUCCEEDED(hr);
|
||||||
#if _MSC_VER >= 1900 && !defined(QT_NO_DRAGANDDROP)
|
#ifndef QT_NO_DRAGANDDROP
|
||||||
QWinRTDrag::instance()->setUiElement(uiElement);
|
QWinRTDrag::instance()->setUiElement(uiElement);
|
||||||
#endif
|
#endif
|
||||||
hr = window->put_Content(uiElement.Get());
|
hr = window->put_Content(uiElement.Get());
|
||||||
@ -833,7 +833,7 @@ void QWinRTScreen::addWindow(QWindow *window)
|
|||||||
handleExpose();
|
handleExpose();
|
||||||
QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents);
|
QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents);
|
||||||
|
|
||||||
#if _MSC_VER >= 1900 && !defined(QT_NO_DRAGANDDROP)
|
#ifndef QT_NO_DRAGANDDROP
|
||||||
QWinRTDrag::instance()->setDropTarget(window);
|
QWinRTDrag::instance()->setDropTarget(window);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -852,7 +852,7 @@ void QWinRTScreen::removeWindow(QWindow *window)
|
|||||||
QWindowSystemInterface::handleWindowActivated(Q_NULLPTR, Qt::OtherFocusReason);
|
QWindowSystemInterface::handleWindowActivated(Q_NULLPTR, Qt::OtherFocusReason);
|
||||||
handleExpose();
|
handleExpose();
|
||||||
QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents);
|
QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents);
|
||||||
#if _MSC_VER >= 1900 && !defined(QT_NO_DRAGANDDROP)
|
#ifndef QT_NO_DRAGANDDROP
|
||||||
if (wasTopWindow)
|
if (wasTopWindow)
|
||||||
QWinRTDrag::instance()->setDropTarget(topWindow());
|
QWinRTDrag::instance()->setDropTarget(topWindow());
|
||||||
#endif
|
#endif
|
||||||
@ -1221,11 +1221,7 @@ HRESULT QWinRTScreen::onPointerUpdated(ICoreWindow *, IPointerEventArgs *args)
|
|||||||
properties->get_Pressure(&pressure);
|
properties->get_Pressure(&pressure);
|
||||||
|
|
||||||
boolean isPressed;
|
boolean isPressed;
|
||||||
#ifndef Q_OS_WINPHONE
|
|
||||||
pointerPoint->get_IsInContact(&isPressed);
|
pointerPoint->get_IsInContact(&isPressed);
|
||||||
#else
|
|
||||||
properties->get_IsLeftButtonPressed(&isPressed); // IsInContact not reliable on phone
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Devices like the Hololens set a static pressure of 0.5 independent
|
// Devices like the Hololens set a static pressure of 0.5 independent
|
||||||
// of the pressed state. In those cases we need to synthesize the
|
// of the pressed state. In those cases we need to synthesize the
|
||||||
@ -1356,16 +1352,10 @@ HRESULT QWinRTScreen::onDpiChanged(IDisplayInformation *, IInspectable *)
|
|||||||
Q_D(QWinRTScreen);
|
Q_D(QWinRTScreen);
|
||||||
|
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
#ifdef Q_OS_WINPHONE
|
|
||||||
ComPtr<IDisplayInformation2> displayInformation;
|
|
||||||
hr = d->displayInformation.As(&displayInformation);
|
|
||||||
RETURN_OK_IF_FAILED("Failed to cast display information.");
|
|
||||||
hr = displayInformation->get_RawPixelsPerViewPixel(&d->scaleFactor);
|
|
||||||
#else
|
|
||||||
ResolutionScale resolutionScale;
|
ResolutionScale resolutionScale;
|
||||||
hr = d->displayInformation->get_ResolutionScale(&resolutionScale);
|
hr = d->displayInformation->get_ResolutionScale(&resolutionScale);
|
||||||
d->scaleFactor = qreal(resolutionScale) / 100;
|
d->scaleFactor = qreal(resolutionScale) / 100;
|
||||||
#endif
|
|
||||||
qCDebug(lcQpaWindows) << __FUNCTION__ << "Scale Factor:" << d->scaleFactor;
|
qCDebug(lcQpaWindows) << __FUNCTION__ << "Scale Factor:" << d->scaleFactor;
|
||||||
|
|
||||||
RETURN_OK_IF_FAILED("Failed to get scale factor");
|
RETURN_OK_IF_FAILED("Failed to get scale factor");
|
||||||
|
@ -84,7 +84,6 @@ static inline QColor fromColor(const Color &color)
|
|||||||
return QColor(color.R, color.G, color.B, color.A);
|
return QColor(color.R, color.G, color.B, color.A);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if _MSC_VER >= 1900
|
|
||||||
static bool uiColorSettings(const wchar_t *value, UIElementType type, Color *color)
|
static bool uiColorSettings(const wchar_t *value, UIElementType type, Color *color)
|
||||||
{
|
{
|
||||||
static ComPtr<IApiInformationStatics> apiInformationStatics;
|
static ComPtr<IApiInformationStatics> apiInformationStatics;
|
||||||
@ -189,103 +188,6 @@ static void nativeColorSettings(QPalette &p)
|
|||||||
p.setColor(QPalette::BrightText, fromColor(color));
|
p.setColor(QPalette::BrightText, fromColor(color));
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // _MSC_VER >= 1900
|
|
||||||
|
|
||||||
static void nativeColorSettings(QPalette &p)
|
|
||||||
{
|
|
||||||
HRESULT hr;
|
|
||||||
Color color;
|
|
||||||
|
|
||||||
#ifdef Q_OS_WINPHONE
|
|
||||||
hr = uiSettings()->UIElementColor(UIElementType_PopupBackground, &color);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
p.setColor(QPalette::ToolTipBase, fromColor(color));
|
|
||||||
p.setColor(QPalette::AlternateBase, fromColor(color));
|
|
||||||
|
|
||||||
hr = uiSettings()->UIElementColor(UIElementType_NonTextMedium, &color);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
p.setColor(QPalette::Button, fromColor(color));
|
|
||||||
hr = uiSettings()->UIElementColor(UIElementType_NonTextMediumHigh, &color);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
p.setColor(QPalette::Midlight, fromColor(color));
|
|
||||||
hr = uiSettings()->UIElementColor(UIElementType_NonTextHigh, &color);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
p.setColor(QPalette::Light, fromColor(color));
|
|
||||||
hr = uiSettings()->UIElementColor(UIElementType_NonTextMediumLow, &color);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
p.setColor(QPalette::Mid, fromColor(color));
|
|
||||||
hr = uiSettings()->UIElementColor(UIElementType_NonTextLow, &color);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
p.setColor(QPalette::Dark, fromColor(color));
|
|
||||||
|
|
||||||
hr = uiSettings()->UIElementColor(UIElementType_TextHigh, &color);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
p.setColor(QPalette::ButtonText, fromColor(color));
|
|
||||||
p.setColor(QPalette::Text, fromColor(color));
|
|
||||||
p.setColor(QPalette::WindowText, fromColor(color));
|
|
||||||
|
|
||||||
hr = uiSettings()->UIElementColor(UIElementType_TextMedium, &color);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
p.setColor(QPalette::ToolTipText, fromColor(color));
|
|
||||||
|
|
||||||
hr = uiSettings()->UIElementColor(UIElementType_AccentColor, &color);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
p.setColor(QPalette::Highlight, fromColor(color));
|
|
||||||
|
|
||||||
hr = uiSettings()->UIElementColor(UIElementType_PageBackground, &color);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
p.setColor(QPalette::Window, fromColor(color));
|
|
||||||
p.setColor(QPalette::Base, fromColor(color));
|
|
||||||
|
|
||||||
hr = uiSettings()->UIElementColor(UIElementType_TextContrastWithHigh, &color);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
p.setColor(QPalette::BrightText, fromColor(color));
|
|
||||||
#else
|
|
||||||
hr = uiSettings()->UIElementColor(UIElementType_ActiveCaption, &color);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
p.setColor(QPalette::ToolTipBase, fromColor(color));
|
|
||||||
|
|
||||||
hr = uiSettings()->UIElementColor(UIElementType_Background, &color);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
p.setColor(QPalette::AlternateBase, fromColor(color));
|
|
||||||
|
|
||||||
hr = uiSettings()->UIElementColor(UIElementType_ButtonFace, &color);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
p.setColor(QPalette::Button, fromColor(color));
|
|
||||||
p.setColor(QPalette::Midlight, fromColor(color).lighter(110));
|
|
||||||
p.setColor(QPalette::Light, fromColor(color).lighter(150));
|
|
||||||
p.setColor(QPalette::Mid, fromColor(color).dark(130));
|
|
||||||
p.setColor(QPalette::Dark, fromColor(color).dark(150));
|
|
||||||
|
|
||||||
hr = uiSettings()->UIElementColor(UIElementType_ButtonText, &color);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
p.setColor(QPalette::ButtonText, fromColor(color));
|
|
||||||
p.setColor(QPalette::Text, fromColor(color));
|
|
||||||
|
|
||||||
hr = uiSettings()->UIElementColor(UIElementType_CaptionText, &color);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
p.setColor(QPalette::ToolTipText, fromColor(color));
|
|
||||||
|
|
||||||
hr = uiSettings()->UIElementColor(UIElementType_Highlight, &color);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
p.setColor(QPalette::Highlight, fromColor(color));
|
|
||||||
|
|
||||||
hr = uiSettings()->UIElementColor(UIElementType_HighlightText, &color);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
p.setColor(QPalette::HighlightedText, fromColor(color));
|
|
||||||
|
|
||||||
hr = uiSettings()->UIElementColor(UIElementType_Window, &color);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
p.setColor(QPalette::Window, fromColor(color));
|
|
||||||
p.setColor(QPalette::Base, fromColor(color));
|
|
||||||
|
|
||||||
hr = uiSettings()->UIElementColor(UIElementType_Hotlight, &color);
|
|
||||||
Q_ASSERT_SUCCEEDED(hr);
|
|
||||||
p.setColor(QPalette::BrightText, fromColor(color));
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif // _MSC_VER < 1900
|
|
||||||
|
|
||||||
QWinRTTheme::QWinRTTheme()
|
QWinRTTheme::QWinRTTheme()
|
||||||
: d_ptr(new QWinRTThemePrivate)
|
: d_ptr(new QWinRTThemePrivate)
|
||||||
{
|
{
|
||||||
|
@ -331,7 +331,6 @@ void QWinRTWindow::setWindowState(Qt::WindowState state)
|
|||||||
if (d->state == state)
|
if (d->state == state)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#if _MSC_VER >= 1900
|
|
||||||
if (state == Qt::WindowFullScreen) {
|
if (state == Qt::WindowFullScreen) {
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
boolean success;
|
boolean success;
|
||||||
@ -378,7 +377,6 @@ void QWinRTWindow::setWindowState(Qt::WindowState state)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // _MSC_VER >= 1900
|
|
||||||
|
|
||||||
if (state == Qt::WindowMinimized)
|
if (state == Qt::WindowMinimized)
|
||||||
setUIElementVisibility(d->uiElement.Get(), false);
|
setUIElementVisibility(d->uiElement.Get(), false);
|
||||||
|
@ -52,7 +52,7 @@ WINRT_SDK_VERSION_STRING = $$(UCRTVersion)
|
|||||||
WINRT_SDK_VERSION = $$member($$list($$split(WINRT_SDK_VERSION_STRING, .)), 2)
|
WINRT_SDK_VERSION = $$member($$list($$split(WINRT_SDK_VERSION_STRING, .)), 2)
|
||||||
lessThan(WINRT_SDK_VERSION, 14322): DEFINES += QT_WINRT_LIMITED_DRAGANDDROP
|
lessThan(WINRT_SDK_VERSION, 14322): DEFINES += QT_WINRT_LIMITED_DRAGANDDROP
|
||||||
|
|
||||||
*-msvc2013|contains(DEFINES, QT_NO_DRAGANDDROP) {
|
contains(DEFINES, QT_NO_DRAGANDDROP) {
|
||||||
SOURCES -= qwinrtdrag.cpp
|
SOURCES -= qwinrtdrag.cpp
|
||||||
HEADERS -= qwinrtdrag.h
|
HEADERS -= qwinrtdrag.h
|
||||||
}
|
}
|
||||||
|
@ -59,19 +59,7 @@
|
|||||||
entry point within the newly created GUI thread.
|
entry point within the newly created GUI thread.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if _MSC_VER < 1900
|
|
||||||
#include <new.h>
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
int newmode;
|
|
||||||
} _startupinfo;
|
|
||||||
#endif // _MSC_VER < 1900
|
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#if _MSC_VER < 1900
|
|
||||||
int __getmainargs(int *argc, char ***argv, char ***env, int expandWildcards, _startupinfo *info);
|
|
||||||
#endif
|
|
||||||
int main(int, char **);
|
int main(int, char **);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -102,7 +90,6 @@ typedef ITypedEventHandler<CoreApplicationView *, Activation::IActivatedEventArg
|
|||||||
static QtMessageHandler defaultMessageHandler;
|
static QtMessageHandler defaultMessageHandler;
|
||||||
static void devMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &message)
|
static void devMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &message)
|
||||||
{
|
{
|
||||||
#ifndef Q_OS_WINPHONE
|
|
||||||
static HANDLE shmem = 0;
|
static HANDLE shmem = 0;
|
||||||
static HANDLE event = 0;
|
static HANDLE event = 0;
|
||||||
if (!shmem)
|
if (!shmem)
|
||||||
@ -121,7 +108,6 @@ static void devMessageHandler(QtMsgType type, const QMessageLogContext &context,
|
|||||||
message.data(), (message.length() + 1) * sizeof(wchar_t));
|
message.data(), (message.length() + 1) * sizeof(wchar_t));
|
||||||
UnmapViewOfFile(data);
|
UnmapViewOfFile(data);
|
||||||
SetEvent(event);
|
SetEvent(event);
|
||||||
#endif // !Q_OS_WINPHONE
|
|
||||||
defaultMessageHandler(type, context, message);
|
defaultMessageHandler(type, context, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,7 +202,6 @@ private:
|
|||||||
|
|
||||||
// Check whether the app already runs
|
// Check whether the app already runs
|
||||||
if (!app) {
|
if (!app) {
|
||||||
#if _MSC_VER >= 1900
|
|
||||||
// I*EventArgs have no launch arguments, hence we
|
// I*EventArgs have no launch arguments, hence we
|
||||||
// need to prepend the application binary manually
|
// need to prepend the application binary manually
|
||||||
wchar_t fn[513];
|
wchar_t fn[513];
|
||||||
@ -224,7 +209,6 @@ private:
|
|||||||
|
|
||||||
if (SUCCEEDED(res))
|
if (SUCCEEDED(res))
|
||||||
args.prepend(QString::fromWCharArray(fn, res).toUtf8().data());
|
args.prepend(QString::fromWCharArray(fn, res).toUtf8().data());
|
||||||
#endif _MSC_VER >= 1900
|
|
||||||
|
|
||||||
ResumeThread(mainThread);
|
ResumeThread(mainThread);
|
||||||
|
|
||||||
@ -252,7 +236,6 @@ private:
|
|||||||
|
|
||||||
HRESULT __stdcall OnLaunched(ILaunchActivatedEventArgs *launchArgs) Q_DECL_OVERRIDE
|
HRESULT __stdcall OnLaunched(ILaunchActivatedEventArgs *launchArgs) Q_DECL_OVERRIDE
|
||||||
{
|
{
|
||||||
#if _MSC_VER >= 1900
|
|
||||||
ComPtr<IPrelaunchActivatedEventArgs> preArgs;
|
ComPtr<IPrelaunchActivatedEventArgs> preArgs;
|
||||||
HRESULT hr = launchArgs->QueryInterface(preArgs.GetAddressOf());
|
HRESULT hr = launchArgs->QueryInterface(preArgs.GetAddressOf());
|
||||||
if (SUCCEEDED(hr)) {
|
if (SUCCEEDED(hr)) {
|
||||||
@ -263,7 +246,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
commandLine = QString::fromWCharArray(GetCommandLine()).toUtf8();
|
commandLine = QString::fromWCharArray(GetCommandLine()).toUtf8();
|
||||||
#endif
|
|
||||||
HString launchCommandLine;
|
HString launchCommandLine;
|
||||||
launchArgs->get_Arguments(launchCommandLine.GetAddressOf());
|
launchArgs->get_Arguments(launchCommandLine.GetAddressOf());
|
||||||
if (launchCommandLine.IsValid()) {
|
if (launchCommandLine.IsValid()) {
|
||||||
@ -329,9 +312,7 @@ private:
|
|||||||
pidFile = CreateFile2(reinterpret_cast<LPCWSTR>(pidFileName.utf16()),
|
pidFile = CreateFile2(reinterpret_cast<LPCWSTR>(pidFileName.utf16()),
|
||||||
GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ, CREATE_ALWAYS, ¶ms);
|
GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ, CREATE_ALWAYS, ¶ms);
|
||||||
// Install the develMode message handler
|
// Install the develMode message handler
|
||||||
#ifndef Q_OS_WINPHONE
|
|
||||||
defaultMessageHandler = qInstallMessageHandler(devMessageHandler);
|
defaultMessageHandler = qInstallMessageHandler(devMessageHandler);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
// Wait for debugger before continuing
|
// Wait for debugger before continuing
|
||||||
if (debugWait) {
|
if (debugWait) {
|
||||||
@ -396,11 +377,6 @@ int __stdcall WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
|||||||
{
|
{
|
||||||
int argc = 0;
|
int argc = 0;
|
||||||
char **argv = 0, **env = 0;
|
char **argv = 0, **env = 0;
|
||||||
#if _MSC_VER < 1900
|
|
||||||
_startupinfo info = { _query_new_mode() };
|
|
||||||
if (int init = __getmainargs(&argc, &argv, &env, false, &info))
|
|
||||||
return init;
|
|
||||||
#endif // _MSC_VER >= 1900
|
|
||||||
for (int i = 0; env && env[i]; ++i) {
|
for (int i = 0; env && env[i]; ++i) {
|
||||||
QByteArray var(env[i]);
|
QByteArray var(env[i]);
|
||||||
int split = var.indexOf('=');
|
int split = var.indexOf('=');
|
||||||
|
@ -1371,10 +1371,8 @@ void tst_QFile::copyFallback()
|
|||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
#include <objbase.h>
|
#include <objbase.h>
|
||||||
#ifndef Q_OS_WINPHONE
|
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||||
static QString getWorkingDirectoryForLink(const QString &linkFileName)
|
static QString getWorkingDirectoryForLink(const QString &linkFileName)
|
||||||
|
@ -12,6 +12,5 @@ win32 {
|
|||||||
include(../../../../src/3rdparty/iaccessible2/iaccessible2.pri)
|
include(../../../../src/3rdparty/iaccessible2/iaccessible2.pri)
|
||||||
DEFINES += QT_SUPPORTS_IACCESSIBLE2
|
DEFINES += QT_SUPPORTS_IACCESSIBLE2
|
||||||
}
|
}
|
||||||
LIBS += -luuid
|
LIBS += -luuid -loleacc -loleaut32 -lole32
|
||||||
!winphone: LIBS += -loleacc -loleaut32 -lole32
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user