LCOV - code coverage report
Current view: top level - dbe/src/widgets - OracleWidget.cpp (source / functions) Coverage Total Hit
Test: code.result Lines: 0.0 % 26 0
Test Date: 2026-07-12 15:23:06 Functions: 0.0 % 4 0

            Line data    Source code
       1              : // DUNE DAQ modification notice:
       2              : // This file has been modified from the original ATLAS dbe source for the DUNE DAQ project.
       3              : // Fork baseline commit: dbe-02-12-17 (2022-05-12).
       4              : // Renamed since fork: no.
       5              : 
       6              : #include <QMessageBox>
       7              : #include "dbe/OracleWidget.hpp"
       8              : #include "ui_OracleWidget.h"
       9              : #include "dbe/messenger.hpp"
      10              : 
      11            0 : dbe::OracleWidget::~OracleWidget() = default;
      12              : 
      13            0 : dbe::OracleWidget::OracleWidget ( QWidget * parent )
      14              :   : QWidget ( parent ),
      15            0 :     ui ( new Ui::OracleWidget )
      16              : {
      17            0 :   ui->setupUi ( this );
      18            0 :   SetController();
      19            0 : }
      20              : 
      21            0 : void dbe::OracleWidget::SetController()
      22              : {
      23            0 :   connect ( ui->RunButton, SIGNAL ( clicked() ), this, SLOT ( ProcessOracleCommand() ),
      24              :             Qt::UniqueConnection );
      25            0 : }
      26              : 
      27              : /**
      28              :  * Build the connection command from the arguments given to the widget and emit the signal such that
      29              :  * the connection can be made as needed from the appropriate window
      30              :  */
      31            0 : void dbe::OracleWidget::ProcessOracleCommand()
      32              : {
      33            0 :   QString connect_str = ui->connection_string_input->text();
      34              : 
      35            0 :   if ( connect_str.isEmpty() )
      36              :   {
      37            0 :     ERROR ( "Database information invalid", "Oracle connection string has not been set" );
      38            0 :     return;
      39              :   }
      40              : 
      41            0 :   QString schema_str = ui->schema_string_input->text();
      42              : 
      43            0 :   if ( schema_str.isEmpty() )
      44              :   {
      45            0 :     ERROR ( "Database information invalid", "Oracle working schema has not been set" );
      46            0 :     return;
      47              :   }
      48              : 
      49            0 :   QString version_str = ui->OracleLine->text();
      50              : 
      51            0 :   if ( version_str.isEmpty() )
      52              :   {
      53            0 :     ERROR ( "Database information invalid", "Oracle schema version has not been set" );
      54            0 :     return;
      55              :   }
      56              : 
      57            0 :   QString oracleCommand (
      58            0 :     ui->PluginLabel->text() + connect_str + ":" + schema_str + ":" + version_str );
      59              : 
      60            0 :   emit OpenOracleConfig ( oracleCommand );
      61            0 : }
        

Generated by: LCOV version 2.0-1