summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-05-07 11:44:37 +0200
committerLiang Qi <liang.qi@qt.io>2019-05-07 11:58:30 +0200
commitc2b553784dfbe0ece90f79709639e27e74359a7d (patch)
tree04b0c74c7417a5f1b628d0b18a07f9dd8be1df60 /src/widgets
parent0b373c2e36a68aedf3731fcb3cd84fd010c2d67c (diff)
parent8ea0a82a6a771dd76df2d51c6ef3ed966a5b9b45 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts: src/corelib/kernel/qobject.cpp src/corelib/kernel/qvariant.h src/corelib/tools/qlist.h Done-With: Milian Wolff <milian.wolff@kdab.com> Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io> Change-Id: I6803f7239aa137a51a7467fab7cc7a01302a848d
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/itemviews/qabstractitemdelegate.cpp2
-rw-r--r--src/widgets/kernel/qapplication.cpp19
-rw-r--r--src/widgets/qtwidgets.tracepoints5
-rw-r--r--src/widgets/styles/qstyleoption.h23
-rw-r--r--src/widgets/widgets/qwidgetanimator.cpp6
-rw-r--r--src/widgets/widgets/qwidgetanimator_p.h2
6 files changed, 42 insertions, 15 deletions
diff --git a/src/widgets/itemviews/qabstractitemdelegate.cpp b/src/widgets/itemviews/qabstractitemdelegate.cpp
index 448e775a71..31dde8832b 100644
--- a/src/widgets/itemviews/qabstractitemdelegate.cpp
+++ b/src/widgets/itemviews/qabstractitemdelegate.cpp
@@ -388,6 +388,8 @@ bool QAbstractItemDelegate::helpEvent(QHelpEvent *event,
const QModelIndex &index)
{
Q_D(QAbstractItemDelegate);
+ Q_UNUSED(d);
+ Q_UNUSED(index);
Q_UNUSED(option);
if (!event || !view)
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index 1d26fb6697..c1c4014c6b 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -3696,14 +3696,17 @@ bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e)
// to the ones in QCoreApplicationPrivate::notify_helper; the reason for their
// duplication is because tracepoint symbols are not exported by QtCore.
// If you adjust the tracepoints here, consider adjusting QCoreApplicationPrivate too.
- Q_TRACE_SCOPE(QApplication_notify, receiver, e, e->type());
+ Q_TRACE(QApplication_notify_entry, receiver, e, e->type());
+ bool consumed = false;
+ bool filtered = false;
+ Q_TRACE_EXIT(QApplication_notify_exit, consumed, filtered);
// send to all application event filters
if (threadRequiresCoreApplication()
&& receiver->d_func()->threadData->thread == mainThread()
&& sendThroughApplicationEventFilters(receiver, e)) {
- Q_TRACE(QApplication_notify_event_filtered, receiver, e, e->type());
- return true;
+ filtered = true;
+ return filtered;
}
if (receiver->isWidgetType()) {
@@ -3725,16 +3728,12 @@ bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e)
// send to all receiver event filters
if (sendThroughObjectEventFilters(receiver, e)) {
- Q_TRACE(QApplication_notify_event_filtered, receiver, e, e->type());
- return true;
+ filtered = true;
+ return filtered;
}
- Q_TRACE(QApplication_notify_before_delivery, receiver, e, e->type());
-
// deliver the event
- const bool consumed = receiver->event(e);
-
- Q_TRACE(QApplication_notify_after_delivery, receiver, e, e->type(), consumed);
+ consumed = receiver->event(e);
QCoreApplicationPrivate::setEventSpontaneous(e, false);
return consumed;
diff --git a/src/widgets/qtwidgets.tracepoints b/src/widgets/qtwidgets.tracepoints
index 9c40cdb3e7..b967aaf4aa 100644
--- a/src/widgets/qtwidgets.tracepoints
+++ b/src/widgets/qtwidgets.tracepoints
@@ -5,7 +5,4 @@ QT_END_NAMESPACE
}
QApplication_notify_entry(QObject *receiver, QEvent *event, int type)
-QApplication_notify_exit(QObject *receiver, QEvent *event, int type)
-QApplication_notify_event_filtered(QObject *receiver, QEvent *event, int type)
-QApplication_notify_before_delivery(QObject *receiver, QEvent *event, int type)
-QApplication_notify_after_delivery(QObject *receiver, QEvent *event, int type, bool consumed)
+QApplication_notify_exit(bool consumed, bool filtered)
diff --git a/src/widgets/styles/qstyleoption.h b/src/widgets/styles/qstyleoption.h
index 8ae07efc81..763575ff5b 100644
--- a/src/widgets/styles/qstyleoption.h
+++ b/src/widgets/styles/qstyleoption.h
@@ -118,6 +118,7 @@ public:
QStyleOptionFocusRect();
QStyleOptionFocusRect(const QStyleOptionFocusRect &other) : QStyleOption(Version, Type) { *this = other; }
+ QStyleOptionFocusRect &operator=(const QStyleOptionFocusRect &other) = default;
protected:
QStyleOptionFocusRect(int version);
@@ -142,6 +143,7 @@ public:
QStyleOptionFrame();
QStyleOptionFrame(const QStyleOptionFrame &other) : QStyleOption(Version, Type) { *this = other; }
+ QStyleOptionFrame &operator=(const QStyleOptionFrame &other) = default;
protected:
QStyleOptionFrame(int version);
@@ -171,6 +173,7 @@ public:
QStyleOptionTabWidgetFrame();
inline QStyleOptionTabWidgetFrame(const QStyleOptionTabWidgetFrame &other)
: QStyleOption(Version, Type) { *this = other; }
+ QStyleOptionTabWidgetFrame &operator=(const QStyleOptionTabWidgetFrame &other) = default;
protected:
QStyleOptionTabWidgetFrame(int version);
@@ -194,6 +197,7 @@ public:
QStyleOptionTabBarBase();
QStyleOptionTabBarBase(const QStyleOptionTabBarBase &other) : QStyleOption(Version, Type) { *this = other; }
+ QStyleOptionTabBarBase &operator=(const QStyleOptionTabBarBase &other) = default;
protected:
QStyleOptionTabBarBase(int version);
@@ -225,6 +229,7 @@ public:
QStyleOptionHeader();
QStyleOptionHeader(const QStyleOptionHeader &other) : QStyleOption(Version, Type) { *this = other; }
+ QStyleOptionHeader &operator=(const QStyleOptionHeader &other) = default;
protected:
QStyleOptionHeader(int version);
@@ -247,6 +252,7 @@ public:
QStyleOptionButton();
QStyleOptionButton(const QStyleOptionButton &other) : QStyleOption(Version, Type) { *this = other; }
+ QStyleOptionButton &operator=(const QStyleOptionButton &other) = default;
protected:
QStyleOptionButton(int version);
@@ -284,6 +290,7 @@ public:
QStyleOptionTab();
QStyleOptionTab(const QStyleOptionTab &other) : QStyleOption(Version, Type) { *this = other; }
+ QStyleOptionTab &operator=(const QStyleOptionTab &other) = default;
protected:
QStyleOptionTab(int version);
@@ -314,6 +321,7 @@ public:
int midLineWidth;
QStyleOptionToolBar();
QStyleOptionToolBar(const QStyleOptionToolBar &other) : QStyleOption(Version, Type) { *this = other; }
+ QStyleOptionToolBar &operator=(const QStyleOptionToolBar &other) = default;
protected:
QStyleOptionToolBar(int version);
@@ -341,6 +349,7 @@ public:
QStyleOptionProgressBar();
QStyleOptionProgressBar(const QStyleOptionProgressBar &other) : QStyleOption(Version, Type) { *this = other; }
+ QStyleOptionProgressBar &operator=(const QStyleOptionProgressBar &other) = default;
protected:
QStyleOptionProgressBar(int version);
@@ -371,6 +380,7 @@ public:
QStyleOptionMenuItem();
QStyleOptionMenuItem(const QStyleOptionMenuItem &other) : QStyleOption(Version, Type) { *this = other; }
+ QStyleOptionMenuItem &operator=(const QStyleOptionMenuItem &other) = default;
protected:
QStyleOptionMenuItem(int version);
@@ -390,6 +400,7 @@ public:
QStyleOptionDockWidget();
QStyleOptionDockWidget(const QStyleOptionDockWidget &other) : QStyleOption(Version, Type) { *this = other; }
+ QStyleOptionDockWidget &operator=(const QStyleOptionDockWidget &other) = default;
protected:
QStyleOptionDockWidget(int version);
@@ -441,6 +452,7 @@ public:
QStyleOptionViewItem();
QStyleOptionViewItem(const QStyleOptionViewItem &other) : QStyleOption(Version, Type) { *this = other; }
+ QStyleOptionViewItem &operator=(const QStyleOptionViewItem &other) = default;
protected:
QStyleOptionViewItem(int version);
@@ -471,6 +483,7 @@ public:
QStyleOptionToolBox();
QStyleOptionToolBox(const QStyleOptionToolBox &other) : QStyleOption(Version, Type) { *this = other; }
+ QStyleOptionToolBox &operator=(const QStyleOptionToolBox &other) = default;
protected:
QStyleOptionToolBox(int version);
@@ -490,6 +503,7 @@ public:
QStyleOptionRubberBand();
QStyleOptionRubberBand(const QStyleOptionRubberBand &other) : QStyleOption(Version, Type) { *this = other; }
+ QStyleOptionRubberBand &operator=(const QStyleOptionRubberBand &other) = default;
protected:
QStyleOptionRubberBand(int version);
@@ -508,6 +522,7 @@ public:
QStyleOptionComplex(int version = QStyleOptionComplex::Version, int type = SO_Complex);
QStyleOptionComplex(const QStyleOptionComplex &other) : QStyleOption(Version, Type) { *this = other; }
+ QStyleOptionComplex &operator=(const QStyleOptionComplex &other) = default;
};
#if QT_CONFIG(slider)
@@ -532,6 +547,7 @@ public:
QStyleOptionSlider();
QStyleOptionSlider(const QStyleOptionSlider &other) : QStyleOptionComplex(Version, Type) { *this = other; }
+ QStyleOptionSlider &operator=(const QStyleOptionSlider &other) = default;
protected:
QStyleOptionSlider(int version);
@@ -551,6 +567,7 @@ public:
QStyleOptionSpinBox();
QStyleOptionSpinBox(const QStyleOptionSpinBox &other) : QStyleOptionComplex(Version, Type) { *this = other; }
+ QStyleOptionSpinBox &operator=(const QStyleOptionSpinBox &other) = default;
protected:
QStyleOptionSpinBox(int version);
@@ -578,6 +595,7 @@ public:
QStyleOptionToolButton();
QStyleOptionToolButton(const QStyleOptionToolButton &other) : QStyleOptionComplex(Version, Type) { *this = other; }
+ QStyleOptionToolButton &operator=(const QStyleOptionToolButton &other) = default;
protected:
QStyleOptionToolButton(int version);
@@ -600,6 +618,7 @@ public:
QStyleOptionComboBox();
QStyleOptionComboBox(const QStyleOptionComboBox &other) : QStyleOptionComplex(Version, Type) { *this = other; }
+ QStyleOptionComboBox &operator=(const QStyleOptionComboBox &other) = default;
protected:
QStyleOptionComboBox(int version);
@@ -618,6 +637,7 @@ public:
QStyleOptionTitleBar();
QStyleOptionTitleBar(const QStyleOptionTitleBar &other) : QStyleOptionComplex(Version, Type) { *this = other; }
+ QStyleOptionTitleBar &operator=(const QStyleOptionTitleBar &other) = default;
protected:
QStyleOptionTitleBar(int version);
@@ -638,6 +658,7 @@ public:
QStyleOptionGroupBox();
QStyleOptionGroupBox(const QStyleOptionGroupBox &other) : QStyleOptionComplex(Version, Type) { *this = other; }
+ QStyleOptionGroupBox &operator=(const QStyleOptionGroupBox &other) = default;
protected:
QStyleOptionGroupBox(int version);
};
@@ -652,6 +673,7 @@ public:
QStyleOptionSizeGrip();
QStyleOptionSizeGrip(const QStyleOptionSizeGrip &other) : QStyleOptionComplex(Version, Type) { *this = other; }
+ QStyleOptionSizeGrip &operator=(const QStyleOptionSizeGrip &other) = default;
protected:
QStyleOptionSizeGrip(int version);
};
@@ -668,6 +690,7 @@ public:
QStyleOptionGraphicsItem();
QStyleOptionGraphicsItem(const QStyleOptionGraphicsItem &other) : QStyleOption(Version, Type) { *this = other; }
+ QStyleOptionGraphicsItem &operator=(const QStyleOptionGraphicsItem &other) = default;
static qreal levelOfDetailFromTransform(const QTransform &worldTransform);
protected:
QStyleOptionGraphicsItem(int version);
diff --git a/src/widgets/widgets/qwidgetanimator.cpp b/src/widgets/widgets/qwidgetanimator.cpp
index b1e527e3b6..486d65d92c 100644
--- a/src/widgets/widgets/qwidgetanimator.cpp
+++ b/src/widgets/widgets/qwidgetanimator.cpp
@@ -50,8 +50,12 @@
QT_BEGIN_NAMESPACE
-QWidgetAnimator::QWidgetAnimator(QMainWindowLayout *layout) : m_mainWindowLayout(layout)
+QWidgetAnimator::QWidgetAnimator(QMainWindowLayout *layout)
+#if QT_CONFIG(mainwindow)
+: m_mainWindowLayout(layout)
+#endif
{
+ Q_UNUSED(layout)
}
void QWidgetAnimator::abort(QWidget *w)
diff --git a/src/widgets/widgets/qwidgetanimator_p.h b/src/widgets/widgets/qwidgetanimator_p.h
index 920cc3ffc8..9d08d03593 100644
--- a/src/widgets/widgets/qwidgetanimator_p.h
+++ b/src/widgets/widgets/qwidgetanimator_p.h
@@ -81,7 +81,9 @@ private Q_SLOTS:
private:
typedef QHash<QWidget*, QPointer<QPropertyAnimation> > AnimationMap;
AnimationMap m_animation_map;
+#if QT_CONFIG(mainwindow)
QMainWindowLayout *m_mainWindowLayout;
+#endif
};
QT_END_NAMESPACE