summaryrefslogtreecommitdiff
path: root/fetchboardconfigaction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fetchboardconfigaction.cpp')
-rw-r--r--fetchboardconfigaction.cpp10
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 {