Replace TRUE/FALSE with boolean values true/false

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/19/head
Michele Calgaro 12 months ago
parent 639cad7d66
commit cabe8e1ddb
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -26,7 +26,7 @@ static ActionRegistry * actionRegistryInstance = 0;
ActionRegistry::ActionRegistry()
{
actions.setAutoDelete(TRUE);
actions.setAutoDelete(true);
}
ActionRegistry::~ActionRegistry()

@ -31,8 +31,8 @@
CachedCatalog::CachedCatalog()
: KatapultCatalog()
{
cache.setAutoDelete(TRUE);
results.setAutoDelete(FALSE);
cache.setAutoDelete(true);
results.setAutoDelete(false);
}
CachedCatalog::~CachedCatalog()
@ -114,7 +114,7 @@ Match CachedCatalog::queryItem(const KatapultItem *item, TQString query) const
TQStringList::Iterator wit = words.begin();
for(TQStringList::Iterator qit = queryWords.begin(); qit != queryWords.end(); ++qit) {
TQString queryWord = *qit;
bool didMatch = FALSE;
bool didMatch = false;
for(; wit != words.end(); ++wit) {
TQString word = *wit;
if(word.startsWith(queryWord)) {
@ -125,7 +125,7 @@ Match CachedCatalog::queryItem(const KatapultItem *item, TQString query) const
} else {
_matched += word.length();
}
didMatch = TRUE;
didMatch = true;
break;
}
if(wordNo == 0) {
@ -134,7 +134,7 @@ Match CachedCatalog::queryItem(const KatapultItem *item, TQString query) const
_matched += word.length();
}
}
if(didMatch == FALSE) {
if(!didMatch) {
return Match();
}
wordNo++;

@ -152,7 +152,7 @@ void ImageDisplay::showEvent(TQShowEvent *)
fadeOut = false;
alpha = 0;
fadeImg = new TQImage(getDisplay().convertToImage());
fadeTimer->start(FADEINTERVAL, FALSE);
fadeTimer->start(FADEINTERVAL, false);
}
}
@ -170,9 +170,9 @@ void ImageDisplay::hide()
if(fadeImg != 0)
delete fadeImg;
fadeImg = new TQImage(getDisplay().convertToImage());
fadeOut = TRUE;
fadeOut = true;
if(!fadeTimer->isActive())
fadeTimer->start(FADEINTERVAL, FALSE);
fadeTimer->start(FADEINTERVAL, false);
}
}

@ -27,7 +27,7 @@ Match::Match()
this->_rank = 0;
this->_item = 0;
this->_matched = 0;
this->_null = TRUE;
this->_null = true;
}
Match::Match(const KatapultItem *_item, int _rank, unsigned int _matched)
@ -35,7 +35,7 @@ Match::Match(const KatapultItem *_item, int _rank, unsigned int _matched)
this->_rank = _rank;
this->_item = _item;
this->_matched = _matched;
this->_null = FALSE;
this->_null = false;
}
int Match::rank() const

