diff options
author | Anne Jan Brouwer <brouwer@annejan.com> | 2015-05-06 06:09:56 +0200 |
---|---|---|
committer | Anne Jan Brouwer <brouwer@annejan.com> | 2015-05-06 06:09:56 +0200 |
commit | 354f20424da2d687561fe897b85ba076e40d0983 (patch) | |
tree | a9e24dfc71a39e8f9a33ca3aac7d15274159ec8a | |
parent | 0d694a53fa8696322cb82ebe3c2998028c7809d0 (diff) |
no clipboard on error
-rw-r--r-- | mainwindow.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp index fef19b6e..a7522de7 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -382,11 +382,12 @@ void MainWindow::executeWrapper(QString app, QString args, QString input) { */ void MainWindow::readyRead(bool finished = false) { QString output = ""; + QString error = process->readAllStandardError(); if (currentAction != GPG_INTERNAL) { output = process->readAllStandardOutput(); if (finished && currentAction == GPG) { lastDecrypt = output; - if (useClipboard) { + if (useClipboard && error.size() == 0) { QClipboard *clip = QApplication::clipboard(); QStringList tokens = output.split("\n"); clip->setText(tokens[0]); @@ -408,7 +409,6 @@ void MainWindow::readyRead(bool finished = false) { output.replace(QRegExp(">"), ">"); } - QString error = process->readAllStandardError(); if (error.size() > 0) { output = "<font color=\"red\">" + error + "</font><br />" + output; } |