From 45b0f1be686cfba8dcecb9be5c875cae59c69276 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Fri, 5 Jun 2020 09:24:37 +0200 Subject: Remove winrt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø --- src/corelib/kernel/qcoreapplication_win.cpp | 42 ----------------------------- 1 file changed, 42 deletions(-) (limited to 'src/corelib/kernel/qcoreapplication_win.cpp') diff --git a/src/corelib/kernel/qcoreapplication_win.cpp b/src/corelib/kernel/qcoreapplication_win.cpp index 824c0535ed..a0fbf97838 100644 --- a/src/corelib/kernel/qcoreapplication_win.cpp +++ b/src/corelib/kernel/qcoreapplication_win.cpp @@ -53,16 +53,6 @@ #include #include -#ifdef Q_OS_WINRT -#include -#include -#include -#include -using namespace ABI::Windows::ApplicationModel; -using namespace Microsoft::WRL; -using namespace Microsoft::WRL::Wrappers; -#endif - QT_BEGIN_NAMESPACE Q_CORE_EXPORT QString qAppFileName() // get application file name @@ -105,33 +95,6 @@ QString QCoreApplicationPrivate::appVersion() const { QString applicationVersion; #ifndef QT_BOOTSTRAPPED -# ifdef Q_OS_WINRT - HRESULT hr; - - ComPtr packageFactory; - hr = RoGetActivationFactory( - HString::MakeReference(RuntimeClass_Windows_ApplicationModel_Package).Get(), - IID_PPV_ARGS(&packageFactory)); - RETURN_IF_FAILED("Failed to create package instance", return QString()); - - ComPtr package; - packageFactory->get_Current(&package); - RETURN_IF_FAILED("Failed to get current application package", return QString()); - - ComPtr packageId; - package->get_Id(&packageId); - RETURN_IF_FAILED("Failed to get current application package ID", return QString()); - - PackageVersion version; - packageId->get_Version(&version); - RETURN_IF_FAILED("Failed to get current application package version", return QString()); - - applicationVersion = QStringLiteral("%1.%2.%3.%4") - .arg(version.Major) - .arg(version.Minor) - .arg(version.Build) - .arg(version.Revision); -# else const QString appFileName = qAppFileName(); QVarLengthArray buffer(appFileName.size() + 1); buffer[appFileName.toWCharArray(buffer.data())] = 0; @@ -154,13 +117,10 @@ QString QCoreApplicationPrivate::appVersion() const } } } -# endif #endif return applicationVersion; } -#ifndef Q_OS_WINRT - #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) Q_CORE_EXPORT HINSTANCE qWinAppInst() // get Windows app handle { @@ -913,8 +873,6 @@ QDebug operator<<(QDebug dbg, const MSG &msg) #endif // QT_NO_QOBJECT -#endif // !defined(Q_OS_WINRT) - #ifndef QT_NO_QOBJECT void QCoreApplicationPrivate::removePostedTimerEvent(QObject *object, int timerId) { -- cgit v1.2.3