diff --git a/src/diagnosticsdialog.cpp b/src/diagnosticsdialog.cpp index 2927f0ac1..8fc801059 100644 --- a/src/diagnosticsdialog.cpp +++ b/src/diagnosticsdialog.cpp @@ -23,6 +23,10 @@ #include #include +#include +#include +#include +#include DiagnosticsDialog::DiagnosticsDialog( QWidget *parent ) : QDialog( parent ) @@ -30,10 +34,10 @@ DiagnosticsDialog::DiagnosticsDialog( QWidget *parent ) { ui->setupUi( this ); + connect( ui->updateButton, SIGNAL( clicked() ), this, SLOT( updateLogView() ) ); + connect( ui->clipboardButton, SIGNAL( clicked() ), this, SLOT( copyToClipboard() ) ); connect( ui->buttonBox, SIGNAL( rejected() ), this, SLOT( reject() ) ); - ui->logView->setReadOnly(true); - updateLogView(); } @@ -83,3 +87,9 @@ void DiagnosticsDialog::updateLogView() ui->logView->setPlainText(log); } + +void DiagnosticsDialog::copyToClipboard() +{ + QApplication::clipboard()->setText( ui->logView->toPlainText() ); +} + diff --git a/src/diagnosticsdialog.h b/src/diagnosticsdialog.h index ab64ab23d..dac82aef3 100644 --- a/src/diagnosticsdialog.h +++ b/src/diagnosticsdialog.h @@ -37,6 +37,8 @@ public: private slots: void updateLogView(); + void copyToClipboard(); + private: Ui::DiagnosticsDialog* ui; }; diff --git a/src/diagnosticsdialog.ui b/src/diagnosticsdialog.ui index 992f96e51..fa7d7cfba 100644 --- a/src/diagnosticsdialog.ui +++ b/src/diagnosticsdialog.ui @@ -21,17 +21,39 @@ - + + + + + - - - Qt::Horizontal - - - QDialogButtonBox::Close - - + + + + + Update + + + + + + + Copy to Clipboard + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Close + + + +