summaryrefslogtreecommitdiffstats
path: root/examples/qwerty
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-07-01 22:09:14 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-07-08 09:01:42 +0900
commit81ade129093a279e6537db25710583fd2bba9427 (patch)
treea210834cbccc8aee2e9de7a8b7f41e1d31e2ced0 /examples/qwerty
parent35ced32e331ee29fda1642616c803637952f5b22 (diff)
downloadtqt-81ade129.tar.gz
tqt-81ade129.zip
Replace TRUE/FALSE with boolean values true/false - part 2
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit c03a4800879ab62692e017e01c825ba12a421ad0)
Diffstat (limited to 'examples/qwerty')
-rw-r--r--examples/qwerty/qwerty.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/examples/qwerty/qwerty.cpp b/examples/qwerty/qwerty.cpp
index 28dbc48a9..61184447e 100644
--- a/examples/qwerty/qwerty.cpp
+++ b/examples/qwerty/qwerty.cpp
@@ -21,7 +21,7 @@
#include <ntqtextcodec.h>
-const bool no_writing = FALSE;
+const bool no_writing = false;
static TQPtrList<TQTextCodec> *codecList = 0;
@@ -68,7 +68,7 @@ Editor::Editor( TQWidget * parent , const char * name )
edit->insertSeparator();
edit->insertItem( "&Select Font" , this, TQ_SLOT(font()), ALT+Key_T );
#endif
- changed = FALSE;
+ changed = false;
e = new TQMultiLineEdit( this, "editor" );
connect( e, TQ_SIGNAL( textChanged() ), this, TQ_SLOT( textChanged() ) );
@@ -155,7 +155,7 @@ void Editor::load( const TQString& fileName, int code )
if ( !f.open( IO_ReadOnly ) )
return;
- e->setAutoUpdate( FALSE );
+ e->setAutoUpdate( false );
TQTextStream t(&f);
if ( code >= Codec )
@@ -181,11 +181,11 @@ void Editor::load( const TQString& fileName, int code )
e->setText( t.read() );
f.close();
- e->setAutoUpdate( TRUE );
+ e->setAutoUpdate( true );
e->repaint();
setCaption( fileName );
- changed = FALSE;
+ changed = false;
}
void Editor::openAsEncoding( int code )
@@ -205,7 +205,7 @@ bool Editor::save()
TQString fn = TQFileDialog::getSaveFileName( TQString::null, TQString::null, this );
if ( !fn.isEmpty() )
return saveAs( fn );
- return FALSE;
+ return false;
#endif
}
@@ -255,7 +255,7 @@ bool Editor::saveAs( const TQString& fileName, int code )
TQMessageBox::warning(this,"I/O Error",
TQString("The file could not be opened.\n\n")
+fileName);
- return FALSE;
+ return false;
}
TQTextStream t(&f);
if ( code >= Codec )
@@ -269,15 +269,15 @@ bool Editor::saveAs( const TQString& fileName, int code )
t << e->text();
f.close();
setCaption( fileName );
- changed = FALSE;
- return TRUE;
+ changed = false;
+ return true;
}
void Editor::print()
{
#ifndef TQT_NO_PRINTER
if ( printer.setup(this) ) { // opens printer dialog
- printer.setFullPage(TRUE); // we'll set our own margins
+ printer.setFullPage(true); // we'll set our own margins
TQPainter p;
p.begin( &printer ); // paint on printer
p.setFont( e->font() );
@@ -350,5 +350,5 @@ void Editor::toLower()
void Editor::textChanged()
{
- changed = TRUE;
+ changed = true;
}