Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix compilation of libpcbsd on 10.x

  • Loading branch information...
commit 60198802e868e0e6fcdc25ea8a21a80216a14299 1 parent 44640c4
@beanpole135 beanpole135 authored
View
22 src-qt4/libpcbsd/ui/metaWidget.cpp
@@ -542,10 +542,11 @@ QString metaWidget::getAddPkgs()
// 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() )
+ if ( tmp.isEmpty() ){
tmp = (*it)->text(0);
- else
+ }else{
tmp = tmp + "," + (*it)->text(0);
+ }
++it;
}
@@ -560,10 +561,11 @@ QString metaWidget::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;
}
@@ -587,15 +589,17 @@ void metaWidget::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 )
View
4 src-qt4/libpcbsd/utils/utils.cpp
@@ -137,7 +137,7 @@ QString Utils::getValFromSHFile(QString envFile, QString envVal)
{
QFile confFile(envFile);
if ( ! confFile.open( QIODevice::ReadOnly ) )
- return false;
+ return "";
QTextStream stream( &confFile );
QString line;
@@ -169,7 +169,7 @@ QString Utils::getValFromCSHFile(QString envFile, QString envVal)
{
QFile confFile(envFile);
if ( ! confFile.open( QIODevice::ReadOnly ) )
- return false;
+ return "";
QTextStream stream( &confFile );
QString line;
Please sign in to comment.
Something went wrong with that request. Please try again.