rename copy message

This commit is contained in:
DenioD
2020-06-03 20:20:46 +02:00
parent a840214191
commit e39c19f75e

View File

@@ -284,9 +284,11 @@ void MainWindow::closeEvent(QCloseEvent* event) {
// Let the RPC know to shut down any running service. // Let the RPC know to shut down any running service.
rpc->shutdownhushd(); rpc->shutdownhushd();
int passphraselenght = this->getPassword().length();
qDebug()<<"LÄNGE PW : "<<passphraselenght;
// Check is encryption is ON for SDl // Check is encryption is ON for SDl
if(fileExists(dirwalletenc)) if(passphraselenght > 0)
{ {
// delete old file before // delete old file before
@@ -392,13 +394,13 @@ void MainWindow::encryptWallet() {
if (d.exec() == QDialog::Accepted) if (d.exec() == QDialog::Accepted)
{ {
QString str = ed.txtPassword->text(); // data comes from user inputs QString passphrase = ed.txtPassword->text(); // data comes from user inputs
int length = str.length(); int length = passphrase.length();
this->setPassword(str); this->setPassword(passphrase);
char *sequence = NULL; char *sequence = NULL;
sequence = new char[length+1]; sequence = new char[length+1];
strncpy(sequence, str.toLocal8Bit(), length +1); strncpy(sequence, passphrase.toLocal8Bit(), length +1);
#define MESSAGE ((const unsigned char *) sequence) #define MESSAGE ((const unsigned char *) sequence)
#define MESSAGE_LEN length #define MESSAGE_LEN length
@@ -1863,7 +1865,7 @@ void MainWindow::on_givemeZaddr_clicked()
QString hushchataddr = QString::fromStdString(reply.get<json::array_t>()[0]); QString hushchataddr = QString::fromStdString(reply.get<json::array_t>()[0]);
QClipboard *zaddr_Clipboard = QApplication::clipboard(); QClipboard *zaddr_Clipboard = QApplication::clipboard();
zaddr_Clipboard ->setText(hushchataddr); zaddr_Clipboard ->setText(hushchataddr);
QMessageBox::information(this, "Your new Hushchataddress was copied in your clipboard",hushchataddr); QMessageBox::information(this, "Your new HushChat address was copied to your clipboard!",hushchataddr);
ui->listReceiveAddresses->insertItem(0, hushchataddr); ui->listReceiveAddresses->insertItem(0, hushchataddr);
ui->listReceiveAddresses->setCurrentIndex(0); ui->listReceiveAddresses->setCurrentIndex(0);