summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidgetwindow.cpp
diff options
context:
space:
mode:
authorSérgio Martins <sergio.martins@kdab.com>2015-05-24 00:33:18 +0100
committerSérgio Martins <sergio.martins@kdab.com>2015-05-25 08:12:52 +0000
commit8458b4054a8e5a2f90238d7973050a8d797fea7c (patch)
tree8f5c3bbca33b0fa239b91a3f6b0edfa709883cf1 /src/widgets/kernel/qwidgetwindow.cpp
parentdecd18536c1b021bc1f879a32be83372463a7f5b (diff)
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 <marc.mutz@kdab.com>
Diffstat (limited to 'src/widgets/kernel/qwidgetwindow.cpp')
-rw-r--r--src/widgets/kernel/qwidgetwindow.cpp2
1 files changed, 1 insertions, 1 deletions
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<QWidget> 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<QWidget> qt_tablet_target = 0;
if (event->type() == QEvent::TabletPress) {
QWidget *widget = m_widget->childAt(event->pos());
if (!widget)