summaryrefslogtreecommitdiff
path: root/src/widgets/kernel
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-08-06 10:45:40 +0200
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-08-06 10:54:01 +0200
commit77da617dc8e378a631ee8c15b1b414f16b87f147 (patch)
tree563f4f8e64e416774ea2b1599b896b589385168c /src/widgets/kernel
parentc17134e2db4d364855aa78a0d3c47cb9ef964dd9 (diff)
parent01f3530650f9f6f4c08520263a3c62281d81e3fc (diff)
downloadqtbase-77da617dc8e378a631ee8c15b1b414f16b87f147.tar.gz
Merge remote-tracking branch 'origin/5.5' into dev
Conflicts: doc/global/qt-cpp-defines.qdocconf src/3rdparty/forkfd/forkfd.c src/corelib/codecs/qtextcodec.cpp src/corelib/kernel/qmetatype.cpp src/corelib/tools/qset.qdoc src/gui/accessible/qaccessible.cpp src/gui/image/qpixmapcache.cpp src/opengl/qgl.cpp src/tools/qdoc/generator.cpp src/widgets/kernel/qwidget.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I4fbe1fa756a54c6843aa75f4ef70a1069ba7b085
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 d1070839fa..2a339cda4c 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);
@@ -1124,7 +1124,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