LCOV - code coverage report
Current view: top level - src/qt - openuridialog.cpp (source / functions) Hit Total Coverage
Test: total_coverage.info Lines: 0 19 0.0 %
Date: 2020-09-26 01:30:44 Functions: 0 7 0.0 %

          Line data    Source code
       1             : // Copyright (c) 2011-2019 The Bitcoin Core developers
       2             : // Distributed under the MIT software license, see the accompanying
       3             : // file COPYING or http://www.opensource.org/licenses/mit-license.php.
       4             : 
       5             : #include <qt/openuridialog.h>
       6             : #include <qt/forms/ui_openuridialog.h>
       7             : 
       8             : #include <qt/guiutil.h>
       9             : #include <qt/sendcoinsrecipient.h>
      10             : 
      11             : #include <QUrl>
      12             : 
      13           0 : OpenURIDialog::OpenURIDialog(QWidget *parent) :
      14           0 :     QDialog(parent),
      15           0 :     ui(new Ui::OpenURIDialog)
      16           0 : {
      17           0 :     ui->setupUi(this);
      18             : 
      19           0 :     GUIUtil::handleCloseWindowShortcut(this);
      20           0 : }
      21             : 
      22           0 : OpenURIDialog::~OpenURIDialog()
      23           0 : {
      24           0 :     delete ui;
      25           0 : }
      26             : 
      27           0 : QString OpenURIDialog::getURI()
      28             : {
      29           0 :     return ui->uriEdit->text();
      30             : }
      31             : 
      32           0 : void OpenURIDialog::accept()
      33             : {
      34           0 :     SendCoinsRecipient rcp;
      35           0 :     if(GUIUtil::parseBitcoinURI(getURI(), &rcp))
      36             :     {
      37             :         /* Only accept value URIs */
      38           0 :         QDialog::accept();
      39             :     } else {
      40           0 :         ui->uriEdit->setValid(false);
      41             :     }
      42           0 : }

Generated by: LCOV version 1.15