From 291b4f5da2f98283b7c98ee90401df7c3cb34dad Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 22 Mar 2025 14:06:03 +0900 Subject: Replace TRUE/FALSE with boolean values true/false Signed-off-by: Michele Calgaro --- src/modules/objects/class_groupbox.cpp | 8 ++++---- src/modules/objects/class_lcd.cpp | 6 +++--- src/modules/objects/class_listview.cpp | 4 ++-- src/modules/objects/class_listviewitem.cpp | 2 +- src/modules/objects/class_mainwindow.cpp | 2 +- src/modules/objects/class_multilineedit.cpp | 18 +++++++++--------- src/modules/objects/class_painter.cpp | 12 ++++++------ src/modules/objects/class_popupmenu.cpp | 4 ++-- src/modules/objects/class_process.cpp | 2 +- src/modules/objects/class_radiobutton.cpp | 2 +- src/modules/objects/class_toolbar.cpp | 2 +- src/modules/objects/class_toolbutton.cpp | 4 ++-- src/modules/objects/class_widget.cpp | 14 +++++++------- src/modules/objects/class_workspace.cpp | 2 +- 14 files changed, 41 insertions(+), 41 deletions(-) (limited to 'src/modules/objects') diff --git a/src/modules/objects/class_groupbox.cpp b/src/modules/objects/class_groupbox.cpp index f96b3c0..5f24409 100644 --- a/src/modules/objects/class_groupbox.cpp +++ b/src/modules/objects/class_groupbox.cpp @@ -68,13 +68,13 @@ const int align_cod[] = { !fn: $title() Returns the group box title text. !fn: $setFlat() - Sets whether the group box is painted flat. Valid Values are 1 or 0. + Sets whether the group box is painted flat. Valid Values are true or false. !fn: $isFlat() - Returns 1 (TRUE) if the group box is painted flat; otherwise returns 0 (FALSE). + Returns true if the group box is painted flat; otherwise returns false. !fn: $isCheckable() - Returns 1 (TRUE) if the group box has a checkbox in its title; otherwise returns 0 (FALSE). + Returns true if the group box has a checkbox in its title; otherwise returns false. !fn: $setCheckable() - Sets whether the group box has a checkbox in its title: Valid values are 1 or 0. + Sets whether the group box has a checkbox in its title: Valid values are true or false. !fn: $setInsideMargin() Sets the the width of the inside margin to m pixels. !fn: $insideMargin() diff --git a/src/modules/objects/class_lcd.cpp b/src/modules/objects/class_lcd.cpp index 79ddea0..88c665f 100644 --- a/src/modules/objects/class_lcd.cpp +++ b/src/modules/objects/class_lcd.cpp @@ -58,12 +58,12 @@ !fn: $setNumDigits() Sets the lcd number value. !fn: $checkOverflow() - Returns TRUE if num is too big to be displayed in its entirety; - otherwise returns FALSE. + Returns true if num is too big to be displayed in its entirety; + otherwise returns false. !fn: $setSmallDecimalPoint() Sets the the decimal point style, valid bool values are 1 or 0. !fn: $checkOverflow() - Returns 1 (TRUE) if num is too big to be displayed in its entirety; otherwise returns 0 (FALSE). + Returns true if num is too big to be displayed in its entirety; otherwise returns false. */ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_lcd,"lcdnumber","widget") diff --git a/src/modules/objects/class_listview.cpp b/src/modules/objects/class_listview.cpp index c23abd5..34a66b5 100644 --- a/src/modules/objects/class_listview.cpp +++ b/src/modules/objects/class_listview.cpp @@ -66,7 +66,7 @@ Adds a width pixels wide column with the column header label to the list view. !fn: $setSorting(,) - Sets the list view to be sorted by column column in ascending order if ascending is 1 or descending order if it is FALSE. + Sets the list view to be sorted by column column in ascending order if ascending is 1 or descending order if it is false. If column is -1, sorting is disabled and the user cannot sort columns by clicking on the column headers !fn: $hideListViewHeader() @@ -510,7 +510,7 @@ KviKvsMdmListView::KviKvsMdmListView(TQWidget * par,const char * name,KviKvsObje { m_pParentScript=parent; setAcceptDrops(true); - viewport()->setAcceptDrops( TRUE ); + viewport()->setAcceptDrops( true ); } KviKvsMdmListView::~KviKvsMdmListView() diff --git a/src/modules/objects/class_listviewitem.cpp b/src/modules/objects/class_listviewitem.cpp index 605fcee..a4dba4c 100644 --- a/src/modules/objects/class_listviewitem.cpp +++ b/src/modules/objects/class_listviewitem.cpp @@ -62,7 +62,7 @@ Pixmap can be a Kvirc imageid, an image file or a [class]pixmap[/class] object. !fn: $setRenameEnabled(,) - If b is TRUE (1), this item can be in-place renamed in the column col by the user; otherwise it cannot be renamed in-place. + If b is true, this item can be in-place renamed in the column col by the user; otherwise it cannot be renamed in-place. !fn: $setEnabled() Enables or disables the item diff --git a/src/modules/objects/class_mainwindow.cpp b/src/modules/objects/class_mainwindow.cpp index 674575e..bd0dd25 100644 --- a/src/modules/objects/class_mainwindow.cpp +++ b/src/modules/objects/class_mainwindow.cpp @@ -93,7 +93,7 @@ bool KviKvsObject_mainwindow::functionsetCentralWidget(KviKvsObjectFunctionCall if(!pObject->object()->inherits("KviKvsObject_widget")) { c->warning(__tr2qs("Widget object required")); - return TRUE; + return true; } if(widget()) ((KviTalMainWindow *)widget())->setCentralWidget(((TQWidget *)(pObject->object()))); return true; diff --git a/src/modules/objects/class_multilineedit.cpp b/src/modules/objects/class_multilineedit.cpp index 9ee232b..ac8ce39 100644 --- a/src/modules/objects/class_multilineedit.cpp +++ b/src/modules/objects/class_multilineedit.cpp @@ -106,9 +106,9 @@ static int mod_cod[] = { Sets the editor to be read-only if bReadOnly is 1 or removes the read-only status is ReadOnly is 0 !fn: $atBeginning() - Returns 1(TRUE) if the cursor is placed at the beginning of the text; otherwise returns 0(FALSE). + Returns true if the cursor is placed at the beginning of the text; otherwise returns false. !fn: $atEnd() - Returns 1(TRUE) if the cursor is placed at the end of the text; otherwise returns 0(FALSE). + Returns true if the cursor is placed at the end of the text; otherwise returns false. !fn: $setWordWrap() Sets the word wrap mode to mode. Valid Values are:[br] - NoWrap - Do not wrap the text.[br] @@ -144,11 +144,11 @@ static int mod_cod[] = { !fn: $setUnderline() If the bool value is 1 sets the current format to underline; otherwise, if it's 0 sets the current format to no-underline. !fn: $italic() - Returns 1(TRUE) if the current format is italic; otherwise returns 0(FALSE). + Returns true if the current format is italic; otherwise returns false. !fn: $bold() - Returns 1(TRUE) if the current format is bold; otherwise returns 0(FALSE). + Returns true if the current format is bold; otherwise returns false. !fn: $underline() - Returns 1(TRUE) if the current format is underline; otherwise returns 0(FALSE). + Returns true if the current format is underline; otherwise returns false. !fn: $zoomIn() Zooms in on the text by making the base font size range points larger. !fn: $zoomOut() @@ -166,7 +166,7 @@ static int mod_cod[] = { !fn: $setUndoDepth() Sets the depth of the undo history to x. !fn: $isUndoRedoEnabled() - Returns 1 (TRUE) if undo/redo is enabled; otherwise returns 0 (FALSE). + Returns true if undo/redo is enabled; otherwise returns false. !fn: $undoDepth() Returns the depth of the undo history. !fn: $indent() @@ -188,7 +188,7 @@ static int mod_cod[] = { - array(red:integer,green:integer,blue:integer) - red:integer,green:integer,blue:integer. !fn: $setModified() - Sets whether the document has been modified by the user. Valid Values are 1(TRUE) or 0(FALSE) + Sets whether the document has been modified by the user. Valid Values are true or false !fn: $insertParagraph(,) Inserts text as a new paragraph at position . !fn: $removeParagraph() @@ -210,9 +210,9 @@ static int mod_cod[] = { !fn: $loadFile() Load the file specified in the , also html files. !fn: $isUndoAvailable () - Returns 1(TRUE) if undo is available; otherwise returns 0(FALSE). + Returns true if undo is available; otherwise returns false. !fn: $isRedoAvailable () - Returns 1(TRUE) if redo is available; otherwise returns 0(FALSE). + Returns true if redo is available; otherwise returns false. !fn: $setAlignment() Sets the alignment of the current paragraph to . Valid values are:[br] - AlignAuto - Aligns according to the language.[br] diff --git a/src/modules/objects/class_painter.cpp b/src/modules/objects/class_painter.cpp index 3627b9e..b2f76a6 100644 --- a/src/modules/objects/class_painter.cpp +++ b/src/modules/objects/class_painter.cpp @@ -500,12 +500,12 @@ bool KviKvsObject_painter::functionSetFont(KviKvsObjectFunctionCall *c) TQFont font=m_pPainter->font(); font.setFamily(szFamily); font.setPointSize(uSize); - if(KviTQString::equalCI(szStyle,"italic")) font.setItalic(TRUE); - if(KviTQString::equalCI(szStyle,"bold")) font.setBold(TRUE); - if(KviTQString::equalCI(szStyle,"underline"))font.setUnderline(TRUE); - if(KviTQString::equalCI(szStyle,"overline")) font.setOverline(TRUE); - if(KviTQString::equalCI(szStyle,"strikeout"))font.setStrikeOut(TRUE); - if(KviTQString::equalCI(szStyle,"fixedpitch")) font.setFixedPitch(TRUE); + if(KviTQString::equalCI(szStyle,"italic")) font.setItalic(true); + if(KviTQString::equalCI(szStyle,"bold")) font.setBold(true); + if(KviTQString::equalCI(szStyle,"underline"))font.setUnderline(true); + if(KviTQString::equalCI(szStyle,"overline")) font.setOverline(true); + if(KviTQString::equalCI(szStyle,"strikeout"))font.setStrikeOut(true); + if(KviTQString::equalCI(szStyle,"fixedpitch")) font.setFixedPitch(true); m_pPainter->setFont(font); return true; } diff --git a/src/modules/objects/class_popupmenu.cpp b/src/modules/objects/class_popupmenu.cpp index 3c4cc75..3216300 100644 --- a/src/modules/objects/class_popupmenu.cpp +++ b/src/modules/objects/class_popupmenu.cpp @@ -233,7 +233,7 @@ bool KviKvsObject_popupmenu::functioninsertWidget(KviKvsObjectFunctionCall *c) if(!pObject->object()->isWidgetType()) { c->warning(__tr2qs("Can't add a non-widget object")); - return TRUE; + return true; } if (widget()) ((KviTalPopupMenu *)widget())->insertItem(((KviTalPopupMenu *)(pObject->object()))); return true; @@ -252,7 +252,7 @@ bool KviKvsObject_popupmenu::functioninsertHandle(KviKvsObjectFunctionCall *c) if(!ob->object()->inherits("KviKvsObject_popupmenu")) { c->warning(__tr2qs("Can't add a non - popupmenu object")); - return TRUE; + return true; } if(!widget())return true; TQPixmap *pix = 0; diff --git a/src/modules/objects/class_process.cpp b/src/modules/objects/class_process.cpp index 256c821..2ffdadb 100644 --- a/src/modules/objects/class_process.cpp +++ b/src/modules/objects/class_process.cpp @@ -141,7 +141,7 @@ !fn: $isRunning() Return 1 if the process is running, else return 0. !fn: $normalExit() - Returns TRUE if the process has exited normally; otherwise returns FALSE. + Returns true if the process has exited normally; otherwise returns false. !fn: $readyReadStdoutEvent() This function is invoched by the process when there are new datas.[br] The default implementation emits the [classfnc]$readyReadStdout[/classfnc]() signal. diff --git a/src/modules/objects/class_radiobutton.cpp b/src/modules/objects/class_radiobutton.cpp index 85bc9ec..b068b38 100644 --- a/src/modules/objects/class_radiobutton.cpp +++ b/src/modules/objects/class_radiobutton.cpp @@ -45,7 +45,7 @@ !fn: $settext() Sets the text that will appear in the radiobutton. !fn: $isChecked() - Returns 1 (TRUE) if the radio button is checked; otherwise returns 0 (FALSE). + Returns true if the radio button is checked; otherwise returns false. !fn: $setChecked() Sets whether the radio button is checked to check. !fn: $setPixmap() diff --git a/src/modules/objects/class_toolbar.cpp b/src/modules/objects/class_toolbar.cpp index 385c184..d40edf6 100644 --- a/src/modules/objects/class_toolbar.cpp +++ b/src/modules/objects/class_toolbar.cpp @@ -137,7 +137,7 @@ bool KviKvsObject_toolbar::functionsetStretchableWidget(KviKvsObjectFunctionCall if(!ob->object()->inherits("KviKvsObject_widget")) { c->warning(__tr2qs("Widget object required")); - return TRUE; + return true; } if(widget()) ((KviTalToolBar *)widget())->setStretchableWidget(((TQWidget *)(ob->object()))); return true; diff --git a/src/modules/objects/class_toolbutton.cpp b/src/modules/objects/class_toolbutton.cpp index f7fc1f4..8ff37ea 100644 --- a/src/modules/objects/class_toolbutton.cpp +++ b/src/modules/objects/class_toolbutton.cpp @@ -55,7 +55,7 @@ !fn:$usesTextLabel() Return 1 if the setUsesTextLabel is enabled, otherwise return 0. !fn:$setTextLabel(,[tooltip:string]) - Sets the label of this button to and automatically sets it as a tool tip if is TRUE. + Sets the label of this button to and automatically sets it as a tool tip if is true. !fn: $textLabel() Returns the label of tthe button. !fn:$setAutoRaise() @@ -265,7 +265,7 @@ bool KviKvsObject_toolbutton::functionsetPopup(KviKvsObjectFunctionCall *c) if(!ob->object()->inherits("KviKvsObject_popupmenu")) { c->warning(__tr2qs("Can't add a non - popupmenu object")); - return TRUE; + return true; } if(widget()) ((TQToolButton *)widget())->setPopup(((KviTalPopupMenu *)(ob->object()))); diff --git a/src/modules/objects/class_widget.cpp b/src/modules/objects/class_widget.cpp index a5da660..f3b11d2 100644 --- a/src/modules/objects/class_widget.cpp +++ b/src/modules/objects/class_widget.cpp @@ -110,7 +110,7 @@ const int widgettypes_cod[] = { See also [classfnc]$show[/classfnc]() and [classfnc]$isVisible[/classfnc]. !fn: $repaint() Repaints the widget directly by calling [classfnc]$paintEvent[/classfnc]() immediately.[br] - If erase is TRUE, erases the widget before the $paintEvent() call. + If erase is true, erases the widget before the $paintEvent() call. !fn: $x() Returns the x coordinate of the upper-left corner of this widget relative to the parent widget, @@ -1514,12 +1514,12 @@ bool KviKvsObject_widget::function_setFont(KviKvsObjectFunctionCall *c) TQFont font=widget()->font(); font.setFamily(szFamily); font.setPointSize(uSize); - if(KviTQString::equalCI(szStyle,"italic")) font.setItalic(TRUE); - else if(KviTQString::equalCI(szStyle,"bold")) font.setBold(TRUE); - else if(KviTQString::equalCI(szStyle,"underline"))font.setUnderline(TRUE); - else if(KviTQString::equalCI(szStyle,"overline")) font.setOverline(TRUE); - else if(KviTQString::equalCI(szStyle,"strikeout"))font.setStrikeOut(TRUE); - else if(KviTQString::equalCI(szStyle,"fixedpitch")) font.setFixedPitch(TRUE); + if(KviTQString::equalCI(szStyle,"italic")) font.setItalic(true); + else if(KviTQString::equalCI(szStyle,"bold")) font.setBold(true); + else if(KviTQString::equalCI(szStyle,"underline"))font.setUnderline(true); + else if(KviTQString::equalCI(szStyle,"overline")) font.setOverline(true); + else if(KviTQString::equalCI(szStyle,"strikeout"))font.setStrikeOut(true); + else if(KviTQString::equalCI(szStyle,"fixedpitch")) font.setFixedPitch(true); else c->warning(__tr2qs("Unknown style '%Q'"),&szStyle); widget()->setFont(font); return true; diff --git a/src/modules/objects/class_workspace.cpp b/src/modules/objects/class_workspace.cpp index 98f0a2f..38ad499 100644 --- a/src/modules/objects/class_workspace.cpp +++ b/src/modules/objects/class_workspace.cpp @@ -51,7 +51,7 @@ !fn: $activeWindow() Returns the active window, or 0 if no window is active. !fn: $scrollBarsEnabled() - Returns TRUE if the workspace provides scrollbars; otherwise returns FALSE. + Returns true if the workspace provides scrollbars; otherwise returns false. !fn: $setscrollBarsEnabled() Sets whether the workspace provides scrollbars to enable. (bEnabled 1 or 0) !fn: $cascade() -- cgit v1.2.3