diff options
author | Andrew Knight <andrew.knight@digia.com> | 2014-06-07 23:38:18 +0300 |
---|---|---|
committer | Andrew Knight <andrew.knight@digia.com> | 2014-06-25 16:34:32 +0200 |
commit | 50001dc801a695ecd1e6381ff159c0cf2f3c5b55 (patch) | |
tree | 47b6ed99ed167d5e90bd210f8c8be7a6e38bda69 /src/plugins/platforms/winrt/qwinrtintegration.cpp | |
parent | b740e27e365000380d22a290ad6615e5b5bce7e5 (diff) |
winrt: Clean up QWinRTScreen
- Remove WP8.0 code paths
- Remove WinRT types from header as much as possible
- Use ComPtr where appropriate
- Use COM convenience methods
Task-number: QTBUG-38115
Change-Id: Ib241c3e5107add255a48340f86ee5885f895ff83
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Diffstat (limited to 'src/plugins/platforms/winrt/qwinrtintegration.cpp')
-rw-r--r-- | src/plugins/platforms/winrt/qwinrtintegration.cpp | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtintegration.cpp b/src/plugins/platforms/winrt/qwinrtintegration.cpp index b3a2cafa2e..806b8f99bb 100644 --- a/src/plugins/platforms/winrt/qwinrtintegration.cpp +++ b/src/plugins/platforms/winrt/qwinrtintegration.cpp @@ -82,26 +82,7 @@ QWinRTIntegration::QWinRTIntegration() , m_fontDatabase(new QWinRTFontDatabase) , m_services(new QWinRTServices) { - // Obtain the WinRT Application, view, and window - ICoreApplication *application; - if (FAILED(RoGetActivationFactory(Wrappers::HString::MakeReference(RuntimeClass_Windows_ApplicationModel_Core_CoreApplication).Get(), - IID_PPV_ARGS(&application)))) - qCritical("Could not attach to the application factory."); - - ICoreApplicationView *view; - if (FAILED(application->GetCurrentView(&view))) { - qCritical("Could not obtain the application view - have you started outside of WinRT?"); - return; - } - - // Get core window (will act as our screen) - ICoreWindow *window; - if (FAILED(view->get_CoreWindow(&window))) { - qCritical("Could not obtain the application window - have you started outside of WinRT?"); - return; - } - window->Activate(); - m_screen = new QWinRTScreen(window); + m_screen = new QWinRTScreen; screenAdded(m_screen); m_success = true; |