Added copyTo and copyTouchedTo methods to DbMsgFieldBase

This commit is contained in:
0xFEEDC0DE64
2018-09-01 17:02:21 +02:00
parent b5bd365834
commit 562e7187b4
3 changed files with 52 additions and 4 deletions
+15 -4
View File
@@ -8,17 +8,28 @@ int main(int argc, char **argv)
QCoreApplication app(argc, argv);
MyMessage message("Daniel", QDate(1996, 11, 12), QDateTime::currentDateTime(), 21, 80);
message.debug();
qDebug() << "changing name...";
QVariantMap map;
message.copyTo(map);
qDebug() << "full" << map;
message.setName("Peter");
message.debug();
map.clear();
message.copyTo(map);
qDebug() << "full" << map;
map.clear();
message.copyTouchedTo(map);
qDebug() << "delta:" << map;
qDebug() << "clearing touched...";
message.setTouched(false);
message.debug();
map.clear();
message.copyTouchedTo(map);
qDebug() << "delta:" << map;
return app.exec();
}