[PC-BSD Commits] r19770 - pcbsd/branches/9.1/src-qt4/pc-updategui
svn at pcbsd.org
svn at pcbsd.org
Thu Oct 18 13:56:11 PDT 2012
Author: kris
Date: 2012-10-18 20:56:11 +0000 (Thu, 18 Oct 2012)
New Revision: 19770
Modified:
pcbsd/branches/9.1/src-qt4/pc-updategui/mainWin.cpp
pcbsd/branches/9.1/src-qt4/pc-updategui/mainWin.h
Log:
MFC improvement to update GUI
Modified: pcbsd/branches/9.1/src-qt4/pc-updategui/mainWin.cpp
===================================================================
--- pcbsd/branches/9.1/src-qt4/pc-updategui/mainWin.cpp 2012-10-18 20:55:36 UTC (rev 19769)
+++ pcbsd/branches/9.1/src-qt4/pc-updategui/mainWin.cpp 2012-10-18 20:56:11 UTC (rev 19770)
@@ -22,6 +22,7 @@
void mainWin::ProgramInit(QString ch, QString ip)
{
// Set any warden directories
+ lastError="";
wDir = ch;
wIP = ip;
if ( ! wDir.isEmpty() )
@@ -115,8 +116,14 @@
qDebug() << "Finished Update";
if ( uProc->exitStatus() != QProcess::NormalExit || uProc->exitCode() != 0)
{
+ // Read any remaining buffers
+ slotReadUpdateOutput();
+
// Warn user that this update failed
- QMessageBox::critical(this, tr("Update Failed!"), tr("Failed to install:") + listUpdates.at(curUpdate).at(0) + " " + tr("Failed to install update! Please check your network connection, or change mirror servers in the System Manager."));
+ if ( lastError.isEmpty() )
+ QMessageBox::critical(this, tr("Update Failed!"), tr("Failed to install:") + listUpdates.at(curUpdate).at(0) + " " + tr("An unknown error occured!"));
+ else
+ QMessageBox::critical(this, tr("Update Failed!"), tr("Failed to install:") + listUpdates.at(curUpdate).at(0) + " " + lastError);
} else {
// If successfull system update download
if ( listUpdates.at(curUpdate).at(1) == "SYSUPDATE" )
@@ -323,6 +330,10 @@
progressUpdate->setValue(line.section(" ", 1, 1).toInt(&ok));
continue;
}
+ if ( line.indexOf("ERROR:") == 0 ) {
+ lastError = line;
+ continue;
+ }
qDebug() << line;
}
}
Modified: pcbsd/branches/9.1/src-qt4/pc-updategui/mainWin.h
===================================================================
--- pcbsd/branches/9.1/src-qt4/pc-updategui/mainWin.h 2012-10-18 20:55:36 UTC (rev 19769)
+++ pcbsd/branches/9.1/src-qt4/pc-updategui/mainWin.h 2012-10-18 20:56:11 UTC (rev 19770)
@@ -60,6 +60,7 @@
QProcess *uProc;
QList<QStringList> listUpdates;
QString wDir, wIP;
+ QString lastError;
signals:
More information about the Commits
mailing list