Replace TRUE/FALSE with boolean values true/false

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/49/head
Michele Calgaro 12 months ago
parent 321205fac0
commit 355597852b
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -40,7 +40,7 @@ public:
* files and obtains some information about the user from the system.
*
* Default is to construct from the user's crontab. Can also be called,
* passing TRUE, to construct from the system crontab. Throws an
* passing true, to construct from the system crontab. Throws an
* exception if the crontab file can not be found, read, or parsed.
*/
CTCron(bool _syscron = false, std::string _login = "");

@ -52,7 +52,7 @@ using namespace KlamAV;
* name 'name' and widget flags set to 'f'.
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
* true to construct a modal dialog.
*/
KlamDB::KlamDB( TQWidget* parent, const char* name, bool modal, WFlags fl )
: TQDialog( parent, name, modal, fl )

@ -43,7 +43,7 @@ class KlamDB : public TQDialog
TQ_OBJECT
public:
KlamDB( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
KlamDB( TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
~KlamDB();
KlamAV::TabWidget* tabBrowser;

@ -87,13 +87,13 @@ Freshklam::Freshklam(TQWidget *parent, const char *name)
checkingDirectly = false;
freshklamAlive = FALSE;
freshklamAlive = false;
config = TDEGlobal::config();
config->setGroup("Freshklam");
lastDownloadPaths = config->readListEntry("lastDownloadPaths");
getCurrentVersionOfClamAV( );
if ((lastDownloadPaths.isEmpty()) || (!(TDEIO::NetAccess::exists(TQString((*lastDownloadPaths.begin())),TRUE,NULL)))){
if ((lastDownloadPaths.isEmpty()) || (!(TDEIO::NetAccess::exists(TQString((*lastDownloadPaths.begin())),true,NULL)))){
createDBDir();
}
TQString proxyIPText = config->readEntry("ProxyIP");
@ -373,7 +373,7 @@ void Freshklam::slotSearch()
pidFileName = tf.name();
command += " -p ";
command += pidFileName;
freshklamAlive = TRUE;
freshklamAlive = true;
}
writeConf();
@ -394,8 +394,8 @@ void Freshklam::slotSearch()
connect( childproc, TQ_SIGNAL(receivedStdout(TDEProcess *, char *, int)),
TQ_SLOT(receivedOutput(TDEProcess *, char *, int)) );
tdemain->EnableFreshklam->setEnabled(FALSE);
tdemain->DisableFreshklam->setEnabled(TRUE);
tdemain->EnableFreshklam->setEnabled(false);
tdemain->DisableFreshklam->setEnabled(true);
}
@ -411,15 +411,15 @@ void Freshklam::finish()
processOutput();
delete childproc;
childproc = 0;
freshklamAlive = FALSE;
freshklamAlive = false;
if (!(tempFileName.isEmpty()))
TDEIO::NetAccess::del(tempFileName,NULL);
CollectionDB::instance()->insertEvent("Updates","Virus Database Updated",dir_combo->url());
KNotifyClient::event(tdemain->_tray->winId(), i18n("Update Finished"), i18n("Virus Databases updated successfully."));
tdemain->EnableFreshklam->setEnabled(TRUE);
tdemain->DisableFreshklam->setEnabled(FALSE);
tdemain->EnableFreshklam->setEnabled(true);
tdemain->DisableFreshklam->setEnabled(false);
//updateMetaDB();
@ -629,7 +629,7 @@ void Freshklam::writeConf()
//tf->setAutoDelete(TRUE);
//tf->setAutoDelete(true);
tempFileName = tf.name();
TQTextStream &ts = *(tf.textStream());
@ -845,8 +845,8 @@ Freshklam::getCurrentVersionOfClamAV( )
TQString suCommand=TQString("clamscan -V");
versionproc = new TDEProcIO();
versionproc->setUseShell(TRUE);
versionproc->setUsePty (TDEProcIO::Stdout,TRUE);
versionproc->setUseShell(true);
versionproc->setUsePty (TDEProcIO::Stdout,true);
*versionproc<<suCommand;

@ -78,8 +78,8 @@ Klamav::Klamav()
TQToolTip::add( _tray, i18n( "KlamAV - Virus Protection for TDE" ) );
_tray->show();
DisableFreshklam->setEnabled(FALSE);
EnableFreshklam->setEnabled(TRUE);
DisableFreshklam->setEnabled(false);
EnableFreshklam->setEnabled(true);
config = TDEGlobal::config();
config->setGroup("Freshklam");
@ -376,8 +376,8 @@ void Klamav::contextEnableFK() {
void Klamav::contextDisableFK() {
freshklam->slotCancel();
// DisableFreshklam->setEnabled(FALSE);
// EnableFreshklam->setEnabled(TRUE);
// DisableFreshklam->setEnabled(false);
// EnableFreshklam->setEnabled(true);
}

@ -331,7 +331,7 @@ void KlamOnAcc::quarantine()
QuarantineList.append(fname+":"+vname+suffix);
/* The following has been taken nearly verbatim from scanviewer.cpp */
bool allQuarantined=TRUE;
bool allQuarantined=true;
config->setGroup("Kuarantine");
TQStringList lastQuarLocations = config->readListEntry("KuarantineLocations");
@ -355,7 +355,7 @@ void KlamOnAcc::quarantine()
TQString itemName = item2.mid((fnameEndPoint+1),((dtStartPoint+1) - (fnameEndPoint+2)));
TQString when = item2.mid((dtStartPoint+1),(item2.length() - (dtStartPoint+1)));
if (!(fname.isEmpty())){
TQStringList tokens = TQStringList::split ( "/", fname, FALSE );
TQStringList tokens = TQStringList::split ( "/", fname, false );
TQString qname = tokens.last();
qname.prepend("/");
qname.prepend(quarloc);

@ -44,8 +44,8 @@ Klamscan::Klamscan(TQWidget *parent, const char *name)
/* scanInProgress = FALSE;
multiScan = FALSE; */
/* scanInProgress = false;
multiScan = false; */
setDefaults();
TQBoxLayout *top = new TQVBoxLayout(this,10,10);

@ -23,7 +23,7 @@
* name 'name' and widget flags set to 'f'.
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
* true to construct a modal dialog.
*/
KlamscanOptions::KlamscanOptions( TQWidget* parent, const char* name, bool modal, WFlags fl )
: TQDialog( parent, name, modal, fl )
@ -147,7 +147,7 @@ KlamscanOptions::KlamscanOptions( TQWidget* parent, const char* name, bool modal
ScanOle = new TQCheckBox( FileTypes, "ScanOle" );
ScanOle->setGeometry( TQRect( 270, 50, 270, 21 ) );
ScanOle->setChecked( FALSE );
ScanOle->setChecked( false );
VirusBroken = new TQCheckBox( FileTypes, "VirusBroken" );
VirusBroken->setGeometry( TQRect( 20, 80, 240, 20 ) );
@ -155,11 +155,11 @@ KlamscanOptions::KlamscanOptions( TQWidget* parent, const char* name, bool modal
ExcludeQuarantine = new TQCheckBox( FileTypes, "ExcludeQuarantine" );
ExcludeQuarantine->setGeometry( TQRect( 270, 80, 270, 21 ) );
ExcludeQuarantine->setChecked( FALSE );
ExcludeQuarantine->setChecked( false );
OK = new TQPushButton( this, i18n( "OK" ) );
OK->setGeometry( TQRect( 190, 626, 91, 31 ) );
OK->setDefault( TRUE );
OK->setDefault( true );
connect( OK, TQ_SIGNAL(clicked()),
TQ_SLOT(updateSettings()) );

@ -32,7 +32,7 @@ class KlamscanOptions : public TQDialog
TQ_OBJECT
public:
KlamscanOptions( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
KlamscanOptions( TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
~KlamscanOptions();
TQGroupBox* Archive_Support;

@ -42,7 +42,7 @@ Kuarantine::Kuarantine(TQWidget *parent, const char *name)
}else{
for (TQStringList::Iterator it = lastQuarLocations.begin(); it == lastQuarLocations.begin(); it++ )
quarloc = *it;
if (!(TDEIO::NetAccess::exists(quarloc,TRUE,NULL))){
if (!(TDEIO::NetAccess::exists(quarloc,true,NULL))){
KMessageBox::information (this,i18n( "Your current quarantine location ('%1') no longer exists. I'm going to attempt to create a new one.").arg(quarloc));
createQuarDir();
}
@ -254,7 +254,7 @@ void Kuarantine::refresh()
config->setGroup("Kuarantine");
lastQuarItems = config->readListEntry(TQString("Items %1").arg(quarloc));
if (!(TDEIO::NetAccess::exists(quarloc,TRUE,NULL))){
if (!(TDEIO::NetAccess::exists(quarloc,true,NULL))){
KMessageBox::information (this,i18n("Your current quarantine location ('%1') no longer exists. I'm going to attempt to create a new one.").arg(quarloc));
createQuarDir();
}else{
@ -266,14 +266,14 @@ void Kuarantine::refresh()
TQString itemname = getVirusName(*it);
TQString when = getWhen(*it);
TQStringList tokens = TQStringList::split ( "/", fname, FALSE );
TQStringList tokens = TQStringList::split ( "/", fname, false );
TQString qname = tokens.last();
qname.prepend("/");
qname.prepend(quarloc);
qname.append(":"+when);
//kdDebug() << qname << endl;
if (TDEIO::NetAccess::exists(qname,TRUE,NULL)){
if (TDEIO::NetAccess::exists(qname,true,NULL)){
//currentbox->insertItem(*it);
new TQListViewItem( currentbox, fname, itemname,when);
}else{
@ -345,7 +345,7 @@ void Kuarantine::slotSearch()
TQString fname = tItem->text(0);
TQStringList tokens = TQStringList::split ( "/", fname, FALSE );
TQStringList tokens = TQStringList::split ( "/", fname, false );
TQString qname = tokens.last();
qname.prepend("/");
qname.prepend(quarloc);
@ -425,12 +425,12 @@ void Kuarantine::slotCancel()
//TQStringList tokens = TQStringList::split ( ":", ( it.current() )->text(), FALSE );
//TQStringList tokens = TQStringList::split ( ":", ( it.current() )->text(), false );
TQString fname = ( it.current() )->text(0);
TQString itemname = ( it.current() )->text(1);
TQString when = ( it.current() )->text(2);
TQStringList tokens = TQStringList::split ( "/", fname, FALSE );
TQStringList tokens = TQStringList::split ( "/", fname, false );
TQString qname = tokens.last();
qname.prepend("/");
qname.prepend(QuarLocation);

@ -39,8 +39,8 @@ ScanViewer::ScanViewer(TQWidget *parent, const char *name)
: TQWidget(parent, name)
{
scanInProgress = TRUE;
multiScan = FALSE;
scanInProgress = true;
multiScan = false;
//TQGridLayout *layout = new TQGridLayout(this, 6, 3, 10, 4);
layout = new TQGridLayout(this, 6, 3, 10, 4);
@ -151,7 +151,7 @@ ScanViewer::ScanViewer(TQWidget *parent, const char *name)
ScanViewer::~ScanViewer()
{
scanCancelled = TRUE;
scanCancelled = true;
if ((childproc) && (scanInProgress)){
delete childproc;
@ -216,7 +216,7 @@ void ScanViewer::processOutput()
//resultview->insertItem(buf.section('\n',j,j));
CollectionDB::instance()->insertEvent("Error Found",tmpVirusName,tmpFName);
errorsEncountered = TRUE;
errorsEncountered = true;
filesscanned++;
if (!(showProgress))
status2_label->setText(i18n("Files scanned: %1").arg(filesscanned));
@ -282,20 +282,20 @@ void ScanViewer::slotScan(const TQStringList & filepattern, int mode, bool recur
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if(( args->isSet( "scanthis" ) ) || (dcopscan)) {
calculateTime = FALSE;
showProgress = FALSE;
calculateTime = false;
showProgress = false;
scan_time->hide();
status2_label->show();
}else{
calculateTime = TRUE;
showProgress = TRUE;
calculateTime = true;
showProgress = true;
scan_time->show();
status2_label->hide();
}
scanCancelled = FALSE;
scanInProgress = FALSE;
scanCancelled = false;
scanInProgress = false;
m_mode = mode;
m_filepattern = filepattern;
@ -332,7 +332,7 @@ void ScanViewer::slotScan(const TQStringList & filepattern, int mode, bool recur
}
//kdDebug() << scanCancelled << endl;
calculateTime = FALSE;
calculateTime = false;
if (scanCancelled)
return;
@ -349,7 +349,7 @@ void ScanViewer::slotScan(const TQStringList & filepattern, int mode, bool recur
slotClear();
QuarantineList.clear();
errorsEncountered = FALSE;
errorsEncountered = false;
filesscanned = 0;
//status2_label->setText(i18n("Scan in Progress..."));
@ -480,8 +480,8 @@ void ScanViewer::slotScan(const TQStringList & filepattern, int mode, bool recur
}
childproc = new TDEProcIO();
childproc->setUseShell(TRUE);
childproc->setUsePty (TDEProcIO::Stdout,TRUE);
childproc->setUseShell(true);
childproc->setUsePty (TDEProcIO::Stdout,true);
if(clamdscan) {
config->setGroup("KlamavBackend");
@ -521,9 +521,9 @@ void ScanViewer::slotScan(const TQStringList & filepattern, int mode, bool recur
connect( childproc, TQ_SIGNAL(processExited(TDEProcess *)),
TQ_SLOT(childExited()) );
scanInProgress = TRUE;
scanInProgress = true;
menu->setEnabled(FALSE);
menu->setEnabled(false);
}
@ -543,11 +543,11 @@ void ScanViewer::finish()
kdDebug() << "deleted childproc" << endl;
}
scanInProgress = FALSE;
scanInProgress = false;
status_label->setText(i18n( "If viruses were found, you can right-click to quarantine selected files." ));
menu->setEnabled(TRUE);
//dir_combo->setEnabled(TRUE);
menu->setEnabled(true);
//dir_combo->setEnabled(true);
scan_time->hide();
prog->hide();
@ -555,8 +555,8 @@ void ScanViewer::finish()
progosd->saveSettings(TDEGlobal::config());
status2_label->show();
multiScan = FALSE;
calculateTime = FALSE;
multiScan = false;
calculateTime = false;
emit scanFinished(this);
@ -566,7 +566,7 @@ void ScanViewer::finish()
void ScanViewer::slotCancel()
{
scanCancelled = TRUE;
scanCancelled = true;
finish();
//status2_frame->adjustSize();
@ -686,7 +686,7 @@ void ScanViewer::slotClear()
// }
void ScanViewer::Quarantine(){
bool allQuarantined=TRUE;
bool allQuarantined=true;
config->setGroup("Kuarantine");
TQStringList lastQuarLocations = config->readListEntry("KuarantineLocations");
@ -710,7 +710,7 @@ void ScanViewer::Quarantine(){
TQString itemName = item2.mid((fnameEndPoint+1),((dtStartPoint+1) - (fnameEndPoint+2)));
TQString when = item2.mid((dtStartPoint+1),(item2.length() - (dtStartPoint+1)));
if (!(fname.isEmpty())){
TQStringList tokens = TQStringList::split ( "/", fname, FALSE );
TQStringList tokens = TQStringList::split ( "/", fname, false );
TQString qname = tokens.last();
qname.prepend("/");
qname.prepend(quarloc);
@ -826,7 +826,7 @@ void ScanViewer::slotTrendMicro()
void ScanViewer::slotStartAgain()
{
calculateTime = TRUE;
calculateTime = true;
emit scanStartingAgain(this);
slotScan(m_filepattern, m_mode, m_recursive,false);
@ -840,8 +840,8 @@ bool ScanViewer::scanGoingOn()
void ScanViewer::slotCancelScanTime()
{
calculateTime = FALSE;
showProgress = FALSE;
calculateTime = false;
showProgress = false;
status2_label->show();
scan_time->hide();
@ -923,7 +923,7 @@ void ScanViewer::startProgressDialog( const TQString & text )
timer = new TQTimer( this );
connect( timer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( slotProg() ) );
timer->start( 200, FALSE );
timer->start( 200, false );
}
void ScanViewer::slotProg()

@ -212,7 +212,7 @@ void Schedule::slotScheduleScan()
cttask = new CTTask ("", "", TRUE);
cttask = new CTTask ("", "", true);
cttask->user = "";
@ -220,15 +220,15 @@ void Schedule::slotScheduleScan()
TQString startupcommand = createStartupScript();
cttask->comment = (const char *)i18n("KlamAV Scheduled Scan at TDE Login of %1").arg(filepattern.join(" ")).local8Bit();
cttask->command = (const char *)TQString("%1").arg(startupcommand).local8Bit();
cttask->enabled = FALSE;
cttask->enabled = false;
}else{
cttask->comment = (const char *)i18n("KlamAV Scheduled Scan of %1").arg(filepattern.join(" ")).local8Bit();
cttask->command = (const char *)TQString("%1 '%2'").arg(createScanScript()).arg(filepattern.join("' '")).local8Bit();
cttask->enabled = TRUE;
cttask->enabled = true;
}
cttask->silent = FALSE;
cttask->silent = false;
int curhour = (TQTime::currentTime()).hour();
@ -242,18 +242,18 @@ void Schedule::slotScheduleScan()
if (command.contains(i18n("at the current time")) ){
cttask->hour.set(curhour, TRUE);
cttask->minute.set(curmin, TRUE);
cttask->hour.set(curhour, true);
cttask->minute.set(curmin, true);
}else{
cttask->hour.set(shour, TRUE);
cttask->minute.set(smin, TRUE);
cttask->hour.set(shour, true);
cttask->minute.set(smin, true);
}
if (command.contains(i18n("Every week")) ){
if (command.contains(i18n("from now on") ))
cttask->dayOfWeek.set(todaydayofweek, TRUE);
cttask->dayOfWeek.set(todaydayofweek, true);
else
cttask->dayOfWeek.set(sdatedayofweek, TRUE);
cttask->dayOfWeek.set(sdatedayofweek, true);
for (int dm = 1; dm <= 31; dm++)
{
cttask->dayOfMonth.set(dm, true);
@ -265,9 +265,9 @@ void Schedule::slotScheduleScan()
}else if (command.contains(i18n("Every month")) ){
if (command.contains(i18n("from now on") ))
cttask->dayOfMonth.set(TQDate::currentDate().day(), TRUE);
cttask->dayOfMonth.set(TQDate::currentDate().day(), true);
else
cttask->dayOfMonth.set(_date.day(), TRUE);
cttask->dayOfMonth.set(_date.day(), true);
for (int dw = 1; dw <= 7; dw++)
{
cttask->dayOfWeek.set(dw, true);
@ -291,14 +291,14 @@ void Schedule::slotScheduleScan()
cttask->month.set(mo, true);
}
}else if (command.contains(i18n("Once only")) ){
cttask->month.set(_date.month(), TRUE);
cttask->dayOfMonth.set(_date.day(), TRUE);
cttask->month.set(_date.month(), true);
cttask->dayOfMonth.set(_date.day(), true);
}else{
cttask->month.set(1, TRUE);
cttask->dayOfMonth.set(1, TRUE);
cttask->month.set(1, true);
cttask->dayOfMonth.set(1, true);
cttask->dayOfWeek.set(1, true);
cttask->hour.set(0, TRUE);
cttask->minute.set(0, TRUE);
cttask->hour.set(0, true);
cttask->minute.set(0, true);
}
@ -490,8 +490,8 @@ void Schedule::getICEauth()
TQString command=TQString("iceauth -v exit");
iceproc = new TDEProcIO();
iceproc->setUseShell(TRUE);
iceproc->setUsePty(TDEProcIO::Stdout,TRUE);
iceproc->setUseShell(true);
iceproc->setUsePty(TDEProcIO::Stdout,true);
*iceproc<<command;

@ -79,7 +79,7 @@ public:
/**
* Default Constructor
*/
Schedule( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
Schedule( TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
/**
* Default Destructor

Loading…
Cancel
Save