We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5efccb1 commit 3039055Copy full SHA for 3039055
1 file changed
src/core/contestant.cpp
@@ -236,7 +236,20 @@ void Contestant::readFromStream(QDataStream &in) {
236
in >> message;
237
in >> score;
238
in >> timeUsed;
239
- in >> memoryUsed;
+ // memoryUsed 之前存储为 int 三维数组,现在改为了 qint64,因此先读取旧结构,再逐层转换
240
+ QList<QList<QList<int>>> oldMemoryUsed;
241
+ in >> oldMemoryUsed;
242
+ for (const auto &l1 : oldMemoryUsed) {
243
+ QList<QList<qint64>> newL1;
244
+ for (const auto &l2 : l1) {
245
+ QList<qint64> newL2;
246
+ for (int v : l2) {
247
+ newL2.append(v);
248
+ }
249
+ newL1.append(newL2);
250
251
+ memoryUsed.append(newL1);
252
253
quint32 judgingTime_date = 0;
254
quint32 judgingTime_time = 0;
255
quint8 judgingTime_timespec = 0;
0 commit comments