diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2013-04-06 17:42:47 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2013-04-06 17:42:47 +0200 |
commit | b04a2a981a91ed58e55a275402cb2f9f73bd85a2 (patch) | |
tree | 1fc1690f78fb40de214bc95361dff5fcbe516d0c /fetchtopicsaction.cpp | |
parent | a4626f5306ed3c5e52c28bb49d61ec50c7c2f329 (diff) | |
download | tapasboard-b04a2a981a91ed58e55a275402cb2f9f73bd85a2.tar.gz tapasboard-b04a2a981a91ed58e55a275402cb2f9f73bd85a2.zip |
timezone issue was tapatalk plugin bug, so remove workaround
Diffstat (limited to 'fetchtopicsaction.cpp')
-rw-r--r-- | fetchtopicsaction.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/fetchtopicsaction.cpp b/fetchtopicsaction.cpp index d71bdca..9e42723 100644 --- a/fetchtopicsaction.cpp +++ b/fetchtopicsaction.cpp @@ -85,13 +85,13 @@ void FetchTopicsAction::handleFinishedCall() query.bindValue(":forum_id", forum_id); query.bindValue(":topic_id", topic_id); - query.bindValue(":topic_title", unencodeTopicText(topic["topic_title"])); + query.bindValue(":topic_title", decodeTopicText(topic["topic_title"])); query.bindValue(":topic_author_id", topic["topic_author_id"].toInt()); - query.bindValue(":topic_author_name", unencodeTopicText(topic["topic_author_name"])); + query.bindValue(":topic_author_name", decodeTopicText(topic["topic_author_name"])); query.bindValue(":is_subscribed", topic["is_subscribed"].toBool() ? 1 : 0); query.bindValue(":is_closed", topic["is_closed"].toBool() ? 1 : 0); query.bindValue(":icon_url", topic["icon_url"].toString()); - query.bindValue(":last_reply_time", unencodeDateTime(topic["last_reply_time"])); + query.bindValue(":last_reply_time", topic["last_reply_time"].toDateTime().toUTC()); query.bindValue(":reply_number", topic["reply_number"].toInt()); query.bindValue(":new_post", topic["new_post"].toBool() ? 1 : 0); query.bindValue(":position", position); @@ -130,15 +130,8 @@ void FetchTopicsAction::handleFinishedCall() _call->deleteLater(); } -QString FetchTopicsAction::unencodeTopicText(const QVariant &v) +QString FetchTopicsAction::decodeTopicText(const QVariant &v) { QByteArray ba = v.toByteArray(); return QString::fromUtf8(ba.constData(), ba.length()); } - -QDateTime FetchTopicsAction::unencodeDateTime(const QVariant &v) -{ - QDateTime dt = v.toDateTime(); - dt.setTimeSpec(Qt::UTC); - return dt; -} |