@ -57,7 +57,7 @@ Katapult::Katapult()
globalAccel = 0;
actions = 0;
action = 0;
executing = FALSE;
executing = false;
_query = "";
settings = new KatapultSettings();
@ -225,10 +225,10 @@ void Katapult::setQuery(TQString _query)
// no results
switch(settings->noResultsAction()) {
case KatapultSettings::NR_HideDisplay:
hideTimer->start(settings->noResultsDelay(), TRUE);
hideTimer->start(settings->noResultsDelay(), true);
break;
case KatapultSettings::NR_ClearQuery:
clearTimer->start(settings->noResultsDelay(), TRUE);
clearTimer->start(settings->noResultsDelay(), true);
break;
default:
break;
@ -258,7 +258,7 @@ void Katapult::showAboutDialog()
void Katapult::updateDisplay()
{
if(display != 0 && executing == FALSE)
if(display != 0 && !executing)
{
display->setItem(bestMatch.item());
if(bestMatch.isNull()) {
@ -305,19 +305,19 @@ void Katapult::showGlobalShortcutsDialog()
void Katapult::execute()
{
executing = TRUE;
executing = true;
if(action == 0)
{
display->setStatus(S_Active | S_NoResults);
display->update();
hideTimer->start(settings->hideDelay(), TRUE);
hideTimer->start(settings->hideDelay(), true);
} else {
completeQuery();
if(!bestMatch.isNull())
action->execute(bestMatch.item());
hideTimer->start(settings->hideDelay(), TRUE);
hideTimer->start(settings->hideDelay(), true);
}
executing = FALSE;
executing = false;
}
void Katapult::updateSystray()

@ -44,7 +44,7 @@ KatapultConfigDlg::KatapultConfigDlg(KatapultSettings *settings)
: KDialogBase(TreeList, "Configure", Ok|Cancel|Help, Ok)
{
this->settings = settings;
setTreeListAutoResize(TRUE);
setTreeListAutoResize(true);
// general settings
TQFrame *fConfGeneral = addPage(TQString("Katapult"), i18n("General Settings"));
@ -56,9 +56,9 @@ KatapultConfigDlg::KatapultConfigDlg(KatapultSettings *settings)
general->noResultsDelay->setValue(settings->noResultsDelay());
general->systrayIcon->setChecked(settings->systrayIcon());
switch(settings->noResultsAction()) {
case KatapultSettings::NR_DoNothing: general->nrDoNothing->setChecked(TRUE); break;
case KatapultSettings::NR_HideDisplay: general->nrHideDisplay->setChecked(TRUE); break;
default: general->nrClearQuery->setChecked(TRUE); break;
case KatapultSettings::NR_DoNothing: general->nrDoNothing->setChecked(true); break;
case KatapultSettings::NR_HideDisplay: general->nrHideDisplay->setChecked(true); break;
default: general->nrClearQuery->setChecked(true); break;
}
connect(general->nrDoNothing, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(nrDoNothingToggled(bool)));
general->noResultsDelay->setEnabled(!general->nrDoNothing->isChecked());
@ -71,7 +71,7 @@ KatapultConfigDlg::KatapultConfigDlg(KatapultSettings *settings)
catalogConf->catalogs->selectedListBox()->insertStringList(settings->activeCatalogNames());
catalogConf->catalogs->availableListBox()->insertStringList(settings->inactiveCatalogNames());
catalogPages.setAutoDelete(TRUE);
catalogPages.setAutoDelete(true);
TQDict<KatapultCatalog> catalogs;
catalogs = settings->activeCatalogs();
TQDictIterator<KatapultCatalog> it(catalogs);
@ -95,7 +95,7 @@ KatapultConfigDlg::KatapultConfigDlg(KatapultSettings *settings)
displayConfig = 0;
addDisplaySettings();
unfoldTreeList(TRUE);
unfoldTreeList(true);
// connect signals
connect(catalogConf->catalogs, TQ_SIGNAL(added(TQListBoxItem *)), this, TQ_SLOT(activateCatalog(TQListBoxItem* )));

@ -37,10 +37,10 @@
KatapultSettings::KatapultSettings()
{
_forceWrite = FALSE;
_forceWrite = false;
readSettings();
_isConfiguring = FALSE;
_activeCatalogs.setAutoDelete(TRUE);
_isConfiguring = false;
_activeCatalogs.setAutoDelete(true);
_display = 0;
loadCatalogPlugins();
@ -66,8 +66,8 @@ void KatapultSettings::readSettings()
_hideDelay = config->readUnsignedNumEntry("HideDelay", 1000);
_noResultsDelay = config->readUnsignedNumEntry("NoResultsDelay", 2500);
_noResultsAction = (NRAction) config->readUnsignedNumEntry("NoResultsAction", NR_ClearQuery);
_systrayIcon = config->readBoolEntry("SystrayIcon", TRUE);
_autoExec = config->readBoolEntry("AutoExec", FALSE);
_systrayIcon = config->readBoolEntry("SystrayIcon", true);
_autoExec = config->readBoolEntry("AutoExec", false);
_displayName = config->readEntry("Display", "Pure Display");
TQStringList defCatalogs;
@ -127,7 +127,7 @@ void KatapultSettings::configure()
{
if(!_isConfiguring)
{
_isConfiguring = TRUE;
_isConfiguring = true;
KatapultConfigDlg *dlg = new KatapultConfigDlg(this);
if(dlg->exec() == TQDialog::Accepted) {
@ -145,7 +145,7 @@ void KatapultSettings::configure()
}
delete dlg;
_isConfiguring = FALSE;
_isConfiguring = false;
}
}

@ -24,14 +24,14 @@
* 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.
*/
MyDialog1::MyDialog1( TQWidget* parent, const char* name, bool modal, WFlags fl )
: TQDialog( parent, name, modal, fl )
{
if ( !name )
setName( "MyDialog1" );
setSizeGripEnabled( TRUE );
setSizeGripEnabled( true );
MyDialog1Layout = new TQGridLayout( this, 1, 1, 11, 6, "MyDialog1Layout");
listBox = new TQListBox( this, "listBox" );
@ -52,18 +52,18 @@ MyDialog1::MyDialog1( TQWidget* parent, const char* name, bool modal, WFlags fl
Layout1 = new TQHBoxLayout( 0, 0, 6, "Layout1");
buttonHelp = new TQPushButton( this, "buttonHelp" );
buttonHelp->setAutoDefault( TRUE );
buttonHelp->setAutoDefault( true );
Layout1->addWidget( buttonHelp );
TQt::Horizontal_Spacing2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
Layout1->addItem(TQt::Horizontal_Spacing2 );
buttonOk = new TQPushButton( this, "buttonOk" );
buttonOk->setAutoDefault( TRUE );
buttonOk->setDefault( TRUE );
buttonOk->setAutoDefault( true );
buttonOk->setDefault( true );
Layout1->addWidget( buttonOk );
buttonCancel = new TQPushButton( this, "buttonCancel" );
buttonCancel->setAutoDefault( TRUE );
buttonCancel->setAutoDefault( true );
Layout1->addWidget( buttonCancel );
MyDialog1Layout->addMultiCellLayout( Layout1, 1, 1, 0, 1 );

@ -147,8 +147,8 @@ unsigned int BookmarkCatalog::minQueryLen() const
void BookmarkCatalog::readSettings(TDEConfigBase *config)
{
_minQueryLen = config->readUnsignedNumEntry("MinQueryLen", 3);
_mozEnabled = config->readBoolEntry("MozEnabled", TRUE);
_mozAuto = config->readBoolEntry("MozAuto", TRUE);
_mozEnabled = config->readBoolEntry("MozEnabled", true);
_mozAuto = config->readBoolEntry("MozAuto", true);
_mozFile = config->readEntry("MozFile", "");
}

@ -47,8 +47,8 @@ DocumentCatalog::DocumentCatalog(TQObject *, const char *, const TQStringList&)
currentPath = "";
currentDirDoc = 0;
queryMatched = 0;
filesListed = FALSE;
files.setAutoDelete(TRUE);
filesListed = false;
files.setAutoDelete(true);
ActionRegistry::self()->registerAction(new ActionOpenDocument());
}
@ -68,7 +68,7 @@ void DocumentCatalog::refreshFolders()
folders.clear();
files.clear();
currentDirDoc = 0;
filesListed = FALSE;
filesListed = false;
TQStringList folderNames = dir.entryList(TQDir::Dirs);
for(TQStringList::Iterator it = folderNames.begin(); it != folderNames.end(); ++it) {
TQString dirname = *it;
@ -93,7 +93,7 @@ void DocumentCatalog::refreshFiles()
files.append(new Document(currentPath+file->fileName(), file->absFilePath(), _showPreview));
}
}
filesListed = TRUE;
filesListed = true;
}
void DocumentCatalog::queryChanged()
@ -194,7 +194,7 @@ unsigned int DocumentCatalog::minQueryLen() const
void DocumentCatalog::readSettings(TDEConfigBase *config)
{
_minQueryLen = config->readUnsignedNumEntry("MinQueryLen", 1);
_showPreview = config->readBoolEntry("showPreview", FALSE);
_showPreview = config->readBoolEntry("showPreview", false);
}
void DocumentCatalog::writeSettings(TDEConfigBase *config)

@ -40,9 +40,9 @@ ProgramCatalog::ProgramCatalog(TQObject *, const char *, const TQStringList&)
: CachedCatalog()
{
_minQueryLen = 1;
_ignoreIconless = TRUE;
_ignoreTerminal = TRUE;
_useExecName = FALSE;
_ignoreIconless = true;
_ignoreTerminal = true;
_useExecName = false;
ActionRegistry::self()->registerAction(new ActionRunProgram());
}
@ -98,9 +98,9 @@ unsigned int ProgramCatalog::minQueryLen() const
void ProgramCatalog::readSettings(TDEConfigBase *config)
{
_minQueryLen = config->readUnsignedNumEntry("MinQueryLen", 1);
_ignoreIconless = config->readBoolEntry("IgnoreIconless", TRUE);
_useExecName = config->readBoolEntry("UseExecName", FALSE);
_ignoreTerminal = config->readBoolEntry("IgnoreTerminal", TRUE);
_ignoreIconless = config->readBoolEntry("IgnoreIconless", true);
_useExecName = config->readBoolEntry("UseExecName", false);
_ignoreTerminal = config->readBoolEntry("IgnoreTerminal", true);
}
void ProgramCatalog::writeSettings(TDEConfigBase *config)

@ -110,7 +110,7 @@ void Spelling::evaluate() const
_result = "my result";
spellChecker->checkWord(text);
while (corrected == false) {
while (!corrected) {
tdeApp->processEvents();
}

@ -7983,8 +7983,8 @@ static struct EmbedImage {
bool alpha;
const char *name;
} embed_image_vec[] = {
{ 295, 189, 32, (const unsigned char*)singlebg_data, 0, 0, TRUE, "singlebg" },
{ 295, 189, 32, (const unsigned char*)doublebg_data, 0, 0, TRUE, "doublebg" },
{ 295, 189, 32, (const unsigned char*)singlebg_data, 0, 0, true, "singlebg" },
{ 295, 189, 32, (const unsigned char*)doublebg_data, 0, 0, true, "doublebg" },
{ 0, 0, 0, 0, 0, 0, 0, 0 }
};
@ -8003,7 +8003,7 @@ static const TQImage& qembed_findImage( const TQString& name )
embed_image_vec[i].numColors,
TQImage::BigEndian );
if ( embed_image_vec[i].alpha )
img->setAlphaBuffer( TRUE );
img->setAlphaBuffer( true );
dict.insert( name, img );
break;
}

@ -9760,8 +9760,8 @@ static struct EmbedImage {
bool alpha;
const char *name;
} embed_image_vec[] = {
{ 228, 220, 32, (const unsigned char*)singlebg_data, 0, 0, TRUE, "singlebg" },
{ 392, 220, 32, (const unsigned char*)doublebg_data, 0, 0, TRUE, "doublebg" },
{ 228, 220, 32, (const unsigned char*)singlebg_data, 0, 0, true, "singlebg" },
{ 392, 220, 32, (const unsigned char*)doublebg_data, 0, 0, true, "doublebg" },
{ 0, 0, 0, 0, 0, 0, 0, 0 }
};
@ -9780,7 +9780,7 @@ static const TQImage& qembed_findImage( const TQString& name )
embed_image_vec[i].numColors,
TQImage::BigEndian );
if ( embed_image_vec[i].alpha )
img->setAlphaBuffer( TRUE );
img->setAlphaBuffer( true );
dict.insert( name, img );
break;
}

@ -9760,8 +9760,8 @@ static struct EmbedImage {
bool alpha;
const char *name;
} embed_image_vec[] = {
{ 392, 220, 32, (const unsigned char*)doublebg_data, 0, 0, TRUE, "doublebg" },
{ 228, 220, 32, (const unsigned char*)singlebg_data, 0, 0, TRUE, "singlebg" },
{ 392, 220, 32, (const unsigned char*)doublebg_data, 0, 0, true, "doublebg" },
{ 228, 220, 32, (const unsigned char*)singlebg_data, 0, 0, true, "singlebg" },
{ 0, 0, 0, 0, 0, 0, 0, 0 }
};
@ -9780,7 +9780,7 @@ static const TQImage& qembed_findImage( const TQString& name )
embed_image_vec[i].numColors,
TQImage::BigEndian );
if ( embed_image_vec[i].alpha )
img->setAlphaBuffer( TRUE );
img->setAlphaBuffer( true );
dict.insert( name, img );
break;
}

Loading…
Cancel
Save