summaryrefslogtreecommitdiffstats
path: root/examples/widgets
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-02-26 01:00:25 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2020-02-26 18:39:21 +0100
commit75c0ffaf6d2b92cdf26092e01acdd5af4afeac97 (patch)
treebb9e85c21248790ec99b3665928872e39b14db64 /examples/widgets
parent4753d69d8934258de7fb64550e50a5cbb9b5603f (diff)
parent462c2745a5168a5b57381d05779b5d16aebe018e (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts: examples/network/bearermonitor/CMakeLists.txt examples/network/CMakeLists.txt src/corelib/tools/qlinkedlist.h src/sql/kernel/qsqldriver_p.h src/sql/kernel/qsqlresult_p.h src/widgets/kernel/qwidget.cpp src/widgets/kernel/qwidget_p.h tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp tests/auto/tools/moc/allmocs_baseline_in.json Change-Id: I21a3c34570ae79ea9d30107fae71759d7eac17d9
Diffstat (limited to 'examples/widgets')
-rw-r--r--examples/widgets/doc/src/syntaxhighlighter.qdoc6
-rw-r--r--examples/widgets/widgets/tablet/tabletcanvas.cpp8
2 files changed, 5 insertions, 9 deletions
diff --git a/examples/widgets/doc/src/syntaxhighlighter.qdoc b/examples/widgets/doc/src/syntaxhighlighter.qdoc
index 8583d86114..618b387ed5 100644
--- a/examples/widgets/doc/src/syntaxhighlighter.qdoc
+++ b/examples/widgets/doc/src/syntaxhighlighter.qdoc
@@ -246,11 +246,7 @@
\section1 Other Code Editor Features
- It is possible to implement parenthesis matching with
- QSyntaxHighlighter. The "Matching Parentheses with
- QSyntaxHighlighter" article in Qt Quarterly 31
- (\l{http://doc.qt.io/archives/qq/}) implements this. We also have
- the \l{Code Editor Example}, which shows how to implement line
+ The \l{Code Editor Example} shows how to implement line
numbers and how to highlight the current line.
*/
diff --git a/examples/widgets/widgets/tablet/tabletcanvas.cpp b/examples/widgets/widgets/tablet/tabletcanvas.cpp
index 59ca608cef..90a5017500 100644
--- a/examples/widgets/widgets/tablet/tabletcanvas.cpp
+++ b/examples/widgets/widgets/tablet/tabletcanvas.cpp
@@ -106,7 +106,7 @@ void TabletCanvas::tabletEvent(QTabletEvent *event)
break;
case QEvent::TabletMove:
#ifndef Q_OS_IOS
- if (event->device() == QTabletEvent::RotationStylus)
+ if (event->deviceType() == QTabletEvent::RotationStylus)
updateCursor(event);
#endif
if (m_deviceDown) {
@@ -161,7 +161,7 @@ void TabletCanvas::paintPixmap(QPainter &painter, QTabletEvent *event)
static qreal maxPenRadius = pressureToWidth(1.0);
painter.setRenderHint(QPainter::Antialiasing);
- switch (event->device()) {
+ switch (event->deviceType()) {
//! [6]
case QTabletEvent::Airbrush:
{
@@ -251,7 +251,7 @@ void TabletCanvas::updateBrush(const QTabletEvent *event)
m_color.setAlphaF(event->pressure());
break;
case TangentialPressureValuator:
- if (event->device() == QTabletEvent::Airbrush)
+ if (event->deviceType() == QTabletEvent::Airbrush)
m_color.setAlphaF(qMax(0.01, (event->tangentialPressure() + 1.0) / 2.0));
else
m_color.setAlpha(255);
@@ -312,7 +312,7 @@ void TabletCanvas::updateCursor(const QTabletEvent *event)
if (event->pointerType() == QTabletEvent::Eraser) {
cursor = QCursor(QPixmap(":/images/cursor-eraser.png"), 3, 28);
} else {
- switch (event->device()) {
+ switch (event->deviceType()) {
case QTabletEvent::Stylus:
cursor = QCursor(QPixmap(":/images/cursor-pencil.png"), 0, 0);
break;