Added copyTo and copyTouchedTo methods to DbMsgFieldBase
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user