qt 6.6.0 clean

This commit is contained in:
kleuter
2023-11-01 22:23:55 +01:00
parent 7b5ada15e7
commit 5d8194efa7
1449 changed files with 134276 additions and 31391 deletions

View File

@ -40,6 +40,7 @@ private slots:
void clearValues();
void clear();
void append();
void moveSemantics();
private:
std::unique_ptr<QSqlRecord> rec;
@ -449,5 +450,24 @@ void tst_QSqlRecord::value()
QCOMPARE(rec2.value("string").toString(), QLatin1String("Harry"));
}
void tst_QSqlRecord::moveSemantics()
{
QSqlRecord rec, empty;
rec.append(QSqlField("string", QMetaType(QMetaType::QString)));
rec.setValue("string", "Harry");
auto moved = std::move(rec);
// `rec` is not partially-formed
// moving transfers state:
QCOMPARE(moved.value("string").toString(), QLatin1String("Harry"));
// moved-from objects can be assigned-to:
rec = empty;
QVERIFY(rec.value("string").isNull());
// moved-from object can be destroyed:
moved = std::move(rec);
}
QTEST_MAIN(tst_QSqlRecord)
#include "tst_qsqlrecord.moc"