summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-09-23 10:09:42 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-09-25 07:10:45 +0200
commitc2be9180b7430221e9136afb1a8c2a752ac2710f (patch)
tree5b390c53f4744c7bd4faeaf4d3a12d77ce3c0ba7 /src/widgets
parent31a1b3280cf076fcdb45a658d0140af3737be138 (diff)
Replace Q_REQUIRED_RESULT with [[nodiscard]]
It was already used many places directly making the code inconsistent. Change-Id: I3b14bc6c333640fb3ba33c71eba97e78c973e44b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/kernel/qsizepolicy.h2
-rw-r--r--src/widgets/kernel/qtestsupport_widgets.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/kernel/qsizepolicy.h b/src/widgets/kernel/qsizepolicy.h
index 9de88dffb0..24db99354b 100644
--- a/src/widgets/kernel/qsizepolicy.h
+++ b/src/widgets/kernel/qsizepolicy.h
@@ -134,7 +134,7 @@ public:
constexpr void setRetainSizeWhenHidden(bool retainSize) noexcept { bits.retainSizeWhenHidden = retainSize; }
constexpr void transpose() noexcept { *this = transposed(); }
- Q_REQUIRED_RESULT constexpr QSizePolicy transposed() const noexcept
+ [[nodiscard]] constexpr QSizePolicy transposed() const noexcept
{
return QSizePolicy(bits.transposed());
}
diff --git a/src/widgets/kernel/qtestsupport_widgets.h b/src/widgets/kernel/qtestsupport_widgets.h
index 032cab10a8..b375b7264b 100644
--- a/src/widgets/kernel/qtestsupport_widgets.h
+++ b/src/widgets/kernel/qtestsupport_widgets.h
@@ -50,8 +50,8 @@ class QWidget;
namespace QTest {
-Q_REQUIRED_RESULT Q_WIDGETS_EXPORT bool qWaitForWindowActive(QWidget *widget, int timeout = 5000);
-Q_REQUIRED_RESULT Q_WIDGETS_EXPORT bool qWaitForWindowExposed(QWidget *widget, int timeout = 5000);
+[[nodiscard]] Q_WIDGETS_EXPORT bool qWaitForWindowActive(QWidget *widget, int timeout = 5000);
+[[nodiscard]] Q_WIDGETS_EXPORT bool qWaitForWindowExposed(QWidget *widget, int timeout = 5000);
class Q_WIDGETS_EXPORT QTouchEventWidgetSequence : public QTouchEventSequence
{