Windows: Do not set process DPI awareness when Qt runs in a plugin.

Disable the call depending on Qt::AA_PluginApplication.

Task-number: QTBUG-47556
Change-Id: Id50a09d99a9e1fb4f57d85798a7554e124cfafa5
Reviewed-by: Tim Blechmann <tim@klingt.org>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
bb10
Friedemann Kleint 2015-09-02 06:26:04 +02:00
parent 5237b97f26
commit 933e3e886f
1 changed files with 5 additions and 3 deletions

View File

@ -220,11 +220,13 @@ QWindowsIntegrationPrivate::QWindowsIntegrationPrivate(const QStringList &paramL
if (tabletAbsoluteRange >= 0)
m_context.setTabletAbsoluteRange(tabletAbsoluteRange);
if (!dpiAwarenessSet) { // Set only once in case of repeated instantiations of QGuiApplication.
m_context.setProcessDpiAwareness(dpiAwareness);
if (!QCoreApplication::testAttribute(Qt::AA_PluginApplication)) {
m_context.setProcessDpiAwareness(dpiAwareness);
qCDebug(lcQpaWindows)
<< __FUNCTION__ << "DpiAwareness=" << dpiAwareness;
}
dpiAwarenessSet = true;
}
qCDebug(lcQpaWindows)
<< __FUNCTION__ << "DpiAwareness=" << dpiAwareness;
QTouchDevice *touchDevice = m_context.touchDevice();
if (touchDevice) {