Skip to content
Browse files

Fix compilation of pc-pkgmanager on 10.x

  • Loading branch information...
1 parent e020f6a commit 395de4d2158323f8b4ae9c2b9fdec9810d1e18bb @beanpole135 beanpole135 committed
Showing with 20 additions and 14 deletions.
  1. +2 −2 src-qt4/pc-pkgmanager/main.cpp
  2. +18 −12 src-qt4/pc-pkgmanager/mainWin.cpp
View
4 src-qt4/pc-pkgmanager/main.cpp
@@ -41,9 +41,9 @@ int main( int argc, char ** argv )
QString chkarg = argv[1];
// Running in a chroot
if ( chkarg == "-chroot" )
- if ( argc == 3 ) {
+ if( argc == 3 ){
chroot = argv[2];
- } else {
+ }else{
qDebug() << "Usage: -chroot <directory>";
exit(1);
}
View
30 src-qt4/pc-pkgmanager/mainWin.cpp
@@ -1201,11 +1201,13 @@ QString mainWin::getAddPkgs()
for (int z=0; z < metaPkgList.count(); ++z)
// See if any packages status have changed
if ( ( (*it)->text(0) == metaPkgList.at(z).at(0) && metaPkgList.at(z).at(5) == "NO" && (*it)->checkState(0) == Qt::Checked ) || \
- ( (*it)->text(0) == metaPkgList.at(z).at(0) && metaPkgList.at(z).at(5) == "NO" && (*it)->checkState(0) == Qt::PartiallyChecked ) )
- if ( tmp.isEmpty() )
+ ( (*it)->text(0) == metaPkgList.at(z).at(0) && metaPkgList.at(z).at(5) == "NO" && (*it)->checkState(0) == Qt::PartiallyChecked ) ){
+ if ( tmp.isEmpty() ){
tmp = (*it)->text(0);
- else
+ }else{
tmp = tmp + "," + (*it)->text(0);
+ }
+ }
++it;
}
@@ -1220,10 +1222,11 @@ QString mainWin::getDelPkgs()
for (int z=0; z < metaPkgList.count(); ++z)
// See if any packages status have changed
if ( (*it)->text(0) == metaPkgList.at(z).at(0) && metaPkgList.at(z).at(5) == "YES" && (*it)->checkState(0) == Qt::Unchecked )
- if ( tmp.isEmpty() )
+ if ( tmp.isEmpty() ){
tmp = (*it)->text(0);
- else
+ }else{
tmp = tmp + "," + (*it)->text(0);
+ }
++it;
}
@@ -1247,21 +1250,24 @@ void mainWin::slotDeskPkgsChanged(QTreeWidgetItem *aItem, int __unused)
disconnect(treeMetaPkgs, SIGNAL(itemChanged(QTreeWidgetItem *, int)), 0, 0);
if (aItem->childCount() == 0) {
- if (aItem->checkState(0) == Qt::Checked && aItem->parent() )
- if ( allChildrenPkgsChecked(aItem->parent()->text(0)))
+ if (aItem->checkState(0) == Qt::Checked && aItem->parent() ){
+ if ( allChildrenPkgsChecked(aItem->parent()->text(0))){
aItem->parent()->setCheckState(0, Qt::Checked);
- else
+ }else{
aItem->parent()->setCheckState(0, Qt::PartiallyChecked);
- if (aItem->checkState(0) == Qt::Unchecked && aItem->parent() )
+ }
+ }
+ if (aItem->checkState(0) == Qt::Unchecked && aItem->parent() ){
if ( ! allChildrenPkgsUnchecked(aItem->parent()->text(0)))
aItem->parent()->setCheckState(0, Qt::PartiallyChecked);
-
+ }
} else {
- if (aItem->checkState(0) == Qt::Checked )
+ if (aItem->checkState(0) == Qt::Checked ){
checkAllChildrenPkgs(aItem->text(0));
- else
+ }else{
uncheckAllChildrenPkgs(aItem->text(0));
+ }
}

0 comments on commit 395de4d

Please sign in to comment.
Something went wrong with that request. Please try again.