diff options
-rw-r--r-- | sources/pyside6/tests/pysidetest/flagstest.h | 4 | ||||
-rw-r--r-- | sources/pyside6/tests/pysidetest/hiddenobject.cpp | 2 | ||||
-rw-r--r-- | sources/pyside6/tests/pysidetest/hiddenobject.h | 6 | ||||
-rw-r--r-- | sources/pyside6/tests/pysidetest/testobject.h | 4 | ||||
-rw-r--r-- | sources/pyside6/tests/pysidetest/testview.cpp | 2 | ||||
-rw-r--r-- | sources/pyside6/tests/pysidetest/testview.h | 5 |
6 files changed, 13 insertions, 10 deletions
diff --git a/sources/pyside6/tests/pysidetest/flagstest.h b/sources/pyside6/tests/pysidetest/flagstest.h index 9058561f6..b5c73c9bd 100644 --- a/sources/pyside6/tests/pysidetest/flagstest.h +++ b/sources/pyside6/tests/pysidetest/flagstest.h @@ -23,8 +23,10 @@ class PYSIDETEST_API ClassForEnum : public QObject { Q_OBJECT public: + Q_DISABLE_COPY_MOVE(ClassForEnum) + ClassForEnum(FlagsNamespace::Options opt = FlagsNamespace::Option::NoOptions); - virtual ~ClassForEnum(); + virtual ~ClassForEnum() override; }; } // namespace FlagsNamespace diff --git a/sources/pyside6/tests/pysidetest/hiddenobject.cpp b/sources/pyside6/tests/pysidetest/hiddenobject.cpp index bba0de2ee..d4feabb66 100644 --- a/sources/pyside6/tests/pysidetest/hiddenobject.cpp +++ b/sources/pyside6/tests/pysidetest/hiddenobject.cpp @@ -8,7 +8,7 @@ void HiddenObject::callMe() m_called = true; } -bool HiddenObject::wasCalled() +bool HiddenObject::wasCalled() const { return m_called; } diff --git a/sources/pyside6/tests/pysidetest/hiddenobject.h b/sources/pyside6/tests/pysidetest/hiddenobject.h index e3d0abbef..f399be985 100644 --- a/sources/pyside6/tests/pysidetest/hiddenobject.h +++ b/sources/pyside6/tests/pysidetest/hiddenobject.h @@ -13,12 +13,12 @@ class HiddenObject : public QObject { Q_OBJECT public: - HiddenObject() : m_called(false) {} + HiddenObject() noexcept = default; Q_INVOKABLE void callMe(); public Q_SLOTS: - bool wasCalled(); + bool wasCalled() const; private: - bool m_called; + bool m_called = false; }; // Return a instance of HiddenObject diff --git a/sources/pyside6/tests/pysidetest/testobject.h b/sources/pyside6/tests/pysidetest/testobject.h index 359387730..d3f0b2018 100644 --- a/sources/pyside6/tests/pysidetest/testobject.h +++ b/sources/pyside6/tests/pysidetest/testobject.h @@ -29,10 +29,10 @@ class PYSIDETEST_API TestObject : public QObject { Q_OBJECT public: - static void createApp() { int argc=0; new QApplication(argc, 0); }; + static void createApp() { int argc=0; new QApplication(argc, nullptr); }; static int checkType(const QVariant& var) { return var.metaType().id(); } - TestObject(int idValue, QObject* parent = 0) : QObject(parent), m_idValue(idValue) {} + TestObject(int idValue, QObject* parent = nullptr) : QObject(parent), m_idValue(idValue) {} int idValue() const { return m_idValue; } static int staticMethodDouble(int value) { return value * 2; } void addChild(QObject* c) { m_children.append(c); emit childrenChanged(m_children); } diff --git a/sources/pyside6/tests/pysidetest/testview.cpp b/sources/pyside6/tests/pysidetest/testview.cpp index ade60682f..362239112 100644 --- a/sources/pyside6/tests/pysidetest/testview.cpp +++ b/sources/pyside6/tests/pysidetest/testview.cpp @@ -18,7 +18,7 @@ TestView::getData() QWidget* TestView::getEditorWidgetFromItemDelegate() const { - if (!m_delegate) + if (m_delegate == nullptr) return nullptr; QModelIndex index; diff --git a/sources/pyside6/tests/pysidetest/testview.h b/sources/pyside6/tests/pysidetest/testview.h index ee9ca9ce0..746def83e 100644 --- a/sources/pyside6/tests/pysidetest/testview.h +++ b/sources/pyside6/tests/pysidetest/testview.h @@ -18,7 +18,8 @@ class PYSIDETEST_API TestView : public QObject { Q_OBJECT public: - TestView(QAbstractListModel* model, QObject* parent = 0) : QObject(parent), m_model(model) {} + TestView(QAbstractListModel* model, QObject* parent = nullptr) : + QObject(parent), m_model(model) {} QAbstractListModel* model() { return m_model; } QVariant getData(); @@ -27,7 +28,7 @@ public: private: QAbstractListModel* m_model; - QAbstractItemDelegate* m_delegate; + QAbstractItemDelegate* m_delegate = nullptr; }; #endif // TESTVIEW_H |