From 7b0d6dce4b00c190b57da1edc65cd129765cdd24 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Wed, 6 Apr 2011 17:18:09 +1000 Subject: Fix missing equality and inequality operator docs for QPointer. Task-number: QTBUG-18565 Reviewed-by: Rohan McGovern --- src/corelib/kernel/qpointer.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/corelib/kernel/qpointer.cpp b/src/corelib/kernel/qpointer.cpp index 7d63088..73f695b 100644 --- a/src/corelib/kernel/qpointer.cpp +++ b/src/corelib/kernel/qpointer.cpp @@ -183,6 +183,7 @@ /*! \fn bool operator==(const T *o, const QPointer &p) + \relates QPointer Equality operator. Returns true if \a o and the guarded pointer \a p are pointing to the same object, otherwise @@ -191,6 +192,7 @@ */ /*! \fn bool operator==(const QPointer &p, const T *o) + \relates QPointer Equality operator. Returns true if \a o and the guarded pointer \a p are pointing to the same object, otherwise @@ -199,6 +201,7 @@ */ /*! \fn bool operator==(T *o, const QPointer &p) + \relates QPointer Equality operator. Returns true if \a o and the guarded pointer \a p are pointing to the same object, otherwise @@ -207,6 +210,7 @@ */ /*! \fn bool operator==(const QPointer &p, T *o) + \relates QPointer Equality operator. Returns true if \a o and the guarded pointer \a p are pointing to the same object, otherwise @@ -215,6 +219,7 @@ */ /*! \fn bool operator==(const QPointer &p1, const QPointer &p2) + \relates QPointer Equality operator. Returns true if the guarded pointers \a p1 and \a p2 are pointing to the same object, otherwise @@ -225,6 +230,7 @@ /*! \fn bool operator!=(const T *o, const QPointer &p) + \relates QPointer Inequality operator. Returns true if \a o and the guarded pointer \a p are not pointing to the same object, otherwise @@ -232,6 +238,7 @@ */ /*! \fn bool operator!=(const QPointer &p, const T *o) + \relates QPointer Inequality operator. Returns true if \a o and the guarded pointer \a p are not pointing to the same object, otherwise @@ -239,6 +246,7 @@ */ /*! \fn bool operator!=(T *o, const QPointer &p) + \relates QPointer Inequality operator. Returns true if \a o and the guarded pointer \a p are not pointing to the same object, otherwise @@ -246,6 +254,7 @@ */ /*! \fn bool operator!=(const QPointer &p, T *o) + \relates QPointer Inequality operator. Returns true if \a o and the guarded pointer \a p are not pointing to the same object, otherwise @@ -253,6 +262,7 @@ */ /*! \fn bool operator!=(const QPointer &p1, const QPointer &p2) + \relates QPointer Inequality operator. Returns true if the guarded pointers \a p1 and \a p2 are not pointing to the same object, otherwise -- cgit v0.12 From ed3703f6779e7bc94744347eeb4d925d0f7f267c Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Mon, 11 Apr 2011 12:43:28 +1000 Subject: Remove autotest code related to old Qt versions Reviewed-by: Rohan McGovern --- tests/auto/qbuttongroup/tst_qbuttongroup.cpp | 10 +--------- tests/auto/qeasingcurve/tst_qeasingcurve.cpp | 6 ------ tests/auto/qsharedpointer/tst_qsharedpointer.cpp | 4 +--- tests/auto/selftests/tst_selftests.cpp | 14 -------------- tests/auto/symbols/tst_symbols.cpp | 4 ---- 5 files changed, 2 insertions(+), 36 deletions(-) diff --git a/tests/auto/qbuttongroup/tst_qbuttongroup.cpp b/tests/auto/qbuttongroup/tst_qbuttongroup.cpp index a809101..34be20c 100644 --- a/tests/auto/qbuttongroup/tst_qbuttongroup.cpp +++ b/tests/auto/qbuttongroup/tst_qbuttongroup.cpp @@ -98,10 +98,7 @@ private slots: void task106609(); - // fixed for Qt 4.6.0 -#if QT_VERSION >= 0x040600 void autoIncrementId(); -#endif void task209485_removeFromGroupInEventHandler_data(); void task209485_removeFromGroupInEventHandler(); @@ -338,10 +335,7 @@ void tst_QButtonGroup::testSignals() QCOMPARE(clickedSpy.count(), 1); QCOMPARE(clickedIdSpy.count(), 1); - int expectedId = -1; -#if QT_VERSION >= 0x040600 - expectedId = -2; -#endif + int expectedId = -2; QVERIFY(clickedIdSpy.takeFirst().at(0).toInt() == expectedId); QCOMPARE(pressedSpy.count(), 1); @@ -500,7 +494,6 @@ void tst_QButtonGroup::task209485_removeFromGroupInEventHandler() QCOMPARE(spy1.count() + spy2.count(), signalCount); } -#if QT_VERSION >= 0x040600 void tst_QButtonGroup::autoIncrementId() { QDialog dlg(0); @@ -529,7 +522,6 @@ void tst_QButtonGroup::autoIncrementId() dlg.show(); } -#endif QTEST_MAIN(tst_QButtonGroup) #include "tst_qbuttongroup.moc" diff --git a/tests/auto/qeasingcurve/tst_qeasingcurve.cpp b/tests/auto/qeasingcurve/tst_qeasingcurve.cpp index 327b6f3..f10d35b 100644 --- a/tests/auto/qeasingcurve/tst_qeasingcurve.cpp +++ b/tests/auto/qeasingcurve/tst_qeasingcurve.cpp @@ -42,10 +42,6 @@ #include -#if QT_VERSION < 0x040200 -QTEST_NOOP_MAIN -#else - #include //TESTED_CLASS= @@ -578,5 +574,3 @@ void tst_QEasingCurve::metaTypes() QTEST_MAIN(tst_QEasingCurve) #include "tst_qeasingcurve.moc" - -#endif //QT_VERSION diff --git a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp index e7c8175..bb04621 100644 --- a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp +++ b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp @@ -698,7 +698,7 @@ void tst_QSharedPointer::noSharedPointerFromWeakQObject() QSharedPointer strong = weak.toStrongRef(); QVERIFY(strong.isNull()); - // is something went wrong, we'll probably crash here + // if something went wrong, we'll probably crash here } void tst_QSharedPointer::weakQObjectFromSharedPointer() @@ -1747,7 +1747,6 @@ void tst_QSharedPointer::invalidConstructs_data() "QSharedPointer b;\n" "if (a + b) return;"; -#if QT_VERSION >= 0x040600 // two objects with the same pointer QTest::newRow("same-pointer") << &QTest::QExternalTest::tryRunFail @@ -1761,7 +1760,6 @@ void tst_QSharedPointer::invalidConstructs_data() << "Data *aData = new Data;\n" "QSharedPointer ptr1 = QSharedPointer(aData);" "ptr1 = QSharedPointer(aData);"; -#endif // any type of cast for unrelated types: // (we have no reinterpret_cast) diff --git a/tests/auto/selftests/tst_selftests.cpp b/tests/auto/selftests/tst_selftests.cpp index 0d27d38..1c01c5f 100644 --- a/tests/auto/selftests/tst_selftests.cpp +++ b/tests/auto/selftests/tst_selftests.cpp @@ -515,8 +515,6 @@ BenchmarkResult BenchmarkResult::parse(QString const& line, QString* error) } bool ok; -#if QT_VERSION >= 0x040700 - // Qt 4.7 uses floating point double total = sTotal.toDouble(&ok); if (!ok) { if (error) *error = sTotal + " is not a valid number"; @@ -527,18 +525,6 @@ BenchmarkResult BenchmarkResult::parse(QString const& line, QString* error) if (error) *error = sIterations + " is not a valid number"; return out; } -#else - qlonglong total = sTotal.toLongLong(&ok); - if (!ok) { - if (error) *error = sTotal + " is not a valid integer"; - return out; - } - qlonglong iterations = sIterations.toLongLong(&ok); - if (!ok) { - if (error) *error = sIterations + " is not a valid integer"; - return out; - } -#endif out.unit = unit; out.total = total; diff --git a/tests/auto/symbols/tst_symbols.cpp b/tests/auto/symbols/tst_symbols.cpp index db1cbea..6f21c71 100644 --- a/tests/auto/symbols/tst_symbols.cpp +++ b/tests/auto/symbols/tst_symbols.cpp @@ -169,11 +169,7 @@ void tst_Symbols::globalObjects() } if (isFailed) { -#if QT_VERSION >= 0x040600 QVERIFY2(!isFailed, "Libraries contain static global objects. See Debug output above."); -#else - QSKIP("Libraries contains static global objects. See Debug output above. [These errors cannot be fixed in 4.5 in time]", SkipSingle); -#endif } } -- cgit v0.12