diff options
author | Laszlo Papp <lpapp@kde.org> | 2013-03-21 20:16:23 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-22 18:06:19 +0100 |
commit | 13cf73fd7ac96fafc6752a5c18467ba7e6ce070e (patch) | |
tree | ae36534e1cc8a5d639f5efaf9a26f21364bc7b87 | |
parent | 395e8ab275e280a3f9e4a67d56b791cb6c55872d (diff) | |
download | qtserialport-13cf73fd7ac96fafc6752a5c18467ba7e6ce070e.tar.gz |
Use the error string established for showing the error message
Change-Id: Id34f2428641725ede6eda9505c9b577a21e94e1e
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
-rw-r--r-- | examples/terminal/mainwindow.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/examples/terminal/mainwindow.cpp b/examples/terminal/mainwindow.cpp index b394b7d..f560f9a 100644 --- a/examples/terminal/mainwindow.cpp +++ b/examples/terminal/mainwindow.cpp @@ -109,18 +109,12 @@ void MainWindow::openSerialPort() } else { serial->close(); - QMessageBox::critical(this, tr("Error"), - tr("Can't configure the serial port: %1,\n" - "error code: %2") - .arg(p.name).arg(serial->error())); + QMessageBox::critical(this, tr("Error"), serial->errorString()); ui->statusBar->showMessage(tr("Open error")); } } else { - QMessageBox::critical(this, tr("Error"), - tr("Can't opened the serial port: %1,\n" - "error code: %2") - .arg(p.name).arg(serial->error())); + QMessageBox::critical(this, tr("Error"), serial->errorString()); ui->statusBar->showMessage(tr("Configure error")); } |