This commit is contained in:
Hamed Masafi 2020-08-10 17:41:48 +04:30
parent 9a10c53bee
commit 457d9a5d77
2 changed files with 4 additions and 5 deletions

View File

@ -196,12 +196,12 @@ Q_OUTOFLINE_TEMPLATE Query<T>::Query(Database *database, AbstractTableSet *table
} }
template<class T> template<class T>
Q_OUTOFLINE_TEMPLATE Query<T>::Query(const Query<T> &other) { Q_OUTOFLINE_TEMPLATE Query<T>::Query(const Query<T> &other) : AbstractQuery() {
d = other.d->clone(); d = other.d->clone();
} }
template<class T> template<class T>
Q_OUTOFLINE_TEMPLATE Query<T>::Query(Query<T> &&other) { Q_OUTOFLINE_TEMPLATE Query<T>::Query(Query<T> &&other) : AbstractQuery() {
d = std::move(other.d); d = std::move(other.d);
other.d = nullptr; other.d = nullptr;
} }

View File

@ -249,9 +249,8 @@ void BasicTest::testDate()
void BasicTest::testLimitedQuery() void BasicTest::testLimitedQuery()
{ {
auto q = db.comments()->query(); auto comments = db.comments()->query()
auto comments = q.toList(2); .toList(2);
qDebug() << q.sqlCommand();
QCOMPARE(comments.length(), 2); QCOMPARE(comments.length(), 2);
} }