diff --git a/mainwindow.cpp b/mainwindow.cpp index 7791fcb..2e1943b 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -97,7 +97,7 @@ void MainWindow::customEvent(QEvent *event) { m_progressValue = progress; ui->updateProgress->setValue(progress/10); QApplication::postEvent(this, new ProgressEvent(this, progress+10)); - QThread::msleep(100); + QThread::msleep(150); } } } @@ -147,9 +147,12 @@ void MainWindow::onQuit() { void MainWindow::onAppendText(QString text, QString suffix) { QString editText = ui->updateStatus->toPlainText(); - if (suffix.size() > 0) { - editText += QString("\n").leftJustified(m_width-3, '='); - editText += " "; + if (!suffix.isNull() && suffix.size() > 0) { + qInfo() << "TEXT" << text << "SUFFIX" << suffix; + if (suffix == Worker::UPDATE_STEP_SUCCESS || suffix == Worker::UPDATE_STEP_FAIL) { + editText += QString("\n").leftJustified(m_width-3, '='); + editText += " "; + } editText += (QString("\n") + text).leftJustified(m_width - (2 + suffix.size()) ) + suffix; } else { editText += text.leftJustified(m_width-9);