Replace TRUE/FALSE with boolean values true/false

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/16/head
Michele Calgaro 4 months ago
parent 70f12c5422
commit 199193b3b1
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -282,10 +282,10 @@ void install::showDependencies()
if( allDepends[i].contains("|") ) { if( allDepends[i].contains("|") ) {
tmp = TQStringList::split( " | ", allDepends[i] ); tmp = TQStringList::split( " | ", allDepends[i] );
uint j = 0; uint j = 0;
bool exit = FALSE; bool exit = false;
while ( !exit && j < tmp.count() ) { while ( !exit && j < tmp.count() ) {
if( isInstalled(tmp[j]) ) if( isInstalled(tmp[j]) )
exit = TRUE; exit = true;
j++; j++;
} }
if( !exit ) if( !exit )
@ -362,9 +362,9 @@ void install::showDependencies()
else else
{ {
printf("2"); printf("2");
this->shell->setCommand("if dpkg --compare-versions "+pkgVersion+" \""+op+"\" "+cVersion+"; then echo \"TRUE\"; fi"); this->shell->setCommand("if dpkg --compare-versions "+pkgVersion+" \""+op+"\" "+cVersion+"; then echo \"true\"; fi");
this->shell->start(true); this->shell->start(true);
if( this->shell->getBuffer().stripWhiteSpace() == "TRUE" ) if( this->shell->getBuffer().stripWhiteSpace() == "true" )
rconflicts += name+" "; rconflicts += name+" ";
} }
} }
@ -418,21 +418,21 @@ bool install::isInstalled(TQString input)
if( sysVersion.contains("(") || sysVersion == "" ) if( sysVersion.contains("(") || sysVersion == "" )
return FALSE; return false;
else if( version != "" ) else if( version != "" )
{ {
TQString op = TQStringList::split( " ", version )[0]; TQString op = TQStringList::split( " ", version )[0];
TQString pkgVersion = TQStringList::split( " ", version )[1]; TQString pkgVersion = TQStringList::split( " ", version )[1];
this->shell->setCommand("if dpkg --compare-versions "+sysVersion+" \""+op+"\" "+pkgVersion+"; then echo \"TRUE\"; fi"); this->shell->setCommand("if dpkg --compare-versions "+sysVersion+" \""+op+"\" "+pkgVersion+"; then echo \"true\"; fi");
this->shell->start(true); this->shell->start(true);
if( this->shell->getBuffer().stripWhiteSpace() == "TRUE" ) if( this->shell->getBuffer().stripWhiteSpace() == "true" )
return TRUE; return true;
else else
return FALSE; return false;
} }
else else
return TRUE; return true;
} }
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
@ -454,16 +454,16 @@ bool install::checkArchitecture()
TQString arch = fields.grep("Architecture:")[0].mid(14); TQString arch = fields.grep("Architecture:")[0].mid(14);
if(arch == "all") if(arch == "all")
return TRUE; return true;
// get architecture // get architecture
this->shell->setCommand("dpkg --print-architecture"); this->shell->setCommand("dpkg --print-architecture");
this->shell->start(true); this->shell->start(true);
if( arch == this->shell->getBuffer().stripWhiteSpace() ) if( arch == this->shell->getBuffer().stripWhiteSpace() )
return TRUE; return true;
return FALSE; return false;
} }
@ -473,9 +473,9 @@ bool install::isLocked()
this->shell->setCommand("apt-get install -s" ); this->shell->setCommand("apt-get install -s" );
this->shell->start(true); this->shell->start(true);
if( this->shell->getBuffer().stripWhiteSpace().contains("...") ) if( this->shell->getBuffer().stripWhiteSpace().contains("...") )
return FALSE; return false;
else else
return TRUE; return true;
} }

@ -213,7 +213,7 @@ void kdpkg::checkArchitecture(TQString arch)
KMessageBox::information(this, i18n("The architecture of the package and the system doesn't match! You will not be able to install this package!")); KMessageBox::information(this, i18n("The architecture of the package and the system doesn't match! You will not be able to install this package!"));
installPushButton->setEnabled(FALSE); installPushButton->setEnabled(false);
} }

Loading…
Cancel
Save