MCPcopy Create free account
hub / github.com/Adaptix-Framework/AdaptixC2 / UpdateSettingsMain

Method UpdateSettingsMain

AdaptixClient/Source/Client/Storage.cpp:327–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325}
326
327void Storage::UpdateSettingsMain(const SettingsData &settingsData)
328{
329 QJsonObject json;
330 json["theme"] = settingsData.MainTheme;
331 json["fontFamily"] = settingsData.FontFamily;
332 json["fontSize"] = settingsData.FontSize;
333 json["consoleTime"] = settingsData.ConsoleTime;
334 QString data = QJsonDocument(json).toJson(QJsonDocument::Compact);
335
336 QSqlQuery query(QSqlDatabase::database(DB_CONNECTION_NAME));
337 query.prepare("INSERT OR REPLACE INTO Settings (key, data) VALUES ('SettingsMain', :Data);");
338 query.bindValue(":Data", data);
339 if (!query.exec())
340 LogError("SettingsMain not updated in database: %s\n", query.lastError().text().toStdString().c_str());
341}
342
343void Storage::SelectSettingsConsole(SettingsData* settingsData)
344{

Callers 1

SaveToDBMethod · 0.80

Calls 5

LogErrorFunction · 0.85
execMethod · 0.80
toStdStringMethod · 0.80
toJsonMethod · 0.45
textMethod · 0.45

Tested by

no test coverage detected