[PC-BSD Commits] r21105 - pcbsd/current/src-qt4/pc-updategui

svn at pcbsd.org svn at pcbsd.org
Tue Jan 22 12:05:07 PST 2013


Author: kris
Date: 2013-01-22 20:05:07 +0000 (Tue, 22 Jan 2013)
New Revision: 21105

Modified:
   pcbsd/current/src-qt4/pc-updategui/mainWin.cpp
Log:

Few fixes to update gui when doing pkg updates. Will need to work with
Bapt@ on a few other things to make it a bit more GUI friendly. 



Modified: pcbsd/current/src-qt4/pc-updategui/mainWin.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-updategui/mainWin.cpp	2013-01-22 17:56:54 UTC (rev 21104)
+++ pcbsd/current/src-qt4/pc-updategui/mainWin.cpp	2013-01-22 20:05:07 UTC (rev 21105)
@@ -619,24 +619,35 @@
 
 void mainWin::slotReadPkgUpdateOutput() {
    QString line, tmp;
-   while (uProc->canReadLine()) {
-     line = uProc->readLine().simplified();
-     tmp = line;
-     tmp.truncate(50);
+   if ( dPackages )
+   {
+     line = uProc->readAll();
+     qDebug() << "Read my dline:" <<  line;
      if ( line.indexOf("Checking integrity") == 0 ) {
        textLabel->setText(line);
        uPackages = true;
        dPackages = false;
        curUpdate = 0;
        progressUpdate->setValue(0);
-       continue;
      }
+
+     progressUpdate->setValue( progressUpdate->value() + line.count("Downloading"));
+     return;
+   }
+
+
+   while (uProc->canReadLine()) {
+     line = uProc->readLine().simplified();
+     qDebug() << "Normal Line:" << line;
+     tmp = line;
+     tmp.truncate(50);
      if ( line.indexOf("to be downloaded") != -1 ) {
        textLabel->setText(tr("Downloading packages..."));
        dPackages = true;
        curUpdate = 0;
        progressUpdate->setValue(0);
-       continue;
+       slotReadPkgUpdateOutput(); 
+       return;
      }
      if ( dPackages ) {
        curUpdate++;



More information about the Commits mailing list