summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@theqtcompany.com>2015-08-09 07:06:52 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2015-08-09 07:06:52 +0000
commit5bfac9d653357c906946563b9494d7ae69cdad92 (patch)
tree0cc119af894a398497eba6f56fe2f224f6947616 /src/widgets/kernel
parentf08e1ecdc88e9373a31c1505d5db7f905431c644 (diff)
parent77da617dc8e378a631ee8c15b1b414f16b87f147 (diff)
Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r--src/widgets/kernel/qaction.cpp11
-rw-r--r--src/widgets/kernel/qwidget.cpp49
-rw-r--r--src/widgets/kernel/qwidgetbackingstore.cpp4
-rw-r--r--src/widgets/kernel/qwidgetwindow.cpp2
4 files changed, 55 insertions, 11 deletions
diff --git a/src/widgets/kernel/qaction.cpp b/src/widgets/kernel/qaction.cpp
index 255ffbd258..95c4877eb9 100644
--- a/src/widgets/kernel/qaction.cpp
+++ b/src/widgets/kernel/qaction.cpp
@@ -58,14 +58,9 @@ QT_BEGIN_NAMESPACE
static QString qt_strippedText(QString s)
{
s.remove( QString::fromLatin1("...") );
- int i = 0;
- while (i < s.size()) {
- ++i;
- if (s.at(i-1) != QLatin1Char('&'))
- continue;
- if (i < s.size() && s.at(i) == QLatin1Char('&'))
- ++i;
- s.remove(i-1,1);
+ for (int i = 0; i < s.size(); ++i) {
+ if (s.at(i) == QLatin1Char('&'))
+ s.remove(i, 1);
}
return s.trimmed();
}
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 9195c1e5fa..1ebf782edf 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -12681,11 +12681,21 @@ void QWidget::initPainter(QPainter *painter) const
painter->d_func()->state->font = f;
}
+/*!
+ \internal
+
+ Do PaintDevice rendering with the specified \a offset.
+*/
QPaintDevice *QWidget::redirected(QPoint *offset) const
{
return d_func()->redirected(offset);
}
+/*!
+ \internal
+
+ A painter that is shared among other instances of QPainter.
+*/
QPainter *QWidget::sharedPainter() const
{
// Someone sent a paint event directly to the widget
@@ -12887,6 +12897,45 @@ QDebug operator<<(QDebug debug, const QWidget *widget)
}
#endif // !QT_NO_DEBUG_STREAM
+/*! \fn Qt::HANDLE QWidget::macCGHandle() const
+ \internal
+
+ Returns the CoreGraphics handle of the widget. Use of this function is not portable.
+ This function will return 0 if no painter context can be established, or if the handle
+ could not be created.
+
+ \warning This function is only available on OS X.
+*/
+/*! \fn Qt::HANDLE QWidget::macQDHandle() const
+ \internal
+
+ Returns the QuickDraw handle of the widget. Use of this function is not portable.
+ This function will return 0 if QuickDraw is not supported, or if the handle could
+ not be created.
+
+ \warning This function is only available on OS X.
+*/
+/*! \fn const QX11Info &QWidget::x11Info() const
+ \internal
+
+ Returns information about the configuration of the X display used to display
+ the widget.
+
+ \warning This function is only available on X11.
+*/
+
+/*! \fn Qt::HANDLE QWidget::x11PictureHandle() const
+ \internal
+
+ Returns the X11 picture handle of the widget for XRender
+ support. Use of this function is not portable. This function will
+ return 0 if XRender support is not compiled into Qt, if the
+ XRender extension is not supported on the X11 display, or if the
+ handle could not be created.
+
+ \warning This function is only available on X11.
+
+*/
QT_END_NAMESPACE
#include "moc_qwidget.cpp"
diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp
index fff75d829f..69958636fd 100644
--- a/src/widgets/kernel/qwidgetbackingstore.cpp
+++ b/src/widgets/kernel/qwidgetbackingstore.cpp
@@ -74,7 +74,7 @@ void QWidgetBackingStore::qt_flush(QWidget *widget, const QRegion &region, QBack
Q_UNUSED(widgetTextures);
Q_ASSERT(!region.isEmpty());
#else
- Q_ASSERT(!region.isEmpty() || (widgetTextures && widgetTextures->count()));
+ Q_ASSERT(!region.isEmpty() || widgetTextures);
#endif
Q_ASSERT(widget);
Q_ASSERT(backingStore);
@@ -1123,7 +1123,7 @@ void QWidgetBackingStore::doSync()
widgetTextures = new QPlatformTextureList;
findTextureWidgetsRecursively(tlw, tlw, widgetTextures);
}
- qt_window_private(tlw->windowHandle())->compositing = widgetTextures && !widgetTextures->isEmpty();
+ qt_window_private(tlw->windowHandle())->compositing = widgetTextures;
fullUpdatePending = false;
#endif
diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp
index 633e710853..58436a7d92 100644
--- a/src/widgets/kernel/qwidgetwindow.cpp
+++ b/src/widgets/kernel/qwidgetwindow.cpp
@@ -892,7 +892,7 @@ void QWidgetWindow::handleTabletEvent(QTabletEvent *event)
QGuiApplication::sendSpontaneousEvent(qt_tablet_target, &ev);
}
- if (event->type() == QEvent::TabletRelease)
+ if (event->type() == QEvent::TabletRelease && event->buttons() == Qt::NoButton)
qt_tablet_target = 0;
}
#endif // QT_NO_TABLETEVENT