From 8458b4054a8e5a2f90238d7973050a8d797fea7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Martins?= Date: Sun, 24 May 2015 00:33:18 +0100 Subject: [PATCH] QWidgetWindow: Avoid using global static non-trivial type. Don't initialize it before main, instead, do it whenever QWidgetWindow::handleTabletEvent() is called, which is seldomly. Change-Id: I16935e223d4f9879257e7be026fee0215b9dde22 Reviewed-by: Marc Mutz --- src/widgets/kernel/qwidgetwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp index d715438bfe..01d6d89857 100644 --- a/src/widgets/kernel/qwidgetwindow.cpp +++ b/src/widgets/kernel/qwidgetwindow.cpp @@ -51,7 +51,6 @@ QT_BEGIN_NAMESPACE Q_WIDGETS_EXPORT extern bool qt_tab_all_widgets(); QWidget *qt_button_down = 0; // widget got last button-down -static QPointer qt_tablet_target = 0; // popup control QWidget *qt_popup_down = 0; // popup that contains the pressed widget @@ -873,6 +872,7 @@ bool QWidgetWindow::nativeEvent(const QByteArray &eventType, void *message, long #ifndef QT_NO_TABLETEVENT void QWidgetWindow::handleTabletEvent(QTabletEvent *event) { + static QPointer qt_tablet_target = 0; if (event->type() == QEvent::TabletPress) { QWidget *widget = m_widget->childAt(event->pos()); if (!widget)