Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

When listing package updates, also show ones which are being re-insta…

…lled

and the reason why
  • Loading branch information...
commit 418f827d4da9434fc67d00cadff11229d86de5ce 1 parent 0d4cf8f
@kmoore134 kmoore134 authored
Showing with 21 additions and 11 deletions.
  1. +21 −11 src-qt4/pc-pkgmanager/mainWin.cpp
View
32 src-qt4/pc-pkgmanager/mainWin.cpp
@@ -228,18 +228,28 @@ void mainWin::checkMPKGUpdates() {
while (p.canReadLine()) {
line = p.readLine().simplified();
qDebug() << line;
- if ( line.indexOf("Upgrading") != 0) {
- continue;
+ if ( line.indexOf("Upgrading") == 0 ) {
+ tmp = line;
+ pkgname = tmp.section(" ", 1, 1);
+ pkgname.replace(":", "");
+ pkgover = tmp.section(" ", 2, 2);
+ pkgnver = tmp.section(" ", 4, 4);
+ QTreeWidgetItem *myItem = new QTreeWidgetItem(QStringList() << pkgname << pkgover << pkgnver);
+ listViewUpdatesPkgs->addTopLevelItem(myItem);
+ haveUpdates = true;
+ totPkgs++;
+ } // End of upgrading section
+ if ( line.indexOf("Reinstalling") == 0 ) {
+ tmp = line;
+ pkgname = tmp.section(" ", 1, 1);
+ pkgover = pkgname.section("-", -1);
+ pkgname.truncate(pkgname.lastIndexOf("-"));
+ pkgnver = tmp.section(" ", 2);
+ QTreeWidgetItem *myItem = new QTreeWidgetItem(QStringList() << pkgname << pkgover << pkgnver);
+ listViewUpdatesPkgs->addTopLevelItem(myItem);
+ haveUpdates = true;
+ totPkgs++;
}
- tmp = line;
- pkgname = tmp.section(" ", 1, 1);
- pkgname.replace(":", "");
- pkgover = tmp.section(" ", 2, 2);
- pkgnver = tmp.section(" ", 4, 4);
- QTreeWidgetItem *myItem = new QTreeWidgetItem(QStringList() << pkgname << pkgover << pkgnver);
- listViewUpdatesPkgs->addTopLevelItem(myItem);
- haveUpdates = true;
- totPkgs++;
}
buttonRescanPkgs->setEnabled(true);
Please sign in to comment.
Something went wrong with that request. Please try again.