Skip to content

Commit 0cdaad8

Browse files
committed
#3357 appveyor: try to fix build process for Qt 5.7
Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
1 parent c2e5f73 commit 0cdaad8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/services/nextclouddeckservice.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,14 +325,22 @@ QList<NextcloudDeckService::Card> NextcloudDeckService::getCards() {
325325
qint64 createdAtTimestamp =
326326
object["createdAt"].toVariant().toLongLong();
327327
if (createdAtTimestamp > 0) {
328+
#if QT_VERSION < QT_VERSION_CHECK(5, 8, 0)
329+
card.createdAt = QDateTime::fromTime_t(createdAtTimestamp);
330+
#else
328331
card.createdAt = QDateTime::fromSecsSinceEpoch(createdAtTimestamp);
332+
#endif
329333
}
330334

331335
qint64 lastModifiedTimestamp =
332336
object["lastModified"].toVariant().toLongLong();
333337
if (lastModifiedTimestamp > 0) {
338+
#if QT_VERSION < QT_VERSION_CHECK(5, 8, 0)
339+
card.lastModified = QDateTime::fromTime_t(lastModifiedTimestamp);
340+
#else
334341
card.lastModified =
335342
QDateTime::fromSecsSinceEpoch(lastModifiedTimestamp);
343+
#endif
336344
}
337345

338346
qDebug() << __func__ << " - found card: " << card;

0 commit comments

Comments
 (0)