diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2013-04-02 00:51:58 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2013-04-02 00:51:58 +0200 |
commit | 427004acc6a80004f69c6ce059667465023269a9 (patch) | |
tree | bfa65471cc6411225016def30813623fdbc63f05 /fetchboardconfigaction.cpp | |
parent | 28bb9f9ee55b4899204bb9f860f2cda6f90b4806 (diff) | |
download | tapasboard-427004acc6a80004f69c6ce059667465023269a9.tar.gz tapasboard-427004acc6a80004f69c6ce059667465023269a9.zip |
parse bbcode, show usernames, ....
Diffstat (limited to 'fetchboardconfigaction.cpp')
-rw-r--r-- | fetchboardconfigaction.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fetchboardconfigaction.cpp b/fetchboardconfigaction.cpp index 0dd5e4c..2364dd1 100644 --- a/fetchboardconfigaction.cpp +++ b/fetchboardconfigaction.cpp @@ -32,6 +32,11 @@ void FetchBoardConfigAction::handleFinishedCall() QSqlDatabase db = _board->database(); db.transaction(); QSqlQuery query(db); + + // Let's add some of our config settings + map["last_config_fetch"] = QDateTime::currentDateTimeUtc().toString(Qt::ISODate); + map["tapasboard_db_version"] = Board::CURRENT_DB_VERSION; + query.prepare("INSERT OR REPLACE INTO config (key, value) VALUES (:key, :value)"); for (QVariantMap::iterator i = map.begin(); i != map.end(); i++) { query.bindValue(":key", i.key()); @@ -40,11 +45,6 @@ void FetchBoardConfigAction::handleFinishedCall() qWarning() << "Failed to set config key:" << i.key(); } } - query.bindValue(":key", "last_config_fetch"); - query.bindValue(":value", QDateTime::currentDateTimeUtc().toString(Qt::ISODate)); - if (!query.exec()) { - qWarning() << "Failed to set last config fetch date"; - } db.commit(); _board->notifyConfigChanged(); } else { |