LCOV - code coverage report
Current view: top level - src/operations - GetAllDBSettingsOperation.cpp (source / functions) Coverage Total Hit
Test: coverage.info.cleaned Lines: 83.3 % 12 10
Test Date: 2026-04-19 00:35:54 Functions: 100.0 % 2 2

            Line data    Source code
       1              : #include "GetAllDBSettingsOperation.h"
       2              : #include <QVariant>
       3              : 
       4            2 : GetAllDBSettingsOperation::GetAllDBSettingsOperation(OperationManager *parent, QMap<DBSettingsKey, QString>* settings) :
       5              :      DBOperation(parent),
       6            2 :      settings(settings)
       7              : {
       8              : 
       9            2 : }
      10              : 
      11            2 : void GetAllDBSettingsOperation::execute()
      12              : {
      13              :     // Kindly ask the database for the rest.
      14            2 :     QSqlQuery query(db());
      15            2 :     if (!query.exec("SELECT * FROM DBSettings")) {
      16            0 :         reportError("Could not load all db settings. :(");
      17            0 :         return;
      18              :     }
      19              : 
      20            3 :     while (query.next()) {
      21            2 :         settings->insert( (DBSettingsKey)query.value("id").toInt(),
      22            2 :                          query.value("value").toString());
      23              :     }
      24            2 : }
        

Generated by: LCOV version 2.0-1