summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qcoreapplication_win.cpp
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2020-06-05 09:24:37 +0200
committerLiang Qi <liang.qi@qt.io>2020-06-06 20:25:49 +0200
commit45b0f1be686cfba8dcecb9be5c875cae59c69276 (patch)
tree363dfd46575d147206267d854ce14747157f432e /src/corelib/kernel/qcoreapplication_win.cpp
parentaa81b90738ce9faee5e433617c8bd243cb238729 (diff)
Remove winrt
Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/corelib/kernel/qcoreapplication_win.cpp')
-rw-r--r--src/corelib/kernel/qcoreapplication_win.cpp42
1 files changed, 0 insertions, 42 deletions
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 <ctype.h>
#include <qt_windows.h>
-#ifdef Q_OS_WINRT
-#include <qfunctions_winrt.h>
-#include <wrl.h>
-#include <Windows.ApplicationModel.core.h>
-#include <windows.foundation.h>
-using namespace ABI::Windows::ApplicationModel;
-using namespace Microsoft::WRL;
-using namespace Microsoft::WRL::Wrappers;
-#endif
-
QT_BEGIN_NAMESPACE
Q_CORE_EXPORT QString qAppFileName() // get application file name
@@ -105,33 +95,6 @@ QString QCoreApplicationPrivate::appVersion() const
{
QString applicationVersion;
#ifndef QT_BOOTSTRAPPED
-# ifdef Q_OS_WINRT
- HRESULT hr;
-
- ComPtr<IPackageStatics> packageFactory;
- hr = RoGetActivationFactory(
- HString::MakeReference(RuntimeClass_Windows_ApplicationModel_Package).Get(),
- IID_PPV_ARGS(&packageFactory));
- RETURN_IF_FAILED("Failed to create package instance", return QString());
-
- ComPtr<IPackage> package;
- packageFactory->get_Current(&package);
- RETURN_IF_FAILED("Failed to get current application package", return QString());
-
- ComPtr<IPackageId> packageId;
- package->get_Id(&packageId);
- RETURN_IF_FAILED("Failed to get current application package ID", return QString());
-
- PackageVersion version;
- packageId->get_Version(&version);
- RETURN_IF_FAILED("Failed to get current application package version", return QString());
-
- applicationVersion = QStringLiteral("%1.%2.%3.%4")
- .arg(version.Major)
- .arg(version.Minor)
- .arg(version.Build)
- .arg(version.Revision);
-# else
const QString appFileName = qAppFileName();
QVarLengthArray<wchar_t> buffer(appFileName.size() + 1);
buffer[appFileName.toWCharArray(buffer.data())] = 0;
@@ -154,13 +117,10 @@ QString QCoreApplicationPrivate::appVersion() const
}
}
}
-# endif
#endif
return applicationVersion;
}
-#ifndef Q_OS_WINRT
-
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
Q_CORE_EXPORT HINSTANCE qWinAppInst() // get Windows app handle
{
@@ -913,8 +873,6 @@ QDebug operator<<(QDebug dbg, const MSG &msg)
#endif // QT_NO_QOBJECT
-#endif // !defined(Q_OS_WINRT)
-
#ifndef QT_NO_QOBJECT
void QCoreApplicationPrivate::removePostedTimerEvent(QObject *object, int timerId)
{