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: 2025-12-21 13:07:08 Functions: 0.0 % 4 0

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

Generated by: LCOV version 2.0-1