mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
There was an issue around the time of Qt 4.6 when placeholder text was introduced, that caused a compile failure when it was specified in the form. As a workaround the placeholder texts were moved to the code. Qt 4 hasn't been relevant to us for ages. So move all (non-parametrized) placeholder texts to the form files instead. It's better to keep this kind of text content together. Makes sure translate/no-translate status is kept as it is.
40 lines
827 B
C++
40 lines
827 B
C++
// Copyright (c) 2011-2018 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#include <qt/openuridialog.h>
|
|
#include <qt/forms/ui_openuridialog.h>
|
|
|
|
#include <qt/guiutil.h>
|
|
#include <qt/sendcoinsrecipient.h>
|
|
|
|
#include <QUrl>
|
|
|
|
OpenURIDialog::OpenURIDialog(QWidget *parent) :
|
|
QDialog(parent),
|
|
ui(new Ui::OpenURIDialog)
|
|
{
|
|
ui->setupUi(this);
|
|
}
|
|
|
|
OpenURIDialog::~OpenURIDialog()
|
|
{
|
|
delete ui;
|
|
}
|
|
|
|
QString OpenURIDialog::getURI()
|
|
{
|
|
return ui->uriEdit->text();
|
|
}
|
|
|
|
void OpenURIDialog::accept()
|
|
{
|
|
SendCoinsRecipient rcp;
|
|
if(GUIUtil::parseBitcoinURI(getURI(), &rcp))
|
|
{
|
|
/* Only accept value URIs */
|
|
QDialog::accept();
|
|
} else {
|
|
ui->uriEdit->setValid(false);
|
|
}
|
|
}
|