summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/canvas/tqcanvas.cpp186
-rw-r--r--src/canvas/tqcanvas.h6
-rw-r--r--src/codecs/tqbig5codec.cpp12
-rw-r--r--src/codecs/tqeucjpcodec.cpp6
-rw-r--r--src/codecs/tqeuckrcodec.cpp6
-rw-r--r--src/codecs/tqfontcncodec.cpp2
-rw-r--r--src/codecs/tqgb18030codec.cpp12
-rw-r--r--src/codecs/tqhebrewcodec.cpp22
-rw-r--r--src/codecs/tqisciicodec.cpp4
-rw-r--r--src/codecs/tqjiscodec.cpp18
-rw-r--r--src/codecs/tqsjiscodec.cpp6
-rw-r--r--src/codecs/tqtextcodec.cpp18
-rw-r--r--src/codecs/tqtextcodecfactory.cpp2
-rw-r--r--src/codecs/tqutfcodec.cpp20
-rw-r--r--src/dialogs/tqcolordialog.cpp92
-rw-r--r--src/dialogs/tqcolordialog.h4
-rw-r--r--src/dialogs/tqdialog.cpp74
-rw-r--r--src/dialogs/tqdialog.h4
-rw-r--r--src/dialogs/tqerrormessage.cpp8
-rw-r--r--src/dialogs/tqfiledialog.cpp606
-rw-r--r--src/dialogs/tqfiledialog.h18
-rw-r--r--src/dialogs/tqfontdialog.cpp62
-rw-r--r--src/dialogs/tqfontdialog.h2
-rw-r--r--src/dialogs/tqinputdialog.cpp48
-rw-r--r--src/dialogs/tqinputdialog.h4
-rw-r--r--src/dialogs/tqmessagebox.cpp24
-rw-r--r--src/dialogs/tqmessagebox.h2
-rw-r--r--src/dialogs/tqprintdialog.cpp96
-rw-r--r--src/dialogs/tqprintdialog.h2
-rw-r--r--src/dialogs/tqprogressdialog.cpp50
-rw-r--r--src/dialogs/tqprogressdialog.h4
-rw-r--r--src/dialogs/tqtabdialog.cpp40
-rw-r--r--src/dialogs/tqtabdialog.h2
-rw-r--r--src/dialogs/tqwizard.cpp48
-rw-r--r--src/dialogs/tqwizard.h2
-rw-r--r--src/kernel/qdnd_x11.cpp136
-rw-r--r--src/kernel/tqabstractlayout.cpp140
-rw-r--r--src/kernel/tqaccel.cpp80
-rw-r--r--src/kernel/tqaccessible.cpp24
-rw-r--r--src/kernel/tqapplication.cpp312
-rw-r--r--src/kernel/tqapplication.h16
-rw-r--r--src/kernel/tqapplication_x11.cpp492
-rw-r--r--src/kernel/tqasyncimageio.cpp42
-rw-r--r--src/kernel/tqasyncio.cpp30
-rw-r--r--src/kernel/tqbitmap.cpp28
-rw-r--r--src/kernel/tqbitmap.h8
-rw-r--r--src/kernel/tqclipboard.cpp20
-rw-r--r--src/kernel/tqclipboard_x11.cpp136
-rw-r--r--src/kernel/tqcolor.cpp38
-rw-r--r--src/kernel/tqcolor_p.cpp6
-rw-r--r--src/kernel/tqcolor_x11.cpp96
-rw-r--r--src/kernel/tqcursor_x11.cpp6
-rw-r--r--src/kernel/tqdesktopwidget_x11.cpp10
-rw-r--r--src/kernel/tqdragobject.cpp116
-rw-r--r--src/kernel/tqdragobject.h2
-rw-r--r--src/kernel/tqdrawutil.cpp28
-rw-r--r--src/kernel/tqdrawutil.h20
-rw-r--r--src/kernel/tqdropsite.cpp4
-rw-r--r--src/kernel/tqevent.cpp136
-rw-r--r--src/kernel/tqevent.h74
-rw-r--r--src/kernel/tqeventloop.cpp34
-rw-r--r--src/kernel/tqeventloop_p.h6
-rw-r--r--src/kernel/tqeventloop_unix.cpp24
-rw-r--r--src/kernel/tqeventloop_unix_glib.cpp38
-rw-r--r--src/kernel/tqeventloop_x11.cpp12
-rw-r--r--src/kernel/tqeventloop_x11_glib.cpp34
-rw-r--r--src/kernel/tqfont.cpp108
-rw-r--r--src/kernel/tqfont.h4
-rw-r--r--src/kernel/tqfont_x11.cpp18
-rw-r--r--src/kernel/tqfontdata_p.h8
-rw-r--r--src/kernel/tqfontdatabase.cpp110
-rw-r--r--src/kernel/tqfontdatabase_x11.cpp138
-rw-r--r--src/kernel/tqfontengine_p.h2
-rw-r--r--src/kernel/tqfontengine_x11.cpp96
-rw-r--r--src/kernel/tqguardedptr.cpp12
-rw-r--r--src/kernel/tqiconset.cpp44
-rw-r--r--src/kernel/tqimage.cpp249
-rw-r--r--src/kernel/tqimage.h4
-rw-r--r--src/kernel/tqimageformatplugin.cpp4
-rw-r--r--src/kernel/tqinputcontext.cpp30
-rw-r--r--src/kernel/tqinputcontext_x11.cpp4
-rw-r--r--src/kernel/tqinternal.cpp54
-rw-r--r--src/kernel/tqjpegio.cpp20
-rw-r--r--src/kernel/tqkeysequence.cpp18
-rw-r--r--src/kernel/tqlayout.cpp114
-rw-r--r--src/kernel/tqlayoutengine.cpp22
-rw-r--r--src/kernel/tqlayoutengine_p.h4
-rw-r--r--src/kernel/tqlocalfs.cpp6
-rw-r--r--src/kernel/tqmetaobject.cpp132
-rw-r--r--src/kernel/tqmetaobject.h38
-rw-r--r--src/kernel/tqmime.cpp20
-rw-r--r--src/kernel/tqmngio.cpp22
-rw-r--r--src/kernel/tqmotifdnd_x11.cpp10
-rw-r--r--src/kernel/tqmovie.cpp52
-rw-r--r--src/kernel/tqnetworkprotocol.cpp40
-rw-r--r--src/kernel/tqobject.cpp314
-rw-r--r--src/kernel/tqobject.h8
-rw-r--r--src/kernel/tqobjectcleanuphandler.cpp14
-rw-r--r--src/kernel/tqobjectdict.h2
-rw-r--r--src/kernel/tqpaintdevice.h8
-rw-r--r--src/kernel/tqpaintdevice_x11.cpp60
-rw-r--r--src/kernel/tqpainter.cpp106
-rw-r--r--src/kernel/tqpainter.h16
-rw-r--r--src/kernel/tqpainter_x11.cpp132
-rw-r--r--src/kernel/tqpalette.cpp26
-rw-r--r--src/kernel/tqpicture.cpp94
-rw-r--r--src/kernel/tqpixmap.cpp74
-rw-r--r--src/kernel/tqpixmap.h12
-rw-r--r--src/kernel/tqpixmap_x11.cpp104
-rw-r--r--src/kernel/tqpixmapcache.cpp14
-rw-r--r--src/kernel/tqpngio.cpp56
-rw-r--r--src/kernel/tqpoint.cpp10
-rw-r--r--src/kernel/tqpointarray.cpp36
-rw-r--r--src/kernel/tqpointarray.h2
-rw-r--r--src/kernel/tqpolygonscanner.cpp16
-rw-r--r--src/kernel/tqprinter.cpp60
-rw-r--r--src/kernel/tqprinter_unix.cpp44
-rw-r--r--src/kernel/tqprocess.cpp74
-rw-r--r--src/kernel/tqprocess_unix.cpp102
-rw-r--r--src/kernel/tqpsprinter.cpp202
-rw-r--r--src/kernel/tqrect.cpp38
-rw-r--r--src/kernel/tqrect.h4
-rw-r--r--src/kernel/tqregion.h4
-rw-r--r--src/kernel/tqregion_x11.cpp102
-rw-r--r--src/kernel/tqrichtext.cpp622
-rw-r--r--src/kernel/tqrichtext_p.cpp56
-rw-r--r--src/kernel/tqrichtext_p.h74
-rw-r--r--src/kernel/tqscriptengine.cpp74
-rw-r--r--src/kernel/tqscriptengine_x11.cpp164
-rw-r--r--src/kernel/tqsignal.cpp4
-rw-r--r--src/kernel/tqsignalmapper.cpp2
-rw-r--r--src/kernel/tqsimplerichtext.cpp22
-rw-r--r--src/kernel/tqsimplerichtext.h2
-rw-r--r--src/kernel/tqsize.cpp18
-rw-r--r--src/kernel/tqsizegrip.cpp2
-rw-r--r--src/kernel/tqsizepolicy.h4
-rw-r--r--src/kernel/tqsocketnotifier.cpp14
-rw-r--r--src/kernel/tqsound.cpp10
-rw-r--r--src/kernel/tqsound_x11.cpp22
-rw-r--r--src/kernel/tqstyle.cpp74
-rw-r--r--src/kernel/tqstyle.h6
-rw-r--r--src/kernel/tqstylesheet.cpp82
-rw-r--r--src/kernel/tqtextengine.cpp60
-rw-r--r--src/kernel/tqtextengine_p.h4
-rw-r--r--src/kernel/tqtextengine_unix.cpp2
-rw-r--r--src/kernel/tqtextlayout.cpp4
-rw-r--r--src/kernel/tqthread.cpp14
-rw-r--r--src/kernel/tqthread_unix.cpp40
-rw-r--r--src/kernel/tqtimer.cpp18
-rw-r--r--src/kernel/tqtimer.h2
-rw-r--r--src/kernel/tqtranslator.cpp70
-rw-r--r--src/kernel/tqtranslator.h2
-rw-r--r--src/kernel/tqucomextra.cpp16
-rw-r--r--src/kernel/tqurl.cpp120
-rw-r--r--src/kernel/tqurl.h6
-rw-r--r--src/kernel/tqurlinfo.cpp76
-rw-r--r--src/kernel/tqurloperator.cpp56
-rw-r--r--src/kernel/tqurloperator.h6
-rw-r--r--src/kernel/tqvariant.cpp154
-rw-r--r--src/kernel/tqvariant.h2
-rw-r--r--src/kernel/tqwidget.cpp228
-rw-r--r--src/kernel/tqwidget.h42
-rw-r--r--src/kernel/tqwidget_x11.cpp66
-rw-r--r--src/kernel/tqwmatrix.cpp26
-rw-r--r--src/network/tqdns.cpp144
-rw-r--r--src/network/tqftp.cpp178
-rw-r--r--src/network/tqhostaddress.cpp68
-rw-r--r--src/network/tqhttp.cpp126
-rw-r--r--src/network/tqserversocket.cpp8
-rw-r--r--src/network/tqsocket.cpp98
-rw-r--r--src/network/tqsocket.h2
-rw-r--r--src/network/tqsocketdevice.cpp22
-rw-r--r--src/network/tqsocketdevice_unix.cpp80
-rw-r--r--src/opengl/tqgl.cpp174
-rw-r--r--src/opengl/tqgl.h12
-rw-r--r--src/opengl/tqgl_x11.cpp126
-rw-r--r--src/opengl/tqgl_x11_p.h4
-rw-r--r--src/opengl/tqglcolormap.cpp2
-rw-r--r--src/sql/drivers/cache/tqsqlcachedresult.cpp46
-rw-r--r--src/sql/drivers/ibase/tqsql_ibase.cpp140
-rw-r--r--src/sql/drivers/mysql/tqsql_mysql.cpp108
-rw-r--r--src/sql/drivers/odbc/tqsql_odbc.cpp246
-rw-r--r--src/sql/drivers/psql/tqsql_psql.cpp86
-rw-r--r--src/sql/drivers/sqlite/tqsql_sqlite.cpp86
-rw-r--r--src/sql/drivers/sqlite3/tqsql_sqlite3.cpp10
-rw-r--r--src/sql/tqdatabrowser.cpp144
-rw-r--r--src/sql/tqdatabrowser.h4
-rw-r--r--src/sql/tqdatatable.cpp222
-rw-r--r--src/sql/tqdatatable.h10
-rw-r--r--src/sql/tqeditorfactory.cpp2
-rw-r--r--src/sql/tqsqlcursor.cpp136
-rw-r--r--src/sql/tqsqlcursor.h18
-rw-r--r--src/sql/tqsqldatabase.cpp76
-rw-r--r--src/sql/tqsqldatabase.h2
-rw-r--r--src/sql/tqsqldriver.cpp44
-rw-r--r--src/sql/tqsqldriver.h2
-rw-r--r--src/sql/tqsqleditorfactory.cpp2
-rw-r--r--src/sql/tqsqlextension_p.cpp4
-rw-r--r--src/sql/tqsqlfield.cpp56
-rw-r--r--src/sql/tqsqlfield.h10
-rw-r--r--src/sql/tqsqlform.cpp16
-rw-r--r--src/sql/tqsqlform.h2
-rw-r--r--src/sql/tqsqlindex.cpp26
-rw-r--r--src/sql/tqsqlindex.h4
-rw-r--r--src/sql/tqsqlmanager_p.cpp80
-rw-r--r--src/sql/tqsqlmanager_p.h2
-rw-r--r--src/sql/tqsqlquery.cpp196
-rw-r--r--src/sql/tqsqlquery.h2
-rw-r--r--src/sql/tqsqlrecord.cpp50
-rw-r--r--src/sql/tqsqlrecord.h2
-rw-r--r--src/sql/tqsqlresult.cpp51
-rw-r--r--src/sql/tqsqlselectcursor.cpp8
-rw-r--r--src/sql/tqsqlselectcursor.h12
-rw-r--r--src/styles/tqcdestyle.cpp6
-rw-r--r--src/styles/tqcdestyle.h2
-rw-r--r--src/styles/tqcommonstyle.cpp30
-rw-r--r--src/styles/tqcompactstyle.cpp6
-rw-r--r--src/styles/tqinterlacestyle.cpp44
-rw-r--r--src/styles/tqinterlacestyle.h10
-rw-r--r--src/styles/tqmotifplusstyle.cpp48
-rw-r--r--src/styles/tqmotifplusstyle.h2
-rw-r--r--src/styles/tqmotifstyle.cpp48
-rw-r--r--src/styles/tqmotifstyle.h2
-rw-r--r--src/styles/tqplatinumstyle.cpp10
-rw-r--r--src/styles/tqsgistyle.cpp70
-rw-r--r--src/styles/tqsgistyle.h2
-rw-r--r--src/styles/tqstylefactory.cpp2
-rw-r--r--src/styles/tqstyleplugin.cpp2
-rw-r--r--src/styles/tqwindowsstyle.cpp41
-rw-r--r--src/table/tqtable.cpp706
-rw-r--r--src/table/tqtable.h24
-rw-r--r--src/widgets/tqlistbox.cpp2
-rw-r--r--src/widgets/tqlistview.cpp4
-rw-r--r--src/workspace/tqworkspace.cpp234
-rw-r--r--src/workspace/tqworkspace.h2
-rw-r--r--src/xml/tqdom.cpp450
-rw-r--r--src/xml/tqdom.h2
-rw-r--r--src/xml/tqsvgdevice.cpp72
-rw-r--r--src/xml/tqsvgdevice_p.h2
-rw-r--r--src/xml/tqxml.cpp1048
-rw-r--r--src/xml/tqxml.h2
241 files changed, 7431 insertions, 7434 deletions
diff --git a/src/canvas/tqcanvas.cpp b/src/canvas/tqcanvas.cpp
index 7b32564ed..597fc4cdd 100644
--- a/src/canvas/tqcanvas.cpp
+++ b/src/canvas/tqcanvas.cpp
@@ -65,7 +65,7 @@ public:
class TQCanvasViewData {
public:
- TQCanvasViewData() : repaint_from_moving( FALSE ) {}
+ TQCanvasViewData() : repaint_from_moving( false ) {}
#ifndef TQT_NO_TRANSFORMATIONS
TQWMatrix xform;
TQWMatrix ixform;
@@ -167,7 +167,7 @@ void TQCanvasClusterizer::add(const TQRect& rect)
cluster[cursor].width()*cluster[cursor].height();
if (cost < lowestcost) {
- bool bad=FALSE;
+ bool bad=false;
for (int c=0; c<count && !bad; c++) {
bad=cluster[c].intersects(larger) && c!=cursor;
}
@@ -203,7 +203,7 @@ void TQCanvasClusterizer::add(const TQRect& rect)
int cost=larger.width()*larger.height()
- cluster[cursor].width()*cluster[cursor].height();
if (cost < lowestcost) {
- bool bad=FALSE;
+ bool bad=false;
for (int c=0; c<count && !bad; c++) {
bad=cluster[c].intersects(larger) && c!=cursor;
}
@@ -233,7 +233,7 @@ void TQCanvasClusterizer::add(const TQRect& rect)
- cluster[merge1].width()*cluster[merge1].height()
- cluster[merge2].width()*cluster[merge2].height();
if (cost < lowestcost) {
- bool bad=FALSE;
+ bool bad=false;
for (int c=0; c<count && !bad; c++) {
bad=cluster[c].intersects(larger) && c!=cursor;
}
@@ -368,7 +368,7 @@ TQCanvasItemList TQCanvasItemList::operator+(const TQCanvasItemList &l) const
class TQCanvasChunk {
public:
- TQCanvasChunk() : changed(TRUE) { }
+ TQCanvasChunk() : changed(true) { }
// Other code assumes lists are not deleted. Assignment is also
// done on ChunkRecs. So don't add that sort of thing here.
@@ -385,18 +385,18 @@ public:
void add(TQCanvasItem* item)
{
list.prepend(item);
- changed = TRUE;
+ changed = true;
}
void remove(TQCanvasItem* item)
{
list.remove(item);
- changed = TRUE;
+ changed = true;
}
void change()
{
- changed = TRUE;
+ changed = true;
}
bool hasChanged() const
@@ -407,7 +407,7 @@ public:
bool takeChange()
{
bool y = changed;
- changed = FALSE;
+ changed = false;
return y;
}
@@ -468,7 +468,7 @@ static int scm(int a, int b)
Items appear on the canvas after their \link TQCanvasItem::show()
show()\endlink function has been called (or \link
- TQCanvasItem::setVisible() setVisible(TRUE)\endlink), and \e after
+ TQCanvasItem::setVisible() setVisible(true)\endlink), and \e after
update() has been called. The canvas only shows items that are
\link TQCanvasItem::setVisible() visible\endlink, and then only if
\l update() is called. (By default the canvas is white and so are
@@ -535,7 +535,7 @@ static int scm(int a, int b)
held as floating-point numbers. Moving canvas items also have x and y
velocities. It's possible for a canvas item to be outside the canvas
(for example TQCanvasItem::x() is greater than width()). When a canvas
- item is off the canvas, onCanvas() returns FALSE and the canvas
+ item is off the canvas, onCanvas() returns false and the canvas
disregards the item. (Canvas items off the canvas do not slow down any
of the common operations on the canvas.)
@@ -613,8 +613,8 @@ void TQCanvas::init(int w, int h, int chunksze, int mxclusters)
grid = 0;
htiles = 0;
vtiles = 0;
- dblbuf = TRUE;
- debug_redraw_areas = FALSE;
+ dblbuf = true;
+ debug_redraw_areas = false;
}
/*!
@@ -862,8 +862,8 @@ void TQCanvas::retune(int chunksze, int mxclusters)
/*!
\fn bool TQCanvas::onCanvas( int x, int y ) const
- Returns TRUE if the pixel position (\a x, \a y) is on the canvas;
- otherwise returns FALSE.
+ Returns true if the pixel position (\a x, \a y) is on the canvas;
+ otherwise returns false.
\sa validChunk()
*/
@@ -872,8 +872,8 @@ void TQCanvas::retune(int chunksze, int mxclusters)
\fn bool TQCanvas::onCanvas( const TQPoint& p ) const
\overload
- Returns TRUE if the pixel position \a p is on the canvas;
- otherwise returns FALSE.
+ Returns true if the pixel position \a p is on the canvas;
+ otherwise returns false.
\sa validChunk()
*/
@@ -881,8 +881,8 @@ void TQCanvas::retune(int chunksze, int mxclusters)
/*!
\fn bool TQCanvas::validChunk( int x, int y ) const
- Returns TRUE if the chunk position (\a x, \a y) is on the canvas;
- otherwise returns FALSE.
+ Returns true if the chunk position (\a x, \a y) is on the canvas;
+ otherwise returns false.
\sa onCanvas()
*/
@@ -891,8 +891,8 @@ void TQCanvas::retune(int chunksze, int mxclusters)
\fn bool TQCanvas::validChunk( const TQPoint& p ) const
\overload
- Returns TRUE if the chunk position \a p is on the canvas; otherwise
- returns FALSE.
+ Returns true if the chunk position \a p is on the canvas; otherwise
+ returns false.
\sa onCanvas()
*/
@@ -1116,12 +1116,12 @@ void TQCanvas::drawViewArea( TQCanvasView* view, TQPainter* p, const TQRect& vr,
#ifndef TQT_NO_TRANSFORMATIONS
twm.translate(-vr.x(),-vr.y());
twm.translate(-tl.x(),-tl.y());
- dbp.setWorldMatrix( wm*twm, TRUE );
+ dbp.setWorldMatrix( wm*twm, true );
#else
dbp.translate(-vr.x()-tl.x(),-vr.y()-tl.y());
#endif
dbp.setClipRect(0,0,vr.width(), vr.height());
- drawCanvasArea(ivr,&dbp,FALSE);
+ drawCanvasArea(ivr,&dbp,false);
dbp.end();
p->drawPixmap(vr.x(), vr.y(), offscr, 0, 0, vr.width(), vr.height());
} else {
@@ -1140,7 +1140,7 @@ void TQCanvas::drawViewArea( TQCanvasView* view, TQPainter* p, const TQRect& vr,
#else
#endif
p->setBrushOrigin(tl.x(), tl.y());
- drawCanvasArea(ivr,p,FALSE);
+ drawCanvasArea(ivr,p,false);
}
}
@@ -1154,7 +1154,7 @@ void TQCanvas::update()
TQCanvasClusterizer clusterizer(d->viewList.count());
#ifndef TQT_NO_TRANSFORMATIONS
TQPtrList<TQRect> doneareas;
- doneareas.setAutoDelete(TRUE);
+ doneareas.setAutoDelete(true);
#endif
TQPtrListIterator<TQCanvasView> it(d->viewList);
@@ -1348,7 +1348,7 @@ void TQCanvas::drawChanges(const TQRect& inarea)
/*!
Paints all canvas items that are in the area \a clip to \a
- painter, using double-buffering if \a dbuf is TRUE.
+ painter, using double-buffering if \a dbuf is true.
e.g. to print the canvas to a printer:
\code
@@ -1373,7 +1373,7 @@ void TQCanvas::drawCanvasArea(const TQRect& inarea, TQPainter* p, bool double_bu
TQRect area=inarea.intersect(TQRect(0,0,width(),height()));
if ( !dblbuf )
- double_buffer = FALSE;
+ double_buffer = false;
if (!d->viewList.first() && !p) return; // Nothing to do.
@@ -1702,7 +1702,7 @@ void TQCanvas::drawForeground(TQPainter& painter, const TQRect& clip)
}
/*!
- If \a y is TRUE (the default) double-buffering is switched on;
+ If \a y is true (the default) double-buffering is switched on;
otherwise double-buffering is switched off.
Turning off double-buffering causes the redrawn areas to flicker a
@@ -1868,7 +1868,7 @@ class TQCanvasItemExtra {
Items appear on the canvas after their \link show() show()\endlink
function has been called (or \link setVisible()
- setVisible(TRUE)\endlink), and \e after update() has been called. The
+ setVisible(true)\endlink), and \e after update() has been called. The
canvas only shows items that are \link setVisible() visible\endlink,
and then only if \l update() is called. If you created the canvas
without passing a width and height to the constructor you'll also need
@@ -2044,8 +2044,8 @@ void TQCanvasItem::move( double x, double y )
/*!
- Returns TRUE if the canvas item is in motion; otherwise returns
- FALSE.
+ Returns true if the canvas item is in motion; otherwise returns
+ false.
\sa setVelocity(), setAnimated()
*/
@@ -2055,8 +2055,8 @@ bool TQCanvasItem::animated() const
}
/*!
- Sets the canvas item to be in motion if \a y is TRUE, or not if \a
- y is FALSE. The speed and direction of the motion is set with
+ Sets the canvas item to be in motion if \a y is true, or not if \a
+ y is false. The speed and direction of the motion is set with
setVelocity(), or with setXVelocity() and setYVelocity().
\sa advance(), TQCanvas::advance()
@@ -2099,7 +2099,7 @@ void TQCanvasItem::setVelocity( double vx, double vy)
{
if ( ext || vx!=0.0 || vy!=0.0 ) {
if ( !ani )
- setAnimated(TRUE);
+ setAnimated(true);
extra().vx = vx;
extra().vy = vy;
}
@@ -2159,7 +2159,7 @@ void TQCanvasItem::advance(int phase)
void TQCanvasItem::setCanvas(TQCanvas* c)
{
bool v=isVisible();
- setVisible(FALSE);
+ setVisible(false);
if (cnv) {
if (ext)
cnv->removeAnimation(this);
@@ -2180,21 +2180,21 @@ void TQCanvasItem::setCanvas(TQCanvas* c)
Returns the canvas containing the canvas item.
*/
-/*! Shorthand for setVisible(TRUE). */
+/*! Shorthand for setVisible(true). */
void TQCanvasItem::show()
{
- setVisible(TRUE);
+ setVisible(true);
}
-/*! Shorthand for setVisible(FALSE). */
+/*! Shorthand for setVisible(false). */
void TQCanvasItem::hide()
{
- setVisible(FALSE);
+ setVisible(false);
}
/*!
- Makes the canvas item visible if \a yes is TRUE, or invisible if
- \a yes is FALSE. The change takes effect when TQCanvas::update() is
+ Makes the canvas item visible if \a yes is true, or invisible if
+ \a yes is false. The change takes effect when TQCanvas::update() is
next called.
*/
void TQCanvasItem::setVisible(bool yes)
@@ -2218,10 +2218,10 @@ void TQCanvasItem::setVisible(bool yes)
/*!
\fn bool TQCanvasItem::isVisible() const
- Returns TRUE if the canvas item is visible; otherwise returns
- FALSE.
+ Returns true if the canvas item is visible; otherwise returns
+ false.
- Note that in this context TRUE does \e not mean that the canvas
+ Note that in this context true does \e not mean that the canvas
item is currently in a view, merely that if a view is showing the
area where the canvas item is positioned, and the item is not
obscured by items with higher z values, and the view is not
@@ -2239,7 +2239,7 @@ void TQCanvasItem::setVisible(bool yes)
/*!
\fn bool TQCanvasItem::isSelected() const
- Returns TRUE if the canvas item is selected; otherwise returns FALSE.
+ Returns true if the canvas item is selected; otherwise returns false.
*/
/*!
@@ -2269,7 +2269,7 @@ void TQCanvasItem::setSelected(bool yes)
/*!
\fn bool TQCanvasItem::isEnabled() const
- Returns TRUE if the TQCanvasItem is enabled; otherwise returns FALSE.
+ Returns true if the TQCanvasItem is enabled; otherwise returns false.
*/
/*!
@@ -2299,7 +2299,7 @@ void TQCanvasItem::setEnabled(bool yes)
/*!
\fn bool TQCanvasItem::isActive() const
- Returns TRUE if the TQCanvasItem is active; otherwise returns FALSE.
+ Returns true if the TQCanvasItem is active; otherwise returns false.
*/
/*!
@@ -2335,7 +2335,7 @@ bool qt_testCollision(const TQCanvasSprite* s1, const TQCanvasSprite* s2)
TQRect ourarea = s1area.intersect(cyourarea);
if ( ourarea.isEmpty() )
- return FALSE;
+ return false;
int x2=ourarea.x()-cyourarea.x();
int y2=ourarea.y()-cyourarea.y();
@@ -2375,7 +2375,7 @@ bool qt_testCollision(const TQCanvasSprite* s1, const TQCanvasSprite* s2)
if (*(yl + ((x2+i) >> 3)) & (1 << ((x2+i) & 7))
&& *(ml + ((x1+i) >> 3)) & (1 << ((x1+i) & 7)))
{
- return TRUE;
+ return true;
}
}
}
@@ -2387,7 +2387,7 @@ bool qt_testCollision(const TQCanvasSprite* s1, const TQCanvasSprite* s2)
if (*(yl + ((x2+i) >> 3)) & (1 << (7-((x2+i) & 7)))
&& *(ml + ((x1+i) >> 3)) & (1 << (7-((x1+i) & 7))))
{
- return TRUE;
+ return true;
}
}
}
@@ -2399,7 +2399,7 @@ bool qt_testCollision(const TQCanvasSprite* s1, const TQCanvasSprite* s2)
for (int i=0; i<w; i++) {
if (*(yl + ((x2+i) >> 3)) & (1 << ((x2+i) & 7)))
{
- return TRUE;
+ return true;
}
}
}
@@ -2409,14 +2409,14 @@ bool qt_testCollision(const TQCanvasSprite* s1, const TQCanvasSprite* s2)
for (int i=0; i<w; i++) {
if (*(yl + ((x2+i) >> 3)) & (1 << (7-((x2+i) & 7))))
{
- return TRUE;
+ return true;
}
}
}
}
}
- return FALSE;
+ return false;
}
static bool collision_double_dispatch( const TQCanvasSprite* s1,
@@ -2463,7 +2463,7 @@ static bool collision_double_dispatch( const TQCanvasSprite* s1,
TQPointArray pa1 = p1->areaPointsAdvanced();
TQPointArray pa2 = p2 ? p2->areaPointsAdvanced()
: TQPointArray(i2->boundingRectAdvanced());
- bool col= !(TQRegion(pa1) & TQRegion(pa2,TRUE)).isEmpty();
+ bool col= !(TQRegion(pa1) & TQRegion(pa2,true)).isEmpty();
return col;
} else {
@@ -2475,9 +2475,9 @@ static bool collision_double_dispatch( const TQCanvasSprite* s1,
/*!
\fn bool TQCanvasItem::collidesWith( const TQCanvasItem* other ) const
- Returns TRUE if the canvas item will collide with the \a other
+ Returns true if the canvas item will collide with the \a other
item \e after they have moved by their current velocities;
- otherwise returns FALSE.
+ otherwise returns false.
\sa collisions()
*/
@@ -2544,8 +2544,8 @@ bool TQCanvasSprite::collidesWith( const TQCanvasItem* i ) const
}
/*!
- Returns TRUE if the canvas item collides with any of the given
- items; otherwise returns FALSE. The parameters, \a s, \a p, \a r,
+ Returns true if the canvas item collides with any of the given
+ items; otherwise returns false. The parameters, \a s, \a p, \a r,
\a e and \a t, are all the same object, this is just a type
resolution trick.
*/
@@ -2637,10 +2637,10 @@ bool TQCanvasText::collidesWith( const TQCanvasSprite* s,
detection can be slow, this function works in either exact or
inexact mode, according to the \a exact parameter.
- If \a exact is TRUE, the canvas items returned have been
+ If \a exact is true, the canvas items returned have been
accurately tested for collision with the canvas item.
- If \a exact is FALSE, the canvas items returned are \e near the
+ If \a exact is false, the canvas items returned are \e near the
canvas item. You can test the canvas items returned using
collidesWith() if any are interesting collision candidates. By
using this approach, you can ignore some canvas items for which
@@ -2692,7 +2692,7 @@ TQCanvasItemList TQCanvas::collisions(const TQRect& r) const
TQCanvasRectangle i(r,(TQCanvas*)this);
i.setPen(NoPen);
i.show(); // doesn't actually show, since we destroy it
- TQCanvasItemList l = i.collisions(TRUE);
+ TQCanvasItemList l = i.collisions(true);
l.sort();
return l;
}
@@ -2701,7 +2701,7 @@ TQCanvasItemList TQCanvas::collisions(const TQRect& r) const
\overload
Returns a list of canvas items which intersect with the chunks
- listed in \a chunklist, excluding \a item. If \a exact is TRUE,
+ listed in \a chunklist, excluding \a item. If \a exact is true,
only those which actually \link TQCanvasItem::collidesWith()
collide with\endlink \a item are returned; otherwise canvas items
are included just for being in the chunks.
@@ -2744,7 +2744,7 @@ void TQCanvasItem::addToChunks()
TQPointArray pa = chunks();
for (int i=0; i<(int)pa.count(); i++)
canvas()->addItemToChunk(this,pa[i].x(),pa[i].y());
- val=(uint)TRUE;
+ val=(uint)true;
}
}
@@ -2962,7 +2962,7 @@ TQCanvasPixmap::~TQCanvasPixmap()
*/
/*!
- Constructs an invalid array (i.e. isValid() will return FALSE).
+ Constructs an invalid array (i.e. isValid() will return false).
You must call readPixmaps() before being able to use this
TQCanvasPixmapArray.
*/
@@ -2989,7 +2989,7 @@ TQCanvasPixmapArray::TQCanvasPixmapArray()
If \a datafilenamepattern does not exist, is not readable, isn't
an image, or some other error occurs, the array ends up empty and
- isValid() returns FALSE.
+ isValid() returns false.
*/
TQCanvasPixmapArray::TQCanvasPixmapArray( const TQString& datafilenamepattern,
@@ -3033,7 +3033,7 @@ TQCanvasPixmapArray::TQCanvasPixmapArray(TQPtrList<TQPixmap> list, TQPtrList<TQP
hotspots array. If no hotspots are specified, each one is set to
be at position (0, 0).
- If an error occurs, isValid() will return FALSE.
+ If an error occurs, isValid() will return false.
*/
TQCanvasPixmapArray::TQCanvasPixmapArray(TQValueList<TQPixmap> list, TQPointArray hotspots) :
framecount((int)list.size()),
@@ -3087,15 +3087,15 @@ void TQCanvasPixmapArray::reset()
If \a filenamepattern does not exist, is not readable, isn't an
image, or some other error occurs, this function will return
- FALSE, and isValid() will return FALSE; otherwise this function
- will return TRUE.
+ false, and isValid() will return false; otherwise this function
+ will return true.
\sa isValid()
*/
bool TQCanvasPixmapArray::readPixmaps( const TQString& filenamepattern,
int fc)
{
- return readPixmaps(filenamepattern,fc,FALSE);
+ return readPixmaps(filenamepattern,fc,false);
}
/*!
@@ -3114,15 +3114,15 @@ bool TQCanvasPixmapArray::readPixmaps( const TQString& filenamepattern,
will fail.
If the file isn't readable, contains the wrong number of images,
- or there is some other error, this function will return FALSE, and
+ or there is some other error, this function will return false, and
the array will be flagged as invalid; otherwise this function
- returns TRUE.
+ returns true.
\sa isValid()
*/
bool TQCanvasPixmapArray::readCollisionMasks(const TQString& filename)
{
- return readPixmaps(filename,framecount,TRUE);
+ return readPixmaps(filename,framecount,true);
}
@@ -3137,8 +3137,8 @@ bool TQCanvasPixmapArray::readPixmaps( const TQString& datafilenamepattern,
img = new TQCanvasPixmap*[framecount];
}
if (!img)
- return FALSE;
- bool ok = TRUE;
+ return false;
+ bool ok = true;
bool arg = fc > 1;
if ( !arg )
framecount=1;
@@ -3171,7 +3171,7 @@ bool TQCanvasPixmapArray::readPixmaps( const TQString& datafilenamepattern,
Use isValid() instead.
- This returns FALSE if the array is valid, and TRUE if it is not.
+ This returns false if the array is valid, and true if it is not.
*/
bool TQCanvasPixmapArray::operator!()
{
@@ -3179,8 +3179,8 @@ bool TQCanvasPixmapArray::operator!()
}
/*!
- Returns TRUE if the pixmap array is valid; otherwise returns
- FALSE.
+ Returns true if the pixmap array is valid; otherwise returns
+ false.
*/
bool TQCanvasPixmapArray::isValid() const
{
@@ -3622,7 +3622,7 @@ const TQWMatrix &TQCanvasView::inverseWorldMatrix() const
When you use this, you should note that the performance of the
TQCanvasView will decrease considerably.
- Returns FALSE if \a wm is not invertable; otherwise returns TRUE.
+ Returns false if \a wm is not invertable; otherwise returns true.
\sa worldMatrix() inverseWorldMatrix() TQWMatrix::isInvertible()
*/
@@ -3693,9 +3693,9 @@ void TQCanvasView::drawContents(TQPainter *p, int cx, int cy, int cw, int ch)
{
TQRect r(cx,cy,cw,ch);
if (viewing) {
- //viewing->drawViewArea(this,p,r,TRUE);
+ //viewing->drawViewArea(this,p,r,true);
viewing->drawViewArea(this,p,r,!d->repaint_from_moving);
- d->repaint_from_moving = FALSE;
+ d->repaint_from_moving = false;
} else {
p->eraseRect(r);
}
@@ -3825,8 +3825,8 @@ TQCanvasPolygonalItem::~TQCanvasPolygonalItem()
}
/*!
- Returns TRUE if the polygonal item uses the winding algorithm to
- determine the "inside" of the polygon. Returns FALSE if it uses
+ Returns true if the polygonal item uses the winding algorithm to
+ determine the "inside" of the polygon. Returns false if it uses
the odd-even algorithm.
The default is to use the odd-even algorithm.
@@ -3839,7 +3839,7 @@ bool TQCanvasPolygonalItem::winding() const
}
/*!
- If \a enable is TRUE, the polygonal item will use the winding
+ If \a enable is true, the polygonal item will use the winding
algorithm to determine the "inside" of the polygon; otherwise the
odd-even algorithm will be used.
@@ -3861,15 +3861,15 @@ void TQCanvasPolygonalItem::setWinding(bool enable)
*/
void TQCanvasPolygonalItem::invalidate()
{
- val = (uint)FALSE;
+ val = (uint)false;
removeFromChunks();
}
/*!
\fn TQCanvasPolygonalItem::isValid() const
- Returns TRUE if the polygonal item's area information has not been
- invalidated; otherwise returns FALSE.
+ Returns true if the polygonal item's area information has not been
+ invalidated; otherwise returns false.
\sa invalidate()
*/
@@ -4266,7 +4266,7 @@ void TQCanvasPolygon::moveBy(double dx, double dy)
*/
TQCanvasSpline::TQCanvasSpline(TQCanvas* canvas) :
TQCanvasPolygon(canvas),
- cl(TRUE)
+ cl(true)
{
}
@@ -4282,9 +4282,9 @@ TQCanvasSpline::~TQCanvasSpline()
/*!
Set the spline control points to \a ctrl.
- If \a close is TRUE, then the first point in \a ctrl will be
+ If \a close is true, then the first point in \a ctrl will be
re-used as the last point, and the number of control points must
- be a multiple of 3. If \a close is FALSE, one additional control
+ be a multiple of 3. If \a close is false, one additional control
point is required, and the number of control points must be one of
(4, 7, 10, 13, ...).
@@ -4316,8 +4316,8 @@ TQPointArray TQCanvasSpline::controlPoints() const
}
/*!
- Returns TRUE if the control points are a closed set; otherwise
- returns FALSE.
+ Returns true if the control points are a closed set; otherwise
+ returns false.
*/
bool TQCanvasSpline::closed() const
{
@@ -4327,7 +4327,7 @@ bool TQCanvasSpline::closed() const
void TQCanvasSpline::recalcPoly()
{
TQPtrList<TQPointArray> segs;
- segs.setAutoDelete(TRUE);
+ segs.setAutoDelete(true);
int n=0;
for (int i=0; i<(int)bez.count()-1; i+=3) {
TQPointArray ctrl(4);
@@ -5310,7 +5310,7 @@ void TQCanvasSprite::setFrameAnimation(FrameAnimationType type, int step, int st
anim_val = step;
anim_type = type;
anim_state = state;
- setAnimated(TRUE);
+ setAnimated(true);
}
/*!
diff --git a/src/canvas/tqcanvas.h b/src/canvas/tqcanvas.h
index 8d5e0fd45..c6078b41b 100644
--- a/src/canvas/tqcanvas.h
+++ b/src/canvas/tqcanvas.h
@@ -290,12 +290,12 @@ public:
TQCanvasItemList collisions( const TQPointArray& pa, const TQCanvasItem* item,
bool exact) const;
- void drawArea(const TQRect&, TQPainter* p, bool double_buffer=FALSE);
+ void drawArea(const TQRect&, TQPainter* p, bool double_buffer=false);
// These are for TQCanvasView to call
virtual void addView(TQCanvasView*);
virtual void removeView(TQCanvasView*);
- void drawCanvasArea(const TQRect&, TQPainter* p=0, bool double_buffer=TRUE);
+ void drawCanvasArea(const TQRect&, TQPainter* p=0, bool double_buffer=true);
void drawViewArea( TQCanvasView* view, TQPainter* p, const TQRect& r, bool dbuf );
// These are for TQCanvasItem to call
@@ -670,7 +670,7 @@ public:
TQCanvasSpline(TQCanvas* canvas);
~TQCanvasSpline();
- void setControlPoints(TQPointArray, bool closed=TRUE);
+ void setControlPoints(TQPointArray, bool closed=true);
TQPointArray controlPoints() const;
bool closed() const;
diff --git a/src/codecs/tqbig5codec.cpp b/src/codecs/tqbig5codec.cpp
index 5184973d2..09db78800 100644
--- a/src/codecs/tqbig5codec.cpp
+++ b/src/codecs/tqbig5codec.cpp
@@ -715,15 +715,15 @@ int TQBig5Codec::heuristicNameMatch(const char* hint) const
{
//tqDebug("TQBig5hkscsCodec::heuristicNameMatch(const char* hint = \"%s\")", hint);
int score = 0;
- bool zh = FALSE;
+ bool zh = false;
if (tqstrnicmp(hint, "zh_TW", 5) == 0) {
score += 16;
- zh = TRUE;
+ zh = true;
}
else if ( tqstrnicmp(hint, "zh", 2) == 0 ||
tqstrnicmp(hint, "chinese", 7) == 0) {
score += 2;
- zh = TRUE;
+ zh = true;
}
const char *p;
if (zh) {
@@ -962,15 +962,15 @@ int TQBig5hkscsCodec::heuristicNameMatch(const char* hint) const
{
//tqDebug("TQBig5hkscsCodec::heuristicNameMatch(const char* hint = \"%s\")", hint);
int score = 0;
- bool zh = FALSE;
+ bool zh = false;
if (tqstrnicmp(hint, "zh_HK", 5) == 0) {
score += 16;
- zh = TRUE;
+ zh = true;
}
else if ( tqstrnicmp(hint, "zh", 2) == 0 ||
tqstrnicmp(hint, "chinese", 7) == 0) {
score += 2;
- zh = TRUE;
+ zh = true;
}
const char *p;
if (zh) {
diff --git a/src/codecs/tqeucjpcodec.cpp b/src/codecs/tqeucjpcodec.cpp
index 6d75e2161..0bfd69a92 100644
--- a/src/codecs/tqeucjpcodec.cpp
+++ b/src/codecs/tqeucjpcodec.cpp
@@ -301,13 +301,13 @@ const char* TQEucJpCodec::mimeName() const
int TQEucJpCodec::heuristicNameMatch(const char* hint) const
{
int score = 0;
- bool ja = FALSE;
+ bool ja = false;
if (tqstrnicmp(hint, "ja_JP", 5) == 0 || tqstrnicmp(hint, "japan", 5) == 0) {
score += 3;
- ja = TRUE;
+ ja = true;
} else if (tqstrnicmp(hint, "ja", 2) == 0) {
score += 2;
- ja = TRUE;
+ ja = true;
}
const char *p;
if (ja) {
diff --git a/src/codecs/tqeuckrcodec.cpp b/src/codecs/tqeuckrcodec.cpp
index bba2c8808..9b9192a80 100644
--- a/src/codecs/tqeuckrcodec.cpp
+++ b/src/codecs/tqeuckrcodec.cpp
@@ -211,14 +211,14 @@ const char* TQEucKrCodec::mimeName() const
int TQEucKrCodec::heuristicNameMatch(const char* hint) const
{
int score = 0;
- bool ko = FALSE;
+ bool ko = false;
if (tqstrnicmp(hint, "ko_KR", 5) == 0 ||
tqstrnicmp(hint, "korean", 5) == 0) {
score += 3;
- ko = TRUE;
+ ko = true;
} else if (tqstrnicmp(hint, "ko", 2) == 0) {
score += 2;
- ko = TRUE;
+ ko = true;
}
const char *p;
if (ko) {
diff --git a/src/codecs/tqfontcncodec.cpp b/src/codecs/tqfontcncodec.cpp
index 36ffc4e54..58bc956b3 100644
--- a/src/codecs/tqfontcncodec.cpp
+++ b/src/codecs/tqfontcncodec.cpp
@@ -233,7 +233,7 @@ void TQFontGbkCodec::fromUnicode(const TQChar *in, unsigned short *out, int leng
bool TQFontGbkCodec::canEncode( TQChar ch ) const
{
if (ch.unicode() >= 0x4e00 && ch.unicode() <= 0x9fa5)
- return TRUE;
+ return true;
uchar buf[4];
int len = qt_UnicodeToGbk( ch.unicode(), buf );
//tqDebug("TQFontGbkCodec::canEncode( TQChar ch = %02X%02X )", ch.row(), ch.cell());
diff --git a/src/codecs/tqgb18030codec.cpp b/src/codecs/tqgb18030codec.cpp
index d2578dc8e..e1010864c 100644
--- a/src/codecs/tqgb18030codec.cpp
+++ b/src/codecs/tqgb18030codec.cpp
@@ -265,11 +265,11 @@ TQString TQGb18030Codec::toUnicode(const char* chars, int len) const
int TQGb18030Codec::heuristicNameMatch(const char* hint) const
{
int score = 0;
- bool zh = FALSE;
+ bool zh = false;
//tqDebug("TQGb18030Codec::heuristicNameMatch(const char* hint = \"%s\")", hint);
if (tqstrnicmp(hint, "zh_CN", 5) == 0){
score += 10;
- zh = TRUE;
+ zh = true;
}
const char *p;
if ( zh ) {
@@ -476,11 +476,11 @@ int TQGbkCodec::heuristicNameMatch(const char* hint) const
#endif
int score = 0;
- bool zh = FALSE;
+ bool zh = false;
//tqDebug("TQGbkCodec::heuristicNameMatch(const char* hint = \"%s\")", hint);
if (tqstrnicmp(hint, "zh_CN", 5) == 0){
score += 10;
- zh = TRUE;
+ zh = true;
}
const char *p;
if ( zh ) {
@@ -670,11 +670,11 @@ const char* TQGb2312Codec::name() const
int TQGb2312Codec::heuristicNameMatch(const char* hint) const
{
int score = 0;
- bool zh = FALSE;
+ bool zh = false;
//tqDebug("TQGb2312Codec::heuristicNameMatch(const char* hint = \"%s\")", hint);
if (tqstrnicmp(hint, "zh_CN", 5) == 0){
score += 10;
- zh = TRUE;
+ zh = true;
}
const char *p;
if ( zh ) {
diff --git a/src/codecs/tqhebrewcodec.cpp b/src/codecs/tqhebrewcodec.cpp
index 0140117b0..928dc0035 100644
--- a/src/codecs/tqhebrewcodec.cpp
+++ b/src/codecs/tqhebrewcodec.cpp
@@ -82,51 +82,51 @@ static const uchar unicode_to_heb_05[32] = {
static bool to8bit(const TQChar ch, TQCString *rstr)
{
- bool converted = FALSE;
+ bool converted = false;
- if( ch.isMark() ) return TRUE; // ignore marks for conversion
+ if( ch.isMark() ) return true; // ignore marks for conversion
if ( ch.row() ) {
if ( ch.row() == 0x05 ) {
if ( ch.cell() > 0x91 )
- converted = TRUE;
+ converted = true;
// 0x0591 - 0x05cf: Hebrew punctuation... dropped
if ( ch.cell() >= 0xD0 )
*rstr += (char)unicode_to_heb_05[ch.cell()- 0xD0];
} else if ( ch.row() == 0x20 ) {
if ( ch.cell() == 0x3E ) {
*rstr += (char)0xAF;
- converted = TRUE;
+ converted = true;
} else if ( ch.cell() == 0x17 ) {
*rstr += (char)0xCF;
- converted = TRUE;
+ converted = true;
}
} else {
- converted = FALSE;
+ converted = false;
}
} else {
if ( ch.cell() < 0x80 ) {
*rstr += (char)ch.cell();
- converted = TRUE;
+ converted = true;
} else if( ch.cell() < 0xA0 ) {
*rstr += (char)unicode_to_heb_00[ch.cell() - 0x80];
- converted = TRUE;
+ converted = true;
}
}
- if(converted) return TRUE;
+ if(converted) return true;
// couldn't convert the char... lets try its decomposition
TQString d = ch.decomposition();
if(d.isNull())
- return FALSE;
+ return false;
int l = d.length();
for (int i=0; i<l; i++) {
const TQChar ch = d[i];
if(to8bit(ch, rstr))
- converted = TRUE;
+ converted = true;
}
return converted;
diff --git a/src/codecs/tqisciicodec.cpp b/src/codecs/tqisciicodec.cpp
index 75d3db3e7..08e0669d7 100644
--- a/src/codecs/tqisciicodec.cpp
+++ b/src/codecs/tqisciicodec.cpp
@@ -172,7 +172,7 @@ TQCString TQIsciiCodec::fromUnicode(const TQString& uc, int& len_in_out) const
int base = codecs[idx].base;
- bool halant = FALSE;
+ bool halant = false;
for (int i =0; i < l; ++i) {
int pos = data[i].unicode() - base;
if (pos > 0 && pos < 0x80) {
@@ -215,7 +215,7 @@ TQString TQIsciiCodec::toUnicode( const char* chars, int len_in ) const
int base = codecs[idx].base;
- bool halant = FALSE;
+ bool halant = false;
for (int i = 0; i < len_in; ++i) {
ushort ch = (uchar) chars[i];
if (ch < 0xa0)
diff --git a/src/codecs/tqjiscodec.cpp b/src/codecs/tqjiscodec.cpp
index beb5863c3..b3be343f2 100644
--- a/src/codecs/tqjiscodec.cpp
+++ b/src/codecs/tqjiscodec.cpp
@@ -393,13 +393,13 @@ int TQJisCodec::heuristicNameMatch(const char* hint) const
return 10;
int score = 0;
- bool ja = FALSE;
+ bool ja = false;
if (tqstrnicmp(hint, "ja_JP", 5) == 0 || tqstrnicmp(hint, "japan", 5) == 0) {
score += 3;
- ja = TRUE;
+ ja = true;
} else if (tqstrnicmp(hint, "ja", 2) == 0) {
score += 2;
- ja = TRUE;
+ ja = true;
}
const char *p;
if (ja) {
@@ -558,7 +558,7 @@ class TQJisDecoder : public TQTextDecoder {
bool esc;
const TQJpUnicodeConv * const conv;
public:
- TQJisDecoder(const TQJpUnicodeConv *c) : nbuf(0), state(Ascii), prev(Ascii), esc(FALSE), conv(c)
+ TQJisDecoder(const TQJpUnicodeConv *c) : nbuf(0), state(Ascii), prev(Ascii), esc(false), conv(c)
{
}
@@ -576,7 +576,7 @@ public:
buf[nbuf++] = ch;
} else {
nbuf = 0;
- esc = FALSE;
+ esc = false;
}
break;
case 1:
@@ -593,7 +593,7 @@ public:
break;
}
nbuf = 0;
- esc = FALSE;
+ esc = false;
}
} else {
if (buf[0] == '(') {
@@ -610,7 +610,7 @@ public:
}
}
nbuf = 0;
- esc = FALSE;
+ esc = false;
}
break;
case 2:
@@ -622,14 +622,14 @@ public:
}
}
nbuf = 0;
- esc = FALSE;
+ esc = false;
break;
}
} else {
if (ch == Esc) {
// Escape sequence
nbuf = 0;
- esc = TRUE;
+ esc = true;
} else if (ch == So) {
// Shift out
prev = state;
diff --git a/src/codecs/tqsjiscodec.cpp b/src/codecs/tqsjiscodec.cpp
index 6262604e3..010ff9293 100644
--- a/src/codecs/tqsjiscodec.cpp
+++ b/src/codecs/tqsjiscodec.cpp
@@ -248,13 +248,13 @@ const char* TQSjisCodec::mimeName() const
int TQSjisCodec::heuristicNameMatch(const char* hint) const
{
int score = 0;
- bool ja = FALSE;
+ bool ja = false;
if (tqstrnicmp(hint, "ja_JP", 5) == 0 || tqstrnicmp(hint, "japan", 5) == 0) {
score += 3;
- ja = TRUE;
+ ja = true;
} else if (tqstrnicmp(hint, "ja", 2) == 0) {
score += 2;
- ja = TRUE;
+ ja = true;
}
const char *p;
if (ja) {
diff --git a/src/codecs/tqtextcodec.cpp b/src/codecs/tqtextcodec.cpp
index 7082c43b0..01aa6e31c 100644
--- a/src/codecs/tqtextcodec.cpp
+++ b/src/codecs/tqtextcodec.cpp
@@ -1154,8 +1154,8 @@ unsigned short TQTextCodec::characterFromUnicode(const TQString &str, int pos) c
}
/*!
- Returns TRUE if the Unicode character \a ch can be fully encoded
- with this codec; otherwise returns FALSE. The default
+ Returns true if the Unicode character \a ch can be fully encoded
+ with this codec; otherwise returns false. The default
implementation tests if the result of toUnicode(fromUnicode(ch))
is the original \a ch. Subclasses may be able to improve the
efficiency.
@@ -1173,7 +1173,7 @@ bool TQTextCodec::canEncode( TQChar ch ) const
bool TQTextCodec::canEncode( const TQString& s ) const
{
if ( s.isEmpty() )
- return TRUE;
+ return true;
return toUnicode(fromUnicode(s)) == s;
}
@@ -1315,7 +1315,7 @@ public:
char line[maxlen];
char esc='\\';
char comm='%';
- bool incmap = FALSE;
+ bool incmap = false;
while (iod->readLine(line,maxlen) > 0) {
if (0==tqstrnicmp(line,"<code_set_name>",15))
n = line+15;
@@ -1334,7 +1334,7 @@ public:
if (!to_unicode) {
to_unicode = new ushort[256];
}
- incmap = TRUE;
+ incmap = true;
} else if (0==tqstrnicmp(line,"END CHARMAP",11))
break;
else if (incmap) {
@@ -2380,7 +2380,7 @@ bool TQSimpleTextCodec::canEncode( TQChar ch ) const
unsigned short u = ch.unicode();
unsigned char* rmp = reverseMap->data();
int rmsize = (int) reverseMap->size();
- return u < 128 ? TRUE : (( u < rmsize ) ? (*(rmp+u) != 0) : FALSE );
+ return u < 128 ? true : (( u < rmsize ) ? (*(rmp+u) != 0) : false );
}
const char* TQSimpleTextCodec::name() const
@@ -2615,7 +2615,7 @@ TQString TQLatin15Codec::toUnicode(const char* chars, int len) const
}
static inline unsigned char
-latin15CharFromUnicode( unsigned short uc, bool replacement = TRUE )
+latin15CharFromUnicode( unsigned short uc, bool replacement = true )
{
uchar c;
if ( uc < 0x0100 ) {
@@ -2678,7 +2678,7 @@ latin15CharFromUnicode( unsigned short uc, bool replacement = TRUE )
void TQLatin15Codec::fromUnicode( const TQChar *in, unsigned short *out, int length ) const
{
while ( length-- ) {
- *out = latin15CharFromUnicode( in->unicode(), FALSE );
+ *out = latin15CharFromUnicode( in->unicode(), false );
++in;
++out;
}
@@ -2704,7 +2704,7 @@ TQCString TQLatin15Codec::fromUnicode(const TQString& uc, int& len ) const
unsigned short TQLatin15Codec::characterFromUnicode(const TQString &str, int pos) const
{
- return latin15CharFromUnicode( str.unicode()[pos].unicode(), FALSE );
+ return latin15CharFromUnicode( str.unicode()[pos].unicode(), false );
}
diff --git a/src/codecs/tqtextcodecfactory.cpp b/src/codecs/tqtextcodecfactory.cpp
index b3895360c..476eaec5b 100644
--- a/src/codecs/tqtextcodecfactory.cpp
+++ b/src/codecs/tqtextcodecfactory.cpp
@@ -78,7 +78,7 @@ static void create_manager()
manager =
new TQPluginManager<TQTextCodecFactoryInterface>(IID_QTextCodecFactory,
TQApplication::libraryPaths(), "/codecs",
- FALSE);
+ false);
TQ_CHECK_PTR( manager );
cleanup_manager.set( &manager );
}
diff --git a/src/codecs/tqutfcodec.cpp b/src/codecs/tqutfcodec.cpp
index eba25e505..5c3bfb26a 100644
--- a/src/codecs/tqutfcodec.cpp
+++ b/src/codecs/tqutfcodec.cpp
@@ -158,7 +158,7 @@ class TQUtf8Decoder : public TQTextDecoder {
int need;
bool headerDone;
public:
- TQUtf8Decoder() : need(0), headerDone(FALSE)
+ TQUtf8Decoder() : need(0), headerDone(false)
{
}
@@ -180,14 +180,14 @@ public:
// surrogate pair
*qch++ = TQChar(TQChar::highSurrogate(uc));
*qch++ = TQChar(TQChar::lowSurrogate(uc));
- headerDone = TRUE;
+ headerDone = true;
} else if ((uc < min_uc) || (uc >= 0xd800 && uc <= 0xdfff) || (uc >= 0xfffe)) {
// overlong sequence, UTF16 surrogate or BOM
*qch++ = TQChar::replacement;
} else {
if (headerDone || TQChar(uc) != TQChar::byteOrderMark)
*qch++ = uc;
- headerDone = TRUE;
+ headerDone = true;
}
}
} else {
@@ -199,7 +199,7 @@ public:
} else {
if ( ch < 128 ) {
*qch++ = ch;
- headerDone = TRUE;
+ headerDone = true;
} else if ((ch & 0xe0) == 0xc0) {
uc = ch & 0x1f;
need = 1;
@@ -262,7 +262,7 @@ int TQUtf16Codec::heuristicContentMatch(const char* chars, int len) const
class TQUtf16Encoder : public TQTextEncoder {
bool headerdone;
public:
- TQUtf16Encoder() : headerdone(FALSE)
+ TQUtf16Encoder() : headerdone(false)
{
}
@@ -274,7 +274,7 @@ public:
memcpy(d.data(),uc.unicode(),lenInOut);
return d;
} else {
- headerdone = TRUE;
+ headerdone = true;
lenInOut = (1+uc.length())*sizeof(TQChar);
TQCString d(lenInOut);
memcpy(d.data(),&TQChar::byteOrderMark,sizeof(TQChar));
@@ -291,7 +291,7 @@ class TQUtf16Decoder : public TQTextDecoder {
bool headerdone;
public:
- TQUtf16Decoder() : half(FALSE), swap(FALSE), headerdone(FALSE)
+ TQUtf16Decoder() : half(false), swap(false), headerdone(false)
{
}
@@ -318,13 +318,13 @@ public:
} else {
*qch++ = ch;
}
- headerdone = TRUE;
+ headerdone = true;
} else
*qch++ = ch;
- half = FALSE;
+ half = false;
} else {
buf = *chars++;
- half = TRUE;
+ half = true;
}
}
result.truncate( qch - result.unicode() );
diff --git a/src/dialogs/tqcolordialog.cpp b/src/dialogs/tqcolordialog.cpp
index 43e77866f..a80b63bc1 100644
--- a/src/dialogs/tqcolordialog.cpp
+++ b/src/dialogs/tqcolordialog.cpp
@@ -78,7 +78,7 @@ class TQWellArray : public TQGridView
TQ_PROPERTY( int selectedRow READ selectedRow )
public:
- TQWellArray( TQWidget* parent=0, const char* name=0, bool popup = FALSE );
+ TQWellArray( TQWidget* parent=0, const char* name=0, bool popup = false );
~TQWellArray() {}
TQString cellContent( int row, int col ) const;
@@ -175,7 +175,7 @@ TQWellArray::TQWellArray( TQWidget *parent, const char * name, bool popup )
selRow = -1;
if ( smallStyle )
- setMouseTracking( TRUE );
+ setMouseTracking( true );
}
@@ -411,13 +411,13 @@ void TQWellArray::keyPressEvent( TQKeyEvent* e )
if( curRow > 0 )
setCurrent( curRow - 1, curCol);
else if ( smallStyle )
- focusNextPrevChild( FALSE );
+ focusNextPrevChild( false );
break;
case Key_Down:
if( curRow < numRows()-1 )
setCurrent( curRow + 1, curCol);
else if ( smallStyle )
- focusNextPrevChild( TRUE );
+ focusNextPrevChild( true );
break;
case Key_Space:
case Key_Return:
@@ -433,17 +433,17 @@ void TQWellArray::keyPressEvent( TQKeyEvent* e )
//////////// TQWellArray END
-static bool initrgb = FALSE;
+static bool initrgb = false;
static TQRgb stdrgb[6*8];
static TQRgb cusrgb[2*8];
-static bool customSet = FALSE;
+static bool customSet = false;
static void initRGB()
{
if ( initrgb )
return;
- initrgb = TRUE;
+ initrgb = true;
int i = 0;
for ( int g = 0; g < 4; g++ )
for ( int r = 0; r < 4; r++ )
@@ -490,7 +490,7 @@ void TQColorDialog::setCustomColor( int i, TQRgb c )
#endif
return;
}
- customSet = TRUE;
+ customSet = true;
cusrgb[i] = c;
}
@@ -521,7 +521,7 @@ class TQColorWell : public TQWellArray
{
public:
TQColorWell( TQWidget *parent, int r, int c, TQRgb *vals )
- :TQWellArray( parent, "" ), values( vals ), mousePressed( FALSE ), oldCurrent( -1, -1 )
+ :TQWellArray( parent, "" ), values( vals ), mousePressed( false ), oldCurrent( -1, -1 )
{ setNumRows(r), setNumCols(c); setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum) ); }
protected:
@@ -554,7 +554,7 @@ void TQColorWell::mousePressEvent( TQMouseEvent *e )
{
oldCurrent = TQPoint( selectedRow(), selectedColumn() );
TQWellArray::mousePressEvent( e );
- mousePressed = TRUE;
+ mousePressed = true;
pressPos = e->pos();
}
@@ -575,7 +575,7 @@ void TQColorWell::mouseMoveEvent( TQMouseEvent *e )
p.drawRect( 0, 0, pix.width(), pix.height() );
p.end();
drg->setPixmap( pix );
- mousePressed = FALSE;
+ mousePressed = false;
drg->dragCopy();
}
#endif
@@ -613,7 +613,7 @@ void TQColorWell::dropEvent( TQDropEvent *e )
TQColor col;
TQColorDrag::decode( e, col );
values[ i ] = col.rgb();
- repaintContents( FALSE );
+ repaintContents( false );
e->accept();
} else {
e->ignore();
@@ -627,7 +627,7 @@ void TQColorWell::mouseReleaseEvent( TQMouseEvent *e )
if ( !mousePressed )
return;
TQWellArray::mouseReleaseEvent( e );
- mousePressed = FALSE;
+ mousePressed = false;
}
class TQColorPicker : public TQFrame
@@ -738,7 +738,7 @@ void TQColorLuminancePicker::setVal( int v )
return;
val = TQMAX( 0, TQMIN(v,255));
delete pix; pix=0;
- repaint( FALSE ); //###
+ repaint( false ); //###
emit newHsv( hue, sat, val );
}
@@ -773,7 +773,7 @@ void TQColorLuminancePicker::paintEvent( TQPaintEvent * )
TQPainter p(this);
p.drawPixmap( 1, coff, *pix );
const TQColorGroup &g = colorGroup();
- qDrawShadePanel( &p, r, g, TRUE );
+ qDrawShadePanel( &p, r, g, true );
p.setPen( g.foreground() );
p.setBrush( g.foreground() );
TQPointArray a;
@@ -789,7 +789,7 @@ void TQColorLuminancePicker::setCol( int h, int s , int v )
hue = h;
sat = s;
delete pix; pix=0;
- repaint( FALSE );//####
+ repaint( false );//####
}
TQPoint TQColorPicker::colPt()
@@ -842,7 +842,7 @@ void TQColorPicker::setCol( int h, int s )
r = r.unite( TQRect( colPt(), TQSize(20,20) ) );
r.moveBy( contentsRect().x()-9, contentsRect().y()-9 );
// update( r );
- repaint( r, FALSE );
+ repaint( r, false );
}
void TQColorPicker::mouseMoveEvent( TQMouseEvent *m )
@@ -918,7 +918,7 @@ public:
TQString s;
s.setNum(i);
bool block = signalsBlocked();
- blockSignals(TRUE);
+ blockSignals(true);
setText( s );
blockSignals(block);
}
@@ -974,8 +974,8 @@ public:
TQColorShowLabel( TQWidget *parent ) : TQFrame( parent, "qt_colorshow_lbl" ) {
setFrameStyle( TQFrame::Panel|TQFrame::Sunken );
setBackgroundMode( PaletteBackground );
- setAcceptDrops( TRUE );
- mousePressed = FALSE;
+ setAcceptDrops( true );
+ mousePressed = false;
}
void setColor( TQColor c ) { col = c; }
@@ -1018,7 +1018,7 @@ void TQColorShower::showAlpha( bool b )
void TQColorShowLabel::mousePressEvent( TQMouseEvent *e )
{
- mousePressed = TRUE;
+ mousePressed = true;
pressPos = e->pos();
}
@@ -1035,7 +1035,7 @@ void TQColorShowLabel::mouseMoveEvent( TQMouseEvent *e )
p.drawRect( 0, 0, pix.width(), pix.height() );
p.end();
drg->setPixmap( pix );
- mousePressed = FALSE;
+ mousePressed = false;
drg->dragCopy();
}
#endif
@@ -1058,7 +1058,7 @@ void TQColorShowLabel::dropEvent( TQDropEvent *e )
{
if ( TQColorDrag::canDecode( e ) ) {
TQColorDrag::decode( e, col );
- repaint( FALSE );
+ repaint( false );
emit colorDropped( col.rgb() );
e->accept();
} else {
@@ -1071,7 +1071,7 @@ void TQColorShowLabel::mouseReleaseEvent( TQMouseEvent * )
{
if ( !mousePressed )
return;
- mousePressed = FALSE;
+ mousePressed = false;
}
TQColorShower::TQColorShower( TQWidget *parent, const char *name )
@@ -1154,12 +1154,12 @@ TQColorShower::TQColorShower( TQWidget *parent, const char *name )
void TQColorShower::showCurrentColor()
{
lab->setColor( currentColor() );
- lab->repaint(FALSE); //###
+ lab->repaint(false); //###
}
void TQColorShower::rgbEd()
{
- rgbOriginal = TRUE;
+ rgbOriginal = true;
if ( alphaEd->isVisible() )
curCol = tqRgba( rEd->val(), gEd->val(), bEd->val(), currentAlpha() );
else
@@ -1177,7 +1177,7 @@ void TQColorShower::rgbEd()
void TQColorShower::hsvEd()
{
- rgbOriginal = FALSE;
+ rgbOriginal = false;
hue = hEd->val();
sat = sEd->val();
val = vEd->val();
@@ -1194,7 +1194,7 @@ void TQColorShower::hsvEd()
void TQColorShower::setRgb( TQRgb rgb )
{
- rgbOriginal = TRUE;
+ rgbOriginal = true;
curCol = rgb;
rgb2hsv( currentColor(), hue, sat, val );
@@ -1212,7 +1212,7 @@ void TQColorShower::setRgb( TQRgb rgb )
void TQColorShower::setHsv( int h, int s, int v )
{
- rgbOriginal = FALSE;
+ rgbOriginal = false;
hue = h; val = v; sat = s; //Range check###
curCol = TQColor( hue, sat, val, TQColor::Hsv ).rgb();
@@ -1300,11 +1300,11 @@ void TQColorDialogPrivate::newStandard( int r, int c )
TQColorDialogPrivate::TQColorDialogPrivate( TQColorDialog *dialog ) :
TQObject(dialog)
{
- compact = FALSE;
+ compact = false;
// small displays (e.g. PDAs cannot fit the full color dialog,
// so just use the color picker.
if ( tqApp->desktop()->width() < 480 || tqApp->desktop()->height() < 350 )
- compact = TRUE;
+ compact = true;
nextCust = 0;
const int lumSpace = 3;
@@ -1335,7 +1335,7 @@ TQColorDialogPrivate::TQColorDialogPrivate( TQColorDialog *dialog ) :
custom = new TQColorWell( dialog, 2, 8, cusrgb );
custom->setCellWidth( 28 );
custom->setCellHeight( 24 );
- custom->setAcceptDrops( TRUE );
+ custom->setAcceptDrops( true );
connect( custom, TQ_SIGNAL(selected(int,int)), TQ_SLOT(newCustom(int,int)));
lab = new TQLabel( custom, TQColorDialog::tr( "&Custom colors") , dialog, "qt_custcolors_lbl" );
@@ -1345,7 +1345,7 @@ TQColorDialogPrivate::TQColorDialogPrivate( TQColorDialog *dialog ) :
TQPushButton *custbut =
new TQPushButton( TQColorDialog::tr("&Define Custom Colors >>"),
dialog, "qt_def_custcolors_lbl" );
- custbut->setEnabled( FALSE );
+ custbut->setEnabled( false );
leftLay->addWidget( custbut );
} else {
// better color picker size for small displays
@@ -1390,7 +1390,7 @@ TQColorDialogPrivate::TQColorDialogPrivate( TQColorDialog *dialog ) :
TQPushButton *ok, *cancel;
ok = new TQPushButton( TQColorDialog::tr("OK"), dialog, "qt_ok_btn" );
connect( ok, TQ_SIGNAL(clicked()), dialog, TQ_SLOT(accept()) );
- ok->setDefault(TRUE);
+ ok->setDefault(true);
cancel = new TQPushButton( TQColorDialog::tr("Cancel"), dialog, "qt_cancel_btn" );
connect( cancel, TQ_SIGNAL(clicked()), dialog, TQ_SLOT(reject()) );
buttons->addWidget( ok );
@@ -1410,7 +1410,7 @@ void TQColorDialogPrivate::addCustom()
{
cusrgb[nextCust] = cs->currentColor();
if (custom)
- custom->repaintContents( FALSE );
+ custom->repaintContents( false );
nextCust = (nextCust+1) % 16;
}
@@ -1446,7 +1446,7 @@ void TQColorDialogPrivate::addCustom()
/*!
Constructs a default color dialog with parent \a parent and called
- \a name. If \a modal is TRUE the dialog will be modal. Use
+ \a name. If \a modal is true the dialog will be modal. Use
setColor() to set an initial value.
\sa getColor()
@@ -1456,7 +1456,7 @@ TQColorDialog::TQColorDialog(TQWidget* parent, const char* name, bool modal) :
TQDialog(parent, name, modal, ( WType_Dialog | WStyle_Customize | WStyle_Title |
WStyle_DialogBorder | WStyle_SysMenu ) )
{
- setSizeGripEnabled( FALSE );
+ setSizeGripEnabled( false );
d = new TQColorDialogPrivate( this );
#ifndef TQT_NO_SETTINGS
@@ -1464,7 +1464,7 @@ TQColorDialog::TQColorDialog(TQWidget* parent, const char* name, bool modal) :
TQSettings settings;
settings.insertSearchPath( TQSettings::Windows, "/Trolltech" );
for ( int i = 0; i < 2*8; ++i ) {
- bool ok = FALSE;
+ bool ok = false;
TQRgb rgb = (TQRgb)settings.readNumEntry( "/TQt/customColors/" + TQString::number( i ), 0, &ok );
if ( ok )
cusrgb[i] = rgb;
@@ -1493,7 +1493,7 @@ TQColor TQColorDialog::getColor( const TQColor& initial, TQWidget *parent,
#endif
int allocContext = TQColor::enterAllocContext();
- TQColorDialog *dlg = new TQColorDialog( parent, name, TRUE ); //modal
+ TQColorDialog *dlg = new TQColorDialog( parent, name, true ); //modal
#ifndef TQT_NO_WIDGET_TOPEXTRA
dlg->setCaption( TQColorDialog::tr( "Select color" ) );
#endif
@@ -1516,8 +1516,8 @@ TQColor TQColorDialog::getColor( const TQColor& initial, TQWidget *parent,
initially set to \a initial. The dialog is a child of \a parent
and called \a name.
- If \a ok is non-null, \e *\a ok is set to TRUE if the user clicked
- OK, and to FALSE if the user clicked Cancel.
+ If \a ok is non-null, \e *\a ok is set to true if the user clicked
+ OK, and to false if the user clicked Cancel.
If the user clicks Cancel, the \a initial value is returned.
*/
@@ -1537,7 +1537,7 @@ TQRgb TQColorDialog::getRgba( TQRgb initial, bool *ok,
#endif
int allocContext = TQColor::enterAllocContext();
- TQColorDialog *dlg = new TQColorDialog( parent, name, TRUE ); //modal
+ TQColorDialog *dlg = new TQColorDialog( parent, name, true ); //modal
TQ_CHECK_PTR( dlg );
#ifndef TQT_NO_WIDGET_TOPEXTRA
@@ -1616,7 +1616,7 @@ void TQColorDialog::setColor( const TQColor& c )
void TQColorDialog::setSelectedAlpha( int a )
{
- d->showAlpha( TRUE );
+ d->showAlpha( true );
d->setCurrentAlpha( a );
}
@@ -1646,7 +1646,7 @@ bool TQColorDialog::selectColor( const TQColor& col )
d->standard->setCurrent( i, j );
d->standard->setSelected( i, j );
d->standard->setFocus();
- return TRUE;
+ return true;
}
}
}
@@ -1660,12 +1660,12 @@ bool TQColorDialog::selectColor( const TQColor& col )
d->custom->setCurrent( i, j );
d->custom->setSelected( i, j );
d->custom->setFocus();
- return TRUE;
+ return true;
}
}
}
}
- return FALSE;
+ return false;
}
#include "tqcolordialog.moc"
diff --git a/src/dialogs/tqcolordialog.h b/src/dialogs/tqcolordialog.h
index 580f82ca0..93b6daf19 100644
--- a/src/dialogs/tqcolordialog.h
+++ b/src/dialogs/tqcolordialog.h
@@ -65,7 +65,7 @@ public:
private:
~TQColorDialog();
- TQColorDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE );
+ TQColorDialog( TQWidget* parent=0, const char* name=0, bool modal=false );
void setColor( const TQColor& );
TQColor color() const;
@@ -75,7 +75,7 @@ private:
void setSelectedAlpha( int );
int selectedAlpha() const;
- void showCustom( bool=TRUE );
+ void showCustom( bool=true );
private: // Disabled copy constructor and operator=
TQColorDialogPrivate *d;
diff --git a/src/dialogs/tqdialog.cpp b/src/dialogs/tqdialog.cpp
index 277a1b4ca..efeb03abc 100644
--- a/src/dialogs/tqdialog.cpp
+++ b/src/dialogs/tqdialog.cpp
@@ -99,12 +99,12 @@
and return the appropriate value. Alternatively you can connect to
the done() slot, passing it \c Accepted or \c Rejected.
- An alternative is to call setModal(TRUE), then show(). Unlike
+ An alternative is to call setModal(true), then show(). Unlike
exec(), show() returns control to the caller immediately. Calling
- setModal(TRUE) is especially useful for progress dialogs, where
+ setModal(true) is especially useful for progress dialogs, where
the user must have the ability to interact with the dialog, e.g.
to cancel a long running operation. If you use show() and
- setModal(TRUE) together you must call
+ setModal(true) together you must call
TQApplication::processEvents() periodically during processing to
enable the user to interact with the dialog. (See \l
TQProgressDialog.)
@@ -214,7 +214,7 @@ class TQDialogPrivate : public TQt
public:
TQDialogPrivate()
- : mainDef(0), orientation(Horizontal),extension(0), doShowExtension(FALSE)
+ : mainDef(0), orientation(Horizontal),extension(0), doShowExtension(false)
#ifndef TQT_NO_SIZEGRIP
,resizer(0)
#endif
@@ -288,18 +288,18 @@ void TQDialog::setDefault( TQPushButton *pushButton )
Q_ASSERT(list);
TQObjectListIt it( *list );
TQPushButton *pb;
- bool hasMain = FALSE;
+ bool hasMain = false;
while ( (pb = (TQPushButton*)it.current()) ) {
++it;
if ( pb->topLevelWidget() != this )
continue;
if ( pb == d->mainDef )
- hasMain = TRUE;
+ hasMain = true;
if ( pb != pushButton )
- pb->setDefault( FALSE );
+ pb->setDefault( false );
}
if (!pushButton && hasMain)
- d->mainDef->setDefault( TRUE );
+ d->mainDef->setDefault( true );
if (!hasMain)
d->mainDef = pushButton;
delete list;
@@ -332,7 +332,7 @@ void TQDialog::hideDefault()
TQPushButton *pb;
while ( (pb = (TQPushButton*)it.current()) ) {
++it;
- pb->setDefault( FALSE );
+ pb->setDefault( false );
}
delete list;
#endif
@@ -351,9 +351,9 @@ void TQDialog::hideSpecial()
// "OK" buttons are hidden, and (Ok) shown on titlebar
// "Cancel" buttons are hidden, and (X) shown on titlebar
// "Help" buttons are hidden, and (?) shown on titlebar
- bool showOK = FALSE,
- showX = FALSE,
- showQ = FALSE;
+ bool showOK = false,
+ showX = false,
+ showQ = false;
TQObjectList *list = queryList( "TQPushButton" );
TQObjectListIt it( *list );
TQPushButton *pb;
@@ -361,15 +361,15 @@ void TQDialog::hideSpecial()
if ( !showOK &&
pb->text() == tqApp->translate( "TQMessageBox", mb_texts[TQMessageBox::Ok] ) ) {
pb->hide();
- showOK = TRUE;
+ showOK = true;
} else if ( !showX &&
pb->text() == tqApp->translate( "TQMessageBox", mb_texts[TQMessageBox::Cancel] ) ) {
pb->hide();
- showX = TRUE;
+ showX = true;
} else if ( !showQ &&
pb->text() == tqApp->tr("Help") ) {
pb->hide();
- showQ = TRUE;
+ showQ = true;
}
++it;
}
@@ -431,7 +431,7 @@ int TQDialog::exec()
show();
- in_loop = TRUE;
+ in_loop = true;
tqApp->enter_loop();
if ( !wasShowModal )
@@ -530,14 +530,14 @@ bool TQDialog::eventFilter( TQObject *o, TQEvent *e )
void TQDialog::contextMenuEvent( TQContextMenuEvent *e )
{
#if !defined(TQT_NO_WHATSTHIS) && !defined(TQT_NO_POPUPMENU)
- TQWidget* w = childAt( e->pos(), TRUE );
+ TQWidget* w = childAt( e->pos(), true );
if ( !w )
return;
TQString s;
while ( s.isEmpty() && w ) {
- s = TQWhatsThis::textFor( w, e->pos(), FALSE );
+ s = TQWhatsThis::textFor( w, e->pos(), false );
if ( s.isEmpty() )
- w = w->parentWidget(TRUE);
+ w = w->parentWidget(true);
}
if ( !s.isEmpty() ) {
TQPopupMenu p(0,"qt_whats_this_menu");
@@ -595,7 +595,7 @@ void TQDialog::keyPressEvent( TQKeyEvent *e )
// call ours, since c++ blocks us from calling the one
// belonging to focusWidget().
TQFocusEvent::setReason(TQFocusEvent::Backtab);
- focusNextPrevChild( FALSE );
+ focusNextPrevChild( false );
TQFocusEvent::resetReason();
break;
case Key_Down:
@@ -607,7 +607,7 @@ void TQDialog::keyPressEvent( TQKeyEvent *e )
break;
}
TQFocusEvent::setReason(TQFocusEvent::Tab);
- focusNextPrevChild( TRUE );
+ focusNextPrevChild( true );
TQFocusEvent::resetReason();
break;
default:
@@ -701,7 +701,7 @@ void TQDialog::show()
adjustSize();
if( !qt_net_supports( qt_net_wm_full_placement )) {
if ( has_relpos && !did_move ) {
- adjustPositionInternal( parentWidget(), TRUE );
+ adjustPositionInternal( parentWidget(), true );
} else if ( !did_move ) {
adjustPositionInternal( parentWidget() );
}
@@ -750,7 +750,7 @@ void TQDialog::show()
if ( !d->mainDef && isTopLevel() ) {
if ( !fw || fw->focusPolicy() == NoFocus ) {
- focusNextPrevChild( TRUE );
+ focusNextPrevChild( true );
fw = focusWidget();
}
if ( fw ) {
@@ -761,7 +761,7 @@ void TQDialog::show()
do {
TQPushButton *pb = ::tqt_cast<TQPushButton*>(candidate);
if ( pb && pb->autoDefault() ) {
- pb->setDefault( TRUE );
+ pb->setDefault( true );
break;
}
candidate = fd->next();
@@ -899,7 +899,7 @@ void TQDialog::hide()
// Reimplemented to exit a modal when the dialog is hidden.
TQWidget::hide();
if ( in_loop ) {
- in_loop = FALSE;
+ in_loop = false;
tqApp->exit_loop();
}
}
@@ -913,7 +913,7 @@ void TQDialog::hide()
void TQDialog::move( int x, int y )
{
- did_move = TRUE;
+ did_move = true;
TQWidget::move( x, y );
}
@@ -921,7 +921,7 @@ void TQDialog::move( int x, int y )
void TQDialog::move( const TQPoint &p )
{
- did_move = TRUE;
+ did_move = true;
TQWidget::move( p );
}
@@ -929,7 +929,7 @@ void TQDialog::move( const TQPoint &p )
void TQDialog::resize( int w, int h )
{
- did_resize = TRUE;
+ did_resize = true;
TQWidget::resize( w, h );
}
@@ -937,7 +937,7 @@ void TQDialog::resize( int w, int h )
void TQDialog::resize( const TQSize &s )
{
- did_resize = TRUE;
+ did_resize = true;
TQWidget::resize( s );
}
@@ -945,8 +945,8 @@ void TQDialog::resize( const TQSize &s )
void TQDialog::setGeometry( int x, int y, int w, int h )
{
- did_move = TRUE;
- did_resize = TRUE;
+ did_move = true;
+ did_resize = true;
TQWidget::setGeometry( x, y, w, h );
}
@@ -954,8 +954,8 @@ void TQDialog::setGeometry( int x, int y, int w, int h )
void TQDialog::setGeometry( const TQRect &r )
{
- did_move = TRUE;
- did_resize = TRUE;
+ did_move = true;
+ did_resize = true;
TQWidget::setGeometry( r );
}
@@ -1019,7 +1019,7 @@ TQWidget* TQDialog::extension() const
/*!
- If \a showIt is TRUE, the dialog's extension is shown; otherwise the
+ If \a showIt is true, the dialog's extension is shown; otherwise the
extension is hidden.
This slot is usually connected to the \l TQButton::toggled() signal
@@ -1045,7 +1045,7 @@ void TQDialog::showExtension( bool showIt )
d->max = maximumSize();
#ifndef TQT_NO_LAYOUT
if ( layout() )
- layout()->setEnabled( FALSE );
+ layout()->setEnabled( false );
#endif
TQSize s( d->extension->sizeHint()
.expandedTo( d->extension->minimumSize() )
@@ -1068,7 +1068,7 @@ void TQDialog::showExtension( bool showIt )
resize( d->size );
#ifndef TQT_NO_LAYOUT
if ( layout() )
- layout()->setEnabled( TRUE );
+ layout()->setEnabled( true );
#endif
}
}
@@ -1135,7 +1135,7 @@ bool TQDialog::isSizeGripEnabled() const
#ifndef TQT_NO_SIZEGRIP
return !!d->resizer;
#else
- return FALSE;
+ return false;
#endif
}
diff --git a/src/dialogs/tqdialog.h b/src/dialogs/tqdialog.h
index e1d82c179..786be4cf5 100644
--- a/src/dialogs/tqdialog.h
+++ b/src/dialogs/tqdialog.h
@@ -60,7 +60,7 @@ friend class TQPushButton;
TQ_PROPERTY( bool modal READ isModal WRITE setModal )
public:
- Q_EXPLICIT TQDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE,
+ Q_EXPLICIT TQDialog( TQWidget* parent=0, const char* name=0, bool modal=false,
WFlags f=0 );
~TQDialog();
@@ -127,7 +127,7 @@ private:
uint has_relpos : 1;
uint did_resize : 1;
uint in_loop: 1;
- void adjustPositionInternal( TQWidget*, bool useRelPos = FALSE );
+ void adjustPositionInternal( TQWidget*, bool useRelPos = false );
TQDialogPrivate* d;
private: // Disabled copy constructor and operator=
diff --git a/src/dialogs/tqerrormessage.cpp b/src/dialogs/tqerrormessage.cpp
index 12013b0f6..e8431a345 100644
--- a/src/dialogs/tqerrormessage.cpp
+++ b/src/dialogs/tqerrormessage.cpp
@@ -117,7 +117,7 @@ static void deleteStaticcTQErrorMessage() // post-routine
}
}
-static bool metFatal = FALSE;
+static bool metFatal = false;
void jump( TQtMsgType t, const char * m )
{
@@ -169,7 +169,7 @@ TQErrorMessage::TQErrorMessage( TQWidget * parent, const char * name )
errors = new TQErrorMessageTextView( this, "errors" );
grid->addWidget( errors, 0, 1 );
again = new TQCheckBox( tr( "&Show this message again" ), this, "again" );
- again->setChecked( TRUE );
+ again->setChecked( true );
grid->addWidget( again, 1, 1, AlignTop + AlignAuto );
ok = new TQPushButton( tr( "&OK" ), this, "ok" );
connect( ok, TQ_SIGNAL(clicked()), this, TQ_SLOT(accept()) );
@@ -244,10 +244,10 @@ bool TQErrorMessage::nextPending()
pending->remove( pending->begin() );
if ( !p.isEmpty() && !doNotShow->find( p ) ) {
errors->setText( p );
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
diff --git a/src/dialogs/tqfiledialog.cpp b/src/dialogs/tqfiledialog.cpp
index de4754ec4..36cf60691 100644
--- a/src/dialogs/tqfiledialog.cpp
+++ b/src/dialogs/tqfiledialog.cpp
@@ -473,10 +473,10 @@ static int lastWidth = 0;
static int lastHeight = 0;
static TQString * workingDirectory = 0;
-static bool bShowHiddenFiles = FALSE;
+static bool bShowHiddenFiles = false;
static int sortFilesBy = (int)TQDir::Name;
-static bool sortAscending = TRUE;
-static bool detailViewMode = FALSE;
+static bool sortAscending = true;
+static bool detailViewMode = false;
static TQCleanupHandler<TQPixmap> qfd_cleanup_pixmap;
static TQCleanupHandler<TQString> qfd_cleanup_string;
@@ -527,7 +527,7 @@ static PtrExtractIconEx ptrExtractIconEx = 0;
static void resolveLibs()
{
#ifndef Q_OS_TEMP
- static bool triedResolve = FALSE;
+ static bool triedResolve = false;
if ( !triedResolve ) {
#ifdef TQT_THREAD_SUPPORT
@@ -542,10 +542,10 @@ static void resolveLibs()
return;
}
#endif
- triedResolve = TRUE;
+ triedResolve = true;
if ( qt_winunicode ) {
TQLibrary lib("shell32");
- lib.setAutoUnload( FALSE );
+ lib.setAutoUnload( false );
ptrExtractIconEx = (PtrExtractIconEx) lib.resolve( "ExtractIconExW" );
}
}
@@ -618,9 +618,9 @@ static void makeVariables() {
TQBitmap m( fifteenTransparentPixels->width(), 1 );
m.fill( TQt::color0 );
fifteenTransparentPixels->setMask( m );
- bShowHiddenFiles = FALSE;
+ bShowHiddenFiles = false;
sortFilesBy = (int)TQDir::Name;
- detailViewMode = FALSE;
+ detailViewMode = false;
#if defined(TQ_WS_WIN)
if ( !fileIconProvider )
fileIconProvider = new TQWindowsIconProvider( tqApp );
@@ -640,7 +640,7 @@ class TQRenameEdit : public TQLineEdit
public:
TQRenameEdit( TQWidget *parent )
- : TQLineEdit( parent, "qt_rename_edit" ), doRenameAlreadyEmitted(FALSE)
+ : TQLineEdit( parent, "qt_rename_edit" ), doRenameAlreadyEmitted(false)
{
connect( this, TQ_SIGNAL(returnPressed()), TQ_SLOT(slotReturnPressed()) );
}
@@ -671,7 +671,7 @@ private:
void clear();
void show();
- void startRename( bool check = TRUE );
+ void startRename( bool check = true );
void viewportMousePressEvent( TQMouseEvent *e );
void viewportMouseReleaseEvent( TQMouseEvent *e );
void viewportMouseDoubleClickEvent( TQMouseEvent *e );
@@ -720,8 +720,8 @@ public:
TQFileDialogTQFileListView( TQWidget *parent, TQFileDialog *d );
void clear();
- void startRename( bool check = TRUE );
- void setSorting( int column, bool increasing = TRUE );
+ void startRename( bool check = true );
+ void setSorting( int column, bool increasing = true );
TQRenameEdit *lined;
bool renaming;
@@ -806,7 +806,7 @@ TQFDProgressAnimation::TQFDProgressAnimation( TQWidget *parent )
void TQFDProgressAnimation::start()
{
- timer->start( 150, FALSE );
+ timer->start( 150, false );
}
void TQFDProgressAnimation::next()
@@ -870,7 +870,7 @@ private:
};
TQFDProgressDialog::TQFDProgressDialog( TQWidget *parent, const TQString &fn, int steps )
- : TQDialog( parent, "", TRUE )
+ : TQDialog( parent, "", true )
{
#ifndef TQT_NO_WIDGET_TOPEXTRA
setCaption( TQFileDialog::tr( "Copy or Move a File" ) );
@@ -962,15 +962,15 @@ public:
struct File: public TQListViewItem {
File( TQFileDialogPrivate * dlgp,
const TQUrlInfo * fi, TQListViewItem * parent )
- : TQListViewItem( parent, dlgp->last ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( FALSE )
+ : TQListViewItem( parent, dlgp->last ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( false )
{ setup(); dlgp->last = this; }
File( TQFileDialogPrivate * dlgp,
const TQUrlInfo * fi, TQListView * parent )
- : TQListViewItem( parent, dlgp->last ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( FALSE )
+ : TQListViewItem( parent, dlgp->last ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( false )
{ setup(); dlgp->last = this; }
File( TQFileDialogPrivate * dlgp,
const TQUrlInfo * fi, TQListView * parent, TQListViewItem * after )
- : TQListViewItem( parent, after ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( FALSE )
+ : TQListViewItem( parent, after ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( false )
{ setup(); if ( !nextSibling() ) dlgp->last = this; }
~File();
@@ -997,7 +997,7 @@ public:
class UrlInfoList : public TQPtrList<TQUrlInfo> {
public:
- UrlInfoList() { setAutoDelete( TRUE ); }
+ UrlInfoList() { setAutoDelete( true ); }
int compareItems( TQPtrCollection::Item n1, TQPtrCollection::Item n2 ) {
if ( !n1 || !n2 )
return 0;
@@ -1124,7 +1124,7 @@ public:
return ui.isValid();
}
}
- return TRUE;
+ return true;
}
#ifndef Q_NO_CURSOR
@@ -1162,12 +1162,12 @@ void TQRenameEdit::focusOutEvent( TQFocusEvent * )
if ( !doRenameAlreadyEmitted )
emit doRename();
else
- doRenameAlreadyEmitted = FALSE;
+ doRenameAlreadyEmitted = false;
}
void TQRenameEdit::slotReturnPressed()
{
- doRenameAlreadyEmitted = TRUE;
+ doRenameAlreadyEmitted = true;
emit doRename();
}
@@ -1179,8 +1179,8 @@ void TQRenameEdit::slotReturnPressed()
TQFileListBox::TQFileListBox( TQWidget *parent, TQFileDialog *dlg )
: TQListBox( parent, "filelistbox" ), filedialog( dlg ),
- renaming( FALSE ), renameItem( 0 ), mousePressed( FALSE ),
- firstMousePressEvent( TRUE )
+ renaming( false ), renameItem( 0 ), mousePressed( false ),
+ firstMousePressEvent( true )
{
changeDirTimer = new TQTimer( this );
TQVBox *box = new TQVBox( viewport(), "qt_vbox" );
@@ -1200,7 +1200,7 @@ TQFileListBox::TQFileListBox( TQWidget *parent, TQFileDialog *dlg )
this, TQ_SLOT( changeDirDuringDrag() ) );
connect( this, TQ_SIGNAL( contentsMoving(int,int) ),
this, TQ_SLOT( contentsMoved(int,int) ) );
- viewport()->setAcceptDrops( TRUE );
+ viewport()->setAcceptDrops( true );
dragItem = 0;
}
@@ -1255,7 +1255,7 @@ void TQFileListBox::keyPressEvent( TQKeyEvent *e )
void TQFileListBox::viewportMousePressEvent( TQMouseEvent *e )
{
pressPos = e->pos();
- mousePressed = FALSE;
+ mousePressed = false;
bool didRename = renaming;
@@ -1265,12 +1265,12 @@ void TQFileListBox::viewportMousePressEvent( TQMouseEvent *e )
if ( e->button() != LeftButton ) {
TQListBox::viewportMousePressEvent( e );
- firstMousePressEvent = FALSE;
+ firstMousePressEvent = false;
return;
}
int i = currentItem();
- bool wasSelected = FALSE;
+ bool wasSelected = false;
if ( i != -1 )
wasSelected = item( i )->isSelected();
TQListBox::mousePressEvent( e );
@@ -1281,24 +1281,24 @@ void TQFileListBox::viewportMousePressEvent( TQMouseEvent *e )
|| ( filedialog->mode() == TQFileDialog::Directory ) || ( filedialog->mode() == TQFileDialog::DirectoryOnly );
if ( itemAt( e->pos() ) != item( i ) ) {
- firstMousePressEvent = FALSE;
+ firstMousePressEvent = false;
return;
}
if ( !firstMousePressEvent && !didRename && i == currentItem() && currentItem() != -1 &&
wasSelected && TQUrlInfo( filedialog->d->url, "." ).isWritable() && item( currentItem() )->text() != ".." ) {
- renameTimer->start( TQApplication::doubleClickInterval(), TRUE );
+ renameTimer->start( TQApplication::doubleClickInterval(), true );
renameItem = item( i );
}
- firstMousePressEvent = FALSE;
+ firstMousePressEvent = false;
}
void TQFileListBox::viewportMouseReleaseEvent( TQMouseEvent *e )
{
dragItem = 0;
TQListBox::viewportMouseReleaseEvent( e );
- mousePressed = FALSE;
+ mousePressed = false;
}
void TQFileListBox::viewportMouseDoubleClickEvent( TQMouseEvent *e )
@@ -1334,7 +1334,7 @@ void TQFileListBox::viewportMouseMoveEvent( TQMouseEvent *e )
this, TQ_SLOT( dragObjDestroyed() ) );
drag->drag();
- mousePressed = FALSE;
+ mousePressed = false;
}
} else
#endif
@@ -1462,15 +1462,15 @@ bool TQFileListBox::acceptDrop( const TQPoint &pnt, TQWidget *source )
TQListBoxItem *item = itemAt( pnt );
if ( !item || ( item && !itemRect( item ).contains( pnt ) ) ) {
if ( source == viewport() && startDragDir == filedialog->dirPath() )
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
TQUrlInfo fi( filedialog->d->url, item->text() );
if ( fi.isDir() && itemRect( item ).contains( pnt ) )
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
void TQFileListBox::setCurrentDropItem( const TQPoint &pnt )
@@ -1516,7 +1516,7 @@ void TQFileListBox::startRename( bool check )
return;
int i = currentItem();
- setSelected( i, TRUE );
+ setSelected( i, true );
TQRect r = itemRect( item( i ) );
int bdr = item( i )->pixmap() ?
item( i )->pixmap()->width() : 16;
@@ -1530,10 +1530,10 @@ void TQFileListBox::startRename( bool check )
lined->setFocus();
lined->setText( item( i )->text() );
lined->selectAll();
- lined->setFrame( FALSE );
+ lined->setFrame( false );
lined->parentWidget()->show();
viewport()->setFocusProxy( lined );
- renaming = TRUE;
+ renaming = true;
}
void TQFileListBox::clear()
@@ -1558,7 +1558,7 @@ void TQFileListBox::cancelRename()
renameItem = 0;
lined->parentWidget()->hide();
viewport()->setFocusProxy( this );
- renaming = FALSE;
+ renaming = false;
updateItem( currentItem() );
if ( lined->hasFocus() )
viewport()->setFocus();
@@ -1579,9 +1579,9 @@ void TQFileListBox::contentsMoved( int, int )
************************************************************************/
TQFileDialogTQFileListView::TQFileDialogTQFileListView( TQWidget *parent, TQFileDialog *dlg )
- : TQListView( parent, "qt_filedlg_listview" ), renaming( FALSE ), renameItem( 0 ),
- filedialog( dlg ), mousePressed( FALSE ),
- firstMousePressEvent( TRUE )
+ : TQListView( parent, "qt_filedlg_listview" ), renaming( false ), renameItem( 0 ),
+ filedialog( dlg ), mousePressed( false ),
+ firstMousePressEvent( true )
{
changeDirTimer = new TQTimer( this );
TQVBox *box = new TQVBox( viewport(), "qt_vbox" );
@@ -1595,7 +1595,7 @@ TQFileDialogTQFileListView::TQFileDialogTQFileListView( TQWidget *parent, TQFile
this, TQ_SLOT (rename() ) );
connect( lined, TQ_SIGNAL( cancelRename() ),
this, TQ_SLOT( cancelRename() ) );
- header()->setMovingEnabled( FALSE );
+ header()->setMovingEnabled( false );
connect( renameTimer, TQ_SIGNAL( timeout() ),
this, TQ_SLOT( doubleClickTimeout() ) );
connect( changeDirTimer, TQ_SIGNAL( timeout() ),
@@ -1607,9 +1607,9 @@ TQFileDialogTQFileListView::TQFileDialogTQFileListView( TQWidget *parent, TQFile
connect( this, TQ_SIGNAL( contentsMoving(int,int) ),
this, TQ_SLOT( contentsMoved(int,int) ) );
- viewport()->setAcceptDrops( TRUE );
+ viewport()->setAcceptDrops( true );
sortcolumn = 0;
- ascending = TRUE;
+ ascending = true;
dragItem = 0;
}
@@ -1643,7 +1643,7 @@ void TQFileDialogTQFileListView::setSorting( int column, bool increasing )
void TQFileDialogTQFileListView::changeSortColumn2( int column )
{
int lcol = header()->mapToLogical( column );
- setSorting( lcol, sortcolumn == lcol ? !ascending : TRUE );
+ setSorting( lcol, sortcolumn == lcol ? !ascending : true );
}
void TQFileDialogTQFileListView::keyPressEvent( TQKeyEvent *e )
@@ -1688,7 +1688,7 @@ void TQFileDialogTQFileListView::keyPressEvent( TQKeyEvent *e )
void TQFileDialogTQFileListView::viewportMousePressEvent( TQMouseEvent *e )
{
pressPos = e->pos();
- mousePressed = FALSE;
+ mousePressed = false;
bool didRename = renaming;
cancelRename();
@@ -1697,7 +1697,7 @@ void TQFileDialogTQFileListView::viewportMousePressEvent( TQMouseEvent *e )
if ( e->button() != LeftButton ) {
TQListView::viewportMousePressEvent( e );
- firstMousePressEvent = FALSE;
+ firstMousePressEvent = false;
return;
}
@@ -1711,17 +1711,17 @@ void TQFileDialogTQFileListView::viewportMousePressEvent( TQMouseEvent *e )
if ( itemAt( e->pos() ) != i ||
e->x() + contentsX() > columnWidth( 0 ) ) {
- firstMousePressEvent = FALSE;
+ firstMousePressEvent = false;
return;
}
if ( !firstMousePressEvent && !didRename && i == currentItem() && currentItem() &&
TQUrlInfo( filedialog->d->url, "." ).isWritable() && currentItem()->text( 0 ) != ".." ) {
- renameTimer->start( TQApplication::doubleClickInterval(), TRUE );
+ renameTimer->start( TQApplication::doubleClickInterval(), true );
renameItem = currentItem();
}
- firstMousePressEvent = FALSE;
+ firstMousePressEvent = false;
}
void TQFileDialogTQFileListView::viewportMouseDoubleClickEvent( TQMouseEvent *e )
@@ -1733,7 +1733,7 @@ void TQFileDialogTQFileListView::viewportMouseDoubleClickEvent( TQMouseEvent *e
void TQFileDialogTQFileListView::viewportMouseReleaseEvent( TQMouseEvent *e )
{
TQListView::viewportMouseReleaseEvent( e );
- mousePressed = FALSE;
+ mousePressed = false;
dragItem = 0;
}
@@ -1762,7 +1762,7 @@ void TQFileDialogTQFileListView::viewportMouseMoveEvent( TQMouseEvent *e )
this, TQ_SLOT( dragObjDestroyed() ) );
drag->drag();
- mousePressed = FALSE;
+ mousePressed = false;
}
}
#endif
@@ -1881,15 +1881,15 @@ bool TQFileDialogTQFileListView::acceptDrop( const TQPoint &pnt, TQWidget *sourc
TQListViewItem *item = itemAt( pnt );
if ( !item || ( item && !itemRect( item ).contains( pnt ) ) ) {
if ( source == viewport() && startDragDir == filedialog->dirPath() )
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
TQUrlInfo fi( filedialog->d->url, item->text( 0 ) );
if ( fi.isDir() && itemRect( item ).contains( pnt ) )
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
void TQFileDialogTQFileListView::setCurrentDropItem( const TQPoint &pnt )
@@ -1939,7 +1939,7 @@ void TQFileDialogTQFileListView::startRename( bool check )
return;
TQListViewItem *i = currentItem();
- setSelected( i, TRUE );
+ setSelected( i, true );
TQRect r = itemRect( i );
int bdr = i->pixmap( 0 ) ?
@@ -1954,10 +1954,10 @@ void TQFileDialogTQFileListView::startRename( bool check )
lined->setFocus();
lined->setText( i->text( 0 ) );
lined->selectAll();
- lined->setFrame( FALSE );
+ lined->setFrame( false );
lined->parentWidget()->show();
viewport()->setFocusProxy( lined );
- renaming = TRUE;
+ renaming = true;
}
void TQFileDialogTQFileListView::clear()
@@ -1982,7 +1982,7 @@ void TQFileDialogTQFileListView::cancelRename()
renameItem = 0;
lined->parentWidget()->hide();
viewport()->setFocusProxy( this );
- renaming = FALSE;
+ renaming = false;
if ( currentItem() )
currentItem()->repaint();
if ( lined->hasFocus() )
@@ -2203,7 +2203,7 @@ static TQStringList makeFiltersList( const TQString &filter )
the TQFileDialog.
\code
- TQFileDialog* fd = new TQFileDialog( this, "file dialog", TRUE );
+ TQFileDialog* fd = new TQFileDialog( this, "file dialog", true );
fd->setMode( TQFileDialog::AnyFile );
\endcode
@@ -2302,14 +2302,14 @@ static TQStringList makeFiltersList( const TQString &filter )
Preview* p = new Preview;
TQFileDialog* fd = new TQFileDialog( this );
- fd->setContentsPreviewEnabled( TRUE );
+ fd->setContentsPreviewEnabled( true );
fd->setContentsPreview( p, p );
fd->setPreviewMode( TQFileDialog::Contents );
fd->show();
\endcode
The first line creates an instance of our preview widget. We then
- create our file dialog and call setContentsPreviewEnabled( TRUE ),
+ create our file dialog and call setContentsPreviewEnabled( true ),
this tell the file dialog to preview the contents of the currently
selected file. We then call setContentsPreview() -- note that we pass
the same preview widget twice. Finally, before showing the file
@@ -2387,7 +2387,7 @@ extern const char qt_file_dialog_filter_reg_exp[] =
/*!
Constructs a file dialog called \a name, with the parent, \a parent.
- If \a modal is TRUE then the file dialog is modal; otherwise it is
+ If \a modal is true then the file dialog is modal; otherwise it is
modeless.
*/
@@ -2399,7 +2399,7 @@ TQFileDialog::TQFileDialog( TQWidget *parent, const char *name, bool modal )
init();
d->mode = ExistingFile;
d->types->insertItem( tr( "All Files (*)" ) );
- d->cursorOverride = FALSE;
+ d->cursorOverride = false;
emit dirEntered( d->url.dirPath() );
rereadDir();
}
@@ -2407,7 +2407,7 @@ TQFileDialog::TQFileDialog( TQWidget *parent, const char *name, bool modal )
/*!
Constructs a file dialog called \a name with the parent, \a parent.
- If \a modal is TRUE then the file dialog is modal; otherwise it is
+ If \a modal is true then the file dialog is modal; otherwise it is
modeless.
If \a dirName is specified then it will be used as the dialog's
@@ -2435,7 +2435,7 @@ TQFileDialog::TQFileDialog( const TQString& dirName, const TQString & filter,
if ( !filter.isEmpty() ) {
setFilters( filter );
if ( !dirName.isEmpty() ) {
- int dotpos = dirName.find( TQChar('.'), 0, FALSE );
+ int dotpos = dirName.find( TQChar('.'), 0, false );
if ( dotpos != -1 ) {
for ( int b=0 ; b<d->types->count() ; b++ ) {
if ( d->types->text(b).contains( dirName.right( dirName.length() - dotpos ) ) ) {
@@ -2463,23 +2463,23 @@ extern int qt_ntfs_permission_lookup;
void TQFileDialog::init()
{
- setSizeGripEnabled( TRUE );
+ setSizeGripEnabled( true );
d = new TQFileDialogPrivate();
d->mode = AnyFile;
d->last = 0;
d->lastEFSelected = 0;
d->moreFiles = 0;
- d->infoPreview = FALSE;
- d->contentsPreview = FALSE;
- d->hadDotDot = FALSE;
- d->ignoreNextKeyPress = FALSE;
+ d->infoPreview = false;
+ d->contentsPreview = false;
+ d->hadDotDot = false;
+ d->ignoreNextKeyPress = false;
d->progressDia = 0;
- d->checkForFilter = FALSE;
- d->ignoreNextRefresh = FALSE;
- d->ignoreStop = FALSE;
- d->pendingItems.setAutoDelete( FALSE );
+ d->checkForFilter = false;
+ d->ignoreNextRefresh = false;
+ d->ignoreStop = false;
+ d->pendingItems.setAutoDelete( false );
d->mimeTypeTimer = new TQTimer( this );
- d->cursorOverride = FALSE;
+ d->cursorOverride = false;
#if defined(TQ_WS_WIN)
d->oldPermissionLookup = qt_ntfs_permission_lookup;
#endif
@@ -2525,7 +2525,7 @@ void TQFileDialog::init()
files->addColumn( tr("Type") );
files->addColumn( tr("Date") );
files->addColumn( tr("Attributes") );
- files->header()->setStretchEnabled( TRUE, 0 );
+ files->header()->setStretchEnabled( true, 0 );
files->setMinimumSize( 50, 25 + 2*fm.lineSpacing() );
@@ -2545,7 +2545,7 @@ void TQFileDialog::init()
d->moreFiles = new TQFileListBox( d->stack, this );
d->moreFiles->setRowMode( TQListBox::FitToHeight );
- d->moreFiles->setVariableWidth( TRUE );
+ d->moreFiles->setVariableWidth( true );
connect( d->moreFiles, TQ_SIGNAL(selected(TQListBoxItem*)),
this, TQ_SLOT(selectDirectoryOrFile(TQListBoxItem*)) );
@@ -2560,14 +2560,14 @@ void TQFileDialog::init()
d->moreFiles->viewport()->installEventFilter( this );
okB = new TQPushButton( tr("&OK"), this, "OK" ); //### Or "Save (see other "OK")
- okB->setDefault( TRUE );
- okB->setEnabled( FALSE );
+ okB->setDefault( true );
+ okB->setEnabled( false );
connect( okB, TQ_SIGNAL(clicked()), this, TQ_SLOT(okClicked()) );
cancelB = new TQPushButton( tr("Cancel") , this, "Cancel" );
connect( cancelB, TQ_SIGNAL(clicked()), this, TQ_SLOT(cancelClicked()) );
- d->paths = new TQComboBox( TRUE, this, "directory history/editor" );
- d->paths->setDuplicatesEnabled( FALSE );
+ d->paths = new TQComboBox( true, this, "directory history/editor" );
+ d->paths->setDuplicatesEnabled( false );
d->paths->setInsertionPolicy( TQComboBox::NoInsertion );
const TQFileInfoList * rootDrives = TQDir::drives();
TQFileInfoListIterator it( *rootDrives );
@@ -2593,10 +2593,10 @@ void TQFileDialog::init()
( (TQLineEdit*)ol->first() )->installEventFilter( this );
delete ol;
- d->geometryDirty = TRUE;
- d->types = new TQComboBox( TRUE, this, "file types" );
- d->types->setDuplicatesEnabled( FALSE );
- d->types->setEditable( FALSE );
+ d->geometryDirty = true;
+ d->types = new TQComboBox( true, this, "file types" );
+ d->types->setDuplicatesEnabled( false );
+ d->types->setEditable( false );
connect( d->types, TQ_SIGNAL(activated(const TQString&)),
this, TQ_SLOT(setFilter(const TQString&)) );
connect( d->types, TQ_SIGNAL(activated(const TQString&)),
@@ -2607,7 +2607,7 @@ void TQFileDialog::init()
d->typeL = new TQLabel( d->types, tr("File &type:"), this, "qt_filetype_lbl" );
d->goBack = new TQToolButton( this, "go back" );
- d->goBack->setEnabled( FALSE );
+ d->goBack->setEnabled( false );
d->goBack->setFocusPolicy( TabFocus );
connect( d->goBack, TQ_SIGNAL( clicked() ), this, TQ_SLOT( goBack() ) );
#ifndef TQT_NO_TOOLTIP
@@ -2636,7 +2636,7 @@ void TQFileDialog::init()
d->modeButtons = new TQButtonGroup( 0, "invisible group" );
connect( d->modeButtons, TQ_SIGNAL(destroyed()),
this, TQ_SLOT(modeButtonsDestroyed()) );
- d->modeButtons->setExclusive( TRUE );
+ d->modeButtons->setExclusive( true );
connect( d->modeButtons, TQ_SIGNAL(clicked(int)),
d->stack, TQ_SLOT(raiseWidget(int)) );
connect( d->modeButtons, TQ_SIGNAL(clicked(int)),
@@ -2648,7 +2648,7 @@ void TQFileDialog::init()
TQToolTip::add( d->mcView, tr( "List View" ) );
#endif
d->mcView->setIconSet( *multiColumnListViewIcon );
- d->mcView->setToggleButton( TRUE );
+ d->mcView->setToggleButton( true );
d->stack->addWidget( d->moreFiles, d->modeButtons->insert( d->mcView ) );
d->detailView = new TQToolButton( this, "list view" );
d->detailView->setFocusPolicy( TabFocus );
@@ -2656,7 +2656,7 @@ void TQFileDialog::init()
TQToolTip::add( d->detailView, tr( "Detail View" ) );
#endif
d->detailView->setIconSet( *detailViewIcon );
- d->detailView->setToggleButton( TRUE );
+ d->detailView->setToggleButton( true );
d->stack->addWidget( files, d->modeButtons->insert( d->detailView ) );
d->previewInfo = new TQToolButton( this, "preview info view" );
@@ -2665,7 +2665,7 @@ void TQFileDialog::init()
TQToolTip::add( d->previewInfo, tr( "Preview File Info" ) );
#endif
d->previewInfo->setIconSet( *previewInfoViewIcon );
- d->previewInfo->setToggleButton( TRUE );
+ d->previewInfo->setToggleButton( true );
d->modeButtons->insert( d->previewInfo );
d->previewContents = new TQToolButton( this, "preview info view" );
@@ -2675,20 +2675,20 @@ void TQFileDialog::init()
if ( !qstrcmp(style().className(), "TQWindowsStyle") )
#endif
{
- d->goBack->setAutoRaise( TRUE );
- d->cdToParent->setAutoRaise( TRUE );
- d->newFolder->setAutoRaise( TRUE );
- d->mcView->setAutoRaise( TRUE );
- d->detailView->setAutoRaise( TRUE );
- d->previewInfo->setAutoRaise( TRUE );
- d->previewContents->setAutoRaise( TRUE );
+ d->goBack->setAutoRaise( true );
+ d->cdToParent->setAutoRaise( true );
+ d->newFolder->setAutoRaise( true );
+ d->mcView->setAutoRaise( true );
+ d->detailView->setAutoRaise( true );
+ d->previewInfo->setAutoRaise( true );
+ d->previewContents->setAutoRaise( true );
}
d->previewContents->setFocusPolicy( TabFocus );
#ifndef TQT_NO_TOOLTIP
TQToolTip::add( d->previewContents, tr( "Preview File Contents" ) );
#endif
d->previewContents->setIconSet( *previewContentsViewIcon );
- d->previewContents->setToggleButton( TRUE );
+ d->previewContents->setToggleButton( true );
d->modeButtons->insert( d->previewContents );
connect( d->detailView, TQ_SIGNAL( clicked() ),
@@ -2701,18 +2701,18 @@ void TQFileDialog::init()
files, TQ_SLOT( cancelRename() ) );
d->stack->raiseWidget( d->moreFiles );
- d->mcView->setOn( TRUE );
+ d->mcView->setOn( true );
TQHBoxLayout *lay = new TQHBoxLayout( this );
lay->setMargin( 6 );
d->leftLayout = new TQHBoxLayout( lay, 5 );
d->topLevelLayout = new TQVBoxLayout( (TQWidget*)0, 5 );
lay->addLayout( d->topLevelLayout, 1 );
- d->extraWidgetsLayouts.setAutoDelete( FALSE );
- d->extraLabels.setAutoDelete( FALSE );
- d->extraWidgets.setAutoDelete( FALSE );
- d->extraButtons.setAutoDelete( FALSE );
- d->toolButtons.setAutoDelete( FALSE );
+ d->extraWidgetsLayouts.setAutoDelete( false );
+ d->extraLabels.setAutoDelete( false );
+ d->extraWidgets.setAutoDelete( false );
+ d->extraButtons.setAutoDelete( false );
+ d->toolButtons.setAutoDelete( false );
TQHBoxLayout * h;
@@ -2815,8 +2815,8 @@ void TQFileDialog::init()
if ( detailViewMode ) {
d->stack->raiseWidget( files );
- d->mcView->setOn( FALSE );
- d->detailView->setOn( TRUE );
+ d->mcView->setOn( false );
+ d->detailView->setOn( true );
}
d->preview->hide();
@@ -2851,9 +2851,9 @@ void TQFileDialog::fileNameEditReturnPressed()
if ( f.isDir() ) {
setUrl( TQUrlOperator( d->url,
TQFileDialogPrivate::encodeFileName(nameEdit->text() + "/" ) ) );
- d->checkForFilter = TRUE;
- trySetSelection( TRUE, d->url, TRUE );
- d->checkForFilter = FALSE;
+ d->checkForFilter = true;
+ trySetSelection( true, d->url, true );
+ d->checkForFilter = false;
}
}
nameEdit->setText( TQString::null );
@@ -2913,12 +2913,12 @@ TQFileDialog::~TQFileDialog()
{
// since clear might call setContentsPos which would emit
// a signal and thus cause a recompute of sizes...
- files->blockSignals( TRUE );
- d->moreFiles->blockSignals( TRUE );
+ files->blockSignals( true );
+ d->moreFiles->blockSignals( true );
files->clear();
d->moreFiles->clear();
- d->moreFiles->blockSignals( FALSE );
- files->blockSignals( FALSE );
+ d->moreFiles->blockSignals( false );
+ files->blockSignals( false );
#ifndef TQT_NO_CURSOR
if ( d->cursorOverride )
@@ -3003,7 +3003,7 @@ void TQFileDialog::setSelectedFilter( const TQString& mask )
int n;
for ( n = 0; n < d->types->count(); n++ ) {
- if ( d->types->text( n ).contains( mask, FALSE ) ) {
+ if ( d->types->text( n ).contains( mask, false ) ) {
d->types->setCurrentItem( n );
TQString f = mask;
TQRegExp r( TQString::fromLatin1(qt_file_dialog_filter_reg_exp) );
@@ -3098,7 +3098,7 @@ void TQFileDialog::setSelection( const TQString & filename )
else
d->url = TQUrlOperator( filename );
d->url.setNameFilter( nf );
- d->checkForFilter = TRUE;
+ d->checkForFilter = true;
bool isDirOk;
bool isDir = d->url.isDir( &isDirOk );
if ( !isDirOk )
@@ -3106,8 +3106,8 @@ void TQFileDialog::setSelection( const TQString & filename )
if ( !isDir ) {
TQUrlOperator u( d->url );
d->url.setPath( d->url.dirPath() );
- trySetSelection( FALSE, u, TRUE );
- d->ignoreNextRefresh = TRUE;
+ trySetSelection( false, u, true );
+ d->ignoreNextRefresh = true;
nameEdit->selectAll();
rereadDir();
emit dirEntered( d->url.dirPath() );
@@ -3118,12 +3118,12 @@ void TQFileDialog::setSelection( const TQString & filename )
p += "/";
d->url.setPath( p );
}
- trySetSelection( TRUE, d->url, FALSE );
+ trySetSelection( true, d->url, false );
rereadDir();
emit dirEntered( d->url.dirPath() );
nameEdit->setText( TQString::fromLatin1("") );
}
- d->checkForFilter = FALSE;
+ d->checkForFilter = false;
}
/*!
@@ -3267,9 +3267,9 @@ void TQFileDialog::setDir( const TQDir &dir )
d->url = dir.canonicalPath();
d->url.setNameFilter( nf );
TQUrlInfo i( d->url, nameEdit->text() );
- d->checkForFilter = TRUE;
- trySetSelection( i.isDir(), TQUrlOperator( d->url, TQFileDialogPrivate::encodeFileName(nameEdit->text() ) ), FALSE );
- d->checkForFilter = FALSE;
+ d->checkForFilter = true;
+ trySetSelection( i.isDir(), TQUrlOperator( d->url, TQFileDialogPrivate::encodeFileName(nameEdit->text() ) ), false );
+ d->checkForFilter = false;
rereadDir();
emit dirEntered( d->url.path() );
}
@@ -3285,7 +3285,7 @@ void TQFileDialog::setUrl( const TQUrlOperator &url )
d->oldUrl = d->url;
TQString nf = d->url.nameFilter();
- TQString operatorPath = url.toString( FALSE, FALSE );
+ TQString operatorPath = url.toString( false, false );
if ( TQUrl::isRelativeUrl( operatorPath ) ) {
d->url = TQUrl( d->url, operatorPath );
} else {
@@ -3293,21 +3293,21 @@ void TQFileDialog::setUrl( const TQUrlOperator &url )
}
d->url.setNameFilter( nf );
- d->checkForFilter = TRUE;
+ d->checkForFilter = true;
if ( !d->url.isDir() ) {
TQUrlOperator u = d->url;
d->url.setPath( d->url.dirPath() );
- trySetSelection( FALSE, u, FALSE );
+ trySetSelection( false, u, false );
rereadDir();
emit dirEntered( d->url.dirPath() );
TQString fn = u.fileName();
nameEdit->setText( fn );
} else {
- trySetSelection( TRUE, d->url, FALSE );
+ trySetSelection( true, d->url, false );
rereadDir();
emit dirEntered( d->url.dirPath() );
}
- d->checkForFilter = FALSE;
+ d->checkForFilter = false;
}
/*!
@@ -3315,7 +3315,7 @@ void TQFileDialog::setUrl( const TQUrlOperator &url )
\brief whether hidden files are shown in the file dialog
- The default is FALSE, i.e. don't show hidden files.
+ The default is false, i.e. don't show hidden files.
*/
void TQFileDialog::setShowHiddenFiles( bool s )
@@ -3347,7 +3347,7 @@ void TQFileDialog::rereadDir()
#ifndef TQT_NO_CURSOR
if ( !d->cursorOverride ) {
TQApplication::setOverrideCursor( TQCursor( TQt::WaitCursor ) );
- d->cursorOverride = TRUE;
+ d->cursorOverride = true;
}
#endif
d->pendingItems.clear();
@@ -3357,7 +3357,7 @@ void TQFileDialog::rereadDir()
#ifndef TQT_NO_CURSOR
if ( d->cursorOverride ) {
TQApplication::restoreOverrideCursor();
- d->cursorOverride = FALSE;
+ d->cursorOverride = false;
}
#endif
}
@@ -3406,7 +3406,7 @@ void TQFileDialog::rereadDir()
*/
extern bool tqt_resolve_symlinks; // defined in tqapplication.cpp
-bool TQ_EXPORT tqt_use_native_dialogs = TRUE;
+bool TQ_EXPORT tqt_use_native_dialogs = true;
/*!
This is a convenience static function that returns an existing file
@@ -3445,7 +3445,7 @@ bool TQ_EXPORT tqt_use_native_dialogs = TRUE;
Under Unix/X11, the normal behavior of the file dialog is to resolve
and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp,
the file dialog will change to /var/tmp after entering /usr/tmp.
- If \a resolveSymlinks is FALSE, the file dialog will treat
+ If \a resolveSymlinks is false, the file dialog will treat
symlinks as regular directories.
\sa getOpenFileNames(), getSaveFileName(), getExistingDirectory()
@@ -3507,10 +3507,10 @@ TQString TQFileDialog::getOpenFileName( const TQString & startWith,
|| tqApp->style().inherits("TQMacStyle")))
return qt_mac_precomposeFileName(macGetOpenFileNames(filter,
startWith.isEmpty() ? 0 : workingDirectory,
- parent, name, caption, selectedFilter, FALSE).first());
+ parent, name, caption, selectedFilter, false).first());
#endif
- TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gofn", TRUE );
+ TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gofn", true );
TQ_CHECK_PTR( dlg );
#ifndef TQT_NO_WIDGET_TOPEXTRA
@@ -3576,7 +3576,7 @@ TQString TQFileDialog::getOpenFileName( const TQString & startWith,
Under Unix/X11, the normal behavior of the file dialog is to resolve
and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp,
the file dialog will change to /var/tmp after entering /usr/tmp.
- If \a resolveSymlinks is FALSE, the file dialog will treat
+ If \a resolveSymlinks is false, the file dialog will treat
symlinks as regular directories.
\sa getOpenFileName(), getOpenFileNames(), getExistingDirectory()
@@ -3635,7 +3635,7 @@ TQString TQFileDialog::getSaveFileName( const TQString & startWith,
caption, selectedFilter));
#endif
- TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gsfn", TRUE );
+ TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gsfn", true );
TQ_CHECK_PTR( dlg );
#ifndef TQT_NO_WIDGET_TOPEXTRA
@@ -3683,9 +3683,9 @@ void TQFileDialog::okClicked()
if ( fn.contains("*") ) {
addFilter( fn );
- nameEdit->blockSignals( TRUE );
+ nameEdit->blockSignals( true );
nameEdit->setText( TQString::fromLatin1("") );
- nameEdit->blockSignals( FALSE );
+ nameEdit->blockSignals( false );
return;
}
@@ -3714,7 +3714,7 @@ void TQFileDialog::okClicked()
if ( mode() == ExistingFiles ) {
if ( ! nameEdit->text().isEmpty() ) {
TQStringList sf = selectedFiles();
- bool isdir = FALSE;
+ bool isdir = false;
if ( sf.count() == 1 ) {
TQUrlOperator u( d->url, sf[0] );
bool ok;
@@ -3765,9 +3765,9 @@ void TQFileDialog::okClicked()
}
if ( f.isDir() ) {
setUrl( TQUrlOperator( d->url, TQFileDialogPrivate::encodeFileName(f.name() + "/" ) ) );
- d->checkForFilter = TRUE;
- trySetSelection( TRUE, d->url, TRUE );
- d->checkForFilter = FALSE;
+ d->checkForFilter = true;
+ trySetSelection( true, d->url, true );
+ d->checkForFilter = false;
} else {
if ( !nameEdit->text().contains( "/" ) &&
!nameEdit->text().contains( "\\" )
@@ -3830,7 +3830,7 @@ void TQFileDialog::resizeEvent( TQResizeEvent * e )
bool TQFileDialog::trySetSelection( bool isDir, const TQUrlOperator &u, bool updatelined )
{
if ( !isDir && !u.path().isEmpty() && u.path().right( 1 ) == "/" )
- isDir = TRUE;
+ isDir = true;
if ( u.fileName().contains( "*") && d->checkForFilter ) {
TQString fn( u.fileName() );
if ( fn.contains( "*" ) ) {
@@ -3838,7 +3838,7 @@ bool TQFileDialog::trySetSelection( bool isDir, const TQUrlOperator &u, bool upd
d->currentFileName = TQString::null;
d->url.setFileName( TQString::null );
nameEdit->setText( TQString::fromLatin1("") );
- return FALSE;
+ return false;
}
}
@@ -3873,9 +3873,9 @@ bool TQFileDialog::trySetSelection( bool isDir, const TQUrlOperator &u, bool upd
}
if ( !d->currentFileName.isNull() || isDir ) {
- okB->setEnabled( TRUE );
+ okB->setEnabled( true );
} else if ( !isDirectoryMode( d->mode ) ) {
- okB->setEnabled( FALSE );
+ okB->setEnabled( false );
}
if ( d->currentFileName.length() && old != d->currentFileName )
@@ -3893,7 +3893,7 @@ void TQFileDialog::updateGeometries()
if ( !d || !d->geometryDirty )
return;
- d->geometryDirty = FALSE;
+ d->geometryDirty = false;
TQSize r, t;
@@ -3990,19 +3990,19 @@ void TQFileDialog::updateFileNameEdit( TQListViewItem * newItem )
if ( mode() == ExistingFiles ) {
detailViewSelectionChanged();
TQUrl u( d->url, TQFileDialogPrivate::encodeFileName( ((TQFileDialogPrivate::File*)files->currentItem())->info.name() ) );
- TQFileInfo fi( u.toString( FALSE, FALSE ) );
+ TQFileInfo fi( u.toString( false, false ) );
if ( !fi.isDir() )
- emit fileHighlighted( u.toString( FALSE, FALSE ) );
+ emit fileHighlighted( u.toString( false, false ) );
} else if ( files->isSelected( newItem ) ) {
TQFileDialogPrivate::File * i = (TQFileDialogPrivate::File *)newItem;
if ( i && i->i && !i->i->isSelected() ) {
- d->moreFiles->blockSignals( TRUE );
- d->moreFiles->setSelected( i->i, TRUE );
- d->moreFiles->blockSignals( FALSE );
+ d->moreFiles->blockSignals( true );
+ d->moreFiles->setSelected( i->i, true );
+ d->moreFiles->blockSignals( false );
}
// Encode the filename in case it had any special characters in it
TQString encFile = TQFileDialogPrivate::encodeFileName( newItem->text( 0 ) );
- trySetSelection( i->info.isDir(), TQUrlOperator( d->url, encFile ), TRUE );
+ trySetSelection( i->info.isDir(), TQUrlOperator( d->url, encFile ), true );
}
}
@@ -4014,7 +4014,7 @@ void TQFileDialog::detailViewSelectionChanged()
nameEdit->clear();
TQString str;
TQListViewItem * i = files->firstChild();
- d->moreFiles->blockSignals( TRUE );
+ d->moreFiles->blockSignals( true );
while( i ) {
if ( d->moreFiles && isVisible() ) {
TQFileDialogPrivate::File *f = (TQFileDialogPrivate::File *)i;
@@ -4025,10 +4025,10 @@ void TQFileDialog::detailViewSelectionChanged()
str += TQString( "\"%1\" " ).arg( i->text( 0 ) );
i = i->nextSibling();
}
- d->moreFiles->blockSignals( FALSE );
+ d->moreFiles->blockSignals( false );
nameEdit->setText( str );
nameEdit->setCursorPosition( str.length() );
- okB->setEnabled( TRUE );
+ okB->setEnabled( true );
if ( d->preview && d->preview->isVisible() && files->currentItem() ) {
TQUrl u = TQUrl( d->url, TQFileDialogPrivate::encodeFileName( ((TQFileDialogPrivate::File*)files->currentItem())->info.name() ) );
updatePreviews( u );
@@ -4041,7 +4041,7 @@ void TQFileDialog::listBoxSelectionChanged()
return;
if ( d->ignoreNextRefresh ) {
- d->ignoreNextRefresh = FALSE;
+ d->ignoreNextRefresh = false;
return;
}
@@ -4050,7 +4050,7 @@ void TQFileDialog::listBoxSelectionChanged()
TQListBoxItem * i = d->moreFiles->item( 0 );
TQListBoxItem * j = 0;
int index = 0;
- files->blockSignals( TRUE );
+ files->blockSignals( true );
while( i ) {
TQFileDialogPrivate::MCItem *mcitem = (TQFileDialogPrivate::MCItem *)i;
if ( files && isVisible() ) {
@@ -4068,7 +4068,7 @@ void TQFileDialog::listBoxSelectionChanged()
if ( mcitem->isSelected() && i != d->lastEFSelected ) {
TQUrl u( d->url, TQFileDialogPrivate::encodeFileName( ((TQFileDialogPrivate::File*)(mcitem)->i)->info.name()) );
d->lastEFSelected = i;
- emit fileHighlighted( u.toString(FALSE, FALSE) );
+ emit fileHighlighted( u.toString(false, false) );
}
}
}
@@ -4081,10 +4081,10 @@ void TQFileDialog::listBoxSelectionChanged()
i = d->moreFiles->item( ++index );
}
- files->blockSignals( FALSE );
+ files->blockSignals( false );
nameEdit->setText( str );
nameEdit->setCursorPosition( str.length() );
- okB->setEnabled( TRUE );
+ okB->setEnabled( true );
if ( d->preview && d->preview->isVisible() && j ) {
TQUrl u = TQUrl( d->url,
TQFileDialogPrivate::encodeFileName( ( (TQFileDialogPrivate::File*)( (TQFileDialogPrivate::MCItem*)j )->i )->info.name() ) );
@@ -4113,7 +4113,7 @@ void TQFileDialog::fileNameEditDone()
TQUrlInfo f( d->url, nameEdit->text() );
if ( mode() != TQFileDialog::ExistingFiles ) {
TQUrlOperator u( d->url, TQFileDialogPrivate::encodeFileName( nameEdit->text() ) );
- trySetSelection( f.isDir(), u, FALSE );
+ trySetSelection( f.isDir(), u, false );
if ( d->preview && d->preview->isVisible() )
updatePreviews( u );
}
@@ -4152,10 +4152,10 @@ void TQFileDialog::selectDirectoryOrFile( TQListViewItem * newItem )
setUrl( TQUrlOperator( d->url, TQFileDialogPrivate::encodeFileName( i->info.name() ) + "/" ) );
if ( isDirectoryMode( mode() ) ) {
TQUrlInfo f ( d->url, TQString::fromLatin1( "." ) );
- trySetSelection( f.isDir(), d->url, TRUE );
+ trySetSelection( f.isDir(), d->url, true );
}
} else if ( newItem->isSelectable() &&
- trySetSelection( i->info.isDir(), TQUrlOperator( d->url, TQFileDialogPrivate::encodeFileName( i->info.name() ) ), TRUE ) ) {
+ trySetSelection( i->info.isDir(), TQUrlOperator( d->url, TQFileDialogPrivate::encodeFileName( i->info.name() ) ), true ) ) {
if ( !isDirectoryMode( mode() ) ) {
if ( mode() == ExistingFile ) {
if ( TQFileDialogPrivate::fileExists( d->url, nameEdit->text() ) ) {
@@ -4194,16 +4194,16 @@ void TQFileDialog::popupContextMenu( TQListViewItem *item, const TQPoint &p,
{
if ( item ) {
files->setCurrentItem( item );
- files->setSelected( item, TRUE );
+ files->setSelected( item, true );
}
PopupAction action;
- popupContextMenu( item ? item->text( 0 ) : TQString::null, TRUE, action, p );
+ popupContextMenu( item ? item->text( 0 ) : TQString::null, true, action, p );
if ( action == PA_Open )
selectDirectoryOrFile( item );
else if ( action == PA_Rename )
- files->startRename( FALSE );
+ files->startRename( false );
else if ( action == PA_Delete )
deleteFile( item ? item->text( 0 ) : TQString::null );
else if ( action == PA_Reload )
@@ -4213,19 +4213,19 @@ void TQFileDialog::popupContextMenu( TQListViewItem *item, const TQPoint &p,
rereadDir();
} else if ( action == PA_SortName ) {
sortFilesBy = (int)TQDir::Name;
- sortAscending = TRUE;
+ sortAscending = true;
resortDir();
} else if ( action == PA_SortSize ) {
sortFilesBy = (int)TQDir::Size;
- sortAscending = TRUE;
+ sortAscending = true;
resortDir();
} else if ( action == PA_SortDate ) {
sortFilesBy = (int)TQDir::Time;
- sortAscending = TRUE;
+ sortAscending = true;
resortDir();
} else if ( action == PA_SortUnsorted ) {
sortFilesBy = (int)TQDir::Unsorted;
- sortAscending = TRUE;
+ sortAscending = true;
resortDir();
}
@@ -4234,12 +4234,12 @@ void TQFileDialog::popupContextMenu( TQListViewItem *item, const TQPoint &p,
void TQFileDialog::popupContextMenu( TQListBoxItem *item, const TQPoint & p )
{
PopupAction action;
- popupContextMenu( item ? item->text() : TQString::null, FALSE, action, p );
+ popupContextMenu( item ? item->text() : TQString::null, false, action, p );
if ( action == PA_Open )
selectDirectoryOrFile( item );
else if ( action == PA_Rename )
- d->moreFiles->startRename( FALSE );
+ d->moreFiles->startRename( false );
else if ( action == PA_Delete )
deleteFile( item->text() );
else if ( action == PA_Reload )
@@ -4249,19 +4249,19 @@ void TQFileDialog::popupContextMenu( TQListBoxItem *item, const TQPoint & p )
rereadDir();
} else if ( action == PA_SortName ) {
sortFilesBy = (int)TQDir::Name;
- sortAscending = TRUE;
+ sortAscending = true;
resortDir();
} else if ( action == PA_SortSize ) {
sortFilesBy = (int)TQDir::Size;
- sortAscending = TRUE;
+ sortAscending = true;
resortDir();
} else if ( action == PA_SortDate ) {
sortFilesBy = (int)TQDir::Time;
- sortAscending = TRUE;
+ sortAscending = true;
resortDir();
} else if ( action == PA_SortUnsorted ) {
sortFilesBy = (int)TQDir::Unsorted;
- sortAscending = TRUE;
+ sortAscending = true;
resortDir();
}
}
@@ -4274,7 +4274,7 @@ void TQFileDialog::popupContextMenu( const TQString &filename, bool,
bool glob = filename.isEmpty();
TQPopupMenu m( 0, "file dialog context menu" );
- m.setCheckable( TRUE );
+ m.setCheckable( true );
if ( !glob ) {
TQString okt;
@@ -4295,9 +4295,9 @@ void TQFileDialog::popupContextMenu( const TQString &filename, bool,
if ( filename.isEmpty() || !TQUrlInfo( d->url, filename ).isWritable() ||
filename == ".." ) {
if ( filename.isEmpty() || !TQUrlInfo( d->url, filename ).isReadable() )
- m.setItemEnabled( ok, FALSE );
- m.setItemEnabled( rename, FALSE );
- m.setItemEnabled( del, FALSE );
+ m.setItemEnabled( ok, false );
+ m.setItemEnabled( rename, false );
+ m.setItemEnabled( del, false );
}
m.move( p );
@@ -4321,18 +4321,18 @@ void TQFileDialog::popupContextMenu( const TQString &filename, bool,
m2.insertSeparator();
int sunsorted = m2.insertItem( tr( "&Unsorted" ) );
- //m2.setItemEnabled( stype, FALSE );
+ //m2.setItemEnabled( stype, false );
if ( sortFilesBy == (int)TQDir::Name )
- m2.setItemChecked( sname, TRUE );
+ m2.setItemChecked( sname, true );
else if ( sortFilesBy == (int)TQDir::Size )
- m2.setItemChecked( ssize, TRUE );
+ m2.setItemChecked( ssize, true );
// else if ( sortFilesBy == 0x16 )
-// m2.setItemChecked( stype, TRUE );
+// m2.setItemChecked( stype, true );
else if ( sortFilesBy == (int)TQDir::Time )
- m2.setItemChecked( sdate, TRUE );
+ m2.setItemChecked( sdate, true );
else if ( sortFilesBy == (int)TQDir::Unsorted )
- m2.setItemChecked( sunsorted, TRUE );
+ m2.setItemChecked( sunsorted, true );
m.insertItem( tr( "Sort" ), &m2 );
@@ -4436,7 +4436,7 @@ void TQFileDialog::createdDirectory( const TQUrlInfo &info, TQNetworkOperation *
for ( uint i = 0; i < d->moreFiles->count(); ++i ) {
if ( d->moreFiles->text( i ) == info.name() ) {
d->moreFiles->setCurrentItem( i );
- d->moreFiles->startRename( FALSE );
+ d->moreFiles->startRename( false );
break;
}
}
@@ -4444,9 +4444,9 @@ void TQFileDialog::createdDirectory( const TQUrlInfo &info, TQNetworkOperation *
TQListViewItem *item = files->firstChild();
while ( item ) {
if ( item->text( 0 ) == info.name() ) {
- files->setSelected( item, TRUE );
+ files->setSelected( item, true );
files->setCurrentItem( item );
- files->startRename( FALSE );
+ files->startRename( false );
break;
}
item = item->nextSibling();
@@ -4465,7 +4465,7 @@ void TQFileDialog::createdDirectory( const TQUrlInfo &info, TQNetworkOperation *
this,
"get existing directory",
"Choose a directory",
- TRUE );
+ true );
\endcode
This function creates a modal file dialog called \a name, with
@@ -4479,13 +4479,13 @@ void TQFileDialog::createdDirectory( const TQUrlInfo &info, TQNetworkOperation *
Note on Windows that if \a dir is TQString::null then the dialog's working
directory will be set to the user's My Documents directory.
- If \a dirOnly is TRUE, then only directories will be shown in
+ If \a dirOnly is true, then only directories will be shown in
the file dialog; otherwise both directories and files will be shown.
Under Unix/X11, the normal behavior of the file dialog is to resolve
and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp,
the file dialog will change to /var/tmp after entering /usr/tmp.
- If \a resolveSymlinks is FALSE, the file dialog will treat
+ If \a resolveSymlinks is false, the file dialog will treat
symlinks as regular directories.
Under Windows and Mac OS X, this static function will use the native
@@ -4544,10 +4544,10 @@ TQString TQFileDialog::getExistingDirectory( const TQString & dir,
if( tqt_use_native_dialogs && (tqApp->style().inherits(TQMAC_DEFAULT_STYLE)
|| tqApp->style().inherits("TQMacStyle")))
return qt_mac_precomposeFileName(macGetOpenFileNames("", initialDir, parent, name,
- caption, 0, FALSE, TRUE).first());
+ caption, 0, false, true).first());
#endif
- TQFileDialog *dlg = new TQFileDialog( parent, name ? name : "qt_filedlg_ged", TRUE );
+ TQFileDialog *dlg = new TQFileDialog( parent, name ? name : "qt_filedlg_ged", true );
TQ_CHECK_PTR( dlg );
#ifndef TQT_NO_WIDGET_TOPEXTRA
@@ -4561,7 +4561,7 @@ TQString TQFileDialog::getExistingDirectory( const TQString & dir,
dlg->d->types->clear();
dlg->d->types->insertItem( TQFileDialog::tr("Directories") );
- dlg->d->types->setEnabled( FALSE );
+ dlg->d->types->setEnabled( false );
TQString dir_( dir );
dir_ = dir_.simplifyWhiteSpace();
@@ -4635,32 +4635,32 @@ void TQFileDialog::setMode( Mode newMode )
d->moreFiles->setSelectionMode( TQListBox::Single );
if ( sel.isNull() )
sel = TQString::fromLatin1(".");
- d->types->setEnabled( FALSE );
+ d->types->setEnabled( false );
} else if ( newMode == ExistingFiles ) {
maxnamelen = INT_MAX;
files->setSelectionMode( TQListView::Extended );
d->moreFiles->setSelectionMode( TQListBox::Extended );
- d->types->setEnabled( TRUE );
+ d->types->setEnabled( true );
} else {
files->setSelectionMode( TQListView::Single );
d->moreFiles->setSelectionMode( TQListBox::Single );
- d->types->setEnabled( TRUE );
+ d->types->setEnabled( true );
}
nameEdit->setMaxLength(maxnamelen);
rereadDir();
TQUrlInfo f( d->url, "." );
- trySetSelection( f.isDir(), d->url, FALSE );
+ trySetSelection( f.isDir(), d->url, false );
}
TQString okt;
- bool changeFilters = FALSE;
+ bool changeFilters = false;
if ( mode() == AnyFile ) {
okt = tr("&Save");
d->fileL->setText( tr("File &name:") );
if ( d->types->count() == 1 ) {
d->types->setCurrentItem( 0 );
if ( d->types->currentText() == "Directories" ) {
- changeFilters = TRUE;
+ changeFilters = true;
}
}
}
@@ -4676,7 +4676,7 @@ void TQFileDialog::setMode( Mode newMode )
if ( d->types->count() == 1 ) {
d->types->setCurrentItem( 0 );
if ( d->types->currentText() == "Directories" ) {
- changeFilters = TRUE;
+ changeFilters = true;
}
}
}
@@ -4742,15 +4742,15 @@ TQFileDialog::ViewMode TQFileDialog::viewMode() const
void TQFileDialog::setViewMode( ViewMode m )
{
if ( m == Detail ) {
- detailViewMode = TRUE;
+ detailViewMode = true;
d->stack->raiseWidget( files );
- d->detailView->setOn( TRUE );
- d->mcView->setOn( FALSE );
+ d->detailView->setOn( true );
+ d->mcView->setOn( false );
} else if ( m == List ) {
- detailViewMode = FALSE;
+ detailViewMode = false;
d->stack->raiseWidget( d->moreFiles );
- d->detailView->setOn( FALSE );
- d->mcView->setOn( TRUE );
+ d->detailView->setOn( false );
+ d->mcView->setOn( true );
}
}
@@ -4772,15 +4772,15 @@ void TQFileDialog::setViewMode( ViewMode m )
void TQFileDialog::setPreviewMode( PreviewMode m )
{
if ( m == NoPreview ) {
- d->previewInfo->setOn( FALSE );
- d->previewContents->setOn( FALSE );
+ d->previewInfo->setOn( false );
+ d->previewContents->setOn( false );
} else if ( m == Info && d->infoPreview ) {
- d->previewInfo->setOn( TRUE );
- d->previewContents->setOn( FALSE );
+ d->previewInfo->setOn( true );
+ d->previewContents->setOn( false );
changeMode( d->modeButtons->id( d->previewInfo ) );
} else if ( m == Contents && d->contentsPreview ) {
- d->previewInfo->setOn( FALSE );
- d->previewContents->setOn( TRUE );
+ d->previewInfo->setOn( false );
+ d->previewContents->setOn( true );
changeMode( d->modeButtons->id( d->previewContents ) );
}
}
@@ -4827,7 +4827,7 @@ void TQFileDialog::addWidgets( TQLabel * l, TQWidget * w, TQPushButton * b )
if ( !l && !w && !b )
return;
- d->geometryDirty = TRUE;
+ d->geometryDirty = true;
TQHBoxLayout *lay = new TQHBoxLayout();
d->extraWidgetsLayouts.append( lay );
@@ -4859,7 +4859,7 @@ void TQFileDialog::addWidgets( TQLabel * l, TQWidget * w, TQPushButton * b )
/*!
Adds the tool button \a b to the row of tool buttons at the top of the
file dialog. The button is appended to the right of
- this row. If \a separator is TRUE, a small space is inserted between the
+ this row. If \a separator is true, a small space is inserted between the
last button of the row and the new button \a b.
\sa addWidgets(), addLeftWidget(), addRightWidget()
@@ -4870,7 +4870,7 @@ void TQFileDialog::addToolButton( TQButton *b, bool separator )
if ( !b || !d->buttonLayout )
return;
- d->geometryDirty = TRUE;
+ d->geometryDirty = true;
d->toolButtons.append( b );
if ( separator )
@@ -4890,7 +4890,7 @@ void TQFileDialog::addLeftWidget( TQWidget *w )
{
if ( !w )
return;
- d->geometryDirty = TRUE;
+ d->geometryDirty = true;
d->leftLayout->addWidget( w );
d->leftLayout->addSpacing( 5 );
@@ -4908,7 +4908,7 @@ void TQFileDialog::addRightWidget( TQWidget *w )
{
if ( !w )
return;
- d->geometryDirty = TRUE;
+ d->geometryDirty = true;
d->rightLayout->addSpacing( 5 );
d->rightLayout->addWidget( w );
@@ -4949,7 +4949,7 @@ void TQFileDialog::keyPressEvent( TQKeyEvent * ke )
while ( i && nameEdit->text() != i->text( 0 ) )
i = i->nextSibling();
if ( i )
- files->setSelected( i, TRUE );
+ files->setSelected( i, true );
else
ke->accept(); // strangely, means to ignore that event
}
@@ -4961,7 +4961,7 @@ void TQFileDialog::keyPressEvent( TQKeyEvent * ke )
ke->ignore();
}
- d->ignoreNextKeyPress = FALSE;
+ d->ignoreNextKeyPress = false;
if ( !ke->isAccepted() ) {
TQDialog::keyPressEvent( ke );
@@ -5230,7 +5230,7 @@ const TQPixmap * TQWindowsIconProvider::pixmap( const TQFileInfo &fi )
return pixmap(TQFileInfo(real));
}
- TQString ext = fi.extension( FALSE ).upper();
+ TQString ext = fi.extension( false ).upper();
TQString key = ext;
ext.prepend( "." );
TQMap< TQString, TQPixmap >::Iterator it;
@@ -5386,38 +5386,38 @@ bool TQFileDialog::eventFilter( TQObject * o, TQEvent * e )
if ( e->type() == TQEvent::KeyPress && ( (TQKeyEvent*)e )->key() == Key_F5 ) {
rereadDir();
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::KeyPress && ( (TQKeyEvent*)e )->key() == Key_F2 &&
( o == files || o == files->viewport() ) ) {
if ( files->isVisible() && files->currentItem() ) {
if ( TQUrlInfo( d->url, "." ).isWritable() && files->currentItem()->text( 0 ) != ".." ) {
files->renameItem = files->currentItem();
- files->startRename( TRUE );
+ files->startRename( true );
}
}
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::KeyPress && ( (TQKeyEvent*)e )->key() == Key_F2 &&
( o == d->moreFiles || o == d->moreFiles->viewport() ) ) {
if ( d->moreFiles->isVisible() && d->moreFiles->currentItem() != -1 ) {
if ( TQUrlInfo( d->url, "." ).isWritable() &&
d->moreFiles->item( d->moreFiles->currentItem() )->text() != ".." ) {
d->moreFiles->renameItem = d->moreFiles->item( d->moreFiles->currentItem() );
- d->moreFiles->startRename( TRUE );
+ d->moreFiles->startRename( true );
}
}
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::KeyPress && d->moreFiles->renaming ) {
d->moreFiles->lined->setFocus();
TQApplication::sendEvent( d->moreFiles->lined, e );
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::KeyPress && files->renaming ) {
files->lined->setFocus();
TQApplication::sendEvent( files->lined, e );
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::KeyPress &&
((TQKeyEvent *)e)->key() == Key_Backspace &&
( o == files ||
@@ -5426,7 +5426,7 @@ bool TQFileDialog::eventFilter( TQObject * o, TQEvent * e )
o == d->moreFiles->viewport() ) ) {
cdUpClicked();
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::KeyPress &&
((TQKeyEvent *)e)->key() == Key_Delete &&
( o == files ||
@@ -5434,7 +5434,7 @@ bool TQFileDialog::eventFilter( TQObject * o, TQEvent * e )
if ( files->currentItem() )
deleteFile( files->currentItem()->text( 0 ) );
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::KeyPress &&
((TQKeyEvent *)e)->key() == Key_Delete &&
( o == d->moreFiles ||
@@ -5443,7 +5443,7 @@ bool TQFileDialog::eventFilter( TQObject * o, TQEvent * e )
if ( c >= 0 )
deleteFile( d->moreFiles->item( c )->text() );
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
} else if ( o == files && e->type() == TQEvent::FocusOut && files->currentItem() ) {
} else if ( o == files && e->type() == TQEvent::KeyPress ) {
TQTimer::singleShot( 0, this, TQ_SLOT(fixupNameEdit()) );
@@ -5468,23 +5468,23 @@ bool TQFileDialog::eventFilter( TQObject * o, TQEvent * e )
nt = i->text( 0 );
int cp = nameEdit->cursorPosition()+1;
nameEdit->validateAndSet( nt, cp, cp, nt.length() );
- return TRUE;
+ return true;
}
}
} else if ( o == nameEdit && e->type() == TQEvent::FocusIn ) {
fileNameEditDone();
} else if ( d->moreFiles->renaming && o != d->moreFiles->lined && e->type() == TQEvent::FocusIn ) {
d->moreFiles->lined->setFocus();
- return TRUE;
+ return true;
} else if ( files->renaming && o != files->lined && e->type() == TQEvent::FocusIn ) {
files->lined->setFocus();
- return TRUE;
+ return true;
} else if ( ( o == d->moreFiles || o == d->moreFiles->viewport() ) &&
e->type() == TQEvent::FocusIn ) {
if ( ( o == d->moreFiles->viewport() && !d->moreFiles->viewport()->hasFocus() ) ||
( o == d->moreFiles && !d->moreFiles->hasFocus() ) )
((TQWidget*)o)->setFocus();
- return FALSE;
+ return false;
}
return TQDialog::eventFilter( o, e );
@@ -5640,7 +5640,7 @@ void TQFileDialog::modeButtonsDestroyed()
Under Unix/X11, the normal behavior of the file dialog is to resolve
and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp,
the file dialog will change to /var/tmp after entering /usr/tmp.
- If \a resolveSymlinks is FALSE, the file dialog will treat
+ If \a resolveSymlinks is false, the file dialog will treat
symlinks as regular directories.
Note that if you want to iterate over the list of files, you should
@@ -5707,7 +5707,7 @@ TQStringList TQFileDialog::getOpenFileNames( const TQString & filter,
}
#endif
- TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gofns", TRUE );
+ TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gofns", true );
TQ_CHECK_PTR( dlg );
#ifndef TQT_NO_WIDGET_TOPEXTRA
@@ -5761,21 +5761,21 @@ static bool isRoot( const TQUrl &u )
#if defined(Q_OS_MAC9)
TQString p = TQDir::convertSeparators(u.path());
if(p.contains(':') == 1)
- return TRUE;
+ return true;
#elif defined(Q_OS_UNIX)
if ( u.path() == "/" )
- return TRUE;
+ return true;
#elif defined(Q_OS_WIN32)
TQString p = u.path();
if ( p.length() == 3 &&
p.right( 2 ) == ":/" )
- return TRUE;
+ return true;
if ( p[ 0 ] == '/' && p[ 1 ] == '/' ) {
int slashes = p.contains( '/' );
if ( slashes <= 3 )
- return TRUE;
+ return true;
if ( slashes == 4 && p[ (int)p.length() - 1 ] == '/' )
- return TRUE;
+ return true;
}
#else
#if defined(Q_CC_GNU)
@@ -5784,9 +5784,9 @@ static bool isRoot( const TQUrl &u )
#endif
if ( !u.isLocalFile() && u.path() == "/" )
- return TRUE;
+ return true;
- return FALSE;
+ return false;
}
void TQFileDialog::urlStart( TQNetworkOperation *op )
@@ -5801,13 +5801,13 @@ void TQFileDialog::urlStart( TQNetworkOperation *op )
#ifndef TQT_NO_CURSOR
if ( !d->cursorOverride ) {
TQApplication::setOverrideCursor( TQCursor( TQt::WaitCursor ) );
- d->cursorOverride = TRUE;
+ d->cursorOverride = true;
}
#endif
if ( isRoot( d->url ) )
- d->cdToParent->setEnabled( FALSE );
+ d->cdToParent->setEnabled( false );
else
- d->cdToParent->setEnabled( TRUE );
+ d->cdToParent->setEnabled( true );
d->mimeTypeTimer->stop();
d->sortedList.clear();
d->pendingItems.clear();
@@ -5817,15 +5817,15 @@ void TQFileDialog::urlStart( TQNetworkOperation *op )
files->clear();
files->setSorting( -1 );
- TQString s = d->url.toString( FALSE, FALSE );
- bool found = FALSE;
+ TQString s = d->url.toString( false, false );
+ bool found = false;
for ( int i = 0; i < d->paths->count(); ++i ) {
#if defined(TQ_WS_WIN)
if ( d->paths->text( i ).lower() == s.lower() ) {
#else
if ( d->paths->text( i ) == s ) {
#endif
- found = TRUE;
+ found = true;
d->paths->setCurrentItem( i );
break;
}
@@ -5835,12 +5835,12 @@ void TQFileDialog::urlStart( TQNetworkOperation *op )
d->paths->setCurrentItem( d->paths->count() - 1 );
}
d->last = 0;
- d->hadDotDot = FALSE;
+ d->hadDotDot = false;
if ( d->goBack && d->history.last() != d->url.toString() ) {
d->history.append( d->url.toString() );
if ( d->history.count() > 1 )
- d->goBack->setEnabled( TRUE );
+ d->goBack->setEnabled( true );
}
}
}
@@ -5854,16 +5854,16 @@ void TQFileDialog::urlFinished( TQNetworkOperation *op )
if ( op->operation() == TQNetworkProtocol::OpListChildren &&
d->cursorOverride ) {
TQApplication::restoreOverrideCursor();
- d->cursorOverride = FALSE;
+ d->cursorOverride = false;
}
#endif
if ( op->state() == TQNetworkProtocol::StFailed ) {
if ( d->paths->hasFocus() )
- d->ignoreNextKeyPress = TRUE;
+ d->ignoreNextKeyPress = true;
if ( d->progressDia ) {
- d->ignoreStop = TRUE;
+ d->ignoreStop = true;
d->progressDia->close();
delete d->progressDia;
d->progressDia = 0;
@@ -5886,17 +5886,17 @@ void TQFileDialog::urlFinished( TQNetworkOperation *op )
} else if ( op->operation() == TQNetworkProtocol::OpListChildren &&
op == d->currListChildren ) {
if ( !d->hadDotDot && !isRoot( d->url ) ) {
- bool ok = TRUE;
+ bool ok = true;
#if defined(TQ_WS_WIN)
if ( d->url.path().left( 2 ) == "//" )
- ok = FALSE;
+ ok = false;
#endif
if ( ok ) {
TQUrlInfo ui( d->url, ".." );
ui.setName( ".." );
- ui.setDir( TRUE );
- ui.setFile( FALSE );
- ui.setSymLink( FALSE );
+ ui.setDir( true );
+ ui.setFile( false );
+ ui.setSymLink( false );
ui.setSize( 0 );
TQValueList<TQUrlInfo> lst;
lst << ui;
@@ -5908,7 +5908,7 @@ void TQFileDialog::urlFinished( TQNetworkOperation *op )
} else if ( op->operation() == TQNetworkProtocol::OpPut ) {
rereadDir();
if ( d->progressDia ) {
- d->ignoreStop = TRUE;
+ d->ignoreStop = true;
d->progressDia->close();
}
delete d->progressDia;
@@ -5937,7 +5937,7 @@ void TQFileDialog::dataTransferProgress( int bytesDone, int bytesTotal, TQNetwor
if ( !d->progressDia ) {
if ( bytesDone < bytesTotal) {
- d->ignoreStop = FALSE;
+ d->ignoreStop = false;
d->progressDia = new TQFDProgressDialog( this, label, bytesTotal );
connect( d->progressDia, TQ_SIGNAL( cancelled() ),
this, TQ_SLOT( stopCopy() ) );
@@ -5973,7 +5973,7 @@ void TQFileDialog::insertEntry( const TQValueList<TQUrlInfo> &lst, TQNetworkOper
if ( d->mode == DirectoryOnly && !inf.isDir() )
continue;
if ( inf.name() == ".." ) {
- d->hadDotDot = TRUE;
+ d->hadDotDot = true;
if ( isRoot( d->url ) )
continue;
#if defined(TQ_WS_WIN)
@@ -6018,8 +6018,8 @@ void TQFileDialog::insertEntry( const TQValueList<TQUrlInfo> &lst, TQNetworkOper
if ( ( d->mode == ExistingFiles && inf.isDir() ) ||
( isDirectoryMode( d->mode ) && inf.isFile() ) ) {
- i->setSelectable( FALSE );
- i2->setSelectable( FALSE );
+ i->setSelectable( false );
+ i2->setSelectable( false );
}
i->i = i2;
@@ -6036,7 +6036,7 @@ void TQFileDialog::removeEntry( TQNetworkOperation *op )
TQUrlInfo *i = 0;
TQListViewItemIterator it( files );
- bool ok1 = FALSE, ok2 = FALSE;
+ bool ok1 = false, ok2 = false;
for ( i = d->sortedList.first(); it.current(); ++it, i = d->sortedList.next() ) {
TQString encName = TQFileDialogPrivate::encodeFileName(
( (TQFileDialogPrivate::File*)it.current() )->info.name() );
@@ -6044,12 +6044,12 @@ void TQFileDialog::removeEntry( TQNetworkOperation *op )
d->pendingItems.removeRef( (TQFileDialogPrivate::File*)it.current() );
delete ( (TQFileDialogPrivate::File*)it.current() )->i;
delete it.current();
- ok1 = TRUE;
+ ok1 = true;
}
if ( i && i->name() == op->arg( 0 ) ) {
d->sortedList.removeRef( i );
i = d->sortedList.prev();
- ok2 = TRUE;
+ ok2 = true;
}
if ( ok1 && ok2 )
break;
@@ -6063,18 +6063,18 @@ void TQFileDialog::itemChanged( TQNetworkOperation *op )
TQUrlInfo *i = 0;
TQListViewItemIterator it1( files );
- bool ok1 = FALSE, ok2 = FALSE;
+ bool ok1 = false, ok2 = false;
// first check whether the new file replaces an existing file.
for ( i = d->sortedList.first(); it1.current(); ++it1, i = d->sortedList.next() ) {
if ( ( (TQFileDialogPrivate::File*)it1.current() )->info.name() == op->arg( 1 ) ) {
delete ( (TQFileDialogPrivate::File*)it1.current() )->i;
delete it1.current();
- ok1 = TRUE;
+ ok1 = true;
}
if ( i && i->name() == op->arg( 1 ) ) {
d->sortedList.removeRef( i );
i = d->sortedList.prev();
- ok2 = TRUE;
+ ok2 = true;
}
if ( ok1 && ok2 )
break;
@@ -6082,16 +6082,16 @@ void TQFileDialog::itemChanged( TQNetworkOperation *op )
i = 0;
TQListViewItemIterator it( files );
- ok1 = FALSE;
- ok2 = FALSE;
+ ok1 = false;
+ ok2 = false;
for ( i = d->sortedList.first(); it.current(); ++it, i = d->sortedList.next() ) {
if ( ( (TQFileDialogPrivate::File*)it.current() )->info.name() == op->arg( 0 ) ) {
( (TQFileDialogPrivate::File*)it.current() )->info.setName( op->arg( 1 ) );
- ok1 = TRUE;
+ ok1 = true;
}
if ( i && i->name() == op->arg( 0 ) ) {
i->setName( op->arg( 1 ) );
- ok2 = TRUE;
+ ok2 = true;
}
if ( ok1 && ok2 )
break;
@@ -6106,7 +6106,7 @@ void TQFileDialog::itemChanged( TQNetworkOperation *op )
\brief whether the file dialog can provide preview information about
the currently selected file
- The default is FALSE.
+ The default is false.
*/
bool TQFileDialog::isInfoPreviewEnabled() const
{
@@ -6117,7 +6117,7 @@ void TQFileDialog::setInfoPreviewEnabled( bool info )
{
if ( info == d->infoPreview )
return;
- d->geometryDirty = TRUE;
+ d->geometryDirty = true;
d->infoPreview = info;
updateGeometries();
}
@@ -6129,7 +6129,7 @@ void TQFileDialog::setInfoPreviewEnabled( bool info )
\brief whether the file dialog can provide a contents preview of the
currently selected file
- The default is FALSE.
+ The default is false.
\sa setContentsPreview() setInfoPreviewEnabled()
*/
@@ -6145,7 +6145,7 @@ void TQFileDialog::setContentsPreviewEnabled( bool contents )
{
if ( contents == d->contentsPreview )
return;
- d->geometryDirty = TRUE;
+ d->geometryDirty = true;
d->contentsPreview = contents;
updateGeometries();
}
@@ -6185,7 +6185,7 @@ void TQFileDialog::setContentsPreviewEnabled( bool contents )
Preview* p = new Preview;
TQFileDialog* fd = new TQFileDialog( this );
- fd->setInfoPreviewEnabled( TRUE );
+ fd->setInfoPreviewEnabled( true );
fd->setInfoPreview( p, p );
fd->setPreviewMode( TQFileDialog::Info );
fd->show();
@@ -6245,7 +6245,7 @@ void TQFileDialog::setInfoPreview( TQWidget *w, TQFilePreview *preview )
Preview* p = new Preview;
TQFileDialog* fd = new TQFileDialog( this );
- fd->setContentsPreviewEnabled( TRUE );
+ fd->setContentsPreviewEnabled( true );
fd->setContentsPreview( p, p );
fd->setPreviewMode( TQFileDialog::Contents );
fd->show();
@@ -6300,8 +6300,8 @@ void TQFileDialog::resortDir()
d->pendingItems.append( item );
if ( ( d->mode == ExistingFiles && item->info.isDir() ) ||
( isDirectoryMode( d->mode ) && item->info.isFile() ) ) {
- item->setSelectable( FALSE );
- item2->setSelectable( FALSE );
+ item->setSelectable( false );
+ item2->setSelectable( false );
}
}
@@ -6323,13 +6323,13 @@ void TQFileDialog::stopCopy()
if ( d->ignoreStop )
return;
- d->url.blockSignals( TRUE );
+ d->url.blockSignals( true );
d->url.stop();
if ( d->progressDia ) {
- d->ignoreStop = TRUE;
+ d->ignoreStop = true;
TQTimer::singleShot( 100, this, TQ_SLOT( removeProgressDia() ) );
}
- d->url.blockSignals( FALSE );
+ d->url.blockSignals( false );
}
/*!
@@ -6365,30 +6365,30 @@ void TQFileDialog::doMimeTypeLookup()
if ( item ) {
TQFileInfo fi;
if ( d->url.isLocalFile() ) {
- fi.setFile( TQUrl( d->url.path(), TQFileDialogPrivate::encodeFileName( item->info.name() ) ).path( FALSE ) );
+ fi.setFile( TQUrl( d->url.path(), TQFileDialogPrivate::encodeFileName( item->info.name() ) ).path( false ) );
} else
fi.setFile( item->info.name() ); // #####
const TQPixmap *p = iconProvider()->pixmap( fi );
if ( p && p != item->pixmap( 0 ) &&
( !item->pixmap( 0 ) || p->serialNumber() != item->pixmap( 0 )->serialNumber() ) &&
p != fifteenTransparentPixels ) {
- item->hasMimePixmap = TRUE;
+ item->hasMimePixmap = true;
// evil hack to avoid much too much repaints!
TQGuardedPtr<TQFileDialog> that( this ); // this may be deleted by an event handler
tqApp->processEvents();
if ( that.isNull() )
return;
- files->setUpdatesEnabled( FALSE );
- files->viewport()->setUpdatesEnabled( FALSE );
+ files->setUpdatesEnabled( false );
+ files->viewport()->setUpdatesEnabled( false );
if ( item != d->pendingItems.first() )
return;
item->setPixmap( 0, *p );
tqApp->processEvents();
if ( that.isNull() )
return;
- files->setUpdatesEnabled( TRUE );
- files->viewport()->setUpdatesEnabled( TRUE );
+ files->setUpdatesEnabled( true );
+ files->viewport()->setUpdatesEnabled( true );
if ( files->isVisible() ) {
TQRect ir( files->itemRect( item ) );
@@ -6407,19 +6407,19 @@ void TQFileDialog::doMimeTypeLookup()
}
if ( d->moreFiles->isVisible() ) {
- d->moreFiles->viewport()->repaint( r, FALSE );
+ d->moreFiles->viewport()->repaint( r, false );
} else {
- files->viewport()->repaint( r, FALSE );
+ files->viewport()->repaint( r, false );
}
if ( d->pendingItems.count() )
d->mimeTypeTimer->start( 0 );
else if ( d->moreFiles->isVisible() )
- d->moreFiles->triggerUpdate( TRUE );
+ d->moreFiles->triggerUpdate( true );
}
/*!
- If \a b is TRUE then all the files in the current directory are selected;
+ If \a b is true then all the files in the current directory are selected;
otherwise, they are deselected.
*/
@@ -6437,7 +6437,7 @@ void TQFileDialog::goBack()
return;
d->history.remove( d->history.last() );
if ( d->history.count() < 2 )
- d->goBack->setEnabled( FALSE );
+ d->goBack->setEnabled( false );
setUrl( d->history.last() );
}
diff --git a/src/dialogs/tqfiledialog.h b/src/dialogs/tqfiledialog.h
index 23cd5476e..912c9a557 100644
--- a/src/dialogs/tqfiledialog.h
+++ b/src/dialogs/tqfiledialog.h
@@ -108,8 +108,8 @@ class TQ_EXPORT TQFileDialog : public TQDialog
public:
TQFileDialog( const TQString& dirName, const TQString& filter = TQString::null,
- TQWidget* parent=0, const char* name=0, bool modal = FALSE );
- TQFileDialog( TQWidget* parent=0, const char* name=0, bool modal = FALSE );
+ TQWidget* parent=0, const char* name=0, bool modal = false );
+ TQFileDialog( TQWidget* parent=0, const char* name=0, bool modal = false );
~TQFileDialog();
// recommended static functions
@@ -119,26 +119,26 @@ public:
TQWidget *parent = 0, const char* name = 0,
const TQString &caption = TQString::null,
TQString *selectedFilter = 0,
- bool resolveSymlinks = TRUE);
+ bool resolveSymlinks = true);
static TQString getSaveFileName( const TQString &initially = TQString::null,
const TQString &filter = TQString::null,
TQWidget *parent = 0, const char* name = 0,
const TQString &caption = TQString::null,
TQString *selectedFilter = 0,
- bool resolveSymlinks = TRUE);
+ bool resolveSymlinks = true);
static TQString getExistingDirectory( const TQString &dir = TQString::null,
TQWidget *parent = 0,
const char* name = 0,
const TQString &caption = TQString::null,
- bool dirOnly = TRUE,
- bool resolveSymlinks = TRUE);
+ bool dirOnly = true,
+ bool resolveSymlinks = true);
static TQStringList getOpenFileNames( const TQString &filter= TQString::null,
const TQString &dir = TQString::null,
TQWidget *parent = 0,
const char* name = 0,
const TQString &caption = TQString::null,
TQString *selectedFilter = 0,
- bool resolveSymlinks = TRUE);
+ bool resolveSymlinks = true);
// other static functions
@@ -208,7 +208,7 @@ protected:
void keyPressEvent( TQKeyEvent * );
void addWidgets( TQLabel *, TQWidget *, TQPushButton * );
- void addToolButton( TQButton *b, bool separator = FALSE );
+ void addToolButton( TQButton *b, bool separator = false );
void addLeftWidget( TQWidget *w );
void addRightWidget( TQWidget *w );
@@ -331,7 +331,7 @@ private:
static TQStringList macGetOpenFileNames( const TQString &, TQString*,
TQWidget *, const char *,
const TQString&, TQString *,
- bool = TRUE, bool = FALSE );
+ bool = true, bool = false );
#endif
diff --git a/src/dialogs/tqfontdialog.cpp b/src/dialogs/tqfontdialog.cpp
index 40c9f3de5..37d9b75da 100644
--- a/src/dialogs/tqfontdialog.cpp
+++ b/src/dialogs/tqfontdialog.cpp
@@ -160,11 +160,11 @@ TQFontDialog::TQFontDialog( TQWidget *parent, const char *name,
bool modal, WFlags f )
: TQDialog( parent, name, modal, f )
{
- setSizeGripEnabled( TRUE );
+ setSizeGripEnabled( true );
d = new TQFontDialogPrivate;
// grid
d->familyEdit = new TQLineEdit( this, "font family I" );
- d->familyEdit->setReadOnly( TRUE );
+ d->familyEdit->setReadOnly( true );
d->familyList = new TQListBox( this, "font family II" );
d->familyEdit->setFocusProxy( d->familyList );
@@ -173,7 +173,7 @@ TQFontDialog::TQFontDialog( TQWidget *parent, const char *name,
d->familyAccel->setIndent( 2 );
d->styleEdit = new TQLineEdit( this, "font style I" );
- d->styleEdit->setReadOnly( TRUE );
+ d->styleEdit->setReadOnly( true );
d->styleList = new TQListBox( this, "font style II" );
d->styleEdit->setFocusProxy( d->styleList );
@@ -206,14 +206,14 @@ TQFontDialog::TQFontDialog( TQWidget *parent, const char *name,
// characters used depend on the charset encoding.
d->sampleEdit->setText( "AaBbYyZz" );
- d->scriptCombo = new TQComboBox( FALSE, this, "font encoding" );
+ d->scriptCombo = new TQComboBox( false, this, "font encoding" );
d->scriptAccel
= new TQLabel( d->scriptCombo, tr("Scr&ipt"), this,"encoding label");
d->scriptAccel->setIndent( 2 );
d->size = 0;
- d->smoothScalable = FALSE;
+ d->smoothScalable = false;
connect( d->scriptCombo, TQ_SIGNAL(activated(int)),
TQ_SLOT(scriptHighlighted(int)) );
@@ -289,7 +289,7 @@ TQFontDialog::TQFontDialog( TQWidget *parent, const char *name,
buttonBox->addWidget( d->ok );
if ( modal )
connect( d->ok, TQ_SIGNAL(clicked()), TQ_SLOT(accept()) );
- d->ok->setDefault( TRUE );
+ d->ok->setDefault( true );
buttonBox->addSpacing( 12 );
@@ -327,8 +327,8 @@ TQFontDialog::~TQFontDialog()
The dialog is called \a name, with the parent \a parent.
\a initial is the initially selected font.
- If the \a ok parameter is not-null, \e *\a ok is set to TRUE if the
- user clicked OK, and set to FALSE if the user clicked Cancel.
+ If the \a ok parameter is not-null, \e *\a ok is set to true if the
+ user clicked OK, and set to false if the user clicked Cancel.
This static function is less flexible than the full TQFontDialog
object, but is convenient and easy to use.
@@ -367,8 +367,8 @@ TQFont TQFontDialog::getFont( bool *ok, const TQFont &initial,
clicks Cancel, the TQt default font is returned.
The dialog is called \a name, with parent \a parent.
- If the \a ok parameter is not-null, \e *\a ok is set to TRUE if the
- user clicked OK, and FALSE if the user clicked Cancel.
+ If the \a ok parameter is not-null, \e *\a ok is set to true if the
+ user clicked OK, and false if the user clicked Cancel.
This static function is less functional than the full TQFontDialog
object, but is convenient and easy to use.
@@ -404,7 +404,7 @@ TQFont TQFontDialog::getFont( bool *ok, const TQFont *def,
if ( def )
result = *def;
- TQFontDialog *dlg = new TQFontDialog( parent, name, TRUE );
+ TQFontDialog *dlg = new TQFontDialog( parent, name, true );
dlg->setFont( ( def ? *def : TQFont() ) );
#ifndef TQT_NO_WIDGET_TOPEXTRA
@@ -444,12 +444,12 @@ bool TQFontDialog::eventFilter( TQObject * o , TQEvent * e )
if ( ci != d->sizeList->currentItem() &&
style().styleHint(TQStyle::SH_FontDialog_SelectAssociatedText, this))
d->sizeEdit->selectAll();
- return TRUE;
+ return true;
} else if ( ( o == d->familyList || o == d->styleList ) &&
( k->key() == Key_Return || k->key() == Key_Enter) ) {
k->accept();
accept();
- return TRUE;
+ return true;
}
} else if ( e->type() == TQEvent::FocusIn &&
style().styleHint(TQStyle::SH_FontDialog_SelectAssociatedText, this) ) {
@@ -522,7 +522,7 @@ void TQListBoxFontText::paint( TQPainter *painter )
void TQFontDialog::updateFamilies()
{
- d->familyList->blockSignals( TRUE );
+ d->familyList->blockSignals( true );
enum match_t { MATCH_NONE=0, MATCH_LAST_RESORT=1, MATCH_APP=2, MATCH_FALLBACK, MATCH_FAMILY=3 };
@@ -598,7 +598,7 @@ void TQFontDialog::updateFamilies()
d->familyList->hasFocus() )
d->familyEdit->selectAll();
- d->familyList->blockSignals( FALSE );
+ d->familyList->blockSignals( false );
updateStyles();
}
@@ -610,7 +610,7 @@ void TQFontDialog::updateFamilies()
void TQFontDialog::updateStyles()
{
- d->styleList->blockSignals( TRUE );
+ d->styleList->blockSignals( true );
d->styleList->clear();
@@ -618,30 +618,30 @@ void TQFontDialog::updateStyles()
if ( styles.isEmpty() ) {
d->styleEdit->clear();
- d->smoothScalable = FALSE;
+ d->smoothScalable = false;
} else {
d->styleList->insertStringList( styles );
if ( !d->style.isEmpty() ) {
- bool found = FALSE;
- bool first = TRUE;
+ bool found = false;
+ bool first = true;
TQString cstyle = d->style;
redo:
for ( int i = 0 ; i < (int)d->styleList->count() ; i++ ) {
if ( cstyle == d->styleList->text(i) ) {
d->styleList->setCurrentItem( i );
- found = TRUE;
+ found = true;
break;
}
}
if (!found && first) {
if (cstyle.contains("Italic")) {
cstyle.replace("Italic", "Oblique");
- first = FALSE;
+ first = false;
goto redo;
} else if (cstyle.contains("Oblique")) {
cstyle.replace("Oblique", "Italic");
- first = FALSE;
+ first = false;
goto redo;
}
}
@@ -657,7 +657,7 @@ void TQFontDialog::updateStyles()
d->smoothScalable = d->fdb.isSmoothlyScalable( d->familyList->currentText(), d->styleList->currentText() );
}
- d->styleList->blockSignals( FALSE );
+ d->styleList->blockSignals( false );
updateSizes();
}
@@ -670,7 +670,7 @@ void TQFontDialog::updateStyles()
void TQFontDialog::updateSizes()
{
- d->sizeList->blockSignals( TRUE );
+ d->sizeList->blockSignals( true );
d->sizeList->clear();
@@ -678,12 +678,12 @@ void TQFontDialog::updateSizes()
TQValueList<int> sizes = d->fdb.pointSizes( d->familyList->currentText(), d->styleList->currentText() );
int i = 0;
- bool found = FALSE;
+ bool found = false;
for( TQValueList<int>::iterator it = sizes.begin() ; it != sizes.end(); ++it ) {
d->sizeList->insertItem( TQString::number( *it ) );
if ( !found && *it >= d->size ) {
d->sizeList->setCurrentItem( i );
- found = TRUE;
+ found = true;
}
++i;
}
@@ -692,17 +692,17 @@ void TQFontDialog::updateSizes()
d->sizeList->setCurrentItem( d->sizeList->count() - 1 );
}
- d->sizeEdit->blockSignals( TRUE );
+ d->sizeEdit->blockSignals( true );
d->sizeEdit->setText( ( d->smoothScalable ? TQString::number( d->size ) : d->sizeList->currentText() ) );
if ( style().styleHint(TQStyle::SH_FontDialog_SelectAssociatedText, this) &&
d->sizeList->hasFocus() )
d->sizeEdit->selectAll();
- d->sizeEdit->blockSignals( FALSE );
+ d->sizeEdit->blockSignals( false );
} else {
d->sizeEdit->clear();
}
- d->sizeList->blockSignals( FALSE );
+ d->sizeList->blockSignals( false );
updateSample();
}
@@ -792,9 +792,9 @@ void TQFontDialog::sizeChanged( const TQString &s )
if ( d->sizeList->text(i).toInt() >= d->size )
break;
}
- d->sizeList->blockSignals( TRUE );
+ d->sizeList->blockSignals( true );
d->sizeList->setCurrentItem( i );
- d->sizeList->blockSignals( FALSE );
+ d->sizeList->blockSignals( false );
}
updateSample();
}
diff --git a/src/dialogs/tqfontdialog.h b/src/dialogs/tqfontdialog.h
index bb19b7676..178781ee7 100644
--- a/src/dialogs/tqfontdialog.h
+++ b/src/dialogs/tqfontdialog.h
@@ -75,7 +75,7 @@ private:
static TQFont getFont( bool *ok, const TQFont *def,
TQWidget* parent=0, const char* name=0);
- TQFontDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE,
+ TQFontDialog( TQWidget* parent=0, const char* name=0, bool modal=false,
WFlags f=0 );
~TQFontDialog();
diff --git a/src/dialogs/tqinputdialog.cpp b/src/dialogs/tqinputdialog.cpp
index a58d9a2dc..fb1d0823b 100644
--- a/src/dialogs/tqinputdialog.cpp
+++ b/src/dialogs/tqinputdialog.cpp
@@ -118,7 +118,7 @@ public:
Constructs the dialog. The \a label is the text which is shown to the user
(it should tell the user what they are expected to enter). The \a parent
is the dialog's parent widget. The widget is called \a name. If \a
- modal is TRUE (the default) the dialog will be modal. The \a type
+ modal is true (the default) the dialog will be modal. The \a type
parameter is used to specify which type of dialog to construct.
\sa getText(), getInteger(), getDouble(), getItem()
@@ -142,14 +142,14 @@ TQInputDialog::TQInputDialog( const TQString &label, TQWidget* parent,
vbox->addWidget( d->stack );
d->lineEdit = new TQLineEdit( d->stack, "qt_inputdlg_le" );
d->spinBox = new TQSpinBox( d->stack, "qt_inputdlg_sb" );
- d->comboBox = new TQComboBox( FALSE, d->stack, "qt_inputdlg_cb" );
- d->editComboBox = new TQComboBox( TRUE, d->stack, "qt_inputdlg_editcb" );
+ d->comboBox = new TQComboBox( false, d->stack, "qt_inputdlg_cb" );
+ d->editComboBox = new TQComboBox( true, d->stack, "qt_inputdlg_editcb" );
TQHBoxLayout *hbox = new TQHBoxLayout( 6 );
vbox->addLayout( hbox, AlignRight );
d->ok = new TQPushButton( tr( "OK" ), this, "qt_ok_btn" );
- d->ok->setDefault( TRUE );
+ d->ok->setDefault( true );
TQPushButton *cancel = new TQPushButton( tr( "Cancel" ), this, "qt_cancel_btn" );
TQSize bs = d->ok->sizeHint().expandedTo( cancel->sizeHint() );
@@ -273,8 +273,8 @@ TQInputDialog::~TQInputDialog()
dialog. \a label is the text which is shown to the user (it should
say what should be entered). \a text is the default text which is
placed in the line edit. The \a mode is the echo mode the line edit
- will use. If \a ok is not-null \e *\a ok will be set to TRUE if the
- user pressed OK and to FALSE if the user pressed Cancel. The
+ will use. If \a ok is not-null \e *\a ok will be set to true if the
+ user pressed OK and to false if the user pressed Cancel. The
dialog's parent is \a parent; the dialog is called \a name. The
dialog will be modal.
@@ -302,7 +302,7 @@ TQString TQInputDialog::getText( const TQString &caption, const TQString &label,
{
TQInputDialog *dlg = new TQInputDialog( label, parent,
name ? name : "qt_inputdlg_gettext",
- TRUE, LineEdit );
+ true, LineEdit );
#ifndef TQT_NO_WIDGET_TOPEXTRA
dlg->setCaption( caption );
@@ -310,7 +310,7 @@ TQString TQInputDialog::getText( const TQString &caption, const TQString &label,
dlg->lineEdit()->setText( text );
dlg->lineEdit()->setEchoMode( mode );
- bool ok_ = FALSE;
+ bool ok_ = false;
TQString result;
ok_ = dlg->exec() == TQDialog::Accepted;
if ( ok )
@@ -332,8 +332,8 @@ TQString TQInputDialog::getText( const TQString &caption, const TQString &label,
and \a step is the amount by which the values change as the user
presses the arrow buttons to increment or decrement the value.
- If \a ok is not-null *\a ok will be set to TRUE if the user
- pressed OK and to FALSE if the user pressed Cancel. The dialog's
+ If \a ok is not-null *\a ok will be set to true if the user
+ pressed OK and to false if the user pressed Cancel. The dialog's
parent is \a parent; the dialog is called \a name. The dialog will
be modal.
@@ -360,7 +360,7 @@ int TQInputDialog::getInteger( const TQString &caption, const TQString &label,
{
TQInputDialog *dlg = new TQInputDialog( label, parent,
name ? name : "qt_inputdlg_getint",
- TRUE, SpinBox );
+ true, SpinBox );
#ifndef TQT_NO_WIDGET_TOPEXTRA
dlg->setCaption( caption );
#endif
@@ -368,7 +368,7 @@ int TQInputDialog::getInteger( const TQString &caption, const TQString &label,
dlg->spinBox()->setSteps( step, 0 );
dlg->spinBox()->setValue( value );
- bool ok_ = FALSE;
+ bool ok_ = false;
int result;
ok_ = dlg->exec() == TQDialog::Accepted;
if ( ok )
@@ -389,8 +389,8 @@ int TQInputDialog::getInteger( const TQString &caption, const TQString &label,
user may choose, and \a decimals is the maximum number of decimal
places the number may have.
- If \a ok is not-null \e *\a ok will be set to TRUE if the user
- pressed OK and to FALSE if the user pressed Cancel. The dialog's
+ If \a ok is not-null \e *\a ok will be set to true if the user
+ pressed OK and to false if the user pressed Cancel. The dialog's
parent is \a parent; the dialog is called \a name. The dialog will
be modal.
@@ -418,7 +418,7 @@ double TQInputDialog::getDouble( const TQString &caption, const TQString &label,
const char *name )
{
TQInputDialog dlg( label, parent,
- name ? name : "qt_inputdlg_getdbl", TRUE, LineEdit );
+ name ? name : "qt_inputdlg_getdbl", true, LineEdit );
#ifndef TQT_NO_WIDGET_TOPEXTRA
dlg.setCaption( caption );
#endif
@@ -438,17 +438,17 @@ double TQInputDialog::getDouble( const TQString &caption, const TQString &label,
bar of the dialog. \a label is the text which is shown to the user (it
should say what should be entered). \a list is the
string list which is inserted into the combobox, and \a current is the number
- of the item which should be the current item. If \a editable is TRUE
- the user can enter their own text; if \a editable is FALSE the user
+ of the item which should be the current item. If \a editable is true
+ the user can enter their own text; if \a editable is false the user
may only select one of the existing items.
- If \a ok is not-null \e *\a ok will be set to TRUE if the user
- pressed OK and to FALSE if the user pressed Cancel. The dialog's
+ If \a ok is not-null \e *\a ok will be set to true if the user
+ pressed OK and to false if the user pressed Cancel. The dialog's
parent is \a parent; the dialog is called \a name. The dialog will
be modal.
This function returns the text of the current item, or if \a
- editable is TRUE, the current text of the combobox.
+ editable is true, the current text of the combobox.
Use this static function like this:
@@ -457,7 +457,7 @@ double TQInputDialog::getDouble( const TQString &caption, const TQString &label,
lst << "First" << "Second" << "Third" << "Fourth" << "Fifth";
bool ok;
TQString res = TQInputDialog::getItem(
- "MyApp 3000", "Select an item:", lst, 1, TRUE, &ok,
+ "MyApp 3000", "Select an item:", lst, 1, true, &ok,
this );
if ( ok ) {
// user selected an item and pressed OK
@@ -471,7 +471,7 @@ TQString TQInputDialog::getItem( const TQString &caption, const TQString &label,
int current, bool editable,
bool *ok, TQWidget *parent, const char *name )
{
- TQInputDialog *dlg = new TQInputDialog( label, parent, name ? name : "qt_inputdlg_getitem", TRUE, editable ? EditableComboBox : ComboBox );
+ TQInputDialog *dlg = new TQInputDialog( label, parent, name ? name : "qt_inputdlg_getitem", true, editable ? EditableComboBox : ComboBox );
#ifndef TQT_NO_WIDGET_TOPEXTRA
dlg->setCaption( caption );
#endif
@@ -483,7 +483,7 @@ TQString TQInputDialog::getItem( const TQString &caption, const TQString &label,
dlg->comboBox()->setCurrentItem( current );
}
- bool ok_ = FALSE;
+ bool ok_ = false;
TQString result;
ok_ = dlg->exec() == TQDialog::Accepted;
if ( ok )
@@ -506,7 +506,7 @@ TQString TQInputDialog::getItem( const TQString &caption, const TQString &label,
void TQInputDialog::textChanged( const TQString &s )
{
- bool on = TRUE;
+ bool on = true;
if ( d->lineEdit->validator() ) {
TQString str = d->lineEdit->text();
diff --git a/src/dialogs/tqinputdialog.h b/src/dialogs/tqinputdialog.h
index 67434b3ae..0347efee9 100644
--- a/src/dialogs/tqinputdialog.h
+++ b/src/dialogs/tqinputdialog.h
@@ -61,7 +61,7 @@ private:
enum Type { LineEdit, SpinBox, ComboBox, EditableComboBox };
TQInputDialog( const TQString &label, TQWidget* parent=0, const char* name=0,
- bool modal = TRUE, Type type = LineEdit ); //### 4.0: widget flag!
+ bool modal = true, Type type = LineEdit ); //### 4.0: widget flag!
~TQInputDialog();
TQLineEdit *lineEdit() const;
@@ -83,7 +83,7 @@ public:
double minValue = -2147483647, double maxValue = 2147483647,
int decimals = 1, bool *ok = 0, TQWidget *parent = 0, const char *name = 0 );
static TQString getItem( const TQString &caption, const TQString &label, const TQStringList &list,
- int current = 0, bool editable = TRUE,
+ int current = 0, bool editable = true,
bool *ok = 0, TQWidget *parent = 0, const char *name = 0 );
private slots:
diff --git a/src/dialogs/tqmessagebox.cpp b/src/dialogs/tqmessagebox.cpp
index b90840cf7..436194325 100644
--- a/src/dialogs/tqmessagebox.cpp
+++ b/src/dialogs/tqmessagebox.cpp
@@ -483,7 +483,7 @@ const char * mb_texts[] = {
*/
TQMessageBox::TQMessageBox( TQWidget *parent, const char *name )
- : TQDialog( parent, name, TRUE, WStyle_Customize | WStyle_DialogBorder | WStyle_Title | WStyle_SysMenu )
+ : TQDialog( parent, name, true, WStyle_Customize | WStyle_DialogBorder | WStyle_Title | WStyle_SysMenu )
{
init( Ok, 0, 0 );
}
@@ -545,7 +545,7 @@ TQMessageBox::TQMessageBox( TQWidget *parent, const char *name )
modal dialog box. If \a parent is a widget, the message box
becomes modal relative to \a parent.
- If \a modal is TRUE the message box is modal; otherwise it
+ If \a modal is true the message box is modal; otherwise it
is modeless.
The \a parent, \a name, \a modal, and \a f arguments are passed to
@@ -674,10 +674,10 @@ void TQMessageBox::init( int button0, int button1, int button2 )
tr(mb_texts[mbd->button[i]]),
this, buttonName );
if ( mbd->defButton == i ) {
- mbd->pb[i]->setDefault( TRUE );
+ mbd->pb[i]->setDefault( true );
mbd->pb[i]->setFocus();
}
- mbd->pb[i]->setAutoDefault( TRUE );
+ mbd->pb[i]->setAutoDefault( true );
mbd->pb[i]->setFocusPolicy( TQWidget::StrongFocus );
connect( mbd->pb[i], TQ_SIGNAL(clicked()), TQ_SLOT(buttonClicked()) );
}
@@ -1116,7 +1116,7 @@ int TQMessageBox::information( TQWidget *parent,
#endif
TQMessageBox *mb = new TQMessageBox( caption, text, Information,
button0, button1, button2,
- parent, "qt_msgbox_information", TRUE,
+ parent, "qt_msgbox_information", true,
WDestructiveClose);
TQ_CHECK_PTR( mb );
return mb->exec();
@@ -1167,7 +1167,7 @@ int TQMessageBox::question( TQWidget *parent,
#endif
TQMessageBox *mb = new TQMessageBox( caption, text, Question,
button0, button1, button2,
- parent, "qt_msgbox_information", TRUE,
+ parent, "qt_msgbox_information", true,
WDestructiveClose);
TQ_CHECK_PTR( mb );
return mb->exec();
@@ -1219,7 +1219,7 @@ int TQMessageBox::warning( TQWidget *parent,
#endif
TQMessageBox *mb = new TQMessageBox( caption, text, Warning,
button0, button1, button2,
- parent, "qt_msgbox_warning", TRUE,
+ parent, "qt_msgbox_warning", true,
WDestructiveClose);
TQ_CHECK_PTR( mb );
return mb->exec();
@@ -1271,7 +1271,7 @@ int TQMessageBox::critical( TQWidget *parent,
#endif
TQMessageBox *mb = new TQMessageBox( caption, text, Critical,
button0, button1, button2,
- parent, "qt_msgbox_critical", TRUE,
+ parent, "qt_msgbox_critical", true,
WDestructiveClose);
TQ_CHECK_PTR( mb );
return mb->exec();
@@ -1302,7 +1302,7 @@ void TQMessageBox::about( TQWidget *parent, const TQString &caption,
TQMessageBox *mb = new TQMessageBox( caption, text,
Information,
Ok + Default, 0, 0,
- parent, "qt_msgbox_simple_about_box", TRUE,
+ parent, "qt_msgbox_simple_about_box", true,
WDestructiveClose);
TQ_CHECK_PTR( mb );
#ifndef TQT_NO_WIDGET_TOPEXTRA
@@ -1359,7 +1359,7 @@ static int textBox( TQWidget *parent, TQMessageBox::Icon severity,
TQMessageBox *mb = new TQMessageBox( caption, text, severity,
b[0], b[1], b[2],
- parent, "qt_msgbox_information", TRUE,
+ parent, "qt_msgbox_information", true,
TQt::WDestructiveClose);
TQ_CHECK_PTR( mb );
if ( button0Text.isEmpty() )
@@ -1616,9 +1616,9 @@ void TQMessageBox::aboutTQt( TQWidget *parent, const TQString &caption )
#endif
mb->setButtonText( 0, tr("OK") );
if ( mb->mbd && mb->mbd->pb[0] ) {
- mb->mbd->pb[0]->setAutoDefault( TRUE );
+ mb->mbd->pb[0]->setAutoDefault( true );
mb->mbd->pb[0]->setFocusPolicy( TQWidget::StrongFocus );
- mb->mbd->pb[0]->setDefault( TRUE );
+ mb->mbd->pb[0]->setDefault( true );
mb->mbd->pb[0]->setFocus();
}
mb->exec();
diff --git a/src/dialogs/tqmessagebox.h b/src/dialogs/tqmessagebox.h
index cb0933f81..86a96fc2d 100644
--- a/src/dialogs/tqmessagebox.h
+++ b/src/dialogs/tqmessagebox.h
@@ -67,7 +67,7 @@ public:
TQMessageBox( TQWidget* parent=0, const char* name=0 );
TQMessageBox( const TQString& caption, const TQString &text, Icon icon,
int button0, int button1, int button2,
- TQWidget* parent=0, const char* name=0, bool modal=TRUE,
+ TQWidget* parent=0, const char* name=0, bool modal=true,
WFlags f=WStyle_DialogBorder );
~TQMessageBox();
diff --git a/src/dialogs/tqprintdialog.cpp b/src/dialogs/tqprintdialog.cpp
index 8430f2cbc..4cd57a02c 100644
--- a/src/dialogs/tqprintdialog.cpp
+++ b/src/dialogs/tqprintdialog.cpp
@@ -251,11 +251,11 @@ static int parsePrintcap( TQListView * printers, const TQString& fileName )
line_ascii[1024] = '\0';
TQString printerDesc;
- bool atEnd = FALSE;
+ bool atEnd = false;
while ( !atEnd ) {
if ( printcap.atEnd() || printcap.readLine( line_ascii, 1024 ) <= 0 )
- atEnd = TRUE;
+ atEnd = true;
TQString line = line_ascii;
line = line.stripWhiteSpace();
if ( line.length() >= 1 && line[int(line.length()) - 1] == '\\' )
@@ -300,7 +300,7 @@ static void parseEtcLpPrinters( TQListView * printers )
TQString remote( TQString::fromLatin1("Remote:") );
TQString contentType( TQString::fromLatin1("Content types:") );
TQString printerHost;
- bool canPrintPostscript = FALSE;
+ bool canPrintPostscript = false;
if ( configuration.open( IO_ReadOnly ) ) {
while ( !configuration.atEnd() &&
configuration.readLine( line, 1024 ) > 0 ) {
@@ -331,7 +331,7 @@ static void parseEtcLpPrinters( TQListView * printers )
*e = '\0';
if ( !qstrcmp( p, "postscript" ) ||
!qstrcmp( p, "any" ) )
- canPrintPostscript = TRUE;
+ canPrintPostscript = true;
*e = s;
if ( s == ',' )
e++;
@@ -356,11 +356,11 @@ static char * parsePrintersConf( TQListView * printers, bool *found = 0 )
TQFile pc( TQString::fromLatin1("/etc/printers.conf") );
if ( !pc.open( IO_ReadOnly ) ) {
if ( found )
- *found = FALSE;
+ *found = false;
return 0;
}
if ( found )
- *found = TRUE;
+ *found = true;
char * line = new char[1025];
line[1024] = '\0';
@@ -519,7 +519,7 @@ static char *parseNsswitchPrintersEntry( TQListView * printers, char *line )
k++
char *defaultPrinter = 0;
- bool stop = FALSE;
+ bool stop = false;
int lastStatus = NotFound;
int k = 8;
@@ -698,7 +698,7 @@ static void parseSpoolInterface( TQListView * printers )
configFile.close();
printerType = printerType.stripWhiteSpace();
- if ( printerType.find("postscript", 0, FALSE) < 0 )
+ if ( printerType.find("postscript", 0, false) < 0 )
continue;
int ii = 0;
@@ -732,7 +732,7 @@ static void parseQconfig( TQListView * printers )
TQString line;
TQString stanzaName; // either a queue or a device name
- bool up = TRUE; // queue up? default TRUE, can be FALSE
+ bool up = true; // queue up? default true, can be false
TQString remoteHost; // null if local
TQString deviceName; // null if remote
@@ -776,7 +776,7 @@ static void parseQconfig( TQListView * printers )
line.truncate( line.length()-1 );
if ( line.length() >= 1 && line.length() <= 20 )
stanzaName = line;
- up = TRUE;
+ up = true;
remoteHost = TQString::null;
deviceName = TQString::null;
} else {
@@ -865,7 +865,7 @@ static void qpd_cleanup_globaldialog()
*/
TQPrintDialog::TQPrintDialog( TQPrinter *prn, TQWidget *parent, const char *name )
- : TQDialog( parent, name, TRUE )
+ : TQDialog( parent, name, true )
{
d = new TQPrintDialogPrivate;
d->numCopies = 1;
@@ -917,7 +917,7 @@ TQPrintDialog::TQPrintDialog( TQPrinter *prn, TQWidget *parent, const char *name
d->ok = new TQPushButton( this, "ok" );
d->ok->setText( tr("OK") );
- d->ok->setDefault( TRUE );
+ d->ok->setDefault( true );
horiz->addWidget( d->ok );
if (! rightalign)
horiz->addStretch( 1 );
@@ -948,7 +948,7 @@ TQPrintDialog::TQPrintDialog( TQPrinter *prn, TQWidget *parent, const char *name
ms.setHeight( 460 );
resize( ms );
- setPrinter( prn, TRUE );
+ setPrinter( prn, true );
d->printers->setFocus();
}
@@ -1000,7 +1000,7 @@ TQGroupBox * TQPrintDialog::setupPrinterSettings()
rb = new TQRadioButton( tr( "Print in color if available" ),
g, "color" );
d->colorMode->insert( rb, TQPrinter::Color );
- rb->setChecked( TRUE );
+ rb->setChecked( true );
rb = new TQRadioButton( tr("Print in grayscale"),
g, "graysacle" );
@@ -1026,15 +1026,15 @@ TQGroupBox * TQPrintDialog::setupDestination()
"printer" );
tll->addWidget( rb );
d->printerOrFile->insert( rb, 0 );
- rb->setChecked( TRUE );
- d->outputToFile = FALSE;
+ rb->setChecked( true );
+ d->outputToFile = false;
TQBoxLayout * horiz = new TQBoxLayout( TQBoxLayout::LeftToRight );
tll->addLayout( horiz, 3 );
horiz->addSpacing( 19 );
d->printers = new TQListView( g, "list of printers" );
- d->printers->setAllColumnsShowFocus( TRUE );
+ d->printers->setAllColumnsShowFocus( true );
d->printers->addColumn( tr("Printer"), 125 );
d->printers->addColumn( tr("Host"), 125 );
d->printers->addColumn( tr("Comment"), 150 );
@@ -1135,7 +1135,7 @@ TQGroupBox * TQPrintDialog::setupDestination()
}
if ( d->printers->currentItem() )
- d->printers->setSelected( d->printers->currentItem(), TRUE );
+ d->printers->setSelected( d->printers->currentItem(), true );
if ( etcLpDefault ) // Avoid purify complaint
delete[] etcLpDefault;
@@ -1166,16 +1166,16 @@ TQGroupBox * TQPrintDialog::setupDestination()
horiz->addWidget( d->fileName, 1 );
horiz->addSpacing( 6 );
d->browse = new TQPushButton( tr("Browse..."), g, "browse files" );
- d->browse->setAutoDefault( FALSE );
+ d->browse->setAutoDefault( false );
#ifdef TQT_NO_FILEDIALOG
- d->browse->setEnabled( FALSE );
+ d->browse->setEnabled( false );
#endif
connect( d->browse, TQ_SIGNAL(clicked()),
this, TQ_SLOT(browseClicked()) );
horiz->addWidget( d->browse );
- d->fileName->setEnabled( FALSE );
- d->browse->setEnabled( FALSE );
+ d->fileName->setEnabled( false );
+ d->browse->setEnabled( false );
tll->activate();
@@ -1253,7 +1253,7 @@ TQGroupBox * TQPrintDialog::setupOptions()
g, "first page first" );
tll->addWidget( rb );
d->pageOrder->insert( rb, TQPrinter::FirstPageFirst );
- rb->setChecked( TRUE );
+ rb->setChecked( true );
rb = new TQRadioButton( tr("Print last page first"),
g, "last page first" );
@@ -1308,7 +1308,7 @@ TQGroupBox * TQPrintDialog::setupPaper()
d->pageSize = TQPrinter::A4;
// page orientation
- d->orientationCombo = new TQComboBox( FALSE, g );
+ d->orientationCombo = new TQComboBox( false, g );
d->orientationCombo->insertItem( tr( "Portrait" ), -1 );
d->orientationCombo->insertItem( tr( "Landscape" ), -1 );
@@ -1320,7 +1320,7 @@ TQGroupBox * TQPrintDialog::setupPaper()
this, TQ_SLOT( orientSelected(int) ) );
// paper size
- d->sizeCombo = new TQComboBox( FALSE, g );
+ d->sizeCombo = new TQComboBox( false, g );
int n;
for( n=0; n<TQPrinter::NPageSize; n++ )
@@ -1366,8 +1366,8 @@ TQGroupBox * TQPrintDialog::setupPaper()
/*!
Display a dialog and allow the user to configure the TQPrinter \a
- p for an optional widget \a w. Returns TRUE if the user clicks OK or
- presses Enter, FALSE if the user clicks Cancel or presses Esc.
+ p for an optional widget \a w. Returns true if the user clicks OK or
+ presses Enter, false if the user clicks Cancel or presses Esc.
getPrinterSetup() remembers the settings and provides the same
settings the next time the dialog is shown.
@@ -1381,10 +1381,10 @@ bool TQPrintDialog::getPrinterSetup( TQPrinter * p, TQWidget* w )
globalPrintDialog->setCaption( TQPrintDialog::tr( "Setup Printer" ) );
#endif
tqAddPostRoutine( qpd_cleanup_globaldialog );
- globalPrintDialog->setPrinter( p, TRUE );
+ globalPrintDialog->setPrinter( p, true );
globalPrintDialog->adjustSize();
} else {
- globalPrintDialog->setPrinter( p, TRUE );
+ globalPrintDialog->setPrinter( p, true );
}
globalPrintDialog->adjustPosition( w );
#ifndef TQT_NO_WIDGET_TOPEXTRA
@@ -1408,9 +1408,9 @@ bool TQPrintDialog::getPrinterSetup( TQPrinter * p, TQWidget* w )
void TQPrintDialog::printerOrFileSelected( int id )
{
- d->outputToFile = id ? TRUE : FALSE;
+ d->outputToFile = (id != 0);
if ( d->outputToFile ) {
- d->ok->setEnabled( TRUE );
+ d->ok->setEnabled( true );
fileNameEditChanged( d->fileName->text() );
if ( !d->fileName->edited() && d->fileName->text().isEmpty() ) {
TQString home = TQString::fromLatin1( ::getenv( "HOME" ) );
@@ -1428,17 +1428,17 @@ void TQPrintDialog::printerOrFileSelected( int id )
d->fileName->setCursorPosition( cur.length() );
d->fileName->selectAll();
}
- d->browse->setEnabled( TRUE );
- d->fileName->setEnabled( TRUE );
+ d->browse->setEnabled( true );
+ d->fileName->setEnabled( true );
d->fileName->setFocus();
- d->printers->setEnabled( FALSE );
+ d->printers->setEnabled( false );
} else {
d->ok->setEnabled( d->printers->childCount() != 0 );
- d->printers->setEnabled( TRUE );
+ d->printers->setEnabled( true );
if ( d->fileName->hasFocus() || d->browse->hasFocus() )
d->printers->setFocus();
- d->browse->setEnabled( FALSE );
- d->fileName->setEnabled( FALSE );
+ d->browse->setEnabled( false );
+ d->fileName->setEnabled( false );
}
}
@@ -1490,10 +1490,10 @@ void TQPrintDialog::okClicked()
d->firstPage->interpretText();
d->copies->interpretText();
if ( d->outputToFile ) {
- d->printer->setOutputToFile( TRUE );
+ d->printer->setOutputToFile( true );
d->printer->setOutputFileName( d->fileName->text() );
} else {
- d->printer->setOutputToFile( FALSE );
+ d->printer->setOutputToFile( false );
TQListViewItem * l = d->printers->currentItem();
if ( l )
d->printer->setPrinterName( l->text( 0 ) );
@@ -1521,7 +1521,7 @@ void TQPrintDialog::okClicked()
void TQPrintDialog::printRangeSelected( int id )
{
- bool enable = id == 2 ? TRUE : FALSE;
+ bool enable = (id == 2);
d->firstPage->setEnabled( enable );
d->lastPage->setEnabled( enable );
d->firstPageLabel->setEnabled( enable );
@@ -1545,8 +1545,8 @@ void TQPrintDialog::setLastPage( int lp )
/*!
Sets this dialog to configure printer \a p, or no printer if \a p
- is null. If \a pickUpSettings is TRUE, the dialog reads most of
- its settings from \a p. If \a pickUpSettings is FALSE (the
+ is null. If \a pickUpSettings is true, the dialog reads most of
+ its settings from \a p. If \a pickUpSettings is false (the
default) the dialog keeps its old settings.
*/
@@ -1566,8 +1566,8 @@ void TQPrintDialog::setPrinter( TQPrinter * p, bool pickUpSettings )
while ( i && i->text( 0 ) != p->printerName() )
i = i->nextSibling();
if ( i ) {
- d->printers->setSelected( i, TRUE );
- d->ok->setEnabled( TRUE );
+ d->printers->setSelected( i, true );
+ d->ok->setEnabled( true );
} else if ( d->fileName->text().isEmpty() ) {
d->ok->setEnabled( d->printers->childCount() != 0 );
}
@@ -1607,7 +1607,7 @@ void TQPrintDialog::setPrinter( TQPrinter * p, bool pickUpSettings )
}
if( p ) {
- d->printAllButton->setEnabled( TRUE );
+ d->printAllButton->setEnabled( true );
d->printSelectionButton
->setEnabled( d->printer->isOptionEnabled( TQPrinter::PrintSelection ) );
d->printRangeButton
@@ -1616,15 +1616,15 @@ void TQPrintDialog::setPrinter( TQPrinter * p, bool pickUpSettings )
TQPrinter::PrintRange range = p->printRange();
switch ( range ) {
case TQPrinter::AllPages:
- d->printAllButton->setChecked(TRUE);
+ d->printAllButton->setChecked(true);
printRangeSelected( d->printRange->id( d->printAllButton ) );
break;
case TQPrinter::Selection:
- d->printSelectionButton->setChecked(TRUE);
+ d->printSelectionButton->setChecked(true);
printRangeSelected( d->printRange->id( d->printSelectionButton ) );
break;
case TQPrinter::PageRange:
- d->printRangeButton->setChecked(TRUE);
+ d->printRangeButton->setChecked(true);
printRangeSelected( d->printRange->id( d->printRangeButton ) );
break;
}
diff --git a/src/dialogs/tqprintdialog.h b/src/dialogs/tqprintdialog.h
index 29824416a..fa7ef36bb 100644
--- a/src/dialogs/tqprintdialog.h
+++ b/src/dialogs/tqprintdialog.h
@@ -61,7 +61,7 @@ public:
static bool getPrinterSetup( TQPrinter *, TQWidget* = 0 );
static void setGlobalPrintDialog( TQPrintDialog * );
- void setPrinter( TQPrinter *, bool = FALSE );
+ void setPrinter( TQPrinter *, bool = false );
TQPrinter * printer() const;
void addButton( TQPushButton *but );
diff --git a/src/dialogs/tqprogressdialog.cpp b/src/dialogs/tqprogressdialog.cpp
index 262dbd85b..4f4319827 100644
--- a/src/dialogs/tqprogressdialog.cpp
+++ b/src/dialogs/tqprogressdialog.cpp
@@ -75,8 +75,8 @@ public:
label( new TQLabel(labelText,that,"label") ),
cancel( 0 ),
bar( new TQProgressBar(totalSteps,that,"bar") ),
- shown_once( FALSE ),
- cancellation_flag( FALSE ),
+ shown_once( false ),
+ cancellation_flag( false ),
showTime( defaultShowTime )
{
label->setAlignment(that->style().styleHint(TQStyle::SH_ProgressDialog_TextLabelAlignment, that));
@@ -140,7 +140,7 @@ public:
for cancellation with wasCanceled(). For example:
\code
TQProgressDialog progress( "Copying files...", "Abort Copy", numFiles,
- this, "progress", TRUE );
+ this, "progress", true );
for ( int i = 0; i < numFiles; i++ ) {
progress.setProgress( i );
tqApp->processEvents();
@@ -238,9 +238,9 @@ TQProgressBar *TQProgressDialog::bar() const
The \a creator argument is the widget to use as the dialog's parent.
The \a name, \a modal, and the widget flags, \a f, are
- passed to the TQDialog::TQDialog() constructor. If \a modal is FALSE (the
+ passed to the TQDialog::TQDialog() constructor. If \a modal is false (the
default), you must have an event loop proceeding for any redrawing
- of the dialog to occur. If \a modal is TRUE, the dialog ensures that
+ of the dialog to occur. If \a modal is true, the dialog ensures that
events are processed when needed.
\sa setLabelText(), setLabel(), setCancelButtonText(), setCancelButton(),
@@ -271,9 +271,9 @@ TQProgressDialog::TQProgressDialog( TQWidget *creator, const char *name,
The \a creator argument is the widget to use as the dialog's parent.
The \a name, \a modal, and widget flags, \a f, are passed to the
- TQDialog::TQDialog() constructor. If \a modal is FALSE (the default),
+ TQDialog::TQDialog() constructor. If \a modal is false (the default),
you will must have an event loop proceeding for any redrawing of
- the dialog to occur. If \a modal is TRUE, the dialog ensures that
+ the dialog to occur. If \a modal is true, the dialog ensures that
events are processed when needed.
@@ -310,9 +310,9 @@ void TQProgressDialog::init( TQWidget *creator,
int totstps)
{
d = new TQProgressDialogData(this, creator, lbl, totstps);
- d->autoClose = TRUE;
- d->autoReset = TRUE;
- d->forceHide = FALSE;
+ d->autoClose = true;
+ d->autoReset = true;
+ d->forceHide = false;
setCancelButtonText( canc );
connect( this, TQ_SIGNAL(canceled()), this, TQ_SIGNAL(cancelled()) );
connect( this, TQ_SIGNAL(canceled()), this, TQ_SLOT(cancel()) );
@@ -355,7 +355,7 @@ void TQProgressDialog::setLabel( TQLabel *label )
if ( label->parentWidget() == this ) {
label->hide(); // until we resize
} else {
- label->reparent( this, 0, TQPoint(0,0), FALSE );
+ label->reparent( this, 0, TQPoint(0,0), false );
}
}
int w = TQMAX( isVisible() ? width() : 0, sizeHint().width() );
@@ -408,7 +408,7 @@ void TQProgressDialog::setCancelButton( TQPushButton *cancelButton )
if ( cancelButton->parentWidget() == this ) {
cancelButton->hide(); // until we resize
} else {
- cancelButton->reparent( this, 0, TQPoint(0,0), FALSE );
+ cancelButton->reparent( this, 0, TQPoint(0,0), false );
}
connect( d->cancel, TQ_SIGNAL(clicked()), this, TQ_SIGNAL(canceled()) );
#ifndef TQT_NO_ACCEL
@@ -512,7 +512,7 @@ void TQProgressDialog::setTotalSteps( int totalSteps )
/*!
Resets the progress dialog.
- The progress dialog becomes hidden if autoClose() is TRUE.
+ The progress dialog becomes hidden if autoClose() is true.
\sa setAutoClose(), setAutoReset()
*/
@@ -528,23 +528,23 @@ void TQProgressDialog::reset()
if ( d->autoClose || d->forceHide )
hide();
bar()->reset();
- d->cancellation_flag = FALSE;
- d->shown_once = FALSE;
+ d->cancellation_flag = false;
+ d->shown_once = false;
forceTimer->stop();
}
/*!
- Resets the progress dialog. wasCanceled() becomes TRUE until
+ Resets the progress dialog. wasCanceled() becomes true until
the progress dialog is reset.
The progress dialog becomes hidden.
*/
void TQProgressDialog::cancel()
{
- d->forceHide = TRUE;
+ d->forceHide = true;
reset();
- d->forceHide = FALSE;
- d->cancellation_flag = TRUE;
+ d->forceHide = false;
+ d->cancellation_flag = true;
}
/*!
@@ -596,7 +596,7 @@ void TQProgressDialog::setProgress( int progress )
bool need_show;
int elapsed = d->starttime.elapsed();
if ( elapsed >= d->showTime ) {
- need_show = TRUE;
+ need_show = true;
} else {
if ( elapsed > minWaitTime ) {
int estimate;
@@ -606,7 +606,7 @@ void TQProgressDialog::setProgress( int progress )
estimate = elapsed * (totalSteps() - progress) / progress;
need_show = estimate >= d->showTime;
} else {
- need_show = FALSE;
+ need_show = false;
}
}
if ( need_show ) {
@@ -614,7 +614,7 @@ void TQProgressDialog::setProgress( int progress )
int h = TQMAX( isVisible() ? height() : 0, sizeHint().height() );
resize( w, h );
show();
- d->shown_once = TRUE;
+ d->shown_once = true;
}
}
#ifdef TQ_WS_MACX
@@ -759,7 +759,7 @@ void TQProgressDialog::closeEvent( TQCloseEvent *e )
\property TQProgressDialog::autoReset
\brief whether the progress dialog calls reset() as soon as progress() equals totalSteps()
- The default is TRUE.
+ The default is true.
\sa setAutoClose()
*/
@@ -778,7 +778,7 @@ bool TQProgressDialog::autoReset() const
\property TQProgressDialog::autoClose
\brief whether the dialog gets hidden by reset()
- The default is TRUE.
+ The default is true.
\sa setAutoReset()
*/
@@ -819,7 +819,7 @@ void TQProgressDialog::forceShow()
return;
show();
- d->shown_once = TRUE;
+ d->shown_once = true;
}
diff --git a/src/dialogs/tqprogressdialog.h b/src/dialogs/tqprogressdialog.h
index 628d6de19..6f65a7425 100644
--- a/src/dialogs/tqprogressdialog.h
+++ b/src/dialogs/tqprogressdialog.h
@@ -66,11 +66,11 @@ class TQ_EXPORT TQProgressDialog : public TQDialog
TQ_PROPERTY( TQString labelText READ labelText WRITE setLabelText )
public:
- TQProgressDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE,
+ TQProgressDialog( TQWidget* parent=0, const char* name=0, bool modal=false,
WFlags f=0 );
TQProgressDialog( const TQString& labelText, const TQString &cancelButtonText,
int totalSteps, TQWidget* parent=0, const char* name=0,
- bool modal=FALSE, WFlags f=0 );
+ bool modal=false, WFlags f=0 );
~TQProgressDialog();
void setLabel( TQLabel * );
diff --git a/src/dialogs/tqtabdialog.cpp b/src/dialogs/tqtabdialog.cpp
index b312ccc64..c0ad02698 100644
--- a/src/dialogs/tqtabdialog.cpp
+++ b/src/dialogs/tqtabdialog.cpp
@@ -196,7 +196,7 @@ TQTabDialog::TQTabDialog( TQWidget *parent, const char *name, bool modal,
d->ok = new TQPushButton( this, "ok" );
TQ_CHECK_PTR( d->ok );
d->ok->setText( tr("OK") );
- d->ok->setDefault( TRUE );
+ d->ok->setDefault( true );
connect( d->ok, TQ_SIGNAL(clicked()),
this, TQ_SIGNAL(applyButtonPressed()) );
connect( d->ok, TQ_SIGNAL(clicked()),
@@ -242,8 +242,8 @@ void TQTabDialog::setFont( const TQFont & font )
/*!
- Returns TRUE if the tab dialog has a Defaults button; otherwise
- returns FALSE.
+ Returns true if the tab dialog has a Defaults button; otherwise
+ returns false.
\sa setDefaultButton() defaultButtonPressed() hasApplyButton()
hasCancelButton()
@@ -256,8 +256,8 @@ bool TQTabDialog::hasDefaultButton() const
/*!
- Returns TRUE if the tab dialog has a Help button; otherwise returns
- FALSE.
+ Returns true if the tab dialog has a Help button; otherwise returns
+ false.
\sa setHelpButton() helpButtonPressed() hasApplyButton()
hasCancelButton()
@@ -284,8 +284,8 @@ bool TQTabDialog::hasHelpButton() const
/*!
- Returns TRUE if the tab dialog has a Cancel button; otherwise
- returns FALSE.
+ Returns true if the tab dialog has a Cancel button; otherwise
+ returns false.
\sa setCancelButton() cancelButtonPressed() hasApplyButton()
hasDefaultButton()
@@ -322,8 +322,8 @@ bool TQTabDialog::hasCancelButton() const
/*!
- Returns TRUE if the tab dialog has an Apply button; otherwise
- returns FALSE.
+ Returns true if the tab dialog has an Apply button; otherwise
+ returns false.
\sa setApplyButton() applyButtonPressed() hasCancelButton()
hasDefaultButton()
@@ -336,8 +336,8 @@ bool TQTabDialog::hasApplyButton() const
/*!
- Returns TRUE if the tab dialog has an OK button; otherwise returns
- FALSE.
+ Returns true if the tab dialog has an OK button; otherwise returns
+ false.
\sa setOkButton() hasApplyButton() hasCancelButton()
hasDefaultButton()
@@ -543,11 +543,11 @@ void TQTabDialog::showPage( TQWidget * w )
/*! \obsolete
- Returns TRUE if the page with object name \a name is enabled and
- FALSE if it is disabled.
+ Returns true if the page with object name \a name is enabled and
+ false if it is disabled.
If \a name is 0 or not the name of any of the pages, isTabEnabled()
- returns FALSE.
+ returns false.
\sa setTabEnabled(), TQWidget::isEnabled()
*/
@@ -555,9 +555,9 @@ void TQTabDialog::showPage( TQWidget * w )
bool TQTabDialog::isTabEnabled( const char* name ) const
{
if ( !name )
- return FALSE;
+ return false;
TQObjectList * l
- = ((TQTabDialog *)this)->queryList( "TQWidget", name, FALSE, TRUE );
+ = ((TQTabDialog *)this)->queryList( "TQWidget", name, false, true );
if ( l && l->first() ) {
TQWidget * w;
while( l->current() ) {
@@ -572,7 +572,7 @@ bool TQTabDialog::isTabEnabled( const char* name ) const
}
}
delete l;
- return FALSE;
+ return false;
}
@@ -600,7 +600,7 @@ void TQTabDialog::setTabEnabled( const char* name, bool enable )
if ( !name )
return;
TQObjectList * l
- = ((TQTabDialog *)this)->queryList( "TQWidget", name, FALSE, TRUE );
+ = ((TQTabDialog *)this)->queryList( "TQWidget", name, false, true );
if ( l && l->first() ) {
TQObjectListIt it(*l);
TQObject *o;
@@ -632,7 +632,7 @@ void TQTabDialog::setTabEnabled( const char* name, bool enable )
/*!
- Returns TRUE if the page \a w is enabled; otherwise returns FALSE.
+ Returns true if the page \a w is enabled; otherwise returns false.
\sa setTabEnabled(), TQWidget::isEnabled()
*/
@@ -643,7 +643,7 @@ bool TQTabDialog::isTabEnabled( TQWidget* w ) const
}
/*!
- If \a enable is TRUE the page \a w is enabled; otherwise \a w is
+ If \a enable is true the page \a w is enabled; otherwise \a w is
disabled. The page's tab is redrawn appropriately.
TQTabWidget uses TQWidget::setEnabled() internally, rather than keeping a
diff --git a/src/dialogs/tqtabdialog.h b/src/dialogs/tqtabdialog.h
index 61e4287c6..de6d8bc2c 100644
--- a/src/dialogs/tqtabdialog.h
+++ b/src/dialogs/tqtabdialog.h
@@ -56,7 +56,7 @@ class TQ_EXPORT TQTabDialog : public TQDialog
{
TQ_OBJECT
public:
- TQTabDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE,
+ TQTabDialog( TQWidget* parent=0, const char* name=0, bool modal=false,
WFlags f=0 );
~TQTabDialog();
diff --git a/src/dialogs/tqwizard.cpp b/src/dialogs/tqwizard.cpp
index 78b7431b2..5e2ebaff8 100644
--- a/src/dialogs/tqwizard.cpp
+++ b/src/dialogs/tqwizard.cpp
@@ -112,9 +112,9 @@ public:
struct Page {
Page( TQWidget * widget, const TQString & title ):
w( widget ), t( title ),
- backEnabled( TRUE ), nextEnabled( TRUE ), finishEnabled( FALSE ),
- helpEnabled( TRUE ),
- appropriate( TRUE )
+ backEnabled( true ), nextEnabled( true ), finishEnabled( false ),
+ helpEnabled( true ),
+ appropriate( true )
{}
TQWidget * w;
TQString t;
@@ -168,7 +168,7 @@ TQWizard::TQWizard( TQWidget *parent, const char *name, bool modal,
d = new TQWizardPrivate();
d->current = 0; // not quite true, but...
d->ws = new TQWidgetStack( this, "qt_widgetstack" );
- d->pages.setAutoDelete( TRUE );
+ d->pages.setAutoDelete( true );
d->title = new TQLabel( this, "title label" );
// create in nice tab order
@@ -190,7 +190,7 @@ TQWizard::TQWizard( TQWidget *parent, const char *name, bool modal,
d->finishButton->setText( tr( "&Finish" ) );
d->helpButton->setText( tr( "&Help" ) );
- d->nextButton->setDefault( TRUE );
+ d->nextButton->setDefault( true );
connect( d->backButton, TQ_SIGNAL(clicked()),
this, TQ_SLOT(back()) );
@@ -273,7 +273,7 @@ void TQWizard::addPage( TQWidget * page, const TQString & title )
int i = d->pages.count();
if( i > 0 )
- d->pages.at( i - 1 )->nextEnabled = TRUE;
+ d->pages.at( i - 1 )->nextEnabled = true;
TQWizardPrivate::Page * p = new TQWizardPrivate::Page( page, title );
p->backEnabled = ( i > 0 );
@@ -304,7 +304,7 @@ void TQWizard::insertPage( TQWidget * page, const TQString & title, int index )
index = d->pages.count();
if( index > 0 && ( index == (int)d->pages.count() ) )
- d->pages.at( index - 1 )->nextEnabled = TRUE;
+ d->pages.at( index - 1 )->nextEnabled = true;
TQWizardPrivate::Page * p = new TQWizardPrivate::Page( page, title );
p->backEnabled = ( index > 0 );
@@ -337,7 +337,7 @@ void TQWizard::showPage( TQWidget * page )
if ( p ) {
int i;
for( i = 0; i < (int)d->pages.count() && d->pages.at( i ) != p; i++ );
- bool notFirst( FALSE );
+ bool notFirst( false );
if( i ) {
i--;
@@ -347,7 +347,7 @@ void TQWizard::showPage( TQWidget * page )
}
}
setBackEnabled( notFirst );
- setNextEnabled( TRUE );
+ setNextEnabled( true );
d->ws->raiseWidget( page );
d->current = p;
}
@@ -486,7 +486,7 @@ void TQWizard::setHelpEnabled( bool enable )
*/
/*!
- If \a enable is TRUE, page \a page has a Back button; otherwise \a
+ If \a enable is true, page \a page has a Back button; otherwise \a
page has no Back button. By default all pages have this button.
*/
void TQWizard::setBackEnabled( TQWidget * page, bool enable )
@@ -501,7 +501,7 @@ void TQWizard::setBackEnabled( TQWidget * page, bool enable )
/*!
- If \a enable is TRUE, page \a page has a Next button; otherwise
+ If \a enable is true, page \a page has a Next button; otherwise
the Next button on \a page is disabled. By default all pages have
this button.
*/
@@ -518,7 +518,7 @@ void TQWizard::setNextEnabled( TQWidget * page, bool enable )
/*!
- If \a enable is TRUE, page \a page has a Finish button; otherwise
+ If \a enable is true, page \a page has a Finish button; otherwise
\a page has no Finish button. By default \e no page has this
button.
*/
@@ -534,7 +534,7 @@ void TQWizard::setFinishEnabled( TQWidget * page, bool enable )
/*!
- If \a enable is TRUE, page \a page has a Help button; otherwise \a
+ If \a enable is true, page \a page has a Help button; otherwise \a
page has no Help button. By default all pages have this button.
*/
void TQWizard::setHelpEnabled( TQWidget * page, bool enable )
@@ -550,10 +550,10 @@ void TQWizard::setHelpEnabled( TQWidget * page, bool enable )
/*!
Called when the Next button is clicked; this virtual function
- returns TRUE if \a page is relevant for display in the current
- context; otherwise it is ignored by TQWizard and returns FALSE. The
+ returns true if \a page is relevant for display in the current
+ context; otherwise it is ignored by TQWizard and returns false. The
default implementation returns the value set using
- setAppropriate(). The ultimate default is TRUE.
+ setAppropriate(). The ultimate default is true.
\warning The last page of the wizard will be displayed if no page
is relevant in the current context.
@@ -562,12 +562,12 @@ void TQWizard::setHelpEnabled( TQWidget * page, bool enable )
bool TQWizard::appropriate( TQWidget * page ) const
{
TQWizardPrivate::Page * p = d->page( page );
- return p ? p->appropriate : TRUE;
+ return p ? p->appropriate : true;
}
/*!
- If \a appropriate is TRUE then page \a page is considered relevant
+ If \a appropriate is true then page \a page is considered relevant
in the current context and should be displayed in the page
sequence; otherwise \a page should not be displayed in the page
sequence.
@@ -589,7 +589,7 @@ void TQWizard::updateButtons()
int i;
for( i = 0; i < (int)d->pages.count() && d->pages.at( i ) != d->current; i++ );
- bool notFirst( FALSE );
+ bool notFirst( false );
if( i ) {
i--;
while( ( i >= 0 ) && !notFirst ) {
@@ -736,19 +736,19 @@ TQPushButton * TQWizard::helpButton() const
void TQWizard::layOutButtonRow( TQHBoxLayout * layout )
{
- bool hasHelp = FALSE;
- bool hasEarlyFinish = FALSE;
+ bool hasHelp = false;
+ bool hasEarlyFinish = false;
int i = d->pages.count() - 2;
while ( !hasEarlyFinish && i >= 0 ) {
if ( d->pages.at( i ) && d->pages.at( i )->finishEnabled )
- hasEarlyFinish = TRUE;
+ hasEarlyFinish = true;
i--;
}
i = 0;
while ( !hasHelp && i < (int)d->pages.count() ) {
if ( d->pages.at( i ) && d->pages.at( i )->helpEnabled )
- hasHelp = TRUE;
+ hasHelp = true;
i++;
}
@@ -767,7 +767,7 @@ void TQWizard::layOutButtonRow( TQHBoxLayout * layout )
h->addSpacing( 6 );
if (d->current == d->pages.at( d->pages.count()-1 ))
- hasEarlyFinish = FALSE;
+ hasEarlyFinish = false;
if ( hasEarlyFinish ) {
d->nextButton->show();
diff --git a/src/dialogs/tqwizard.h b/src/dialogs/tqwizard.h
index c680e2860..b9bb060f1 100644
--- a/src/dialogs/tqwizard.h
+++ b/src/dialogs/tqwizard.h
@@ -57,7 +57,7 @@ class TQ_EXPORT TQWizard : public TQDialog
TQ_PROPERTY( TQFont titleFont READ titleFont WRITE setTitleFont )
public:
- TQWizard( TQWidget* parent=0, const char* name=0, bool modal=FALSE,
+ TQWizard( TQWidget* parent=0, const char* name=0, bool modal=false,
WFlags f=0 );
~TQWizard();
diff --git a/src/kernel/qdnd_x11.cpp b/src/kernel/qdnd_x11.cpp
index 57bdcffd4..4f6b54ba7 100644
--- a/src/kernel/qdnd_x11.cpp
+++ b/src/kernel/qdnd_x11.cpp
@@ -204,9 +204,9 @@ static Time qt_xdnd_target_current_time;
// screen number containing the pointer... -1 means default
static int qt_xdnd_current_screen = -1;
// state of dragging... true if dragging, false if not
-bool qt_xdnd_dragging = FALSE;
+bool qt_xdnd_dragging = false;
// need to check state of keyboard modifiers
-static bool need_modifiers_check = FALSE;
+static bool need_modifiers_check = false;
// dict of payload data, sorted by type atom
static TQIntDict<TQByteArray> * qt_xdnd_target_data = 0;
@@ -219,8 +219,8 @@ extern void qt_motifdnd_enable( TQWidget *, bool );
extern TQByteArray qt_motifdnd_obtain_data( const char *format );
extern const char *qt_motifdnd_format( int n );
-bool qt_motifdnd_active = FALSE;
-static bool dndCancelled = FALSE;
+bool qt_motifdnd_active = false;
+static bool dndCancelled = false;
// Shift/Ctrl handling, and final drop status
static TQDragObject::DragMode drag_mode;
@@ -324,7 +324,7 @@ static bool qt_xdnd_enable( TQWidget* w, bool on )
TQWidget * xdnd_widget = 0;
if ( w->isDesktop() ) {
if ( desktop_proxy ) // *WE* already have one.
- return FALSE;
+ return false;
// As per Xdnd4, use XdndProxy
XGrabServer( w->x11Display() );
@@ -375,9 +375,9 @@ static bool qt_xdnd_enable( TQWidget* w, bool on )
XChangeProperty ( xdnd_widget->x11Display(), xdnd_widget->winId(),
qt_xdnd_aware, XA_ATOM, 32, PropModeReplace,
(unsigned char *)&atm, 1 );
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
} else {
if ( w->isDesktop() ) {
@@ -386,7 +386,7 @@ static bool qt_xdnd_enable( TQWidget* w, bool on )
delete desktop_proxy;
desktop_proxy = 0;
}
- return TRUE;
+ return true;
}
}
@@ -399,7 +399,7 @@ const char* qt_xdnd_atom_to_str( Atom a )
if ( !qt_xdnd_drag_types ) {
qt_xdnd_drag_types = new TQIntDict<TQCString>( 17 );
- qt_xdnd_drag_types->setAutoDelete( TRUE );
+ qt_xdnd_drag_types->setAutoDelete( true );
}
TQCString* result;
if ( !(result=qt_xdnd_drag_types->find( a )) ) {
@@ -419,7 +419,7 @@ Atom* qt_xdnd_str_to_atom( const char *mimeType )
return 0;
if ( !qt_xdnd_atom_numbers ) {
qt_xdnd_atom_numbers = new TQDict<Atom>( 17 );
- qt_xdnd_atom_numbers->setAutoDelete( TRUE );
+ qt_xdnd_atom_numbers->setAutoDelete( true );
}
Atom * result;
@@ -492,9 +492,9 @@ static TQWidget * find_child( TQWidget * tlw, TQPoint & p )
TQWidget * w = tlw;
p = w->mapFromGlobal( p );
- bool done = FALSE;
+ bool done = false;
while ( !done ) {
- done = TRUE;
+ done = true;
if ( ((TQExtraWidget*)w)->extraData() &&
((TQExtraWidget*)w)->extraData()->xDndProxy != 0 )
break; // stop searching for widgets under the mouse cursor if found widget is a proxy.
@@ -509,7 +509,7 @@ static TQWidget * find_child( TQWidget * tlw, TQPoint & p )
((TQWidget*)o)->geometry().contains( p ) &&
!((TQWidget*)o)->isTopLevel()) {
w = (TQWidget *)o;
- done = FALSE;
+ done = false;
p = w->mapFromParent( p );
break;
}
@@ -523,7 +523,7 @@ static TQWidget * find_child( TQWidget * tlw, TQPoint & p )
static bool checkEmbedded(TQWidget* w, const XEvent* xe)
{
if (!w)
- return FALSE;
+ return false;
if (current_embedding_widget != 0 && current_embedding_widget != w) {
qt_xdnd_current_target = ((TQExtraWidget*)current_embedding_widget)->extraData()->xDndProxy;
@@ -549,10 +549,10 @@ static bool checkEmbedded(TQWidget* w, const XEvent* xe)
XSendEvent( TQPaintDevice::x11AppDisplay(), extra->xDndProxy, False, NoEventMask,
(XEvent*)xe );
qt_xdnd_current_widget = w;
- return TRUE;
+ return true;
}
current_embedding_widget = 0;
- return FALSE;
+ return false;
}
void qt_handle_xdnd_enter( TQWidget *, const XEvent * xe, bool /*passive*/ )
@@ -560,11 +560,11 @@ void qt_handle_xdnd_enter( TQWidget *, const XEvent * xe, bool /*passive*/ )
//if ( !w->neveHadAChildWithDropEventsOn() )
//return; // haven't been set up for dnd
- qt_motifdnd_active = FALSE;
+ qt_motifdnd_active = false;
last_enter_event.xclient = xe->xclient;
- qt_xdnd_target_answerwas = FALSE;
+ qt_xdnd_target_answerwas = false;
const long *l = xe->xclient.data.l;
int version = (int)(((unsigned long)(l[1])) >> 24);
@@ -650,7 +650,7 @@ void qt_handle_xdnd_position( TQWidget *w, const XEvent * xe, bool passive )
me.setAction(accepted_action);
if ( c != qt_xdnd_current_widget ) {
- qt_xdnd_target_answerwas = FALSE;
+ qt_xdnd_target_answerwas = false;
if ( qt_xdnd_current_widget ) {
TQDragLeaveEvent e;
TQApplication::sendEvent( qt_xdnd_current_widget, &e );
@@ -667,7 +667,7 @@ void qt_handle_xdnd_position( TQWidget *w, const XEvent * xe, bool passive )
if ( !de.isActionAccepted() ) // only as a copy (move if we del)
accepted_action = TQDropEvent::Copy;
else
- me.acceptAction(TRUE);
+ me.acceptAction(true);
} else {
me.ignore( de.answerRect() );
}
@@ -814,7 +814,7 @@ void qt_xdnd_send_leave()
w = 0;
if ( w )
- qt_handle_xdnd_leave( w, (const XEvent *)&leave, FALSE );
+ qt_handle_xdnd_leave( w, (const XEvent *)&leave, false );
else
XSendEvent( TQPaintDevice::x11AppDisplay(), qt_xdnd_current_proxy_target, False,
NoEventMask, (XEvent*)&leave );
@@ -862,7 +862,7 @@ void qt_handle_xdnd_drop( TQWidget *, const XEvent * xe, bool passive )
if ( !de.isAccepted() ) {
// Ignore a failed drag
global_accepted_action = TQDropEvent::Copy;
- dndCancelled = TRUE;
+ dndCancelled = true;
}
XClientMessageEvent finished;
finished.type = ClientMessage;
@@ -915,7 +915,7 @@ void TQDragManager::timerEvent( TQTimerEvent* e )
if( updateMode( (ButtonState)qt_x11_translateButtonState( mask )))
qt_xdnd_source_sameanswer = TQRect(); // force move
}
- need_modifiers_check = TRUE;
+ need_modifiers_check = true;
if( qt_xdnd_source_sameanswer.isNull() )
move( TQCursor::pos() );
}
@@ -968,17 +968,17 @@ bool TQDragManager::eventFilter( TQObject * o, TQEvent * e)
tqApp->removeEventFilter( this );
object = 0;
dragSource = 0;
- beingCancelled = FALSE;
+ beingCancelled = false;
tqApp->exit_loop();
- return TRUE; // block the key release
+ return true; // block the key release
}
- return FALSE;
+ return false;
}
Q_ASSERT( object != 0 );
if ( !o->isWidgetType() )
- return FALSE;
+ return false;
if ( e->type() == TQEvent::MouseMove ) {
TQMouseEvent* me = (TQMouseEvent *)e;
@@ -986,8 +986,8 @@ bool TQDragManager::eventFilter( TQObject * o, TQEvent * e)
updateMode(me->stateAfter());
move( me->globalPos() );
}
- need_modifiers_check = FALSE;
- return TRUE;
+ need_modifiers_check = false;
+ return true;
} else if ( e->type() == TQEvent::MouseButtonRelease ) {
tqApp->removeEventFilter( this );
if ( willDrop )
@@ -996,21 +996,21 @@ bool TQDragManager::eventFilter( TQObject * o, TQEvent * e)
cancel();
object = 0;
dragSource = 0;
- beingCancelled = FALSE;
+ beingCancelled = false;
tqApp->exit_loop();
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::DragResponse ) {
if ( ((TQDragResponseEvent *)e)->dragAccepted() ) {
if ( !willDrop ) {
- willDrop = TRUE;
+ willDrop = true;
}
} else {
if ( willDrop ) {
- willDrop = FALSE;
+ willDrop = false;
}
}
updateCursor();
- return TRUE;
+ return true;
}
if ( e->type() == TQEvent::KeyPress
@@ -1022,16 +1022,16 @@ bool TQDragManager::eventFilter( TQObject * o, TQEvent * e)
tqApp->removeEventFilter( this );
object = 0;
dragSource = 0;
- beingCancelled = FALSE;
+ beingCancelled = false;
tqApp->exit_loop();
} else {
if( updateMode(ke->stateAfter())) {
qt_xdnd_source_sameanswer = TQRect(); // force move
move( TQCursor::pos() );
}
- need_modifiers_check = FALSE;
+ need_modifiers_check = false;
}
- return TRUE; // Eat all key events
+ return true; // Eat all key events
}
// ### We bind modality to widgets, so we have to do this
@@ -1048,9 +1048,9 @@ bool TQDragManager::eventFilter( TQObject * o, TQEvent * e)
case TQEvent::Accel:
case TQEvent::AccelAvailable:
case TQEvent::AccelOverride:
- return TRUE;
+ return true;
default:
- return FALSE;
+ return false;
}
}
@@ -1125,7 +1125,7 @@ void TQDragManager::updateCursor()
}
#ifndef TQT_NO_CURSOR
if ( c )
- tqApp->setOverrideCursor( *c, TRUE );
+ tqApp->setOverrideCursor( *c, true );
#endif
}
@@ -1135,7 +1135,7 @@ void TQDragManager::cancel( bool deleteSource )
killTimer( heartbeat );
heartbeat = -1;
if ( object ) {
- beingCancelled = TRUE;
+ beingCancelled = true;
object = 0;
}
@@ -1146,7 +1146,7 @@ void TQDragManager::cancel( bool deleteSource )
#ifndef TQT_NO_CURSOR
if ( restoreCursor ) {
TQApplication::restoreOverrideCursor();
- restoreCursor = FALSE;
+ restoreCursor = false;
}
#endif
@@ -1156,7 +1156,7 @@ void TQDragManager::cancel( bool deleteSource )
delete qt_xdnd_deco;
qt_xdnd_deco = 0;
- dndCancelled = TRUE;
+ dndCancelled = true;
}
static
@@ -1382,7 +1382,7 @@ void TQDragManager::move( const TQPoint & globalPos )
globalPos.y() -2 , 5, 5 );
if ( w ) {
- qt_handle_xdnd_enter( w, (const XEvent *)&enter, FALSE );
+ qt_handle_xdnd_enter( w, (const XEvent *)&enter, false );
} else if ( target ) {
XSendEvent( TQPaintDevice::x11AppDisplay(), proxy_target, False, NoEventMask,
(XEvent*)&enter );
@@ -1404,13 +1404,13 @@ void TQDragManager::move( const TQPoint & globalPos )
move.data.l[4] = qtaction_to_xdndaction( global_requested_action );
if ( w )
- qt_handle_xdnd_position( w, (const XEvent *)&move, FALSE );
+ qt_handle_xdnd_position( w, (const XEvent *)&move, false );
else
XSendEvent( TQPaintDevice::x11AppDisplay(), proxy_target, False, NoEventMask,
(XEvent*)&move );
} else {
if ( willDrop ) {
- willDrop = FALSE;
+ willDrop = false;
updateCursor();
}
}
@@ -1444,7 +1444,7 @@ void TQDragManager::drop()
w = 0;
if ( w )
- qt_handle_xdnd_drop( w, (const XEvent *)&drop, FALSE );
+ qt_handle_xdnd_drop( w, (const XEvent *)&drop, false );
else
XSendEvent( TQPaintDevice::x11AppDisplay(), qt_xdnd_current_proxy_target, False,
NoEventMask, (XEvent*)&drop );
@@ -1452,7 +1452,7 @@ void TQDragManager::drop()
#ifndef TQT_NO_CURSOR
if ( restoreCursor ) {
TQApplication::restoreOverrideCursor();
- restoreCursor = FALSE;
+ restoreCursor = false;
}
#endif
}
@@ -1468,7 +1468,7 @@ bool qt_xdnd_handle_badwindow()
qt_xdnd_source_object = 0;
delete qt_xdnd_deco;
qt_xdnd_deco = 0;
- return TRUE;
+ return true;
}
if ( qt_xdnd_dragsource_xid ) {
qt_xdnd_dragsource_xid = 0;
@@ -1477,9 +1477,9 @@ bool qt_xdnd_handle_badwindow()
TQApplication::sendEvent( qt_xdnd_current_widget, &e );
qt_xdnd_current_widget = 0;
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -1501,8 +1501,8 @@ bool qt_xdnd_handle_badwindow()
/*!
- Returns TRUE if this event provides format \a mimeType; otherwise
- returns FALSE.
+ Returns true if this event provides format \a mimeType; otherwise
+ returns false.
\sa data()
*/
@@ -1510,17 +1510,17 @@ bool qt_xdnd_handle_badwindow()
bool TQDropEvent::provides( const char *mimeType ) const
{
if ( qt_motifdnd_active && tqstrnicmp( mimeType, "text/", 5 ) == 0 )
- return TRUE;
+ return true;
int n=0;
const char* f;
do {
f = format( n );
if ( !f )
- return FALSE;
+ return false;
n++;
} while( tqstricmp( mimeType, f ) );
- return TRUE;
+ return true;
}
void qt_xdnd_handle_selection_request( const XSelectionRequestEvent * req )
@@ -1608,14 +1608,14 @@ static TQByteArray qt_xdnd_obtain_data( const char *format )
if ( qt_xclb_read_property( TQPaintDevice::x11AppDisplay(),
tw->winId(),
- qt_xdnd_selection, TRUE,
- &result, 0, &type, 0, FALSE ) ) {
+ qt_xdnd_selection, true,
+ &result, 0, &type, 0, false ) ) {
if ( type == qt_incr_atom ) {
int nbytes = result.size() >= 4 ? *((int*)result.data()) : 0;
result = qt_xclb_read_incremental_property( TQPaintDevice::x11AppDisplay(),
tw->winId(),
qt_xdnd_selection,
- nbytes, FALSE );
+ nbytes, false );
} else if ( type != *a ) {
// (includes None) tqDebug( "TQt clipboard: unknown atom %ld", type);
}
@@ -1648,7 +1648,7 @@ bool qt_dnd_enable( TQWidget* w, bool on )
if ( on ) {
if ( ( (TQExtraWidget*)w)->topData()->dnd )
- return TRUE; // been there, done that
+ return true; // been there, done that
((TQExtraWidget*)w)->topData()->dnd = 1;
}
@@ -1734,12 +1734,12 @@ const char* TQDropEvent::format( int n ) const
bool TQDragManager::drag( TQDragObject * o, TQDragObject::DragMode mode )
{
if ( object == o || !o || !o->parent() )
- return FALSE;
+ return false;
if ( object ) {
cancel();
tqApp->removeEventFilter( this );
- beingCancelled = FALSE;
+ beingCancelled = false;
}
if ( qt_xdnd_source_object ) {
@@ -1772,7 +1772,7 @@ bool TQDragManager::drag( TQDragObject * o, TQDragObject::DragMode mode )
qt_xdnd_source_object->setTarget( 0 );
qt_xdnd_deco = new TQShapedPixmapWidget();
- willDrop = FALSE;
+ willDrop = false;
object = o;
updatePixmap();
@@ -1792,16 +1792,16 @@ bool TQDragManager::drag( TQDragObject * o, TQDragObject::DragMode mode )
qt_xdnd_source_sameanswer = TQRect();
move(TQCursor::pos());
heartbeat = startTimer(200);
- need_modifiers_check = FALSE;
+ need_modifiers_check = false;
#ifndef TQT_NO_CURSOR
tqApp->setOverrideCursor( arrowCursor );
- restoreCursor = TRUE;
+ restoreCursor = true;
updateCursor();
#endif
- dndCancelled = FALSE;
- qt_xdnd_dragging = TRUE;
+ dndCancelled = false;
+ qt_xdnd_dragging = true;
if (!TQWidget::mouseGrabber())
qt_xdnd_deco->grabMouse();
@@ -1817,7 +1817,7 @@ bool TQDragManager::drag( TQDragObject * o, TQDragObject::DragMode mode )
killTimer( heartbeat );
heartbeat = -1;
qt_xdnd_current_screen = -1;
- qt_xdnd_dragging = FALSE;
+ qt_xdnd_dragging = false;
return ((! dndCancelled) && // source del?
(global_accepted_action == TQDropEvent::Copy &&
diff --git a/src/kernel/tqabstractlayout.cpp b/src/kernel/tqabstractlayout.cpp
index cbace549d..094c21fa0 100644
--- a/src/kernel/tqabstractlayout.cpp
+++ b/src/kernel/tqabstractlayout.cpp
@@ -269,9 +269,9 @@ TQWidget * TQWidgetItem::widget()
}
/*!
- Returns TRUE if this layout's preferred height depends on its
- width; otherwise returns FALSE. The default implementation returns
- FALSE.
+ Returns true if this layout's preferred height depends on its
+ width; otherwise returns false. The default implementation returns
+ false.
Reimplement this function in layout managers that support height
for width.
@@ -280,7 +280,7 @@ TQWidget * TQWidgetItem::widget()
*/
bool TQLayoutItem::hasHeightForWidth() const
{
- return FALSE;
+ return false;
}
/*!
@@ -403,7 +403,7 @@ TQRect TQLayout::geometry() const
bool TQWidgetItem::hasHeightForWidth() const
{
if ( isEmpty() )
- return FALSE;
+ return false;
if ( wid->layout() )
return wid->layout()->hasHeightForWidth();
return wid->sizePolicy().hasHeightForWidth();
@@ -544,16 +544,16 @@ TQSize TQWidgetItem::sizeHint() const
}
/*!
- Returns TRUE because a spacer item never contains widgets.
+ Returns true because a spacer item never contains widgets.
*/
bool TQSpacerItem::isEmpty() const
{
- return TRUE;
+ return true;
}
/*!
- Returns TRUE if the widget has been hidden; otherwise returns
- FALSE.
+ Returns true if the widget has been hidden; otherwise returns
+ false.
*/
bool TQWidgetItem::isEmpty() const
{
@@ -611,7 +611,7 @@ TQLayout::TQLayout( TQWidget *parent, int margin, int spacing, const char *name
parent->name() );
parent->removeChild( this );
} else {
- topLevel = TRUE;
+ topLevel = true;
parent->installEventFilter( this );
setWidgetLayout( parent, this );
}
@@ -627,14 +627,14 @@ void TQLayout::init()
{
insideSpacing = 0;
outsideBorder = 0;
- topLevel = FALSE;
- enabled = TRUE;
- autoNewChild = FALSE;
- frozen = FALSE;
- activated = FALSE;
- marginImpl = FALSE;
- autoMinimum = FALSE;
- autoResizeMode = TRUE;
+ topLevel = false;
+ enabled = true;
+ autoNewChild = false;
+ frozen = false;
+ activated = false;
+ marginImpl = false;
+ autoMinimum = false;
+ autoResizeMode = true;
extraData = 0;
#ifndef TQT_NO_MENUBAR
menubar = 0;
@@ -717,8 +717,8 @@ TQLayout::TQLayout( int spacing, const char *name )
/*!
\fn bool TQLayout::isTopLevel () const
- Returns TRUE if this layout is a top-level layout, i.e. not a
- child of another layout; otherwise returns FALSE.
+ Returns true if this layout is a top-level layout, i.e. not a
+ child of another layout; otherwise returns false.
*/
/*!
@@ -784,12 +784,12 @@ TQWidget *TQLayout::mainWidget()
}
/*!
- Returns TRUE if this layout is empty. The default implementation
- returns FALSE.
+ Returns true if this layout is empty. The default implementation
+ returns false.
*/
bool TQLayout::isEmpty() const
{
- return FALSE; //### should check
+ return false; //### should check
}
/*!
@@ -821,17 +821,17 @@ void TQLayout::invalidate()
static bool removeWidgetRecursively( TQLayoutItem *lay, TQWidget *w )
{
- bool didSomething = FALSE;
+ bool didSomething = false;
TQLayoutIterator it = lay->iterator();
TQLayoutItem *child;
while ( (child = it.current()) != 0 ) {
if ( child->widget() == w ) {
it.deleteCurrent();
lay->invalidate(); // maybe redundant
- didSomething = TRUE;
+ didSomething = true;
} else if ( removeWidgetRecursively(child, w) ) {
lay->invalidate(); // maybe redundant
- didSomething = TRUE;
+ didSomething = true;
} else {
++it;
}
@@ -848,10 +848,10 @@ static bool removeWidgetRecursively( TQLayoutItem *lay, TQWidget *w )
bool TQLayout::eventFilter( TQObject *o, TQEvent *e )
{
if ( !enabled )
- return FALSE;
+ return false;
if ( !o->isWidgetType() )
- return FALSE;
+ return false;
switch ( e->type() ) {
case TQEvent::Resize:
@@ -1184,7 +1184,7 @@ bool TQLayout::activate()
{
invalidateRecursive( this );
if ( !topLevel )
- return FALSE;
+ return false;
TQWidget *mw = mainWidget();
if (!mw) {
@@ -1192,9 +1192,9 @@ bool TQLayout::activate()
tqWarning( "TQLayout::activate: %s \"%s\" does not have a main widget",
TQObject::className(), TQObject::name() );
#endif
- return FALSE;
+ return false;
}
- activated = TRUE;
+ activated = true;
TQSize s = mw->size();
TQSize ms;
int mbh = 0;
@@ -1237,7 +1237,7 @@ bool TQLayout::activate()
// ideally only if sizeHint() or sizePolicy() has changed
mw->updateGeometry();
- return TRUE;
+ return true;
}
/*!
@@ -1346,7 +1346,7 @@ bool TQLayout::activate()
TQSizePolicy::SizeType sizing types\endlink affect how the widget
is treated by the \link TQLayout layout engine\endlink.
- If \a hfw is TRUE, the preferred height of the widget is dependent
+ If \a hfw is true, the preferred height of the widget is dependent
on the width of the widget (for example, a TQLabel with line
wrapping).
@@ -1360,7 +1360,7 @@ bool TQLayout::activate()
sizing types \a hor and \a ver, and stretch factors \a horStretch
and \a verStretch.
- If \a hfw is TRUE, the preferred height of the widget is dependent on the
+ If \a hfw is true, the preferred height of the widget is dependent on the
width of the widget.
\sa horStretch() verStretch()
@@ -1385,8 +1385,8 @@ bool TQLayout::activate()
/*!
\fn bool TQSizePolicy::mayShrinkHorizontally() const
- Returns TRUE if the widget can sensibly be narrower than its
- sizeHint(); otherwise returns FALSE.
+ Returns true if the widget can sensibly be narrower than its
+ sizeHint(); otherwise returns false.
\sa mayShrinkVertically() mayGrowHorizontally()
*/
@@ -1394,8 +1394,8 @@ bool TQLayout::activate()
/*!
\fn bool TQSizePolicy::mayShrinkVertically() const
- Returns TRUE if the widget can sensibly be shorter than its
- sizeHint(); otherwise returns FALSE.
+ Returns true if the widget can sensibly be shorter than its
+ sizeHint(); otherwise returns false.
\sa mayShrinkHorizontally() mayGrowVertically()
*/
@@ -1403,8 +1403,8 @@ bool TQLayout::activate()
/*!
\fn bool TQSizePolicy::mayGrowHorizontally() const
- Returns TRUE if the widget can sensibly be wider than its
- sizeHint(); otherwise returns FALSE.
+ Returns true if the widget can sensibly be wider than its
+ sizeHint(); otherwise returns false.
\sa mayGrowVertically() mayShrinkHorizontally()
*/
@@ -1412,8 +1412,8 @@ bool TQLayout::activate()
/*!
\fn bool TQSizePolicy::mayGrowVertically() const
- Returns TRUE if the widget can sensibly be taller than its
- sizeHint(); otherwise returns FALSE.
+ Returns true if the widget can sensibly be taller than its
+ sizeHint(); otherwise returns false.
\sa mayGrowHorizontally() mayShrinkVertically()
*/
@@ -1450,8 +1450,8 @@ bool TQLayout::activate()
/*!
\fn bool TQSizePolicy::hasHeightForWidth() const
- Returns TRUE if the widget's preferred height depends on its
- width; otherwise returns FALSE.
+ Returns true if the widget's preferred height depends on its
+ width; otherwise returns false.
\sa setHeightForWidth()
*/
@@ -1506,8 +1506,8 @@ bool TQLayout::activate()
/*!
\fn bool TQSizePolicy::operator==( const TQSizePolicy &s ) const
- Returns TRUE if this policy is equal to \a s; otherwise returns
- FALSE.
+ Returns true if this policy is equal to \a s; otherwise returns
+ false.
\sa operator!=()
*/
@@ -1515,8 +1515,8 @@ bool TQLayout::activate()
/*!
\fn bool TQSizePolicy::operator!=( const TQSizePolicy &s ) const
- Returns TRUE if this policy is different from \a s; otherwise
- returns FALSE.
+ Returns true if this policy is different from \a s; otherwise
+ returns false.
\sa operator==()
*/
@@ -1713,24 +1713,24 @@ void TQLayout::setResizeMode( ResizeMode mode )
switch ( mode ) {
case Auto:
- frozen = FALSE;
- autoMinimum = FALSE;
- autoResizeMode = TRUE;
+ frozen = false;
+ autoMinimum = false;
+ autoResizeMode = true;
break;
case Fixed:
- frozen = TRUE;
- autoMinimum = FALSE;
- autoResizeMode = FALSE;
+ frozen = true;
+ autoMinimum = false;
+ autoResizeMode = false;
break;
case FreeResize:
- frozen = FALSE;
- autoMinimum = FALSE;
- autoResizeMode = FALSE;
+ frozen = false;
+ autoMinimum = false;
+ autoResizeMode = false;
break;
case Minimum:
- frozen = FALSE;
- autoMinimum = TRUE;
- autoResizeMode = FALSE;
+ frozen = false;
+ autoMinimum = true;
+ autoResizeMode = false;
}
if ( mainWidget() && mainWidget()->isVisible() )
activate();
@@ -1745,9 +1745,9 @@ TQLayout::ResizeMode TQLayout::resizeMode() const
/*!
\fn bool TQLayout::autoAdd() const
- Returns TRUE if this layout automatically grabs all new
+ Returns true if this layout automatically grabs all new
mainWidget()'s new children and adds them as defined by addItem();
- otherwise returns FALSE. This has effect only for top-level
+ otherwise returns false. This has effect only for top-level
layouts, i.e. layouts that are direct children of their
mainWidget().
@@ -1760,7 +1760,7 @@ TQLayout::ResizeMode TQLayout::resizeMode() const
*/
/*!
- If \a b is TRUE, auto-add is enabled; otherwise auto-add is
+ If \a b is true, auto-add is enabled; otherwise auto-add is
disabled.
\warning If auto-add is enabled, you cannot set stretch factors
@@ -1779,19 +1779,19 @@ void TQLayout::setAutoAdd( bool b )
/*!
\fn bool TQLayout::supportsMargin() const
- Returns TRUE if this layout supports \l TQLayout::margin on
- non-top-level layouts; otherwise returns FALSE.
+ Returns true if this layout supports \l TQLayout::margin on
+ non-top-level layouts; otherwise returns false.
\sa margin
*/
/*!
- Sets the value returned by supportsMargin(). If \a b is TRUE,
+ Sets the value returned by supportsMargin(). If \a b is true,
margin() handling is implemented by the subclass. If \a b is
- FALSE (the default), TQLayout will add margin() around top-level
+ false (the default), TQLayout will add margin() around top-level
layouts.
- If \a b is TRUE, margin handling needs to be implemented in
+ If \a b is true, margin handling needs to be implemented in
setGeometry(), maximumSize(), minimumSize(), sizeHint() and
heightForWidth().
@@ -1904,7 +1904,7 @@ void TQLayout::removeItem( TQLayoutItem *item )
}
/*!
- Enables this layout if \a enable is TRUE, otherwise disables it.
+ Enables this layout if \a enable is true, otherwise disables it.
An enabled layout adjusts dynamically to changes; a disabled
layout acts as if it did not exist.
@@ -1919,7 +1919,7 @@ void TQLayout::setEnabled( bool enable )
}
/*!
- Returns TRUE if the layout is enabled; otherwise returns FALSE.
+ Returns true if the layout is enabled; otherwise returns false.
\sa setEnabled()
*/
diff --git a/src/kernel/tqaccel.cpp b/src/kernel/tqaccel.cpp
index 6569aa8dc..af5b354f5 100644
--- a/src/kernel/tqaccel.cpp
+++ b/src/kernel/tqaccel.cpp
@@ -142,7 +142,7 @@
struct TQAccelItem { // internal accelerator item
TQAccelItem( const TQKeySequence &k, int i )
- { key=k; id=i; enabled=TRUE; signal=0; }
+ { key=k; id=i; enabled=true; signal=0; }
~TQAccelItem() { delete signal; }
int id;
TQKeySequence key;
@@ -206,15 +206,15 @@ bool TQ_EXPORT tqt_tryComposeUnicode( TQWidget* w, TQKeyEvent* e){
}
#ifdef TQ_WS_MAC
-static bool qt_accel_no_shortcuts = TRUE;
+static bool qt_accel_no_shortcuts = true;
#else
-static bool qt_accel_no_shortcuts = FALSE;
+static bool qt_accel_no_shortcuts = false;
#endif
void TQ_EXPORT tqt_setAccelAutoShortcuts(bool b) { qt_accel_no_shortcuts = b; }
/*
\internal
- Returns TRUE if the accel is in the current subwindow, else FALSE.
+ Returns true if the accel is in the current subwindow, else false.
*/
bool TQAccelManager::correctSubWindow( TQWidget* w, TQAccelPrivate* d ) {
#if !defined ( Q_OS_MACX )
@@ -222,7 +222,7 @@ bool TQAccelManager::correctSubWindow( TQWidget* w, TQAccelPrivate* d ) {
#else
if ( !d->watch || (!d->watch->isVisible() && !d->watch->inherits( "TQMenuBar" )) || !d->watch->isEnabled() )
#endif
- return FALSE;
+ return false;
TQWidget* tlw = w->topLevelWidget();
TQWidget* wtlw = d->watch->topLevelWidget();
@@ -233,21 +233,21 @@ bool TQAccelManager::correctSubWindow( TQWidget* w, TQAccelPrivate* d ) {
return tlw->parentWidget()->topLevelWidget() == wtlw;
if ( wtlw != tlw )
- return FALSE;
+ return false;
#endif
/* if we live in a MDI subwindow, ignore the event if we are
not the active document window */
TQWidget* sw = d->watch;
while ( sw && !sw->testWFlags( WSubWindow ) )
- sw = sw->parentWidget( TRUE );
+ sw = sw->parentWidget( true );
if ( sw ) { // we are in a subwindow indeed
TQWidget* fw = w;
while ( fw && fw != sw )
- fw = fw->parentWidget( TRUE );
+ fw = fw->parentWidget( true );
if ( fw != sw ) // focus widget not in our subwindow
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
inline int TQAccelManager::translateModifiers( ButtonState state )
@@ -326,7 +326,7 @@ bool TQAccelManager::tryAccelEvent( TQWidget* w, TQKeyEvent* e )
e->ignore();
TQApplication::sendSpontaneousEvent( w, e );
if ( e->isAccepted() )
- return FALSE;
+ return false;
}
e->t = TQEvent::Accel;
e->ignore();
@@ -349,7 +349,7 @@ bool TQAccelManager::tryComposeUnicode( TQWidget* w, TQKeyEvent* e )
if ( value >= 0 && value <= 9 ) {
TQApplication::composedUnicode *= 10;
TQApplication::composedUnicode += value;
- return TRUE;
+ return true;
} else {
// Composing interrupted, dispatch!
if ( TQApplication::composedUnicode ) {
@@ -361,7 +361,7 @@ bool TQAccelManager::tryComposeUnicode( TQWidget* w, TQKeyEvent* e )
TQApplication::sendEvent( w, &ker );
}
TQApplication::composedUnicode = 0;
- return TRUE;
+ return true;
}
// Meta compose end, dispatch
} else if ( (e->type() == TQEvent::KeyRelease) &&
@@ -377,10 +377,10 @@ bool TQAccelManager::tryComposeUnicode( TQWidget* w, TQKeyEvent* e )
TQApplication::sendEvent( w, &ker );
}
TQApplication::composedUnicode = 0;
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
/*
@@ -399,7 +399,7 @@ bool TQAccelManager::dispatchAccelEvent( TQWidget* w, TQKeyEvent* e )
// Modifiers can NOT be accelerators...
if ( e->key() >= Key_Shift &&
e->key() <= Key_Alt )
- return FALSE;
+ return false;
SequenceMatch result = TQt::NoMatch;
TQKeySequence tocheck, partial;
@@ -413,11 +413,11 @@ bool TQAccelManager::dispatchAccelEvent( TQWidget* w, TQKeyEvent* e )
TQKeyEvent pe = *e;
int n = -1;
int hasShift = (e->state()&TQt::ShiftButton)?1:0;
- bool identicalDisabled = FALSE;
- bool matchFound = FALSE;
+ bool identicalDisabled = false;
+ bool matchFound = false;
do {
accel = accels.first();
- matchFound = FALSE;
+ matchFound = false;
while ( accel ) {
if ( correctSubWindow( w, accel ) ) {
if ( accel->enabled ) {
@@ -432,16 +432,16 @@ bool TQAccelManager::dispatchAccelEvent( TQWidget* w, TQKeyEvent* e )
lastaccel = accel;
lastitem = item;
n++;
- matchFound = TRUE;
+ matchFound = true;
if ( n > TQMAX(clash,0) )
goto doclash;
} else {
- identicalDisabled = TRUE;
+ identicalDisabled = true;
}
}
if ( item->enabled && TQt::PartialMatch == result ) {
partial = tocheck;
- matchFound = TRUE;
+ matchFound = true;
}
item = accel->aitems.prev();
}
@@ -449,7 +449,7 @@ bool TQAccelManager::dispatchAccelEvent( TQWidget* w, TQKeyEvent* e )
item = accel->aitems.last();
while( item ) {
if ( TQt::Identical == match( &pe, item, tocheck ) )
- identicalDisabled = TRUE;
+ identicalDisabled = true;
item = accel->aitems.prev();
}
}
@@ -497,7 +497,7 @@ bool TQAccelManager::dispatchAccelEvent( TQWidget* w, TQKeyEvent* e )
intermediate = TQKeySequence();
lastaccel->activate( lastitem );
e->accept();
- return TRUE;
+ return true;
}
doclash: // found more than one match
@@ -531,15 +531,15 @@ bool TQAccelManager::dispatchAccelEvent( TQWidget* w, TQKeyEvent* e )
firstaccel->activateAmbiguously( firstitem );
}
e->accept();
- return TRUE;
+ return true;
}
TQAccelPrivate::TQAccelPrivate( TQAccel* p )
: parent( p )
{
TQAccelManager::self()->registerAccel( this );
- aitems.setAutoDelete( TRUE );
- ignorewhatsthis = FALSE;
+ aitems.setAutoDelete( true );
+ ignorewhatsthis = false;
}
TQAccelPrivate::~TQAccelPrivate()
@@ -572,7 +572,7 @@ TQAccel::TQAccel( TQWidget *parent, const char *name )
: TQObject( parent, name )
{
d = new TQAccelPrivate( this );
- d->enabled = TRUE;
+ d->enabled = true;
d->watch = parent;
#if defined(QT_CHECK_NULL)
if ( !d->watch )
@@ -590,7 +590,7 @@ TQAccel::TQAccel( TQWidget* watch, TQObject *parent, const char *name )
: TQObject( parent, name )
{
d = new TQAccelPrivate( this );
- d->enabled = TRUE;
+ d->enabled = true;
d->watch = watch;
#if defined(QT_CHECK_NULL)
if ( !d->watch )
@@ -628,8 +628,8 @@ TQAccel::~TQAccel()
/*!
- Returns TRUE if the accelerator is enabled; otherwise returns
- FALSE.
+ Returns true if the accelerator is enabled; otherwise returns
+ false.
\sa setEnabled(), isItemEnabled()
*/
@@ -641,8 +641,8 @@ bool TQAccel::isEnabled() const
/*!
- Enables the accelerator if \a enable is TRUE, or disables it if \a
- enable is FALSE.
+ Enables the accelerator if \a enable is true, or disables it if \a
+ enable is false.
Individual keys can also be enabled or disabled using
setItemEnabled(). To work, a key must be an enabled item in an
@@ -746,8 +746,8 @@ int TQAccel::findKey( const TQKeySequence& key ) const
/*!
- Returns TRUE if the accelerator item with the identifier \a id is
- enabled. Returns FALSE if the item is disabled or cannot be found.
+ Returns true if the accelerator item with the identifier \a id is
+ enabled. Returns false if the item is disabled or cannot be found.
\sa setItemEnabled(), isEnabled()
*/
@@ -755,13 +755,13 @@ int TQAccel::findKey( const TQKeySequence& key ) const
bool TQAccel::isItemEnabled( int id ) const
{
TQAccelItem *item = find_id( d->aitems, id);
- return item ? item->enabled : FALSE;
+ return item ? item->enabled : false;
}
/*!
Enables the accelerator item with the identifier \a id if \a
- enable is TRUE, and disables item \a id if \a enable is FALSE.
+ enable is true, and disables item \a id if \a enable is false.
To work, an item must be enabled and be in an enabled TQAccel.
@@ -806,7 +806,7 @@ bool TQAccel::connectItem( int id, const TQObject *receiver, const char *member
}
return item->signal->connect( receiver, member );
}
- return FALSE;
+ return false;
}
/*!
@@ -822,7 +822,7 @@ bool TQAccel::disconnectItem( int id, const TQObject *receiver,
TQAccelItem *item = find_id( d->aitems, id);
if ( item && item->signal )
return item->signal->disconnect( receiver, member );
- return FALSE;
+ return false;
}
void TQAccelPrivate::activate( TQAccelItem* item )
@@ -1085,5 +1085,5 @@ to help. Ask them for ISBN 1859121047.
/*! \obsolete serves no purpose anymore */
void TQAccel::repairEventFilter() {}
/*! \obsolete serves no purpose anymore */
-bool TQAccel::eventFilter( TQObject *, TQEvent * ) { return FALSE; }
+bool TQAccel::eventFilter( TQObject *, TQEvent * ) { return false; }
#endif // TQT_NO_ACCEL
diff --git a/src/kernel/tqaccessible.cpp b/src/kernel/tqaccessible.cpp
index 174e16633..53caf49e8 100644
--- a/src/kernel/tqaccessible.cpp
+++ b/src/kernel/tqaccessible.cpp
@@ -314,12 +314,12 @@ public slots:
#include "tqaccessible.moc"
static AccessibleCache *qAccessibleInterface = 0;
-static bool cleanupAdded = FALSE;
+static bool cleanupAdded = false;
static void qAccessibleCleanup()
{
if ( qAccessibleInterface && qAccessibleInterface->count() && qAccessibleManager )
- qAccessibleManager->setAutoUnload( FALSE );
+ qAccessibleManager->setAutoUnload( false );
delete qAccessibleInterface;
qAccessibleInterface = 0;
@@ -386,7 +386,7 @@ TQRESULT TQAccessible::queryAccessibleInterface( TQObject *object, TQAccessibleI
qAccessibleManager = new TQPluginManager<TQAccessibleFactoryInterface>( IID_QAccessibleFactory, TQApplication::libraryPaths(), "/accessible" );
if ( !cleanupAdded ) {
tqAddPostRoutine( qAccessibleCleanup );
- cleanupAdded = TRUE;
+ cleanupAdded = true;
}
}
@@ -405,8 +405,8 @@ TQRESULT TQAccessible::queryAccessibleInterface( TQObject *object, TQAccessibleI
}
/*!
- Returns TRUE if an accessibility implementation has been requested,
- during the runtime of the application, otherwise returns FALSE.
+ Returns true if an accessibility implementation has been requested,
+ during the runtime of the application, otherwise returns false.
Use this function to prevent potentially expensive notifications via
updateAccessibility().
@@ -431,9 +431,9 @@ bool TQAccessible::isActive()
/*!
\fn bool TQAccessibleInterface::isValid() const
- Returns TRUE if all the data necessary to use this interface
+ Returns true if all the data necessary to use this interface
implementation is valid (e.g. all pointers are non-null),
- otherwise returns FALSE.
+ otherwise returns false.
*/
/*!
@@ -605,19 +605,19 @@ bool TQAccessible::isActive()
Gives the focus to the child object specified by \a control, or to
the object itself if \a control is 0.
- Returns TRUE if the focus could be set; otherwise returns FALSE.
+ Returns true if the focus could be set; otherwise returns false.
*/
/*!
\fn bool TQAccessibleInterface::setSelected( int control, bool on, bool extend )
Sets the selection of the child object with ID \a control to \a
- on. If \a extend is TRUE, all child elements between the focused
+ on. If \a extend is true, all child elements between the focused
item and the specified child object have their selection set to \a
on.
- Returns TRUE if the selection could be set; otherwise returns
- FALSE.
+ Returns true if the selection could be set; otherwise returns
+ false.
\sa setFocus(), clearSelection()
*/
@@ -653,7 +653,7 @@ TQAccessibleObject::TQAccessibleObject( TQObject *object )
qAccessibleInterface = new AccessibleCache;
if ( !cleanupAdded ) {
tqAddPostRoutine( qAccessibleCleanup );
- cleanupAdded = TRUE;
+ cleanupAdded = true;
}
}
diff --git a/src/kernel/tqapplication.cpp b/src/kernel/tqapplication.cpp
index c6e6510b4..97368b0c6 100644
--- a/src/kernel/tqapplication.cpp
+++ b/src/kernel/tqapplication.cpp
@@ -326,51 +326,51 @@ TQ_EXPORT bool tqt_tryModalHelper( TQWidget *widget, TQWidget **rettop );
TQApplication *tqApp = 0; // global application object
TQStyle *TQApplication::app_style = 0; // default application style
-bool tqt_explicit_app_style = FALSE; // style explicitly set by programmer
+bool tqt_explicit_app_style = false; // style explicitly set by programmer
int TQApplication::app_cspec = TQApplication::NormalColor;
#ifndef TQT_NO_PALETTE
TQPalette *TQApplication::app_pal = 0; // default application palette
#endif
TQFont *TQApplication::app_font = 0; // default application font
-bool tqt_app_has_font = FALSE;
+bool tqt_app_has_font = false;
#ifndef TQT_NO_CURSOR
TQCursor *TQApplication::app_cursor = 0; // default application cursor
#endif
int TQApplication::app_tracking = 0; // global mouse tracking
-bool TQApplication::is_app_running = FALSE; // app starting up if FALSE
-bool TQApplication::is_app_closing = FALSE; // app closing down if TRUE
+bool TQApplication::is_app_running = false; // app starting up if false
+bool TQApplication::is_app_closing = false; // app closing down if true
int TQApplication::loop_level = 0; // event loop level
TQWidget *TQApplication::main_widget = 0; // main application widget
TQWidget *TQApplication::focus_widget = 0; // has keyboard input focus
TQWidget *TQApplication::active_window = 0; // toplevel with keyboard focus
-bool TQApplication::obey_desktop_settings = TRUE; // use winsys resources
+bool TQApplication::obey_desktop_settings = true; // use winsys resources
int TQApplication::cursor_flash_time = 1000; // text caret flash time
int TQApplication::mouse_double_click_time = 400; // mouse dbl click limit
#ifndef TQT_NO_WHEELEVENT
int TQApplication::wheel_scroll_lines = 3; // number of lines to scroll
#endif
bool tqt_is_gui_used;
-bool TQ_EXPORT tqt_resolve_symlinks = TRUE;
-bool TQ_EXPORT tqt_tab_all_widgets = TRUE;
+bool TQ_EXPORT tqt_resolve_symlinks = true;
+bool TQ_EXPORT tqt_tab_all_widgets = true;
TQRect tqt_maxWindowRect;
static int drag_time = 500;
static int drag_distance = 4;
-static bool reverse_layout = FALSE;
+static bool reverse_layout = false;
TQSize TQApplication::app_strut = TQSize( 0,0 ); // no default application strut
-bool TQApplication::animate_ui = TRUE;
-bool TQApplication::animate_menu = FALSE;
-bool TQApplication::fade_menu = FALSE;
-bool TQApplication::animate_combo = FALSE;
-bool TQApplication::animate_tooltip = FALSE;
-bool TQApplication::fade_tooltip = FALSE;
-bool TQApplication::animate_toolbox = FALSE;
-bool TQApplication::widgetCount = FALSE;
+bool TQApplication::animate_ui = true;
+bool TQApplication::animate_menu = false;
+bool TQApplication::fade_menu = false;
+bool TQApplication::animate_combo = false;
+bool TQApplication::animate_tooltip = false;
+bool TQApplication::fade_tooltip = false;
+bool TQApplication::animate_toolbox = false;
+bool TQApplication::widgetCount = false;
TQApplication::Type tqt_appType=TQApplication::Tty;
#ifndef TQT_NO_COMPONENT
TQStringList *TQApplication::app_libpaths = 0;
#endif
-bool TQApplication::metaComposeUnicode = FALSE;
+bool TQApplication::metaComposeUnicode = false;
int TQApplication::composedUnicode = 0;
#ifdef TQT_THREAD_SUPPORT
@@ -413,7 +413,7 @@ extern bool tqt_tryComposeUnicode( TQWidget*, TQKeyEvent* ); // def in tqaccel.c
#endif
#if defined(QT_TABLET_SUPPORT)
-bool chokeMouse = FALSE;
+bool chokeMouse = false;
#endif
void tqt_setMaxWindowRect(const TQRect& r)
@@ -607,7 +607,7 @@ public:
#ifdef TQT_THREAD_SUPPORT
if (with_mutex)
{
- m_mutex = new TQMutex(TRUE);
+ m_mutex = new TQMutex(true);
}
#endif
}
@@ -645,7 +645,7 @@ public:
static TQPostEventList* InitGlobalPostedEventsList()
{
static TQPostEventList _globalEventList(true);
- _globalEventList.setAutoDelete(TRUE);
+ _globalEventList.setAutoDelete(true);
return &_globalEventList;
}
@@ -694,7 +694,7 @@ static void tqt_fix_tooltips()
TQColor(96,96,96), TQt::black, TQt::black,
TQt::black, TQColor(255,255,220) );
TQPalette pal( cg, cg, cg );
- TQApplication::setPalette( pal, TRUE, "TQTipLabel");
+ TQApplication::setPalette( pal, true, "TQTipLabel");
}
#endif
@@ -717,7 +717,7 @@ void TQApplication::process_cmdline( int* argcptr, char ** argv )
TQCString s;
if ( arg == "-qdevel" || arg == "-qdebug") {
// obsolete argument
- } else if ( arg.find( "-style=", 0, FALSE ) != -1 ) {
+ } else if ( arg.find( "-style=", 0, false ) != -1 ) {
s = arg.right( arg.length() - 7 );
} else if ( qstrcmp(arg,"-style") == 0 && i < argc-1 ) {
s = argv[++i];
@@ -734,13 +734,13 @@ void TQApplication::process_cmdline( int* argcptr, char ** argv )
*session_key = session_id.mid( p +1 );
session_id = session_id.left( p );
}
- is_session_restored = TRUE;
+ is_session_restored = true;
}
#endif
} else if ( qstrcmp(arg, "-reverse") == 0 ) {
- setReverseLayout( TRUE );
+ setReverseLayout( true );
} else if ( qstrcmp(arg, "-widgetcount") == 0 ) {
- widgetCount = TRUE;;
+ widgetCount = true;;
} else {
argv[j++] = argv[i];
}
@@ -845,14 +845,14 @@ TQApplication::TQApplication( int &argc, char **argv )
/*!
Constructs an application object with \a argc command line arguments
- in \a argv. If \a GUIenabled is TRUE, a GUI application is
+ in \a argv. If \a GUIenabled is true, a GUI application is
constructed, otherwise a non-GUI (console) application is created.
- Set \a GUIenabled to FALSE for programs without a graphical user
+ Set \a GUIenabled to false for programs without a graphical user
interface that should be able to run without a window system.
- On X11, the window system is initialized if \a GUIenabled is TRUE.
- If \a GUIenabled is FALSE, the application does not connect to the
+ On X11, the window system is initialized if \a GUIenabled is true.
+ If \a GUIenabled is false, the application does not connect to the
X-server.
On Windows and Macintosh, currently the window system is always
initialized, regardless of the value of GUIenabled. This may change in
@@ -866,7 +866,7 @@ TQApplication::TQApplication( int &argc, char **argv )
#ifdef TQ_WS_X11
bool useGUI = getenv( "DISPLAY" ) != 0;
#else
- bool useGUI = TRUE;
+ bool useGUI = true;
#endif
TQApplication app(argc, argv, useGUI);
@@ -889,18 +889,18 @@ TQApplication::TQApplication( int &argc, char **argv, bool GUIenabled )
/*!
Constructs an application object with \a argc command line arguments
- in \a argv. If \a GUIenabled is TRUE, a GUI application is
+ in \a argv. If \a GUIenabled is true, a GUI application is
constructed, otherwise a non-GUI (console) application is created.
- If \a SMEnabled is TRUE, session management support is enabled (default).
+ If \a SMEnabled is true, session management support is enabled (default).
- Set \a GUIenabled to FALSE for programs without a graphical user
+ Set \a GUIenabled to false for programs without a graphical user
interface that should be able to run without a window system.
- Set \a SMEnabled to FALSE to disable session management.
+ Set \a SMEnabled to false to disable session management.
Session management cannot be enabled at a later time if disabled here.
- On X11, the window system is initialized if \a GUIenabled is TRUE.
- If \a GUIenabled is FALSE, the application does not connect to the
+ On X11, the window system is initialized if \a GUIenabled is true.
+ If \a GUIenabled is false, the application does not connect to the
X-server.
On Windows and Macintosh, currently the window system is always
initialized, regardless of the value of GUIenabled. This may change in
@@ -914,7 +914,7 @@ TQApplication::TQApplication( int &argc, char **argv, bool GUIenabled )
#ifdef TQ_WS_X11
bool useGUI = getenv( "DISPLAY" ) != 0;
#else
- bool useGUI = TRUE;
+ bool useGUI = true;
#endif
TQApplication app(argc, argv, useGUI);
@@ -1010,7 +1010,7 @@ TQApplication::TQApplication( Display* dpy, HANDLE visual, HANDLE colormap )
app_argv = aargv;
tqt_appType = GuiClient;
- tqt_is_gui_used = TRUE;
+ tqt_is_gui_used = true;
tqt_appType = GuiClient;
init_precmdline();
// ... no command line.
@@ -1049,7 +1049,7 @@ TQApplication::TQApplication(Display *dpy, int argc, char **argv,
HANDLE visual, HANDLE colormap)
{
tqt_appType = GuiClient;
- tqt_is_gui_used = TRUE;
+ tqt_is_gui_used = true;
tqt_appType = GuiClient;
init_precmdline();
@@ -1095,9 +1095,9 @@ bool TQApplication::isCoreThread() {
void TQApplication::init_precmdline()
{
translators = 0;
- is_app_closing = FALSE;
+ is_app_closing = false;
#ifndef TQT_NO_SESSIONMANAGER
- is_session_restored = FALSE;
+ is_session_restored = false;
#endif
#if defined(QT_CHECK_STATE)
if ( tqApp )
@@ -1113,24 +1113,24 @@ void TQApplication::init_precmdline()
void TQApplication::initialize( int argc, char **argv, bool enable_sm )
{
#ifdef TQT_THREAD_SUPPORT
- tqt_mutex = new TQMutex( TRUE );
- tqt_sharedStringMutex = new TQMutex( TRUE );
- tqt_sharedMetaObjectMutex = new TQMutex( TRUE );
+ tqt_mutex = new TQMutex( true );
+ tqt_sharedStringMutex = new TQMutex( true );
+ tqt_sharedMetaObjectMutex = new TQMutex( true );
#ifdef QT_USE_GLIBMAINLOOP
- tqt_timerListMutex = new TQMutex( TRUE );
+ tqt_timerListMutex = new TQMutex( true );
#endif // QT_USE_GLIBMAINLOOP
tqt_application_thread_id = TQThread::currentThread();
#endif // TQT_THREAD_SUPPORT
app_argc = argc;
app_argv = argv;
- quit_now = FALSE;
+ quit_now = false;
quit_code = 0;
TQWidget::createMapper(); // create widget mapper
#ifndef TQT_NO_PALETTE
(void) palette(); // trigger creation of application palette
#endif
- is_app_running = TRUE; // no longer starting up
+ is_app_running = true; // no longer starting up
#ifndef TQT_NO_SESSIONMANAGER
if (enable_sm) {
@@ -1178,7 +1178,7 @@ TQWidget *TQApplication::activePopupWidget()
A modal widget is a special top level widget which is a subclass of
TQDialog that specifies the modal parameter of the constructor as
- TRUE. A modal widget must be closed before the user can continue
+ true. A modal widget must be closed before the user can continue
with other parts of the program.
Modal widgets are organized in a stack. This function returns
@@ -1220,12 +1220,12 @@ TQApplication::~TQApplication()
postRList = 0;
}
- TQObject *tipmanager = child( "toolTipManager", "TQTipManager", FALSE );
+ TQObject *tipmanager = child( "toolTipManager", "TQTipManager", false );
delete tipmanager;
delete tqt_desktopWidget;
tqt_desktopWidget = 0;
- is_app_closing = TRUE;
+ is_app_closing = true;
// Due to hacks to speed up TQStyle engine (see git hash 523c1fd99) TQObjects now contain a
// reference to TQStyleControlElementData object which among other contain TQFont members.
@@ -1284,7 +1284,7 @@ TQApplication::~TQApplication()
removePostedEvents( this );
tqApp = 0;
}
- is_app_running = FALSE;
+ is_app_running = false;
if ( widgetCount ) {
tqDebug( "Widgets left: %i Max widgets: %i \n", TQWidget::instanceCounter, TQWidget::maxInstances );
@@ -1311,10 +1311,10 @@ TQApplication::~TQApplication()
#endif // QT_USE_GLIBMAINLOOP
#endif // TQT_THREAD_SUPPORT
- tqt_explicit_app_style = FALSE;
- tqt_app_has_font = FALSE;
+ tqt_explicit_app_style = false;
+ tqt_app_has_font = false;
app_tracking = 0;
- obey_desktop_settings = TRUE;
+ obey_desktop_settings = true;
cursor_flash_time = 1000;
mouse_double_click_time = 400;
#ifndef TQT_NO_WHEELEVENT
@@ -1322,15 +1322,15 @@ TQApplication::~TQApplication()
#endif
drag_time = 500;
drag_distance = 4;
- reverse_layout = FALSE;
+ reverse_layout = false;
app_strut = TQSize( 0, 0 );
- animate_ui = TRUE;
- animate_menu = FALSE;
- fade_menu = FALSE;
- animate_combo = FALSE;
- animate_tooltip = FALSE;
- fade_tooltip = FALSE;
- widgetCount = FALSE;
+ animate_ui = true;
+ animate_menu = false;
+ fade_menu = false;
+ animate_combo = false;
+ animate_tooltip = false;
+ fade_tooltip = false;
+ widgetCount = false;
}
@@ -1499,7 +1499,7 @@ void TQApplication::setStyle( TQStyle *style )
TQStyle* old = app_style;
app_style = style;
#ifdef TQ_WS_X11
- tqt_explicit_app_style = TRUE;
+ tqt_explicit_app_style = true;
#endif // TQ_WS_X11
if ( startingUp() ) {
@@ -1529,7 +1529,7 @@ void TQApplication::setStyle( TQStyle *style )
if ( !tqt_std_pal )
tqt_create_std_palette();
TQPalette tmpPal = *tqt_std_pal;
- setPalette( tmpPal, TRUE );
+ setPalette( tmpPal, true );
// initialize the application with the new style
app_style->polish( tqApp );
@@ -1575,7 +1575,7 @@ void TQApplication::setStyle( TQStyle *style )
TQStyle* TQApplication::setStyle( const TQString& style )
{
#ifdef TQ_WS_X11
- tqt_explicit_app_style = TRUE;
+ tqt_explicit_app_style = true;
#endif // TQ_WS_X11
if ( startingUp() ) {
@@ -1747,7 +1747,7 @@ extern const char *tqAppFileName();
#ifndef TQ_WS_WIN
static TQString resolveSymlinks( const TQString& path, int depth = 0 )
{
- bool foundLink = FALSE;
+ bool foundLink = false;
TQString linkTarget;
TQString part = path;
int slashPos = path.length();
@@ -1760,7 +1760,7 @@ static TQString resolveSymlinks( const TQString& path, int depth = 0 )
part = part.left( slashPos );
TQFileInfo fileInfo( part );
if ( fileInfo.isSymLink() ) {
- foundLink = TRUE;
+ foundLink = true;
linkTarget = fileInfo.readLink();
break;
}
@@ -2074,9 +2074,9 @@ TQPalette TQApplication::palette(TQStringList objectTypeList)
/*!
Changes the default application palette to \a palette. If \a
- informWidgets is TRUE, then existing widgets are informed about the
+ informWidgets is true, then existing widgets are informed about the
change and may adjust themselves to the new application
- setting. If \a informWidgets is FALSE, the change only affects newly
+ setting. If \a informWidgets is false, the change only affects newly
created widgets.
If \a className is passed, the change applies only to widgets that
@@ -2099,7 +2099,7 @@ void TQApplication::setPalette( const TQPalette &palette, bool informWidgets,
if ( !startingUp() ) // on startup this has been done already
tqApp->style().polish( pal ); // NB: non-const reference
#endif
- bool all = FALSE;
+ bool all = false;
if ( !className ) {
if ( !app_pal ) {
app_pal = new TQPalette( pal );
@@ -2115,7 +2115,7 @@ void TQApplication::setPalette( const TQPalette &palette, bool informWidgets,
if ( !app_palettes ) {
app_palettes = new TQAsciiDict<TQPalette>;
TQ_CHECK_PTR( app_palettes );
- app_palettes->setAutoDelete( TRUE );
+ app_palettes->setAutoDelete( true );
}
oldpal = app_palettes->find( className );
app_palettes->insert( className, new TQPalette( pal ) );
@@ -2165,9 +2165,9 @@ TQFont TQApplication::font( const TQWidget *w )
}
/*! Changes the default application font to \a font. If \a
- informWidgets is TRUE, then existing widgets are informed about the
+ informWidgets is true, then existing widgets are informed about the
change and may adjust themselves to the new application
- setting. If \a informWidgets is FALSE, the change only affects newly
+ setting. If \a informWidgets is false, the change only affects newly
created widgets. If \a className is passed, the change applies only
to classes that inherit \a className (as reported by
TQObject::inherits()).
@@ -2184,9 +2184,9 @@ TQFont TQApplication::font( const TQWidget *w )
void TQApplication::setFont( const TQFont &font, bool informWidgets,
const char* className )
{
- bool all = FALSE;
+ bool all = false;
if ( !className ) {
- tqt_app_has_font = TRUE;
+ tqt_app_has_font = true;
if ( !app_font ) {
app_font = new TQFont( font );
TQ_CHECK_PTR( app_font );
@@ -2205,7 +2205,7 @@ void TQApplication::setFont( const TQFont &font, bool informWidgets,
if (!app_fonts){
app_fonts = new TQAsciiDict<TQFont>;
TQ_CHECK_PTR( app_fonts );
- app_fonts->setAutoDelete( TRUE );
+ app_fonts->setAutoDelete( true );
}
TQFont* fnt = new TQFont(font);
TQ_CHECK_PTR( fnt );
@@ -2399,7 +2399,7 @@ void TQApplication::quit()
*/
void TQApplication::closeAllWindows()
{
- bool did_close = TRUE;
+ bool did_close = true;
TQWidget *w;
while((w = activeModalWidget()) && did_close) {
if(w->isHidden())
@@ -2498,13 +2498,13 @@ void TQApplication::aboutTQt()
*/
bool TQApplication::sendEvent( TQObject *receiver, TQEvent *event ) {
- if ( event ) event->spont = FALSE;
- return tqApp ? tqApp->notify( receiver, event ) : FALSE;
+ if ( event ) event->spont = false;
+ return tqApp ? tqApp->notify( receiver, event ) : false;
}
bool TQApplication::sendSpontaneousEvent( TQObject *receiver, TQEvent *event ) {
- if ( event ) event->spont = TRUE;
- return tqApp ? tqApp->notify( receiver, event ) : FALSE;
+ if ( event ) event->spont = true;
+ return tqApp ? tqApp->notify( receiver, event ) : false;
}
/*!
@@ -2514,7 +2514,7 @@ bool TQApplication::sendSpontaneousEvent( TQObject *receiver, TQEvent *event ) {
For certain types of events (e.g. mouse and key events),
the event will be propagated to the receiver's parent and so on up to
the top-level object if the receiver is not interested in the event
- (i.e., it returns FALSE).
+ (i.e., it returns false).
There are five different ways that events can be processed;
reimplementing this virtual function is just one of them. All five
@@ -2550,18 +2550,18 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
{
// no events are delivered after ~TQApplication() has started
if ( is_app_closing ) {
- return FALSE;
+ return false;
}
if ( receiver == 0 ) { // serious error
#if defined(QT_CHECK_NULL)
tqWarning( "TQApplication::notify: Unexpected null receiver" );
#endif
- return FALSE;
+ return false;
}
if ( receiver && (e->type() == TQEvent::Destroy) ) {
- return TRUE;
+ return true;
}
if ( e->type() == TQEvent::ChildRemoved && receiver->postedEvents) {
@@ -2584,7 +2584,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
if ( pe->event && pe->receiver == receiver &&
pe->event->type() == TQEvent::ChildInserted &&
((TQChildEvent*)pe->event)->child() == c ) {
- pe->event->posted = FALSE;
+ pe->event->posted = false;
delete pe->event;
pe->event = 0;
l->remove();
@@ -2595,7 +2595,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
}
}
- bool res = FALSE;
+ bool res = false;
if ( !receiver->isWidgetType() ) {
res = internalNotify( receiver, e );
}
@@ -2637,7 +2637,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
res = internalNotify( w, e );
if ( res || key->isAccepted() )
break;
- w = w->parentWidget( TRUE );
+ w = w->parentWidget( true );
}
}
break;
@@ -2664,7 +2664,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
TQMouseEvent me(mouse->type(), relpos, mouse->globalPos(), mouse->button(), mouse->state());
me.spont = mouse->spontaneous();
res = internalNotify( w, w == receiver ? mouse : &me );
- e->spont = FALSE;
+ e->spont = false;
if (res || w->isTopLevel() || w->testWFlags(WNoMousePropagation))
break;
@@ -2698,7 +2698,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
TQWheelEvent we(relpos, wheel->globalPos(), wheel->delta(), wheel->state(), wheel->orientation());
we.spont = wheel->spontaneous();
res = internalNotify( w, w == receiver ? wheel : &we );
- e->spont = FALSE;
+ e->spont = false;
if (res || w->isTopLevel() || w->testWFlags(WNoMousePropagation))
break;
@@ -2721,7 +2721,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
TQContextMenuEvent ce(context->reason(), relpos, context->globalPos(), context->state());
ce.spont = e->spontaneous();
res = internalNotify( w, w == receiver ? context : &ce );
- e->spont = FALSE;
+ e->spont = false;
if (res || w->isTopLevel() || w->testWFlags(WNoMousePropagation))
break;
@@ -2749,7 +2749,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
tablet->uniqueId());
te.spont = e->spontaneous();
res = internalNotify( w, w == receiver ? tablet : &te );
- e->spont = FALSE;
+ e->spont = false;
if (res || w->isTopLevel() || w->testWFlags(WNoMousePropagation))
break;
@@ -2791,10 +2791,10 @@ bool TQApplication::event( TQEvent *e )
}
}
if(ce->isAccepted())
- return TRUE;
+ return true;
} else if (e->type() == TQEvent::Quit) {
quit();
- return TRUE;
+ return true;
}
return TQObject::event(e);
}
@@ -2824,14 +2824,14 @@ bool TQApplication::internalNotify( TQObject *receiver, TQEvent * e)
TQObjectListIt it( *eventFilters );
TQObject *obj;
while ( (obj=it.current()) != 0 ) { // send to all filters
- ++it; // until one returns TRUE
+ ++it; // until one returns true
if ( obj->eventFilter(receiver,e) )
- return TRUE;
+ return true;
}
}
- bool consumed = FALSE;
- bool handled = FALSE;
+ bool consumed = false;
+ bool handled = false;
if ( receiver->isWidgetType() ) {
TQWidget *widget = (TQWidget*)receiver;
@@ -2863,8 +2863,8 @@ bool TQApplication::internalNotify( TQObject *receiver, TQEvent * e)
if ( e->type() == TQEvent::MouseMove &&
(((TQMouseEvent*)e)->state()&TQMouseEvent::MouseButtonMask) == 0 &&
!widget->hasMouseTracking() ) {
- handled = TRUE;
- consumed = TRUE;
+ handled = true;
+ consumed = true;
} else if ( !widget->isEnabled() ) { // throw away mouse events to disabled widgets
switch(e->type()) {
case TQEvent::MouseButtonPress:
@@ -2872,35 +2872,35 @@ bool TQApplication::internalNotify( TQObject *receiver, TQEvent * e)
case TQEvent::MouseButtonDblClick:
case TQEvent::MouseMove:
( (TQMouseEvent*) e)->ignore();
- handled = TRUE;
- consumed = TRUE;
+ handled = true;
+ consumed = true;
break;
#ifndef TQT_NO_DRAGANDDROP
case TQEvent::DragEnter:
case TQEvent::DragMove:
( (TQDragMoveEvent*) e)->ignore();
- handled = TRUE;
+ handled = true;
break;
case TQEvent::DragLeave:
case TQEvent::DragResponse:
- handled = TRUE;
+ handled = true;
break;
case TQEvent::Drop:
( (TQDropEvent*) e)->ignore();
- handled = TRUE;
+ handled = true;
break;
#endif
#ifndef TQT_NO_WHEELEVENT
case TQEvent::Wheel:
( (TQWheelEvent*) e)->ignore();
- handled = TRUE;
+ handled = true;
break;
#endif
case TQEvent::ContextMenu:
( (TQContextMenuEvent*) e)->ignore();
- handled = TRUE;
+ handled = true;
break;
default:
break;
@@ -2931,13 +2931,13 @@ bool TQApplication::internalNotify( TQObject *receiver, TQEvent * e)
}
#endif
}
- e->spont = FALSE;
+ e->spont = false;
return consumed;
}
/*!
- Returns TRUE if an application object has not been created yet;
- otherwise returns FALSE.
+ Returns true if an application object has not been created yet;
+ otherwise returns false.
\sa closingDown()
*/
@@ -2948,8 +2948,8 @@ bool TQApplication::startingUp()
}
/*!
- Returns TRUE if the application objects are being destroyed;
- otherwise returns FALSE.
+ Returns true if the application objects are being destroyed;
+ otherwise returns false.
\sa startingUp()
*/
@@ -3153,8 +3153,8 @@ void TQApplication::wakeUpCoreThread()
}
/*!
- This function returns TRUE if there are pending events; otherwise
- returns FALSE. Pending events can be either from the window system
+ This function returns true if there are pending events; otherwise
+ returns false. Pending events can be either from the window system
or posted events using TQApplication::postEvent().
*/
bool TQApplication::hasPendingEvents()
@@ -3506,7 +3506,7 @@ void TQApplication::postEvent( TQObject *receiver, TQEvent *event )
#endif
// if no compression could be done, just append something
- event->posted = TRUE;
+ event->posted = true;
TQPostEvent * pe = new TQPostEvent( receiver, event );
l->append( pe );
GlobalPostedEvents()->append( pe );
@@ -3568,9 +3568,9 @@ void TQApplication::sendPostedEvents( TQObject *receiver, int event_type )
TQMutexLocker locker( GlobalPostedEvents()->mutex() );
#endif
- bool sent = TRUE;
+ bool sent = true;
while ( sent ) {
- sent = FALSE;
+ sent = false;
if (receiver && !receiver->postedEvents) {
return;
@@ -3600,7 +3600,7 @@ void TQApplication::sendPostedEvents( TQObject *receiver, int event_type )
) {
// first, we diddle the event so that we can deliver
// it, and that noone will try to touch it later.
- pe->event->posted = FALSE;
+ pe->event->posted = false;
TQEvent * e = pe->event;
TQObject * r = pe->receiver;
pe->event = 0;
@@ -3634,7 +3634,7 @@ void TQApplication::sendPostedEvents( TQObject *receiver, int event_type )
w->repaint( p->reg, p->erase );
}
} else {
- sent = TRUE;
+ sent = true;
TQApplication::sendEvent( r, e );
}
#ifdef TQT_THREAD_SUPPORT
@@ -3719,7 +3719,7 @@ void TQApplication::removePostedEvents( TQObject *receiver, int event_type )
while( (pe=l->current()) != 0 ) {
if ( !event_type || pe->event->type() == event_type ) {
if ( pe->event ) {
- pe->event->posted = FALSE;
+ pe->event->posted = false;
delete pe->event;
pe->event = 0;
}
@@ -3832,7 +3832,7 @@ void TQApplication::removePostedEvent( TQEvent * event )
pe->receiver ? pe->receiver->name() : "object" );
// note the beautiful uglehack if !pe->receiver :)
#endif
- event->posted = FALSE;
+ event->posted = false;
delete pe->event;
pe->event = 0;
return;
@@ -3961,7 +3961,7 @@ void TQApplication::setActiveWindow( TQWidget* act )
if ( w && w->focusPolicy() != TQWidget::NoFocus )
w->setFocus();
else
- active_window->focusNextPrevChild( TRUE );
+ active_window->focusNextPrevChild( true );
}
TQFocusEvent::resetReason();
}
@@ -3996,22 +3996,22 @@ TQ_EXPORT void tqt_dispatchEnterLeave( TQWidget* enter, TQWidget* leave ) {
w = leave;
do {
leaveList.append( w );
- } while ( (w = w->parentWidget( TRUE ) ) );
+ } while ( (w = w->parentWidget( true ) ) );
}
if ( enter && !sameWindow ) {
w = enter;
do {
enterList.prepend( w );
- } while ( (w = w->parentWidget(TRUE) ) );
+ } while ( (w = w->parentWidget(true) ) );
}
if ( sameWindow ) {
int enterDepth = 0;
int leaveDepth = 0;
w = enter;
- while ( ( w = w->parentWidget( TRUE ) ) )
+ while ( ( w = w->parentWidget( true ) ) )
enterDepth++;
w = leave;
- while ( ( w = w->parentWidget( TRUE ) ) )
+ while ( ( w = w->parentWidget( true ) ) )
leaveDepth++;
TQWidget* wenter = enter;
TQWidget* wleave = leave;
@@ -4060,7 +4060,7 @@ extern TQWidget *tqt_tryModalHelperMac( TQWidget * top ); //tqapplication_mac.cp
/*!\internal
- Called from tqapplication_<platform>.cpp, returns TRUE
+ Called from tqapplication_<platform>.cpp, returns true
if the widget should accept the event.
*/
TQ_EXPORT bool tqt_tryModalHelper( TQWidget *widget, TQWidget **rettop ) {
@@ -4068,7 +4068,7 @@ TQ_EXPORT bool tqt_tryModalHelper( TQWidget *widget, TQWidget **rettop ) {
if ( rettop ) *rettop = top;
if ( tqApp->activePopupWidget() )
- return TRUE;
+ return true;
#ifdef TQ_WS_MACX
top = tqt_tryModalHelperMac( top );
@@ -4081,12 +4081,12 @@ TQ_EXPORT bool tqt_tryModalHelper( TQWidget *widget, TQWidget **rettop ) {
if ( widget->testWFlags(TQt::WShowModal) ) // widget is modal
modal = widget;
if ( !top || modal == top ) // don't block event
- return TRUE;
+ return true;
TQWidget * p = widget->parentWidget(); // Check if the active modal widget is a parent of our widget
while ( p ) {
if ( p == top )
- return TRUE;
+ return true;
p = p->parentWidget();
}
@@ -4095,7 +4095,7 @@ TQ_EXPORT bool tqt_tryModalHelper( TQWidget *widget, TQWidget **rettop ) {
if ( groupLeader ) {
// Does groupLeader have a child in tqt_modal_stack?
- bool unrelated = TRUE;
+ bool unrelated = true;
modal = tqt_modal_stack->first();
while (modal && unrelated) {
TQWidget* p = modal->parentWidget();
@@ -4103,13 +4103,13 @@ TQ_EXPORT bool tqt_tryModalHelper( TQWidget *widget, TQWidget **rettop ) {
p = p->parentWidget();
}
modal = tqt_modal_stack->next();
- if ( p == groupLeader ) unrelated = FALSE;
+ if ( p == groupLeader ) unrelated = false;
}
if ( unrelated )
- return TRUE; // don't block event
+ return true; // don't block event
}
- return FALSE;
+ return false;
}
@@ -4156,14 +4156,14 @@ TQClipboard *TQApplication::clipboard()
By default, TQt will try to use the current standard colors, fonts
etc., from the underlying window system's desktop settings,
and use them for all relevant widgets. This behavior can be switched off
- by calling this function with \a on set to FALSE.
+ by calling this function with \a on set to false.
This static function must be called before creating the TQApplication
object, like this:
\code
int main( int argc, char** argv ) {
- TQApplication::setDesktopSettingsAware( FALSE ); // I know better than the user
+ TQApplication::setDesktopSettingsAware( false ); // I know better than the user
TQApplication myApp( argc, argv ); // Use default fonts & colors
...
}
@@ -4178,7 +4178,7 @@ void TQApplication::setDesktopSettingsAware( bool on )
}
/*!
- Returns the value set by setDesktopSettingsAware(); by default TRUE.
+ Returns the value set by setDesktopSettingsAware(); by default true.
\sa setDesktopSettingsAware()
*/
@@ -4200,7 +4200,7 @@ bool TQApplication::desktopSettingsAware()
/*! \fn void TQApplication::unlock(bool wakeUpCore)
- Unlock the TQt Library Mutex. If \a wakeUpCore is TRUE (the default),
+ Unlock the TQt Library Mutex. If \a wakeUpCore is true (the default),
then the core application thread will be woken with TQApplication::wakeUpCoreThread().
\sa lock(), locked() \link threads.html Thread Support in TQt\endlink
@@ -4209,8 +4209,8 @@ bool TQApplication::desktopSettingsAware()
/*! \fn bool TQApplication::locked()
- Returns TRUE if the TQt Library Mutex is locked by a different thread;
- otherwise returns FALSE.
+ Returns true if the TQt Library Mutex is locked by a different thread;
+ otherwise returns false.
\warning Due to different implementations of recursive mutexes on
the supported platforms, calling this function from the same thread
@@ -4222,8 +4222,8 @@ bool TQApplication::desktopSettingsAware()
/*! \fn bool TQApplication::tryLock()
Attempts to lock the TQt Library Mutex, and returns immediately. If
- the lock was obtained, this function returns TRUE. If another thread
- has locked the mutex, this function returns FALSE, instead of
+ the lock was obtained, this function returns true. If another thread
+ has locked the mutex, this function returns false, instead of
waiting for the lock to become available.
The mutex must be unlocked with unlock() before another thread can
@@ -4261,8 +4261,8 @@ bool TQApplication::tryLock()
/*!
\fn bool TQApplication::isSessionRestored() const
- Returns TRUE if the application has been restored from an earlier
- \link session.html session\endlink; otherwise returns FALSE.
+ Returns true if the application has been restored from an earlier
+ \link session.html session\endlink; otherwise returns false.
\sa sessionId(), commitData(), saveState()
*/
@@ -4332,7 +4332,7 @@ void TQApplication::commitData( TQSessionManager& sm )
if ( sm.allowsInteraction() ) {
TQWidgetList done;
TQWidgetList *list = TQApplication::topLevelWidgets();
- bool cancelled = FALSE;
+ bool cancelled = false;
TQWidget* w = list->first();
while ( !cancelled && w ) {
if ( !w->isHidden() ) {
@@ -4457,9 +4457,9 @@ int TQApplication::startDragDistance()
}
/*!
- If \a b is TRUE, all dialogs and widgets will be laid out in a
+ If \a b is true, all dialogs and widgets will be laid out in a
mirrored fashion, as required by right to left languages such as
- Arabic and Hebrew. If \a b is FALSE, dialogs and widgets are laid
+ Arabic and Hebrew. If \a b is false, dialogs and widgets are laid
out left to right.
Changing this flag in runtime does not cause a relayout of already
@@ -4485,8 +4485,8 @@ void TQApplication::setReverseLayout( bool b )
}
/*!
- Returns TRUE if all dialogs and widgets will be laid out in a
- mirrored (right to left) fashion. Returns FALSE if dialogs and
+ Returns true if all dialogs and widgets will be laid out in a
+ mirrored (right to left) fashion. Returns false if dialogs and
widgets will be laid out left to right.
\sa setReverseLayout()
@@ -4602,8 +4602,8 @@ bool TQApplication::reverseLayout()
\fn bool TQSessionManager::allowsInteraction()
Asks the session manager for permission to interact with the
- user. Returns TRUE if interaction is permitted; otherwise
- returns FALSE.
+ user. Returns true if interaction is permitted; otherwise
+ returns false.
The rationale behind this mechanism is to make it possible to
synchronize user interaction during a shutdown. Advanced session
@@ -4809,8 +4809,8 @@ void MyApplication::commitData( TQSessionManager& sm ) {
/*!
\fn bool TQSessionManager::isPhase2() const
- Returns TRUE if the session manager is currently performing a second
- session management phase; otherwise returns FALSE.
+ Returns true if the session manager is currently performing a second
+ session management phase; otherwise returns false.
\sa requestPhase2()
*/
@@ -4910,12 +4910,12 @@ void* TQSessionManager::handle() const
#if !defined(TQ_WS_WIN)
bool TQSessionManager::allowsInteraction()
{
- return TRUE;
+ return true;
}
bool TQSessionManager::allowsErrorInteraction()
{
- return TRUE;
+ return true;
}
void TQSessionManager::release()
{
@@ -4967,7 +4967,7 @@ void TQSessionManager::setManagerProperty( const TQString&, const TQStringList&
bool TQSessionManager::isPhase2() const
{
- return FALSE;
+ return false;
}
void TQSessionManager::requestPhase2()
diff --git a/src/kernel/tqapplication.h b/src/kernel/tqapplication.h
index f8915c5b9..0d375c1ee 100644
--- a/src/kernel/tqapplication.h
+++ b/src/kernel/tqapplication.h
@@ -111,7 +111,7 @@ public:
static void setColorSpec( int );
#ifndef TQT_NO_CURSOR
static TQCursor *overrideCursor();
- static void setOverrideCursor( const TQCursor &, bool replace=FALSE );
+ static void setOverrideCursor( const TQCursor &, bool replace=false );
static void restoreOverrideCursor();
#endif
static bool hasGlobalMouseTracking();
@@ -119,11 +119,11 @@ public:
#ifndef TQT_NO_PALETTE
static TQPalette palette( const TQWidget* = 0 );
static TQPalette palette( TQStringList );
- static void setPalette( const TQPalette &, bool informWidgets=FALSE,
+ static void setPalette( const TQPalette &, bool informWidgets=false,
const char* className = 0 );
#endif
static TQFont font( const TQWidget* = 0 );
- static void setFont( const TQFont &, bool informWidgets=FALSE,
+ static void setFont( const TQFont &, bool informWidgets=false,
const char* className = 0 );
static TQFontMetrics fontMetrics();
@@ -144,8 +144,8 @@ public:
TQWidget *focusWidget() const;
TQWidget *activeWindow() const;
- static TQWidget *widgetAt( int x, int y, bool child=FALSE );
- static TQWidget *widgetAt( const TQPoint &, bool child=FALSE );
+ static TQWidget *widgetAt( int x, int y, bool child=false );
+ static TQWidget *widgetAt( const TQPoint &, bool child=false );
static TQEventLoop *eventLoop();
@@ -199,7 +199,7 @@ public:
static void setWinStyleHighlightColor( const TQColor &c ) {
TQPalette p( palette() );
p.setColor( TQColorGroup::Highlight, c );
- setPalette( p, TRUE);
+ setPalette( p, true);
}
static const TQColor &winStyleHighlightColor() {
return palette().active().highlight();
@@ -237,7 +237,7 @@ public:
static int horizontalAlignment( int align );
static bool isEffectEnabled( TQt::UIEffect );
- static void setEffectEnabled( TQt::UIEffect, bool enable = TRUE );
+ static void setEffectEnabled( TQt::UIEffect, bool enable = true );
#if defined(TQ_WS_MAC)
virtual bool macEventFilter( EventHandlerCallRef, EventRef );
@@ -288,7 +288,7 @@ public:
void wakeUpCoreThread();
#if defined(TQT_THREAD_SUPPORT)
void lock();
- void unlock(bool wakeUpCore = TRUE);
+ void unlock(bool wakeUpCore = true);
bool locked();
bool tryLock();
#endif
diff --git a/src/kernel/tqapplication_x11.cpp b/src/kernel/tqapplication_x11.cpp
index fedeed789..e9877fe0c 100644
--- a/src/kernel/tqapplication_x11.cpp
+++ b/src/kernel/tqapplication_x11.cpp
@@ -193,20 +193,20 @@ static const char *mwGeometry = 0; // main widget geometry
static const char *mwTitle = 0; // main widget title
//Ming-Che 10/10
TQ_EXPORT char *qt_ximServer = 0; // XIM Server will connect to
-static bool mwIconic = FALSE; // main widget iconified
+static bool mwIconic = false; // main widget iconified
//Ming-Che 10/10
static Display *appDpy = 0; // X11 application display
static char *appDpyName = 0; // X11 display name
-static bool appForeignDpy = FALSE; // we didn't create display
-static bool appSync = FALSE; // X11 synchronization
+static bool appForeignDpy = false; // we didn't create display
+static bool appSync = false; // X11 synchronization
#if defined(QT_DEBUG)
-static bool appNoGrab = FALSE; // X11 grabbing enabled
-static bool appDoGrab = FALSE; // X11 grabbing override (gdb)
+static bool appNoGrab = false; // X11 grabbing enabled
+static bool appDoGrab = false; // X11 grabbing override (gdb)
#endif
static int appScreen; // X11 screen number
static int appScreenCount; // X11 screen count
-static bool app_save_rootinfo = FALSE; // save root info
-static bool app_do_modal = FALSE; // modal mode
+static bool app_save_rootinfo = false; // save root info
+static bool app_do_modal = false; // modal mode
static Window curWin = 0; // current window
static GC* app_gc_ro = 0; // read-only GC
@@ -246,7 +246,7 @@ Atom qt_utf8_string = 0;
// detect broken window managers
Atom qt_sgi_desks_manager = 0;
-bool qt_broken_wm = FALSE;
+bool qt_broken_wm = false;
static void qt_detect_broken_window_manager();
// NET WM support
@@ -320,19 +320,19 @@ static const int FocusModel_PointerRoot = 1;
static int qt_focus_model = -1;
#ifndef TQT_NO_XRANDR
-// TRUE if TQt is compiled w/ XRandR support and XRandR exists on the connected
+// true if TQt is compiled w/ XRandR support and XRandR exists on the connected
// Display
-bool qt_use_xrandr = FALSE;
+bool qt_use_xrandr = false;
static int xrandr_eventbase;
#endif
-// TRUE if TQt is compiled w/ XRender support and XRender exists on the connected
+// true if TQt is compiled w/ XRender support and XRender exists on the connected
// Display
-TQ_EXPORT bool tqt_use_xrender = FALSE;
+TQ_EXPORT bool tqt_use_xrender = false;
#ifndef TQT_NO_XSYNC
// True if SYNC extension exists on the connected display
-bool qt_use_xsync = FALSE;
+bool qt_use_xsync = false;
static int xsync_eventbase;
static int xsync_errorbase;
#endif
@@ -346,8 +346,8 @@ static long qt_meta_mask = 0;
static long qt_mode_switch_remove_mask = 0;
// flags for extensions for special Languages, currently only for RTL languages
-static bool qt_use_rtl_extensions = FALSE;
-TQ_EXPORT bool tqt_hebrew_keyboard_hack = FALSE;
+static bool qt_use_rtl_extensions = false;
+TQ_EXPORT bool tqt_hebrew_keyboard_hack = false;
static Window mouseActWindow = 0; // window where mouse is
static int mouseButtonPressed = 0; // last mouse button pressed
@@ -357,16 +357,16 @@ static short mouseXPos, mouseYPos; // mouse pres position in act window
static short mouseGlobalXPos, mouseGlobalYPos; // global mouse press position
extern TQWidgetList *tqt_modal_stack; // stack of modal widgets
-static bool ignoreNextMouseReleaseEvent = FALSE; // ignore the next mouse release
+static bool ignoreNextMouseReleaseEvent = false; // ignore the next mouse release
// event if return from a modal
// widget
static TQWidget *popupButtonFocus = 0;
static TQWidget *popupOfPopupButtonFocus = 0;
-static bool popupCloseDownMode = FALSE;
+static bool popupCloseDownMode = false;
static bool popupGrabOk;
-static bool sm_blockUserInput = FALSE; // session management
+static bool sm_blockUserInput = false; // session management
int qt_xfocusout_grab_counter = 0;
@@ -415,7 +415,7 @@ TQ_EXPORT QX11EventFilter tqt_set_x11_event_filter(QX11EventFilter filter)
static bool qt_x11EventFilter( XEvent* ev )
{
if ( qt_x11_event_filter && qt_x11_event_filter( ev ) )
- return TRUE;
+ return true;
return tqApp->x11EventFilter( ev );
}
@@ -464,7 +464,7 @@ bool tqt_try_modal( TQWidget *, XEvent * );
int qt_ncols_option = 216; // used in tqcolor_x11.cpp
int qt_visual_option = -1;
-bool qt_cmap_option = FALSE;
+bool qt_cmap_option = false;
TQWidget *qt_button_down = 0; // widget got last button-down
extern bool tqt_tryAccelEvent( TQWidget*, TQKeyEvent* ); // def in tqaccel.cpp
@@ -551,7 +551,7 @@ void qt_deferred_map_take( TQWidget* w )
bool qt_deferred_map_contains( TQWidget* w )
{
if (!deferred_map_list)
- return FALSE;
+ return false;
else
return deferred_map_list->contains( w );
}
@@ -565,7 +565,7 @@ public:
void setWFlags( WFlags f ) { TQWidget::setWFlags(f); }
void clearWFlags( WFlags f ) { TQWidget::clearWFlags(f); }
bool translateMouseEvent( const XEvent * );
- bool translateKeyEventInternal( const XEvent *, int& count, TQString& text, int& state, char& ascii, int &code, TQEvent::Type &type, bool willRepeat=FALSE, bool statefulTranslation=TRUE );
+ bool translateKeyEventInternal( const XEvent *, int& count, TQString& text, int& state, char& ascii, int &code, TQEvent::Type &type, bool willRepeat=false, bool statefulTranslation=true );
bool translateKeyEvent( const XEvent *, bool grab );
bool translatePaintEvent( const XEvent * );
bool translateConfigEvent( const XEvent * );
@@ -775,15 +775,15 @@ static bool x11_badwindow;
// starts to ignore bad window errors from X
void qt_ignore_badwindow()
{
- x11_ignore_badwindow = TRUE;
- x11_badwindow = FALSE;
+ x11_ignore_badwindow = true;
+ x11_badwindow = false;
}
// ends ignoring bad window errors and returns whether an error
// had happen.
bool qt_badwindow()
{
- x11_ignore_badwindow = FALSE;
+ x11_ignore_badwindow = false;
return x11_badwindow;
}
@@ -793,7 +793,7 @@ static int (*original_xio_errhandler)( Display *dpy );
static int qt_x_errhandler( Display *dpy, XErrorEvent *err )
{
if ( err->error_code == BadWindow ) {
- x11_badwindow = TRUE;
+ x11_badwindow = true;
if ( err->request_code == 25 /* X_SendEvent */ &&
qt_xdnd_handle_badwindow() )
return 0;
@@ -862,7 +862,7 @@ void qt_x11_intern_atom( const char *name, Atom *result)
} else {
if ( !atoms_to_be_created ) {
atoms_to_be_created = new TQAsciiDict<Atom>;
- atoms_to_be_created->setAutoDelete( FALSE );
+ atoms_to_be_created->setAutoDelete( false );
}
atoms_to_be_created->insert( name, result );
*result = 0;
@@ -910,7 +910,7 @@ static void tqt_x11_process_intern_atoms()
#endif
delete atoms_to_be_created;
atoms_to_be_created = 0;
- create_atoms_now = TRUE;
+ create_atoms_now = true;
}
}
@@ -929,7 +929,7 @@ bool TQApplication::x11_apply_settings()
unsigned long nitems, after = 1;
unsigned char *data = 0;
TQDateTime timestamp, settingsstamp;
- bool update_timestamp = FALSE;
+ bool update_timestamp = false;
if (XGetWindowProperty(appDpy, TQPaintDevice::x11AppRootWindow( 0 ),
qt_settings_timestamp, 0, 0,
@@ -961,14 +961,14 @@ bool TQApplication::x11_apply_settings()
TQSettings settings;
settingsstamp = settings.lastModificationTime( "/qt/font" );
if (! settingsstamp.isValid())
- return FALSE;
+ return false;
if ( appliedstamp && appliedstamp == settingsstamp.toTime_t() )
- return TRUE;
+ return true;
appliedstamp = settingsstamp.toTime_t();
if (! timestamp.isValid() || settingsstamp > timestamp)
- update_timestamp = TRUE;
+ update_timestamp = true;
/*
TQt settings. This is now they are written into the datastream.
@@ -1019,7 +1019,7 @@ bool TQApplication::x11_apply_settings()
}
if (pal != *tqt_std_pal && pal != TQApplication::palette()) {
- TQApplication::setPalette(pal, TRUE);
+ TQApplication::setPalette(pal, true);
*tqt_std_pal = pal;
}
@@ -1031,7 +1031,7 @@ bool TQApplication::x11_apply_settings()
font.fromString(str);
if (font != TQApplication::font())
- TQApplication::setFont(font, TRUE);
+ TQApplication::setFont(font, true);
}
}
@@ -1050,8 +1050,8 @@ bool TQApplication::x11_apply_settings()
TQString stylename = settings.readEntry( "/qt/style" );
if ( !stylename.isEmpty() && !tqt_explicit_app_style ) {
TQApplication::setStyle( stylename );
- // took the style from the user settings, so mark the explicit flag FALSE
- tqt_explicit_app_style = FALSE;
+ // took the style from the user settings, so mark the explicit flag false
+ tqt_explicit_app_style = false;
}
num =
@@ -1124,10 +1124,10 @@ bool TQApplication::x11_apply_settings()
settings.readBoolEntry("/qt/brokenWindowManager", qt_broken_wm);
tqt_resolve_symlinks =
- settings.readBoolEntry("/qt/resolveSymlinks", TRUE);
+ settings.readBoolEntry("/qt/resolveSymlinks", true);
qt_use_rtl_extensions =
- settings.readBoolEntry("/qt/useRtlExtensions", FALSE);
+ settings.readBoolEntry("/qt/useRtlExtensions", false);
#ifndef TQT_NO_XIM
if (qt_xim_preferred_style == 0) {
@@ -1178,7 +1178,7 @@ bool TQApplication::x11_apply_settings()
stamp.buffer().size());
}
- return TRUE;
+ return true;
}
@@ -1226,13 +1226,13 @@ static void qt_set_x11_resources( const char* font = 0, const char* fg = 0,
TQCString resFont, resFG, resBG, resEF, sysFont;
- TQApplication::setEffectEnabled( TQt::UI_General, FALSE);
- TQApplication::setEffectEnabled( TQt::UI_AnimateMenu, FALSE);
- TQApplication::setEffectEnabled( TQt::UI_FadeMenu, FALSE);
- TQApplication::setEffectEnabled( TQt::UI_AnimateCombo, FALSE );
- TQApplication::setEffectEnabled( TQt::UI_AnimateTooltip, FALSE );
- TQApplication::setEffectEnabled( TQt::UI_FadeTooltip, FALSE );
- TQApplication::setEffectEnabled( TQt::UI_AnimateToolBox, FALSE );
+ TQApplication::setEffectEnabled( TQt::UI_General, false);
+ TQApplication::setEffectEnabled( TQt::UI_AnimateMenu, false);
+ TQApplication::setEffectEnabled( TQt::UI_FadeMenu, false);
+ TQApplication::setEffectEnabled( TQt::UI_AnimateCombo, false );
+ TQApplication::setEffectEnabled( TQt::UI_AnimateTooltip, false );
+ TQApplication::setEffectEnabled( TQt::UI_FadeTooltip, false );
+ TQApplication::setEffectEnabled( TQt::UI_AnimateToolBox, false );
if ( TQApplication::desktopSettingsAware() && !TQApplication::x11_apply_settings() ) {
int format;
@@ -1268,7 +1268,7 @@ static void qt_set_x11_resources( const char* font = 0, const char* fg = 0,
r = resl;
while ( isspace((uchar) res[l]) )
l++;
- bool mine = FALSE;
+ bool mine = false;
if ( res[l] == '*' &&
(res[l+1] == 'f' || res[l+1] == 'b' || res[l+1] == 'g' ||
res[l+1] == 'F' || res[l+1] == 'B' || res[l+1] == 'G' ||
@@ -1279,20 +1279,20 @@ static void qt_set_x11_resources( const char* font = 0, const char* fg = 0,
int i = item.find( ":" );
key = item.left( i ).stripWhiteSpace().mid(1).lower();
value = item.right( item.length() - i - 1 ).stripWhiteSpace();
- mine = TRUE;
+ mine = true;
} else if ( res[l] == appName[0] || (appClass && res[l] == appClass[0]) ) {
if (res.mid(l,apnl) == apn && (res[l+apnl] == '.' || res[l+apnl] == '*')) {
TQCString item = res.mid( l, r - l ).simplifyWhiteSpace();
int i = item.find( ":" );
key = item.left( i ).stripWhiteSpace().mid(apnl+1).lower();
value = item.right( item.length() - i - 1 ).stripWhiteSpace();
- mine = TRUE;
+ mine = true;
} else if (res.mid(l,apcl) == apc && (res[l+apcl] == '.' || res[l+apcl] == '*')) {
TQCString item = res.mid( l, r - l ).simplifyWhiteSpace();
int i = item.find( ":" );
key = item.left( i ).stripWhiteSpace().mid(apcl+1).lower();
value = item.right( item.length() - i - 1 ).stripWhiteSpace();
- mine = TRUE;
+ mine = true;
}
}
@@ -1348,7 +1348,7 @@ static void qt_set_x11_resources( const char* font = 0, const char* fg = 0,
}
if ( fnt != TQApplication::font() ) {
- TQApplication::setFont( fnt, TRUE );
+ TQApplication::setFont( fnt, true );
}
}
@@ -1374,10 +1374,10 @@ static void qt_set_x11_resources( const char* font = 0, const char* fg = 0,
int h,s,v;
fg.hsv(&h,&s,&v);
TQColor base = TQt::white;
- bool bright_mode = FALSE;
+ bool bright_mode = false;
if (v >= 255-50) {
base = btn.dark(150);
- bright_mode = TRUE;
+ bright_mode = true;
}
TQColorGroup cg( fg, btn, btn.light(),
@@ -1403,7 +1403,7 @@ static void qt_set_x11_resources( const char* font = 0, const char* fg = 0,
}
TQPalette pal( cg, dcg, cg );
if ( pal != *tqt_std_pal && pal != TQApplication::palette() )
- TQApplication::setPalette( pal, TRUE );
+ TQApplication::setPalette( pal, true );
*tqt_std_pal = pal;
}
@@ -1436,7 +1436,7 @@ static void qt_detect_broken_window_manager()
if (e == Success && type == XA_WINDOW && format == 32 && nitems == 1 && after == 0) {
// detected SGI 4Dwm
- qt_broken_wm = TRUE;
+ qt_broken_wm = true;
}
}
@@ -1494,13 +1494,13 @@ void qt_get_net_supported()
bool qt_net_supports(Atom atom)
{
if (! qt_net_supported_list)
- return FALSE;
+ return false;
- bool supported = FALSE;
+ bool supported = false;
int i = 0;
while (qt_net_supported_list[i] != 0) {
if (qt_net_supported_list[i++] == atom) {
- supported = TRUE;
+ supported = true;
break;
}
}
@@ -1688,7 +1688,7 @@ void tqt_init_internal( int *argcptr, char **argv,
if ( display && ((!argcptr) || (!argv)) ) {
// TQt part of other application
- appForeignDpy = TRUE;
+ appForeignDpy = true;
appDpy = display;
// Set application name and class
@@ -1797,7 +1797,7 @@ void tqt_init_internal( int *argcptr, char **argv,
}
#endif
} else if ( arg == "-cmap" ) { // xv uses this name
- qt_cmap_option = TRUE;
+ qt_cmap_option = true;
}
#if defined(QT_DEBUG)
else if ( arg == "-sync" )
@@ -1828,7 +1828,7 @@ void tqt_init_internal( int *argcptr, char **argv,
s += (char)c;
}
if ( s == "gdb" ) {
- appNoGrab = TRUE;
+ appNoGrab = true;
tqDebug( "TQt: gdb: -nograb added to command-line options.\n"
"\t Use the -dograb option to enforce grabbing." );
}
@@ -1839,7 +1839,7 @@ void tqt_init_internal( int *argcptr, char **argv,
if ( display ) {
// Display connection already opened by another application
- appForeignDpy = TRUE;
+ appForeignDpy = true;
appDpy = display;
}
else {
@@ -1854,7 +1854,7 @@ void tqt_init_internal( int *argcptr, char **argv,
}
if ( appSync ) // if "-sync" argument
- XSynchronize( appDpy, TRUE );
+ XSynchronize( appDpy, true );
}
}
}
@@ -1888,7 +1888,7 @@ void tqt_init_internal( int *argcptr, char **argv,
int screen;
TQString serverVendor( ServerVendor( appDpy) );
if (serverVendor.contains("XFree86") && VendorRelease(appDpy) < 40300000)
- tqt_hebrew_keyboard_hack = TRUE;
+ tqt_hebrew_keyboard_hack = true;
for ( screen = 0; screen < appScreenCount; ++screen ) {
TQPaintDevice::x_appdepth_arr[ screen ] = DefaultDepth(appDpy, screen);
@@ -1911,7 +1911,7 @@ void tqt_init_internal( int *argcptr, char **argv,
TQPaintDevice::x_appdepth_arr[ screen ] = vi->depth;
TQPaintDevice::x_appcells_arr[ screen ] = vi->visual->map_entries;
TQPaintDevice::x_appvisual_arr[ screen ] = vi->visual;
- TQPaintDevice::x_appdefvisual_arr[ screen ] = FALSE;
+ TQPaintDevice::x_appdefvisual_arr[ screen ] = false;
XFree(vi);
} else {
// couldn't get info about the visual, use the default instead
@@ -1922,7 +1922,7 @@ void tqt_init_internal( int *argcptr, char **argv,
if (!vis) {
// use the default visual
vis = DefaultVisual(appDpy, screen);
- TQPaintDevice::x_appdefvisual_arr[ screen ] = TRUE;
+ TQPaintDevice::x_appdefvisual_arr[ screen ] = true;
if ( qt_visual_option == TrueColor ||
TQApplication::colorSpec() == TQApplication::ManyColor ) {
@@ -1954,7 +1954,7 @@ void tqt_init_internal( int *argcptr, char **argv,
if ( colormap && screen == appScreen ) {
// use the provided colormap for the default screen only
TQPaintDevice::x_appcolormap_arr[ screen ] = colormap;
- TQPaintDevice::x_appdefcolormap_arr[ screen ] = FALSE;
+ TQPaintDevice::x_appdefcolormap_arr[ screen ] = false;
} else {
if ( vis->c_class == TrueColor ) {
TQPaintDevice::x_appdefcolormap_arr[ screen ] =
@@ -2120,7 +2120,7 @@ void tqt_init_internal( int *argcptr, char **argv,
Q_UNUSED( xrandr_eventbase );
if ( XRRQueryExtension( appDpy, &xrandr_eventbase, &xrandr_errorbase ) ) {
// XRandR is supported
- qt_use_xrandr = TRUE;
+ qt_use_xrandr = true;
}
#endif // TQT_NO_XRANDR
@@ -2142,7 +2142,7 @@ void tqt_init_internal( int *argcptr, char **argv,
int xsync_major, xsync_minor;
if ( XSyncQueryExtension( appDpy, &xsync_eventbase, &xsync_errorbase ) &&
XSyncInitialize( appDpy, &xsync_major, &xsync_minor ) ) {
- qt_use_xsync = TRUE;
+ qt_use_xsync = true;
}
#endif
@@ -2312,7 +2312,7 @@ void tqt_init_internal( int *argcptr, char **argv,
}
dev = NULL;
for ( devs = devices, i = 0; i < ndev; i++, devs++ ) {
- gotEraser = FALSE;
+ gotEraser = false;
#if defined(Q_OS_IRIX)
gotStylus = ( !strncmp(devs->name,
@@ -2437,7 +2437,7 @@ void tqt_init_internal( int *argcptr, char **argv,
}
tqt_resolve_symlinks =
- settings.readBoolEntry("/qt/resolveSymlinks", TRUE);
+ settings.readBoolEntry("/qt/resolveSymlinks", true);
}
}
}
@@ -2636,7 +2636,7 @@ void qt_save_rootinfo() // save new root info
void qt_updated_rootinfo()
{
- app_save_rootinfo = TRUE;
+ app_save_rootinfo = true;
}
bool qt_wstate_iconified( WId winid )
@@ -2648,7 +2648,7 @@ bool qt_wstate_iconified( WId winid )
int r = XGetWindowProperty( appDpy, winid, tqt_wm_state, 0, 2,
False, AnyPropertyType, &type, &format,
&length, &after, &data );
- bool iconic = FALSE;
+ bool iconic = false;
if ( r == Success && data && format == 32 ) {
// TQ_UINT32 *wstate = (TQ_UINT32*)data;
unsigned long *wstate = (unsigned long *) data;
@@ -2694,7 +2694,7 @@ bool qt_nograb() // application no-grab option
#if defined(QT_DEBUG)
return appNoGrab;
#else
- return FALSE;
+ return false;
#endif
}
@@ -2738,13 +2738,13 @@ GC tqt_xget_readonly_gc( int scrn, bool monochrome ) // get read-only GC
if ( !app_gc_ro_m ) // create GC for bitmap
memset( (app_gc_ro_m = new GC[appScreenCount]), 0, appScreenCount * sizeof( GC ) );
if ( !app_gc_ro_m[scrn] )
- app_gc_ro_m[scrn] = create_gc( scrn, TRUE );
+ app_gc_ro_m[scrn] = create_gc( scrn, true );
gc = app_gc_ro_m[scrn];
} else { // create standard GC
if ( !app_gc_ro )
memset( (app_gc_ro = new GC[appScreenCount]), 0, appScreenCount * sizeof( GC ) );
if ( !app_gc_ro[scrn] )
- app_gc_ro[scrn] = create_gc( scrn, FALSE );
+ app_gc_ro[scrn] = create_gc( scrn, false );
gc = app_gc_ro[scrn];
}
return gc;
@@ -2762,13 +2762,13 @@ GC tqt_xget_temp_gc( int scrn, bool monochrome ) // get temporary GC
if ( !app_gc_tmp_m ) // create GC for bitmap
memset( (app_gc_tmp_m = new GC[appScreenCount]), 0, appScreenCount * sizeof( GC ) );
if ( !app_gc_tmp_m[scrn] )
- app_gc_tmp_m[scrn] = create_gc( scrn, TRUE );
+ app_gc_tmp_m[scrn] = create_gc( scrn, true );
gc = app_gc_tmp_m[scrn];
} else { // create standard GC
if ( !app_gc_tmp )
memset( (app_gc_tmp = new GC[appScreenCount]), 0, appScreenCount * sizeof( GC ) );
if ( !app_gc_tmp[scrn] )
- app_gc_tmp[scrn] = create_gc( scrn, FALSE );
+ app_gc_tmp[scrn] = create_gc( scrn, false );
gc = app_gc_tmp[scrn];
}
return gc;
@@ -2895,9 +2895,9 @@ static TQCursorList *cursorStack = 0;
corresponding restoreOverrideCursor(), otherwise the stack will
never be emptied.
- If \a replace is TRUE, the new cursor will replace the last
+ If \a replace is true, the new cursor will replace the last
override cursor (the stack keeps its depth). If \a replace is
- FALSE, the new stack is pushed onto the top of the stack.
+ false, the new stack is pushed onto the top of the stack.
Example:
\code
@@ -2914,7 +2914,7 @@ void TQApplication::setOverrideCursor( const TQCursor &cursor, bool replace )
if ( !cursorStack ) {
cursorStack = new TQCursorList;
TQ_CHECK_PTR( cursorStack );
- cursorStack->setAutoDelete( TRUE );
+ cursorStack->setAutoDelete( true );
}
app_cursor = new TQCursor( cursor );
TQ_CHECK_PTR( app_cursor );
@@ -2970,15 +2970,15 @@ void TQApplication::restoreOverrideCursor()
/*!
\fn bool TQApplication::hasGlobalMouseTracking()
- Returns TRUE if global mouse tracking is enabled; otherwise
- returns FALSE.
+ Returns true if global mouse tracking is enabled; otherwise
+ returns false.
\sa setGlobalMouseTracking()
*/
/*!
- Enables global mouse tracking if \a enable is TRUE, or disables it
- if \a enable is FALSE.
+ Enables global mouse tracking if \a enable is true, or disables it
+ if \a enable is false.
Enabling global mouse tracking makes it possible for widget event
filters or application event filters to get all mouse move events,
@@ -2987,18 +2987,18 @@ void TQApplication::restoreOverrideCursor()
Global mouse tracking does not affect widgets and their
mouseMoveEvent(). For a widget to get mouse move events when no
- button is depressed, it must do TQWidget::setMouseTracking(TRUE).
+ button is depressed, it must do TQWidget::setMouseTracking(true).
This function uses an internal counter. Each
- setGlobalMouseTracking(TRUE) must have a corresponding
- setGlobalMouseTracking(FALSE):
+ setGlobalMouseTracking(true) must have a corresponding
+ setGlobalMouseTracking(false):
\code
// at this point global mouse tracking is off
- TQApplication::setGlobalMouseTracking( TRUE );
- TQApplication::setGlobalMouseTracking( TRUE );
- TQApplication::setGlobalMouseTracking( FALSE );
+ TQApplication::setGlobalMouseTracking( true );
+ TQApplication::setGlobalMouseTracking( true );
+ TQApplication::setGlobalMouseTracking( false );
// at this point it's still on
- TQApplication::setGlobalMouseTracking( FALSE );
+ TQApplication::setGlobalMouseTracking( false );
// but now it's off
\endcode
@@ -3019,13 +3019,13 @@ void TQApplication::setGlobalMouseTracking( bool enable )
while ( (w=it.current()) ) {
if ( app_tracking > 0 ) { // switch on
if ( !w->testWState(WState_MouseTracking) ) {
- w->setMouseTracking( TRUE );
+ w->setMouseTracking( true );
w->clearWState( WState_MouseTracking );
}
} else { // switch off
if ( !w->testWState(WState_MouseTracking) ) {
w->setWState( WState_MouseTracking );
- w->setMouseTracking( FALSE );
+ w->setMouseTracking( false );
}
}
++it;
@@ -3046,7 +3046,7 @@ Window qt_x11_findClientWindow( Window win, Atom property, bool leaf )
uchar *data;
Window root, parent, target=0, *children=0;
uint nchildren;
- if ( XGetWindowProperty( appDpy, win, property, 0, 0, FALSE, AnyPropertyType,
+ if ( XGetWindowProperty( appDpy, win, property, 0, 0, false, AnyPropertyType,
&type, &format, &nitems, &after, &data ) == Success ) {
if ( data )
XFree( (char *)data );
@@ -3070,9 +3070,9 @@ Window qt_x11_findClientWindow( Window win, Atom property, bool leaf )
Returns a pointer to the widget at global screen position \a
(x, y), or 0 if there is no TQt widget there.
- If \a child is FALSE and there is a child widget at position \a
+ If \a child is false and there is a child widget at position \a
(x, y), the top-level widget containing it is returned. If \a child
- is TRUE the child widget at position \a (x, y) is returned.
+ is true the child widget at position \a (x, y) is returned.
This function is normally rather slow.
@@ -3098,7 +3098,7 @@ TQWidget *TQApplication::widgetAt( int x, int y, bool child )
if ( !w ) {
qt_ignore_badwindow();
- target = qt_x11_findClientWindow( target, tqt_wm_state, TRUE );
+ target = qt_x11_findClientWindow( target, tqt_wm_state, true );
if (qt_badwindow() )
return 0;
w = TQWidget::find( (WId)target );
@@ -3144,9 +3144,9 @@ TQWidget *TQApplication::widgetAt( int x, int y, bool child )
Returns a pointer to the widget at global screen position \a pos,
or 0 if there is no TQt widget there.
- If \a child is FALSE and there is a child widget at position \a
+ If \a child is false and there is a child widget at position \a
pos, the top-level widget containing it is returned. If \a child
- is TRUE the child widget at position \a pos is returned.
+ is true the child widget at position \a pos is returned.
*/
@@ -3338,7 +3338,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
{
switch ( event->type ) {
case ButtonPress:
- ignoreNextMouseReleaseEvent = FALSE;
+ ignoreNextMouseReleaseEvent = false;
tqt_x_user_time = event->xbutton.time;
// fallthrough intended
case ButtonRelease:
@@ -3386,11 +3386,11 @@ int TQApplication::x11ProcessEvent( XEvent* event )
}
TQETWidget *keywidget=0;
- bool grabbed=FALSE;
+ bool grabbed=false;
if ( event->type==XKeyPress || event->type==XKeyRelease ) {
keywidget = (TQETWidget*)TQWidget::keyboardGrabber();
if ( keywidget ) {
- grabbed = TRUE;
+ grabbed = true;
} else {
if ( focus_widget )
keywidget = (TQETWidget*)focus_widget;
@@ -3419,12 +3419,12 @@ int TQApplication::x11ProcessEvent( XEvent* event )
// #endif
if( ( event->type==XKeyPress || event->type==XKeyRelease ) &&
sm_blockUserInput ) // block user interaction during session management
- return TRUE;
+ return true;
// for XIM handling
TQInputContext *qic = keywidget->getInputContext();
if( qic && qic->x11FilterEvent( keywidget, event ) )
- return TRUE;
+ return true;
// filterEvent() accepts TQEvent *event rather than preexpanded key
// event attribute values. This is intended to pass other IM-related
@@ -3442,20 +3442,20 @@ int TQApplication::x11ProcessEvent( XEvent* event )
keywidget->translateKeyEventInternal( event, count, text,
state, ascii, code, type,
- FALSE, FALSE );
+ false, false );
// both key press/release is required for some complex
// input methods. don't eliminate anything.
- TQKeyEvent keyevent( type, code, ascii, state, text, FALSE, count );
+ TQKeyEvent keyevent( type, code, ascii, state, text, false, count );
if( qic && qic->filterEvent( &keyevent ) )
- return TRUE;
+ return true;
}
} else
#endif // TQT_NO_IM
{
if ( XFilterEvent( event, None ) )
- return TRUE;
+ return true;
}
if ( qt_x11EventFilter(event) ) // send through app filter
@@ -3569,7 +3569,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
if ( app_do_modal ) // modal event handling
if ( !tqt_try_modal(widget, event) ) {
if ( event->type == ClientMessage )
- x11ClientMessage( widget, event, TRUE );
+ x11ClientMessage( widget, event, true );
return 1;
}
@@ -3589,7 +3589,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
case ButtonRelease: // mouse event
if ( ignoreNextMouseReleaseEvent ) {
- ignoreNextMouseReleaseEvent = FALSE;
+ ignoreNextMouseReleaseEvent = false;
break;
}
// fall through intended
@@ -3610,7 +3610,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
widget->translateMouseEvent( event );
#if defined(QT_TABLET_SUPPORT)
} else {
- chokeMouse = FALSE;
+ chokeMouse = false;
}
#endif
break;
@@ -3755,7 +3755,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
widget->topData()->spont_unmapped = 1;
TQHideEvent e;
TQApplication::sendSpontaneousEvent( widget, &e );
- widget->hideChildren( TRUE );
+ widget->hideChildren( true );
}
break;
@@ -3763,7 +3763,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
if ( widget->isTopLevel() &&
widget->topData()->spont_unmapped ) {
widget->topData()->spont_unmapped = 0;
- widget->showChildren( TRUE );
+ widget->showChildren( true );
TQShowEvent e;
TQApplication::sendSpontaneousEvent( widget, &e );
}
@@ -3861,15 +3861,15 @@ int TQApplication::x11ProcessEvent( XEvent* event )
reimplement this function, you get direct access to all X events
that the are received from the X server.
- Return TRUE if you want to stop the event from being processed.
- Return FALSE for normal event dispatching.
+ Return true if you want to stop the event from being processed.
+ Return false for normal event dispatching.
\sa x11ProcessEvent()
*/
bool TQApplication::x11EventFilter( XEvent * )
{
- return FALSE;
+ return false;
}
@@ -3909,9 +3909,9 @@ void tqt_enter_modal( TQWidget *widget )
tqt_dispatchEnterLeave( 0, TQWidget::find((WId)curWin) );
tqt_modal_stack->insert( 0, widget );
- app_do_modal = TRUE;
+ app_do_modal = true;
curWin = 0;
- ignoreNextMouseReleaseEvent = FALSE;
+ ignoreNextMouseReleaseEvent = false;
}
@@ -3922,13 +3922,13 @@ void tqt_leave_modal( TQWidget *widget )
delete tqt_modal_stack;
tqt_modal_stack = 0;
TQPoint p( TQCursor::pos() );
- TQWidget* w = TQApplication::widgetAt( p.x(), p.y(), TRUE );
+ TQWidget* w = TQApplication::widgetAt( p.x(), p.y(), true );
tqt_dispatchEnterLeave( w, TQWidget::find( curWin ) ); // send synthetic enter event
curWin = w? w->winId() : 0;
}
}
app_do_modal = tqt_modal_stack != 0;
- ignoreNextMouseReleaseEvent = TRUE;
+ ignoreNextMouseReleaseEvent = true;
if (widget->parentWidget()) {
TQEvent e(TQEvent::WindowUnblocked);
@@ -3945,16 +3945,16 @@ TQ_EXPORT bool tqt_try_modal( TQWidget *widget, XEvent *event )
case ButtonPress:
case ButtonRelease:
case MotionNotify:
- return TRUE;
+ return true;
default:
break;
}
}
if ( tqt_tryModalHelper( widget ) )
- return TRUE;
+ return true;
- bool block_event = FALSE;
+ bool block_event = false;
switch ( event->type ) {
case ButtonPress: // disallow mouse/key events
case ButtonRelease:
@@ -3964,7 +3964,7 @@ TQ_EXPORT bool tqt_try_modal( TQWidget *widget, XEvent *event )
case EnterNotify:
case LeaveNotify:
case ClientMessage:
- block_event = TRUE;
+ block_event = true;
break;
default:
break;
@@ -4000,10 +4000,10 @@ void TQApplication::openPopup( TQWidget *popup )
popupWidgets->append( popup ); // add to end of list
if ( popupWidgets->count() == 1 && !qt_nograb() ){ // grab mouse/keyboard
- int r = XGrabKeyboard( popup->x11Display(), popup->winId(), FALSE,
+ int r = XGrabKeyboard( popup->x11Display(), popup->winId(), false,
GrabModeSync, GrabModeAsync, CurrentTime );
if ( (popupGrabOk = (r == GrabSuccess)) ) {
- r = XGrabPointer( popup->x11Display(), popup->winId(), TRUE,
+ r = XGrabPointer( popup->x11Display(), popup->winId(), true,
(uint)(ButtonPressMask | ButtonReleaseMask |
ButtonMotionMask | EnterWindowMask |
LeaveWindowMask | PointerMotionMask),
@@ -4040,7 +4040,7 @@ void TQApplication::closePopup( TQWidget *popup )
popupOfPopupButtonFocus = 0;
}
if ( popupWidgets->count() == 0 ) { // this was the last popup
- popupCloseDownMode = TRUE; // control mouse events
+ popupCloseDownMode = true; // control mouse events
delete popupWidgets;
popupWidgets = 0;
if ( !qt_nograb() && popupGrabOk ) { // grabbing not disabled
@@ -4077,10 +4077,10 @@ void TQApplication::closePopup( TQWidget *popup )
aw->setFocus();
TQFocusEvent::resetReason();
if ( popupWidgets->count() == 1 && !qt_nograb() ){ // grab mouse/keyboard
- int r = XGrabKeyboard( aw->x11Display(), aw->winId(), FALSE,
+ int r = XGrabKeyboard( aw->x11Display(), aw->winId(), false,
GrabModeSync, GrabModeAsync, CurrentTime );
if ( (popupGrabOk = (r == GrabSuccess)) ) {
- r = XGrabPointer( aw->x11Display(), aw->winId(), TRUE,
+ r = XGrabPointer( aw->x11Display(), aw->winId(), true,
(uint)(ButtonPressMask | ButtonReleaseMask |
ButtonMotionMask | EnterWindowMask |
LeaveWindowMask | PointerMotionMask),
@@ -4131,7 +4131,7 @@ int qt_x11_translateButtonState( int s )
bool TQETWidget::translateMouseEvent( const XEvent *event )
{
- static bool manualGrab = FALSE;
+ static bool manualGrab = false;
TQEvent::Type type; // event parameters
TQPoint pos;
TQPoint globalPos;
@@ -4140,14 +4140,14 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
XEvent nextEvent;
if ( sm_blockUserInput ) // block user interaction during session management
- return TRUE;
+ return true;
static int x_root_save = -1, y_root_save = -1;
if ( event->type == MotionNotify ) { // mouse move
if (event->xmotion.root != RootWindow(appDpy, x11Screen()) &&
! qt_xdnd_dragging )
- return FALSE;
+ return false;
XMotionEvent lastMotion = event->xmotion;
while( XPending( appDpy ) ) { // compres mouse moves
@@ -4183,14 +4183,14 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
// throw away mouse move events that are sent multiple times to the same
// position
- bool throw_away = FALSE;
+ bool throw_away = false;
if ( x_root_save == globalPos.x() &&
y_root_save == globalPos.y() )
- throw_away = TRUE;
+ throw_away = true;
x_root_save = globalPos.x();
y_root_save = globalPos.y();
if ( throw_away )
- return TRUE;
+ return true;
} else if ( event->type == EnterNotify || event->type == LeaveNotify) {
XEvent *xevent = (XEvent *)event;
//unsigned int xstate = event->xcrossing.state;
@@ -4256,7 +4256,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
(btn == 6 || btn == 7) );
translateWheelEvent( globalPos.x(), globalPos.y(), delta, state, (hor)?Horizontal:Vertical );
}
- return TRUE;
+ return true;
// history navigation buttons
case 8: button = HistoryBackButton; break;
@@ -4269,8 +4269,8 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
if ( translateXinputEvent( &myEv ) ) {
//Spontaneous event sent. Check if we need to continue.
if ( chokeMouse ) {
- chokeMouse = FALSE;
- return FALSE;
+ chokeMouse = false;
+ return false;
}
}
}
@@ -4302,14 +4302,14 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
if ( translateXinputEvent( &myEv ) ) {
//Spontaneous event sent. Check if we need to continue.
if ( chokeMouse ) {
- chokeMouse = FALSE;
- return FALSE;
+ chokeMouse = false;
+ return false;
}
}
}
#endif
if ( manualGrab ) { // release manual grab
- manualGrab = FALSE;
+ manualGrab = false;
XUngrabPointer( x11Display(), CurrentTime );
XFlush( x11Display() );
}
@@ -4320,7 +4320,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
mouseActWindow = winId(); // save some event params
mouseButtonState = state;
if ( type == 0 ) // don't send event
- return FALSE;
+ return false;
if ( tqApp->inPopupMode() ) { // in popup mode
TQWidget *popup = tqApp->activePopupWidget();
@@ -4330,7 +4330,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
else // send to last popup
pos = popup->mapFromGlobal( globalPos );
}
- bool releaseAfter = FALSE;
+ bool releaseAfter = false;
TQWidget *popupChild = popup->childAt( pos );
TQWidget *popupTarget = popupChild ? popupChild : popup;
@@ -4351,7 +4351,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
popupOfPopupButtonFocus = popup;
break;
case TQEvent::MouseButtonRelease:
- releaseAfter = TRUE;
+ releaseAfter = true;
break;
default:
break; // nothing for mouse move
@@ -4398,7 +4398,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
} else {
if ( type != TQEvent::MouseButtonRelease && state != 0 &&
TQWidget::find((WId)mouseActWindow) ) {
- manualGrab = TRUE; // need to manually grab
+ manualGrab = true; // need to manually grab
XGrabPointer( dpy, mouseActWindow, False,
(uint)(ButtonPressMask | ButtonReleaseMask |
ButtonMotionMask |
@@ -4419,9 +4419,9 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
}
if ( popupCloseDownMode ) {
- popupCloseDownMode = FALSE;
+ popupCloseDownMode = false;
if ( testWFlags(WType_Popup) ) // ignore replayed event
- return TRUE;
+ return true;
}
if ( type == TQEvent::MouseButtonRelease &&
@@ -4441,7 +4441,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
TQApplication::sendSpontaneousEvent( widget, &e );
}
}
- return TRUE;
+ return true;
}
@@ -4458,7 +4458,7 @@ bool TQETWidget::translateWheelEvent( int global_x, int global_y, int delta, int
TQWheelEvent e( mapFromGlobal(TQPoint( global_x, global_y)),
TQPoint(global_x, global_y), delta, state, orient );
if ( TQApplication::sendSpontaneousEvent( this, &e ) )
- return TRUE;
+ return true;
}
// send the event to the widget that has the focus or its ancestors, if different
@@ -4470,9 +4470,9 @@ bool TQETWidget::translateWheelEvent( int global_x, int global_y, int delta, int
TQWheelEvent e( mapFromGlobal(TQPoint( global_x, global_y)),
TQPoint(global_x, global_y), delta, state, orient );
if ( TQApplication::sendSpontaneousEvent( w, &e ) )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -4586,7 +4586,7 @@ bool TQETWidget::translateXinputEvent( const XEvent *ev )
#if defined (Q_OS_IRIX)
s = XQueryDeviceState( appDpy, dev );
if ( s == NULL )
- return FALSE;
+ return false;
iClass = s->data;
for ( j = 0; j < s->num_classes; j++ ) {
if ( iClass->c_class == ValuatorClass ) {
@@ -4649,13 +4649,13 @@ bool TQETWidget::translateXinputEvent( const XEvent *ev )
TQTabletEvent e( t, curr, global, deviceType, pressure, xTilt, yTilt, tId );
TQApplication::sendSpontaneousEvent( w, &e );
- return TRUE;
+ return true;
}
#endif
bool TQETWidget::translatePropertyEvent(const XEvent *event)
{
- if (!isTopLevel()) return TRUE;
+ if (!isTopLevel()) return true;
Atom ret;
int format, e;
@@ -4682,8 +4682,8 @@ bool TQETWidget::translatePropertyEvent(const XEvent *event)
}
}
} else if (event->xproperty.atom == qt_net_wm_state) {
- bool max = FALSE;
- bool full = FALSE;
+ bool max = false;
+ bool full = false;
if (event->xproperty.state == PropertyNewValue) {
// using length of 1024 should be safe for all current and
@@ -4697,33 +4697,33 @@ bool TQETWidget::translatePropertyEvent(const XEvent *event)
unsigned long i;
for (i = 0; i < nitems; i++) {
if (states[i] == qt_net_wm_state_max_v || states[i] == qt_net_wm_state_max_h)
- max = TRUE;
+ max = true;
else if (states[i] == qt_net_wm_state_fullscreen)
- full = TRUE;
+ full = true;
}
}
}
- bool send_event = FALSE;
+ bool send_event = false;
if (qt_net_supports(qt_net_wm_state_max_v)
&& qt_net_supports(qt_net_wm_state_max_h)) {
if (max && !isMaximized()) {
setWState(WState_Maximized);
- send_event = TRUE;
+ send_event = true;
} else if (!max && isMaximized()) {
clearWState(WState_Maximized);
- send_event = TRUE;
+ send_event = true;
}
}
if (qt_net_supports(qt_net_wm_state_fullscreen)) {
if (full && !isFullScreen()) {
setWState(WState_FullScreen);
- send_event = TRUE;
+ send_event = true;
} else if (!full && isFullScreen()) {
clearWState(WState_FullScreen);
- send_event = TRUE;
+ send_event = true;
}
}
@@ -4803,7 +4803,7 @@ bool TQETWidget::translatePropertyEvent(const XEvent *event)
if (data)
XFree(data);
- return TRUE;
+ return true;
}
#ifndef XK_ISO_Left_Tab
@@ -5244,9 +5244,9 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
if ( !keyDict ) {
keyDict = new TQIntDict<void>( 13 );
- keyDict->setAutoDelete( FALSE );
+ keyDict->setAutoDelete( false );
textDict = new TQIntDict<void>( 13 );
- textDict->setAutoDelete( FALSE );
+ textDict->setAutoDelete( false );
tqAddPostRoutine( deleteKeyDicts );
}
@@ -5277,7 +5277,7 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
int keycode = event->xkey.keycode;
if ( type == TQEvent::KeyPress ) {
- bool mb=FALSE;
+ bool mb=false;
// commit string handling is done by
// TQXIMInputContext::x11FilterEvent() and are passed to
// widgets via TQIMEvent regardless of XIM style, so the
@@ -5287,7 +5287,7 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
TQTLWExtra* xd = tlw->topData();
TQInputContext *qic = (TQInputContext *) xd->xic;
if ( qic ) {
- mb=TRUE;
+ mb=true;
count = qic->lookupString(&xkeyevent, chars, &key, &status);
}
}
@@ -5383,7 +5383,7 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
chars[0] = 0;
directionKeyEvent = 0;
lastWinId = 0;
- return TRUE;
+ return true;
} else {
directionKeyEvent = 0;
lastWinId = 0;
@@ -5514,7 +5514,7 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
text = converted;
else
text = chars;
- return TRUE;
+ return true;
}
@@ -5537,14 +5537,14 @@ extern "C" {
static Bool qt_keypress_scanner(Display *, XEvent *event, XPointer arg)
{
if (event->type != XKeyPress && event->type != XKeyRelease)
- return FALSE;
+ return false;
qt_auto_repeat_data *d = (qt_auto_repeat_data *) arg;
if (d->error ||
event->xkey.window != d->window ||
event->xkey.keycode != d->keycode) {
- d->error = TRUE;
- return FALSE;
+ d->error = true;
+ return false;
}
if (event->type == XKeyPress) {
@@ -5555,15 +5555,15 @@ static Bool qt_keypress_scanner(Display *, XEvent *event, XPointer arg)
// must be XKeyRelease event
if (d->release) {
// found a second release
- d->error = TRUE;
- return FALSE;
+ d->error = true;
+ return false;
}
// found a single release
- d->release = TRUE;
+ d->release = true;
d->timestamp = event->xkey.time;
- return FALSE;
+ return false;
}
static Bool qt_keyrelease_scanner(Display *, XEvent *event, XPointer arg)
@@ -5586,15 +5586,15 @@ bool TQETWidget::translateKeyEvent( const XEvent *event, bool grab )
char ascii = 0;
if ( sm_blockUserInput ) // block user interaction during session management
- return TRUE;
+ return true;
Display *dpy = x11Display();
if ( !isEnabled() )
- return TRUE;
+ return true;
TQEvent::Type type;
- bool autor = FALSE;
+ bool autor = false;
TQString text;
translateKeyEventInternal( event, count, text, state, ascii, code, type,
@@ -5609,18 +5609,18 @@ bool TQETWidget::translateKeyEvent( const XEvent *event, bool grab )
if ( event->type == XKeyPress ) {
if ( curr_autorep == event->xkey.keycode ) {
- autor = TRUE;
+ autor = true;
curr_autorep = 0;
}
} else {
// look ahead for auto-repeat
XEvent nextpress;
- auto_repeat_data.release = TRUE;
- auto_repeat_data.error = FALSE;
+ auto_repeat_data.release = true;
+ auto_repeat_data.error = false;
if (XCheckIfEvent(dpy, &nextpress, &qt_keypress_scanner,
(XPointer) &auto_repeat_data)) {
- autor = TRUE;
+ autor = true;
// Put it back... we COULD send the event now and not need
// the static curr_autorep variable.
@@ -5635,7 +5635,7 @@ bool TQETWidget::translateKeyEvent( const XEvent *event, bool grab )
TQKeyEvent a( type, code, ascii, state, text, autor,
TQMAX( TQMAX(count,1), int(text.length())) );
if ( tqt_tryAccelEvent( this, &a ) )
- return TRUE;
+ return true;
}
long save = 0;
@@ -5691,7 +5691,7 @@ bool TQETWidget::translateKeyEvent( const XEvent *event, bool grab )
XEvent evPress;
// sync the event queue, this makes key compress work better
- XSync( dpy, FALSE );
+ XSync( dpy, false );
for (;;) {
TQString textIntern;
@@ -5743,8 +5743,8 @@ bool TQETWidget::translateKeyEvent( const XEvent *event, bool grab )
XEvent dummy;
for (;;) {
- auto_repeat_data.release = FALSE;
- auto_repeat_data.error = FALSE;
+ auto_repeat_data.release = false;
+ auto_repeat_data.error = false;
if (! XCheckIfEvent(dpy, &dummy, &qt_keypress_scanner,
(XPointer) &auto_repeat_data))
break;
@@ -5769,7 +5769,7 @@ bool TQETWidget::translateKeyEvent( const XEvent *event, bool grab )
TQContextMenuEvent e( TQContextMenuEvent::Keyboard, TQPoint( 5, 5 ), mapToGlobal( TQPoint( 5, 5 ) ), 0 );
TQApplication::sendSpontaneousEvent( this, &e );
if( e.isAccepted() )
- return TRUE;
+ return true;
}
TQKeyEvent e( type, code, ascii, state, text, autor,
@@ -5816,7 +5816,7 @@ void qt_insert_sip( TQWidget* scrolled_widget, int dx, int dy )
{
if ( !sip_list ) {
sip_list = new TQPtrList<TQScrollInProgress>;
- sip_list->setAutoDelete( TRUE );
+ sip_list->setAutoDelete( true );
}
TQScrollInProgress* sip = new TQScrollInProgress( scrolled_widget, dx, dy );
@@ -5869,10 +5869,10 @@ bool translateBySips( TQWidget* that, TQRect& paintRect )
}
if ( sips > 1 ) {
paintRect.moveBy( dx, dy );
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
bool TQETWidget::translatePaintEvent( const XEvent *event )
@@ -5901,7 +5901,7 @@ bool TQETWidget::translatePaintEvent( const XEvent *event )
xevent.xexpose.width,
xevent.xexpose.height);
if ( translateBySips( this, exposure ) )
- should_clip = TRUE;
+ should_clip = true;
paintRegion = paintRegion.unite( exposure );
} else {
translateScrollDoneEvent( &xevent );
@@ -5912,7 +5912,7 @@ bool TQETWidget::translatePaintEvent( const XEvent *event )
if ( should_clip ) {
paintRegion = paintRegion.intersect( rect() );
if ( paintRegion.isEmpty() )
- return TRUE;
+ return true;
}
TQPaintEvent e( paintRegion );
@@ -5923,7 +5923,7 @@ bool TQETWidget::translatePaintEvent( const XEvent *event )
TQApplication::sendSpontaneousEvent( this, &e );
qt_clear_paintevent_clipping();
clearWState( WState_InPaintEvent );
- return TRUE;
+ return true;
}
//
@@ -5932,7 +5932,7 @@ bool TQETWidget::translatePaintEvent( const XEvent *event )
bool TQETWidget::translateScrollDoneEvent( const XEvent *event )
{
- if ( !sip_list ) return FALSE;
+ if ( !sip_list ) return false;
long id = event->xclient.data.l[0];
@@ -5940,11 +5940,11 @@ bool TQETWidget::translateScrollDoneEvent( const XEvent *event )
for (TQScrollInProgress* sip = sip_list->first(); sip; sip=sip_list->next()) {
if ( sip->id == id ) {
sip_list->remove( sip_list->current() );
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
#if defined(Q_C_CALLBACKS)
@@ -6030,7 +6030,7 @@ bool TQETWidget::translateConfigEvent( const XEvent *event )
TQRect cr ( geometry() );
if ( newSize != cr.size() ) { // size changed
- was_resize = TRUE;
+ was_resize = true;
TQSize oldSize = size();
cr.setSize( newSize );
crect = cr;
@@ -6081,7 +6081,7 @@ bool TQETWidget::translateConfigEvent( const XEvent *event )
incrementSyncCounter();
- return TRUE;
+ return true;
}
@@ -6090,7 +6090,7 @@ bool TQETWidget::translateConfigEvent( const XEvent *event )
//
bool TQETWidget::translateCloseEvent( const XEvent * )
{
- return close(FALSE);
+ return close(false);
}
@@ -6188,7 +6188,7 @@ int TQApplication::wheelScrollLines()
}
/*!
- Enables the UI effect \a effect if \a enable is TRUE, otherwise
+ Enables the UI effect \a effect if \a enable is true, otherwise
the effect will not be used.
Note: All effects are disabled on screens running at less than
@@ -6200,24 +6200,24 @@ void TQApplication::setEffectEnabled( TQt::UIEffect effect, bool enable )
{
switch (effect) {
case UI_AnimateMenu:
- if ( enable ) fade_menu = FALSE;
+ if ( enable ) fade_menu = false;
animate_menu = enable;
break;
case UI_FadeMenu:
if ( enable )
- animate_menu = TRUE;
+ animate_menu = true;
fade_menu = enable;
break;
case UI_AnimateCombo:
animate_combo = enable;
break;
case UI_AnimateTooltip:
- if ( enable ) fade_tooltip = FALSE;
+ if ( enable ) fade_tooltip = false;
animate_tooltip = enable;
break;
case UI_FadeTooltip:
if ( enable )
- animate_tooltip = TRUE;
+ animate_tooltip = true;
fade_tooltip = enable;
break;
case UI_AnimateToolBox:
@@ -6230,10 +6230,10 @@ void TQApplication::setEffectEnabled( TQt::UIEffect effect, bool enable )
}
/*!
- Returns TRUE if \a effect is enabled; otherwise returns FALSE.
+ Returns true if \a effect is enabled; otherwise returns false.
By default, TQt will try to use the desktop settings. Call
- setDesktopSettingsAware(FALSE) to prevent this.
+ setDesktopSettingsAware(false) to prevent this.
Note: All effects are disabled on screens running at less than
16-bit color depth.
@@ -6243,7 +6243,7 @@ void TQApplication::setEffectEnabled( TQt::UIEffect effect, bool enable )
bool TQApplication::isEffectEnabled( TQt::UIEffect effect )
{
if ( TQColor::numBitPlanes() < 16 || !animate_ui )
- return FALSE;
+ return false;
switch( effect ) {
case UI_AnimateMenu:
@@ -6329,16 +6329,16 @@ static void sm_performSaveYourself( TQSessionManagerData* );
static void resetSmState()
{
-// sm_waitingForPhase2 = FALSE; ### never used?!?
- sm_waitingForInteraction = FALSE;
- sm_interactionActive = FALSE;
+// sm_waitingForPhase2 = false; ### never used?!?
+ sm_waitingForInteraction = false;
+ sm_interactionActive = false;
sm_interactStyle = SmInteractStyleNone;
- sm_smActive = FALSE;
- sm_blockUserInput = FALSE;
- sm_isshutdown = FALSE;
-// sm_shouldbefast = FALSE; ### never used?!?
- sm_phase2 = FALSE;
- sm_in_phase2 = FALSE;
+ sm_smActive = false;
+ sm_blockUserInput = false;
+ sm_isshutdown = false;
+// sm_shouldbefast = false; ### never used?!?
+ sm_phase2 = false;
+ sm_in_phase2 = false;
}
@@ -6398,8 +6398,8 @@ static void sm_saveYourselfCallback( SmcConn smcConn, SmPointer clientData,
{
if (smcConn != smcConnection )
return;
- sm_cancel = FALSE;
- sm_smActive = TRUE;
+ sm_cancel = false;
+ sm_smActive = true;
sm_isshutdown = shutdown;
sm_saveType = saveType;
sm_interactStyle = interactStyle;
@@ -6407,9 +6407,9 @@ static void sm_saveYourselfCallback( SmcConn smcConn, SmPointer clientData,
// ugly workaround for broken libSM. libSM should do that _before_
// actually invoking the callback in sm_process.c
- ( (QT_smcConn*)smcConn )->save_yourself_in_progress = TRUE;
+ ( (QT_smcConn*)smcConn )->save_yourself_in_progress = true;
if ( sm_isshutdown )
- ( (QT_smcConn*)smcConn )->shutdown_in_progress = TRUE;
+ ( (QT_smcConn*)smcConn )->shutdown_in_progress = true;
sm_performSaveYourself( (TQSessionManagerData*) clientData );
if ( !sm_isshutdown ) // we cannot expect a confirmation message in that case
@@ -6419,7 +6419,7 @@ static void sm_saveYourselfCallback( SmcConn smcConn, SmPointer clientData,
static void sm_performSaveYourself( TQSessionManagerData* smd )
{
if ( sm_isshutdown )
- sm_blockUserInput = TRUE;
+ sm_blockUserInput = true;
TQSessionManager* sm = smd->sm;
@@ -6462,7 +6462,7 @@ static void sm_performSaveYourself( TQSessionManagerData* smd )
if ( sm_phase2 && !sm_in_phase2 ) {
SmcRequestSaveYourselfPhase2( smcConnection, sm_saveYourselfPhase2Callback, (SmPointer*) smd );
- sm_blockUserInput = FALSE;
+ sm_blockUserInput = false;
}
else {
// close eventual interaction monitors and cancel the
@@ -6470,12 +6470,12 @@ static void sm_performSaveYourself( TQSessionManagerData* smd )
// performing a shutdown, it does not work for checkpoints
if ( sm_interactionActive ) {
SmcInteractDone( smcConnection, sm_isshutdown && sm_cancel);
- sm_interactionActive = FALSE;
+ sm_interactionActive = false;
}
else if ( sm_cancel && sm_isshutdown ) {
if ( sm->allowsErrorInteraction() ) {
SmcInteractDone( smcConnection, True );
- sm_interactionActive = FALSE;
+ sm_interactionActive = false;
}
}
@@ -6532,7 +6532,7 @@ static void sm_saveYourselfPhase2Callback( SmcConn smcConn, SmPointer clientData
{
if (smcConn != smcConnection )
return;
- sm_in_phase2 = TRUE;
+ sm_in_phase2 = true;
sm_performSaveYourself( (TQSessionManagerData*) clientData );
}
@@ -6623,10 +6623,10 @@ void* TQSessionManager::handle() const
bool TQSessionManager::allowsInteraction()
{
if ( sm_interactionActive )
- return TRUE;
+ return true;
if ( sm_waitingForInteraction )
- return FALSE;
+ return false;
if ( sm_interactStyle == SmInteractStyleAny ) {
sm_waitingForInteraction = SmcInteractRequest( smcConnection, SmDialogNormal,
@@ -6634,23 +6634,23 @@ bool TQSessionManager::allowsInteraction()
}
if ( sm_waitingForInteraction ) {
tqApp->enter_loop();
- sm_waitingForInteraction = FALSE;
+ sm_waitingForInteraction = false;
if ( sm_smActive ) { // not cancelled
- sm_interactionActive = TRUE;
- sm_blockUserInput = FALSE;
- return TRUE;
+ sm_interactionActive = true;
+ sm_blockUserInput = false;
+ return true;
}
}
- return FALSE;
+ return false;
}
bool TQSessionManager::allowsErrorInteraction()
{
if ( sm_interactionActive )
- return TRUE;
+ return true;
if ( sm_waitingForInteraction )
- return FALSE;
+ return false;
if ( sm_interactStyle == SmInteractStyleAny || sm_interactStyle == SmInteractStyleErrors ) {
sm_waitingForInteraction = SmcInteractRequest( smcConnection, SmDialogError,
@@ -6658,29 +6658,29 @@ bool TQSessionManager::allowsErrorInteraction()
}
if ( sm_waitingForInteraction ) {
tqApp->enter_loop();
- sm_waitingForInteraction = FALSE;
+ sm_waitingForInteraction = false;
if ( sm_smActive ) { // not cancelled
- sm_interactionActive = TRUE;
- sm_blockUserInput = FALSE;
- return TRUE;
+ sm_interactionActive = true;
+ sm_blockUserInput = false;
+ return true;
}
}
- return FALSE;
+ return false;
}
void TQSessionManager::release()
{
if ( sm_interactionActive ) {
SmcInteractDone( smcConnection, False );
- sm_interactionActive = FALSE;
+ sm_interactionActive = false;
if ( sm_smActive && sm_isshutdown )
- sm_blockUserInput = TRUE;
+ sm_blockUserInput = true;
}
}
void TQSessionManager::cancel()
{
- sm_cancel = TRUE;
+ sm_cancel = true;
}
void TQSessionManager::setRestartHint( TQSessionManager::RestartHint hint)
@@ -6741,7 +6741,7 @@ bool TQSessionManager::isPhase2() const
void TQSessionManager::requestPhase2()
{
- sm_phase2 = TRUE;
+ sm_phase2 = true;
}
diff --git a/src/kernel/tqasyncimageio.cpp b/src/kernel/tqasyncimageio.cpp
index f4a144c1b..f27e59ee0 100644
--- a/src/kernel/tqasyncimageio.cpp
+++ b/src/kernel/tqasyncimageio.cpp
@@ -368,13 +368,13 @@ TQImageDecoder::~TQImageDecoder()
Returns the image currently being decoded.
*/
-static bool plugins_loaded = FALSE;
+static bool plugins_loaded = false;
/*!
Call this function to decode some data into image changes. The
data in \a buffer will be decoded, sending change information to
the TQImageConsumer of this TQImageDecoder until one of the change
- functions of the consumer returns FALSE. The length of the data is
+ functions of the consumer returns false. The length of the data is
given in \a length.
Returns the number of bytes consumed: 0 if consumption is
@@ -398,7 +398,7 @@ int TQImageDecoder::decode(const uchar* buffer, int length)
}
if ( !actual_decoder && !plugins_loaded) {
tqt_init_image_plugins();
- plugins_loaded = TRUE;
+ plugins_loaded = true;
for (TQImageFormatType* f = TQImageDecoderPrivate::factories->first();
f && !actual_decoder;
@@ -468,7 +468,7 @@ const char* TQImageDecoder::formatName(const uchar* buffer, int length)
}
if ( !name && !plugins_loaded) {
tqt_init_image_plugins();
- plugins_loaded = TRUE;
+ plugins_loaded = true;
for (TQImageFormatType* f = TQImageDecoderPrivate::factories->first();
f && !name;
f = TQImageDecoderPrivate::factories->next())
@@ -647,8 +647,8 @@ TQImageFormatType::~TQImageFormatType()
/*!
- Returns TRUE if TQt was compiled with built-in GIF reading support;
- otherwise returns FALSE.
+ Returns true if TQt was compiled with built-in GIF reading support;
+ otherwise returns false.
*/
bool qt_builtin_gif_reader()
{
@@ -683,12 +683,12 @@ TQGIFFormat::TQGIFFormat()
lncols = 0;
gncols = 0;
disposal = NoDisposal;
- out_of_bounds = FALSE;
- disposed = TRUE;
+ out_of_bounds = false;
+ disposed = true;
frame = -1;
state = Header;
count = 0;
- lcmap = FALSE;
+ lcmap = false;
}
/*!
@@ -782,7 +782,7 @@ void TQGIFFormat::disposePrevious( TQImage& img, TQImageConsumer* consumer )
}
disposal = NoDisposal; // Until an extension says otherwise.
- disposed = TRUE;
+ disposed = true;
}
/*!
@@ -799,7 +799,7 @@ int TQGIFFormat::decode(TQImage& img, TQImageConsumer* consumer,
// CompuServe Incorporated."
#define LM(l, m) (((m)<<8)|l)
- digress = FALSE;
+ digress = false;
int initial = length;
TQRgb** line = (TQRgb **)img.jumpTable();
while (!digress && length) {
@@ -878,7 +878,7 @@ int TQGIFFormat::decode(TQImage& img, TQImageConsumer* consumer,
state=Done;
break;
default:
- digress=TRUE;
+ digress=true;
// Unexpected Introducer - ignore block
state=Error;
}
@@ -917,7 +917,7 @@ int TQGIFFormat::decode(TQImage& img, TQImageConsumer* consumer,
line = (TQRgb **)img.jumpTable();
disposePrevious( img, consumer );
- disposed = FALSE;
+ disposed = false;
left = newleft;
top = newtop;
@@ -991,7 +991,7 @@ int TQGIFFormat::decode(TQImage& img, TQImageConsumer* consumer,
bitcount = 0;
sp = stack;
firstcode = oldcode = 0;
- needfirst = FALSE;
+ needfirst = false;
out_of_bounds = left>=swidth || y>=sheight;
}
break;
@@ -1024,7 +1024,7 @@ int TQGIFFormat::decode(TQImage& img, TQImageConsumer* consumer,
} else {
if (consumer) {
consumer->frameDone();
- digress = TRUE;
+ digress = true;
}
state=Introducer;
@@ -1053,7 +1053,7 @@ int TQGIFFormat::decode(TQImage& img, TQImageConsumer* consumer,
table[0][i]=table[1][i]=0;
}
}
- needfirst=TRUE;
+ needfirst=true;
} else if (code==end_code) {
bitcount = -32768;
// Left the block end arrive
@@ -1063,8 +1063,8 @@ int TQGIFFormat::decode(TQImage& img, TQImageConsumer* consumer,
if (!out_of_bounds && line && firstcode!=trans_index)
line[y][x] = color(firstcode);
x++;
- if (x>=swidth) out_of_bounds = TRUE;
- needfirst=FALSE;
+ if (x>=swidth) out_of_bounds = true;
+ needfirst=false;
if (x>=left+width) {
x=left;
out_of_bounds = left>=swidth || y>=sheight;
@@ -1107,7 +1107,7 @@ int TQGIFFormat::decode(TQImage& img, TQImageConsumer* consumer,
if (!out_of_bounds && line && *sp!=trans_index)
line[y][x] = color(*sp);
x++;
- if (x>=swidth) out_of_bounds = TRUE;
+ if (x>=swidth) out_of_bounds = true;
if (x>=left+width) {
x=left;
out_of_bounds = left>=swidth || y>=sheight;
@@ -1202,7 +1202,7 @@ int TQGIFFormat::decode(TQImage& img, TQImageConsumer* consumer,
if (count==expectcount) state=SkipBlockSize;
break;
case Done:
- digress=TRUE;
+ digress=true;
/* Netscape ignores the junk, so we do too.
length++; // Unget
state=Error; // More calls to this is an error
@@ -1301,7 +1301,7 @@ void TQGIFFormat::nextY(TQImage& img, TQImageConsumer* consumer)
}
// Consume bogus extra lines
- if (y >= sheight) out_of_bounds=TRUE; //y=bottom;
+ if (y >= sheight) out_of_bounds=true; //y=bottom;
}
TQRgb TQGIFFormat::color( uchar index ) const
diff --git a/src/kernel/tqasyncio.cpp b/src/kernel/tqasyncio.cpp
index c8fe10ce4..aa3fff18a 100644
--- a/src/kernel/tqasyncio.cpp
+++ b/src/kernel/tqasyncio.cpp
@@ -173,25 +173,25 @@ void TQDataSource::maybeReady()
*/
/*!
- This function should return TRUE if the data source can be rewound.
+ This function should return true if the data source can be rewound.
- The default returns FALSE.
+ The default returns false.
*/
bool TQDataSource::rewindable() const
{
- return FALSE;
+ return false;
}
/*!
- If this function is called with \a on set to TRUE, and rewindable()
- is TRUE, then the data source must take measures to allow the rewind()
- function to subsequently operate as described. If rewindable() is FALSE,
+ If this function is called with \a on set to true, and rewindable()
+ is true, then the data source must take measures to allow the rewind()
+ function to subsequently operate as described. If rewindable() is false,
the function should call TQDataSource::enableRewind(), which aborts with
a tqFatal() error.
For example, a network connection may choose to use a disk cache
of input only if rewinding is enabled before the first buffer-full of
- data is discarded, returning FALSE in rewindable() if that first buffer
+ data is discarded, returning false in rewindable() if that first buffer
is discarded.
*/
void TQDataSource::enableRewind( bool /* on */ )
@@ -201,7 +201,7 @@ void TQDataSource::enableRewind( bool /* on */ )
/*!
This function rewinds the data source. This may only be called if
- enableRewind(TRUE) has been previously called.
+ enableRewind(true) has been previously called.
*/
void TQDataSource::rewind()
{
@@ -228,7 +228,7 @@ TQIODeviceSource::TQIODeviceSource(TQIODevice* device, int buffer_size) :
buf_size(buffer_size),
buffer(new uchar[buf_size]),
iod(device),
- rew(FALSE)
+ rew(false)
{
}
@@ -269,13 +269,13 @@ void TQIODeviceSource::sendTo(TQDataSink* sink, int n)
*/
bool TQIODeviceSource::rewindable() const
{
- return TRUE;
+ return true;
}
/*!
- If \a on is set to TRUE then rewinding is enabled.
+ If \a on is set to true then rewinding is enabled.
No special action is taken. If \a on is set to
- FALSE then rewinding is disabled.
+ false then rewinding is disabled.
*/
void TQIODeviceSource::enableRewind(bool on)
{
@@ -323,14 +323,14 @@ TQDataPump::TQDataPump(TQDataSource* data_source, TQDataSink* data_sink) :
source->connect(this, TQ_SLOT(kickStart()));
sink->connect(this, TQ_SLOT(kickStart()));
connect(&timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(tryToPump()));
- timer.start(0, TRUE);
+ timer.start(0, true);
}
void TQDataPump::kickStart()
{
if (!timer.isActive()) {
interval = 0;
- timer.start(0, TRUE);
+ timer.start(0, true);
}
}
@@ -353,7 +353,7 @@ void TQDataPump::tryToPump()
return;
source->sendTo(sink, TQMIN(supply, demand));
- timer.start(0, TRUE);
+ timer.start(0, true);
}
#endif // TQT_NO_ASYNC_IO
diff --git a/src/kernel/tqbitmap.cpp b/src/kernel/tqbitmap.cpp
index c23116d0e..0417844f1 100644
--- a/src/kernel/tqbitmap.cpp
+++ b/src/kernel/tqbitmap.cpp
@@ -88,14 +88,14 @@
TQBitmap::TQBitmap()
{
- data->bitmap = TRUE;
+ data->bitmap = true;
}
/*!
Constructs a bitmap with width \a w and height \a h.
- The contents of the bitmap is uninitialized if \a clear is FALSE;
+ The contents of the bitmap is uninitialized if \a clear is false;
otherwise it is filled with pixel value 0 (the TQColor \c
TQt::color0).
@@ -111,7 +111,7 @@ TQBitmap::TQBitmap( int w, int h, bool clear,
TQPixmap::Optimization optimization )
: TQPixmap( w, h, 1, optimization )
{
- data->bitmap = TRUE;
+ data->bitmap = true;
if ( clear )
fill( TQt::color0 );
}
@@ -122,7 +122,7 @@ TQBitmap::TQBitmap( int w, int h, bool clear,
Constructs a bitmap with the size \a size.
- The contents of the bitmap is uninitialized if \a clear is FALSE;
+ The contents of the bitmap is uninitialized if \a clear is false;
otherwise it is filled with pixel value 0 (the TQColor \c
TQt::color0).
@@ -136,7 +136,7 @@ TQBitmap::TQBitmap( const TQSize &size, bool clear,
TQPixmap::Optimization optimization )
: TQPixmap( size, 1, optimization )
{
- data->bitmap = TRUE;
+ data->bitmap = true;
if ( clear )
fill( TQt::color0 );
}
@@ -146,21 +146,21 @@ TQBitmap::TQBitmap( const TQSize &size, bool clear,
Constructs a bitmap with width \a w and height \a h and sets the
contents to \a bits.
- The \a isXbitmap flag should be TRUE if \a bits was generated by
+ The \a isXbitmap flag should be true if \a bits was generated by
the X11 bitmap program. The X bitmap bit order is little endian.
The TQImage documentation discusses bit order of monochrome images.
Example (creates an arrow bitmap):
\code
uchar arrow_bits[] = { 0x3f, 0x1f, 0x0f, 0x1f, 0x3b, 0x71, 0xe0, 0xc0 };
- TQBitmap bm( 8, 8, arrow_bits, TRUE );
+ TQBitmap bm( 8, 8, arrow_bits, true );
\endcode
*/
TQBitmap::TQBitmap( int w, int h, const uchar *bits, bool isXbitmap )
: TQPixmap( w, h, bits, isXbitmap )
{
- data->bitmap = TRUE;
+ data->bitmap = true;
}
@@ -170,7 +170,7 @@ TQBitmap::TQBitmap( int w, int h, const uchar *bits, bool isXbitmap )
Constructs a bitmap with the size \a size and sets the contents to
\a bits.
- The \a isXbitmap flag should be TRUE if \a bits was generated by
+ The \a isXbitmap flag should be true if \a bits was generated by
the X11 bitmap program. The X bitmap bit order is little endian.
The TQImage documentation discusses bit order of monochrome images.
*/
@@ -178,7 +178,7 @@ TQBitmap::TQBitmap( int w, int h, const uchar *bits, bool isXbitmap )
TQBitmap::TQBitmap( const TQSize &size, const uchar *bits, bool isXbitmap )
: TQPixmap( size.width(), size.height(), bits, isXbitmap )
{
- data->bitmap = TRUE;
+ data->bitmap = true;
}
@@ -208,7 +208,7 @@ TQBitmap::TQBitmap( const TQBitmap &bitmap )
TQBitmap::TQBitmap( const TQString& fileName, const char *format )
: TQPixmap() // Will set bitmap to null bitmap, explicit call for clarity
{
- data->bitmap = TRUE;
+ data->bitmap = true;
load( fileName, format, Mono );
}
#endif
@@ -241,13 +241,13 @@ TQBitmap &TQBitmap::operator=( const TQBitmap &bitmap )
TQBitmap &TQBitmap::operator=( const TQPixmap &pixmap )
{
if ( pixmap.isNull() ) { // a null pixmap
- TQBitmap bm( 0, 0, FALSE, pixmap.optimization() );
+ TQBitmap bm( 0, 0, false, pixmap.optimization() );
TQBitmap::operator=(bm);
} else if ( pixmap.depth() == 1 ) { // 1-bit pixmap
if ( pixmap.isTQBitmap() ) { // another TQBitmap
TQPixmap::operator=(pixmap); // shallow assignment
} else { // not a TQBitmap, but 1-bit
- TQBitmap bm( pixmap.size(), FALSE, pixmap.optimization() );
+ TQBitmap bm( pixmap.size(), false, pixmap.optimization() );
bitBlt( &bm, 0,0, &pixmap, 0,0,pixmap.width(),pixmap.height() );
TQBitmap::operator=(bm);
}
@@ -294,7 +294,7 @@ TQBitmap TQBitmap::xForm( const TQWMatrix &matrix ) const
// Here we fake the pixmap to think it's a TQBitmap. With this trick,
// the TQBitmap::operator=(const TQPixmap&) will just refer the
// pm.data and we do not need to perform a bitBlt.
- pm.data->bitmap = TRUE;
+ pm.data->bitmap = true;
bm = pm;
return bm;
}
diff --git a/src/kernel/tqbitmap.h b/src/kernel/tqbitmap.h
index c74f37241..6d862bfaf 100644
--- a/src/kernel/tqbitmap.h
+++ b/src/kernel/tqbitmap.h
@@ -50,12 +50,12 @@ class TQ_EXPORT TQBitmap : public TQPixmap
{
public:
TQBitmap();
- TQBitmap( int w, int h, bool clear = FALSE,
+ TQBitmap( int w, int h, bool clear = false,
TQPixmap::Optimization = TQPixmap::DefaultOptim );
- TQBitmap( const TQSize &, bool clear = FALSE,
+ TQBitmap( const TQSize &, bool clear = false,
TQPixmap::Optimization = TQPixmap::DefaultOptim );
- TQBitmap( int w, int h, const uchar *bits, bool isXbitmap=FALSE );
- TQBitmap( const TQSize &, const uchar *bits, bool isXbitmap=FALSE );
+ TQBitmap( int w, int h, const uchar *bits, bool isXbitmap=false );
+ TQBitmap( const TQSize &, const uchar *bits, bool isXbitmap=false );
TQBitmap( const TQBitmap & );
#ifndef TQT_NO_IMAGEIO
TQBitmap( const TQString &fileName, const char *format=0 );
diff --git a/src/kernel/tqclipboard.cpp b/src/kernel/tqclipboard.cpp
index ee476a1a5..bff4c96ec 100644
--- a/src/kernel/tqclipboard.cpp
+++ b/src/kernel/tqclipboard.cpp
@@ -243,7 +243,7 @@ TQString TQClipboard::text( TQCString &subtype, Mode mode ) const
TQClipboard::text() function which takes a TQClipboard::Mode
argument. The value of the mode argument is determined by the
return value of selectionModeEnabled(). If selectionModeEnabled()
- returns TRUE, the mode argument is TQClipboard::Selection,
+ returns true, the mode argument is TQClipboard::Selection,
otherwise the mode argument is TQClipboard::Clipboard.
*/
// ### remove 4.0
@@ -276,7 +276,7 @@ TQString TQClipboard::text( Mode mode ) const
This function uses the TQClipboard::text() function which takes
a TQClipboard::Mode argument. The value of the mode argument is
determined by the return value of selectionModeEnabled().
- If selectionModeEnabled() returns TRUE, the mode argument is
+ If selectionModeEnabled() returns true, the mode argument is
TQClipboard::Selection, otherwise the mode argument is
TQClipboard::Clipboard.
*/
@@ -309,7 +309,7 @@ void TQClipboard::setText( const TQString &text, Mode mode )
This function uses the TQClipboard::setText() function which takes
a TQClipboard::Mode argument. The value of the mode argument is
determined by the return value of selectionModeEnabled().
- If selectionModeEnabled() returns TRUE, the mode argument is
+ If selectionModeEnabled() returns true, the mode argument is
TQClipboard::Selection, otherwise the mode argument is
TQClipboard::Clipboard.
*/
@@ -345,7 +345,7 @@ TQImage TQClipboard::image( Mode mode ) const
This function uses the TQClipboard::image() function which takes
a TQClipboard::Mode argument. The value of the mode argument is
determined by the return value of selectionModeEnabled().
- If selectionModeEnabled() returns TRUE, the mode argument is
+ If selectionModeEnabled() returns true, the mode argument is
TQClipboard::Selection, otherwise the mode argument is
TQClipboard::Clipboard.
*/
@@ -382,7 +382,7 @@ void TQClipboard::setImage( const TQImage &image, Mode mode )
This function uses the TQClipboard::setImage() function which takes
a TQClipboard::Mode argument. The value of the mode argument is
determined by the return value of selectionModeEnabled().
- If selectionModeEnabled() returns TRUE, the mode argument is
+ If selectionModeEnabled() returns true, the mode argument is
TQClipboard::Selection, otherwise the mode argument is
TQClipboard::Clipboard.
*/
@@ -420,7 +420,7 @@ TQPixmap TQClipboard::pixmap( Mode mode ) const
This function uses the TQClipboard::pixmap() function which takes
a TQClipboard::Mode argument. The value of the mode argument is
determined by the return value of selectionModeEnabled().
- If selectionModeEnabled() returns TRUE, the mode argument is
+ If selectionModeEnabled() returns true, the mode argument is
TQClipboard::Selection, otherwise the mode argument is
TQClipboard::Clipboard.
*/
@@ -455,7 +455,7 @@ void TQClipboard::setPixmap( const TQPixmap &pixmap, Mode mode )
This function uses the TQClipboard::setPixmap() function which takes
a TQClipboard::Mode argument. The value of the mode argument is
determined by the return value of selectionModeEnabled().
- If selectionModeEnabled() returns TRUE, the mode argument is
+ If selectionModeEnabled() returns true, the mode argument is
TQClipboard::Selection, otherwise the mode argument is
TQClipboard::Clipboard.
*/
@@ -485,7 +485,7 @@ void TQClipboard::setPixmap( const TQPixmap &pixmap )
This function uses the TQClipboard::data() function which takes
a TQClipboard::Mode argument. The value of the mode argument is
determined by the return value of selectionModeEnabled().
- If selectionModeEnabled() returns TRUE, the mode argument is
+ If selectionModeEnabled() returns true, the mode argument is
TQClipboard::Selection, otherwise the mode argument is
TQClipboard::Clipboard.
*/
@@ -525,7 +525,7 @@ TQMimeSource *TQClipboard::data() const
This function uses the TQClipboard::setData() function which takes
a TQClipboard::Mode argument. The value of the mode argument is
determined by the return value of selectionModeEnabled().
- If selectionModeEnabled() returns TRUE, the mode argument is
+ If selectionModeEnabled() returns true, the mode argument is
TQClipboard::Selection, otherwise the mode argument is
TQClipboard::Clipboard.
*/
@@ -553,7 +553,7 @@ void TQClipboard::setData( TQMimeSource *src )
This function uses the TQClipboard::clear() function which takes
a TQClipboard::Mode argument. The value of the mode argument is
determined by the return value of selectionModeEnabled().
- If selectionModeEnabled() returns TRUE, the mode argument is
+ If selectionModeEnabled() returns true, the mode argument is
TQClipboard::Selection, otherwise the mode argument is TQClipboard::Clipboard.
*/
// ### remove 4.0
diff --git a/src/kernel/tqclipboard_x11.cpp b/src/kernel/tqclipboard_x11.cpp
index 685837650..3ab6ec5f0 100644
--- a/src/kernel/tqclipboard_x11.cpp
+++ b/src/kernel/tqclipboard_x11.cpp
@@ -44,13 +44,13 @@
#ifdef TQCLIPBOARD_DEBUG
# define TQDEBUG tqDebug
#else
-# define TQDEBUG if (FALSE) tqDebug
+# define TQDEBUG if (false) tqDebug
#endif
#ifdef TQCLIPBOARD_DEBUG_VERBOSE
# define VTQDEBUG tqDebug
#else
-# define VTQDEBUG if (FALSE) tqDebug
+# define VTQDEBUG if (false) tqDebug
#endif
#include "qplatformdefs.h"
@@ -104,19 +104,19 @@ static int clipboard_timeout = 5000; // 5s timeout on clipboard operations
static TQWidget * owner = 0;
static TQWidget *requestor = 0;
-static bool inSelectionMode_obsolete = FALSE; // ### remove 4.0
-static bool timer_event_clear = FALSE;
+static bool inSelectionMode_obsolete = false; // ### remove 4.0
+static bool timer_event_clear = false;
static int timer_id = 0;
static int pending_timer_id = 0;
-static bool pending_clipboard_changed = FALSE;
-static bool pending_selection_changed = FALSE;
+static bool pending_clipboard_changed = false;
+static bool pending_selection_changed = false;
TQ_EXPORT bool tqt_qclipboard_bailout_hack = false;
// event capture mechanism for qt_xclb_wait_for_event
-static bool waiting_for_data = FALSE;
-static bool has_captured_event = FALSE;
+static bool waiting_for_data = false;
+static bool has_captured_event = false;
static Window capture_event_win = None;
static int capture_event_type = -1;
static XEvent captured_event;
@@ -179,7 +179,7 @@ public:
void setSource(TQMimeSource* s)
{
- clear(TRUE);
+ clear(true);
src = s;
}
@@ -197,7 +197,7 @@ public:
transferred[1] = TQPixmap();
}
- void clear(bool destruct=TRUE);
+ void clear(bool destruct=true);
TQMimeSource *src;
Time timestamp;
@@ -247,7 +247,7 @@ static TQClipboardData *clipboardData()
void tqt_clipboard_cleanup_mime_source(TQMimeSource *src)
{
if(internalCbData && internalCbData->source() == src)
- internalCbData->clear(FALSE);
+ internalCbData->clear(false);
}
static void cleanupSelectionData()
@@ -391,23 +391,23 @@ void TQClipboard::clear( Mode mode )
/*!
- Returns TRUE if the clipboard supports mouse selection; otherwise
- returns FALSE.
+ Returns true if the clipboard supports mouse selection; otherwise
+ returns false.
*/
bool TQClipboard::supportsSelection() const
-{ return TRUE; }
+{ return true; }
/*!
- Returns TRUE if this clipboard object owns the mouse selection
- data; otherwise returns FALSE.
+ Returns true if this clipboard object owns the mouse selection
+ data; otherwise returns false.
*/
bool TQClipboard::ownsSelection() const
{ return selectionData()->timestamp != CurrentTime; }
/*!
- Returns TRUE if this clipboard object owns the clipboard data;
- otherwise returns FALSE.
+ Returns true if this clipboard object owns the clipboard data;
+ otherwise returns false.
*/
bool TQClipboard::ownsClipboard() const
{ return clipboardData()->timestamp != CurrentTime; }
@@ -418,7 +418,7 @@ bool TQClipboard::ownsClipboard() const
Use the TQClipboard::data(), TQClipboard::setData() and related functions
which take a TQClipboard::Mode argument.
- Sets the clipboard selection mode. If \a enable is TRUE, then
+ Sets the clipboard selection mode. If \a enable is true, then
subsequent calls to TQClipboard::setData() and other functions
which put data into the clipboard will put the data into the mouse
selection, otherwise the data will be put into the clipboard.
@@ -449,7 +449,7 @@ static int qt_xclb_event_filter(XEvent *event)
if (event->xany.type == capture_event_type &&
event->xany.window == capture_event_win) {
VTQDEBUG( "TQClipboard: event_filter(): caught event type %d", event->type );
- has_captured_event = TRUE;
+ has_captured_event = true;
captured_event = *event;
return 1;
}
@@ -484,8 +484,8 @@ bool qt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event,
if ( waiting_for_data )
tqFatal( "TQClipboard: internal error, qt_xclb_wait_for_event recursed" );
- waiting_for_data = TRUE;
- has_captured_event = FALSE;
+ waiting_for_data = true;
+ has_captured_event = false;
capture_event_win = win;
capture_event_type = type;
@@ -493,9 +493,9 @@ bool qt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event,
do {
if ( XCheckTypedWindowEvent(dpy,win,type,event) ) {
- waiting_for_data = FALSE;
+ waiting_for_data = false;
tqt_set_x11_event_filter(old_event_filter);
- return TRUE;
+ return true;
}
now = TQTime::currentTime();
@@ -508,30 +508,30 @@ bool qt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event,
TQEventLoop::ExcludeTimers);
if ( has_captured_event ) {
- waiting_for_data = FALSE;
+ waiting_for_data = false;
*event = captured_event;
tqt_set_x11_event_filter(old_event_filter);
- return TRUE;
+ return true;
}
} while ( started.msecsTo(now) < timeout );
- waiting_for_data = FALSE;
+ waiting_for_data = false;
tqt_set_x11_event_filter(old_event_filter);
- return FALSE;
+ return false;
}
- bool flushed = FALSE;
+ bool flushed = false;
do {
if ( XCheckTypedWindowEvent(dpy,win,type,event) )
- return TRUE;
+ return true;
if( tqt_qclipboard_bailout_hack ) {
XEvent dummy;
selection_request_pending = false;
if ( owner != NULL )
XCheckIfEvent(dpy,&dummy,check_selection_request_pending,NULL);
if( selection_request_pending )
- return TRUE;
+ return true;
}
// process other clipboard events, since someone is probably requesting data from us
@@ -545,7 +545,7 @@ bool qt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event,
if(!flushed) {
XFlush( dpy );
- flushed = TRUE;
+ flushed = true;
}
// sleep 50ms, so we don't use up CPU cycles all the time.
@@ -555,7 +555,7 @@ bool qt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event,
select(0, 0, 0, 0, &usleep_tv);
} while ( started.msecsTo(now) < timeout );
- return FALSE;
+ return false;
}
@@ -588,7 +588,7 @@ bool qt_xclb_read_property( Display *dpy, Window win, Atom property,
&length, &bytes_left, &data );
if (r != Success || (type && *type == None)) {
buffer->resize( 0 );
- return FALSE;
+ return false;
}
XFree( (char*)data );
@@ -699,7 +699,7 @@ TQByteArray qt_xclb_read_incremental_property( Display *dpy, Window win,
TQByteArray buf;
TQByteArray tmp_buf;
- bool alloc_error = FALSE;
+ bool alloc_error = false;
int length;
int offset = 0;
@@ -717,8 +717,8 @@ TQByteArray qt_xclb_read_incremental_property( Display *dpy, Window win,
if ( event.xproperty.atom != property ||
event.xproperty.state != PropertyNewValue )
continue;
- if ( qt_xclb_read_property(dpy, win, property, TRUE, &tmp_buf,
- &length,0, 0, FALSE) ) {
+ if ( qt_xclb_read_property(dpy, win, property, true, &tmp_buf,
+ &length,0, 0, false) ) {
if ( length == 0 ) { // no more data, we're done
if ( nullterm ) {
buf.resize( offset+1 );
@@ -730,7 +730,7 @@ TQByteArray qt_xclb_read_incremental_property( Display *dpy, Window win,
} else if ( !alloc_error ) {
if ( offset+length > (int)buf.size() ) {
if ( !buf.resize(offset+length+65535) ) {
- alloc_error = TRUE;
+ alloc_error = true;
length = buf.size() - offset;
}
}
@@ -966,44 +966,44 @@ bool TQClipboard::event( TQEvent *e )
TQTimerEvent *te = (TQTimerEvent *) e;
if ( waiting_for_data ) // should never happen
- return FALSE;
+ return false;
if (te->timerId() == timer_id) {
killTimer(timer_id);
timer_id = 0;
- timer_event_clear = TRUE;
+ timer_event_clear = true;
if ( selection_watcher ) // clear selection
selectionData()->clear();
if ( clipboard_watcher ) // clear clipboard
clipboardData()->clear();
- timer_event_clear = FALSE;
+ timer_event_clear = false;
- return TRUE;
+ return true;
} else if ( te->timerId() == pending_timer_id ) {
// I hate klipper
killTimer( pending_timer_id );
pending_timer_id = 0;
if ( pending_clipboard_changed ) {
- pending_clipboard_changed = FALSE;
+ pending_clipboard_changed = false;
clipboardData()->clear();
emit dataChanged();
}
if ( pending_selection_changed ) {
- pending_selection_changed = FALSE;
+ pending_selection_changed = false;
selectionData()->clear();
emit selectionChanged();
}
- return TRUE;
+ return true;
} else if (te->timerId() == incr_timer_id) {
killTimer(incr_timer_id);
incr_timer_id = 0;
qt_xclb_incr_timeout();
- return TRUE;
+ return true;
} else {
return TQObject::event( e );
}
@@ -1015,7 +1015,7 @@ bool TQClipboard::event( TQEvent *e )
Display *dpy = TQPaintDevice::x11AppDisplay();
if ( !xevent )
- return TRUE;
+ return true;
switch ( xevent->type ) {
@@ -1036,7 +1036,7 @@ bool TQClipboard::event( TQEvent *e )
d->clear();
emit selectionChanged();
} else {
- pending_selection_changed = TRUE;
+ pending_selection_changed = true;
if ( ! pending_timer_id )
pending_timer_id = TQApplication::clipboard()->startTimer( 0 );
}
@@ -1055,7 +1055,7 @@ bool TQClipboard::event( TQEvent *e )
d->clear();
emit dataChanged();
} else {
- pending_clipboard_changed = TRUE;
+ pending_clipboard_changed = true;
if ( ! pending_timer_id )
pending_timer_id = TQApplication::clipboard()->startTimer( 0 );
}
@@ -1063,7 +1063,7 @@ bool TQClipboard::event( TQEvent *e )
#ifdef QT_CHECK_STATE
tqWarning("TQClipboard: Unknown SelectionClear event received.");
#endif
- return FALSE;
+ return false;
}
break;
@@ -1147,13 +1147,13 @@ bool TQClipboard::event( TQEvent *e )
int multi_format = 0;
int nmulti = 0;
int imulti = -1;
- bool multi_writeback = FALSE;
+ bool multi_writeback = false;
if ( req->target == xa_multiple ) {
TQByteArray multi_data;
if (req->property == None
|| !qt_xclb_read_property(dpy, req->requestor, req->property,
- FALSE, &multi_data, 0, &multi_type, &multi_format, 0)
+ false, &multi_data, 0, &multi_type, &multi_format, 0)
|| multi_format != 32) {
// MULTIPLE property not formatted correctly
XSendEvent(dpy, req->requestor, False, NoEventMask, &event);
@@ -1210,7 +1210,7 @@ bool TQClipboard::event( TQEvent *e )
if (nmulti > 0) {
if (ret == None) {
multi[imulti].property = None;
- multi_writeback = TRUE;
+ multi_writeback = true;
}
} else {
event.xselection.property = ret;
@@ -1241,7 +1241,7 @@ bool TQClipboard::event( TQEvent *e )
break;
}
- return TRUE;
+ return true;
}
@@ -1286,7 +1286,7 @@ bool TQClipboardWatcher::empty() const
#ifdef QT_CHECK_STATE
if( win == requestor->winId()) {
tqWarning( "TQClipboardWatcher::empty: internal error, app owns the selection" );
- return TRUE;
+ return true;
}
#endif // QT_CHECK_STATE
@@ -1432,7 +1432,7 @@ TQByteArray TQClipboardWatcher::getDataInFormat(Atom fmtatom) const
XDeleteProperty(dpy, win, qt_selection_property);
XConvertSelection(dpy, atom, fmtatom, qt_selection_property, win, tqt_x_time);
- XSync(dpy, FALSE);
+ XSync(dpy, false);
VTQDEBUG("TQClipboardWatcher::getDataInFormat: waiting for SelectionNotify event");
@@ -1448,13 +1448,13 @@ TQByteArray TQClipboardWatcher::getDataInFormat(Atom fmtatom) const
Atom type;
XSelectInput(dpy, win, PropertyChangeMask);
- if ( qt_xclb_read_property(dpy,win,qt_selection_property,TRUE,
- &buf,0,&type,0,FALSE) ) {
+ if ( qt_xclb_read_property(dpy,win,qt_selection_property,true,
+ &buf,0,&type,0,false) ) {
if ( type == qt_x_incr ) {
int nbytes = buf.size() >= 4 ? *((int*)buf.data()) : 0;
buf = qt_xclb_read_incremental_property( dpy, win,
qt_selection_property,
- nbytes, FALSE );
+ nbytes, false );
}
}
@@ -1577,13 +1577,13 @@ void TQClipboard::setData( TQMimeSource* src, Mode mode )
/*
Called by the main event loop in tqapplication_x11.cpp when the
_QT_SELECTION_SENTINEL property has been changed (i.e. when some TQt
- process has performed TQClipboard::setData(). If it returns TRUE, the
+ process has performed TQClipboard::setData(). If it returns true, the
TQClipBoard dataChanged() signal should be emitted.
*/
bool qt_check_selection_sentinel()
{
- bool doIt = TRUE;
+ bool doIt = true;
if ( owner ) {
/*
Since the X selection mechanism cannot give any signal when
@@ -1610,7 +1610,7 @@ bool qt_check_selection_sentinel()
if ( actualType == XA_WINDOW && actualFormat == 32 && nitems == 2 ) {
Window win = owner->winId();
if ( owners[0] == win || owners[1] == win )
- doIt = FALSE;
+ doIt = false;
}
XFree( owners );
@@ -1619,10 +1619,10 @@ bool qt_check_selection_sentinel()
if (doIt) {
if ( waiting_for_data ) {
- pending_selection_changed = TRUE;
+ pending_selection_changed = true;
if ( ! pending_timer_id )
pending_timer_id = TQApplication::clipboard()->startTimer( 0 );
- doIt = FALSE;
+ doIt = false;
} else {
selectionData()->clear();
}
@@ -1634,7 +1634,7 @@ bool qt_check_selection_sentinel()
bool qt_check_clipboard_sentinel()
{
- bool doIt = TRUE;
+ bool doIt = true;
if (owner) {
Window *owners;
Atom actualType;
@@ -1649,7 +1649,7 @@ bool qt_check_clipboard_sentinel()
if (actualType == XA_WINDOW && actualFormat == 32 && nitems == 2) {
Window win = owner->winId();
if (owners[0] == win || owners[1] == win)
- doIt = FALSE;
+ doIt = false;
}
XFree(owners);
@@ -1658,10 +1658,10 @@ bool qt_check_clipboard_sentinel()
if (doIt) {
if ( waiting_for_data ) {
- pending_clipboard_changed = TRUE;
+ pending_clipboard_changed = true;
if ( ! pending_timer_id )
pending_timer_id = TQApplication::clipboard()->startTimer( 0 );
- doIt = FALSE;
+ doIt = false;
} else {
clipboardData()->clear();
}
diff --git a/src/kernel/tqcolor.cpp b/src/kernel/tqcolor.cpp
index 142fb408a..ffb0f8fe5 100644
--- a/src/kernel/tqcolor.cpp
+++ b/src/kernel/tqcolor.cpp
@@ -224,8 +224,8 @@ const TQColor & TQt::darkYellow = stdcol[18];
TQColor member functions
*****************************************************************************/
-bool TQColor::color_init = FALSE; // color system not initialized
-bool TQColor::globals_init = FALSE; // global color not initialized
+bool TQColor::color_init = false; // color system not initialized
+bool TQColor::globals_init = false; // global color not initialized
TQColor::ColorModel TQColor::colormodel = d32;
@@ -253,7 +253,7 @@ TQColor* TQColor::globalColors()
void TQColor::initGlobalColors()
{
- globals_init = TRUE;
+ globals_init = true;
#ifdef TQ_WS_X11
// HACK: we need a way to recognize color0 and color1 uniquely, so
@@ -361,9 +361,9 @@ void TQColor::setPixel( uint pixel )
{
switch ( colormodel ) {
case d8:
- d.d8.direct = TRUE;
- d.d8.invalid = FALSE;
- d.d8.dirty = FALSE;
+ d.d8.direct = true;
+ d.d8.invalid = false;
+ d.d8.dirty = false;
d.d8.pix = pixel;
break;
case d32:
@@ -461,8 +461,8 @@ TQColor &TQColor::operator=( const TQColor &c )
/*!
\fn bool TQColor::isValid() const
- Returns FALSE if the color is invalid, i.e. it was constructed using the
- default constructor; otherwise returns TRUE.
+ Returns false if the color is invalid, i.e. it was constructed using the
+ default constructor; otherwise returns true.
*/
/*!
@@ -533,7 +533,7 @@ void TQColor::setNamedColor( const TQString &name )
if ( name.isEmpty() ) {
d.argb = 0;
if ( colormodel == d8 ) {
- d.d8.invalid = TRUE;
+ d.d8.invalid = true;
} else {
d.d32.argb = Invalid;
}
@@ -751,9 +751,9 @@ void TQColor::setRgb( int r, int g, int b )
}
d.argb = tqRgb( r, g, b );
if ( colormodel == d8 ) {
- d.d8.invalid = FALSE;
- d.d8.direct = FALSE;
- d.d8.dirty = TRUE;
+ d.d8.invalid = false;
+ d.d8.direct = false;
+ d.d8.dirty = true;
} else {
d.d32.pix = Dirt;
}
@@ -773,9 +773,9 @@ void TQColor::setRgb( TQRgb rgb )
{
d.argb = rgb;
if ( colormodel == d8 ) {
- d.d8.invalid = FALSE;
- d.d8.direct = FALSE;
- d.d8.dirty = TRUE;
+ d.d8.invalid = false;
+ d.d8.direct = false;
+ d.d8.dirty = true;
} else {
d.d32.pix = Dirt;
}
@@ -876,14 +876,14 @@ TQColor TQColor::dark( int factor ) const
/*!
\fn bool TQColor::operator==( const TQColor &c ) const
- Returns TRUE if this color has the same RGB value as \a c;
- otherwise returns FALSE.
+ Returns true if this color has the same RGB value as \a c;
+ otherwise returns false.
*/
/*!
\fn bool TQColor::operator!=( const TQColor &c ) const
- Returns TRUE if this color has a different RGB value from \a c;
- otherwise returns FALSE.
+ Returns true if this color has a different RGB value from \a c;
+ otherwise returns false.
*/
/*!
diff --git a/src/kernel/tqcolor_p.cpp b/src/kernel/tqcolor_p.cpp
index 5db0e21be..3d29be385 100644
--- a/src/kernel/tqcolor_p.cpp
+++ b/src/kernel/tqcolor_p.cpp
@@ -749,9 +749,9 @@ bool qt_get_named_rgb( const char *name, TQRgb* rgb )
free(name_no_space);
if ( r ) {
*rgb = r->value;
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
}
@@ -776,7 +776,7 @@ TQStringList TQColor::colorNames()
bool qt_get_named_rgb( const char *, TQRgb* )
{
- return FALSE;
+ return false;
}
uint qt_get_rgb_val( const char * )
diff --git a/src/kernel/tqcolor_x11.cpp b/src/kernel/tqcolor_x11.cpp
index 77f48037a..2e289cadf 100644
--- a/src/kernel/tqcolor_x11.cpp
+++ b/src/kernel/tqcolor_x11.cpp
@@ -51,9 +51,9 @@
/*****************************************************************************
The color dictionary speeds up color allocation significantly for X11.
When there are no more colors, TQColor::alloc() will set the colors_avail
- flag to FALSE and try to find the nearest color.
+ flag to false and try to find the nearest color.
NOTE: From deep within the event loop, the colors_avail flag is reset to
- TRUE (calls the function qt_reset_color_avail()), because some other
+ true (calls the function qt_reset_color_avail()), because some other
application might free its colors, thereby making them available for
this TQt application.
*****************************************************************************/
@@ -76,13 +76,13 @@ public:
TQColorScreenData()
{
colorDict = 0;
- colors_avail = TRUE;
+ colors_avail = true;
g_vis = 0;
g_carr = 0;
- g_carr_fetch = TRUE;
+ g_carr_fetch = true;
g_cells = 0;
g_our_alloc = 0;
- color_reduce = FALSE;
+ color_reduce = false;
}
TQColorDict *colorDict; // dict of allocated colors
@@ -118,8 +118,8 @@ void qt_reset_color_avail()
{
int i;
for ( i = 0; i < screencount; i++ ) {
- screendata[i]->colors_avail = TRUE;
- screendata[i]->g_carr_fetch = TRUE; // do XQueryColors if !colors_avail
+ screendata[i]->colors_avail = true;
+ screendata[i]->g_carr_fetch = true; // do XQueryColors if !colors_avail
}
}
@@ -214,7 +214,7 @@ void TQColor::initialize()
if ( color_init ) // already initialized
return;
- color_init = TRUE;
+ color_init = true;
Display *dpy = TQPaintDevice::x11AppDisplay();
int spec = TQApplication::colorSpec();
@@ -245,10 +245,10 @@ void TQColor::initialize()
TQ_CHECK_PTR( screendata[scr]->g_carr );
memset( screendata[scr]->g_carr, 0,
screendata[scr]->g_cells*sizeof(XColor) );
- screendata[scr]->g_carr_fetch = TRUE; // run XQueryColors on demand
+ screendata[scr]->g_carr_fetch = true; // run XQueryColors on demand
screendata[scr]->g_our_alloc = new bool[screendata[scr]->g_cells];
TQ_CHECK_PTR( screendata[scr]->g_our_alloc );
- memset( screendata[scr]->g_our_alloc, FALSE,
+ memset( screendata[scr]->g_our_alloc, false,
screendata[scr]->g_cells*sizeof(bool) );
XColor *xc = &screendata[scr]->g_carr[0];
for ( int i=0; i<screendata[scr]->g_cells; i++ ) {
@@ -276,7 +276,7 @@ void TQColor::initialize()
TQ_CHECK_PTR( screendata[scr]->colorDict );
if ( spec == (int)TQApplication::ManyColor ) {
- screendata[scr]->color_reduce = TRUE;
+ screendata[scr]->color_reduce = true;
switch ( qt_ncols_option ) {
case 216:
@@ -322,7 +322,7 @@ void TQColor::initialize()
}
#if 0 /* 0 == allocate colors on demand */
- setLazyAlloc( FALSE ); // allocate global colors
+ setLazyAlloc( false ); // allocate global colors
((TQColor*)(&darkGray))-> alloc();
((TQColor*)(&gray))-> alloc();
((TQColor*)(&lightGray))-> alloc();
@@ -338,7 +338,7 @@ void TQColor::initialize()
((TQColor*)(&darkCyan))-> alloc();
((TQColor*)(&darkMagenta))-> alloc();
((TQColor*)(&darkYellow))-> alloc();
- setLazyAlloc( TRUE );
+ setLazyAlloc( true );
#endif
}
@@ -353,7 +353,7 @@ void TQColor::cleanup()
{
if ( !color_init )
return;
- color_init = FALSE;
+ color_init = false;
int scr;
for ( scr = 0; scr < screencount; scr++ ) {
if ( screendata[scr]->g_carr ) {
@@ -365,7 +365,7 @@ void TQColor::cleanup()
screendata[scr]->g_our_alloc = 0;
}
if ( screendata[scr]->colorDict ) {
- screendata[scr]->colorDict->setAutoDelete( TRUE );
+ screendata[scr]->colorDict->setAutoDelete( true );
screendata[scr]->colorDict->clear();
delete screendata[scr]->colorDict;
screendata[scr]->colorDict = 0;
@@ -421,12 +421,12 @@ uint TQColor::alloc( int screen )
if ( c ) { // found color in dictionary
pix = c->pix;
if ( screen == TQPaintDevice::x11AppScreen() ) {
- d.d8.invalid = FALSE; // color ok
- d.d8.dirty = FALSE;
+ d.d8.invalid = false; // color ok
+ d.d8.dirty = false;
d.d8.pix = pix; // use same pixel value
if ( c->context != current_alloc_context ) {
c->context = 0; // convert to default context
- sd->g_our_alloc[pix] = TRUE; // reuse without XAllocColor
+ sd->g_our_alloc[pix] = true; // reuse without XAllocColor
}
}
return pix;
@@ -437,7 +437,7 @@ uint TQColor::alloc( int screen )
col.green = g << 8;
col.blue = b << 8;
- bool try_again = FALSE;
+ bool try_again = false;
bool try_alloc = !sd->color_reduce;
int try_count = 0;
@@ -445,7 +445,7 @@ uint TQColor::alloc( int screen )
// This loop is run until we manage to either allocate or
// find an approximate color, it stops after a few iterations.
- try_again = FALSE;
+ try_again = false;
if ( try_alloc && sd->colors_avail &&
XAllocColor(dpy, TQPaintDevice::x11AppColormap( screen ),&col) ) {
@@ -453,18 +453,18 @@ uint TQColor::alloc( int screen )
pix = (uint) col.pixel;
if ( screen == TQPaintDevice::x11AppScreen() ) {
d.d8.pix = pix;
- d.d8.invalid = FALSE;
- d.d8.dirty = FALSE;
+ d.d8.invalid = false;
+ d.d8.dirty = false;
sd->g_carr[d.d8.pix] = col; // update color array
if ( current_alloc_context == 0 )
- sd->g_our_alloc[d.d8.pix] = TRUE; // reuse without XAllocColor
+ sd->g_our_alloc[d.d8.pix] = true; // reuse without XAllocColor
}
} else {
// No available colors, or we did not want to allocate one
int i;
- sd->colors_avail = FALSE; // no more available colors
+ sd->colors_avail = false; // no more available colors
if ( sd->g_carr_fetch ) { // refetch color array
- sd->g_carr_fetch = FALSE;
+ sd->g_carr_fetch = false;
XQueryColors( dpy, TQPaintDevice::x11AppColormap( screen ), sd->g_carr,
sd->g_cells );
}
@@ -488,9 +488,9 @@ uint TQColor::alloc( int screen )
col.red = r << 8;
col.green = g << 8;
col.blue = b << 8;
- try_alloc = TRUE;
- try_again = TRUE;
- sd->colors_avail = TRUE;
+ try_alloc = true;
+ try_again = true;
+ sd->colors_avail = true;
continue; // Try alloc reduced color
}
}
@@ -502,16 +502,16 @@ uint TQColor::alloc( int screen )
d.argb = tqRgb(0,0,0);
pix = (uint)BlackPixel( dpy, screen );
if ( screen == TQPaintDevice::x11AppScreen() ) {
- d.d8.invalid = FALSE;
- d.d8.dirty = FALSE;
+ d.d8.invalid = false;
+ d.d8.dirty = false;
d.d8.pix = pix;
}
} else { // light, use white
d.argb = tqRgb(0xff,0xff,0xff);
pix = (uint)WhitePixel( dpy, screen );
if ( screen == TQPaintDevice::x11AppScreen() ) {
- d.d8.invalid = FALSE;
- d.d8.dirty = FALSE;
+ d.d8.invalid = false;
+ d.d8.dirty = false;
d.d8.pix = pix;
}
}
@@ -527,21 +527,21 @@ uint TQColor::alloc( int screen )
sd->g_carr[i] = col; // update color array
if ( screen == TQPaintDevice::x11AppScreen() ) {
if ( current_alloc_context == 0 )
- sd->g_our_alloc[i] = TRUE; // only in the default context
+ sd->g_our_alloc[i] = true; // only in the default context
}
} else {
// Oops, it's gone again
try_count++;
- try_again = TRUE;
- sd->colors_avail = TRUE;
- sd->g_carr_fetch = TRUE;
+ try_again = true;
+ sd->colors_avail = true;
+ sd->g_carr_fetch = true;
}
}
if ( !try_again ) { // got it
pix = (uint)sd->g_carr[i].pixel;
if ( screen == TQPaintDevice::x11AppScreen() ) {
- d.d8.invalid = FALSE;
- d.d8.dirty = FALSE;
+ d.d8.invalid = false;
+ d.d8.dirty = false;
d.d8.pix = pix; // allocated X11 color
}
}
@@ -556,16 +556,16 @@ uint TQColor::alloc( int screen )
d.argb = tqRgb(0,0,0);
pix = (uint)BlackPixel( dpy, screen );
if ( screen == TQPaintDevice::x11AppScreen() ) {
- d.d8.invalid = FALSE;
- d.d8.dirty = FALSE;
+ d.d8.invalid = false;
+ d.d8.dirty = false;
d.d8.pix = pix;
}
} else { // light, use white
d.argb = tqRgb(0xff,0xff,0xff);
pix = (uint)WhitePixel( dpy, screen );
if ( screen == TQPaintDevice::x11AppScreen() ) {
- d.d8.invalid = FALSE;
- d.d8.dirty = FALSE;
+ d.d8.invalid = false;
+ d.d8.dirty = false;
d.d8.pix = pix;
}
}
@@ -638,8 +638,8 @@ void TQColor::setSystemNamedColor( const TQString& name )
if ( qt_get_named_rgb( name.latin1(), &rgb ) ) {
setRgb( tqRed(rgb), tqGreen(rgb), tqBlue(rgb) );
if ( colormodel == d8 ) {
- d.d8.invalid = FALSE;
- d.d8.dirty = TRUE;
+ d.d8.invalid = false;
+ d.d8.dirty = true;
d.d8.pix = 0;
} else {
alloc();
@@ -671,9 +671,9 @@ static int context_ptr = 0;
static void init_context_stack()
{
- static bool did_init = FALSE;
+ static bool did_init = false;
if ( !did_init ) {
- did_init = TRUE;
+ did_init = true;
context_stack[0] = current_alloc_context = 0;
}
}
@@ -814,7 +814,7 @@ void TQColor::destroyAllocContext( int context )
ulong pixels[256];
bool freeing[256];
- memset( freeing, FALSE, screendata[screen]->g_cells*sizeof(bool) );
+ memset( freeing, false, screendata[screen]->g_cells*sizeof(bool) );
TQColorData *d;
TQColorDictIt it( *screendata[screen]->colorDict );
int i = 0;
@@ -826,7 +826,7 @@ void TQColor::destroyAllocContext( int context )
if ( !screendata[screen]->g_our_alloc[d->pix] && !freeing[d->pix] ) {
// will free this color
pixels[i++] = d->pix;
- freeing[d->pix] = TRUE;
+ freeing[d->pix] = true;
}
// remove from dict
screendata[screen]->colorDict->remove( (long)rgbv );
diff --git a/src/kernel/tqcursor_x11.cpp b/src/kernel/tqcursor_x11.cpp
index 6a66e3cda..2ff9bad05 100644
--- a/src/kernel/tqcursor_x11.cpp
+++ b/src/kernel/tqcursor_x11.cpp
@@ -130,7 +130,7 @@ TQCursor *TQCursor::find_cur( int shape ) // find predefined cursor
}
-static bool initialized = FALSE;
+static bool initialized = false;
/*!
Internal function that deinitializes the predefined cursors.
@@ -149,7 +149,7 @@ void TQCursor::cleanup()
delete cursorTable[shape].data;
cursorTable[shape].data = 0;
}
- initialized = FALSE;
+ initialized = false;
}
@@ -165,7 +165,7 @@ void TQCursor::initialize()
int shape;
for( shape = 0; shape <= LastCursor; shape++ )
cursorTable[shape].data = new TQCursorData( shape );
- initialized = TRUE;
+ initialized = true;
tqAddPostRoutine( cleanup );
}
diff --git a/src/kernel/tqdesktopwidget_x11.cpp b/src/kernel/tqdesktopwidget_x11.cpp
index 35d021c51..ed17b48e4 100644
--- a/src/kernel/tqdesktopwidget_x11.cpp
+++ b/src/kernel/tqdesktopwidget_x11.cpp
@@ -50,10 +50,10 @@ extern Atom qt_net_workarea;
extern bool qt_net_supports(Atom atom);
// function to update the workarea of the screen
-static bool qt_desktopwidget_workarea_dirty = TRUE;
+static bool qt_desktopwidget_workarea_dirty = true;
void qt_desktopwidget_update_workarea()
{
- qt_desktopwidget_workarea_dirty = TRUE;
+ qt_desktopwidget_workarea_dirty = true;
}
@@ -94,7 +94,7 @@ public:
};
TQDesktopWidgetPrivate::TQDesktopWidgetPrivate()
- : use_xinerama(FALSE), defaultScreen(0), screenCount(1),
+ : use_xinerama(false), defaultScreen(0), screenCount(1),
screens( 0 ), rects( 0 ), workareas( 0 )
{
}
@@ -264,7 +264,7 @@ const TQRect& TQDesktopWidget::availableGeometry( int screen ) const
// the workareas are dirty, invalidate them
for ( int i = 0; i < d->screenCount; ++i )
d->workareas[i] = TQRect();
- qt_desktopwidget_workarea_dirty = FALSE;
+ qt_desktopwidget_workarea_dirty = false;
}
if ( screen < 0 || screen >= d->screenCount )
@@ -351,6 +351,6 @@ int TQDesktopWidget::screenNumber( const TQPoint &point ) const
void TQDesktopWidget::resizeEvent( TQResizeEvent *event )
{
d->init();
- qt_desktopwidget_workarea_dirty = TRUE;
+ qt_desktopwidget_workarea_dirty = true;
TQWidget::resizeEvent( event );
}
diff --git a/src/kernel/tqdragobject.cpp b/src/kernel/tqdragobject.cpp
index 04b9f43a1..7cb9c09aa 100644
--- a/src/kernel/tqdragobject.cpp
+++ b/src/kernel/tqdragobject.cpp
@@ -279,9 +279,9 @@ TQDragManager::TQDragManager()
dropWidget = 0;
if ( !qt_dnd_manager )
qt_dnd_manager = this;
- beingCancelled = FALSE;
- restoreCursor = FALSE;
- willDrop = FALSE;
+ beingCancelled = false;
+ restoreCursor = false;
+ willDrop = false;
}
@@ -327,7 +327,7 @@ TQDragObject::~TQDragObject()
{
#ifndef TQT_NO_DRAGANDDROP
if ( qt_dnd_manager && qt_dnd_manager->object == this )
- qt_dnd_manager->cancel( FALSE );
+ qt_dnd_manager->cancel( false );
if ( d->pm_cursor ) {
for ( int i = 0; i < qt_dnd_manager->n_cursor; i++ )
qt_dnd_manager->pm_cursor[i] = d->pm_cursor[i];
@@ -455,9 +455,9 @@ TQPixmap *TQDragObject::cursor( DragMode m ) const
Starts a drag operation using the contents of this object, using
DragDefault mode.
- The function returns TRUE if the caller should delete the original
+ The function returns true if the caller should delete the original
copy of the dragged data (but see target()); otherwise returns
- FALSE.
+ false.
If the drag contains \e references to information (e.g. file names
in a TQUriDrag are references) then the return value should always
@@ -535,10 +535,10 @@ void TQDragObject::dragLink()
will be done during future event processing - after that time the
drag object will be deleted.
- Returns TRUE if the dragged data was dragged as a \e move,
+ Returns true if the dragged data was dragged as a \e move,
indicating that the caller should remove the original source of
the data (the drag object must continue to have a copy); otherwise
- returns FALSE.
+ returns false.
The \a mode specifies the drag mode (see
\l{TQDragObject::DragMode}.) Normally one of the simpler drag(),
@@ -549,7 +549,7 @@ bool TQDragObject::drag( DragMode mode )
if ( qt_dnd_manager )
return qt_dnd_manager->drag( this, mode );
else
- return FALSE;
+ return false;
}
#endif
@@ -786,11 +786,11 @@ static TQTextCodec *codecForHTML(const TQCString &ba)
mib = 106; // utf-8
} else {
pos = 0;
- while ((pos = ba.find("<meta http-equiv=", pos, FALSE)) != -1) {
+ while ((pos = ba.find("<meta http-equiv=", pos, false)) != -1) {
int end = ba.find('>', pos+1);
if (end == -1)
break;
- pos = ba.find("charset=", pos, FALSE) + (int)strlen("charset=");
+ pos = ba.find("charset=", pos, false) + (int)strlen("charset=");
if (pos != -1 && pos < end) {
int pos2 = ba.find('\"', pos+1);
TQCString cs = ba.mid(pos, pos2-pos);
@@ -863,8 +863,8 @@ TQByteArray TQTextDrag::encodedData(const char* mime) const
}
/*!
- Returns TRUE if the information in \a e can be decoded into a
- TQString; otherwise returns FALSE.
+ Returns true if the information in \a e can be decoded into a
+ TQString; otherwise returns false.
\sa decode()
*/
@@ -883,7 +883,7 @@ bool TQTextDrag::canDecode( const TQMimeSource* e )
\overload
Attempts to decode the dropped information in \a e into \a str.
- Returns TRUE if successful; otherwise returns FALSE. If \a subtype
+ Returns true if successful; otherwise returns false. If \a subtype
is null, any text subtype is accepted; otherwise only the
specified \a subtype is accepted.
@@ -892,7 +892,7 @@ bool TQTextDrag::canDecode( const TQMimeSource* e )
bool TQTextDrag::decode( const TQMimeSource* e, TQString& str, TQCString& subtype )
{
if(!e)
- return FALSE;
+ return false;
// when subtype is not specified, try text/plain first, otherwise this may read
// things like text/x-moz-url even though better targets are available
@@ -907,7 +907,7 @@ bool TQTextDrag::decode( const TQMimeSource* e, TQString& str, TQCString& subtyp
if ( e->cacheType == TQMimeSource::Text ) {
str = *e->cache.txt.str;
subtype = *e->cache.txt.subtype;
- return TRUE;
+ return true;
}
const char* mime;
@@ -955,18 +955,18 @@ bool TQTextDrag::decode( const TQMimeSource* e, TQString& str, TQCString& subtyp
m->cache.txt.str = new TQString( str );
m->cache.txt.subtype = new TQCString( subtype );
- return TRUE;
+ return true;
}
}
}
}
}
- return FALSE;
+ return false;
}
/*!
Attempts to decode the dropped information in \a e into \a str.
- Returns TRUE if successful; otherwise returns FALSE.
+ Returns true if successful; otherwise returns false.
\sa canDecode()
*/
@@ -1104,8 +1104,8 @@ TQByteArray TQImageDrag::encodedData(const char* fmt) const
}
/*!
- Returns TRUE if the information in mime source \a e can be decoded
- into an image; otherwise returns FALSE.
+ Returns true if the information in mime source \a e can be decoded
+ into an image; otherwise returns false.
\sa decode()
*/
@@ -1117,26 +1117,26 @@ bool TQImageDrag::canDecode( const TQMimeSource* e ) {
TQCString format = fileFormats.current();
TQCString type = "image/" + format.lower();
if ( e->provides(type.data()))
- return TRUE;
+ return true;
fileFormats.next();
}
- return FALSE;
+ return false;
}
/*!
Attempts to decode the dropped information in mime source \a e
- into \a img. Returns TRUE if successful; otherwise returns FALSE.
+ into \a img. Returns true if successful; otherwise returns false.
\sa canDecode()
*/
bool TQImageDrag::decode( const TQMimeSource* e, TQImage& img )
{
if ( !e )
- return FALSE;
+ return false;
if ( e->cacheType == TQMimeSource::Graphics ) {
img = *e->cache.gfx.img;
- return TRUE;
+ return true;
}
TQByteArray payload;
@@ -1157,25 +1157,25 @@ bool TQImageDrag::decode( const TQMimeSource* e, TQImage& img )
}
if ( payload.isEmpty() )
- return FALSE;
+ return false;
img.loadFromData(payload);
if ( img.isNull() )
- return FALSE;
+ return false;
TQMimeSource *m = (TQMimeSource*)e;
m->clearCache();
m->cacheType = TQMimeSource::Graphics;
m->cache.gfx.img = new TQImage( img );
m->cache.gfx.pix = 0;
- return TRUE;
+ return true;
}
/*!
\overload
Attempts to decode the dropped information in mime source \a e
- into pixmap \a pm. Returns TRUE if successful; otherwise returns
- FALSE.
+ into pixmap \a pm. Returns true if successful; otherwise returns
+ false.
This is a convenience function that converts to a TQPixmap via a
TQImage.
@@ -1185,25 +1185,25 @@ bool TQImageDrag::decode( const TQMimeSource* e, TQImage& img )
bool TQImageDrag::decode( const TQMimeSource* e, TQPixmap& pm )
{
if ( !e )
- return FALSE;
+ return false;
if ( e->cacheType == TQMimeSource::Graphics && e->cache.gfx.pix) {
pm = *e->cache.gfx.pix;
- return TRUE;
+ return true;
}
TQImage img;
// We avoid dither, since the image probably came from this display
if ( decode( e, img ) ) {
if ( !pm.convertFromImage( img, AvoidDither ) )
- return FALSE;
+ return false;
// decode initialized the cache for us
TQMimeSource *m = (TQMimeSource*)e;
m->cache.gfx.pix = new TQPixmap( pm );
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -1363,8 +1363,8 @@ void TQUriDrag::setUris( TQStrList uris )
/*!
- Returns TRUE if decode() would be able to decode \a e; otherwise
- returns FALSE.
+ Returns true if decode() would be able to decode \a e; otherwise
+ returns false.
*/
bool TQUriDrag::canDecode( const TQMimeSource* e )
{
@@ -1375,15 +1375,15 @@ bool TQUriDrag::canDecode( const TQMimeSource* e )
Decodes URIs from \a e, placing the result in \a l (which is first
cleared).
- Returns TRUE if \a e contained a valid list of URIs; otherwise
- returns FALSE.
+ Returns true if \a e contained a valid list of URIs; otherwise
+ returns false.
*/
bool TQUriDrag::decode( const TQMimeSource* e, TQStrList& l )
{
TQByteArray payload = e->encodedData( "text/uri-list" );
if ( payload.size() ) {
l.clear();
- l.setAutoDelete(TRUE);
+ l.setAutoDelete(true);
uint c=0;
const char* d = payload.data();
while (c < payload.size() && d[c]) {
@@ -1400,9 +1400,9 @@ bool TQUriDrag::decode( const TQMimeSource* e, TQStrList& l )
(d[c]=='\n' || d[c]=='\r'))
c++;
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
static uint htod( int h )
@@ -1511,11 +1511,11 @@ TQCString TQUriDrag::localFileToUri(const TQString& filename)
#ifdef TQ_WS_WIN
- bool hasHost = FALSE;
+ bool hasHost = false;
// convert form network path
if (r.left(2) == "\\\\" || r.left(2) == "//") {
r.remove(0, 2);
- hasHost = TRUE;
+ hasHost = true;
}
// Slosh -> Slash
@@ -1605,7 +1605,7 @@ TQString TQUriDrag::uriToLocalFile(const char* uri)
hostname[ 256 ] = '\0';
if ( tqstrncmp( uri+1, hostname, hostname_end - ( uri+1 )) == 0 ) {
uri = hostname_end + 1; // point after the slash
- local = TRUE;
+ local = true;
}
}
}
@@ -1644,14 +1644,14 @@ TQString TQUriDrag::uriToLocalFile(const char* uri)
local files if they refer to local files, and places them in \a l
(which is first cleared).
- Returns TRUE if \e contained a valid list of URIs; otherwise
- returns FALSE. The list will be empty if no URIs were local files.
+ Returns true if \e contained a valid list of URIs; otherwise
+ returns false. The list will be empty if no URIs were local files.
*/
bool TQUriDrag::decodeLocalFiles( const TQMimeSource* e, TQStringList& l )
{
TQStrList u;
if ( !decode( e, u ) )
- return FALSE;
+ return false;
l.clear();
for (const char* s=u.first(); s; s=u.next()) {
@@ -1659,7 +1659,7 @@ bool TQUriDrag::decodeLocalFiles( const TQMimeSource* e, TQStringList& l )
if ( !lf.isNull() )
l.append( lf );
}
- return TRUE;
+ return true;
}
/*!
@@ -1667,20 +1667,20 @@ bool TQUriDrag::decodeLocalFiles( const TQMimeSource* e, TQStringList& l )
Unicode URIs (only useful for displaying to humans), placing them
in \a l (which is first cleared).
- Returns TRUE if \e contained a valid list of URIs; otherwise
- returns FALSE.
+ Returns true if \e contained a valid list of URIs; otherwise
+ returns false.
*/
bool TQUriDrag::decodeToUnicodeUris( const TQMimeSource* e, TQStringList& l )
{
TQStrList u;
if ( !decode( e, u ) )
- return FALSE;
+ return false;
l.clear();
for (const char* s=u.first(); s; s=u.next())
l.append( uriToUnicodeUri(s) );
- return TRUE;
+ return true;
}
@@ -1768,8 +1768,8 @@ void TQColorDrag::setColor( const TQColor &col )
}
/*!
- Returns TRUE if the color drag object can decode the mime source
- \a e; otherwise returns FALSE.
+ Returns true if the color drag object can decode the mime source
+ \a e; otherwise returns false.
*/
bool TQColorDrag::canDecode( TQMimeSource *e )
@@ -1787,7 +1787,7 @@ bool TQColorDrag::decode( TQMimeSource *e, TQColor &col )
TQByteArray data = e->encodedData("application/x-color");
ushort rgba[4];
if (data.size() != sizeof(rgba))
- return FALSE;
+ return false;
memcpy(rgba, data.data(), sizeof(rgba));
@@ -1805,7 +1805,7 @@ bool TQColorDrag::decode( TQMimeSource *e, TQColor &col )
b = (b >> 8) & 0xff;
col.setRgb(r, g, b);
- return TRUE;
+ return true;
}
#endif // TQT_NO_MIME
diff --git a/src/kernel/tqdragobject.h b/src/kernel/tqdragobject.h
index 568e0cbd8..a06e5ca2c 100644
--- a/src/kernel/tqdragobject.h
+++ b/src/kernel/tqdragobject.h
@@ -244,7 +244,7 @@ private:
bool drag( TQDragObject *, TQDragObject::DragMode );
- void cancel( bool deleteSource = TRUE );
+ void cancel( bool deleteSource = true );
void move( const TQPoint & );
void drop();
void updatePixmap();
diff --git a/src/kernel/tqdrawutil.cpp b/src/kernel/tqdrawutil.cpp
index 79aa69378..a05908895 100644
--- a/src/kernel/tqdrawutil.cpp
+++ b/src/kernel/tqdrawutil.cpp
@@ -60,8 +60,8 @@
TQColorGroup::light() light\endlink, \link TQColorGroup::dark()
dark\endlink and \link TQColorGroup::mid() middle\endlink colors).
- The line appears sunken if \a sunken is TRUE, or raised if \a
- sunken is FALSE.
+ The line appears sunken if \a sunken is true, or raised if \a
+ sunken is false.
The \a lineWidth argument specifies the line width for each of the
lines. It is not the total line width.
@@ -175,8 +175,8 @@ void qDrawShadeLine( TQPainter *p, int x1, int y1, int x2, int y2,
TQColorGroup::light() light\endlink, \link TQColorGroup::dark()
dark\endlink and \link TQColorGroup::mid() middle\endlink colors).
- The rectangle appears sunken if \a sunken is TRUE, or raised if \a
- sunken is FALSE.
+ The rectangle appears sunken if \a sunken is true, or raised if \a
+ sunken is false.
The \a lineWidth argument specifies the line width for each of the
lines. It is not the total line width.
@@ -281,8 +281,8 @@ void qDrawShadeRect( TQPainter *p, int x, int y, int w, int h,
TQColorGroup::light() light\endlink, \link TQColorGroup::dark()
dark\endlink and \link TQColorGroup::mid() middle\endlink colors).
- The panel appears sunken if \a sunken is TRUE, or raised if \a
- sunken is FALSE.
+ The panel appears sunken if \a sunken is true, or raised if \a
+ sunken is false.
The \a lineWidth argument specifies the line width.
@@ -436,8 +436,8 @@ static void qDrawWinShades( TQPainter *p,
TQColorGroup::light() light\endlink, \link TQColorGroup::dark()
dark\endlink and \link TQColorGroup::mid() middle\endlink colors).
- The button appears sunken if \a sunken is TRUE, or raised if \a
- sunken is FALSE.
+ The button appears sunken if \a sunken is true, or raised if \a
+ sunken is false.
The line width is 2 pixels.
@@ -473,8 +473,8 @@ void qDrawWinButton( TQPainter *p, int x, int y, int w, int h,
The color group argument \a g specifies the shading colors.
- The panel appears sunken if \a sunken is TRUE, or raised if \a
- sunken is FALSE.
+ The panel appears sunken if \a sunken is true, or raised if \a
+ sunken is false.
The line width is 2 pixels.
@@ -605,7 +605,7 @@ void qDrawItem( TQPainter *p, TQt::GUIStyle gs,
bool clip = (flags & TQt::DontClip) == 0;
if ( clip ) {
if ( pm.width() < w && pm.height() < h )
- clip = FALSE;
+ clip = false;
else
p->setClipRect( x, y, w, h );
}
@@ -634,7 +634,7 @@ void qDrawItem( TQPainter *p, TQt::GUIStyle gs,
TQString k;
k.sprintf( "$qt-drawitem-%x", pm.serialNumber() );
TQPixmap *mask = TQPixmapCache::find(k);
- bool del=FALSE;
+ bool del=false;
if ( !mask ) {
mask = new TQPixmap( pm.createHeuristicMask() );
mask->setMask( *((TQBitmap*)mask) );
@@ -652,7 +652,7 @@ void qDrawItem( TQPainter *p, TQt::GUIStyle gs,
}
p->drawPixmap( x, y, pm );
if ( clip )
- p->setClipping( FALSE );
+ p->setClipping( false );
} else if ( !text.isNull() ) {
if ( gs == TQt::WindowsStyle && !enabled ) {
p->setPen( g.light() );
@@ -908,7 +908,7 @@ static void qDrawMotifArrow( TQPainter *p, TQt::ArrowType type, bool down,
p->setPen( pen );
p->setBrush( brush );
#ifndef TQT_NO_TRANSFORMATIONS
- p->setWorldMatrix( matrix, TRUE ); // set transformation matrix
+ p->setWorldMatrix( matrix, true ); // set transformation matrix
#endif
p->drawPolygon( bFill ); // fill arrow
p->setBrush( TQt::NoBrush ); // don't fill
diff --git a/src/kernel/tqdrawutil.h b/src/kernel/tqdrawutil.h
index 113d6095f..78ffc0ac8 100644
--- a/src/kernel/tqdrawutil.h
+++ b/src/kernel/tqdrawutil.h
@@ -59,45 +59,45 @@ class TQPixmap;
//
TQ_EXPORT void qDrawShadeLine( TQPainter *p, int x1, int y1, int x2, int y2,
- const TQColorGroup &g, bool sunken = TRUE,
+ const TQColorGroup &g, bool sunken = true,
int lineWidth = 1, int midLineWidth = 0 );
TQ_EXPORT void qDrawShadeLine( TQPainter *p, const TQPoint &p1, const TQPoint &p2,
- const TQColorGroup &g, bool sunken = TRUE,
+ const TQColorGroup &g, bool sunken = true,
int lineWidth = 1, int midLineWidth = 0 );
TQ_EXPORT void qDrawShadeRect( TQPainter *p, int x, int y, int w, int h,
- const TQColorGroup &, bool sunken=FALSE,
+ const TQColorGroup &, bool sunken=false,
int lineWidth = 1, int midLineWidth = 0,
const TQBrush *fill = 0 );
TQ_EXPORT void qDrawShadeRect( TQPainter *p, const TQRect &r,
- const TQColorGroup &, bool sunken=FALSE,
+ const TQColorGroup &, bool sunken=false,
int lineWidth = 1, int midLineWidth = 0,
const TQBrush *fill = 0 );
TQ_EXPORT void qDrawShadePanel( TQPainter *p, int x, int y, int w, int h,
- const TQColorGroup &, bool sunken=FALSE,
+ const TQColorGroup &, bool sunken=false,
int lineWidth = 1, const TQBrush *fill = 0 );
TQ_EXPORT void qDrawShadePanel( TQPainter *p, const TQRect &r,
- const TQColorGroup &, bool sunken=FALSE,
+ const TQColorGroup &, bool sunken=false,
int lineWidth = 1, const TQBrush *fill = 0 );
TQ_EXPORT void qDrawWinButton( TQPainter *p, int x, int y, int w, int h,
- const TQColorGroup &g, bool sunken = FALSE,
+ const TQColorGroup &g, bool sunken = false,
const TQBrush *fill = 0 );
TQ_EXPORT void qDrawWinButton( TQPainter *p, const TQRect &r,
- const TQColorGroup &g, bool sunken = FALSE,
+ const TQColorGroup &g, bool sunken = false,
const TQBrush *fill = 0 );
TQ_EXPORT void qDrawWinPanel( TQPainter *p, int x, int y, int w, int h,
- const TQColorGroup &, bool sunken=FALSE,
+ const TQColorGroup &, bool sunken=false,
const TQBrush *fill = 0 );
TQ_EXPORT void qDrawWinPanel( TQPainter *p, const TQRect &r,
- const TQColorGroup &, bool sunken=FALSE,
+ const TQColorGroup &, bool sunken=false,
const TQBrush *fill = 0 );
TQ_EXPORT void qDrawPlainRect( TQPainter *p, int x, int y, int w, int h, const TQColor &,
diff --git a/src/kernel/tqdropsite.cpp b/src/kernel/tqdropsite.cpp
index b544cdab3..49e328c95 100644
--- a/src/kernel/tqdropsite.cpp
+++ b/src/kernel/tqdropsite.cpp
@@ -64,11 +64,11 @@
Constructs a TQDropSite to handle events for the widget \a self.
Pass \c this as the \a self parameter.
- This enables dropping by calling TQWidget::setAcceptDrops(TRUE).
+ This enables dropping by calling TQWidget::setAcceptDrops(true).
*/
TQDropSite::TQDropSite( TQWidget* self )
{
- self->setAcceptDrops( TRUE );
+ self->setAcceptDrops( true );
}
/*!
diff --git a/src/kernel/tqevent.cpp b/src/kernel/tqevent.cpp
index fc59d9164..d1cf09fe9 100644
--- a/src/kernel/tqevent.cpp
+++ b/src/kernel/tqevent.cpp
@@ -56,9 +56,9 @@
and sends the translated events to TQObjects.
In general, events come from the underlying window system
- (spontaneous() returns TRUE) but it is also possible to manually
+ (spontaneous() returns true) but it is also possible to manually
send events using TQApplication::sendEvent() and
- TQApplication::postEvent() (spontaneous() returns FALSE).
+ TQApplication::postEvent() (spontaneous() returns false).
TQObjects receive events by having their TQObject::event() function
called. The function can be reimplemented in subclasses to
@@ -207,8 +207,8 @@
/*!
\fn bool TQEvent::spontaneous() const
- Returns TRUE if the event originated outside the application, i.e.
- it is a system event; otherwise returns FALSE.
+ Returns true if the event originated outside the application, i.e.
+ it is a system event; otherwise returns false.
*/
@@ -309,7 +309,7 @@
*/
TQMouseEvent::TQMouseEvent( Type type, const TQPoint &pos, int button, int state )
- : TQEvent(type), p(pos), b(button),s((ushort)state), accpt(TRUE){
+ : TQEvent(type), p(pos), b(button),s((ushort)state), accpt(true){
g = TQCursor::pos();
}
@@ -448,8 +448,8 @@ TQt::ButtonState TQMouseEvent::stateAfter() const
/*!
\fn bool TQMouseEvent::isAccepted() const
- Returns TRUE if the receiver of the event wants to keep the key;
- otherwise returns FALSE.
+ Returns true if the receiver of the event wants to keep the key;
+ otherwise returns false.
*/
/*!
@@ -529,7 +529,7 @@ TQt::ButtonState TQMouseEvent::stateAfter() const
#ifndef TQT_NO_WHEELEVENT
TQWheelEvent::TQWheelEvent( const TQPoint &pos, int delta, int state, Orientation orient )
: TQEvent(Wheel), p(pos), d(delta), s((ushort)state),
- accpt(TRUE), o(orient)
+ accpt(true), o(orient)
{
g = TQCursor::pos();
}
@@ -636,8 +636,8 @@ TQWheelEvent::TQWheelEvent( const TQPoint &pos, int delta, int state, Orientatio
/*!
\fn bool TQWheelEvent::isAccepted() const
- Returns TRUE if the receiver of the event handles the wheel event;
- otherwise returns FALSE.
+ Returns true if the receiver of the event handles the wheel event;
+ otherwise returns false.
*/
/*!
@@ -720,10 +720,10 @@ TQWheelEvent::TQWheelEvent( const TQPoint &pos, int delta, int state, Orientatio
keyboard macro). \a ascii is the ASCII code of the key that was
pressed or released. \a state holds the keyboard modifiers. \a
text is the Unicode text that the key generated. If \a autorep is
- TRUE, isAutoRepeat() will be TRUE. \a count is the number of
+ true, isAutoRepeat() will be true. \a count is the number of
single keys.
- The accept flag is set to TRUE.
+ The accept flag is set to true.
*/
/*!
@@ -804,8 +804,8 @@ TQt::ButtonState TQKeyEvent::stateAfter() const
/*!
\fn bool TQKeyEvent::isAccepted() const
- Returns TRUE if the receiver of the event wants to keep the key;
- otherwise returns FALSE
+ Returns true if the receiver of the event wants to keep the key;
+ otherwise returns false
*/
/*!
@@ -825,12 +825,12 @@ TQt::ButtonState TQKeyEvent::stateAfter() const
/*!
\fn bool TQKeyEvent::isAutoRepeat() const
- Returns TRUE if this event comes from an auto-repeating key and
- FALSE if it comes from an initial key press.
+ Returns true if this event comes from an auto-repeating key and
+ false if it comes from an initial key press.
Note that if the event is a multiple-key compressed event that is
- partly due to auto-repeat, this function could return either TRUE
- or FALSE indeterminately.
+ partly due to auto-repeat, this function could return either true
+ or false indeterminately.
*/
/*!
@@ -1251,15 +1251,15 @@ void TQFocusEvent::resetReason()
/*!
\fn bool TQFocusEvent::gotFocus() const
- Returns TRUE if the widget received the text input focus;
- otherwise returns FALSE.
+ Returns true if the widget received the text input focus;
+ otherwise returns false.
*/
/*!
\fn bool TQFocusEvent::lostFocus() const
- Returns TRUE if the widget lost the text input focus; otherwise
- returns FALSE.
+ Returns true if the widget lost the text input focus; otherwise
+ returns false.
*/
@@ -1279,9 +1279,9 @@ void TQFocusEvent::resetReason()
rect() can be much faster than region().boundingRect(). Painting
is clipped to region() during processing of a paint event.
- The erased() function returns TRUE if the region() has been
+ The erased() function returns true if the region() has been
cleared to the widget's background (see
- TQWidget::backgroundMode()), and FALSE if the region's contents are
+ TQWidget::backgroundMode()), and false if the region's contents are
arbitrary.
\sa TQPainter TQWidget::update() TQWidget::repaint()
@@ -1289,27 +1289,27 @@ void TQFocusEvent::resetReason()
*/
/*!
- \fn TQPaintEvent::TQPaintEvent( const TQRegion &paintRegion, bool erased=TRUE )
+ \fn TQPaintEvent::TQPaintEvent( const TQRegion &paintRegion, bool erased=true )
Constructs a paint event object with the region that should be
updated. The region is given by \a paintRegion. If \a erased is
- TRUE the region will be cleared before repainting.
+ true the region will be cleared before repainting.
*/
/*!
- \fn TQPaintEvent::TQPaintEvent( const TQRect &paintRect, bool erased=TRUE )
+ \fn TQPaintEvent::TQPaintEvent( const TQRect &paintRect, bool erased=true )
Constructs a paint event object with the rectangle that should be
updated. The region is also given by \a paintRect. If \a erased is
- TRUE the region will be cleared before repainting.
+ true the region will be cleared before repainting.
*/
/*!
- \fn TQPaintEvent::TQPaintEvent( const TQRegion &paintRegion, const TQRect &paintRect, bool erased=TRUE )
+ \fn TQPaintEvent::TQPaintEvent( const TQRegion &paintRegion, const TQRect &paintRect, bool erased=true )
Constructs a paint event object with the rectangle \a paintRect
that should be updated. The region is given by \a paintRegion. If
- \a erased is TRUE the region will be cleared before repainting.
+ \a erased is true the region will be cleared before repainting.
*/
/*!
@@ -1331,8 +1331,8 @@ void TQFocusEvent::resetReason()
/*!
\fn bool TQPaintEvent::erased() const
- Returns TRUE if the paint event region (or rectangle) has been
- erased with the widget's background; otherwise returns FALSE.
+ Returns true if the paint event region (or rectangle) has been
+ erased with the widget's background; otherwise returns false.
*/
/*!
@@ -1448,7 +1448,7 @@ void TQFocusEvent::resetReason()
If the last top-level window is closed, the
TQApplication::lastWindowClosed() signal is emitted.
- The isAccepted() function returns TRUE if the event's receiver has
+ The isAccepted() function returns true if the event's receiver has
agreed to close the widget; call accept() to agree to close the
widget and call ignore() if the receiver of this event does not
want the widget to be closed.
@@ -1462,7 +1462,7 @@ void TQFocusEvent::resetReason()
\fn TQCloseEvent::TQCloseEvent()
Constructs a close event object with the accept parameter flag set
- to FALSE.
+ to false.
\sa accept()
*/
@@ -1470,8 +1470,8 @@ void TQFocusEvent::resetReason()
/*!
\fn bool TQCloseEvent::isAccepted() const
- Returns TRUE if the receiver of the event has agreed to close the
- widget; otherwise returns FALSE.
+ Returns true if the receiver of the event has agreed to close the
+ widget; otherwise returns false.
\sa accept(), ignore()
*/
@@ -1521,7 +1521,7 @@ void TQFocusEvent::resetReason()
\fn TQIconDragEvent::TQIconDragEvent()
Constructs an icon drag event object with the accept parameter
- flag set to FALSE.
+ flag set to false.
\sa accept()
*/
@@ -1529,8 +1529,8 @@ void TQFocusEvent::resetReason()
/*!
\fn bool TQIconDragEvent::isAccepted() const
- Returns TRUE if the receiver of the event has started a drag and
- drop operation; otherwise returns FALSE.
+ Returns true if the receiver of the event has started a drag and
+ drop operation; otherwise returns false.
\sa accept(), ignore()
*/
@@ -1587,7 +1587,7 @@ void TQFocusEvent::resetReason()
\fn TQContextMenuEvent::TQContextMenuEvent( Reason reason, const TQPoint &pos, const TQPoint &globalPos, int state )
Constructs a context menu event object with the accept parameter
- flag set to FALSE.
+ flag set to false.
The \a reason parameter must be \c TQContextMenuEvent::Mouse or \c
TQContextMenuEvent::Keyboard.
@@ -1602,7 +1602,7 @@ void TQFocusEvent::resetReason()
\fn TQContextMenuEvent::TQContextMenuEvent( Reason reason, const TQPoint &pos, int state )
Constructs a context menu event object with the accept parameter
- flag set to FALSE.
+ flag set to false.
The \a reason parameter must be \c TQContextMenuEvent::Mouse or \c
TQContextMenuEvent::Keyboard.
@@ -1617,7 +1617,7 @@ void TQFocusEvent::resetReason()
*/
TQContextMenuEvent::TQContextMenuEvent( Reason reason, const TQPoint &pos, int state )
- : TQEvent( ContextMenu ), p( pos ), accpt(TRUE), consum(TRUE),
+ : TQEvent( ContextMenu ), p( pos ), accpt(true), consum(true),
reas( reason ), s((ushort)state)
{
gp = TQCursor::pos();
@@ -1691,8 +1691,8 @@ TQContextMenuEvent::TQContextMenuEvent( Reason reason, const TQPoint &pos, int s
/*!
\fn bool TQContextMenuEvent::isConsumed() const
- Returns TRUE (which stops propagation of the event) if the
- receiver has blocked the event; otherwise returns FALSE.
+ Returns true (which stops propagation of the event) if the
+ receiver has blocked the event; otherwise returns false.
\sa accept(), ignore(), consume()
*/
@@ -1714,8 +1714,8 @@ TQContextMenuEvent::TQContextMenuEvent( Reason reason, const TQPoint &pos, int s
/*!
\fn bool TQContextMenuEvent::isAccepted() const
- Returns TRUE if the receiver has processed the event; otherwise
- returns FALSE.
+ Returns true if the receiver has processed the event; otherwise
+ returns false.
\sa accept(), ignore(), consume()
*/
@@ -1847,7 +1847,7 @@ TQContextMenuEvent::TQContextMenuEvent( Reason reason, const TQPoint &pos, int s
/*!
\fn TQIMEvent::TQIMEvent( Type type, const TQString &text, int cursorPosition )
- Constructs a new TQIMEvent with the accept flag set to FALSE. \a
+ Constructs a new TQIMEvent with the accept flag set to false. \a
type can be one of TQEvent::IMStartEvent, TQEvent::IMComposeEvent
or TQEvent::IMEndEvent. \a text contains the current compostion
string and \a cursorPosition the current position of the cursor
@@ -1881,8 +1881,8 @@ TQContextMenuEvent::TQContextMenuEvent( Reason reason, const TQPoint &pos, int s
/*!
\fn bool TQIMEvent::isAccepted() const
- Returns TRUE if the receiver of the event processed the event;
- otherwise returns FALSE.
+ Returns true if the receiver of the event processed the event;
+ otherwise returns false.
*/
/*!
@@ -1988,7 +1988,7 @@ TQTabletEvent::TQTabletEvent( Type t, const TQPoint &pos, const TQPoint &globalP
mYT( yTilt ),
mType( uId.first ),
mPhy( uId.second ),
- mbAcc(TRUE)
+ mbAcc(true)
{}
/*!
@@ -2110,8 +2110,8 @@ TQTabletEvent::TQTabletEvent( Type t, const TQPoint &pos, const TQPoint &globalP
/*!
\fn bool TQTabletEvent::isAccepted() const
- Returns TRUE if the receiver of the event handles the tablet
- event; otherwise returns FALSE.
+ Returns true if the receiver of the event handles the tablet
+ event; otherwise returns false.
*/
/*!
@@ -2196,14 +2196,14 @@ TQTabletEvent::TQTabletEvent( Type t, const TQPoint &pos, const TQPoint &globalP
/*!
\fn bool TQChildEvent::inserted() const
- Returns TRUE if the widget received a new child; otherwise returns
- FALSE.
+ Returns true if the widget received a new child; otherwise returns
+ false.
*/
/*!
\fn bool TQChildEvent::removed() const
- Returns TRUE if the object lost a child; otherwise returns FALSE.
+ Returns true if the object lost a child; otherwise returns false.
*/
@@ -2357,16 +2357,16 @@ TQCustomEvent::TQCustomEvent( int type )
/*!
\fn bool TQDropEvent::isAccepted () const
- Returns TRUE if the drop target accepts the event; otherwise
- returns FALSE.
+ Returns true if the drop target accepts the event; otherwise
+ returns false.
*/
/*!
- \fn void TQDropEvent::accept(bool y=TRUE)
+ \fn void TQDropEvent::accept(bool y=true)
Call this function to indicate whether the event provided data
- which your widget processed. Set \a y to TRUE (the default) if
- your widget could process the data, otherwise set \a y to FALSE.
+ which your widget processed. Set \a y to true (the default) if
+ your widget could process the data, otherwise set \a y to false.
To get the data, use encodedData(), or preferably, the decode()
methods of existing TQDragObject subclasses, such as
TQTextDrag::decode(), or your own subclasses.
@@ -2375,12 +2375,12 @@ TQCustomEvent::TQCustomEvent( int type )
*/
/*!
- \fn void TQDropEvent::acceptAction(bool y=TRUE)
+ \fn void TQDropEvent::acceptAction(bool y=true)
Call this to indicate that the action described by action() is
- accepted (i.e. if \a y is TRUE, which is the default), not merely
- the default copy action. If you call acceptAction(TRUE), there is
- no need to also call accept(TRUE).
+ accepted (i.e. if \a y is true, which is the default), not merely
+ the default copy action. If you call acceptAction(true), there is
+ no need to also call accept(true).
*/
/*!
@@ -2448,8 +2448,8 @@ TQCustomEvent::TQCustomEvent( int type )
/*!
\fn bool TQDropEvent::isActionAccepted () const
- Returns TRUE if the drop action was accepted by the drop site;
- otherwise returns FALSE.
+ Returns true if the drop action was accepted by the drop site;
+ otherwise returns false.
*/
@@ -2518,12 +2518,12 @@ TQCustomEvent::TQCustomEvent( int type )
This event is sent just before TQWidget::hide() returns, and also
when a top-level window has been hidden (iconified) by the user.
- If spontaneous() is TRUE the event originated outside the
+ If spontaneous() is true the event originated outside the
application, i.e. the user hid the window using the window manager
controls, either by iconifying the window or by switching to
another virtual desktop where the window isn't visible. The window
will become hidden but not withdrawn. If the window was iconified,
- TQWidget::isMinimized() returns TRUE.
+ TQWidget::isMinimized() returns true.
\sa TQShowEvent
*/
diff --git a/src/kernel/tqevent.h b/src/kernel/tqevent.h
index 6011dd35e..96205c0a7 100644
--- a/src/kernel/tqevent.h
+++ b/src/kernel/tqevent.h
@@ -144,7 +144,7 @@ public:
};
- TQEvent( Type type ) : t(type), posted(FALSE), spont(FALSE) {}
+ TQEvent( Type type ) : t(type), posted(false), spont(false) {}
virtual ~TQEvent();
Type type() const { return t; }
bool spontaneous() const { return spont; }
@@ -180,7 +180,7 @@ public:
TQMouseEvent( Type type, const TQPoint &pos, const TQPoint&globalPos,
int button, int state )
- : TQEvent(type), p(pos), g(globalPos), b((ushort)button),s((ushort)state),accpt(TRUE) {};
+ : TQEvent(type), p(pos), g(globalPos), b((ushort)button),s((ushort)state),accpt(true) {};
const TQPoint &pos() const { return p; }
const TQPoint &globalPos() const { return g; }
@@ -192,8 +192,8 @@ public:
ButtonState state() const { return (ButtonState) s; }
ButtonState stateAfter() const;
bool isAccepted() const { return accpt; }
- void accept() { accpt = TRUE; }
- void ignore() { accpt = FALSE; }
+ void accept() { accpt = true; }
+ void ignore() { accpt = false; }
protected:
TQPoint p;
TQPoint g;
@@ -210,7 +210,7 @@ public:
TQWheelEvent( const TQPoint &pos, int delta, int state, Orientation orient = Vertical );
TQWheelEvent( const TQPoint &pos, const TQPoint& globalPos, int delta, int state, Orientation orient = Vertical )
: TQEvent(Wheel), p(pos), g(globalPos), d(delta), s((ushort)state),
- accpt(TRUE), o(orient) {}
+ accpt(true), o(orient) {}
int delta() const { return d; }
const TQPoint &pos() const { return p; }
const TQPoint &globalPos() const { return g; }
@@ -221,8 +221,8 @@ public:
ButtonState state() const { return ButtonState(s); }
Orientation orientation() const { return o; }
bool isAccepted() const { return accpt; }
- void accept() { accpt = TRUE; }
- void ignore() { accpt = FALSE; }
+ void accept() { accpt = true; }
+ void ignore() { accpt = false; }
protected:
TQPoint p;
TQPoint g;
@@ -243,7 +243,7 @@ public:
int pressure, int xTilt, int yTilt, const TQPair<int,int> &uId )
: TQEvent( TabletMove ), mPos( pos ), mGPos( globalPos ), mDev( device ),
mPress( pressure ), mXT( xTilt ), mYT( yTilt ), mType( uId.first ),
- mPhy( uId.second ), mbAcc(TRUE)
+ mPhy( uId.second ), mbAcc(true)
{}
int pressure() const { return mPress; }
int xTilt() const { return mXT; }
@@ -256,8 +256,8 @@ public:
int globalY() const { return mGPos.y(); }
TabletDevice device() const { return TabletDevice(mDev); }
int isAccepted() const { return mbAcc; }
- void accept() { mbAcc = TRUE; }
- void ignore() { mbAcc = FALSE; }
+ void accept() { mbAcc = true; }
+ void ignore() { mbAcc = false; }
TQPair<int,int> uniqueId() { return TQPair<int,int>( mType, mPhy); }
protected:
TQPoint mPos;
@@ -276,12 +276,12 @@ class TQ_EXPORT TQKeyEvent : public TQEvent
{
public:
TQKeyEvent( Type type, int key, int ascii, int state,
- const TQString& text=TQString::null, bool autorep=FALSE, ushort count=1 )
+ const TQString& text=TQString::null, bool autorep=false, ushort count=1 )
: TQEvent(type), txt(text), k((ushort)key), s((ushort)state),
- a((uchar)ascii), accpt(TRUE), autor(autorep), c(count)
+ a((uchar)ascii), accpt(true), autor(autorep), c(count)
{
if ( key >= Key_Back && key <= Key_MediaLast )
- accpt = FALSE;
+ accpt = false;
}
int key() const { return k; }
int ascii() const { return a; }
@@ -291,8 +291,8 @@ public:
TQString text() const { return txt; }
bool isAutoRepeat() const { return autor; }
int count() const { return int(c); }
- void accept() { accpt = TRUE; }
- void ignore() { accpt = FALSE; }
+ void accept() { accpt = true; }
+ void ignore() { accpt = false; }
protected:
TQString txt;
@@ -328,17 +328,17 @@ private:
class TQ_EXPORT TQPaintEvent : public TQEvent
{
public:
- TQPaintEvent( const TQRegion& paintRegion, bool erased = TRUE)
+ TQPaintEvent( const TQRegion& paintRegion, bool erased = true)
: TQEvent(Paint),
rec(paintRegion.boundingRect()),
reg(paintRegion),
erase(erased){}
- TQPaintEvent( const TQRect &paintRect, bool erased = TRUE )
+ TQPaintEvent( const TQRect &paintRect, bool erased = true )
: TQEvent(Paint),
rec(paintRect),
reg(paintRect),
erase(erased){}
- TQPaintEvent( const TQRegion &paintRegion, const TQRect &paintRect, bool erased = TRUE )
+ TQPaintEvent( const TQRegion &paintRegion, const TQRect &paintRect, bool erased = true )
: TQEvent(Paint),
rec(paintRect),
reg(paintRegion),
@@ -388,10 +388,10 @@ class TQ_EXPORT TQCloseEvent : public TQEvent
{
public:
TQCloseEvent()
- : TQEvent(Close), accpt(FALSE) {}
+ : TQEvent(Close), accpt(false) {}
bool isAccepted() const { return accpt; }
- void accept() { accpt = TRUE; }
- void ignore() { accpt = FALSE; }
+ void accept() { accpt = true; }
+ void ignore() { accpt = false; }
protected:
bool accpt;
};
@@ -401,11 +401,11 @@ class TQ_EXPORT TQIconDragEvent : public TQEvent
{
public:
TQIconDragEvent()
- : TQEvent(IconDrag), accpt(FALSE) {}
+ : TQEvent(IconDrag), accpt(false) {}
bool isAccepted() const { return accpt; }
- void accept() { accpt = TRUE; }
- void ignore() { accpt = FALSE; }
+ void accept() { accpt = true; }
+ void ignore() { accpt = false; }
protected:
bool accpt;
};
@@ -430,7 +430,7 @@ class TQ_EXPORT TQContextMenuEvent : public TQEvent
public:
enum Reason { Mouse, Keyboard, Other };
TQContextMenuEvent( Reason reason, const TQPoint &pos, const TQPoint &globalPos, int state )
- : TQEvent( ContextMenu ), p( pos ), gp( globalPos ), accpt( TRUE ), consum( TRUE ),
+ : TQEvent( ContextMenu ), p( pos ), gp( globalPos ), accpt( true ), consum( true ),
reas( reason ), s((ushort)state) {}
TQContextMenuEvent( Reason reason, const TQPoint &pos, int state );
@@ -445,9 +445,9 @@ public:
ButtonState state() const { return (ButtonState) s; }
bool isAccepted() const { return accpt; }
bool isConsumed() const { return consum; }
- void consume() { accpt = FALSE; consum = TRUE; }
- void accept() { accpt = TRUE; consum = TRUE; }
- void ignore() { accpt = FALSE; consum = FALSE; }
+ void consume() { accpt = false; consum = true; }
+ void accept() { accpt = true; consum = true; }
+ void ignore() { accpt = false; consum = false; }
Reason reason() const { return Reason( reas ); }
@@ -465,12 +465,12 @@ class TQ_EXPORT TQIMEvent : public TQEvent
{
public:
TQIMEvent( Type type, const TQString &text, int cursorPosition )
- : TQEvent(type), txt(text), cpos(cursorPosition), a(TRUE) {}
+ : TQEvent(type), txt(text), cpos(cursorPosition), a(true) {}
const TQString &text() const { return txt; }
int cursorPos() const { return cpos; }
bool isAccepted() const { return a; }
- void accept() { a = TRUE; }
- void ignore() { a = FALSE; }
+ void accept() { a = true; }
+ void ignore() { a = false; }
int selectionLength() const;
private:
@@ -516,11 +516,11 @@ public:
{}
const TQPoint &pos() const { return p; }
bool isAccepted() const { return accpt || accptact; }
- void accept(bool y=TRUE) { accpt = y; }
- void ignore() { accpt = FALSE; }
+ void accept(bool y=true) { accpt = y; }
+ void ignore() { accpt = false; }
bool isActionAccepted() const { return accptact; }
- void acceptAction(bool y=TRUE) { accptact = y; }
+ void acceptAction(bool y=true) { accptact = y; }
enum Action { Copy, Link, Move, Private, UserAction=100 };
void setAction( Action a ) { act = (uint)a; }
Action action() const { return Action(act); }
@@ -552,9 +552,9 @@ public:
: TQDropEvent(pos,typ),
rect( pos, TQSize( 1, 1 ) ) {}
TQRect answerRect() const { return rect; }
- void accept( bool y=TRUE ) { TQDropEvent::accept(y); }
- void accept( const TQRect & r) { accpt = TRUE; rect = r; }
- void ignore( const TQRect & r) { accpt =FALSE; rect = r; }
+ void accept( bool y=true ) { TQDropEvent::accept(y); }
+ void accept( const TQRect & r) { accpt = true; rect = r; }
+ void ignore( const TQRect & r) { accpt =false; rect = r; }
void ignore() { TQDropEvent::ignore(); }
protected:
diff --git a/src/kernel/tqeventloop.cpp b/src/kernel/tqeventloop.cpp
index 6d6c6c5c2..9b3d3cb2b 100644
--- a/src/kernel/tqeventloop.cpp
+++ b/src/kernel/tqeventloop.cpp
@@ -176,9 +176,9 @@ int TQEventLoop::exec()
// cleanup
d->looplevel = 0;
- d->quitnow = FALSE;
- d->exitloop = FALSE;
- d->shortcut = FALSE;
+ d->quitnow = false;
+ d->exitloop = false;
+ d->shortcut = false;
// don't reset quitcode!
return d->quitcode;
@@ -205,9 +205,9 @@ void TQEventLoop::exit( int retcode )
if ( d->quitnow ) // preserve existing quitcode
return;
d->quitcode = retcode;
- d->quitnow = TRUE;
- d->exitloop = TRUE;
- d->shortcut = TRUE;
+ d->quitnow = true;
+ d->exitloop = true;
+ d->shortcut = true;
}
@@ -220,8 +220,8 @@ int TQEventLoop::enterLoop()
{
// save the current exitloop state
bool old_exitloop = d->exitloop;
- d->exitloop = FALSE;
- d->shortcut = FALSE;
+ d->exitloop = false;
+ d->shortcut = false;
d->looplevel++;
while ( ! d->exitloop ) {
@@ -229,15 +229,15 @@ int TQEventLoop::enterLoop()
}
d->looplevel--;
- // restore the exitloop state, but if quitnow is TRUE, we need to keep
+ // restore the exitloop state, but if quitnow is true, we need to keep
// exitloop set so that all other event loops drop out.
d->exitloop = old_exitloop || d->quitnow;
d->shortcut = d->quitnow;
if ( d->looplevel < 1 ) {
- d->quitnow = FALSE;
- d->exitloop = FALSE;
- d->shortcut = FALSE;
+ d->quitnow = false;
+ d->exitloop = false;
+ d->shortcut = false;
emit tqApp->aboutToQuit();
// send deferred deletes
@@ -254,8 +254,8 @@ int TQEventLoop::enterLoop()
*/
void TQEventLoop::exitLoop()
{
- d->exitloop = TRUE;
- d->shortcut = TRUE;
+ d->exitloop = true;
+ d->shortcut = true;
}
/*! \fn void TQEventLoop::loopLevel() const
@@ -323,15 +323,15 @@ void TQEventLoop::processEvents( ProcessEventsFlags flags, int maxTime )
NOTE: This function will not process events continuously; it
returns after all available events are processed.
- This function returns TRUE if an event was processed; otherwise it
- returns FALSE.
+ This function returns true if an event was processed; otherwise it
+ returns false.
\sa ProcessEvents hasPendingEvents()
*/
/*! \fn bool TQEventLoop::hasPendingEvents() const
- Returns TRUE if there is an event waiting, otherwise it returns FALSE.
+ Returns true if there is an event waiting, otherwise it returns false.
*/
/*! \fn void TQEventLoop::registerSocketNotifier( TQSocketNotifier *notifier )
diff --git a/src/kernel/tqeventloop_p.h b/src/kernel/tqeventloop_p.h
index 395d90a85..c996b73b4 100644
--- a/src/kernel/tqeventloop_p.h
+++ b/src/kernel/tqeventloop_p.h
@@ -108,9 +108,9 @@ public:
void reset() {
looplevel = 0;
quitcode = 0;
- quitnow = FALSE;
- exitloop = FALSE;
- shortcut = FALSE;
+ quitnow = false;
+ exitloop = false;
+ shortcut = false;
}
int looplevel;
diff --git a/src/kernel/tqeventloop_unix.cpp b/src/kernel/tqeventloop_unix.cpp
index fc0a0b48b..00bb78ae3 100644
--- a/src/kernel/tqeventloop_unix.cpp
+++ b/src/kernel/tqeventloop_unix.cpp
@@ -67,14 +67,14 @@
Arguments:
int timerId timer identifier
Returns:
- bool TRUE if successful
+ bool true if successful
qKillTimer( obj )
Stops all timers that are sent to the specified object.
Arguments:
TQObject *obj object receiving timer events
Returns:
- bool TRUE if successful
+ bool true if successful
*****************************************************************************/
//
@@ -232,14 +232,14 @@ static void repairTimer( const timeval &time ) // repair broken timer
timeval *qt_wait_timer()
{
static timeval tm;
- bool first = TRUE;
+ bool first = true;
timeval currentTime;
if ( timerList && timerList->count() ) { // there are waiting timers
getTime( currentTime );
if ( first ) {
if ( currentTime < watchtime ) // clock was turned back
repairTimer( currentTime );
- first = FALSE;
+ first = false;
watchtime = currentTime;
}
TimerInfo *t = timerList->first(); // first waiting timer
@@ -270,7 +270,7 @@ static void initTimers() // initialize timers
timerBitVec->clearBit( i );
timerList = new TimerList;
TQ_CHECK_PTR( timerList );
- timerList->setAutoDelete( TRUE );
+ timerList->setAutoDelete( true );
gettimeofday( &watchtime, 0 );
}
@@ -311,7 +311,7 @@ bool qKillTimer( int id )
TimerInfo *t;
if ( !timerList || id <= 0 ||
id > (int)timerBitVec->size() || !timerBitVec->testBit( id-1 ) )
- return FALSE; // not init'd or invalid timer
+ return false; // not init'd or invalid timer
t = timerList->first();
while ( t && t->id != id ) // find timer info in list
t = timerList->next();
@@ -320,14 +320,14 @@ bool qKillTimer( int id )
return timerList->remove();
}
else // id not found
- return FALSE;
+ return false;
}
bool qKillTimer( TQObject *obj )
{
TimerInfo *t;
if ( !timerList ) // not initialized
- return FALSE;
+ return false;
t = timerList->first();
while ( t ) { // check all timers
if ( t->obj == obj ) { // object found
@@ -338,7 +338,7 @@ bool qKillTimer( TQObject *obj )
t = timerList->next();
}
}
- return TRUE;
+ return true;
}
/*****************************************************************************
@@ -381,7 +381,7 @@ void TQEventLoop::registerSocketNotifier( TQSocketNotifier *notifier )
// create new list, the TQSockNotType destructor will delete it for us
list = new TQPtrList<TQSockNot>;
TQ_CHECK_PTR( list );
- list->setAutoDelete( TRUE );
+ list->setAutoDelete( true );
d->sn_vec[type].list = list;
}
@@ -526,7 +526,7 @@ int TQEventLoop::activateTimers()
{
if ( !timerList || !timerList->count() ) // no timers
return 0;
- bool first = TRUE;
+ bool first = true;
timeval currentTime;
int n_act = 0, maxCount = timerList->count();
TimerInfo *begin = 0;
@@ -539,7 +539,7 @@ int TQEventLoop::activateTimers()
if ( first ) {
if ( currentTime < watchtime ) // clock was turned back
repairTimer( currentTime );
- first = FALSE;
+ first = false;
watchtime = currentTime;
}
t = timerList->first();
diff --git a/src/kernel/tqeventloop_unix_glib.cpp b/src/kernel/tqeventloop_unix_glib.cpp
index eec66d0af..93182ded5 100644
--- a/src/kernel/tqeventloop_unix_glib.cpp
+++ b/src/kernel/tqeventloop_unix_glib.cpp
@@ -79,14 +79,14 @@ extern TQMutex *tqt_timerListMutex;
Arguments:
int timerId timer identifier
Returns:
- bool TRUE if successful
+ bool true if successful
qKillTimer( obj )
Stops all timers that are sent to the specified object.
Arguments:
TQObject *obj object receiving timer events
Returns:
- bool TRUE if successful
+ bool true if successful
*****************************************************************************/
//
@@ -262,7 +262,7 @@ timeval *qt_wait_timer()
tqt_timerListMutex->lock();
#endif
static timeval tm;
- bool first = TRUE;
+ bool first = true;
timeval currentTime;
if ( timerList && timerList->count() ) { // there are waiting timers
getTime( currentTime );
@@ -270,7 +270,7 @@ timeval *qt_wait_timer()
if ( currentTime < watchtime ) { // clock was turned back
repairTimer( currentTime );
}
- first = FALSE;
+ first = false;
watchtime = currentTime;
}
TimerInfo *t = timerList->first(); // first waiting timer
@@ -316,7 +316,7 @@ static void initTimers() // initialize timers
tqt_timerListMutex = new TQMutex(true);
#endif
TQ_CHECK_PTR( timerList );
- timerList->setAutoDelete( TRUE );
+ timerList->setAutoDelete( true );
gettimeofday( &watchtime, 0 );
}
@@ -375,7 +375,7 @@ bool qKillTimer( int id )
#if defined(TQT_THREAD_SUPPORT)
if (tqt_timerListMutex) tqt_timerListMutex->unlock();
#endif
- return FALSE; // not init'd or invalid timer
+ return false; // not init'd or invalid timer
}
t = timerList->first();
while ( t && t->id != id ) { // find timer info in list
@@ -394,7 +394,7 @@ bool qKillTimer( int id )
#if defined(TQT_THREAD_SUPPORT)
if (tqt_timerListMutex) tqt_timerListMutex->unlock();
#endif
- return FALSE;
+ return false;
}
}
@@ -408,7 +408,7 @@ bool qKillTimer( TQObject *obj )
#if defined(TQT_THREAD_SUPPORT)
if (tqt_timerListMutex) tqt_timerListMutex->unlock();
#endif
- return FALSE;
+ return false;
}
t = timerList->first();
while ( t ) { // check all timers
@@ -424,7 +424,7 @@ bool qKillTimer( TQObject *obj )
#if defined(TQT_THREAD_SUPPORT)
if (tqt_timerListMutex) tqt_timerListMutex->unlock();
#endif
- return TRUE;
+ return true;
}
@@ -436,7 +436,7 @@ TQEventLoopPrivate::TQEventLoopPrivate() {
x_gPollFD.revents = 0;
#endif // TQ_WS_X11
gSource = nullptr;
- singletoolkit = TRUE;
+ singletoolkit = true;
ctx = nullptr;
mainloop = nullptr;
ctx_is_default = false;
@@ -450,9 +450,9 @@ TQEventLoopPrivate::~TQEventLoopPrivate() {
void TQEventLoopPrivate::reset() {
looplevel = 0;
quitcode = 0;
- quitnow = FALSE;
- exitloop = FALSE;
- shortcut = FALSE;
+ quitnow = false;
+ exitloop = false;
+ shortcut = false;
}
@@ -486,7 +486,7 @@ void TQEventLoop::registerSocketNotifier( TQSocketNotifier *notifier )
// create new list, the TQSockNotType destructor will delete it for us
list = new TQPtrList<TQSockNot>;
TQ_CHECK_PTR( list );
- list->setAutoDelete( TRUE );
+ list->setAutoDelete( true );
d->sn_list = list;
}
*/
@@ -510,7 +510,7 @@ void TQEventLoop::registerSocketNotifier( TQSocketNotifier *notifier )
sn->gPollFD.fd = sockfd;
sn->gPollFD.events = events;
sn->events = events; // save events!
- sn->pending = FALSE;
+ sn->pending = false;
list->append( sn );
@@ -589,7 +589,7 @@ void TQEventLoop::setSocketNotifierPending( TQSocketNotifier *notifier )
if ( !sn->pending ) {
d->sn_pending_list.insert( (rand() & 0xff) %
(d->sn_pending_list.count()+1), sn );
- sn->pending = TRUE; // add it only once!
+ sn->pending = true; // add it only once!
}
}
@@ -639,7 +639,7 @@ int TQEventLoop::activateTimers()
#endif
return 0;
}
- bool first = TRUE;
+ bool first = true;
timeval currentTime;
int n_act = 0, maxCount = timerList->count();
TimerInfo *begin = 0;
@@ -654,7 +654,7 @@ int TQEventLoop::activateTimers()
if ( currentTime < watchtime ) { // clock was turned back
repairTimer( currentTime );
}
- first = FALSE;
+ first = false;
watchtime = currentTime;
}
t = timerList->first();
@@ -728,7 +728,7 @@ int TQEventLoop::activateSocketNotifiers()
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("activate sn : send event fd=%d\n", sn->gPollFD.fd );
#endif
- sn->pending = FALSE;
+ sn->pending = false;
#if defined(TQT_THREAD_SUPPORT)
// Be careful...the current thread may not be the target object's thread!
if ((!sn->obj) ||
diff --git a/src/kernel/tqeventloop_x11.cpp b/src/kernel/tqeventloop_x11.cpp
index 97fb570dd..74014ddbd 100644
--- a/src/kernel/tqeventloop_x11.cpp
+++ b/src/kernel/tqeventloop_x11.cpp
@@ -152,7 +152,7 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags )
// also flushes output buffer
while ( XPending( TQPaintDevice::x11AppDisplay() ) ) {
if ( d->shortcut ) {
- return FALSE;
+ return false;
}
XNextEvent( TQPaintDevice::x11AppDisplay(), &event );
@@ -194,25 +194,25 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags )
nevents++;
if ( tqApp->x11ProcessEvent( &event ) == 1 )
- return TRUE;
+ return true;
}
}
}
}
if ( d->shortcut ) {
- return FALSE;
+ return false;
}
TQApplication::sendPostedEvents();
const uint exclude_all = ExcludeSocketNotifiers | ExcludeTimers;
if ( nevents > 0 && ( flags & exclude_all ) == exclude_all && ( flags & WaitForMore ) ) {
- return TRUE;
+ return true;
}
// don't block if exitLoop() or exit()/quit() has been called.
- bool canWait = d->exitloop || d->quitnow ? FALSE : (flags & WaitForMore);
+ bool canWait = d->exitloop || d->quitnow ? false : (flags & WaitForMore);
// Process timers and socket notifiers - the common UNIX stuff
@@ -346,7 +346,7 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags )
static const char *t[] = { "Read", "Write", "Exception" };
tqWarning("TQSocketNotifier: invalid socket %d and type '%s', disabling...",
sn->fd, t[type]);
- sn->obj->setEnabled(FALSE);
+ sn->obj->setEnabled(false);
}
sn = list->next();
diff --git a/src/kernel/tqeventloop_x11_glib.cpp b/src/kernel/tqeventloop_x11_glib.cpp
index fa449ca07..d031d21ee 100644
--- a/src/kernel/tqeventloop_x11_glib.cpp
+++ b/src/kernel/tqeventloop_x11_glib.cpp
@@ -321,7 +321,7 @@ bool TQEventLoop::processX11Events()
// also flushes output buffer
while ( XPending( TQPaintDevice::x11AppDisplay() ) ) {
if ( d->shortcut ) {
- return FALSE;
+ return false;
}
XNextEvent( TQPaintDevice::x11AppDisplay(), &event );
@@ -363,7 +363,7 @@ bool TQEventLoop::processX11Events()
nevents++;
if ( tqApp->x11ProcessEvent( &event ) == 1 ) {
- return TRUE;
+ return true;
}
}
}
@@ -371,16 +371,16 @@ bool TQEventLoop::processX11Events()
}
if ( d->shortcut ) {
- return FALSE;
+ return false;
}
TQApplication::sendPostedEvents();
const uint exclude_all = ExcludeSocketNotifiers | ExcludeTimers;
if ( nevents > 0 && ( flags & exclude_all ) == exclude_all && ( flags & WaitForMore ) ) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -399,7 +399,7 @@ bool TQEventLoop::gsourcePrepare(GSource *gs, int * timeout)
#endif
// don't block if exitLoop() or exit()/quit() has been called.
- bool canWait = d->exitloop || d->quitnow ? FALSE : (flags & WaitForMore);
+ bool canWait = d->exitloop || d->quitnow ? false : (flags & WaitForMore);
// Process timers and socket notifiers - the common UNIX stuff
@@ -463,7 +463,7 @@ bool TQEventLoop::gsourcePrepare(GSource *gs, int * timeout)
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside gsourcePrepare(3a)\n");
#endif
- return FALSE;
+ return false;
}
// stay in poll until something happens?
@@ -472,7 +472,7 @@ bool TQEventLoop::gsourcePrepare(GSource *gs, int * timeout)
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside gsourcePrepare(3b) timeout=%d \n", *timeout);
#endif
- return FALSE;
+ return false;
}
// else timeout >=0
@@ -482,7 +482,7 @@ bool TQEventLoop::gsourcePrepare(GSource *gs, int * timeout)
printf("inside gsourcePrepare(3c) timeout=%d \n", *timeout);
#endif
- return FALSE;
+ return false;
}
@@ -503,7 +503,7 @@ bool TQEventLoop::gsourceCheck(GSource *gs) {
while ( (sn=it.current()) ) {
++it;
if ( sn->gPollFD.revents ) {
- return TRUE;
+ return true;
}
}
}
@@ -513,21 +513,21 @@ bool TQEventLoop::gsourceCheck(GSource *gs) {
printf("inside gsourceCheck(2) xfd!\n");
#endif
- return TRUE; // we got events!
+ return true; // we got events!
}
if (d->threadPipe_gPollFD.revents) {
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside gsourceCheck(2) threadpipe!!\n");
#endif
- return TRUE; // we got events!
+ return true; // we got events!
}
if (hasPendingEvents()) {
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside gsourceCheck(2) pendingEvents!\n");
#endif
- return TRUE; // we got more X11 events!
+ return true; // we got more X11 events!
}
// check if we have timers to activate?
@@ -538,7 +538,7 @@ bool TQEventLoop::gsourceCheck(GSource *gs) {
printf("inside gsourceCheck(2) qtwaittimer!\n");
#endif
- return TRUE;
+ return true;
}
}
@@ -547,7 +547,7 @@ bool TQEventLoop::gsourceCheck(GSource *gs) {
printf("inside gsourceCheck(2) nothing to dispatch!\n");
#endif
- return FALSE;
+ return false;
}
@@ -639,10 +639,10 @@ bool TQEventLoop::gsourceDispatch(GSource *gs) {
}
if (d->singletoolkit) {
- return TRUE; // Eat the event
+ return true; // Eat the event
}
else {
- return FALSE; // Pass the event on to GTK
+ return false; // Pass the event on to GTK
}
}
diff --git a/src/kernel/tqfont.cpp b/src/kernel/tqfont.cpp
index c8395d342..5dce75b20 100644
--- a/src/kernel/tqfont.cpp
+++ b/src/kernel/tqfont.cpp
@@ -65,7 +65,7 @@
#ifdef TQFONTCACHE_DEBUG
# define FC_DEBUG tqDebug
#else
-# define FC_DEBUG if (FALSE) tqDebug
+# define FC_DEBUG if (false) tqDebug
#endif
@@ -93,21 +93,21 @@ bool TQFontDef::operator==( const TQFontDef &other ) const
*/
if (pixelSize != -1 && other.pixelSize != -1) {
if (pixelSize != other.pixelSize)
- return FALSE;
+ return false;
} else if (pointSize != -1 && other.pointSize != -1) {
if (pointSize != other.pointSize
&& (TQABS(pointSize - other.pointSize) >= 5
|| tqRound(pointSize/10.) != tqRound(other.pointSize/10.)))
- return FALSE;
+ return false;
} else {
- return FALSE;
+ return false;
}
if (!ignorePitch && !other.ignorePitch && fixedPitch != other.fixedPitch)
- return FALSE;
+ return false;
if (stretch != 0 && other.stretch != 0 && stretch != other.stretch)
- return FALSE;
+ return false;
TQString this_family, this_foundry, other_family, other_foundry;
TQFontDatabase::parseFontName(family, this_foundry, this_family);
@@ -132,7 +132,7 @@ bool TQFontDef::operator==( const TQFontDef &other ) const
TQFontPrivate::TQFontPrivate()
: engineData( 0 ), paintdevice( 0 ),
- rawMode( FALSE ), underline( FALSE ), overline( FALSE ), strikeOut( FALSE ),
+ rawMode( false ), underline( false ), overline( false ), strikeOut( false ),
mask( 0 )
{
#ifdef TQ_WS_X11
@@ -250,7 +250,7 @@ TQFontEngineData::~TQFontEngineData()
attributes, or if no matching font exists, TQt will use the closest
matching installed font. The attributes of the font that is
actually used are retrievable from a TQFontInfo object. If the
- window system provides an exact match exactMatch() returns TRUE.
+ window system provides an exact match exactMatch() returns true.
Use TQFontMetrics to get measurements, e.g. the pixel length of a
string using TQFontMetrics::width().
@@ -831,7 +831,7 @@ void TQFont::setPixelSizeFloat( float pixelSize )
}
/*!
- Returns TRUE if italic has been set; otherwise returns FALSE.
+ Returns true if italic has been set; otherwise returns false.
\sa setItalic()
*/
@@ -841,7 +841,7 @@ bool TQFont::italic() const
}
/*!
- If \a enable is TRUE, italic is set on; otherwise italic is set
+ If \a enable is true, italic is set on; otherwise italic is set
off.
\sa italic(), TQFontInfo
@@ -907,8 +907,8 @@ void TQFont::setWeight( int weight )
/*!
\fn bool TQFont::bold() const
- Returns TRUE if weight() is a value greater than \link Weight
- TQFont::Normal \endlink; otherwise returns FALSE.
+ Returns true if weight() is a value greater than \link Weight
+ TQFont::Normal \endlink; otherwise returns false.
\sa weight(), setBold(), TQFontInfo::bold()
*/
@@ -926,7 +926,7 @@ void TQFont::setWeight( int weight )
*/
/*!
- Returns TRUE if underline has been set; otherwise returns FALSE.
+ Returns true if underline has been set; otherwise returns false.
\sa setUnderline()
*/
@@ -936,7 +936,7 @@ bool TQFont::underline() const
}
/*!
- If \a enable is TRUE, sets underline on; otherwise sets underline
+ If \a enable is true, sets underline on; otherwise sets underline
off.
\sa underline(), TQFontInfo
@@ -950,7 +950,7 @@ void TQFont::setUnderline( bool enable )
}
/*!
- Returns TRUE if overline has been set; otherwise returns FALSE.
+ Returns true if overline has been set; otherwise returns false.
\sa setOverline()
*/
@@ -960,7 +960,7 @@ bool TQFont::overline() const
}
/*!
- If \a enable is TRUE, sets overline on; otherwise sets overline off.
+ If \a enable is true, sets overline on; otherwise sets overline off.
\sa overline(), TQFontInfo
*/
@@ -973,7 +973,7 @@ void TQFont::setOverline( bool enable )
}
/*!
- Returns TRUE if strikeout has been set; otherwise returns FALSE.
+ Returns true if strikeout has been set; otherwise returns false.
\sa setStrikeOut()
*/
@@ -983,7 +983,7 @@ bool TQFont::strikeOut() const
}
/*!
- If \a enable is TRUE, sets strikeout on; otherwise sets strikeout
+ If \a enable is true, sets strikeout on; otherwise sets strikeout
off.
\sa strikeOut(), TQFontInfo
@@ -997,7 +997,7 @@ void TQFont::setStrikeOut( bool enable )
}
/*!
- Returns TRUE if fixed pitch has been set; otherwise returns FALSE.
+ Returns true if fixed pitch has been set; otherwise returns false.
\sa setFixedPitch(), TQFontInfo::fixedPitch()
*/
@@ -1007,7 +1007,7 @@ bool TQFont::fixedPitch() const
}
/*!
- If \a enable is TRUE, sets fixed pitch on; otherwise sets fixed
+ If \a enable is true, sets fixed pitch on; otherwise sets fixed
pitch off.
\sa fixedPitch(), TQFontInfo
@@ -1017,7 +1017,7 @@ void TQFont::setFixedPitch( bool enable )
detach();
d->request.fixedPitch = enable;
- d->request.ignorePitch = FALSE;
+ d->request.ignorePitch = false;
d->mask |= TQFontPrivate::FixedPitch;
}
@@ -1220,7 +1220,7 @@ void TQFont::setStretch( int factor )
}
/*!
- If \a enable is TRUE, turns raw mode on; otherwise turns raw mode
+ If \a enable is true, turns raw mode on; otherwise turns raw mode
off. This function only has an effect under X11.
If raw mode is enabled, TQt will search for an X font with a
@@ -1246,7 +1246,7 @@ void TQFont::setRawMode( bool enable )
}
/*!
- Returns TRUE if a window system font exactly matching the settings
+ Returns true if a window system font exactly matching the settings
of this font is available.
\sa TQFontInfo
@@ -1263,8 +1263,8 @@ bool TQFont::exactMatch() const
}
/*!
- Returns TRUE if this font is equal to \a f; otherwise returns
- FALSE.
+ Returns true if this font is equal to \a f; otherwise returns
+ false.
Two TQFonts are considered equal if their font attributes are
equal. If rawMode() is enabled for both fonts, only the family
@@ -1281,8 +1281,8 @@ bool TQFont::operator==( const TQFont &f ) const
}
/*!
- Returns TRUE if this font is different from \a f; otherwise
- returns FALSE.
+ Returns true if this font is different from \a f; otherwise
+ returns false.
Two TQFonts are considered to be different if their font attributes
are different. If rawMode() is enabled for both fonts, only the
@@ -1296,7 +1296,7 @@ bool TQFont::operator!=( const TQFont &f ) const
}
/*!
- Returns TRUE if this font and \a f are copies of each other, i.e.
+ Returns true if this font and \a f are copies of each other, i.e.
one of them was created as a copy of the other and neither has
been modified since. This is much stricter than equality.
@@ -1308,8 +1308,8 @@ bool TQFont::isCopyOf( const TQFont & f ) const
}
/*!
- Returns TRUE if raw mode is used for font name matching; otherwise
- returns FALSE.
+ Returns true if raw mode is used for font name matching; otherwise
+ returns false.
\sa setRawMode() rawName()
*/
@@ -1402,9 +1402,9 @@ static void initFontSubst()
if (fontSubst)
return;
- fontSubst = new TQFontSubst(17, FALSE);
+ fontSubst = new TQFontSubst(17, false);
TQ_CHECK_PTR( fontSubst );
- fontSubst->setAutoDelete( TRUE );
+ fontSubst->setAutoDelete( true );
tqfont_cleanup_fontsubst.set(&fontSubst);
for ( int i=0; initTbl[i] != 0; i += 2 )
@@ -1662,7 +1662,7 @@ bool TQFont::fromString(const TQString &descrip)
descrip.isEmpty() ? "(empty)" : descrip.latin1());
#endif
- return FALSE;
+ return false;
}
setFamily(l[0]);
@@ -1688,7 +1688,7 @@ bool TQFont::fromString(const TQString &descrip)
setRawMode(l[9].toInt());
}
- return TRUE;
+ return true;
}
/*! \internal
@@ -2137,8 +2137,8 @@ int TQFontMetrics::maxWidth() const
}
/*!
- Returns TRUE if character \a ch is a valid character in the font;
- otherwise returns FALSE.
+ Returns true if character \a ch is a valid character in the font;
+ otherwise returns false.
*/
bool TQFontMetrics::inFont(TQChar ch) const
{
@@ -2150,7 +2150,7 @@ bool TQFontMetrics::inFont(TQChar ch) const
Q_ASSERT( engine != 0 );
#endif // QT_CHECK_STATE
- if ( engine->type() == TQFontEngine::Box ) return FALSE;
+ if ( engine->type() == TQFontEngine::Box ) return false;
return engine->canRender( &ch, 1 );
}
@@ -2181,7 +2181,7 @@ int TQFontMetrics::leftBearing(TQChar ch) const
glyph_t glyphs[10];
int nglyphs = 9;
- engine->stringToCMap( &ch, 1, glyphs, 0, &nglyphs, FALSE );
+ engine->stringToCMap( &ch, 1, glyphs, 0, &nglyphs, false );
// ### can nglyphs != 1 happen at all? Not currently I think
glyph_metrics_t gi = engine->boundingBox( glyphs[0] );
return gi.x;
@@ -2215,7 +2215,7 @@ int TQFontMetrics::rightBearing(TQChar ch) const
glyph_t glyphs[10];
int nglyphs = 9;
- engine->stringToCMap( &ch, 1, glyphs, 0, &nglyphs, FALSE );
+ engine->stringToCMap( &ch, 1, glyphs, 0, &nglyphs, false );
// ### can nglyphs != 1 happen at all? Not currently I think
glyph_metrics_t gi = engine->boundingBox( glyphs[0] );
return gi.xoff - gi.x - gi.width;
@@ -2266,7 +2266,7 @@ int TQFontMetrics::width( const TQString &str, int len ) const
glyph_t glyphs[8];
advance_t advances[8];
int nglyphs = 7;
- engine->stringToCMap( ch, 1, glyphs, advances, &nglyphs, FALSE );
+ engine->stringToCMap( ch, 1, glyphs, advances, &nglyphs, false );
// ### can nglyphs != 1 happen at all? Not currently I think
if ( uc < TQFontEngineData::widthCacheSize && advances[0] > 0 && advances[0] < 0x100 )
@@ -2395,7 +2395,7 @@ TQRect TQFontMetrics::boundingRect( TQChar ch ) const
glyph_t glyphs[10];
int nglyphs = 9;
- engine->stringToCMap( &ch, 1, glyphs, 0, &nglyphs, FALSE );
+ engine->stringToCMap( &ch, 1, glyphs, 0, &nglyphs, false );
glyph_metrics_t gi = engine->boundingBox( glyphs[0] );
return TQRect( gi.x, gi.y, gi.width, gi.height );
}
@@ -2790,8 +2790,8 @@ int TQFontInfo::weight() const
/*!
\fn bool TQFontInfo::bold() const
- Returns TRUE if weight() would return a value greater than \c
- TQFont::Normal; otherwise returns FALSE.
+ Returns true if weight() would return a value greater than \c
+ TQFont::Normal; otherwise returns false.
\sa weight(), TQFont::bold()
*/
@@ -2856,9 +2856,9 @@ bool TQFontInfo::fixedPitch() const
glyph_t g[2];
int l = 2;
advance_t a[2];
- engine->stringToCMap(ch, 2, g, a, &l, FALSE);
+ engine->stringToCMap(ch, 2, g, a, &l, false);
engine->fontDef.fixedPitch = a[0] == a[1];
- engine->fontDef.fixedPitchComputed = TRUE;
+ engine->fontDef.fixedPitchComputed = true;
}
#endif
return engine->fontDef.fixedPitch;
@@ -2881,8 +2881,8 @@ TQFont::StyleHint TQFontInfo::styleHint() const
}
/*!
- Returns TRUE if the font is a raw mode font; otherwise returns
- FALSE.
+ Returns true if the font is a raw mode font; otherwise returns
+ false.
If it is a raw mode font, all other functions in TQFontInfo will
return the same values set in the TQFont, regardless of the font
@@ -2896,8 +2896,8 @@ bool TQFontInfo::rawMode() const
}
/*!
- Returns TRUE if the matched window system font is exactly the same
- as the one specified by the font; otherwise returns FALSE.
+ Returns true if the matched window system font is exactly the same
+ as the one specified by the font; otherwise returns false.
\sa TQFont::exactMatch()
*/
@@ -2936,7 +2936,7 @@ static TQSingleCleanupHandler<TQFontCache> cleanup_fontcache;
TQFontCache::TQFontCache()
: TQObject( tqApp, "global font cache" ), total_cost( 0 ), max_cost( min_cost ),
- current_timestamp( 0 ), fast( FALSE ), timer_id( -1 )
+ current_timestamp( 0 ), fast( false ), timer_id( -1 )
{
Q_ASSERT( instance == 0 );
instance = this;
@@ -3048,7 +3048,7 @@ void TQFontCache::increaseCost( uint cost )
if (timer_id != -1) killTimer( timer_id );
timer_id = startTimer( fast_timeout );
- fast = TRUE;
+ fast = true;
}
}
}
@@ -3145,7 +3145,7 @@ void TQFontCache::timerEvent( TQTimerEvent * )
killTimer( timer_id );
timer_id = -1;
- fast = FALSE;
+ fast = false;
return;
}
@@ -3220,7 +3220,7 @@ void TQFontCache::timerEvent( TQTimerEvent * )
killTimer( timer_id );
timer_id = startTimer( slow_timeout );
- fast = FALSE;
+ fast = false;
}
return;
@@ -3229,7 +3229,7 @@ void TQFontCache::timerEvent( TQTimerEvent * )
killTimer( timer_id );
timer_id = startTimer( fast_timeout );
- fast = TRUE;
+ fast = true;
}
max_cost = new_max_cost;
diff --git a/src/kernel/tqfont.h b/src/kernel/tqfont.h
index 435b604df..5ac1a2d4e 100644
--- a/src/kernel/tqfont.h
+++ b/src/kernel/tqfont.h
@@ -101,10 +101,10 @@ public:
// specific font
#ifdef Q_QDOC
TQFont( const TQString &family, int pointSize = 12, int weight = Normal,
- bool italic = FALSE );
+ bool italic = false );
#else
TQFont( const TQString &family, int pointSize = -1, int weight = -1,
- bool italic = FALSE );
+ bool italic = false );
#endif
// copy constructor
TQFont( const TQFont & );
diff --git a/src/kernel/tqfont_x11.cpp b/src/kernel/tqfont_x11.cpp
index 92cd8b113..4a91f65dc 100644
--- a/src/kernel/tqfont_x11.cpp
+++ b/src/kernel/tqfont_x11.cpp
@@ -69,7 +69,7 @@
#define TQFONTLOADER_DEBUG
#define TQFONTLOADER_DEBUG_VERBOSE
-TQ_EXPORT bool tqt_has_xft = FALSE;
+TQ_EXPORT bool tqt_has_xft = false;
#ifndef TQT_NO_XFTFREETYPE
TQt::HANDLE qt_xft_handle(const TQFont &font)
@@ -197,7 +197,7 @@ void TQFont::initialize()
#ifndef TQT_NO_CODECS
#ifndef TQT_NO_BIG_CODECS
- static bool codecs_once = FALSE;
+ static bool codecs_once = false;
if ( ! codecs_once ) {
(void) new TQFontJis0201Codec;
(void) new TQFontJis0208Codec;
@@ -208,7 +208,7 @@ void TQFont::initialize()
(void) new TQFontBig5Codec;
(void) new TQFontBig5hkscsCodec;
(void) new TQFontLaoCodec;
- codecs_once = TRUE;
+ codecs_once = true;
}
#endif // TQT_NO_BIG_CODECS
#endif // TQT_NO_CODECS
@@ -419,8 +419,8 @@ void TQFontPrivate::load( TQFont::Script script )
}
/*!
- Returns TRUE if the font attributes have been changed and the font
- has to be (re)loaded; otherwise returns FALSE.
+ Returns true if the font attributes have been changed and the font
+ has to be (re)loaded; otherwise returns false.
*/
bool TQFont::dirty() const
{
@@ -507,7 +507,7 @@ void TQFont::setRawName( const TQString &name )
#endif // QT_CHECK_STATE
setFamily( name );
- setRawMode( TRUE );
+ setRawMode( true );
} else {
d->mask = TQFontPrivate::Complete;
}
@@ -581,7 +581,7 @@ static const char * const tryFonts[] = {
0
};
-// Returns TRUE if the font exists, FALSE otherwise
+// Returns true if the font exists, false otherwise
static bool fontExists( const TQString &fontName )
{
int count;
@@ -666,7 +666,7 @@ int TQFontMetrics::width( TQChar ch ) const
glyph_t glyphs[8];
advance_t advances[8];
int nglyphs = 7;
- engine->stringToCMap( &ch, 1, glyphs, advances, &nglyphs, FALSE );
+ engine->stringToCMap( &ch, 1, glyphs, advances, &nglyphs, false );
// ### can nglyphs != 1 happen at all? Not currently I think
if ( uc < TQFontEngineData::widthCacheSize && advances[0] > 0 && advances[0] < 0x100 )
@@ -720,7 +720,7 @@ int TQFontMetrics::charWidth( const TQString &str, int pos ) const
glyph_t glyphs[8];
advance_t advances[8];
int nglyphs = 7;
- engine->stringToCMap( &ch, isSurrogate ? 2 : 1, glyphs, advances, &nglyphs, FALSE );
+ engine->stringToCMap( &ch, isSurrogate ? 2 : 1, glyphs, advances, &nglyphs, false );
width = advances[0];
}
if ( uc < TQFontEngineData::widthCacheSize && width > 0 && width < 0x100 )
diff --git a/src/kernel/tqfontdata_p.h b/src/kernel/tqfontdata_p.h
index 6b42c6bcf..89efd70d4 100644
--- a/src/kernel/tqfontdata_p.h
+++ b/src/kernel/tqfontdata_p.h
@@ -67,10 +67,10 @@ struct TQFontDef
inline TQFontDef()
: pointSize( -1 ), pixelSize( -1 ),
styleHint( TQFont::AnyStyle ), styleStrategy( TQFont::PreferDefault ),
- weight( 50 ), italic( FALSE ), fixedPitch( FALSE ), stretch( 100 ),
- ignorePitch(TRUE)
+ weight( 50 ), italic( false ), fixedPitch( false ), stretch( 100 ),
+ ignorePitch(true)
#ifdef TQ_WS_MAC
- ,fixedPitchComputed(FALSE)
+ ,fixedPitchComputed(false)
#endif
{
}
@@ -111,7 +111,7 @@ struct TQFontDef
if ( addStyle != other.addStyle ) return addStyle < other.addStyle;
#endif // TQ_WS_X11
- return FALSE;
+ return false;
}
};
diff --git a/src/kernel/tqfontdatabase.cpp b/src/kernel/tqfontdatabase.cpp
index bda119a03..26a2c00c0 100644
--- a/src/kernel/tqfontdatabase.cpp
+++ b/src/kernel/tqfontdatabase.cpp
@@ -59,14 +59,14 @@
#ifdef TQFONTDATABASE_DEBUG
# define FD_DEBUG tqDebug
#else
-# define FD_DEBUG if (FALSE) tqDebug
+# define FD_DEBUG if (false) tqDebug
#endif
//#define FONT_MATCH_DEBUG
#ifdef FONT_MATCH_DEBUG
# define FM_DEBUG tqDebug
#else
-# define FM_DEBUG if (FALSE) tqDebug
+# define FM_DEBUG if (false) tqDebug
#endif
#if defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET)
@@ -144,7 +144,7 @@ struct TQtFontSize
int count;
TQtFontEncoding *encodings;
TQtFontEncoding *encodingID( int id, uint xpoint = 0, uint xres = 0,
- uint yres = 0, uint avgwidth = 0, bool add = FALSE);
+ uint yres = 0, uint avgwidth = 0, bool add = false);
#endif // TQ_WS_X11
};
@@ -179,7 +179,7 @@ struct TQtFontStyle
{
struct Key {
Key( const TQString &styleString );
- Key() : italic( FALSE ), oblique( FALSE ),
+ Key() : italic( false ), oblique( false ),
weight( TQFont::Normal ), stretch( 0 ) { }
Key( const Key &o ) : italic( o.italic ), oblique( o.oblique ),
weight( o.weight ), stretch( o.stretch ) { }
@@ -205,8 +205,8 @@ struct TQtFontStyle
};
TQtFontStyle( const Key &k )
- : key( k ), bitmapScalable( FALSE ), smoothScalable( FALSE ),
- fakeOblique( FALSE ), count( 0 ), pixelSizes( 0 )
+ : key( k ), bitmapScalable( false ), smoothScalable( false ),
+ fakeOblique( false ), count( 0 ), pixelSizes( 0 )
{
#if defined(TQ_WS_X11)
weightName = setwidthName = 0;
@@ -235,18 +235,18 @@ struct TQtFontStyle
const char *setwidthName;
#endif // TQ_WS_X11
- TQtFontSize *pixelSize( unsigned short size, bool = FALSE );
+ TQtFontSize *pixelSize( unsigned short size, bool = false );
};
TQtFontStyle::Key::Key( const TQString &styleString )
- : italic( FALSE ), oblique( FALSE ), weight( TQFont::Normal ), stretch( 0 )
+ : italic( false ), oblique( false ), weight( TQFont::Normal ), stretch( 0 )
{
weight = getFontWeight( styleString );
if ( styleString.contains( "Italic" ) )
- italic = TRUE;
+ italic = true;
else if ( styleString.contains( "Oblique" ) )
- oblique = TRUE;
+ oblique = true;
}
TQtFontSize *TQtFontStyle::pixelSize( unsigned short size, bool add )
@@ -283,7 +283,7 @@ struct TQtFontFoundry
int count;
TQtFontStyle **styles;
- TQtFontStyle *style( const TQtFontStyle::Key &, bool = FALSE );
+ TQtFontStyle *style( const TQtFontStyle::Key &, bool = false );
};
TQtFontStyle *TQtFontFoundry::style( const TQtFontStyle::Key &key, bool create )
@@ -327,17 +327,17 @@ struct TQtFontFamily
TQtFontFamily(const TQString &n )
:
#ifdef TQ_WS_X11
- fixedPitch( TRUE ), hasXft( FALSE ), xftScriptCheck( FALSE ), xlfdLoaded( FALSE ), synthetic(FALSE),
+ fixedPitch( true ), hasXft( false ), xftScriptCheck( false ), xlfdLoaded( false ), synthetic(false),
#else
- fixedPitch( FALSE ),
+ fixedPitch( false ),
#endif
#ifdef TQ_WS_WIN
- scriptCheck( FALSE ),
+ scriptCheck( false ),
#endif
#if defined(Q_OS_MAC)
- fixedPitchComputed(FALSE),
+ fixedPitchComputed(false),
#endif
- fullyLoaded( FALSE ),
+ fullyLoaded( false ),
name( n ), count( 0 ), foundries( 0 ) {
memset( scripts, 0, sizeof( scripts ) );
}
@@ -378,7 +378,7 @@ struct TQtFontFamily
unsigned char scripts[TQFont::LastPrivateScript];
- TQtFontFoundry *foundry( const TQString &f, bool = FALSE );
+ TQtFontFoundry *foundry( const TQString &f, bool = false );
};
TQtFontFoundry *TQtFontFamily::foundry( const TQString &f, bool create )
@@ -410,7 +410,7 @@ public:
delete families[count];
free( families );
}
- TQtFontFamily *family( const TQString &f, bool = FALSE );
+ TQtFontFamily *family( const TQString &f, bool = false );
int count;
TQtFontFamily **families;
@@ -611,7 +611,7 @@ static inline bool requiresOpenType(TQFont::Script s)
static inline bool canRender( TQFontEngine *fe, TQFont::Script script )
{
- if ( !fe ) return FALSE;
+ if ( !fe ) return false;
bool hasChar = true;
@@ -635,7 +635,7 @@ static inline bool canRender( TQFontEngine *fe, TQFont::Script script )
if (hasChar && requiresOpenType(script)) {
TQOpenType *ot = fe->openType();
if (!ot || !ot->supportsScript(script))
- return FALSE;
+ return false;
}
#endif
@@ -924,7 +924,7 @@ TQFontDatabase::findFont( TQFont::Script script, const TQFontPrivate *fp,
if ( fp->rawMode ) {
fe = loadEngine( script, fp, request, 0, 0, 0
#ifdef TQ_WS_X11
- , 0, 0, FALSE
+ , 0, 0, false
#endif
);
@@ -995,7 +995,7 @@ TQFontDatabase::findFont( TQFont::Script script, const TQFontPrivate *fp,
script, scriptName( script ).latin1(),
request.weight, request.italic, request.stretch, request.pixelSize, pitch );
- bool usesFontConfig = FALSE;
+ bool usesFontConfig = false;
if (family_name.isEmpty()
|| family_name == "Sans Serif"
|| family_name == "Serif"
@@ -1168,7 +1168,7 @@ TQFontDatabase::findFont( TQFont::Script script, const TQFontPrivate *fp,
fe->fontDef.italic = best_style->key.italic || best_style->key.oblique;
fe->fontDef.fixedPitch = best_family->fixedPitch;
fe->fontDef.stretch = best_style->key.stretch;
- fe->fontDef.ignorePitch = FALSE;
+ fe->fontDef.ignorePitch = false;
}
}
@@ -1282,7 +1282,7 @@ static TQString styleString( int weight, bool italic, bool oblique )
TQString TQFontDatabase::styleString( const TQFont &f )
{
// ### fix oblique here
- return ::styleString( f.weight(), f.italic(), FALSE );
+ return ::styleString( f.weight(), f.italic(), false );
}
@@ -1544,7 +1544,7 @@ TQStringList TQFontDatabase::styles( const TQString &family ) const
for ( int k = 0; k < foundry->count; k++ ) {
TQtFontStyle::Key ke( foundry->styles[k]->key );
ke.stretch = 0;
- allStyles.style( ke, TRUE );
+ allStyles.style( ke, true );
}
}
}
@@ -1557,8 +1557,8 @@ TQStringList TQFontDatabase::styles( const TQString &family ) const
}
/*!
- Returns TRUE if the font that has family \a family and style \a
- style is fixed pitch; otherwise returns FALSE.
+ Returns true if the font that has family \a family and style \a
+ style is fixed pitch; otherwise returns false.
*/
bool TQFontDatabase::isFixedPitch(const TQString &family,
@@ -1577,7 +1577,7 @@ bool TQFontDatabase::isFixedPitch(const TQString &family,
if (!f->fixedPitchComputed) {
TQFontMetrics fm(familyName);
f->fixedPitch = fm.width('i') == fm.width('m');
- f->fixedPitchComputed = TRUE;
+ f->fixedPitchComputed = true;
}
}
#endif
@@ -1586,8 +1586,8 @@ bool TQFontDatabase::isFixedPitch(const TQString &family,
}
/*!
- Returns TRUE if the font that has family \a family and style \a
- style is a scalable bitmap font; otherwise returns FALSE. Scaling
+ Returns true if the font that has family \a family and style \a
+ style is a scalable bitmap font; otherwise returns false. Scaling
a bitmap font usually produces an unattractive hardly readable
result, because the pixels of the font are scaled. If you need to
scale a bitmap font it is better to scale it to one of the fixed
@@ -1598,7 +1598,7 @@ bool TQFontDatabase::isFixedPitch(const TQString &family,
bool TQFontDatabase::isBitmapScalable( const TQString &family,
const TQString &style) const
{
- bool bitmapScalable = FALSE;
+ bool bitmapScalable = false;
TQString familyName, foundryName;
parseFontName( family, foundryName, familyName );
@@ -1615,7 +1615,7 @@ bool TQFontDatabase::isBitmapScalable( const TQString &family,
for ( int k = 0; k < foundry->count; k++ )
if ((style.isEmpty() || foundry->styles[k]->key == styleKey) &&
foundry->styles[k]->bitmapScalable && !foundry->styles[k]->smoothScalable) {
- bitmapScalable = TRUE;
+ bitmapScalable = true;
goto end;
}
}
@@ -1626,9 +1626,9 @@ bool TQFontDatabase::isBitmapScalable( const TQString &family,
/*!
- Returns TRUE if the font that has family \a family and style \a
- style is smoothly scalable; otherwise returns FALSE. If this
- function returns TRUE, it's safe to scale this font to any size,
+ Returns true if the font that has family \a family and style \a
+ style is smoothly scalable; otherwise returns false. If this
+ function returns true, it's safe to scale this font to any size,
and the result will always look attractive.
\sa isScalable(), isBitmapScalable()
@@ -1636,7 +1636,7 @@ bool TQFontDatabase::isBitmapScalable( const TQString &family,
bool TQFontDatabase::isSmoothlyScalable( const TQString &family,
const TQString &style) const
{
- bool smoothScalable = FALSE;
+ bool smoothScalable = false;
TQString familyName, foundryName;
parseFontName( family, foundryName, familyName );
@@ -1652,7 +1652,7 @@ bool TQFontDatabase::isSmoothlyScalable( const TQString &family,
if ( foundryName.isEmpty() || ucstricmp( foundry->name, foundryName ) == 0 ) {
for ( int k = 0; k < foundry->count; k++ )
if ((style.isEmpty() || foundry->styles[k]->key == styleKey) && foundry->styles[k]->smoothScalable) {
- smoothScalable = TRUE;
+ smoothScalable = true;
goto end;
}
}
@@ -1662,8 +1662,8 @@ bool TQFontDatabase::isSmoothlyScalable( const TQString &family,
}
/*!
- Returns TRUE if the font that has family \a family and style \a
- style is scalable; otherwise returns FALSE.
+ Returns true if the font that has family \a family and style \a
+ style is scalable; otherwise returns false.
\sa isBitmapScalable(), isSmoothlyScalable()
*/
@@ -1671,7 +1671,7 @@ bool TQFontDatabase::isScalable( const TQString &family,
const TQString &style) const
{
if ( isSmoothlyScalable( family, style) )
- return TRUE;
+ return true;
return isBitmapScalable( family, style);
}
@@ -1692,7 +1692,7 @@ TQValueList<int> TQFontDatabase::pointSizes( const TQString &family,
Q_UNUSED( style );
return standardSizes();
#else
- bool smoothScalable = FALSE;
+ bool smoothScalable = false;
TQString familyName, foundryName;
parseFontName( family, foundryName, familyName );
@@ -1712,7 +1712,7 @@ TQValueList<int> TQFontDatabase::pointSizes( const TQString &family,
if ( !style ) continue;
if ( style->smoothScalable ) {
- smoothScalable = TRUE;
+ smoothScalable = true;
goto end;
}
for ( int l = 0; l < style->count; l++ ) {
@@ -1761,7 +1761,7 @@ TQFont TQFontDatabase::font( const TQString &family, const TQString &style,
TQtFontFoundry *foundry = f->foundries[j];
if ( foundryName.isEmpty() || ucstricmp( foundry->name, foundryName ) == 0 ) {
for ( int k = 0; k < foundry->count; k++ )
- allStyles.style( foundry->styles[k]->key, TRUE );
+ allStyles.style( foundry->styles[k]->key, true );
}
}
@@ -1771,7 +1771,7 @@ TQFont TQFontDatabase::font( const TQString &family, const TQString &style,
if ( !s ) // no styles found?
return TQApplication::font();
return TQFont( family, pointSize, s->key.weight,
- s->key.italic ? TRUE : s->key.oblique ? TRUE : FALSE );
+ s->key.italic ? true : s->key.oblique );
}
@@ -1791,7 +1791,7 @@ TQValueList<int> TQFontDatabase::smoothSizes( const TQString &family,
Q_UNUSED( style );
return TQFontDatabase::standardSizes();
#else
- bool smoothScalable = FALSE;
+ bool smoothScalable = false;
TQString familyName, foundryName;
parseFontName( family, foundryName, familyName );
@@ -1813,7 +1813,7 @@ TQValueList<int> TQFontDatabase::smoothSizes( const TQString &family,
if ( !style ) continue;
if ( style->smoothScalable ) {
- smoothScalable = TRUE;
+ smoothScalable = true;
goto end;
}
for ( int l = 0; l < style->count; l++ ) {
@@ -1858,8 +1858,8 @@ TQValueList<int> TQFontDatabase::standardSizes()
/*!
- Returns TRUE if the font that has family \a family and style \a
- style is italic; otherwise returns FALSE.
+ Returns true if the font that has family \a family and style \a
+ style is italic; otherwise returns false.
\sa weight(), bold()
*/
@@ -1873,13 +1873,13 @@ bool TQFontDatabase::italic( const TQString &family,
TQtFontFoundry allStyles( foundryName );
TQtFontFamily *f = d->family( familyName );
- if ( !f ) return FALSE;
+ if ( !f ) return false;
for ( int j = 0; j < f->count; j++ ) {
TQtFontFoundry *foundry = f->foundries[j];
if ( foundryName.isEmpty() || ucstricmp( foundry->name, foundryName ) == 0 ) {
for ( int k = 0; k < foundry->count; k++ )
- allStyles.style( foundry->styles[k]->key, TRUE );
+ allStyles.style( foundry->styles[k]->key, true );
}
}
@@ -1890,8 +1890,8 @@ bool TQFontDatabase::italic( const TQString &family,
/*!
- Returns TRUE if the font that has family \a family and style \a
- style is bold; otherwise returns FALSE.
+ Returns true if the font that has family \a family and style \a
+ style is bold; otherwise returns false.
\sa italic(), weight()
*/
@@ -1905,14 +1905,14 @@ bool TQFontDatabase::bold( const TQString &family,
TQtFontFoundry allStyles( foundryName );
TQtFontFamily *f = d->family( familyName );
- if ( !f ) return FALSE;
+ if ( !f ) return false;
for ( int j = 0; j < f->count; j++ ) {
TQtFontFoundry *foundry = f->foundries[j];
if ( foundryName.isEmpty() ||
ucstricmp( foundry->name, foundryName ) == 0 ) {
for ( int k = 0; k < foundry->count; k++ )
- allStyles.style( foundry->styles[k]->key, TRUE );
+ allStyles.style( foundry->styles[k]->key, true );
}
}
@@ -1946,7 +1946,7 @@ int TQFontDatabase::weight( const TQString &family,
if ( foundryName.isEmpty() ||
ucstricmp( foundry->name, foundryName ) == 0 ) {
for ( int k = 0; k < foundry->count; k++ )
- allStyles.style( foundry->styles[k]->key, TRUE );
+ allStyles.style( foundry->styles[k]->key, true );
}
}
diff --git a/src/kernel/tqfontdatabase_x11.cpp b/src/kernel/tqfontdatabase_x11.cpp
index ee7387387..b26842fc7 100644
--- a/src/kernel/tqfontdatabase_x11.cpp
+++ b/src/kernel/tqfontdatabase_x11.cpp
@@ -61,7 +61,7 @@
#ifdef TQFONTDATABASE_DEBUG
# define FD_DEBUG tqDebug
#else
-# define FD_DEBUG if (FALSE) tqDebug
+# define FD_DEBUG if (false) tqDebug
#endif // TQFONTDATABASE_DEBUG
// from tqfont_x11.cpp
@@ -71,7 +71,7 @@ extern double qt_pixelSize(double pointSize, TQPaintDevice *paintdevice, int scr
static inline void capitalize ( char *s )
{
- bool space = TRUE;
+ bool space = true;
while( *s ) {
if ( space )
*s = toupper( *s );
@@ -535,7 +535,7 @@ static bool parseXFontName( char *fontName, char **tokens )
{
if ( ! fontName || fontName[0] == '0' || fontName[0] != '-' ) {
tokens[0] = 0;
- return FALSE;
+ return false;
}
int i;
@@ -557,10 +557,10 @@ static bool parseXFontName( char *fontName, char **tokens )
if ( i < NFontFields ) {
for ( int j = i ; j < NFontFields; ++j )
tokens[j] = 0;
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
static inline bool isZero(char *x)
@@ -593,7 +593,7 @@ static inline bool isFixedPitch( char **tokens )
Fills in a font definition (TQFontDef) from an XLFD (X Logical Font
Description).
- Returns TRUE if the the given xlfd is valid. The fields lbearing
+ Returns true if the the given xlfd is valid. The fields lbearing
and rbearing are not given any values.
*/
bool qt_fillFontDef( const TQCString &xlfd, TQFontDef *fd, int screen )
@@ -601,7 +601,7 @@ bool qt_fillFontDef( const TQCString &xlfd, TQFontDef *fd, int screen )
char *tokens[NFontFields];
TQCString buffer = xlfd.copy();
if ( ! parseXFontName(buffer.data(), tokens) )
- return FALSE;
+ return false;
capitalize(tokens[Family]);
capitalize(tokens[Foundry]);
@@ -638,14 +638,14 @@ bool qt_fillFontDef( const TQCString &xlfd, TQFontDef *fd, int screen )
fd->pixelSize = tqRound(qt_pixelSize(fd->pointSize / 10., 0, screen));
}
- return TRUE;
+ return true;
}
/*
Fills in a font definition (TQFontDef) from the font properties in an
XFontStruct.
- Returns TRUE if the TQFontDef could be filled with properties from
+ Returns true if the TQFontDef could be filled with properties from
the XFontStruct. The fields lbearing and rbearing are not given any
values.
*/
@@ -653,7 +653,7 @@ static bool qt_fillFontDef( XFontStruct *fs, TQFontDef *fd, int screen )
{
unsigned long value;
if ( fs && !XGetFontProperty( fs, XA_FONT, &value ) )
- return FALSE;
+ return false;
char *n = XGetAtomName( TQPaintDevice::x11AppDisplay(), value );
TQCString xlfd( n );
@@ -674,14 +674,14 @@ static TQtFontStyle::Key getStyle( char ** tokens )
char slant1 = tolower( (uchar) tokens[Slant][1] );
if ( slant1 == 'o' )
- key.oblique = TRUE;
+ key.oblique = true;
else if ( slant1 == 'i' )
- key.italic = TRUE;
+ key.italic = true;
}
} else if ( slant0 == 'o' )
- key.oblique = TRUE;
+ key.oblique = true;
else if ( slant0 == 'i' )
- key.italic = TRUE;
+ key.italic = true;
key.weight = getFontWeight( tokens[Weight] );
@@ -702,7 +702,7 @@ static TQtFontStyle::Key getStyle( char ** tokens )
extern bool tqt_has_xft; // defined in tqfont_x11.cpp
-static bool xlfdsFullyLoaded = FALSE;
+static bool xlfdsFullyLoaded = false;
static unsigned char encodingLoaded[numEncodings];
static void loadXlfds( const char *reqFamily, int encoding_id )
@@ -748,13 +748,13 @@ static void loadXlfds( const char *reqFamily, int encoding_id )
capitalize( foundryName );
TQtFontStyle::Key styleKey = getStyle( tokens );
- bool smooth_scalable = FALSE;
- bool bitmap_scalable = FALSE;
+ bool smooth_scalable = false;
+ bool bitmap_scalable = false;
if ( isScalable(tokens) ) {
if ( isSmoothlyScalable( tokens ) )
- smooth_scalable = TRUE;
+ smooth_scalable = true;
else
- bitmap_scalable = TRUE;
+ bitmap_scalable = true;
}
uint pixelSize = atoi( tokens[PixelSize] );
uint xpointSize = atoi( tokens[PointSize] );
@@ -773,10 +773,10 @@ static void loadXlfds( const char *reqFamily, int encoding_id )
continue;
}
- TQtFontFamily *family = fontFamily ? fontFamily : db->family( familyName, TRUE );
+ TQtFontFamily *family = fontFamily ? fontFamily : db->family( familyName, true );
family->fontFileIndex = -1;
- TQtFontFoundry *foundry = family->foundry( foundryName, TRUE );
- TQtFontStyle *style = foundry->style( styleKey, TRUE );
+ TQtFontFoundry *foundry = family->foundry( foundryName, true );
+ TQtFontStyle *style = foundry->style( styleKey, true );
delete [] style->weightName;
style->weightName = tqstrdup( tokens[Weight] );
@@ -784,18 +784,18 @@ static void loadXlfds( const char *reqFamily, int encoding_id )
style->setwidthName = tqstrdup( tokens[Width] );
if ( smooth_scalable ) {
- style->smoothScalable = TRUE;
- style->bitmapScalable = FALSE;
+ style->smoothScalable = true;
+ style->bitmapScalable = false;
pixelSize = SMOOTH_SCALABLE;
}
if ( !style->smoothScalable && bitmap_scalable )
- style->bitmapScalable = TRUE;
+ style->bitmapScalable = true;
if ( !fixedPitch )
- family->fixedPitch = FALSE;
+ family->fixedPitch = false;
- TQtFontSize *size = style->pixelSize( pixelSize, TRUE );
+ TQtFontSize *size = style->pixelSize( pixelSize, true );
TQtFontEncoding *enc =
- size->encodingID( encoding_id, xpointSize, xres, yres, avgwidth, TRUE );
+ size->encodingID( encoding_id, xpointSize, xres, yres, avgwidth, true );
enc->pitch = *tokens[Spacing];
if ( !enc->pitch ) enc->pitch = '*';
@@ -806,14 +806,14 @@ static void loadXlfds( const char *reqFamily, int encoding_id )
family->scripts[script] |= TQtFontFamily::UnSupported_Xlfd;
}
if ( encoding_id == -1 )
- family->xlfdLoaded = TRUE;
+ family->xlfdLoaded = true;
}
if ( !reqFamily ) {
// mark encoding as loaded
if ( encoding_id == -1 )
- xlfdsFullyLoaded = TRUE;
+ xlfdsFullyLoaded = true;
else
- encodingLoaded[encoding_id] = TRUE;
+ encodingLoaded[encoding_id] = true;
}
XFreeFontNames( fontList );
@@ -847,20 +847,20 @@ static void loadXft()
bool fixed;
};
const XftDefaultFont defaults[] = {
- { "Serif", "serif", FALSE },
- { "Sans Serif", "sans-serif", FALSE },
- { "Monospace", "monospace", TRUE },
- { 0, 0, FALSE }
+ { "Serif", "serif", false },
+ { "Sans Serif", "sans-serif", false },
+ { "Monospace", "monospace", true },
+ { 0, 0, false }
};
const XftDefaultFont *f = defaults;
while (f->qtname) {
- TQtFontFamily *family = db->family( f->qtname, TRUE );
+ TQtFontFamily *family = db->family( f->qtname, true );
family->fixedPitch = f->fixed;
family->rawName = f->rawname;
- family->hasXft = TRUE;
- family->synthetic = TRUE;
+ family->hasXft = true;
+ family->synthetic = true;
TQtFontFoundry *foundry
- = family->foundry( TQString::null, TRUE );
+ = family->foundry( TQString::null, true );
for ( int i = 0; i < TQFont::LastPrivateScript; ++i ) {
if (i == TQFont::UnknownScript)
@@ -869,14 +869,14 @@ static void loadXft()
}
TQtFontStyle::Key styleKey;
- styleKey.oblique = FALSE;
+ styleKey.oblique = false;
for (int i = 0; i < 4; ++i) {
styleKey.italic = (i%2);
styleKey.weight = (i > 1) ? TQFont::Bold : TQFont::Normal;
- TQtFontStyle *style = foundry->style( styleKey, TRUE );
- style->smoothScalable = TRUE;
- TQtFontSize *size = style->pixelSize( SMOOTH_SCALABLE, TRUE );
- TQtFontEncoding *enc = size->encodingID( -1, 0, 0, 0, 0, TRUE );
+ TQtFontStyle *style = foundry->style( styleKey, true );
+ style->smoothScalable = true;
+ TQtFontSize *size = style->pixelSize( SMOOTH_SCALABLE, true );
+ TQtFontEncoding *enc = size->encodingID( -1, 0, 0, 0, 0, true );
enc->pitch = (f->fixed ? 'm' : 'p');
}
++f;
@@ -893,29 +893,29 @@ static void checkXftMatrix( TQtFontFamily* family ) {
TQtFontSize *size = style->pixelSize( SMOOTH_SCALABLE );
if ( ! size ) continue;
- TQtFontEncoding *enc = size->encodingID( -1, 0, 0, 0, 0, TRUE );
+ TQtFontEncoding *enc = size->encodingID( -1, 0, 0, 0, 0, true );
if ( ! enc ) continue;
TQtFontStyle::Key key = style->key;
// does this style have an italic equivalent?
- key.italic = TRUE;
+ key.italic = true;
TQtFontStyle *equiv = foundry->style( key );
if ( equiv ) continue;
// does this style have an oblique equivalent?
- key.italic = FALSE;
- key.oblique = TRUE;
+ key.italic = false;
+ key.oblique = true;
equiv = foundry->style( key );
if ( equiv ) continue;
// let's fake one...
- equiv = foundry->style( key, TRUE );
- equiv->fakeOblique = TRUE;
- equiv->smoothScalable = TRUE;
+ equiv = foundry->style( key, true );
+ equiv->fakeOblique = true;
+ equiv->smoothScalable = true;
- TQtFontSize *equiv_size = equiv->pixelSize( SMOOTH_SCALABLE, TRUE );
- TQtFontEncoding *equiv_enc = equiv_size->encodingID( -1, 0, 0, 0, 0, TRUE );
+ TQtFontSize *equiv_size = equiv->pixelSize( SMOOTH_SCALABLE, true );
+ TQtFontEncoding *equiv_enc = equiv_size->encodingID( -1, 0, 0, 0, 0, true );
// keep the same pitch
equiv_enc->pitch = enc->pitch;
@@ -958,9 +958,9 @@ static bool loadXftFont( FcPattern* font )
FcPatternGetBool(font, FC_SCALABLE, 0, &scalable);
foundry_value = 0;
XftPatternGetString(font, FC_FOUNDRY, 0, &foundry_value);
- TQtFontFamily *family = db->family( familyName, TRUE );
+ TQtFontFamily *family = db->family( familyName, true );
family->rawName = rawName;
- family->hasXft = TRUE;
+ family->hasXft = true;
FcCharSet *charset = 0;
FcResult res = FcPatternGetCharSet(font, FC_CHARSET, 0, &charset);
@@ -979,7 +979,7 @@ static bool loadXftFont( FcPattern* font )
family->scripts[i] |= TQtFontFamily::UnSupported_Xft;
}
}
- family->xftScriptCheck = TRUE;
+ family->xftScriptCheck = true;
} else {
// we set UnknownScript to supported for symbol fonts. It makes no sense to merge these
// with other ones, as they are special in a way.
@@ -1005,23 +1005,23 @@ static bool loadXftFont( FcPattern* font )
}
TQtFontFoundry *foundry
- = family->foundry( foundry_value ? TQString::fromUtf8(foundry_value) : TQString::null, TRUE );
- TQtFontStyle *style = foundry->style( styleKey, TRUE );
+ = family->foundry( foundry_value ? TQString::fromUtf8(foundry_value) : TQString::null, true );
+ TQtFontStyle *style = foundry->style( styleKey, true );
if (spacing_value < XFT_MONO )
- family->fixedPitch = FALSE;
+ family->fixedPitch = false;
TQtFontSize *size;
if (scalable) {
- style->smoothScalable = TRUE;
- size = style->pixelSize( SMOOTH_SCALABLE, TRUE );
+ style->smoothScalable = true;
+ size = style->pixelSize( SMOOTH_SCALABLE, true );
}
else {
double pixel_size = 0;
XftPatternGetDouble (font, FC_PIXEL_SIZE, 0, &pixel_size);
- size = style->pixelSize( (int)pixel_size, TRUE );
+ size = style->pixelSize( (int)pixel_size, true );
}
- TQtFontEncoding *enc = size->encodingID( -1, 0, 0, 0, 0, TRUE );
+ TQtFontEncoding *enc = size->encodingID( -1, 0, 0, 0, 0, true );
enc->pitch = ( spacing_value >= XFT_CHARCELL ? 'c' :
( spacing_value >= XFT_MONO ? 'm' : 'p' ) );
@@ -1071,7 +1071,7 @@ static void load( const TQString &family = TQString::null, int script = -1 )
}
}
} else {
- TQtFontFamily *f = db->family( family, TRUE );
+ TQtFontFamily *f = db->family( family, true );
if ( !f->fullyLoaded ) {
#ifndef TQT_NO_XFTFREETYPE
@@ -1097,7 +1097,7 @@ static void load( const TQString &family = TQString::null, int script = -1 )
mfamily.replace(TQChar(' '), TQChar('-'));
goto redo;
}
- f->fullyLoaded = TRUE;
+ f->fullyLoaded = true;
return;
}
#endif // TQT_NO_XFTFREETYPE
@@ -1107,7 +1107,7 @@ static void load( const TQString &family = TQString::null, int script = -1 )
( !f->hasXft && !(f->scripts[script] & TQtFontFamily::Supported) &&
!(f->scripts[script] & TQtFontFamily::UnSupported_Xlfd) ) ) {
loadXlfds( family, -1 );
- f->fullyLoaded = TRUE;
+ f->fullyLoaded = true;
}
}
}
@@ -1531,7 +1531,7 @@ static TQFontEngine *loadFontConfigFont(const TQFontPrivate *fp, const TQFontDef
key.weight = request.weight;
key.stretch = request.stretch;
- double scale = addPatternProps(pattern, key, FALSE, TRUE, fp, request);
+ double scale = addPatternProps(pattern, key, false, true, fp, request);
#ifdef FONT_MATCH_DEBUG
tqDebug("original pattern contains:");
FcPatternPrint(pattern);
@@ -1666,7 +1666,7 @@ static TQFontEngine *loadFontConfigFont(const TQFontPrivate *fp, const TQFontDef
XftPattern *pattern = XftPatternDuplicate(font);
// add properties back in as the font selected from the list doesn't contain them.
- addPatternProps(pattern, key, FALSE, TRUE, fp, request);
+ addPatternProps(pattern, key, false, true, fp, request);
XftPattern *result =
XftFontMatch( TQPaintDevice::x11AppDisplay(), fp->screen, pattern, &res );
@@ -1720,7 +1720,7 @@ static TQFontEngine *loadFontConfigFont(const TQFontPrivate *fp, const TQFontDef
XftPatternGetInteger(xft->pattern(), XFT_SPACING, 0, &spacing);
xft->fontDef.fixedPitch = spacing != XFT_PROPORTIONAL;
- xft->fontDef.ignorePitch = FALSE;
+ xft->fontDef.ignorePitch = false;
break;
}
}
diff --git a/src/kernel/tqfontengine_p.h b/src/kernel/tqfontengine_p.h
index 86fdda8f0..e7d7f2162 100644
--- a/src/kernel/tqfontengine_p.h
+++ b/src/kernel/tqfontengine_p.h
@@ -434,7 +434,7 @@ public:
void selectScript(unsigned int script, const Features *features = 0);
bool shape(TQShaperItem *item, const unsigned int *properties = 0);
- bool positionAndAdd(TQShaperItem *item, bool doLogClusters = TRUE);
+ bool positionAndAdd(TQShaperItem *item, bool doLogClusters = true);
OTL_GlyphItem glyphs() const { return otl_buffer->in_string; }
int len() const { return otl_buffer->in_length; }
diff --git a/src/kernel/tqfontengine_x11.cpp b/src/kernel/tqfontengine_x11.cpp
index aa116b93d..9276a5a93 100644
--- a/src/kernel/tqfontengine_x11.cpp
+++ b/src/kernel/tqfontengine_x11.cpp
@@ -71,17 +71,17 @@ static void drawLines( TQPainter *p, TQFontEngine *fe, int baseline, int x1, int
int lw = fe->lineThickness();
if ( textFlags & TQt::Underline ) {
int pos = fe->underlinePosition();
- qt_draw_transformed_rect( p, x1, baseline+pos, w, lw, TRUE );
+ qt_draw_transformed_rect( p, x1, baseline+pos, w, lw, true );
}
if ( textFlags & TQt::Overline ) {
int pos = fe->ascent()+1;
if ( !pos ) pos = 1;
- qt_draw_transformed_rect( p, x1, baseline-pos, w, lw, TRUE );
+ qt_draw_transformed_rect( p, x1, baseline-pos, w, lw, true );
}
if ( textFlags & TQt::StrikeOut ) {
int pos = fe->ascent()/3;
if ( !pos ) pos = 1;
- qt_draw_transformed_rect( p, x1, baseline-pos, w, lw, TRUE );
+ qt_draw_transformed_rect( p, x1, baseline-pos, w, lw, true );
}
}
@@ -161,7 +161,7 @@ static void drawScaled(int x, int y, const TQTextEngine *engine, const TQScriptI
mat1.scale(scale, scale);
w += h; // add some pixels to width because of italic correction
- TQBitmap bm( w, h, TRUE ); // create bitmap
+ TQBitmap bm( w, h, true ); // create bitmap
TQPainter paint;
paint.begin( &bm ); // draw text in bitmap
fe->draw( &paint, 0, si->ascent/scale, engine, si, textFlags );
@@ -280,7 +280,7 @@ void TQFontEngineBox::draw( TQPainter *p, int x, int y, const TQTextEngine *engi
int s = _size - 3;
for (int k = 0; k < si->num_glyphs; k++) {
if (!glyphAttributes[k].zeroWidth)
- qt_draw_transformed_rect( p, xp, yp, s, s, FALSE );
+ qt_draw_transformed_rect( p, xp, yp, s, s, false );
xp += _size;
}
} else {
@@ -383,7 +383,7 @@ const char *TQFontEngineBox::name() const
bool TQFontEngineBox::canRender( const TQChar *, int )
{
- return TRUE;
+ return true;
}
TQFontEngine::Type TQFontEngineBox::type() const
@@ -474,10 +474,10 @@ TQFontEngine::Error TQFontEngineXLFD::stringToCMap( const TQChar *str, int len,
}
if ( _codec ) {
- bool haveNbsp = FALSE;
+ bool haveNbsp = false;
for ( int i = 0; i < len; i++ )
if ( str[i].unicode() == 0xa0 ) {
- haveNbsp = TRUE;
+ haveNbsp = true;
break;
}
@@ -549,10 +549,10 @@ TQFontEngine::Error TQFontEngineXLFD::stringToCMap( const TQChar *str, int len,
extern "C" {
#endif
-static bool x_font_load_error = FALSE;
+static bool x_font_load_error = false;
static int x_font_errorhandler(Display *, XErrorEvent *)
{
- x_font_load_error = TRUE;
+ x_font_load_error = true;
return 0;
}
@@ -572,7 +572,7 @@ void TQFontEngineXLFD::draw( TQPainter *p, int x, int y, const TQTextEngine *eng
TQt::HANDLE hd = p->device()->handle();
GC gc = p->gc;
- bool transform = FALSE;
+ bool transform = false;
int xorig = x;
int yorig = y;
@@ -644,10 +644,10 @@ void TQFontEngineXLFD::draw( TQPainter *p, int x, int y, const TQTextEngine *eng
//tqDebug("m: %2.2f %2.2f %2.2f %2.2f, matrix=%s", p->m11(), p->m12(), p->m21(), p->m22(), matrix.data());
xlfd_transformed.replace( pos, endPos-pos, matrix );
- x_font_load_error = FALSE;
+ x_font_load_error = false;
XErrorHandler old_handler = XSetErrorHandler( x_font_errorhandler );
font_id = XLoadFont( dpy, xlfd_transformed.data() );
- XSync( dpy, FALSE );
+ XSync( dpy, false );
XSetErrorHandler( old_handler );
if ( x_font_load_error ) {
//tqDebug( "couldn't load transformed font" );
@@ -673,7 +673,7 @@ void TQFontEngineXLFD::draw( TQPainter *p, int x, int y, const TQTextEngine *eng
_scale = tmp;
return;
}
- transform = TRUE;
+ transform = true;
} else if ( p->txop == TQPainter::TxTranslate ) {
p->map( x, y, &x, &y );
}
@@ -942,15 +942,15 @@ bool TQFontEngineXLFD::canRender( const TQChar *string, int len )
glyph_t glyphs[256];
int nglyphs = 255;
glyph_t *g = glyphs;
- if ( stringToCMap( string, len, g, 0, &nglyphs, FALSE ) == OutOfMemory ) {
+ if ( stringToCMap( string, len, g, 0, &nglyphs, false ) == OutOfMemory ) {
g = (glyph_t *)malloc( nglyphs*sizeof(glyph_t) );
- stringToCMap( string, len, g, 0, &nglyphs, FALSE );
+ stringToCMap( string, len, g, 0, &nglyphs, false );
}
- bool allExist = TRUE;
+ bool allExist = true;
for ( int i = 0; i < nglyphs; i++ ) {
if ( !g[i] || !charStruct( _fs, g[i] ) ) {
- allExist = FALSE;
+ allExist = false;
break;
}
}
@@ -1029,10 +1029,10 @@ void TQFontEngineLatinXLFD::findEngine( const TQChar &ch )
int i;
for ( i = 0; i < mib_count; ++i ) {
const int mib = qt_mib_for_xlfd_encoding( alternate_encodings[i] );
- bool skip = FALSE;
+ bool skip = false;
for ( int e = 0; e < _count; ++e ) {
if ( _engines[e]->cmap() == mib ) {
- skip = TRUE;
+ skip = true;
break;
}
}
@@ -1080,7 +1080,7 @@ void TQFontEngineLatinXLFD::findEngine( const TQChar &ch )
chars[i] = i;
chars[0x200] = 0x20ac;
int glyphCount = 0x201;
- engine->stringToCMap( (const TQChar *) chars, 0x201, glyphs, advances, &glyphCount, FALSE );
+ engine->stringToCMap( (const TQChar *) chars, 0x201, glyphs, advances, &glyphCount, false );
// merge member data with the above
for ( i = 0; i < 0x200; ++i ) {
@@ -1104,7 +1104,7 @@ TQFontEngineLatinXLFD::stringToCMap( const TQChar *str, int len, glyph_t *glyphs
}
int i;
- bool missing = FALSE;
+ bool missing = false;
const TQChar *c = str+len;
glyph_t *g = glyphs+len;
if ( advances ) {
@@ -1382,21 +1382,21 @@ const char *TQFontEngineLatinXLFD::name() const
bool TQFontEngineLatinXLFD::canRender( const TQChar *string, int len )
{
- bool all = TRUE;
+ bool all = true;
int i;
for ( i = 0; i < len; ++i ) {
if ( string[i].unicode() >= 0x200 ||
glyphIndices[string[i].unicode()] == 0 ) {
if (string[i].unicode() != 0x20ac || euroIndex == 0)
- all = FALSE;
+ all = false;
break;
}
}
if ( all )
- return TRUE;
+ return true;
- all = TRUE;
+ all = true;
for ( i = 0; i < len; ++i ) {
if ( string[i].unicode() >= 0x200 ) {
if (string[i].unicode() == 0x20ac) {
@@ -1407,14 +1407,14 @@ bool TQFontEngineLatinXLFD::canRender( const TQChar *string, int len )
if (euroIndex)
continue;
}
- all = FALSE;
+ all = false;
break;
}
if ( glyphIndices[string[i].unicode()] != 0 ) continue;
findEngine( string[i] );
if ( glyphIndices[string[i].unicode()] == 0 ) {
- all = FALSE;
+ all = false;
break;
}
}
@@ -1432,7 +1432,7 @@ void TQFontEngineLatinXLFD::setScale( double scale )
chars[i] = i;
int glyphCount = 0x200;
_engines[0]->stringToCMap( (const TQChar *)chars, 0x200,
- glyphIndices, glyphAdvances, &glyphCount, FALSE );
+ glyphIndices, glyphAdvances, &glyphCount, false );
}
@@ -1491,7 +1491,7 @@ TQFontEngineXft::TQFontEngineXft( XftFont *font, XftPattern *pattern, int cmap )
// if the Xft font is not antialiased, it uses bitmaps instead of
// 8-bit alpha maps... adjust the cache_cost to reflect this
- Bool antialiased = TRUE;
+ Bool antialiased = true;
if ( XftPatternGetBool( pattern, XFT_ANTIALIAS,
0, &antialiased ) == XftResultMatch &&
! antialiased ) {
@@ -1616,12 +1616,12 @@ void TQFontEngineXft::draw( TQPainter *p, int x, int y, const TQTextEngine *engi
GlyphAttributes *glyphAttributes = engine->glyphAttributes( si );
XftFont *fnt = _font;
- bool transform = FALSE;
+ bool transform = false;
if ( p->txop >= TQPainter::TxScale || p->rop != TQt::CopyROP || _scale < 0.9999 || _scale > 1.001) {
bool can_scale = (_face->face_flags & FT_FACE_FLAG_SCALABLE) && p->rop == TQt::CopyROP;
double size = (p->m11()*p->m22() - p->m12()*p->m21())*_scale*_scale*fontDef.pixelSize*fontDef.pixelSize;
if (size > 256*256 || _scale < .9999 || _scale > 1.001)
- can_scale = FALSE;
+ can_scale = false;
if (!can_scale) {
// font doesn't support transformations, need to do it by hand
float tmp = _scale;
@@ -1686,7 +1686,7 @@ void TQFontEngineXft::draw( TQPainter *p, int x, int y, const TQTextEngine *engi
trf->next = transformed_fonts;
transformed_fonts = trf;
}
- transform = TRUE;
+ transform = true;
} else if ( p->txop == TQPainter::TxTranslate ) {
p->map( x, y, &x, &y );
}
@@ -1948,7 +1948,7 @@ int TQFontEngineXft::minRightBearing() const
TQChar *ch = (TQChar *)char_table;
glyph_t glyphs[char_table_entries];
int ng = char_table_entries;
- stringToCMap(ch, char_table_entries, glyphs, 0, &ng, FALSE);
+ stringToCMap(ch, char_table_entries, glyphs, 0, &ng, false);
while (--ng) {
if (glyphs[ng]) {
glyph_metrics_t gi = that->boundingBox( glyphs[ng] );
@@ -1980,14 +1980,14 @@ void TQFontEngineXft::setScale( double scale )
bool TQFontEngineXft::canRender( const TQChar *string, int len )
{
- bool allExist = TRUE;
+ bool allExist = true;
if (_cmap != -1) {
for ( int i = 0; i < len; i++ ) {
uint uc = getCodepoint(string, i, len);
if (!XftCharExists(0, _font, uc)
&& getAdobeCharIndex(_font, _cmap, uc) == 0) {
- allExist = FALSE;
+ allExist = false;
break;
}
}
@@ -1995,7 +1995,7 @@ bool TQFontEngineXft::canRender( const TQChar *string, int len )
for ( int i = 0; i < len; i++ ) {
uint uc = getCodepoint(string, i, len);
if (!XftCharExists(0, _font, uc)) {
- allExist = FALSE;
+ allExist = false;
break;
}
}
@@ -2259,7 +2259,7 @@ bool TQOpenType::checkScript(unsigned int script)
if (requirements & RequiresGsub) {
if (!gsub)
- return FALSE;
+ return false;
FT_UShort script_index;
FT_Error error = TT_GSUB_Select_Script(gsub, tag, &script_index);
@@ -2267,13 +2267,13 @@ bool TQOpenType::checkScript(unsigned int script)
#ifdef OT_DEBUG
tqDebug("could not select script %d in GSub table: %d", (int)script, error);
#endif
- return FALSE;
+ return false;
}
}
if (requirements & RequiresGpos) {
if (!gpos)
- return FALSE;
+ return false;
FT_UShort script_index;
FT_Error error = TT_GPOS_Select_Script(gpos, script, &script_index);
@@ -2281,11 +2281,11 @@ bool TQOpenType::checkScript(unsigned int script)
#ifdef OT_DEBUG
tqDebug("could not select script in gpos table: %d", error);
#endif
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
@@ -2436,8 +2436,8 @@ bool TQOpenType::positionAndAdd(TQShaperItem *item, bool doLogClusters)
face = lockFTFace(static_cast<TQFontEngineXft *>(fontEngine)->font());
#endif
memset(otl_buffer->positions, 0, otl_buffer->in_length*sizeof(OTL_PositionRec));
- // #### check that passing "FALSE,FALSE" is correct
- TT_GPOS_Apply_String(face, gpos, loadFlags, otl_buffer, FALSE, FALSE);
+ // #### check that passing "false,false" is correct
+ TT_GPOS_Apply_String(face, gpos, loadFlags, otl_buffer, false, false);
#ifdef TQ_WS_X11
unlockFTFace(static_cast<TQFontEngineXft *>(fontEngine)->font());
#endif
@@ -2446,14 +2446,14 @@ bool TQOpenType::positionAndAdd(TQShaperItem *item, bool doLogClusters)
// make sure we have enough space to write everything back
if (item->num_glyphs < (int)otl_buffer->in_length) {
item->num_glyphs = otl_buffer->in_length;
- return FALSE;
+ return false;
}
for (unsigned int i = 0; i < otl_buffer->in_length; ++i) {
item->glyphs[i] = otl_buffer->in_string[i].gindex;
item->attributes[i] = tmpAttributes[otl_buffer->in_string[i].cluster];
if (i && otl_buffer->in_string[i].cluster == otl_buffer->in_string[i-1].cluster)
- item->attributes[i].clusterStart = FALSE;
+ item->attributes[i].clusterStart = false;
}
item->num_glyphs = otl_buffer->in_length;
@@ -2519,7 +2519,7 @@ bool TQOpenType::positionAndAdd(TQShaperItem *item, bool doLogClusters)
// tqDebug(" ->\tadv=%d\tpos=(%d/%d)",
// glyphs[i].advance.x.toInt(), glyphs[i].offset.x.toInt(), glyphs[i].offset.y.toInt());
}
- item->has_positioning = TRUE;
+ item->has_positioning = true;
} else {
qt_heuristicPosition(item);
}
@@ -2539,7 +2539,7 @@ bool TQOpenType::positionAndAdd(TQShaperItem *item, bool doLogClusters)
item->offsets[i].x, item->offsets[i].y);
tqDebug("-----------------------------------------");
#endif
- return TRUE;
+ return true;
}
#endif
diff --git a/src/kernel/tqguardedptr.cpp b/src/kernel/tqguardedptr.cpp
index a08fe1aae..ab18f5ed2 100644
--- a/src/kernel/tqguardedptr.cpp
+++ b/src/kernel/tqguardedptr.cpp
@@ -147,9 +147,9 @@
\fn bool TQGuardedPtr::operator==( const TQGuardedPtr<T> &p ) const
Equality operator; implements traditional pointer semantics.
- Returns TRUE if both \a p and this guarded pointer are 0, or if
+ Returns true if both \a p and this guarded pointer are 0, or if
both \a p and this pointer point to the same object; otherwise
- returns FALSE.
+ returns false.
\sa operator!=()
*/
@@ -158,15 +158,15 @@
\fn bool TQGuardedPtr::operator!= ( const TQGuardedPtr<T>& p ) const
Inequality operator; implements pointer semantics, the negation of
- operator==(). Returns TRUE if \a p and this guarded pointer are
- not pointing to the same object; otherwise returns FALSE.
+ operator==(). Returns true if \a p and this guarded pointer are
+ not pointing to the same object; otherwise returns false.
*/
/*!
\fn bool TQGuardedPtr::isNull() const
- Returns \c TRUE if the referenced object has been destroyed or if
- there is no referenced object; otherwise returns FALSE.
+ Returns \c true if the referenced object has been destroyed or if
+ there is no referenced object; otherwise returns false.
*/
/*!
diff --git a/src/kernel/tqiconset.cpp b/src/kernel/tqiconset.cpp
index 22e8a8f1d..d22116207 100644
--- a/src/kernel/tqiconset.cpp
+++ b/src/kernel/tqiconset.cpp
@@ -263,7 +263,7 @@ TQIconSetIcon *TQIconSetPrivate::icon( const TQIconSet *iconSet,
22 x 22, while the default large size is 32 x 32. These sizes only
affect generated icons.
- The isGenerated() function returns TRUE if an icon was generated by
+ The isGenerated() function returns true if an icon was generated by
TQIconSet or by a factory; clearGenerated() clears all cached
pixmaps.
@@ -551,8 +551,8 @@ TQPixmap TQIconSet::pixmap( Size size, Mode mode, State state ) const
icon->pixmap = new TQPixmap( d->defaultPix );
} else {
/*
- No icons are available for { TRUE, Normal, Off } and
- { FALSE, Normal, Off }. Try the other 10 combinaisons,
+ No icons are available for { true, Normal, Off } and
+ { false, Normal, Off }. Try the other 10 combinaisons,
best ones first.
*/
const int N = 10;
@@ -561,16 +561,16 @@ TQPixmap TQIconSet::pixmap( Size size, Mode mode, State state ) const
Mode mode;
State state;
} tryList[N] = {
- { TRUE, Active, Off },
- { TRUE, Normal, On },
- { TRUE, Active, On },
- { FALSE, Active, Off },
- { FALSE, Normal, On },
- { FALSE, Active, On },
- { TRUE, Disabled, Off },
- { TRUE, Disabled, On },
- { FALSE, Disabled, Off },
- { FALSE, Disabled, On }
+ { true, Active, Off },
+ { true, Normal, On },
+ { true, Active, On },
+ { false, Active, Off },
+ { false, Normal, On },
+ { false, Active, On },
+ { true, Disabled, Off },
+ { true, Disabled, On },
+ { false, Disabled, Off },
+ { false, Disabled, On }
};
for ( int i = 0; i < N; i++ ) {
@@ -648,16 +648,16 @@ TQPixmap TQIconSet::pixmap() const
}
/*!
- Returns TRUE if the pixmap with size \a size, mode \a mode and
+ Returns true if the pixmap with size \a size, mode \a mode and
state \a state is generated from other pixmaps; otherwise returns
- FALSE.
+ false.
A pixmap obtained from a TQIconFactory is considered non-generated.
*/
bool TQIconSet::isGenerated( Size size, Mode mode, State state ) const
{
if ( !d )
- return TRUE;
+ return true;
return d->icon( this, size, mode, state )->origin == Generated;
}
@@ -693,7 +693,7 @@ void TQIconSet::installIconFactory( TQIconFactory *factory )
}
/*!
- Returns TRUE if the icon set is empty; otherwise returns FALSE.
+ Returns true if the icon set is empty; otherwise returns false.
*/
bool TQIconSet::isNull() const
{
@@ -857,7 +857,7 @@ TQPixmap *TQIconSet::createDisabled( Size size, State state ) const
By reimplementing createPixmap(), you can override TQIconSet's
default algorithm for computing pixmaps not supplied by the user.
- Call setAutoDelete(TRUE) if you want the factory to automatically
+ Call setAutoDelete(true) if you want the factory to automatically
delete itself when it is no longer needed by TQIconSet.
\sa TQIconSet
@@ -899,9 +899,9 @@ TQPixmap *TQIconFactory::createPixmap( const TQIconSet& /* iconSet */,
/*!
\fn void TQIconFactory::setAutoDelete( bool autoDelete )
- If \a autoDelete is TRUE, sets the icon factory to automatically
+ If \a autoDelete is true, sets the icon factory to automatically
delete itself when it is no longer referenced by any TQIconSet and
- isn't the default factory. If \a autoDelete is FALSE (the default)
+ isn't the default factory. If \a autoDelete is false (the default)
auto-deletion is disabled.
\sa autoDelete(), defaultFactory()
@@ -910,7 +910,7 @@ TQPixmap *TQIconFactory::createPixmap( const TQIconSet& /* iconSet */,
/*!
\fn bool TQIconFactory::autoDelete() const
- Returns TRUE if auto-deletion is enabled; otherwise returns FALSE.
+ Returns true if auto-deletion is enabled; otherwise returns false.
\sa setAutoDelete()
*/
@@ -924,7 +924,7 @@ TQIconFactory *TQIconFactory::defaultFactory()
{
if ( !defaultFac ) {
defaultFac = new TQIconFactory;
- defaultFac->setAutoDelete( TRUE );
+ defaultFac->setAutoDelete( true );
defaultFac->ref();
q_cleanup_icon_factory.set( &defaultFac );
}
diff --git a/src/kernel/tqimage.cpp b/src/kernel/tqimage.cpp
index 177c0a6af..35dabb6e7 100644
--- a/src/kernel/tqimage.cpp
+++ b/src/kernel/tqimage.cpp
@@ -486,12 +486,12 @@ TQImage::TQImage( uchar* yourdata, int w, int h, int depth,
data->nbytes = bpl*h;
if ( colortable || !data->ncols ) {
data->ctbl = colortable;
- data->ctbl_mine = FALSE;
+ data->ctbl_mine = false;
} else {
// calloc since we realloc, etc. later (ick)
data->ctbl = (TQRgb*)calloc( data->ncols*sizeof(TQRgb), data->ncols );
TQ_CHECK_PTR(data->ctbl);
- data->ctbl_mine = TRUE;
+ data->ctbl_mine = true;
}
uchar** jt = (uchar**)malloc(h*sizeof(uchar*));
TQ_CHECK_PTR(jt);
@@ -667,14 +667,14 @@ TQImage TQImage::copy(int x, int y, int w, int h, int conversion_flags) const
// alpha channel should be only copied, not used by bitBlt(), and
// this is mutable, we will restore the image state before returning
TQImage *that = (TQImage *) this;
- that->setAlphaBuffer( FALSE );
+ that->setAlphaBuffer( false );
}
memcpy( image.colorTable(), colorTable(), numColors()*sizeof(TQRgb) );
bitBlt( &image, dx, dy, this, x, y, -1, -1, conversion_flags );
if ( has_alpha ) {
// restore image state
TQImage *that = (TQImage *) this;
- that->setAlphaBuffer( TRUE );
+ that->setAlphaBuffer( true );
}
image.setAlphaBuffer(hasAlphaBuffer());
image.data->dpmx = dotsPerMeterX();
@@ -702,7 +702,7 @@ TQImage TQImage::copy(int x, int y, int w, int h, int conversion_flags) const
/*!
\fn bool TQImage::isNull() const
- Returns TRUE if it is a null image; otherwise returns FALSE.
+ Returns true if it is a null image; otherwise returns false.
A null image has all parameters set to zero and no allocated data.
*/
@@ -977,7 +977,7 @@ void TQImage::fill( uint pixel )
/*!
Inverts all pixel values in the image.
- If the depth is 32: if \a invertAlpha is TRUE, the alpha bits are
+ If the depth is 32: if \a invertAlpha is true, the alpha bits are
also inverted, otherwise they are left unchanged.
If the depth is not 32, the argument \a invertAlpha has no
@@ -1085,7 +1085,7 @@ void TQImage::setNumColors( int numColors )
if ( data->ctbl_mine )
free( data->ctbl );
else
- data->ctbl_mine = TRUE;
+ data->ctbl_mine = true;
data->ctbl = 0;
}
data->ncols = 0;
@@ -1099,7 +1099,7 @@ void TQImage::setNumColors( int numColors )
} else { // create new color table
data->ctbl = (TQRgb*)calloc( numColors*sizeof(TQRgb), 1 );
TQ_CHECK_PTR(data->ctbl);
- data->ctbl_mine = TRUE;
+ data->ctbl_mine = true;
}
data->ncols = data->ctbl == 0 ? 0 : numColors;
}
@@ -1108,14 +1108,14 @@ void TQImage::setNumColors( int numColors )
/*!
\fn bool TQImage::hasAlphaBuffer() const
- Returns TRUE if alpha buffer mode is enabled; otherwise returns
- FALSE.
+ Returns true if alpha buffer mode is enabled; otherwise returns
+ false.
\sa setAlphaBuffer()
*/
/*!
- Enables alpha buffer mode if \a enable is TRUE, otherwise disables
+ Enables alpha buffer mode if \a enable is true, otherwise disables
it. The default setting is disabled.
An 8-bpp image has 8-bit pixels. A pixel is an index into the
@@ -1144,8 +1144,8 @@ void TQImage::setAlphaBuffer( bool enable )
/*!
Sets the image \a width, \a height, \a depth, its number of colors
- (in \a numColors), and bit order. Returns TRUE if successful, or
- FALSE if the parameters are incorrect or if memory cannot be
+ (in \a numColors), and bit order. Returns true if successful, or
+ false if the parameters are incorrect or if memory cannot be
allocated.
The \a width and \a height is limited to 32767. \a depth must be
@@ -1169,12 +1169,12 @@ bool TQImage::create( int width, int height, int depth, int numColors,
{
reset(); // reset old data
if ( width <= 0 || height <= 0 || depth <= 0 || numColors < 0 )
- return FALSE; // invalid parameter(s)
+ return false; // invalid parameter(s)
if ( depth == 1 && bitOrder == IgnoreEndian ) {
#if defined(QT_CHECK_RANGE)
tqWarning( "TQImage::create: Bit order is required for 1 bpp images" );
#endif
- return FALSE;
+ return false;
}
if ( depth != 1 )
bitOrder = IgnoreEndian;
@@ -1195,18 +1195,18 @@ bool TQImage::create( int width, int height, int depth, int numColors,
#endif
break;
default: // invalid depth
- return FALSE;
+ return false;
}
if ( depth == 32 )
numColors = 0;
setNumColors( numColors );
if ( data->ncols != numColors ) // could not alloc color table
- return FALSE;
+ return false;
if ( INT_MAX / uint(depth) < uint(width) ) { // sanity check for potential overflow
setNumColors( 0 );
- return FALSE;
+ return false;
}
const int bpl = ((width*depth+31)/32)*4; // bytes per scanline
// #### WWA: shouldn't this be (width*depth+7)/8:
@@ -1215,7 +1215,7 @@ bool TQImage::create( int width, int height, int depth, int numColors,
|| bpl < 0
|| INT_MAX / sizeof(uchar *) < uint(height) ) { // sanity check for potential overflow
setNumColors( 0 );
- return FALSE;
+ return false;
}
int nbytes = bpl*height; // image size
int ptbl = height*sizeof(uchar*); // pointer table size
@@ -1224,7 +1224,7 @@ bool TQImage::create( int width, int height, int depth, int numColors,
TQ_CHECK_PTR(p);
if ( !p ) { // no memory
setNumColors( 0 );
- return FALSE;
+ return false;
}
data->w = width;
data->h = height;
@@ -1240,7 +1240,7 @@ bool TQImage::create( int width, int height, int depth, int numColors,
memset( d+bpl-pad, 0, pad );
d += bpl;
}
- return TRUE;
+ return true;
}
/*!
@@ -1271,7 +1271,7 @@ void TQImage::reinit()
data->ctbl = 0;
data->bits = 0;
data->bitordr = TQImage::IgnoreEndian;
- data->alpha = FALSE;
+ data->alpha = false;
#ifndef TQT_NO_IMAGE_TEXT
data->misc = 0;
#endif
@@ -1318,18 +1318,18 @@ static bool convert_32_to_8( const TQImage *src, TQImage *dst, int conversion_fl
{
TQRgb *p;
uchar *b;
- bool do_quant = FALSE;
+ bool do_quant = false;
int y, x;
if ( !dst->create(src->width(), src->height(), 8, 256) )
- return FALSE;
+ return false;
const int tablesize = 997; // prime
TQRgbMap table[tablesize];
int pix=0;
TQRgb amask = src->hasAlphaBuffer() ? 0xffffffff : 0x00ffffff;
if ( src->hasAlphaBuffer() )
- dst->setAlphaBuffer(TRUE);
+ dst->setAlphaBuffer(true);
if ( palette ) {
// Preload palette into table.
@@ -1363,7 +1363,7 @@ static bool convert_32_to_8( const TQImage *src, TQImage *dst, int conversion_fl
}
if ( (conversion_flags & TQt::DitherMode_Mask) == TQt::PreferDither ) {
- do_quant = TRUE;
+ do_quant = true;
} else {
for ( y=0; y<src->height(); y++ ) { // check if <= 256 colors
p = (TQRgb *)src->scanLine(y);
@@ -1384,7 +1384,7 @@ static bool convert_32_to_8( const TQImage *src, TQImage *dst, int conversion_fl
} else {
// Cannot be in table
if ( pix == 256 ) { // too many colors
- do_quant = TRUE;
+ do_quant = true;
// Break right out
x = 0;
y = src->height();
@@ -1616,14 +1616,14 @@ static bool convert_32_to_8( const TQImage *src, TQImage *dst, int conversion_fl
}
- return TRUE;
+ return true;
}
static bool convert_8_to_32( const TQImage *src, TQImage *dst )
{
if ( !dst->create(src->width(), src->height(), 32) )
- return FALSE; // create failed
+ return false; // create failed
dst->setAlphaBuffer( src->hasAlphaBuffer() );
for ( int y=0; y<dst->height(); y++ ) { // for each scan line...
uint *p = (uint *)dst->scanLine(y);
@@ -1632,14 +1632,14 @@ static bool convert_8_to_32( const TQImage *src, TQImage *dst )
while ( p < end )
*p++ = src->color(*b++);
}
- return TRUE;
+ return true;
}
static bool convert_1_to_32( const TQImage *src, TQImage *dst )
{
if ( !dst->create(src->width(), src->height(), 32) )
- return FALSE; // could not create
+ return false; // could not create
dst->setAlphaBuffer( src->hasAlphaBuffer() );
for ( int y=0; y<dst->height(); y++ ) { // for each scan line...
uint *p = (uint *)dst->scanLine(y);
@@ -1659,14 +1659,14 @@ static bool convert_1_to_32( const TQImage *src, TQImage *dst )
}
}
}
- return TRUE;
+ return true;
}
#endif // TQT_NO_IMAGE_TRUECOLOR
static bool convert_1_to_8( const TQImage *src, TQImage *dst )
{
if ( !dst->create(src->width(), src->height(), 8, 2) )
- return FALSE; // something failed
+ return false; // something failed
dst->setAlphaBuffer( src->hasAlphaBuffer() );
if (src->numColors() >= 2) {
dst->setColor( 0, src->color(0) ); // copy color table
@@ -1697,7 +1697,7 @@ static bool convert_1_to_8( const TQImage *src, TQImage *dst )
}
}
}
- return TRUE;
+ return true;
}
#ifndef TQT_NO_IMAGE_DITHER_TO_1
@@ -1709,7 +1709,7 @@ static bool dither_to_1( const TQImage *src, TQImage *dst,
int conversion_flags, bool fromalpha )
{
if ( !dst->create(src->width(), src->height(), 1, 2, TQImage::BigEndian) )
- return FALSE; // something failed
+ return false; // something failed
enum { Threshold, Ordered, Diffuse } dithermode;
@@ -1756,7 +1756,7 @@ static bool dither_to_1( const TQImage *src, TQImage *dst,
int *line2 = new int[w];
int bmwidth = (w+7)/8;
if ( !(line1 && line2) )
- return FALSE;
+ return false;
uchar *p;
uchar *end;
int *b1, *b2;
@@ -1986,7 +1986,7 @@ static bool dither_to_1( const TQImage *src, TQImage *dst,
}
}
}
- return TRUE;
+ return true;
}
#endif
@@ -2004,7 +2004,7 @@ static inline bool is16BitGray( ushort c )
static bool convert_16_to_32( const TQImage *src, TQImage *dst )
{
if ( !dst->create(src->width(), src->height(), 32) )
- return FALSE; // create failed
+ return false; // create failed
dst->setAlphaBuffer( src->hasAlphaBuffer() );
for ( int y=0; y<dst->height(); y++ ) { // for each scan line...
uint *p = (uint *)dst->scanLine(y);
@@ -2013,14 +2013,14 @@ static bool convert_16_to_32( const TQImage *src, TQImage *dst )
while ( p < end )
*p++ = qt_conv16ToRgb( *s++ );
}
- return TRUE;
+ return true;
}
static bool convert_32_to_16( const TQImage *src, TQImage *dst )
{
if ( !dst->create(src->width(), src->height(), 16) )
- return FALSE; // create failed
+ return false; // create failed
dst->setAlphaBuffer( src->hasAlphaBuffer() );
for ( int y=0; y<dst->height(); y++ ) { // for each scan line...
ushort *p = (ushort *)dst->scanLine(y);
@@ -2029,7 +2029,7 @@ static bool convert_32_to_16( const TQImage *src, TQImage *dst )
while ( p < end )
*p++ = qt_convRgbTo16( *s++ );
}
- return TRUE;
+ return true;
}
@@ -2059,7 +2059,7 @@ TQImage TQImage::convertDepth( int depth, int conversion_flags ) const
image = *this; // no conversion
#ifndef TQT_NO_IMAGE_DITHER_TO_1
else if ( (data->d == 8 || data->d == 32) && depth == 1 ) // dither
- dither_to_1( this, &image, conversion_flags, FALSE );
+ dither_to_1( this, &image, conversion_flags, false );
#endif
#ifndef TQT_NO_IMAGE_TRUECOLOR
else if ( data->d == 32 && depth == 8 ) // 32 -> 8
@@ -2104,8 +2104,8 @@ TQImage TQImage::convertDepth( int depth ) const
}
/*!
- Returns TRUE if ( \a x, \a y ) is a valid coordinate in the image;
- otherwise returns FALSE.
+ Returns true if ( \a x, \a y ) is a valid coordinate in the image;
+ otherwise returns false.
\sa width() height() pixelIndex()
*/
@@ -2306,9 +2306,9 @@ bool isGray(TQRgb c)
}
/*!
- Returns TRUE if all the colors in the image are shades of gray
+ Returns true if all the colors in the image are shades of gray
(i.e. their red, green and blue components are equal); otherwise
- returns FALSE.
+ returns false.
This function is slow for large 32-bit images.
@@ -2322,33 +2322,33 @@ bool TQImage::allGray() const
TQRgb* b = (TQRgb*)bits();
while (p--)
if (!isGray(*b++))
- return FALSE;
+ return false;
#ifndef TQT_NO_IMAGE_16_BIT
} else if (depth()==16) {
int p = width()*height();
ushort* b = (ushort*)bits();
while (p--)
if (!is16BitGray(*b++))
- return FALSE;
+ return false;
#endif
} else
#endif //TQT_NO_IMAGE_TRUECOLOR
{
- if (!data->ctbl) return TRUE;
+ if (!data->ctbl) return true;
for (int i=0; i<numColors(); i++)
if (!isGray(data->ctbl[i]))
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
/*!
For 32-bit images, this function is
equivalent to allGray().
- For 8-bpp images, this function returns TRUE if color(i) is
+ For 8-bpp images, this function returns true if color(i) is
TQRgb(i,i,i) for all indices of the color table; otherwise returns
- FALSE.
+ false.
\sa allGray() depth()
*/
@@ -2365,11 +2365,11 @@ bool TQImage::isGrayscale() const
case 8: {
for (int i=0; i<numColors(); i++)
if (data->ctbl[i] != tqRgb(i,i,i))
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
}
- return FALSE;
+ return false;
}
#ifndef TQT_NO_IMAGE_SMOOTHSCALE
@@ -2428,7 +2428,7 @@ void pnmscale(const TQImage& src, TQImage& dst)
tempxelrow = new TQRgb[cols];
if ( src.hasAlphaBuffer() ) {
- dst.setAlphaBuffer(TRUE);
+ dst.setAlphaBuffer(true);
as = new long[cols];
for ( col = 0; col < cols; ++col )
as[col] = HALFSCALE;
@@ -2982,7 +2982,6 @@ TQImage TQImage::xForm( const TQWMatrix &matrix ) const
TQImage TQImage::createAlphaMask( int conversion_flags ) const
{
if ( conversion_flags == 1 ) {
- // Old code is passing "TRUE".
conversion_flags = TQt::DiffuseAlphaDither;
}
@@ -2997,7 +2996,7 @@ TQImage TQImage::createAlphaMask( int conversion_flags ) const
}
TQImage mask1;
- dither_to_1( this, &mask1, conversion_flags, TRUE );
+ dither_to_1( this, &mask1, conversion_flags, true );
return mask1;
}
#endif
@@ -3015,7 +3014,7 @@ TQImage TQImage::createAlphaMask( int conversion_flags ) const
The returned image has little-endian bit order, which you can
convert to big-endianness using convertBitOrder().
- If \a clipTight is TRUE the mask is just large enough to cover the
+ If \a clipTight is true the mask is just large enough to cover the
pixels; otherwise, the mask is larger than the data pixels.
This function disregards the \link hasAlphaBuffer() alpha buffer
@@ -3057,10 +3056,10 @@ TQImage TQImage::createHeuristicMask( bool clipTight ) const
}
int x,y;
- bool done = FALSE;
+ bool done = false;
uchar *ypp, *ypc, *ypn;
while( !done ) {
- done = TRUE;
+ done = true;
ypn = m.scanLine(0);
ypc = 0;
for ( y = 0; y < h; y++ ) {
@@ -3078,7 +3077,7 @@ TQImage TQImage::createHeuristicMask( bool clipTight ) const
!(*(ypn + (x >> 3)) & (1 << (x & 7))) ) &&
( (*(ypc + (x >> 3)) & (1 << (x & 7))) ) &&
( (*p & 0x00ffffff) == background ) ) {
- done = FALSE;
+ done = false;
*(ypc + (x >> 3)) &= ~(1 << (x & 7));
}
p++;
@@ -3128,7 +3127,7 @@ TQImage TQImage::createHeuristicMask( bool clipTight ) const
Returns a mirror of the image, mirrored in the horizontal and/or
the vertical direction depending on whether \a horizontal and \a
- vertical are set to TRUE or FALSE. The original image is not
+ vertical are set to true or false. The original image is not
changed.
\sa smoothScale()
@@ -3231,7 +3230,7 @@ TQImage TQImage::mirror(bool horizontal, bool vertical) const
TQImage TQImage::mirror() const
{
- return mirror(FALSE,TRUE);
+ return mirror(false,true);
}
#endif //TQT_NO_IMAGE_MIRROR
@@ -3368,8 +3367,8 @@ TQStrList TQImage::outputFormats()
/*!
- Loads an image from the file \a fileName. Returns TRUE if the
- image was successfully loaded; otherwise returns FALSE.
+ Loads an image from the file \a fileName. Returns true if the
+ image was successfully loaded; otherwise returns false.
If \a format is specified, the loader attempts to read the image
using the specified format. If \a format is not specified (which
@@ -3393,8 +3392,8 @@ bool TQImage::load( const TQString &fileName, const char* format )
/*!
Loads an image from the first \a len bytes of binary data in \a
- buf. Returns TRUE if the image was successfully loaded; otherwise
- returns FALSE.
+ buf. Returns true if the image was successfully loaded; otherwise
+ returns false.
If \a format is specified, the loader attempts to read the image
using the specified format. If \a format is not specified (which
@@ -3439,8 +3438,8 @@ bool TQImage::loadFromData( TQByteArray buf, const char *format )
compressed files, 100 for large uncompressed files, and -1 (the
default) to use the default settings.
- Returns TRUE if the image was successfully saved; otherwise
- returns FALSE.
+ Returns true if the image was successfully saved; otherwise
+ returns false.
\sa load() loadFromData() imageFormat() TQPixmap::save() TQImageIO
*/
@@ -3448,7 +3447,7 @@ bool TQImage::loadFromData( TQByteArray buf, const char *format )
bool TQImage::save( const TQString &fileName, const char* format, int quality ) const
{
if ( isNull() )
- return FALSE; // nothing to save
+ return false; // nothing to save
TQImageIO io( fileName, format );
return doImageIO( &io, quality );
}
@@ -3471,7 +3470,7 @@ bool TQImage::save( const TQString &fileName, const char* format, int quality )
bool TQImage::save( TQIODevice* device, const char* format, int quality ) const
{
if ( isNull() )
- return FALSE; // nothing to save
+ return false; // nothing to save
TQImageIO io( device, format );
return doImageIO( &io, quality );
}
@@ -3482,7 +3481,7 @@ bool TQImage::save( TQIODevice* device, const char* format, int quality ) const
bool TQImage::doImageIO( TQImageIO* io, int quality ) const
{
if ( !io )
- return FALSE;
+ return false;
io->setImage( *this );
#if defined(QT_CHECK_RANGE)
if ( quality > 100 || quality < -1 )
@@ -3822,7 +3821,7 @@ void tqt_init_image_handlers() // initialize image handlers
if ( !imageHandlers ) {
imageHandlers = new TQIHList;
TQ_CHECK_PTR( imageHandlers );
- imageHandlers->setAutoDelete( TRUE );
+ imageHandlers->setAutoDelete( true );
tqAddPostRoutine( cleanup );
#ifndef TQT_NO_IMAGEIO_BMP
TQImageIO::defineIOHandler( "BMP", "^BM", 0,
@@ -4303,8 +4302,8 @@ TQStrList TQImageIO::outputFormats()
/*!
- Reads an image into memory and returns TRUE if the image was
- successfully read; otherwise returns FALSE.
+ Reads an image into memory and returns true if the image was
+ successfully read; otherwise returns false.
Before reading an image you must set an IO device or a file name.
If both an IO device and a file name have been set, the IO device
@@ -4340,10 +4339,10 @@ bool TQImageIO::read()
} else if ( !fname.isEmpty() ) { // read from file
file.setName( fname );
if ( !file.open(IO_ReadOnly) )
- return FALSE; // cannot open file
+ return false; // cannot open file
iodev = &file;
} else { // no file name or io device
- return FALSE;
+ return false;
}
if (frmt.isEmpty()) {
// Try to guess format
@@ -4353,7 +4352,7 @@ bool TQImageIO::read()
file.close();
iodev = 0;
}
- return FALSE;
+ return false;
}
} else {
image_format = frmt;
@@ -4391,8 +4390,8 @@ bool TQImageIO::read()
/*!
- Writes an image to an IO device and returns TRUE if the image was
- successfully written; otherwise returns FALSE.
+ Writes an image to an IO device and returns true if the image was
+ successfully written; otherwise returns false.
Before writing an image you must set an IO device or a file name.
If both an IO device and a file name have been set, the IO device
@@ -4409,7 +4408,7 @@ bool TQImageIO::read()
iio.setFileName( "vegeburger.bmp" );
iio.setFormat( "BMP" );
if ( iio.write() )
- // returned TRUE if written successfully
+ // returned true if written successfully
\endcode
\sa setIODevice() setFileName() setFormat() read() TQPixmap::save()
@@ -4418,7 +4417,7 @@ bool TQImageIO::read()
bool TQImageIO::write()
{
if ( frmt.isEmpty() )
- return FALSE;
+ return false;
TQImageHandler *h = get_image_handler( frmt );
if ( !h && !plugin_manager) {
tqt_init_image_plugins();
@@ -4429,7 +4428,7 @@ bool TQImageIO::write()
tqWarning( "TQImageIO::write: No such image format handler: %s",
format() );
#endif
- return FALSE;
+ return false;
}
TQFile file;
if ( !iodev && !fname.isEmpty() ) {
@@ -4437,7 +4436,7 @@ bool TQImageIO::write()
bool translate = h->text_mode==TQImageHandler::TranslateInOut;
int fmode = translate ? IO_WriteOnly|IO_Translate : IO_WriteOnly;
if ( !file.open(fmode) ) // couldn't create file
- return FALSE;
+ return false;
iodev = &file;
}
iostat = 1;
@@ -4559,7 +4558,7 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image )
s >> bi; // read BMP info header
if ( d->atEnd() ) // end of stream/file
- return FALSE;
+ return false;
#if 0
tqDebug( "offset...........%d", offset );
tqDebug( "startpos.........%d", startpos );
@@ -4587,12 +4586,12 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image )
if ( !(nbits == 1 || nbits == 4 || nbits == 8 || nbits == 16 || nbits == 24 || nbits == 32) ||
bi.biPlanes != 1 || comp > BMP_BITFIELDS )
- return FALSE; // weird BMP image
+ return false; // weird BMP image
if ( !(comp == BMP_RGB || (nbits == 4 && comp == BMP_RLE4) ||
(nbits == 8 && comp == BMP_RLE8) || ((nbits == 16 || nbits == 32) && comp == BMP_BITFIELDS)) )
- return FALSE; // weird compression type
+ return false; // weird compression type
if ((w < 0) || ((w * abs(h)) > (16384 * 16384)))
- return FALSE;
+ return false;
int ncols;
int depth;
@@ -4617,7 +4616,7 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image )
image.create( w, h, depth, ncols, nbits == 1 ?
TQImage::BigEndian : TQImage::IgnoreEndian );
if ( image.isNull() ) // could not create image
- return FALSE;
+ return false;
image.setDotsPerMeterX( bi.biXPelsPerMeter );
image.setDotsPerMeterY( bi.biYPelsPerMeter );
@@ -4629,29 +4628,29 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image )
int rgb_len = t == BMP_OLD ? 3 : 4;
for ( int i=0; i<ncols; i++ ) {
if ( d->readBlock( (char *)rgb, rgb_len ) != rgb_len )
- return FALSE;
+ return false;
image.setColor( i, tqRgb(rgb[2],rgb[1],rgb[0]) );
if ( d->atEnd() ) // truncated file
- return FALSE;
+ return false;
}
} else if (comp == BMP_BITFIELDS && (nbits == 16 || nbits == 32)) {
if ( (TQ_ULONG)d->readBlock( (char *)&red_mask, sizeof(red_mask) ) != sizeof(red_mask) )
- return FALSE;
+ return false;
if ( (TQ_ULONG)d->readBlock( (char *)&green_mask, sizeof(green_mask) ) != sizeof(green_mask) )
- return FALSE;
+ return false;
if ( (TQ_ULONG)d->readBlock( (char *)&blue_mask, sizeof(blue_mask) ) != sizeof(blue_mask) )
- return FALSE;
+ return false;
red_shift = calc_shift(red_mask);
if (((red_mask >> red_shift) + 1) == 0)
- return FALSE;
+ return false;
red_scale = 256 / ((red_mask >> red_shift) + 1);
green_shift = calc_shift(green_mask);
if (((green_mask >> green_shift) + 1) == 0)
- return FALSE;
+ return false;
green_scale = 256 / ((green_mask >> green_shift) + 1);
blue_shift = calc_shift(blue_mask);
if (((blue_mask >> blue_shift) + 1) == 0)
- return FALSE;
+ return false;
blue_scale = 256 / ((blue_mask >> blue_shift) + 1);
} else if (comp == BMP_RGB && (nbits == 24 || nbits == 32)) {
blue_mask = 0x000000ff;
@@ -4662,7 +4661,7 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image )
red_shift = 16;
blue_scale = green_scale = red_scale = 1;
} else if (comp == BMP_RGB && nbits == 16) // don't support RGB values for 15/16 bpp
- return FALSE;
+ return false;
// offset can be bogus, be careful
if (offset>=0 && startpos + offset > (TQ_LONG)d->at() )
@@ -4801,7 +4800,7 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image )
b = endp-p;
if ( d->readBlock( (char *)p, b ) != b )
- return FALSE;
+ return false;
if ( (b & 1) == 1 )
d->getch(); // align on word boundary
x += b;
@@ -4852,7 +4851,7 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image )
delete[] buf24;
}
- return TRUE;
+ return true;
}
bool qt_read_dib( TQDataStream& s, TQImage& image )
@@ -4938,7 +4937,7 @@ bool qt_write_dib( TQDataStream& s, TQImage image )
for ( y=image.height()-1; y>=0; y-- ) {
d->writeBlock( (char*)image.scanLine(y), bpl );
}
- return TRUE;
+ return true;
}
uchar *buf = new uchar[bpl_bmp];
@@ -4970,11 +4969,11 @@ bool qt_write_dib( TQDataStream& s, TQImage image )
}
if ( bpl_bmp != d->writeBlock( (char*)buf, bpl_bmp ) ) {
delete[] buf;
- return FALSE;
+ return false;
}
}
delete[] buf;
- return TRUE;
+ return true;
}
@@ -5581,14 +5580,14 @@ static void write_xbm_image( TQImageIO *iio )
// Skip until ", read until the next ", return the rest in *buf
-// Returns FALSE on error, TRUE on success
+// Returns false on error, true on success
static bool read_xpm_string( TQCString &buf, TQIODevice *d,
const char * const *source, int &index )
{
if ( source ) {
buf = source[index++];
- return TRUE;
+ return true;
}
if ( buf.size() < 69 ) //# just an approximation
@@ -5599,7 +5598,7 @@ static bool read_xpm_string( TQCString &buf, TQIODevice *d,
int i;
while ( (c=d->getch()) != EOF && c != '"' ) { }
if ( c == EOF ) {
- return FALSE;
+ return false;
}
i = 0;
while ( (c=d->getch()) != EOF && c != '"' ) {
@@ -5608,13 +5607,13 @@ static bool read_xpm_string( TQCString &buf, TQIODevice *d,
buf[i++] = c;
}
if ( c == EOF ) {
- return FALSE;
+ return false;
}
if ( i == (int)buf.size() ) // always use a 0 terminator
buf.resize( i+1 );
buf[i] = '\0';
- return TRUE;
+ return true;
}
@@ -5706,7 +5705,7 @@ static void read_xpm_image_or_array( TQImageIO * iio, const char * const * sourc
buf.truncate(end);
buf = buf.stripWhiteSpace();
if ( buf == "none" ) {
- image.setAlphaBuffer( TRUE );
+ image.setAlphaBuffer( true );
int transparentColor = currentColor;
if ( image.depth() == 8 ) {
image.setColor( transparentColor,
@@ -5955,14 +5954,14 @@ static
bool
haveSamePalette(const TQImage& a, const TQImage& b)
{
- if (a.depth() != b.depth()) return FALSE;
- if (a.numColors() != b.numColors()) return FALSE;
+ if (a.depth() != b.depth()) return false;
+ if (a.numColors() != b.numColors()) return false;
TQRgb* ca = a.colorTable();
TQRgb* cb = b.colorTable();
for (int i=a.numColors(); i--; ) {
- if (*ca++ != *cb++) return FALSE;
+ if (*ca++ != *cb++) return false;
}
- return TRUE;
+ return true;
}
/*!
@@ -6157,8 +6156,8 @@ void bitBlt( TQImage* dst, int dx, int dy, const TQImage* src,
/*!
- Returns TRUE if this image and image \a i have the same contents;
- otherwise returns FALSE. The comparison can be slow, unless there
+ Returns true if this image and image \a i have the same contents;
+ otherwise returns false. The comparison can be slow, unless there
is some obvious difference, such as different widths, in which
case the function will return quickly.
@@ -6169,14 +6168,14 @@ bool TQImage::operator==( const TQImage & i ) const
{
// same object, or shared?
if ( i.data == data )
- return TRUE;
+ return true;
// obviously different stuff?
if ( i.data->h != data->h ||
i.data->w != data->w )
- return FALSE;
+ return false;
// not equal if one has alphabuffer and the other does not
if ( i.hasAlphaBuffer() != hasAlphaBuffer() )
- return FALSE;
+ return false;
// that was the fast bit...
TQImage i1 = convertDepth( 32 );
TQImage i2 = i.convertDepth( 32 );
@@ -6193,21 +6192,21 @@ bool TQImage::operator==( const TQImage & i ) const
// compare pixels of scanline individually
for ( m=0; m < data->w; m++ )
if ( (i1line[m] ^ i2line[m]) & 0x00FFFFFF )
- return FALSE;
+ return false;
}
} else {
// yay, we can do fast binary comparison on entire scanlines
for( l=0; l < data->h; l++ )
if ( memcmp( i1.scanLine( l ), i2.scanLine( l ), 4*data->w ) )
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
/*!
- Returns TRUE if this image and image \a i have different contents;
- otherwise returns FALSE. The comparison can be slow, unless there
+ Returns true if this image and image \a i have different contents;
+ otherwise returns false. The comparison can be slow, unless there
is some obvious difference, such as different widths, in which
case the function will return quickly.
diff --git a/src/kernel/tqimage.h b/src/kernel/tqimage.h
index 605b3551c..41e8b717c 100644
--- a/src/kernel/tqimage.h
+++ b/src/kernel/tqimage.h
@@ -131,7 +131,7 @@ public:
void reset();
void fill( uint pixel );
- void invertPixels( bool invertAlpha = TRUE );
+ void invertPixels( bool invertAlpha = true );
TQImage convertDepth( int ) const;
#ifndef TQT_NO_IMAGE_TRUECOLOR
@@ -161,7 +161,7 @@ public:
TQImage createAlphaMask( int conversion_flags=0 ) const;
#endif
#ifndef TQT_NO_IMAGE_HEURISTIC_MASK
- TQImage createHeuristicMask( bool clipTight=TRUE ) const;
+ TQImage createHeuristicMask( bool clipTight=true ) const;
#endif
#ifndef TQT_NO_IMAGE_MIRROR
TQImage mirror() const;
diff --git a/src/kernel/tqimageformatplugin.cpp b/src/kernel/tqimageformatplugin.cpp
index ad9057d2c..c7da8581d 100644
--- a/src/kernel/tqimageformatplugin.cpp
+++ b/src/kernel/tqimageformatplugin.cpp
@@ -168,7 +168,7 @@ bool TQImageFormatPlugin::loadImage( const TQString &format, const TQString &fil
Q_UNUSED( format )
Q_UNUSED( filename )
Q_UNUSED( image )
- return FALSE;
+ return false;
}
/*! \internal
@@ -178,7 +178,7 @@ bool TQImageFormatPlugin::saveImage( const TQString &format, const TQString &fil
Q_UNUSED( format )
Q_UNUSED( filename )
Q_UNUSED( image )
- return FALSE;
+ return false;
}
#endif // TQT_NO_IMAGEFORMATPLUGIN
diff --git a/src/kernel/tqinputcontext.cpp b/src/kernel/tqinputcontext.cpp
index 7f0d5501d..913b0da5f 100644
--- a/src/kernel/tqinputcontext.cpp
+++ b/src/kernel/tqinputcontext.cpp
@@ -52,8 +52,8 @@ class TQInputContextPrivate
{
public:
TQInputContextPrivate()
- : holderWidget( 0 ), composingWidget( 0 ), hasFocus( FALSE ),
- isComposing( FALSE )
+ : holderWidget( 0 ), composingWidget( 0 ), hasFocus( false ),
+ isComposing( false )
#if !defined(TQT_NO_IM_PREEDIT_RELOCATION)
, preeditString( TQString::null ),
cursorPosition( -1 ), selLength ( 0 )
@@ -75,7 +75,7 @@ public:
}
void resetComposingState() {
- isComposing = FALSE;
+ isComposing = false;
#if !defined(TQT_NO_IM_PREEDIT_RELOCATION)
preeditString = TQString::null;
cursorPosition = -1;
@@ -265,7 +265,7 @@ public:
a text widget -> a non-text widget -> another text widget
To enable the preedit relocation feature, the input context class
- have to reimplement isPreeditRelocationEnabled() as returns TRUE.
+ have to reimplement isPreeditRelocationEnabled() as returns true.
The implementation requires that the preedit preservation is also
enabled since preedit relocation is a special case of the preedit
preservation. If the preedit relocation is disabled, the input
@@ -376,14 +376,14 @@ void TQInputContext::setFocusWidget( TQWidget *w )
d->composingWidget );
// invoke sendIMEventInternal() rather than sendIMEvent() to
// avoid altering the composing state
- if ( isPreeditRelocation == TRUE ) {
+ if ( isPreeditRelocation ) {
// clear preedit of previously focused text
// widget. preserved preedit may be exist even if
- // isPreeditRelocationEnabled() == FALSE.
+ // isPreeditRelocationEnabled() == false.
sendIMEventInternal( TQEvent::IMEnd );
}
d->composingWidget = w; // changes recipient of TQIMEvent
- if ( isPreeditRelocation == TRUE ) {
+ if ( isPreeditRelocation ) {
#if !defined(TQT_NO_IM_PREEDIT_RELOCATION)
if ( isPreeditRelocationEnabled() ) {
// copy preedit state to the widget that gaining focus
@@ -399,7 +399,7 @@ void TQInputContext::setFocusWidget( TQWidget *w )
}
}
}
- d->hasFocus = w ? TRUE : FALSE;
+ d->hasFocus = w;
}
@@ -413,14 +413,14 @@ void TQInputContext::releaseComposingWidget( TQWidget *w )
{
if ( d->composingWidget == w ) {
d->composingWidget = 0;
- d->hasFocus = FALSE;
+ d->hasFocus = false;
}
}
#endif // TQ_WS_X11
/*!
\internal
- This function can be reimplemented in a subclass as returning TRUE
+ This function can be reimplemented in a subclass as returning true
if you want making your input method enable the preedit
relocation. See the description for preedit relocation of
TQInputContext.
@@ -429,13 +429,13 @@ void TQInputContext::releaseComposingWidget( TQWidget *w )
*/
bool TQInputContext::isPreeditRelocationEnabled()
{
- return FALSE;
+ return false;
}
/*!
This function indicates whether IMStart event had been sent to the
text widget. It is ensured that an input context can send IMCompose
- or IMEnd event safely if this function returned TRUE.
+ or IMEnd event safely if this function returned true.
The state is automatically being tracked through sendIMEvent().
@@ -451,7 +451,7 @@ bool TQInputContext::isComposing() const
This function can be reimplemented in a subclass to filter input
events.
- Return TRUE if the \a event has been consumed. Otherwise, the
+ Return true if the \a event has been consumed. Otherwise, the
unfiltered \a event will be forwarded to widgets as ordinary
way. Although the input events have accept() and ignore()
methods, leave it untouched.
@@ -478,7 +478,7 @@ bool TQInputContext::isComposing() const
bool TQInputContext::filterEvent( const TQEvent *event )
{
Q_UNUSED(event);
- return FALSE;
+ return false;
}
@@ -602,7 +602,7 @@ void TQInputContext::sendIMEvent( TQEvent::Type type, const TQString &text,
if ( type == TQEvent::IMStart ) {
sendIMEventInternal( type, text, cursorPosition, selLength );
- d->isComposing = TRUE;
+ d->isComposing = true;
} else if ( type == TQEvent::IMEnd ) {
d->resetComposingState();
sendIMEventInternal( type, text, cursorPosition, selLength );
diff --git a/src/kernel/tqinputcontext_x11.cpp b/src/kernel/tqinputcontext_x11.cpp
index 70fa9f160..227a016f3 100644
--- a/src/kernel/tqinputcontext_x11.cpp
+++ b/src/kernel/tqinputcontext_x11.cpp
@@ -55,7 +55,7 @@
other input methods may use this to implement some special
features such as distinguishing Shift_L and Shift_R.
- Return TRUE if the \a event has been consumed. Otherwise, the
+ Return true if the \a event has been consumed. Otherwise, the
unfiltered \a event will be translated into TQEvent and forwarded
to filterEvent(). Filtering at both x11FilterEvent() and
filterEvent() in single input method is allowed.
@@ -69,7 +69,7 @@ bool TQInputContext::x11FilterEvent( TQWidget *keywidget, XEvent *event )
{
Q_UNUSED(keywidget);
Q_UNUSED(event);
- return FALSE;
+ return false;
}
#endif //Q_NO_IM
diff --git a/src/kernel/tqinternal.cpp b/src/kernel/tqinternal.cpp
index 11243d1d2..98524dfdd 100644
--- a/src/kernel/tqinternal.cpp
+++ b/src/kernel/tqinternal.cpp
@@ -56,9 +56,9 @@ static TQSharedDoubleBuffer* qdb_owner = 0;
TQCleanupHandler<TQPixmap> qdb_pixmap_cleanup;
#ifdef TQ_WS_MACX
-bool TQSharedDoubleBuffer::dblbufr = FALSE;
+bool TQSharedDoubleBuffer::dblbufr = false;
#else
-bool TQSharedDoubleBuffer::dblbufr = TRUE;
+bool TQSharedDoubleBuffer::dblbufr = true;
#endif
@@ -174,7 +174,7 @@ void TQSharedDoubleBufferCleaner::doCleanup( void )
bool TQSharedDoubleBufferCleaner::event( TQEvent *e )
{
if ( e->type() != TQEvent::Timer )
- return FALSE;
+ return false;
TQTimerEvent *event = (TQTimerEvent *) e;
if ( event->timerId() == timer_id ) {
@@ -184,11 +184,11 @@ bool TQSharedDoubleBufferCleaner::event( TQEvent *e )
#ifdef QT_CHECK_STATE
else {
tqWarning( "TQSharedDoubleBufferCleaner::event: invalid timer event received." );
- return FALSE;
+ return false;
}
#endif // QT_CHECK_STATE
- return TRUE;
+ return true;
}
// static instance
@@ -338,7 +338,7 @@ bool TQSharedDoubleBuffer::begin( TQPainter* painter, int x, int y, int w, int h
tqWarning( "TQSharedDoubleBuffer::begin: Buffer is already active."
"\n\tYou must end() the buffer before a second begin()" );
#endif // QT_CHECK_STATE
- return FALSE;
+ return false;
}
external_p = painter;
@@ -372,7 +372,7 @@ bool TQSharedDoubleBuffer::begin( TQPainter* painter, int x, int y, int w, int h
p = external_p;
}
- return TRUE;
+ return true;
}
/* \internal
@@ -393,7 +393,7 @@ bool TQSharedDoubleBuffer::begin( TQWidget* widget, int x, int y, int w, int h )
tqWarning( "TQSharedDoubleBuffer::begin: Buffer is already active."
"\n\tYou must end() the buffer before a second begin()" );
#endif // QT_CHECK_STATE
- return FALSE;
+ return false;
}
state = Active;
@@ -433,7 +433,7 @@ bool TQSharedDoubleBuffer::begin( TQWidget* widget, int x, int y, int w, int h )
wid->erase( rx, ry, rw, rh );
}
}
- return TRUE;
+ return true;
}
/* \internal
@@ -450,7 +450,7 @@ bool TQSharedDoubleBuffer::end()
tqWarning( "TQSharedDoubleBuffer::end: Buffer is not active."
"\n\tYou must call begin() before calling end()." );
#endif // QT_CHECK_STATE
- return FALSE;
+ return false;
}
if ( ! ( state & ExternalPainter ) ) {
@@ -472,7 +472,7 @@ bool TQSharedDoubleBuffer::end()
p = external_p = 0;
pix = 0;
- return TRUE;
+ return true;
}
/* \internal
@@ -598,13 +598,13 @@ void TQSharedDoubleBuffer::releasePixmap()
/* \internal
\fn bool TQSharedDoubleBuffer::isDisabled()
- Returns TRUE if double buffering is disabled globally, FALSE otherwise.
+ Returns true if double buffering is disabled globally, false otherwise.
*/
/* \internal
\fn void TQSharedDoubleBuffer::setDisabled( bool off )
- Disables global double buffering \a off is TRUE, otherwise global
+ Disables global double buffering \a off is true, otherwise global
double buffering is enabled.
*/
@@ -644,13 +644,13 @@ void TQSharedDoubleBuffer::cleanup()
/* \internal
\fn bool TQSharedDoubleBuffer::isActive() const
- Returns TRUE if double buffered painting is active, FALSE otherwise.
+ Returns true if double buffered painting is active, false otherwise.
*/
/* \internal
\fn bool TQSharedDoubleBuffer::isBuffered() const
- Returns TRUE if painting is double buffered, FALSE otherwise.
+ Returns true if painting is double buffered, false otherwise.
*/
@@ -666,7 +666,7 @@ void TQSharedDoubleBuffer::cleanup()
TQMembuf::TQMembuf() : _size(0), _index(0)
{
buf = new TQPtrList<TQByteArray>;
- buf->setAutoDelete( TRUE );
+ buf->setAutoDelete( true );
}
TQMembuf::~TQMembuf()
@@ -682,7 +682,7 @@ TQMembuf::~TQMembuf()
bool TQMembuf::consumeBytes( TQ_ULONG nbytes, char *sink )
{
if ( nbytes <= 0 || nbytes > _size )
- return FALSE;
+ return false;
_size -= nbytes;
for ( ;; ) {
TQByteArray *a = buf->first();
@@ -706,20 +706,20 @@ bool TQMembuf::consumeBytes( TQ_ULONG nbytes, char *sink )
break;
}
}
- return TRUE;
+ return true;
}
/*! \internal
Scans for any occurrence of '\n' in the buffer. If \a store
is not 0 the text up to the first '\n' (or terminating 0) is
written to \a store, and a terminating 0 is appended to \a store
- if necessary. Returns TRUE if a '\n' was found; otherwise returns
- FALSE.
+ if necessary. Returns true if a '\n' was found; otherwise returns
+ false.
*/
bool TQMembuf::scanNewline( TQByteArray *store )
{
if ( _size == 0 )
- return FALSE;
+ return false;
int i = 0; // index into 'store'
TQByteArray *a = 0;
char *p;
@@ -728,13 +728,13 @@ bool TQMembuf::scanNewline( TQByteArray *store )
if ( !a ) {
a = buf->first();
if ( !a || a->size() == 0 )
- return FALSE;
+ return false;
p = a->data() + _index;
n = a->size() - _index;
} else {
a = buf->next();
if ( !a || a->size() == 0 )
- return FALSE;
+ return false;
p = a->data();
n = a->size();
}
@@ -747,11 +747,11 @@ bool TQMembuf::scanNewline( TQByteArray *store )
switch ( *p ) {
case '\0':
store->resize( i );
- return FALSE;
+ return false;
case '\n':
*(store->data()+i) = '\0';
store->resize( i );
- return TRUE;
+ return true;
}
p++;
}
@@ -759,9 +759,9 @@ bool TQMembuf::scanNewline( TQByteArray *store )
while ( n-- > 0 ) {
switch ( *p++ ) {
case '\0':
- return FALSE;
+ return false;
case '\n':
- return TRUE;
+ return true;
}
}
}
diff --git a/src/kernel/tqjpegio.cpp b/src/kernel/tqjpegio.cpp
index f76aad44d..ec7b892ab 100644
--- a/src/kernel/tqjpegio.cpp
+++ b/src/kernel/tqjpegio.cpp
@@ -124,7 +124,7 @@ boolean qt_fill_input_buffer(j_decompress_ptr cinfo)
#if defined(Q_OS_UNIXWARE)
return B_TRUE;
#else
- return TRUE;
+ return true;
#endif
}
@@ -143,7 +143,7 @@ void qt_skip_input_data(j_decompress_ptr cinfo, long num_bytes)
while (num_bytes > (long) src->bytes_in_buffer) {
num_bytes -= (long) src->bytes_in_buffer;
(void) qt_fill_input_buffer(cinfo);
- /* note we assume that qt_fill_input_buffer will never return FALSE,
+ /* note we assume that qt_fill_input_buffer will never return false,
* so suspension need not be handled.
*/
}
@@ -210,7 +210,7 @@ void read_jpeg_image(TQImageIO* iio)
#if defined(Q_OS_UNIXWARE)
(void) jpeg_read_header(&cinfo, B_TRUE);
#else
- (void) jpeg_read_header(&cinfo, TRUE);
+ (void) jpeg_read_header(&cinfo, true);
#endif
(void) jpeg_start_decompress(&cinfo);
@@ -253,7 +253,7 @@ void read_jpeg_image(TQImageIO* iio)
scaleSize( sWidth, sHeight, cinfo.output_width, cinfo.output_height, sMode );
// tqDebug( "Scaling the jpeg to %i x %i", sWidth, sHeight, sModeStr );
- bool created = FALSE;
+ bool created = false;
if ( cinfo.output_components == 3 || cinfo.output_components == 4) {
created = image.create( sWidth, sHeight, 32 );
} else if ( cinfo.output_components == 1 ) {
@@ -302,7 +302,7 @@ void read_jpeg_image(TQImageIO* iio)
} else {
- bool created = FALSE;
+ bool created = false;
if ( cinfo.output_components == 3 || cinfo.output_components == 4) {
created = image.create( cinfo.output_width, cinfo.output_height, 32 );
} else if ( cinfo.output_components == 1 ) {
@@ -402,7 +402,7 @@ boolean qt_empty_output_buffer(j_compress_ptr cinfo)
#if defined(Q_OS_UNIXWARE)
return B_TRUE;
#else
- return TRUE;
+ return true;
#endif
}
@@ -463,12 +463,12 @@ void write_jpeg_image(TQImageIO* iio)
cinfo.image_height = image.height();
TQRgb* cmap=0;
- bool gray=FALSE;
+ bool gray=false;
switch ( image.depth() ) {
case 1:
case 8:
cmap = image.colorTable();
- gray = TRUE;
+ gray = true;
int i;
for (i=image.numColors(); gray && i--; ) {
gray = gray & ( tqRed(cmap[i]) == tqGreen(cmap[i]) &&
@@ -503,8 +503,8 @@ void write_jpeg_image(TQImageIO* iio)
jpeg_set_quality(&cinfo, quality, B_TRUE /* limit to baseline-JPEG values */);
jpeg_start_compress(&cinfo, B_TRUE);
#else
- jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */);
- jpeg_start_compress(&cinfo, TRUE);
+ jpeg_set_quality(&cinfo, quality, true /* limit to baseline-JPEG values */);
+ jpeg_start_compress(&cinfo, true);
#endif
row_pointer[0] = new uchar[cinfo.image_width*cinfo.input_components];
diff --git a/src/kernel/tqkeysequence.cpp b/src/kernel/tqkeysequence.cpp
index 659057784..007bf83be 100644
--- a/src/kernel/tqkeysequence.cpp
+++ b/src/kernel/tqkeysequence.cpp
@@ -337,8 +337,8 @@ uint TQKeySequence::count() const
/*!
- Returns TRUE if the key sequence is empty; otherwise returns
- FALSE.
+ Returns true if the key sequence is empty; otherwise returns
+ false.
*/
bool TQKeySequence::isEmpty() const
{
@@ -422,7 +422,7 @@ int TQKeySequence::decodeString( const TQString& str )
if ( sl.contains( (*it).name ) ) {
ret |= (*it).qt_key;
#ifndef TQT_NO_REGEXP
- accel.remove( TQRegExp(TQRegExp::escape((*it).name), FALSE) );
+ accel.remove( TQRegExp(TQRegExp::escape((*it).name), false) );
#else
accel.remove( (*it).name );
#endif
@@ -448,13 +448,13 @@ int TQKeySequence::decodeString( const TQString& str )
} else {
// Check through translation table for the correct key name
// ...or fall back on english table.
- bool found = FALSE;
+ bool found = false;
for ( int tran = 0; tran < 2; tran++ ) {
for ( int i = 0; keyname[i].name; i++ ) {
if ( tran ? accel == TQAccel::tr(keyname[i].name)
: accel == keyname[i].name ) {
ret |= keyname[i].key;
- found = TRUE;
+ found = true;
break;
}
}
@@ -648,8 +648,8 @@ TQKeySequence &TQKeySequence::operator=( const TQKeySequence & keysequence )
/*!
- Returns TRUE if \a keysequence is equal to this key
- sequence; otherwise returns FALSE.
+ Returns true if \a keysequence is equal to this key
+ sequence; otherwise returns false.
*/
@@ -663,8 +663,8 @@ bool TQKeySequence::operator==( const TQKeySequence& keysequence ) const
/*!
- Returns TRUE if \a keysequence is not equal to this key sequence;
- otherwise returns FALSE.
+ Returns true if \a keysequence is not equal to this key sequence;
+ otherwise returns false.
*/
bool TQKeySequence::operator!= ( const TQKeySequence& keysequence ) const
{
diff --git a/src/kernel/tqlayout.cpp b/src/kernel/tqlayout.cpp
index 814f1565b..02e35d49c 100644
--- a/src/kernel/tqlayout.cpp
+++ b/src/kernel/tqlayout.cpp
@@ -148,7 +148,7 @@ public:
inline void setReversed( bool r, bool c ) { hReversed = c; vReversed = r; }
inline bool horReversed() const { return hReversed; }
inline bool verReversed() const { return vReversed; }
- inline void setDirty() { needRecalc = TRUE; hfw_width = -1; }
+ inline void setDirty() { needRecalc = true; hfw_width = -1; }
inline bool isDirty() const { return needRecalc; }
bool hasHeightForWidth( int space );
int heightForWidth( int, int, int );
@@ -167,7 +167,7 @@ private:
void addHfwData ( TQGridBox *box, int width );
void init();
TQSize findSize( TQCOORD TQLayoutStruct::*, int ) const;
- void addData( TQGridBox *b, bool r = TRUE, bool c = TRUE );
+ void addData( TQGridBox *b, bool r = true, bool c = true );
void setSize( int rows, int cols );
void setupLayoutData( int space );
void setupHfwLayoutData( int space );
@@ -210,11 +210,11 @@ TQGridLayoutData::TQGridLayoutData( int nRows, int nCols )
init();
if ( nRows < 0 ) {
nRows = 1;
- addVertical = FALSE;
+ addVertical = false;
}
if ( nCols < 0 ) {
nCols = 1;
- addVertical = TRUE;
+ addVertical = true;
}
setSize( nRows, nCols );
}
@@ -230,15 +230,15 @@ TQGridLayoutData::~TQGridLayoutData()
void TQGridLayoutData::init()
{
- addVertical = FALSE;
+ addVertical = false;
setDirty();
multi = 0;
rr = cc = 0;
nextR = nextC = 0;
hfwData = 0;
- things.setAutoDelete( TRUE );
- hReversed = FALSE;
- vReversed = FALSE;
+ things.setAutoDelete( true );
+ hReversed = false;
+ vReversed = false;
}
bool TQGridLayoutData::hasHeightForWidth( int spacing )
@@ -310,7 +310,7 @@ bool TQGridLayoutData::findWidget( TQWidget* w, int *row, int *col )
*row = box->row;
if ( col )
*col = box->col;
- return TRUE;
+ return true;
}
}
if ( multi ) {
@@ -324,12 +324,12 @@ bool TQGridLayoutData::findWidget( TQWidget* w, int *row, int *col )
*row = box->row;
if ( col )
*col = box->col;
- return TRUE;
+ return true;
}
}
}
- return FALSE;
+ return false;
}
TQSize TQGridLayoutData::findSize( TQCOORD TQLayoutStruct::*size, int spacer ) const
@@ -482,7 +482,7 @@ void TQGridLayoutData::add( TQGridBox *box, int row1, int row2, int col1,
TQGridMultiBox *mbox = new TQGridMultiBox( box, row2, col2 );
if ( !multi ) {
multi = new TQPtrList<TQGridMultiBox>;
- multi->setAutoDelete( TRUE );
+ multi->setAutoDelete( true );
}
multi->append( mbox );
setDirty();
@@ -543,9 +543,9 @@ void TQGridLayoutData::addData( TQGridBox *box, bool r, bool c )
// Empty boxes (i.e. spacers) do not get borders. This is
// hacky, but compatible.
if ( c )
- colData[box->col].empty = FALSE;
+ colData[box->col].empty = false;
if ( r )
- rowData[box->row].empty = FALSE;
+ rowData[box->row].empty = false;
}
}
@@ -562,7 +562,7 @@ static void distributeMultiBox( TQMemArray<TQLayoutStruct> &chain, int spacing,
w += chain[i].minimumSize;
wh += chain[i].sizeHint;
max += chain[i].maximumSize;
- chain[i].empty = FALSE;
+ chain[i].empty = false;
if ( stretchArray[i] == 0 )
chain[i].stretch = TQMAX(chain[i].stretch,stretch);
}
@@ -616,7 +616,7 @@ void TQGridLayoutData::setupLayoutData( int spacing )
if ( !needRecalc )
return;
#endif
- has_hfw = FALSE;
+ has_hfw = false;
int i;
for ( i = 0; i < rr; i++ )
@@ -650,17 +650,17 @@ void TQGridLayoutData::setupLayoutData( int spacing )
TQSize hint = box->sizeHint();
TQSize min = box->minimumSize();
if ( box->hasHeightForWidth() )
- has_hfw = TRUE;
+ has_hfw = true;
if ( r1 == r2 ) {
- addData( box, TRUE, FALSE );
+ addData( box, true, false );
} else {
distributeMultiBox( rowData, spacing, r1, r2,
min.height(), hint.height(),
rStretch, box->vStretch() );
}
if ( c1 == c2 ) {
- addData( box, FALSE, TRUE );
+ addData( box, false, true );
} else {
distributeMultiBox( colData, spacing, c1, c2,
min.width(), hint.width(),
@@ -673,7 +673,7 @@ void TQGridLayoutData::setupLayoutData( int spacing )
for ( i = 0; i < cc; i++ )
colData[i].expansive = colData[i].expansive || colData[i].stretch > 0;
- needRecalc = FALSE;
+ needRecalc = false;
}
void TQGridLayoutData::addHfwData( TQGridBox *box, int width )
@@ -849,7 +849,7 @@ public:
TQLayoutItem *next() {
idx++;
if ( !multi && idx >= (int)data->things.count() ) {
- multi = TRUE;
+ multi = true;
idx = 0;
}
return current();
@@ -1076,8 +1076,8 @@ TQSize TQGridLayout::maximumSize() const
}
/*!
- Returns TRUE if this layout's preferred height depends on its
- width; otherwise returns FALSE.
+ Returns true if this layout's preferred height depends on its
+ width; otherwise returns false.
*/
bool TQGridLayout::hasHeightForWidth() const
{
@@ -1103,7 +1103,7 @@ int TQGridLayout::minimumHeightForWidth( int w ) const
/*!
Searches for widget \a w in this layout (not including child
layouts). If \a w is found, it sets \c \a row and \c \a col to
- the row and column and returns TRUE; otherwise returns FALSE.
+ the row and column and returns true; otherwise returns false.
Note: if a widget spans multiple rows/columns, the top-left cell
is returned.
@@ -1157,7 +1157,7 @@ void TQGridLayout::expand( int nRows, int nCols )
*/
void TQGridLayout::init( int nRows, int nCols )
{
- setSupportsMargin( TRUE );
+ setSupportsMargin( true );
data = new TQGridLayoutData( nRows, nCols );
}
@@ -1209,8 +1209,8 @@ void TQGridLayout::addMultiCell( TQLayoutItem *item, int fromRow, int toRow,
}
/*
- Returns TRUE if the widget \a w can be added to the layout \a l;
- otherwise returns FALSE.
+ Returns true if the widget \a w can be added to the layout \a l;
+ otherwise returns false.
*/
static bool checkWidget( TQLayout *l, TQWidget *w )
{
@@ -1219,7 +1219,7 @@ static bool checkWidget( TQLayout *l, TQWidget *w )
tqWarning( "TQLayout: Cannot add null widget to %s/%s", l->className(),
l->name() );
#endif
- return FALSE;
+ return false;
}
if ( w->parentWidget() != l->mainWidget() && l->mainWidget() ) {
#if defined(QT_CHECK_STATE)
@@ -1233,9 +1233,9 @@ static bool checkWidget( TQLayout *l, TQWidget *w )
" %s/%s", w->className(), w->name(),
l->mainWidget()->className(), l->mainWidget()->name() );
#endif
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
/*!
@@ -1516,7 +1516,7 @@ TQLayoutIterator TQGridLayout::iterator()
struct TQBoxLayoutItem
{
TQBoxLayoutItem( TQLayoutItem *it, int stretch_ = 0 )
- : item( it ), stretch( stretch_ ), magic( FALSE ) { }
+ : item( it ), stretch( stretch_ ), magic( false ) { }
~TQBoxLayoutItem() { delete item; }
int hfw( int w ) {
@@ -1556,8 +1556,8 @@ struct TQBoxLayoutItem
class TQBoxLayoutData
{
public:
- TQBoxLayoutData() : geomArray( 0 ), hfwWidth( -1 ), dirty( TRUE )
- { list.setAutoDelete( TRUE ); }
+ TQBoxLayoutData() : geomArray( 0 ), hfwWidth( -1 ), dirty( true )
+ { list.setAutoDelete( true ); }
~TQBoxLayoutData() { delete geomArray; }
void setDirty() {
@@ -1565,7 +1565,7 @@ public:
geomArray = 0;
hfwWidth = -1;
hfwHeight = -1;
- dirty = TRUE;
+ dirty = true;
}
TQPtrList<TQBoxLayoutItem> list;
@@ -1732,7 +1732,7 @@ TQBoxLayout::TQBoxLayout( TQWidget *parent, Direction d,
{
data = new TQBoxLayoutData;
dir = d;
- setSupportsMargin( TRUE );
+ setSupportsMargin( true );
}
/*!
@@ -1749,7 +1749,7 @@ TQBoxLayout::TQBoxLayout( TQLayout *parentLayout, Direction d, int spacing,
{
data = new TQBoxLayoutData;
dir = d;
- setSupportsMargin( TRUE );
+ setSupportsMargin( true );
}
/*!
@@ -1765,7 +1765,7 @@ TQBoxLayout::TQBoxLayout( Direction d, int spacing, const char *name )
{
data = new TQBoxLayoutData;
dir = d;
- setSupportsMargin( TRUE );
+ setSupportsMargin( true );
}
/*!
@@ -1821,8 +1821,8 @@ TQSize TQBoxLayout::maximumSize() const
}
/*!
- Returns TRUE if this layout's preferred height depends on its width;
- otherwise returns FALSE.
+ Returns true if this layout's preferred height depends on its width;
+ otherwise returns false.
*/
bool TQBoxLayout::hasHeightForWidth() const
{
@@ -2001,7 +2001,7 @@ void TQBoxLayout::insertSpacing( int index, int size )
TQSizePolicy::Fixed );
TQBoxLayoutItem *it = new TQBoxLayoutItem( b );
- it->magic = TRUE;
+ it->magic = true;
data->list.insert( index, it );
invalidate();
}
@@ -2028,7 +2028,7 @@ void TQBoxLayout::insertStretch( int index, int stretch )
TQSizePolicy::Expanding );
TQBoxLayoutItem *it = new TQBoxLayoutItem( b, stretch );
- it->magic = TRUE;
+ it->magic = true;
data->list.insert( index, it );
invalidate();
}
@@ -2179,7 +2179,7 @@ void TQBoxLayout::addStrut( int size )
TQSizePolicy::Fixed );
TQBoxLayoutItem *it = new TQBoxLayoutItem( b );
- it->magic = TRUE;
+ it->magic = true;
data->list.append( it );
invalidate();
}
@@ -2202,8 +2202,8 @@ int TQBoxLayout::findWidget( TQWidget* w )
/*!
Sets the stretch factor for widget \a w to \a stretch and returns
- TRUE if \a w is found in this layout (not including child
- layouts); otherwise returns FALSE.
+ true if \a w is found in this layout (not including child
+ layouts); otherwise returns false.
*/
bool TQBoxLayout::setStretchFactor( TQWidget *w, int stretch )
{
@@ -2214,18 +2214,18 @@ bool TQBoxLayout::setStretchFactor( TQWidget *w, int stretch )
if ( box->item->widget() == w ) {
box->stretch = stretch;
invalidate();
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
/*!
\overload
Sets the stretch factor for the layout \a l to \a stretch and
- returns TRUE if \a l is found in this layout (not including child
- layouts); otherwise returns FALSE.
+ returns true if \a l is found in this layout (not including child
+ layouts); otherwise returns false.
*/
bool TQBoxLayout::setStretchFactor( TQLayout *l, int stretch )
{
@@ -2236,10 +2236,10 @@ bool TQBoxLayout::setStretchFactor( TQLayout *l, int stretch )
if ( box->item->layout() == l ) {
box->stretch = stretch;
invalidate();
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
/*!
@@ -2306,17 +2306,17 @@ void TQBoxLayout::setupGeom()
int hintw = 0;
int hinth = 0;
- bool horexp = FALSE;
- bool verexp = FALSE;
+ bool horexp = false;
+ bool verexp = false;
- data->hasHfw = FALSE;
+ data->hasHfw = false;
delete data->geomArray;
int n = data->list.count();
data->geomArray = new TQMemArray<TQLayoutStruct>( n );
TQMemArray<TQLayoutStruct>& a = *data->geomArray;
- bool first = TRUE;
+ bool first = true;
for ( int i = 0; i < n; i++ ) {
TQBoxLayoutItem *box = data->list.at( i );
TQSize max = box->item->maximumSize();
@@ -2380,7 +2380,7 @@ void TQBoxLayout::setupGeom()
.expandedTo( data->minSize )
.boundedTo( data->maxSize );
- data->dirty = FALSE;
+ data->dirty = false;
}
/*
@@ -2403,7 +2403,7 @@ void TQBoxLayout::calcHfw( int w )
} else {
TQPtrListIterator<TQBoxLayoutItem> it( data->list );
TQBoxLayoutItem *box;
- bool first = TRUE;
+ bool first = true;
while ( (box = it.current()) != 0 ) {
++it;
bool empty = box->item->isEmpty();
@@ -2444,7 +2444,7 @@ void TQBoxLayout::calcHfw( int w )
The simplest use of the class is like this:
\code
TQBoxLayout * l = new TQHBoxLayout( widget );
- l->setAutoAdd( TRUE );
+ l->setAutoAdd( true );
new TQSomeWidget( widget );
new TQSomeOtherWidget( widget );
new TQAnotherWidget( widget );
diff --git a/src/kernel/tqlayoutengine.cpp b/src/kernel/tqlayoutengine.cpp
index 9eee672e6..131e64d4b 100644
--- a/src/kernel/tqlayoutengine.cpp
+++ b/src/kernel/tqlayoutengine.cpp
@@ -73,12 +73,12 @@ TQ_EXPORT void qGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int coun
int sumStretch = 0;
int spacerCount = 0;
- bool wannaGrow = FALSE; // anyone who really wants to grow?
- // bool canShrink = FALSE; // anyone who could be persuaded to shrink?
+ bool wannaGrow = false; // anyone who really wants to grow?
+ // bool canShrink = false; // anyone who could be persuaded to shrink?
int i;
for ( i = start; i < start + count; i++ ) {
- chain[i].done = FALSE;
+ chain[i].done = false;
cHint += chain[i].smartSizeHint();
cMin += chain[i].minimumSize;
cMax += chain[i].maximumSize;
@@ -94,7 +94,7 @@ TQ_EXPORT void qGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int coun
if ( space < cMin + spacerCount * spacer ) {
for ( i = start; i < start+count; i++ ) {
chain[i].size = chain[i].minimumSize;
- chain[i].done = TRUE;
+ chain[i].done = true;
}
} else if ( space < cHint + spacerCount*spacer ) {
/*
@@ -112,7 +112,7 @@ TQ_EXPORT void qGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int coun
if ( !chain[i].done
&& chain[i].minimumSize >= chain[i].smartSizeHint() ) {
chain[i].size = chain[i].smartSizeHint();
- chain[i].done = TRUE;
+ chain[i].done = true;
space_left -= chain[i].smartSizeHint();
// sumStretch -= chain[i].stretch;
n--;
@@ -120,7 +120,7 @@ TQ_EXPORT void qGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int coun
}
bool finished = n == 0;
while ( !finished ) {
- finished = TRUE;
+ finished = true;
fixed fp_over = toFixed( overdraft );
fixed fp_w = 0;
@@ -135,9 +135,9 @@ TQ_EXPORT void qGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int coun
chain[i].size = chain[i].smartSizeHint() - w;
fp_w -= toFixed( w ); // give the difference to the next
if ( chain[i].size < chain[i].minimumSize ) {
- chain[i].done = TRUE;
+ chain[i].done = true;
chain[i].size = chain[i].minimumSize;
- finished = FALSE;
+ finished = false;
overdraft -= ( chain[i].smartSizeHint()
- chain[i].minimumSize );
// sumStretch -= chain[i].stretch;
@@ -155,7 +155,7 @@ TQ_EXPORT void qGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int coun
&& (chain[i].maximumSize <= chain[i].smartSizeHint()
|| (wannaGrow && !chain[i].expansive && chain[i].stretch == 0)) ) {
chain[i].size = chain[i].smartSizeHint();
- chain[i].done = TRUE;
+ chain[i].done = true;
space_left -= chain[i].smartSizeHint();
sumStretch -= chain[i].stretch;
n--;
@@ -201,7 +201,7 @@ TQ_EXPORT void qGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int coun
if ( !chain[i].done &&
chain[i].size < chain[i].smartSizeHint() ) {
chain[i].size = chain[i].smartSizeHint();
- chain[i].done = TRUE;
+ chain[i].done = true;
space_left -= chain[i].smartSizeHint();
sumStretch -= chain[i].stretch;
n--;
@@ -214,7 +214,7 @@ TQ_EXPORT void qGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int coun
if ( !chain[i].done &&
chain[i].size > chain[i].maximumSize ) {
chain[i].size = chain[i].maximumSize;
- chain[i].done = TRUE;
+ chain[i].done = true;
space_left -= chain[i].maximumSize;
sumStretch -= chain[i].stretch;
n--;
diff --git a/src/kernel/tqlayoutengine_p.h b/src/kernel/tqlayoutengine_p.h
index efb1295e8..eee74de79 100644
--- a/src/kernel/tqlayoutengine_p.h
+++ b/src/kernel/tqlayoutengine_p.h
@@ -67,8 +67,8 @@ struct TQLayoutStruct
stretch = stretchFactor;
minimumSize = sizeHint = spacing;
maximumSize = TQLAYOUTSIZE_MAX;
- expansive = FALSE;
- empty = TRUE;
+ expansive = false;
+ empty = true;
}
TQCOORD smartSizeHint() {
diff --git a/src/kernel/tqlocalfs.cpp b/src/kernel/tqlocalfs.cpp
index 69e2eba72..d4d14065a 100644
--- a/src/kernel/tqlocalfs.cpp
+++ b/src/kernel/tqlocalfs.cpp
@@ -128,7 +128,7 @@ void TQLocalFs::operationListChildren( TQNetworkOperation *op )
dir = TQDir( url()->path() );
dir.setNameFilter( url()->nameFilter() );
- dir.setMatchAllDirs( TRUE );
+ dir.setMatchAllDirs( true );
if ( !dir.isReadable() ) {
TQString msg = tr( "Could not read directory\n%1" ).arg( url()->path() );
op->setState( StFailed );
@@ -206,14 +206,14 @@ void TQLocalFs::operationRemove( TQNetworkOperation *op )
#endif
op->setState( StInProgress );
TQString name = TQUrl( op->arg( 0 ) ).path();
- bool deleted = FALSE;
+ bool deleted = false;
dir = TQDir( url()->path() );
TQFileInfo fi( dir, name );
if ( fi.isDir() ) {
if ( dir.rmdir( name ) )
- deleted = TRUE;
+ deleted = true;
}
if ( deleted || dir.remove( name ) ) {
diff --git a/src/kernel/tqmetaobject.cpp b/src/kernel/tqmetaobject.cpp
index 4e5686295..4464f716d 100644
--- a/src/kernel/tqmetaobject.cpp
+++ b/src/kernel/tqmetaobject.cpp
@@ -173,7 +173,7 @@ typedef const TQMetaData TQConstMetaData;
class TQ_EXPORT TQMemberDict : public TQAsciiDict<TQConstMetaData>
{
public:
- TQMemberDict( int size = 17, bool cs = TRUE, bool ck = TRUE ) :
+ TQMemberDict( int size = 17, bool cs = true, bool ck = true ) :
TQAsciiDict<TQConstMetaData>(size,cs,ck) {}
TQMemberDict( const TQMemberDict &dict ) : TQAsciiDict<TQConstMetaData>(dict) {}
~TQMemberDict() { clear(); }
@@ -325,7 +325,7 @@ TQMetaObject::~TQMetaObject()
/*!
Returns the number of slots for this class.
- If \a super is TRUE, inherited slots are included.
+ If \a super is true, inherited slots are included.
\sa slotNames()
*/
@@ -340,7 +340,7 @@ int TQMetaObject::numSlots( bool super ) const // number of slots
/*!
Returns the number of signals for this class.
- If \a super is TRUE, inherited signals are included.
+ If \a super is true, inherited signals are included.
\sa signalNames()
*/
@@ -358,7 +358,7 @@ int TQMetaObject::numSignals( bool super ) const // number of signals
Returns the meta data of the slot with the name \a n or 0 if no
such slot exists.
- If \a super is TRUE, inherited slots are included.
+ If \a super is true, inherited slots are included.
*/
const TQMetaData* TQMetaObject::slot( int index, bool super ) const
{
@@ -376,7 +376,7 @@ const TQMetaData* TQMetaObject::slot( int index, bool super ) const
Returns the meta data of the signal with the name \a n or 0 if no
such signal exists.
- If \a super is TRUE, inherited signals are included.
+ If \a super is true, inherited signals are included.
*/
const TQMetaData* TQMetaObject::signal( int index, bool super ) const
{
@@ -411,7 +411,7 @@ const TQMetaData* TQMetaObject::signal( int index, bool super ) const
/*! \internal
Returns the index of the signal with name \n or -1 if no such signal exists.
- If \a super is TRUE, inherited signals are included.
+ If \a super is true, inherited signals are included.
*/
int TQMetaObject::findSignal( const char* n, bool super ) const
{
@@ -450,7 +450,7 @@ int TQMetaObject::findSignal( const char* n, bool super ) const
/*! \internal
Returns the index of the slot with name \n or -1 if no such slot exists.
- If \a super is TRUE, inherited slots are included.
+ If \a super is true, inherited slots are included.
*/
int TQMetaObject::findSlot( const char* n, bool super ) const
{
@@ -510,7 +510,7 @@ TQMemberDict *TQMetaObject::init( const TQMetaData * data, int n )
{
if ( n == 0 ) // nothing, then make no dict
return 0;
- TQMemberDict *dict = new TQMemberDict( optDictSize(n), TRUE, FALSE );
+ TQMemberDict *dict = new TQMemberDict( optDictSize(n), true, false );
TQ_CHECK_PTR( dict );
while ( n-- ) { // put all members into dict
dict->insert( data->name, data );
@@ -523,7 +523,7 @@ TQMemberDict *TQMetaObject::init( const TQMetaData * data, int n )
Returns the number of items of class information available for
this class.
- If \a super is TRUE, inherited class information is included.
+ If \a super is true, inherited class information is included.
*/
int TQMetaObject::numClassInfo( bool super ) const
{
@@ -534,7 +534,7 @@ int TQMetaObject::numClassInfo( bool super ) const
Returns the class information with index \a index or 0 if no such
information exists.
- If \a super is TRUE, inherited class information is included.
+ If \a super is true, inherited class information is included.
*/
const TQClassInfo* TQMetaObject::classInfo( int index, bool super ) const
{
@@ -552,7 +552,7 @@ const TQClassInfo* TQMetaObject::classInfo( int index, bool super ) const
Returns the class information with name \a name or 0 if no such
information exists.
- If \a super is TRUE, inherited class information is included.
+ If \a super is true, inherited class information is included.
*/
const char* TQMetaObject::classInfo( const char* name, bool super ) const
{
@@ -570,7 +570,7 @@ const char* TQMetaObject::classInfo( const char* name, bool super ) const
/*!
Returns the number of properties for this class.
- If \a super is TRUE, inherited properties are included.
+ If \a super is true, inherited properties are included.
\sa propertyNames()
*/
@@ -586,7 +586,7 @@ int TQMetaObject::numProperties( bool super ) const // number of signals
Returns the property meta data for the property at index \a index
or 0 if no such property exists.
- If \a super is TRUE, inherited properties are included.
+ If \a super is true, inherited properties are included.
\sa propertyNames()
*/
@@ -605,7 +605,7 @@ const TQMetaProperty* TQMetaObject::property( int index, bool super ) const
Returns the index for the property with name \a name or -1 if no
such property exists.
- If \a super is TRUE, inherited properties are included.
+ If \a super is true, inherited properties are included.
\sa property(), propertyNames()
*/
@@ -627,7 +627,7 @@ int TQMetaObject::findProperty( const char *name, bool super ) const
Returns the index for the property \a prop
or -1 if the property can not be found.
- If \a super is TRUE, inherited properties are included.
+ If \a super is true, inherited properties are included.
\sa property(), propertyNames()
*/
@@ -653,7 +653,7 @@ const TQMetaProperty* TQMetaObject::resolveProperty( const TQMetaProperty* p ) c
{
if ( !superclass )
return 0;
- return superclass->property( superclass->findProperty( p->n, TRUE ), TRUE );
+ return superclass->property( superclass->findProperty( p->n, true ), true );
}
/*!\internal
@@ -668,20 +668,20 @@ int TQMetaObject::resolveProperty( int index ) const
if ( !superclass )
return -1;
const TQMetaProperty* p = d->propData + ( index - propertyOffset() );
- return superclass->findProperty( p->n, TRUE );
+ return superclass->findProperty( p->n, true );
}
/*!
Returns a list with the names of all this class's properties.
- If \a super is TRUE, inherited properties are included.
+ If \a super is true, inherited properties are included.
\sa property()
*/
TQStrList TQMetaObject::propertyNames( bool super ) const
{
- TQStrList l( FALSE );
+ TQStrList l( false );
if ( superclass && super ) {
TQStrList sl = superclass->propertyNames( super );
@@ -700,11 +700,11 @@ TQStrList TQMetaObject::propertyNames( bool super ) const
/*!
Returns a list with the names of all this class's signals.
- If \a super is TRUE, inherited signals are included.
+ If \a super is true, inherited signals are included.
*/
TQStrList TQMetaObject::signalNames( bool super ) const
{
- TQStrList l( FALSE );
+ TQStrList l( false );
int n = numSignals( super );
for( int i = 0; i < n; ++i ) {
l.append( signal(i, super)->name );
@@ -715,13 +715,13 @@ TQStrList TQMetaObject::signalNames( bool super ) const
/*!
Returns a list with the names of all this class's slots.
- If \a super is TRUE, inherited slots are included.
+ If \a super is true, inherited slots are included.
\sa numSlots()
*/
TQStrList TQMetaObject::slotNames( bool super ) const
{
- TQStrList l( FALSE );
+ TQStrList l( false );
int n = numSlots( super );
for( int i = 0; i < n; ++i )
l.append( slot( i, super)->name );
@@ -745,7 +745,7 @@ int TQMetaObject::numEnumerators( bool super ) const
*/
TQStrList TQMetaObject::enumeratorNames( bool super ) const
{
- TQStrList l( FALSE );
+ TQStrList l( false );
if ( superclass && super ) {
TQStrList sl = superclass->enumeratorNames( super );
@@ -777,8 +777,8 @@ const TQMetaEnum* TQMetaObject::enumerator( const char* name, bool super ) const
/*!
- Returns TRUE if this class inherits \a clname within the meta
- object inheritance chain; otherwise returns FALSE.
+ Returns true if this class inherits \a clname within the meta
+ object inheritance chain; otherwise returns false.
(A class is considered to inherit itself.)
*/
@@ -787,10 +787,10 @@ bool TQMetaObject::inherits( const char* clname ) const
const TQMetaObject *meta = this;
while ( meta ) {
if ( qstrcmp(clname, meta->className()) == 0 )
- return TRUE;
+ return true;
meta = meta->superclass;
}
- return FALSE;
+ return false;
}
/*! \internal */
@@ -813,7 +813,7 @@ TQMetaObject *TQMetaObject::metaObject( const char *class_name )
bool TQMetaObject::hasMetaObject( const char *class_name )
{
if ( !qt_metaobjects )
- return FALSE;
+ return false;
#ifdef TQT_THREAD_SUPPORT
TQMutexLocker( tqt_global_mutexpool ?
tqt_global_mutexpool->get( &qt_metaobjects ) : 0 );
@@ -837,9 +837,9 @@ bool TQMetaObject::tqt_static_property( TQObject* o, int id, int f, TQVariant* v
return superclass->tqt_static_property( o, id, f, v );
switch ( f ) {
case 3: case 4: case 5:
- return TRUE;
+ return true;
default:
- return FALSE;
+ return false;
}
}
@@ -877,10 +877,10 @@ bool TQMetaObject::tqt_static_property( TQObject* o, int id, int f, TQVariant* v
*/
TQStrList TQMetaProperty::enumKeys() const
{
- TQStrList l( FALSE );
+ TQStrList l( false );
const TQMetaEnum* ed = enumData;
if ( !enumData && meta )
- ed = (*meta)->enumerator( t, TRUE );
+ ed = (*meta)->enumerator( t, true );
if ( !ed )
return l;
if ( ed != 0 ) {
@@ -907,7 +907,7 @@ int TQMetaProperty::keyToValue( const char* key ) const
{
const TQMetaEnum* ed = enumData;
if ( !enumData && meta )
- ed = (*meta)->enumerator( t, TRUE );
+ ed = (*meta)->enumerator( t, true );
if ( !ed )
return -1;
for ( uint i = 0; i < ed->count; ++i ) {
@@ -928,7 +928,7 @@ const char* TQMetaProperty::valueToKey( int value ) const
{
const TQMetaEnum* ed = enumData;
if ( !enumData && meta )
- ed = (*meta)->enumerator( t, TRUE );
+ ed = (*meta)->enumerator( t, true );
if ( !ed )
return 0;
for ( uint i = 0; i < ed->count; ++i ) {
@@ -948,7 +948,7 @@ int TQMetaProperty::keysToValue( const TQStrList& keys ) const
{
const TQMetaEnum* ed = enumData;
if ( !enumData && meta )
- ed = (*meta)->enumerator( t, TRUE );
+ ed = (*meta)->enumerator( t, true );
if ( !ed )
return -1;
int value = 0;
@@ -976,7 +976,7 @@ TQStrList TQMetaProperty::valueToKeys( int value ) const
TQStrList keys;
const TQMetaEnum* ed = enumData;
if ( !enumData && meta )
- ed = (*meta)->enumerator( t, TRUE );
+ ed = (*meta)->enumerator( t, true );
if ( !ed )
return keys;
@@ -997,7 +997,7 @@ bool TQMetaProperty::writable() const
return testFlags( Writable );
const TQMetaObject* mo = (*meta);
const TQMetaProperty* parent = mo->resolveProperty( this );
- return parent ? parent->writable() : FALSE;
+ return parent ? parent->writable() : false;
}
/*!\internal
@@ -1008,14 +1008,14 @@ bool TQMetaProperty::stdSet() const
return testFlags( StdSet );
const TQMetaObject* mo = (*meta);
const TQMetaProperty* parent = mo->resolveProperty( this );
- return parent ? parent->stdSet() : FALSE;
+ return parent ? parent->stdSet() : false;
}
/*!\internal
*/
int TQMetaProperty::id() const
{
- return _id < 0 ? (*meta)->indexOfProperty( this, TRUE ) : _id;
+ return _id < 0 ? (*meta)->indexOfProperty( this, true ) : _id;
}
/*! \internal
@@ -1032,21 +1032,21 @@ void TQMetaProperty::clear()
bool TQMetaProperty::isValid() const
{
if ( testFlags( UnresolvedEnum ) ) {
- if ( !enumData && (!meta || !(*meta)->enumerator( t, TRUE ) ) )
- return FALSE;
+ if ( !enumData && (!meta || !(*meta)->enumerator( t, true ) ) )
+ return false;
}
if ( !testFlags( Override ) || testFlags( Readable ) )
return testFlags( Readable );
const TQMetaObject* mo = (*meta);
const TQMetaProperty* parent = mo->resolveProperty( this );
- return parent ? parent->isValid() : FALSE;
+ return parent ? parent->isValid() : false;
}
bool TQMetaProperty::isSetType() const
{
const TQMetaEnum* ed = enumData;
if ( !enumData && meta )
- ed = (*meta)->enumerator( t, TRUE );
+ ed = (*meta)->enumerator( t, true );
return ( ed != 0 && ed->set );
}
@@ -1072,7 +1072,7 @@ bool TQMetaProperty::isEnumType() const
/*!
\fn bool TQMetaProperty::writable() const
- Returns TRUE if the property is writable; otherwise returns FALSE.
+ Returns true if the property is writable; otherwise returns false.
*/
@@ -1086,8 +1086,8 @@ bool TQMetaProperty::isEnumType() const
/*!
\fn bool TQMetaProperty::isEnumType() const
- Returns TRUE if the property's type is an enumeration value;
- otherwise returns FALSE.
+ Returns true if the property's type is an enumeration value;
+ otherwise returns false.
\sa isSetType(), enumKeys()
*/
@@ -1095,17 +1095,17 @@ bool TQMetaProperty::isEnumType() const
/*!
\fn bool TQMetaProperty::isSetType() const
- Returns TRUE if the property's type is an enumeration value that
+ Returns true if the property's type is an enumeration value that
is used as set, i.e. if the enumeration values can be OR-ed
- together; otherwise returns FALSE. A set type is implicitly also
+ together; otherwise returns false. A set type is implicitly also
an enum type.
\sa isEnumType(), enumKeys()
*/
-/*! Returns TRUE if the property is designable for object \a o;
- otherwise returns FALSE.
+/*! Returns true if the property is designable for object \a o;
+ otherwise returns false.
If no object \a o is given, the function returns a static
approximation.
@@ -1113,22 +1113,22 @@ bool TQMetaProperty::isEnumType() const
bool TQMetaProperty::designable( TQObject* o ) const
{
if ( !isValid() || !writable() )
- return FALSE;
+ return false;
if ( o ) {
- int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, TRUE );
+ int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, true );
return idx >= 0 && o->tqt_property( idx, 3, 0 );
}
if ( testFlags( DesignableOverride ) ) {
const TQMetaObject* mo = (*meta);
const TQMetaProperty* parent = mo->resolveProperty( this );
- return parent ? parent->designable() : FALSE;
+ return parent ? parent->designable() : false;
}
return !testFlags( NotDesignable );
}
/*!
- Returns TRUE if the property is scriptable for object \a o;
- otherwise returns FALSE.
+ Returns true if the property is scriptable for object \a o;
+ otherwise returns false.
If no object \a o is given, the function returns a static
approximation.
@@ -1136,20 +1136,20 @@ bool TQMetaProperty::designable( TQObject* o ) const
bool TQMetaProperty::scriptable( TQObject* o ) const
{
if ( o ) {
- int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, TRUE );
+ int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, true );
return idx >= 0 && o->tqt_property( idx, 4, 0 );
}
if ( testFlags( ScriptableOverride ) ) {
const TQMetaObject* mo = (*meta);
const TQMetaProperty* parent = mo->resolveProperty( this );
- return parent ? parent->scriptable() : FALSE;
+ return parent ? parent->scriptable() : false;
}
return !testFlags( NotScriptable );
}
/*!
- Returns TRUE if the property shall be stored for object \a o;
- otherwise returns FALSE.
+ Returns true if the property shall be stored for object \a o;
+ otherwise returns false.
If no object \a o is given, the function returns a static
approximation.
@@ -1157,15 +1157,15 @@ bool TQMetaProperty::scriptable( TQObject* o ) const
bool TQMetaProperty::stored( TQObject* o ) const
{
if ( !isValid() || !writable() )
- return FALSE;
+ return false;
if ( o ) {
- int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, TRUE );
+ int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, true );
return idx >= 0 && o->tqt_property( idx, 5, 0 );
}
if ( testFlags( StoredOverride ) ) {
const TQMetaObject* mo = (*meta);
const TQMetaProperty* parent = mo->resolveProperty( this );
- return parent ? parent->stored() : FALSE;
+ return parent ? parent->stored() : false;
}
return !testFlags( NotStored );
}
@@ -1173,7 +1173,7 @@ bool TQMetaProperty::stored( TQObject* o ) const
/*!
Tries to reset the property for object \a o with a reset method.
- On success, returns TRUE; otherwise returns FALSE.
+ On success, returns true; otherwise returns false.
Reset methods are optional, usually only a few properties support
them.
@@ -1181,8 +1181,8 @@ bool TQMetaProperty::stored( TQObject* o ) const
bool TQMetaProperty::reset( TQObject* o ) const
{
if ( !o )
- return FALSE;
- int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, TRUE );
+ return false;
+ int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, true );
if ( idx < 0 )
return 0;
return o->tqt_property( idx, 2, 0 );
diff --git a/src/kernel/tqmetaobject.h b/src/kernel/tqmetaobject.h
index 9db397f47..4bdeedab8 100644
--- a/src/kernel/tqmetaobject.h
+++ b/src/kernel/tqmetaobject.h
@@ -171,34 +171,34 @@ public:
bool inherits( const char* clname ) const;
- int numSlots( bool super = FALSE ) const;
- int numSignals( bool super = FALSE ) const;
+ int numSlots( bool super = false ) const;
+ int numSignals( bool super = false ) const;
- int findSlot( const char *, bool super = FALSE ) const;
- int findSignal( const char *, bool super = FALSE ) const;
+ int findSlot( const char *, bool super = false ) const;
+ int findSignal( const char *, bool super = false ) const;
- const TQMetaData *slot( int index, bool super = FALSE ) const;
- const TQMetaData *signal( int index, bool super = FALSE ) const;
+ const TQMetaData *slot( int index, bool super = false ) const;
+ const TQMetaData *signal( int index, bool super = false ) const;
- TQStrList slotNames( bool super = FALSE ) const;
- TQStrList signalNames( bool super = FALSE ) const;
+ TQStrList slotNames( bool super = false ) const;
+ TQStrList signalNames( bool super = false ) const;
int slotOffset() const;
int signalOffset() const;
int propertyOffset() const;
- int numClassInfo( bool super = FALSE ) const;
- const TQClassInfo *classInfo( int index, bool super = FALSE ) const;
- const char *classInfo( const char* name, bool super = FALSE ) const;
+ int numClassInfo( bool super = false ) const;
+ const TQClassInfo *classInfo( int index, bool super = false ) const;
+ const char *classInfo( const char* name, bool super = false ) const;
#ifndef TQT_NO_PROPERTIES
- const TQMetaProperty *property( int index, bool super = FALSE ) const;
- int findProperty( const char *name, bool super = FALSE ) const;
- int indexOfProperty( const TQMetaProperty*, bool super = FALSE ) const;
+ const TQMetaProperty *property( int index, bool super = false ) const;
+ int findProperty( const char *name, bool super = false ) const;
+ int indexOfProperty( const TQMetaProperty*, bool super = false ) const;
const TQMetaProperty* resolveProperty( const TQMetaProperty* ) const;
int resolveProperty( int ) const;
- TQStrList propertyNames( bool super = FALSE ) const;
- int numProperties( bool super = FALSE ) const;
+ TQStrList propertyNames( bool super = false ) const;
+ int numProperties( bool super = false ) const;
#endif
// static wrappers around constructors, necessary to work around a
@@ -220,9 +220,9 @@ public:
const TQMetaEnum *const enum_data, int n_enums,
bool (*tqt_static_property)(TQObject*, int, int, TQVariant*),
const TQClassInfo *const class_info, int n_info );
- TQStrList enumeratorNames( bool super = FALSE ) const;
- int numEnumerators( bool super = FALSE ) const;
- const TQMetaEnum *enumerator( const char* name, bool super = FALSE ) const;
+ TQStrList enumeratorNames( bool super = false ) const;
+ int numEnumerators( bool super = false ) const;
+ const TQMetaEnum *enumerator( const char* name, bool super = false ) const;
#endif
static TQMetaObject *metaObject( const char *class_name );
diff --git a/src/kernel/tqmime.cpp b/src/kernel/tqmime.cpp
index ba12e4c8e..4468082c1 100644
--- a/src/kernel/tqmime.cpp
+++ b/src/kernel/tqmime.cpp
@@ -128,8 +128,8 @@ TQMimeSource::~TQMimeSource()
/*!
- Returns TRUE if the object can provide the data in format \a
- mimeType; otherwise returns FALSE.
+ Returns true if the object can provide the data in format \a
+ mimeType; otherwise returns false.
If you inherit from TQMimeSource, for consistency reasons it is
better to implement the more abstract canDecode() functions such
@@ -140,10 +140,10 @@ bool TQMimeSource::provides(const char* mimeType) const
const char* fmt;
for (int i=0; (fmt = format(i)); i++) {
if ( !tqstricmp(mimeType,fmt) ) {
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
@@ -277,7 +277,7 @@ TQMimeSource* TQMimeSourceFactory::dataInternal(const TQString& abs_name, const
if ( fi.isReadable() ) {
// get the right mimetype
- TQString e = fi.extension(FALSE);
+ TQString e = fi.extension(false);
TQCString mimetype = "application/octet-stream";
const char* imgfmt;
if ( extensions.contains(e) )
@@ -381,7 +381,7 @@ const TQMimeSource* TQMimeSourceFactory::data(const TQString& abs_name) const
}
}
- static bool looping = FALSE;
+ static bool looping = false;
if ( !r && this == defaultFactory() ) {
// we found no mime-source and we are the default factory, so
// we know all the other installed mime-source factories, so
@@ -389,7 +389,7 @@ const TQMimeSource* TQMimeSourceFactory::data(const TQString& abs_name) const
if ( !looping ) {
// to avoid endless recustions, don't enter the loop below
// if data() got called from within the loop below
- looping = TRUE;
+ looping = true;
TQPtrListIterator<TQMimeSourceFactory> it( d->factories );
TQMimeSourceFactory *f;
while ( ( f = it.current() ) ) {
@@ -398,11 +398,11 @@ const TQMimeSource* TQMimeSourceFactory::data(const TQString& abs_name) const
continue;
r = (TQMimeSource*)f->data( abs_name );
if ( r ) {
- looping = FALSE;
+ looping = false;
return r;
}
}
- looping = FALSE;
+ looping = false;
}
} else if ( !r ) {
// we are not the default mime-source factory, so ask the
@@ -472,7 +472,7 @@ TQString TQMimeSourceFactory::makeAbsolute(const TQString& abs_or_rel_name, cons
return context;
TQFileInfo c( context );
if (!c.isDir()) {
- TQFileInfo r( c.dir(TRUE), abs_or_rel_name );
+ TQFileInfo r( c.dir(true), abs_or_rel_name );
return r.absFilePath();
} else {
TQDir d(context);
diff --git a/src/kernel/tqmngio.cpp b/src/kernel/tqmngio.cpp
index 737cab55c..7b309326e 100644
--- a/src/kernel/tqmngio.cpp
+++ b/src/kernel/tqmngio.cpp
@@ -66,13 +66,13 @@ public:
// ### We should figure out how many loops an MNG has, but for now always assume infinite.
if (consumer)
consumer->setLooping(0);
- return TRUE;
+ return true;
}
bool closestream( )
{
if (consumer)
consumer->end();
- return TRUE;
+ return true;
}
bool readdata( mng_ptr pBuf, mng_uint32 iBuflen, mng_uint32p pRead )
{
@@ -86,7 +86,7 @@ public:
// enough in buffer
memcpy(pBuf, buffer+ubuffer, iBuflen);
ubuffer += iBuflen;
- return TRUE;
+ return true;
}
if ( n ) {
// consume buffer
@@ -101,7 +101,7 @@ public:
data += iBuflen;
ndata -= iBuflen;
}
- return TRUE;
+ return true;
}
bool errorproc( mng_int32 iErrorcode,
mng_int8 /*iSeverity*/,
@@ -118,18 +118,18 @@ public:
(iChunkname>>8)&0xff,
(iChunkname>>0)&0xff,
iExtra1,iExtra2);
- return TRUE;
+ return true;
}
bool processheader( mng_uint32 iWidth, mng_uint32 iHeight )
{
image->create(iWidth,iHeight,32);
- image->setAlphaBuffer(TRUE);
+ image->setAlphaBuffer(true);
memset(image->bits(),0,iWidth*iHeight*4);
consumer->setSize(iWidth,iHeight);
mng_set_canvasstyle(handle,
TQImage::systemByteOrder() == TQImage::LittleEndian
? MNG_CANVAS_BGRA8 : MNG_CANVAS_ARGB8 );
- return TRUE;
+ return true;
}
mng_ptr getcanvasline( mng_uint32 iLinenr )
{
@@ -141,7 +141,7 @@ public:
consumer->changed(r);
consumer->setFramePeriod(0);
consumer->frameDone();
- return TRUE;
+ return true;
}
mng_uint32 gettickcount( )
{
@@ -154,7 +154,7 @@ public:
state = Time;
losingtimer.start();
losttime -= iMsecs;
- return TRUE;
+ return true;
}
private:
@@ -440,9 +440,9 @@ void qCleanupMngIO()
void qInitMngIO()
{
- static bool done = FALSE;
+ static bool done = false;
if ( !done ) {
- done = TRUE;
+ done = true;
#ifndef TQT_NO_ASYNC_IMAGE_IO
globalMngFormatTypeObject = new TQMNGFormatType;
tqAddPostRoutine( qCleanupMngIO );
diff --git a/src/kernel/tqmotifdnd_x11.cpp b/src/kernel/tqmotifdnd_x11.cpp
index e1481446f..18e69b139 100644
--- a/src/kernel/tqmotifdnd_x11.cpp
+++ b/src/kernel/tqmotifdnd_x11.cpp
@@ -81,7 +81,7 @@ in doc/dnd.doc, where the documentation system can see it. */
static Atom atom_message_type, atom_receiver_info, atom_src_property_type;
static Atom atom_motif_window, atom_target_list ;
-static bool in_drop_site = FALSE;
+static bool in_drop_site = false;
static Window cur_window = 0;
static TQWidget *drop_widget = 0L;
@@ -775,8 +775,8 @@ TQByteArray qt_motifdnd_obtain_data( const char *mimeType )
if ( qt_xclb_read_property( tqt_xdisplay(),
tw->winId(),
- Dnd_selection, TRUE,
- &result, 0, &type, 0, TRUE ) ) {
+ Dnd_selection, true,
+ &result, 0, &type, 0, true ) ) {
}
}
@@ -826,7 +826,7 @@ void qt_motifdnd_handle_msg( TQWidget * /* w */ , const XEvent * xe, bool /* pas
send a drop site enter or drop site leave or echo */
TQPoint p( dnd_data.x, dnd_data.y );
- TQWidget *c = TQApplication::widgetAt( p, TRUE );
+ TQWidget *c = TQApplication::widgetAt( p, true );
if (c)
p = c->mapFromGlobal(p);
@@ -918,7 +918,7 @@ void qt_motifdnd_handle_msg( TQWidget * /* w */ , const XEvent * xe, bool /* pas
/* get the size of our drop site for later use */
cur_window = dnd_data.src_window ;
- qt_motifdnd_active = TRUE;
+ qt_motifdnd_active = true;
/* no answer needed, just read source property */
DndReadSourceProperty (event.xclient.display,
diff --git a/src/kernel/tqmovie.cpp b/src/kernel/tqmovie.cpp
index 6350f5ceb..76e676144 100644
--- a/src/kernel/tqmovie.cpp
+++ b/src/kernel/tqmovie.cpp
@@ -213,14 +213,14 @@ public:
TQMoviePrivate::TQMoviePrivate()
{
- dirty_cache = FALSE;
+ dirty_cache = false;
buffer = 0;
pump = 0;
source = 0;
decoder = 0;
display_widget=0;
buf_size = 0;
- init(FALSE);
+ init(false);
}
// NOTE: The ownership of the TQDataSource is transferred to the Private
@@ -231,13 +231,13 @@ TQMoviePrivate::TQMoviePrivate(TQDataSource* src, TQMovie* movie, int bufsize) :
frametimer = new TQTimer(this);
pump = src ? new TQDataPump(src, this) : 0;
TQObject::connect(frametimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(refresh()));
- dirty_cache = FALSE;
+ dirty_cache = false;
source = src;
buffer = 0;
decoder = 0;
speed = 100;
display_widget=0;
- init(TRUE);
+ init(true);
}
TQMoviePrivate::~TQMoviePrivate()
@@ -258,12 +258,12 @@ bool TQMoviePrivate::isNull() const
return !buf_size;
}
-// Initialize. Only actually allocate any space if \a fully is TRUE,
+// Initialize. Only actually allocate any space if \a fully is true,
// otherwise, just enough to be a valid null Private.
void TQMoviePrivate::init(bool fully)
{
#ifdef QT_SAVE_MOVIE_HACK
- save_image = TRUE;
+ save_image = true;
image_number = 0;
#endif
@@ -282,7 +282,7 @@ void TQMoviePrivate::init(bool fully)
source->open(IO_ReadOnly);
#endif
- waitingForFrameTick = FALSE;
+ waitingForFrameTick = false;
stepping = -1;
framenumber = 0;
frameperiod = -1;
@@ -291,9 +291,9 @@ void TQMoviePrivate::init(bool fully)
changed_area.setRect(0,0,-1,-1);
valid_area = changed_area;
loop = -1;
- movie_ended = FALSE;
+ movie_ended = false;
error = 0;
- empty = TRUE;
+ empty = true;
}
void TQMoviePrivate::flushBuffer()
@@ -366,7 +366,7 @@ void TQMoviePrivate::updatePixmapFromImage(const TQPoint& off,
if ( !TQPixmapCache::find( key, lines ) ) {
lines.convertFromImage(img, TQt::ColorOnly);
TQPixmapCache::insert( key, lines );
- dirty_cache = TRUE;
+ dirty_cache = true;
}
} else
#endif
@@ -416,7 +416,7 @@ void TQMoviePrivate::changed(const TQRect& rect)
void TQMoviePrivate::end()
{
- movie_ended = TRUE;
+ movie_ended = true;
}
void TQMoviePrivate::preFrameDone()
@@ -428,7 +428,7 @@ void TQMoviePrivate::preFrameDone()
emit dataStatus( TQMovie::Paused );
}
} else {
- waitingForFrameTick = TRUE;
+ waitingForFrameTick = true;
restartTimer();
}
}
@@ -471,7 +471,7 @@ void TQMoviePrivate::setLooping(int nloops)
{
if (loop == -1) { // Only if we don't already know how many loops!
if (source && source->rewindable()) {
- source->enableRewind(TRUE);
+ source->enableRewind(true);
loop = nloops;
} else {
// Cannot loop from this source
@@ -508,7 +508,7 @@ int TQMoviePrivate::readyToReceive()
void TQMoviePrivate::receive(const uchar* b, int bytecount)
{
- if ( bytecount ) empty = FALSE;
+ if ( bytecount ) empty = false;
while (bytecount && !waitingForFrameTick && stepping != 0) {
int used = decoder->decode(b, bytecount);
@@ -540,7 +540,7 @@ void TQMoviePrivate::eof()
emit dataStatus(TQMovie::SourceEmpty);
#ifdef QT_SAVE_MOVIE_HACK
- save_image = FALSE;
+ save_image = false;
#endif
emit dataStatus(TQMovie::EndOfLoop);
@@ -554,7 +554,7 @@ void TQMoviePrivate::eof()
decoder = new TQImageDecoder(this);
source->rewind();
framenumber = 0;
- movie_ended = FALSE;
+ movie_ended = false;
} else {
delete decoder;
decoder = 0;
@@ -594,7 +594,7 @@ void TQMoviePrivate::refresh()
frametimer->stop();
}
- waitingForFrameTick = FALSE;
+ waitingForFrameTick = false;
flushBuffer();
}
@@ -727,7 +727,7 @@ TQMovie::~TQMovie()
}
/*!
- Returns TRUE if the movie is null; otherwise returns FALSE.
+ Returns true if the movie is null; otherwise returns false.
*/
bool TQMovie::isNull() const
{
@@ -822,7 +822,7 @@ int TQMovie::steps() const
int TQMovie::frameNumber() const { return d->framenumber; }
/*!
- Returns TRUE if the image is paused; otherwise returns FALSE.
+ Returns true if the image is paused; otherwise returns false.
*/
bool TQMovie::paused() const
{
@@ -830,8 +830,8 @@ bool TQMovie::paused() const
}
/*!
- Returns TRUE if the image is no longer playing: this happens when
- all loops of all frames are complete; otherwise returns FALSE.
+ Returns true if the image is no longer playing: this happens when
+ all loops of all frames are complete; otherwise returns false.
*/
bool TQMovie::finished() const
{
@@ -839,8 +839,8 @@ bool TQMovie::finished() const
}
/*!
- Returns TRUE if the image is not single-stepping, not paused, and
- not finished; otherwise returns FALSE.
+ Returns true if the image is not single-stepping, not paused, and
+ not finished; otherwise returns false.
*/
bool TQMovie::running() const
{
@@ -883,7 +883,7 @@ void TQMovie::step(int steps)
return;
d->stepping = steps;
d->frametimer->start(0);
- d->waitingForFrameTick = FALSE; // Full speed ahead!
+ d->waitingForFrameTick = false; // Full speed ahead!
}
/*!
@@ -903,10 +903,10 @@ void TQMovie::restart()
if (d->isNull())
return;
if (d->source->rewindable()) {
- d->source->enableRewind(TRUE);
+ d->source->enableRewind(true);
d->source->rewind();
int s = d->stepping;
- d->init(TRUE);
+ d->init(true);
if ( s>0 )
step(s);
else if ( s==0 )
diff --git a/src/kernel/tqnetworkprotocol.cpp b/src/kernel/tqnetworkprotocol.cpp
index a595c2d0e..b562d7dd4 100644
--- a/src/kernel/tqnetworkprotocol.cpp
+++ b/src/kernel/tqnetworkprotocol.cpp
@@ -64,10 +64,10 @@ public:
opInProgress = 0;
opStartTimer = new TQTimer( p );
removeTimer = new TQTimer( p );
- operationQueue.setAutoDelete( FALSE );
- autoDelete = FALSE;
+ operationQueue.setAutoDelete( false );
+ autoDelete = false;
removeInterval = 10000;
- oldOps.setAutoDelete( FALSE );
+ oldOps.setAutoDelete( false );
}
~TQNetworkProtocolPrivate()
@@ -475,7 +475,7 @@ void TQNetworkProtocol::setUrl( TQUrlOperator *u )
}
- // ### if autoDelete is TRUE, we should delete the TQUrlOperator (something
+ // ### if autoDelete is true, we should delete the TQUrlOperator (something
// like below; but that is not possible since it would delete this, too).
//if ( d->autoDelete && (d->url!=u) ) {
// delete d->url; // destructor deletes the network protocol
@@ -506,14 +506,14 @@ void TQNetworkProtocol::setUrl( TQUrlOperator *u )
}
if ( !d->opInProgress && !d->operationQueue.isEmpty() )
- d->opStartTimer->start( 0, TRUE );
+ d->opStartTimer->start( 0, true );
}
/*!
For processing operations the network protocol base class calls
this method quite often. This should be reimplemented by new
- network protocols. It should return TRUE if the connection is OK
- (open); otherwise it should return FALSE. If the connection is not
+ network protocols. It should return true if the connection is OK
+ (open); otherwise it should return false. If the connection is not
open the protocol should open it.
If the connection can't be opened (e.g. because you already tried
@@ -526,7 +526,7 @@ void TQNetworkProtocol::setUrl( TQUrlOperator *u )
bool TQNetworkProtocol::checkConnection( TQNetworkOperation * )
{
- return TRUE;
+ return true;
}
/*!
@@ -554,7 +554,7 @@ void TQNetworkProtocol::addOperation( TQNetworkOperation *op )
#endif
d->operationQueue.enqueue( op );
if ( !d->opInProgress )
- d->opStartTimer->start( 0, TRUE );
+ d->opStartTimer->start( 0, true );
}
/*!
@@ -620,21 +620,21 @@ TQNetworkProtocol *TQNetworkProtocol::getNetworkProtocol( const TQString &protoc
}
/*!
- Returns TRUE if the only protocol registered is for working on the
- local filesystem; returns FALSE if other network protocols are
+ Returns true if the only protocol registered is for working on the
+ local filesystem; returns false if other network protocols are
also registered.
*/
bool TQNetworkProtocol::hasOnlyLocalFileSystem()
{
if ( !tqNetworkProtocolRegister )
- return FALSE;
+ return false;
TQDictIterator< TQNetworkProtocolFactoryBase > it( *tqNetworkProtocolRegister );
for ( ; it.current(); ++it )
if ( it.currentKey() != "file" )
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
/*!
@@ -846,7 +846,7 @@ void TQNetworkProtocol::processNextOperation( TQNetworkOperation *old )
if ( d->operationQueue.isEmpty() ) {
d->opInProgress = 0;
if ( d->autoDelete )
- d->removeTimer->start( d->removeInterval, TRUE );
+ d->removeTimer->start( d->removeInterval, true );
return;
}
@@ -856,7 +856,7 @@ void TQNetworkProtocol::processNextOperation( TQNetworkOperation *old )
if ( !checkConnection( op ) ) {
if ( op->state() != TQNetworkProtocol::StFailed ) {
- d->opStartTimer->start( 0, TRUE );
+ d->opStartTimer->start( 0, true );
} else {
d->operationQueue.dequeue();
clearOperationQueue();
@@ -897,7 +897,7 @@ TQNetworkOperation *TQNetworkProtocol::operationInProgress() const
void TQNetworkProtocol::clearOperationQueue()
{
d->operationQueue.dequeue();
- d->operationQueue.setAutoDelete( TRUE );
+ d->operationQueue.setAutoDelete( true );
d->operationQueue.clear();
}
@@ -922,10 +922,10 @@ void TQNetworkProtocol::stop()
/*!
Because it's sometimes hard to take care of removing network
protocol instances, TQNetworkProtocol provides an auto-delete
- mechanism. If you set \a b to TRUE, the network protocol instance
+ mechanism. If you set \a b to true, the network protocol instance
is removed after it has been inactive for \a i milliseconds (i.e.
\a i milliseconds after the last operation has been processed).
- If you set \a b to FALSE the auto-delete mechanism is switched
+ If you set \a b to false the auto-delete mechanism is switched
off.
If you switch on auto-delete, the TQNetworkProtocol also deletes
@@ -939,7 +939,7 @@ void TQNetworkProtocol::setAutoDelete( bool b, int i )
}
/*!
- Returns TRUE if auto-deleting is enabled; otherwise returns FALSE.
+ Returns true if auto-deleting is enabled; otherwise returns false.
\sa TQNetworkProtocol::setAutoDelete()
*/
diff --git a/src/kernel/tqobject.cpp b/src/kernel/tqobject.cpp
index ec31f6cd6..86c76c4ee 100644
--- a/src/kernel/tqobject.cpp
+++ b/src/kernel/tqobject.cpp
@@ -101,7 +101,7 @@ public:
ownThread = NULL;
disableThreadPostedEvents = false;
#endif
- setAutoDelete( TRUE );
+ setAutoDelete( true );
controlElementData = NULL;
controlElementDataPrivate = NULL;
}
@@ -234,10 +234,10 @@ void TQObject::moveToThread(TQThread *targetThread)
/*!
Changes the way cross thread signals are handled
- If disable is FALSE, signals emitted from one thread will be
+ If disable is false, signals emitted from one thread will be
posted to any other connected threads' event loops (default).
- If disable is TRUE, calls to emit from one thread
+ If disable is true, calls to emit from one thread
will immediately execute slots in another thread.
This mode of operation is inherently unsafe and is provided
solely to support thread management by a third party application.
@@ -268,7 +268,7 @@ class TQSenderObjectList : public TQObjectList, public TQShared
TQSenderObjectList::TQSenderObjectList() : currentSender( 0 ) {
#ifdef TQT_THREAD_SUPPORT
- listMutex = new TQMutex( TRUE );
+ listMutex = new TQMutex( true );
#endif
}
@@ -452,7 +452,7 @@ bool qKillTimer( int id );
bool qKillTimer( TQObject *obj );
static void removeObjFromList( TQObjectList *objList, const TQObject *obj,
- bool single=FALSE )
+ bool single=false )
{
if ( !objList ) {
return;
@@ -536,7 +536,7 @@ static void qt_spy_signal( TQObject* sender, int signal, TQUObject* o )
mo = sender->metaObject();
while ( mo ) {
s.sprintf( "%s_%s", mo->className(), sigData->name );
- int slot = tqt_preliminary_signal_spy->metaObject()->findSlot( s, TRUE );
+ int slot = tqt_preliminary_signal_spy->metaObject()->findSlot( s, true );
if ( slot >= 0 ) {
#ifdef TQT_THREAD_SUPPORT
// protect access to qt_spy_signal_sender
@@ -656,12 +656,12 @@ const TQObjectList TQObject::objectTreesListObject() {
TQObject::TQObject( TQObject *parent, const char *name )
:
- isSignal( FALSE ), // assume not a signal object
- isWidget( FALSE ), // assume not a widget object
- pendTimer( FALSE ), // no timers yet
- blockSig( FALSE ), // not blocking signals
- wasDeleted( FALSE ), // double-delete catcher
- isTree( FALSE ), // no tree yet
+ isSignal( false ), // assume not a signal object
+ isWidget( false ), // assume not a widget object
+ pendTimer( false ), // no timers yet
+ blockSig( false ), // not blocking signals
+ wasDeleted( false ), // double-delete catcher
+ isTree( false ), // no tree yet
objname( name ? tqstrdup(name) : 0 ), // set object name
parentObj( 0 ), // no parent yet. It is set by insertChild()
childObjects( 0 ), // no children yet
@@ -677,8 +677,8 @@ TQObject::TQObject( TQObject *parent, const char *name )
#ifdef TQT_THREAD_SUPPORT
d->ownThread = TQThread::currentThreadObject();
- d->senderObjectListMutex = new TQMutex( TRUE );
- d->childObjectListMutex = new TQMutex( TRUE );
+ d->senderObjectListMutex = new TQMutex( true );
+ d->childObjectListMutex = new TQMutex( true );
#endif
if ( !metaObj ) { // will create object dict
(void) staticMetaObject();
@@ -689,7 +689,7 @@ TQObject::TQObject( TQObject *parent, const char *name )
}
else {
insert_tree( this );
- isTree = TRUE;
+ isTree = true;
}
}
@@ -744,7 +744,7 @@ TQObject::~TQObject()
}
if ( isTree ) {
remove_tree( this ); // remove from global root list
- isTree = FALSE;
+ isTree = false;
}
if ( parentObj ) // remove it from parent object
parentObj->removeChild( this );
@@ -831,14 +831,14 @@ TQObject::~TQObject()
*/
/*!
- Returns TRUE if this object is an instance of the class \a clname;
- otherwise returns FALSE.
+ Returns true if this object is an instance of the class \a clname;
+ otherwise returns false.
Example:
\code
TQTimer *t = new TQTimer; // TQTimer inherits TQObject
- t->isA( "TQTimer" ); // returns TRUE
- t->isA( "TQObject" ); // returns FALSE
+ t->isA( "TQTimer" ); // returns true
+ t->isA( "TQObject" ); // returns false
\endcode
\sa inherits() metaObject()
@@ -850,23 +850,23 @@ bool TQObject::isA( const char *clname ) const
}
/*!
- Returns TRUE if this object is an instance of a class that
+ Returns true if this object is an instance of a class that
inherits \a clname, and \a clname inherits TQObject; otherwise
- returns FALSE.
+ returns false.
A class is considered to inherit itself.
Example:
\code
TQTimer *t = new TQTimer; // TQTimer inherits TQObject
- t->inherits( "TQTimer" ); // returns TRUE
- t->inherits( "TQObject" ); // returns TRUE
- t->inherits( "TQButton" ); // returns FALSE
+ t->inherits( "TQTimer" ); // returns true
+ t->inherits( "TQObject" ); // returns true
+ t->inherits( "TQButton" ); // returns false
// TQScrollBar inherits TQWidget and TQRangeControl
TQScrollBar *s = new TQScrollBar( 0 );
- s->inherits( "TQWidget" ); // returns TRUE
- s->inherits( "TQRangeControl" ); // returns FALSE
+ s->inherits( "TQWidget" ); // returns true
+ s->inherits( "TQRangeControl" ); // returns false
\endcode
(\l TQRangeControl is not a TQObject.)
@@ -882,8 +882,8 @@ bool TQObject::inherits( const char *clname ) const
/*!
\internal
- Returns TRUE if \a object inherits \a superClass within
- the meta object inheritance chain; otherwise returns FALSE.
+ Returns true if \a object inherits \a superClass within
+ the meta object inheritance chain; otherwise returns false.
\sa inherits()
*/
@@ -961,7 +961,7 @@ const char * TQObject::name( const char * defaultName ) const
inheritsClass. If \a inheritsClass is 0 (the default), any class
matches.
- If \a recursiveSearch is TRUE (the default), child() performs a
+ If \a recursiveSearch is true (the default), child() performs a
depth-first search of the object's children.
If there is no such object, this function returns 0. If there are
@@ -1024,7 +1024,7 @@ void destroyDeepCopiedTQUObjectArray(TQUObject* uArray)
/*!
\fn bool TQObject::isWidgetType() const
- Returns TRUE if the object is a widget; otherwise returns FALSE.
+ Returns true if the object is a widget; otherwise returns false.
Calling this function is equivalent to calling
inherits("TQWidget"), except that it is much faster.
@@ -1033,7 +1033,7 @@ void destroyDeepCopiedTQUObjectArray(TQUObject* uArray)
/*!
\fn bool TQObject::highPriority() const
- Returns TRUE if the object is a high-priority object, or FALSE if
+ Returns true if the object is a high-priority object, or false if
it is a standard-priority object.
High-priority objects are placed first in TQObject's list of
@@ -1044,7 +1044,7 @@ void destroyDeepCopiedTQUObjectArray(TQUObject* uArray)
/*!
This virtual function receives events to an object and should
- return TRUE if the event \a e was recognized and processed.
+ return true if the event \a e was recognized and processed.
The event() function can be reimplemented to customize the
behavior of an object.
@@ -1061,27 +1061,27 @@ bool TQObject::event( TQEvent *e )
}
#endif
if ( wasDeleted ) {
- return TRUE;
+ return true;
}
if ( eventFilters ) { // try filters
if ( activate_filters(e) ) { // stopped by a filter
- return TRUE;
+ return true;
}
}
switch ( e->type() ) {
case TQEvent::Timer:
timerEvent( (TQTimerEvent*)e );
- return TRUE;
+ return true;
case TQEvent::ChildInserted:
case TQEvent::ChildRemoved:
childEvent( (TQChildEvent*)e );
- return TRUE;
+ return true;
case TQEvent::DeferredDelete:
delete this;
- return TRUE;
+ return true;
case TQEvent::MetaCall:
{
@@ -1154,11 +1154,11 @@ bool TQObject::event( TQEvent *e )
default:
if ( e->type() >= TQEvent::User ) {
customEvent( (TQCustomEvent*) e );
- return TRUE;
+ return true;
}
break;
}
- return FALSE;
+ return false;
}
/*!
@@ -1228,7 +1228,7 @@ void TQObject::customEvent( TQCustomEvent * )
In your reimplementation of this function, if you want to filter
the event \a e, out, i.e. stop it being handled further, return
- TRUE; otherwise return FALSE.
+ true; otherwise return false.
Example:
\code
@@ -1258,9 +1258,9 @@ void TQObject::customEvent( TQCustomEvent * )
if ( e->type() == TQEvent::KeyPress ) {
TQKeyEvent *k = (TQKeyEvent*)ev;
tqDebug( "Ate key press %d", k->key() );
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
} else {
// pass the event on to the parent class
@@ -1275,7 +1275,7 @@ void TQObject::customEvent( TQCustomEvent * )
purposes.
\warning If you delete the receiver object in this function, be
- sure to return TRUE. Otherwise, TQt will forward the event to the
+ sure to return true. Otherwise, TQt will forward the event to the
deleted object and the program might crash.
\sa installEventFilter()
@@ -1283,7 +1283,7 @@ void TQObject::customEvent( TQCustomEvent * )
bool TQObject::eventFilter( TQObject * /* watched */, TQEvent * /* e */ )
{
- return FALSE;
+ return false;
}
@@ -1296,24 +1296,24 @@ bool TQObject::eventFilter( TQObject * /* watched */, TQEvent * /* e */ )
bool TQObject::activate_filters( TQEvent *e )
{
if ( !eventFilters ) // no event filter
- return FALSE;
+ return false;
TQObjectListIt it( *eventFilters );
TQObject *obj = it.current();
while ( obj ) { // send to all filters
- ++it; // until one returns TRUE
+ ++it; // until one returns true
if ( obj->eventFilter(this,e) ) {
- return TRUE;
+ return true;
}
obj = it.current();
}
- return FALSE; // don't do anything with it
+ return false; // don't do anything with it
}
/*!
\fn bool TQObject::signalsBlocked() const
- Returns TRUE if signals are blocked; otherwise returns FALSE.
+ Returns true if signals are blocked; otherwise returns false.
Signals are not blocked by default.
@@ -1321,8 +1321,8 @@ bool TQObject::activate_filters( TQEvent *e )
*/
/*!
- Blocks signals if \a block is TRUE, or unblocks signals if \a
- block is FALSE.
+ Blocks signals if \a block is true, or unblocks signals if \a
+ block is false.
Emitted signals disappear into hyperspace if signals are blocked.
Note that the destroyed() signals will be emitted even if the signals
@@ -1397,7 +1397,7 @@ void TQObject::blockSignals( bool block )
int TQObject::startTimer( int interval )
{
- pendTimer = TRUE; // set timer flag
+ pendTimer = true; // set timer flag
return qStartTimer( interval, (TQObject *)this );
}
@@ -1443,11 +1443,11 @@ static void objSearch( TQObjectList *result,
return;
TQObject *obj = list->first();
while ( obj ) {
- bool ok = TRUE;
+ bool ok = true;
if ( onlyWidgets )
ok = obj->isWidgetType();
else if ( inheritsClass && !obj->inherits(inheritsClass) )
- ok = FALSE;
+ ok = false;
if ( ok ) {
if ( objName )
ok = ( qstrcmp(objName,obj->name()) == 0 );
@@ -1523,9 +1523,9 @@ const TQObjectList *TQObject::objectTrees()
(the default), all classes match. If \a objName is 0 (the
default), all object names match.
- If \a regexpMatch is TRUE (the default), \a objName is a regular
+ If \a regexpMatch is true (the default), \a objName is a regular
expression that the objects's names must match. The syntax is that
- of a TQRegExp. If \a regexpMatch is FALSE, \a objName is a string
+ of a TQRegExp. If \a regexpMatch is false, \a objName is a string
and object names must match it exactly.
Note that \a inheritsClass uses single inheritance from TQObject,
@@ -1534,7 +1534,7 @@ const TQObjectList *TQObject::objectTrees()
reality, but is the best that can be done on the wide variety of
compilers TQt supports.
- Finally, if \a recursiveSearch is TRUE (the default), queryList()
+ Finally, if \a recursiveSearch is true (the default), queryList()
searches \e{n}th-generation as well as first-generation children.
If all this seems a bit complex for your needs, the simpler
@@ -1550,7 +1550,7 @@ const TQObjectList *TQObject::objectTrees()
while ( (obj = it.current()) != 0 ) {
// for each found object...
++it;
- ((TQButton*)obj)->setEnabled( FALSE );
+ ((TQButton*)obj)->setEnabled( false );
}
delete l; // delete the list, not the objects
\endcode
@@ -1599,9 +1599,9 @@ TQConnectionList *TQObject::receivers( const char* signal ) const
if ( connections && signal ) {
if ( *signal == '2' ) { // tag == 2, i.e. signal
TQCString s = qt_rmWS( signal+1 );
- return receivers( metaObject()->findSignal( (const char*)s, TRUE ) );
+ return receivers( metaObject()->findSignal( (const char*)s, true ) );
} else {
- return receivers( metaObject()->findSignal(signal, TRUE ) );
+ return receivers( metaObject()->findSignal(signal, true ) );
}
}
return 0;
@@ -1620,11 +1620,11 @@ TQConnectionList *TQObject::receivers( int signal ) const
if ( !connections ) {
TQObject* that = (TQObject*) this;
that->connections = new TQSignalVec( signal+1 );
- that->connections->setAutoDelete( TRUE );
+ that->connections->setAutoDelete( true );
}
if ( !connections->at( signal ) ) {
TQConnectionList* clist = new TQConnectionList;
- clist->setAutoDelete( TRUE );
+ clist->setAutoDelete( true );
connections->insert( signal, clist );
return clist;
}
@@ -1655,7 +1655,7 @@ void TQObject::insertChild( TQObject *obj )
if ( obj->isTree ) {
remove_tree( obj );
- obj->isTree = FALSE;
+ obj->isTree = false;
}
if ( obj->parentObj && obj->parentObj != this ) {
#if defined(QT_CHECK_STATE)
@@ -1703,7 +1703,7 @@ void TQObject::removeChild( TQObject *obj )
obj->parentObj = 0;
if ( !obj->wasDeleted ) {
insert_tree( obj ); // it's a root object now
- obj->isTree = TRUE;
+ obj->isTree = true;
}
if ( childObjects->isEmpty() ) {
delete childObjects; // last child removed
@@ -1729,8 +1729,8 @@ void TQObject::removeChild( TQObject *obj )
sent to this object. The filter can either stop the event or
forward it to this object. The event filter \a filterObj receives
events via its eventFilter() function. The eventFilter() function
- must return TRUE if the event should be filtered, (i.e. stopped);
- otherwise it must return FALSE.
+ must return true if the event should be filtered, (i.e. stopped);
+ otherwise it must return false.
If multiple event filters are installed on a single object, the
filter that was installed last is activated first.
@@ -1751,10 +1751,10 @@ void TQObject::removeChild( TQObject *obj )
// special processing for key press
TQKeyEvent *k = (TQKeyEvent *)e;
tqDebug( "Ate key press %d", k->key() );
- return TRUE; // eat event
+ return true; // eat event
} else {
// standard event processing
- return FALSE;
+ return false;
}
}
\endcode
@@ -1773,7 +1773,7 @@ void TQObject::removeChild( TQObject *obj )
accelerator key presses.
\warning If you delete the receiver object in your eventFilter()
- function, be sure to return TRUE. If you return FALSE, TQt sends
+ function, be sure to return true. If you return false, TQt sends
the event to the deleted object and the program will crash.
\sa removeEventFilter(), eventFilter(), event()
@@ -1840,9 +1840,9 @@ static bool check_signal_macro( const TQObject *sender, const char *signal,
else
tqWarning( "TQObject::%s: Use the TQ_SIGNAL macro to %s %s::%s",
func, op, sender->className(), signal );
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
static bool check_member_code( int code, const TQObject *object,
@@ -1851,9 +1851,9 @@ static bool check_member_code( int code, const TQObject *object,
if ( code != TQ_SLOT_CODE && code != TQ_SIGNAL_CODE ) {
tqWarning( "TQObject::%s: Use the TQ_SLOT or TQ_SIGNAL macro to "
"%s %s::%s", func, func, object->className(), member );
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
static void err_member_notfound( int code, const TQObject *object,
@@ -1899,10 +1899,10 @@ static void err_info_about_candidates( int code,
const TQMetaData *rm = 0;
switch ( code ) {
case TQ_SLOT_CODE:
- rm = mo->slot( mo->findSlot( newname, TRUE ), TRUE );
+ rm = mo->slot( mo->findSlot( newname, true ), true );
break;
case TQ_SIGNAL_CODE:
- rm = mo->signal( mo->findSignal( newname, TRUE ), TRUE );
+ rm = mo->signal( mo->findSignal( newname, true ), true );
break;
}
if ( rm ) {
@@ -1998,21 +1998,21 @@ void TQObject::disconnectNotify( const char * )
/*!
\fn bool TQObject::checkConnectArgs( const char *signal, const TQObject *receiver, const char *member )
- Returns TRUE if the \a signal and the \a member arguments are
- compatible; otherwise returns FALSE. (The \a receiver argument is
+ Returns true if the \a signal and the \a member arguments are
+ compatible; otherwise returns false. (The \a receiver argument is
currently ignored.)
\warning We recommend that you use the default implementation and
do not reimplement this function.
\omit
- TRUE: "signal(<anything>)", "member()"
- TRUE: "signal(a,b,c)", "member(a,b,c)"
- TRUE: "signal(a,b,c)", "member(a,b)", "member(a)" etc.
- FALSE: "signal(const a)", "member(a)"
- FALSE: "signal(a)", "member(const a)"
- FALSE: "signal(a)", "member(b)"
- FALSE: "signal(a)", "member(a,b)"
+ true: "signal(<anything>)", "member()"
+ true: "signal(a,b,c)", "member(a,b,c)"
+ true: "signal(a,b,c)", "member(a,b)", "member(a)" etc.
+ false: "signal(const a)", "member(a)"
+ false: "signal(a)", "member(const a)"
+ false: "signal(a)", "member(b)"
+ false: "signal(a)", "member(a,b)"
\endomit
*/
@@ -2025,12 +2025,12 @@ bool TQObject::checkConnectArgs( const char *signal,
while ( *s1++ != '(' ) { } // scan to first '('
while ( *s2++ != '(' ) { }
if ( *s2 == ')' || qstrcmp(s1,s2) == 0 ) // member has no args or
- return TRUE; // exact match
+ return true; // exact match
int s1len = tqstrlen(s1);
int s2len = tqstrlen(s2);
if ( s2len < s1len && tqstrncmp(s1,s2,s2len-1)==0 && s1[s2len-1]==',' )
- return TRUE; // member has less args
- return FALSE;
+ return true; // member has less args
+ return false;
}
/*!
@@ -2060,8 +2060,8 @@ TQCString TQObject::normalizeSignalSlot( const char *signalSlot )
/*!
Connects \a signal from the \a sender object to \a member in object
- \a receiver, and returns TRUE if the connection succeeds; otherwise
- returns FALSE.
+ \a receiver, and returns true if the connection succeeds; otherwise
+ returns false.
You must use the TQ_SIGNAL() and TQ_SLOT() macros when specifying the \a signal
and the \a member, for example:
@@ -2075,7 +2075,7 @@ TQCString TQObject::normalizeSignalSlot( const char *signalSlot )
This example ensures that the label always displays the current
scroll bar value. Note that the signal and slots parameters must not
contain any variable names, only the type. E.g. the following would
- not work and return FALSE:
+ not work and return false:
TQObject::connect( scroll, TQ_SIGNAL(valueChanged(int v)),
label, TQ_SLOT(setNum(int v)) );
@@ -2112,8 +2112,8 @@ TQCString TQObject::normalizeSignalSlot( const char *signalSlot )
If a signal is connected to several slots, the slots are activated
in an arbitrary order when the signal is emitted.
- The function returns TRUE if it successfully connects the signal
- to the slot. It will return FALSE if it cannot create the
+ The function returns true if it successfully connects the signal
+ to the slot. It will return false if it cannot create the
connection, for example, if TQObject is unable to verify the
existence of either \a signal or \a member, or if their signatures
aren't compatible.
@@ -2135,23 +2135,23 @@ bool TQObject::connect( const TQObject *sender, const char *signal,
signal ? signal+1 : "(null)",
receiver ? receiver->className() : "(null)",
member ? member+1 : "(null)" );
- return FALSE;
+ return false;
}
#endif
TQMetaObject *smeta = sender->metaObject();
#if defined(QT_CHECK_RANGE)
if ( !check_signal_macro( sender, signal, "connect", "bind" ) )
- return FALSE;
+ return false;
#endif
TQCString nw_signal(signal); // Assume already normalized
++signal; // skip member type code
- int signal_index = smeta->findSignal( signal, TRUE );
+ int signal_index = smeta->findSignal( signal, true );
if ( signal_index < 0 ) { // normalize and retry
nw_signal = qt_rmWS( signal-1 ); // remove whitespace
signal = nw_signal.data()+1; // skip member type code
- signal_index = smeta->findSignal( signal, TRUE );
+ signal_index = smeta->findSignal( signal, true );
}
if ( signal_index < 0 ) { // no such signal
@@ -2160,9 +2160,9 @@ bool TQObject::connect( const TQObject *sender, const char *signal,
err_info_about_candidates( TQ_SIGNAL_CODE, smeta, signal, "connect" );
err_info_about_objects( "connect", sender, receiver );
#endif
- return FALSE;
+ return false;
}
- const TQMetaData *sm = smeta->signal( signal_index, TRUE );
+ const TQMetaData *sm = smeta->signal( signal_index, true );
signal = sm->name; // use name from meta object
int membcode = member[0] - '0'; // get member code
@@ -2172,7 +2172,7 @@ bool TQObject::connect( const TQObject *sender, const char *signal,
#if defined(QT_CHECK_RANGE)
if ( !check_member_code( membcode, r, member, "connect" ) )
- return FALSE;
+ return false;
#endif
member++; // skip code
@@ -2181,19 +2181,19 @@ bool TQObject::connect( const TQObject *sender, const char *signal,
int member_index = -1;
switch ( membcode ) { // get receiver member
case TQ_SLOT_CODE:
- member_index = rmeta->findSlot( member, TRUE );
+ member_index = rmeta->findSlot( member, true );
if ( member_index < 0 ) { // normalize and retry
nw_member = qt_rmWS(member); // remove whitespace
member = nw_member;
- member_index = rmeta->findSlot( member, TRUE );
+ member_index = rmeta->findSlot( member, true );
}
break;
case TQ_SIGNAL_CODE:
- member_index = rmeta->findSignal( member, TRUE );
+ member_index = rmeta->findSignal( member, true );
if ( member_index < 0 ) { // normalize and retry
nw_member = qt_rmWS(member); // remove whitespace
member = nw_member;
- member_index = rmeta->findSignal( member, TRUE );
+ member_index = rmeta->findSignal( member, true );
}
break;
}
@@ -2203,7 +2203,7 @@ bool TQObject::connect( const TQObject *sender, const char *signal,
err_info_about_candidates( membcode, rmeta, member, "connect" );
err_info_about_objects( "connect", sender, receiver );
#endif
- return FALSE;
+ return false;
}
#if defined(QT_CHECK_RANGE)
if ( !s->checkConnectArgs(signal,receiver,member) ) {
@@ -2211,11 +2211,11 @@ bool TQObject::connect( const TQObject *sender, const char *signal,
"\n\t%s::%s --> %s::%s",
s->className(), signal,
r->className(), member );
- return FALSE;
+ return false;
} else {
const TQMetaData *rm = membcode == TQ_SLOT_CODE ?
- rmeta->slot( member_index, TRUE ) :
- rmeta->signal( member_index, TRUE );
+ rmeta->slot( member_index, true ) :
+ rmeta->signal( member_index, true );
if ( rm ) {
int si = 0;
int ri = 0;
@@ -2235,7 +2235,7 @@ bool TQObject::connect( const TQObject *sender, const char *signal,
"\n\t%s::%s --> %s::%s",
s->className(), signal,
r->className(), member );
- return FALSE;
+ return false;
}
}
}
@@ -2243,7 +2243,7 @@ bool TQObject::connect( const TQObject *sender, const char *signal,
#endif
connectInternal( sender, signal_index, receiver, membcode, member_index );
s->connectNotify( nw_signal );
- return TRUE;
+ return true;
}
/*! \internal */
@@ -2257,14 +2257,14 @@ void TQObject::connectInternal( const TQObject *sender, int signal_index, const
if ( !s->connections ) { // create connections lookup table
s->connections = new TQSignalVec( signal_index+1 );
TQ_CHECK_PTR( s->connections );
- s->connections->setAutoDelete( TRUE );
+ s->connections->setAutoDelete( true );
}
TQConnectionList *clist = s->connections->at( signal_index );
if ( !clist ) { // create receiver list
clist = new TQConnectionList;
TQ_CHECK_PTR( clist );
- clist->setAutoDelete( TRUE );
+ clist->setAutoDelete( true );
s->connections->insert( signal_index, clist );
}
@@ -2273,10 +2273,10 @@ void TQObject::connectInternal( const TQObject *sender, int signal_index, const
switch ( membcode ) { // get receiver member
case TQ_SLOT_CODE:
- rm = rmeta->slot( member_index, TRUE );
+ rm = rmeta->slot( member_index, true );
break;
case TQ_SIGNAL_CODE:
- rm = rmeta->signal( member_index, TRUE );
+ rm = rmeta->signal( member_index, true );
break;
}
@@ -2388,11 +2388,11 @@ bool TQObject::disconnect( const TQObject *sender, const char *signal,
#if defined(QT_CHECK_NULL)
if ( sender == 0 || (receiver == 0 && member != 0) ) {
tqWarning( "TQObject::disconnect: Unexpected null parameter" );
- return FALSE;
+ return false;
}
#endif
if ( !sender->connections ) // no connected signals
- return FALSE;
+ return false;
TQObject *s = (TQObject *)sender;
TQObject *r = (TQObject *)receiver;
int member_index = -1;
@@ -2402,26 +2402,26 @@ bool TQObject::disconnect( const TQObject *sender, const char *signal,
membcode = member[0] - '0';
#if defined(QT_CHECK_RANGE)
if ( !check_member_code( membcode, r, member, "disconnect" ) )
- return FALSE;
+ return false;
#endif
++member;
TQMetaObject *rmeta = r->metaObject();
switch ( membcode ) { // get receiver member
case TQ_SLOT_CODE:
- member_index = rmeta->findSlot( member, TRUE );
+ member_index = rmeta->findSlot( member, true );
if ( member_index < 0 ) { // normalize and retry
nw_member = qt_rmWS(member); // remove whitespace
member = nw_member;
- member_index = rmeta->findSlot( member, TRUE );
+ member_index = rmeta->findSlot( member, true );
}
break;
case TQ_SIGNAL_CODE:
- member_index = rmeta->findSignal( member, TRUE );
+ member_index = rmeta->findSignal( member, true );
if ( member_index < 0 ) { // normalize and retry
nw_member = qt_rmWS(member); // remove whitespace
member = nw_member;
- member_index = rmeta->findSignal( member, TRUE );
+ member_index = rmeta->findSignal( member, true );
}
break;
}
@@ -2431,7 +2431,7 @@ bool TQObject::disconnect( const TQObject *sender, const char *signal,
err_info_about_candidates( membcode, rmeta, member, "connect" );
err_info_about_objects( "disconnect", sender, receiver );
#endif
- return FALSE;
+ return false;
}
}
@@ -2439,35 +2439,35 @@ bool TQObject::disconnect( const TQObject *sender, const char *signal,
if ( disconnectInternal( s, -1, r, membcode, member_index ) )
s->disconnectNotify( 0 );
else
- return FALSE;
+ return false;
} else { // specific signal
#if defined(QT_CHECK_RANGE)
if ( !check_signal_macro( s, signal, "disconnect", "unbind" ) )
- return FALSE;
+ return false;
#endif
TQCString nw_signal(signal); // Assume already normalized
++signal; // skip member type code
TQMetaObject *smeta = s->metaObject();
if ( !smeta ) // no meta object
- return FALSE;
- int signal_index = smeta->findSignal( signal, TRUE );
+ return false;
+ int signal_index = smeta->findSignal( signal, true );
if ( signal_index < 0 ) { // normalize and retry
nw_signal = qt_rmWS( signal-1 ); // remove whitespace
signal = nw_signal.data()+1; // skip member type code
- signal_index = smeta->findSignal( signal, TRUE );
+ signal_index = smeta->findSignal( signal, true );
}
if ( signal_index < 0 ) {
#if defined(QT_CHECK_RANGE)
tqWarning( "TQObject::disconnect: No such signal %s::%s",
s->className(), signal );
#endif
- return FALSE;
+ return false;
}
/* compatibility and safety: If a receiver has several slots
* with the same name, disconnect them all*/
- bool res = FALSE;
+ bool res = false;
if ( membcode == TQ_SLOT_CODE && r ) {
TQMetaObject * rmeta = r->metaObject();
do {
@@ -2482,7 +2482,7 @@ bool TQObject::disconnect( const TQObject *sender, const char *signal,
s->disconnectNotify( nw_signal );
return res;
}
- return TRUE;
+ return true;
}
/*! \internal */
@@ -2494,9 +2494,9 @@ bool TQObject::disconnectInternal( const TQObject *sender, int signal_index,
TQObject *r = (TQObject*)receiver;
if ( !s->connections )
- return FALSE;
+ return false;
- bool success = FALSE;
+ bool success = false;
TQConnectionList *clist;
TQConnection *c;
if ( signal_index == -1 ) {
@@ -2514,7 +2514,7 @@ bool TQObject::disconnectInternal( const TQObject *sender, int signal_index,
#ifdef TQT_THREAD_SUPPORT
if (c->object()->senderObjects) c->object()->senderObjects->listMutex->unlock();
#endif // TQT_THREAD_SUPPORT
- success = TRUE;
+ success = true;
c = clist->next();
} else if ( r == c->object() &&
( (member_index == -1) ||
@@ -2522,11 +2522,11 @@ bool TQObject::disconnectInternal( const TQObject *sender, int signal_index,
#ifdef TQT_THREAD_SUPPORT
if (c->object()->senderObjects) c->object()->senderObjects->listMutex->lock();
#endif // TQT_THREAD_SUPPORT
- removeObjFromList( c->object()->senderObjects, s, TRUE );
+ removeObjFromList( c->object()->senderObjects, s, true );
#ifdef TQT_THREAD_SUPPORT
if (c->object()->senderObjects) c->object()->senderObjects->listMutex->unlock();
#endif // TQT_THREAD_SUPPORT
- success = TRUE;
+ success = true;
clist->remove();
c = clist->current();
} else {
@@ -2539,7 +2539,7 @@ bool TQObject::disconnectInternal( const TQObject *sender, int signal_index,
} else {
clist = s->connections->at( signal_index );
if ( !clist )
- return FALSE;
+ return false;
c = clist->first();
while ( c ) { // for all receivers...
@@ -2547,11 +2547,11 @@ bool TQObject::disconnectInternal( const TQObject *sender, int signal_index,
#ifdef TQT_THREAD_SUPPORT
if (c->object()->senderObjects) c->object()->senderObjects->listMutex->lock();
#endif // TQT_THREAD_SUPPORT
- removeObjFromList( c->object()->senderObjects, s, TRUE );
+ removeObjFromList( c->object()->senderObjects, s, true );
#ifdef TQT_THREAD_SUPPORT
if (c->object()->senderObjects) c->object()->senderObjects->listMutex->unlock();
#endif // TQT_THREAD_SUPPORT
- success = TRUE;
+ success = true;
c = clist->next();
} else if ( r == c->object() &&
( (member_index == -1) ||
@@ -2559,11 +2559,11 @@ bool TQObject::disconnectInternal( const TQObject *sender, int signal_index,
#ifdef TQT_THREAD_SUPPORT
if (c->object()->senderObjects) c->object()->senderObjects->listMutex->lock();
#endif // TQT_THREAD_SUPPORT
- removeObjFromList( c->object()->senderObjects, s, TRUE );
+ removeObjFromList( c->object()->senderObjects, s, true );
#ifdef TQT_THREAD_SUPPORT
if (c->object()->senderObjects) c->object()->senderObjects->listMutex->unlock();
#endif // TQT_THREAD_SUPPORT
- success = TRUE;
+ success = true;
clist->remove();
c = clist->current();
} else {
@@ -2725,11 +2725,11 @@ TQMetaObject* TQObject::staticTQtMetaObject()
static const TQMetaEnum enum_tbl[] = {
- { "Alignment", 10, enum_0, TRUE },
- { "Orientation", 2, enum_1, FALSE },
- { "TextFormat", 4, enum_2, FALSE },
- { "BackgroundMode", 17, enum_3, FALSE },
- { "DateFormat", 3, enum_4, FALSE }
+ { "Alignment", 10, enum_0, true },
+ { "Orientation", 2, enum_1, false },
+ { "TextFormat", 4, enum_2, false },
+ { "BackgroundMode", 17, enum_3, false },
+ { "DateFormat", 3, enum_4, false }
};
#endif
@@ -3096,7 +3096,7 @@ void TQObject::dumpObjectInfo()
TQConnectionList *clist;
for ( uint i = 0; i < connections->size(); i++ ) {
if ( ( clist = connections->at( i ) ) ) {
- tqDebug( "\t%s", metaObject()->signal( i, TRUE )->name );
+ tqDebug( "\t%s", metaObject()->signal( i, true )->name );
n++;
TQConnection *c;
TQConnectionListIt cit(*clist);
@@ -3133,8 +3133,8 @@ void TQObject::dumpObjectInfo()
/*!
Sets the value of the object's \a name property to \a value.
- Returns TRUE if the operation was successful; otherwise returns
- FALSE.
+ Returns true if the operation was successful; otherwise returns
+ false.
Information about all available properties is provided through the
metaObject().
@@ -3144,19 +3144,19 @@ void TQObject::dumpObjectInfo()
bool TQObject::setProperty( const char *name, const TQVariant& value )
{
if ( !value.isValid() )
- return FALSE;
+ return false;
TQVariant v = value;
TQMetaObject* meta = metaObject();
if ( !meta )
- return FALSE;
- int id = meta->findProperty( name, TRUE );
- const TQMetaProperty* p = meta->property( id, TRUE );
+ return false;
+ int id = meta->findProperty( name, true );
+ const TQMetaProperty* p = meta->property( id, true );
if ( !p || !p->isValid() || !p->writable() ) {
tqWarning( "%s::setProperty( \"%s\", value ) failed: property invalid, read-only or does not exist",
className(), name );
- return FALSE;
+ return false;
}
if ( p->isEnumType() ) {
@@ -3173,7 +3173,7 @@ bool TQObject::setProperty( const char *name, const TQVariant& value )
v = TQVariant( p->keyToValue( value.toCString().data() ) );
}
} else if ( v.type() != TQVariant::Int && v.type() != TQVariant::UInt ) {
- return FALSE;
+ return false;
}
return tqt_property( id, 0, &v );
}
@@ -3182,7 +3182,7 @@ bool TQObject::setProperty( const char *name, const TQVariant& value )
if ( type == TQVariant::Invalid )
type = TQVariant::nameToType( p->type() );
if ( type != TQVariant::Invalid && !v.canCast( type ) )
- return FALSE;
+ return false;
return tqt_property( id, 0, &v );
}
@@ -3203,8 +3203,8 @@ TQVariant TQObject::property( const char *name ) const
TQMetaObject* meta = metaObject();
if ( !meta )
return v;
- int id = meta->findProperty( name, TRUE );
- const TQMetaProperty* p = meta->property( id, TRUE );
+ int id = meta->findProperty( name, true );
+ const TQMetaProperty* p = meta->property( id, true );
if ( !p || !p->isValid() ) {
tqWarning( "%s::property( \"%s\" ) failed: property invalid or does not exist",
className(), name );
diff --git a/src/kernel/tqobject.h b/src/kernel/tqobject.h
index 05ba4dc9d..44eb188c3 100644
--- a/src/kernel/tqobject.h
+++ b/src/kernel/tqobject.h
@@ -98,7 +98,7 @@ public:
virtual void setName( const char *name );
bool isWidgetType() const { return isWidget; }
- bool highPriority() const { return FALSE; }
+ bool highPriority() const { return false; }
bool signalsBlocked() const { return blockSig; }
void blockSignals( bool b );
@@ -107,7 +107,7 @@ public:
void killTimer( int id );
void killTimers();
- TQObject *child( const char *objName, const char *inheritsClass = 0, bool recursiveSearch = TRUE ); //### const in 4.0
+ TQObject *child( const char *objName, const char *inheritsClass = 0, bool recursiveSearch = true ); //### const in 4.0
const TQObjectList *children() const { return childObjects; }
TQObjectList childrenListObject();
const TQObjectList childrenListObject() const;
@@ -117,8 +117,8 @@ public:
TQObjectList *queryList( const char *inheritsClass = 0,
const char *objName = 0,
- bool regexpMatch = TRUE,
- bool recursiveSearch = TRUE ) const;
+ bool regexpMatch = true,
+ bool recursiveSearch = true ) const;
virtual void insertChild( TQObject * );
virtual void removeChild( TQObject * );
diff --git a/src/kernel/tqobjectcleanuphandler.cpp b/src/kernel/tqobjectcleanuphandler.cpp
index f06ebb7f3..452e4cad9 100644
--- a/src/kernel/tqobjectcleanuphandler.cpp
+++ b/src/kernel/tqobjectcleanuphandler.cpp
@@ -77,7 +77,7 @@
// TQLibraryInterface implementation
bool FactoryComponent::init()
{
- return TRUE;
+ return true;
}
void FactoryComponent::cleanup()
@@ -120,7 +120,7 @@ TQObject* TQObjectCleanupHandler::add( TQObject* object )
if ( !cleanupObjects ) {
cleanupObjects = new TQObjectList;
- cleanupObjects->setAutoDelete( TRUE );
+ cleanupObjects->setAutoDelete( true );
}
connect( object, TQ_SIGNAL(destroyed(TQObject*)), this, TQ_SLOT(objectDestroyed(TQObject*)) );
cleanupObjects->insert( 0, object );
@@ -142,12 +142,12 @@ void TQObjectCleanupHandler::remove( TQObject *object )
}
/*!
- Returns TRUE if this cleanup handler is empty or if all objects in
- this cleanup handler have been destroyed; otherwise return FALSE.
+ Returns true if this cleanup handler is empty or if all objects in
+ this cleanup handler have been destroyed; otherwise return false.
*/
bool TQObjectCleanupHandler::isEmpty() const
{
- return cleanupObjects ? cleanupObjects->isEmpty() : TRUE;
+ return cleanupObjects ? cleanupObjects->isEmpty() : true;
}
/*!
@@ -163,10 +163,10 @@ void TQObjectCleanupHandler::clear()
void TQObjectCleanupHandler::objectDestroyed( TQObject*object )
{
if ( cleanupObjects )
- cleanupObjects->setAutoDelete( FALSE );
+ cleanupObjects->setAutoDelete( false );
remove( object );
if ( cleanupObjects )
- cleanupObjects->setAutoDelete( TRUE );
+ cleanupObjects->setAutoDelete( true );
}
diff --git a/src/kernel/tqobjectdict.h b/src/kernel/tqobjectdict.h
index c51123054..8a92a62b0 100644
--- a/src/kernel/tqobjectdict.h
+++ b/src/kernel/tqobjectdict.h
@@ -54,7 +54,7 @@
class TQ_EXPORT TQObjectDictionary : public TQAsciiDict<TQMetaObject>
{
public:
- TQObjectDictionary(int size=17,bool cs=TRUE,bool ck=TRUE)
+ TQObjectDictionary(int size=17,bool cs=true,bool ck=true)
: TQAsciiDict<TQMetaObject>(size,cs,ck) {}
TQObjectDictionary( const TQObjectDictionary &dict )
: TQAsciiDict<TQMetaObject>(dict) {}
diff --git a/src/kernel/tqpaintdevice.h b/src/kernel/tqpaintdevice.h
index a846f6911..ebb0c6a5a 100644
--- a/src/kernel/tqpaintdevice.h
+++ b/src/kernel/tqpaintdevice.h
@@ -210,7 +210,7 @@ protected:
void copyX11Data( const TQPaintDevice * );
void cloneX11Data( const TQPaintDevice * );
virtual void setX11Data( const TQPaintDeviceX11Data* );
- TQPaintDeviceX11Data* getX11Data( bool def=FALSE ) const;
+ TQPaintDeviceX11Data* getX11Data( bool def=false ) const;
#elif defined(TQ_WS_MAC)
#if !defined( TQMAC_NO_QUARTZ )
CGContextRef ctx;
@@ -230,7 +230,7 @@ protected:
friend class TQPaintDeviceMetrics;
#if defined(TQ_WS_MAC)
#ifndef TQMAC_NO_QUARTZ
- virtual CGContextRef macCGContext(bool clipped=TRUE) const;
+ virtual CGContextRef macCGContext(bool clipped=true) const;
#endif
friend TQ_EXPORT void unclippedScaledBitBlt( TQPaintDevice *, int, int, int, int,
const TQPaintDevice *, int, int, int, int, TQt::RasterOp, bool, bool );
@@ -280,7 +280,7 @@ private: // Disabled copy constructor and operator=
TQ_EXPORT
void bitBlt( TQPaintDevice *dst, int dx, int dy,
const TQPaintDevice *src, int sx=0, int sy=0, int sw=-1, int sh=-1,
- TQt::RasterOp = TQt::CopyROP, bool ignoreMask=FALSE );
+ TQt::RasterOp = TQt::CopyROP, bool ignoreMask=false );
TQ_EXPORT
void bitBlt( TQPaintDevice *dst, int dx, int dy,
@@ -395,7 +395,7 @@ inline bool TQPaintDevice::x11AppDefaultVisual()
TQ_EXPORT
inline void bitBlt( TQPaintDevice *dst, const TQPoint &dp,
const TQPaintDevice *src, const TQRect &sr =TQRect(0,0,-1,-1),
- TQt::RasterOp rop=TQt::CopyROP, bool ignoreMask=FALSE )
+ TQt::RasterOp rop=TQt::CopyROP, bool ignoreMask=false )
{
bitBlt( dst, dp.x(), dp.y(), src, sr.x(), sr.y(), sr.width(), sr.height(),
rop, ignoreMask );
diff --git a/src/kernel/tqpaintdevice_x11.cpp b/src/kernel/tqpaintdevice_x11.cpp
index efeaf78fa..dd6251e2a 100644
--- a/src/kernel/tqpaintdevice_x11.cpp
+++ b/src/kernel/tqpaintdevice_x11.cpp
@@ -210,8 +210,8 @@ void TQPaintDevice::setX11Data( const TQPaintDeviceX11Data* d )
/*
\internal
- If \a def is FALSE, returns a deep copy of the x11Data, or 0 if x11Data is 0.
- If \a def is TRUE, makes a TQPaintDeviceX11Data struct filled with the default
+ If \a def is false, returns a deep copy of the x11Data, or 0 if x11Data is 0.
+ If \a def is true, makes a TQPaintDeviceX11Data struct filled with the default
values.
In either case the caller is responsible for deleting the returned
@@ -259,8 +259,8 @@ TQPaintDeviceX11Data* TQPaintDevice::getX11Data( bool def ) const
/*!
\fn bool TQPaintDevice::isExtDev() const
- Returns TRUE if the device is an external paint device; otherwise
- returns FALSE.
+ Returns true if the device is an external paint device; otherwise
+ returns false.
External paint devices cannot be bitBlt()'ed from. TQPicture and
TQPrinter are external paint devices.
@@ -373,9 +373,9 @@ TQt::HANDLE TQPaintDevice::x11RenderHandle() const
/*!
\fn bool TQPaintDevice::x11AppDefaultVisual ()
- Returns TRUE if the Visual used is the default for the default
+ Returns true if the Visual used is the default for the default
screen of the X display global to the application (X11 only);
- otherwise returns FALSE. Using this function is not portable.
+ otherwise returns false. Using this function is not portable.
*/
/*!
@@ -441,9 +441,9 @@ TQt::HANDLE TQPaintDevice::x11RenderHandle() const
\overload
\fn bool TQPaintDevice::x11AppDefaultVisual( int screen )
- Returns TRUE if the Visual used is the default for screen
+ Returns true if the Visual used is the default for screen
\a screen of the X display global to the application (X11 only);
- otherwise returns FALSE. Using this function is not portable.
+ otherwise returns false. Using this function is not portable.
*/
@@ -686,9 +686,9 @@ int TQPaintDevice::x11AppDpiY()
/*!
\fn bool TQPaintDevice::paintingActive() const
- Returns TRUE if the device is being painted, i.e. someone has
+ Returns true if the device is being painted, i.e. someone has
called TQPainter::begin() but not yet called TQPainter::end() for
- this device; otherwise returns FALSE.
+ this device; otherwise returns false.
\sa TQPainter::isActive()
*/
@@ -706,7 +706,7 @@ bool TQPaintDevice::cmd( int, TQPainter *, TQPDevCmdParam * )
#if defined(QT_CHECK_STATE)
tqWarning( "TQPaintDevice::cmd: Device has no command interface" );
#endif
- return FALSE;
+ return false;
}
/*!
@@ -758,7 +758,7 @@ int TQPaintDevice::fontInf( TQFont *, int ) const
// and the pixmap size doesn't exceed 128x128.
//
-static bool init_mask_gc = FALSE;
+static bool init_mask_gc = false;
static const int max_mask_gcs = 11; // suitable for hashing
struct mask_gc {
@@ -772,7 +772,7 @@ static mask_gc gc_vec[max_mask_gcs];
static void cleanup_mask_gc()
{
Display *dpy = TQPaintDevice::x11AppDisplay();
- init_mask_gc = FALSE;
+ init_mask_gc = false;
for ( int i=0; i<max_mask_gcs; i++ ) {
if ( gc_vec[i].gc )
XFreeGC( dpy, gc_vec[i].gc );
@@ -782,7 +782,7 @@ static void cleanup_mask_gc()
static GC cache_mask_gc( Display *dpy, Drawable hd, int mask_no, Pixmap mask )
{
if ( !init_mask_gc ) { // first time initialization
- init_mask_gc = TRUE;
+ init_mask_gc = true;
tqAddPostRoutine( cleanup_mask_gc );
for ( int i=0; i<max_mask_gcs; i++ )
gc_vec[i].gc = 0;
@@ -813,7 +813,7 @@ static GC cache_mask_gc( Display *dpy, Drawable hd, int mask_no, Pixmap mask )
The most common values for \a rop are CopyROP and XorROP; the \l
TQt::RasterOp documentation defines all the possible values.
- If \a ignoreMask is FALSE (the default) and \a src is a
+ If \a ignoreMask is false (the default) and \a src is a
masked TQPixmap, the entire blit is masked by \a{src}->mask().
If \a src, \a dst, \a sw or \a sh is 0, bitBlt() does nothing. If
@@ -867,22 +867,22 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy,
if ( dst->paintingActive() && dst->isExtDev() ) {
TQPixmap *pm; // output to picture/printer
- bool tmp_pm = TRUE;
+ bool tmp_pm = true;
if ( ts == TQInternal::Pixmap ) {
pm = (TQPixmap*)src;
if ( sx != 0 || sy != 0 ||
sw != pm->width() || sh != pm->height() || ignoreMask ) {
TQPixmap *tmp = new TQPixmap( sw, sh, pm->depth() );
- bitBlt( tmp, 0, 0, pm, sx, sy, sw, sh, TQt::CopyROP, TRUE );
+ bitBlt( tmp, 0, 0, pm, sx, sy, sw, sh, TQt::CopyROP, true );
if ( pm->mask() && !ignoreMask ) {
TQBitmap mask( sw, sh );
bitBlt( &mask, 0, 0, pm->mask(), sx, sy, sw, sh,
- TQt::CopyROP, TRUE );
+ TQt::CopyROP, true );
tmp->setMask( mask );
}
pm = tmp;
} else {
- tmp_pm = FALSE;
+ tmp_pm = false;
}
} else if ( ts == TQInternal::Widget ) {// bitBlt to temp pixmap
pm = new TQPixmap( sw, sh );
@@ -949,8 +949,8 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy,
bool mono_src;
bool mono_dst;
- bool include_inferiors = FALSE;
- bool graphics_exposure = FALSE;
+ bool include_inferiors = false;
+ bool graphics_exposure = false;
TQPixmap *src_pm;
TQBitmap *mask;
@@ -962,7 +962,7 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy,
mask = ignoreMask ? 0 : src_pm->data->mask;
} else {
src_pm = 0;
- mono_src = FALSE;
+ mono_src = false;
mask = 0;
include_inferiors = ((TQWidget*)src)->testWFlags(TQt::WPaintUnclipped);
graphics_exposure = td == TQInternal::Widget;
@@ -973,7 +973,7 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy,
mono_dst = ((TQPixmap*)dst)->depth() == 1;
((TQPixmap*)dst)->detach(); // changes shared pixmap
} else {
- mono_dst = FALSE;
+ mono_dst = false;
include_inferiors = include_inferiors ||
((TQWidget*)dst)->testWFlags(TQt::WPaintUnclipped);
}
@@ -999,7 +999,7 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy,
picmask |= CPSubwindowMode;
}
if (graphics_exposure) {
- pattr.graphics_exposures = TRUE;
+ pattr.graphics_exposures = true;
picmask |= CPGraphicsExposure;
}
if (picmask)
@@ -1009,7 +1009,7 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy,
sx, sy, sx, sy, dx, dy, sw, sh);
// restore attributes
pattr.subwindow_mode = ClipByChildren;
- pattr.graphics_exposures = FALSE;
+ pattr.graphics_exposures = false;
if (picmask)
XRenderChangePicture(dpy, dst->x11RenderHandle(), picmask, &pattr);
return;
@@ -1020,11 +1020,11 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy,
GC gc;
if ( mask && !mono_src ) { // fast masked blt
- bool temp_gc = FALSE;
+ bool temp_gc = false;
if ( mask->data->maskgc ) {
gc = (GC)mask->data->maskgc; // we have a premade mask GC
} else {
- if ( FALSE && src_pm->optimization() == TQPixmap::NormalOptim ) { // #### cache disabled
+ if ( false && src_pm->optimization() == TQPixmap::NormalOptim ) { // #### cache disabled
// Compete for the global cache
gc = cache_mask_gc( dpy, dst->handle(),
mask->data->ser_no,
@@ -1039,7 +1039,7 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy,
if ( src_pm->optimization() == TQPixmap::BestOptim ) {
mask->data->maskgc = gc;
} else {
- temp_gc = TRUE;
+ temp_gc = true;
}
}
}
@@ -1095,14 +1095,14 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy,
gcvals.ts_x_origin = dx - sx;
gcvals.ts_y_origin = dy - sy;
- bool clipmask = FALSE;
+ bool clipmask = false;
if ( mask ) {
if ( ((TQPixmap*)src)->data->selfmask ) {
gcvals.fill_style = FillStippled;
} else {
XSetClipMask( dpy, gc, mask->handle() );
XSetClipOrigin( dpy, gc, dx-sx, dy-sy );
- clipmask = TRUE;
+ clipmask = true;
}
}
diff --git a/src/kernel/tqpainter.cpp b/src/kernel/tqpainter.cpp
index 7b30e0af6..156f3774a 100644
--- a/src/kernel/tqpainter.cpp
+++ b/src/kernel/tqpainter.cpp
@@ -198,7 +198,7 @@ typedef TQPtrStack<TQWMatrix> TQWMatrixStack;
After all the coordinate transformation is done, TQPainter can clip
the drawing to an arbitrary rectangle or region. hasClipping() is
- TRUE if TQPainter clips, and clipRegion() returns the clip region.
+ true if TQPainter clips, and clipRegion() returns the clip region.
You can set it using either setClipRegion() or setClipRect().
Note that the clipping can be slow. It's all system-dependent,
but as a rule of thumb, you can assume that drawing speed is
@@ -470,7 +470,7 @@ TQPainter::TQPainter()
Constructs a painter that begins painting the paint device \a pd
immediately. Depending on the underlying graphic system the
painter will paint over children of the paintdevice if \a
- unclipped is TRUE.
+ unclipped is true.
This constructor is convenient for short-lived painters, e.g. in a
\link TQWidget::paintEvent() paint event\endlink and should be used
@@ -516,7 +516,7 @@ TQPainter::TQPainter( const TQPaintDevice *pd, bool unclipped )
Constructs a painter that begins painting the paint device \a pd
immediately, with the default arguments taken from \a
copyAttributes. The painter will paint over children of the paint
- device if \a unclipped is TRUE (although this is not supported on
+ device if \a unclipped is true (although this is not supported on
all platforms).
\sa begin()
@@ -557,7 +557,7 @@ TQPainter::~TQPainter()
This version opens the painter on a paint device \a pd and sets
the initial pen, background color and font from \a copyAttributes,
painting over the paint device's children when \a unclipped is
- TRUE. This is equivalent to:
+ true. This is equivalent to:
\code
TQPainter p;
@@ -595,15 +595,15 @@ bool TQPainter::begin( const TQPaintDevice *pd, const TQWidget *copyAttributes,
tqWarning( "TQPainter::begin: The widget to copy attributes from cannot "
"be null" );
#endif
- return FALSE;
+ return false;
}
if ( begin( pd, unclipped ) ) {
setPen( copyAttributes->foregroundColor() );
setBackgroundColor( copyAttributes->backgroundColor() );
setFont( copyAttributes->font() );
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -624,9 +624,9 @@ void TQPainter::setf( uint b, bool v )
/*!
\fn bool TQPainter::isActive() const
- Returns TRUE if the painter is active painting, i.e. begin() has
+ Returns true if the painter is active painting, i.e. begin() has
been called and end() has not yet been called; otherwise returns
- FALSE.
+ false.
\sa TQPaintDevice::paintingActive()
*/
@@ -705,7 +705,7 @@ void TQPainter::save()
if ( pss == 0 ) {
pss = new TQPtrStack<TQPState>;
TQ_CHECK_PTR( pss );
- pss->setAutoDelete( TRUE );
+ pss->setAutoDelete( true );
ps_stack = pss;
}
TQPState *ps = new TQPState;
@@ -749,7 +749,7 @@ void TQPainter::restore()
if ( testf(ExtDev) ) {
pdev->cmd( TQPaintDevice::PdcRestore, this, 0 );
if ( pdev->devType() == TQInternal::Picture )
- block_ext = TRUE;
+ block_ext = true;
}
TQPStateStack *pss = (TQPStateStack *)ps_stack;
if ( pss == 0 || pss->isEmpty() ) {
@@ -808,7 +808,7 @@ void TQPainter::restore()
wm_stack = ps->wm_stack;
#endif
delete ps;
- block_ext = FALSE;
+ block_ext = false;
}
typedef TQPtrDict<TQPaintDevice> TQPaintDeviceDict;
@@ -1198,8 +1198,8 @@ void TQPainter::setTabArray( int *ta )
#ifndef TQT_NO_TRANSFORMATIONS
/*!
- Enables view transformations if \a enable is TRUE, or disables
- view transformations if \a enable is FALSE.
+ Enables view transformations if \a enable is true, or disables
+ view transformations if \a enable is false.
\sa hasViewXForm(), setWindow(), setViewport(), setWorldMatrix(),
setWorldXForm(), xForm()
@@ -1225,8 +1225,8 @@ void TQPainter::setViewXForm( bool enable )
/*!
\fn bool TQPainter::hasViewXForm() const
- Returns TRUE if view transformation is enabled; otherwise returns
- FALSE.
+ Returns true if view transformation is enabled; otherwise returns
+ false.
\sa setViewXForm(), xForm()
*/
@@ -1278,7 +1278,7 @@ void TQPainter::setWindow( int x, int y, int w, int h )
if ( testf(VxF) )
updateXForm();
else
- setViewXForm( TRUE );
+ setViewXForm( true );
}
/*!
@@ -1328,13 +1328,13 @@ void TQPainter::setViewport( int x, int y, int w, int h )
if ( testf(VxF) )
updateXForm();
else
- setViewXForm( TRUE );
+ setViewXForm( true );
}
/*!
- Enables world transformations if \a enable is TRUE, or disables
- world transformations if \a enable is FALSE. The world
+ Enables world transformations if \a enable is true, or disables
+ world transformations if \a enable is false. The world
transformation matrix is not changed.
\sa setWorldMatrix(), setWindow(), setViewport(), setViewXForm(),
@@ -1361,8 +1361,8 @@ void TQPainter::setWorldXForm( bool enable )
/*!
\fn bool TQPainter::hasWorldXForm() const
- Returns TRUE if world transformation is enabled; otherwise returns
- FALSE.
+ Returns true if world transformation is enabled; otherwise returns
+ false.
\sa setWorldXForm()
*/
@@ -1382,12 +1382,12 @@ const TQWMatrix &TQPainter::worldMatrix() const
Sets the world transformation matrix to \a m and enables world
transformation.
- If \a combine is TRUE, then \a m is combined with the current
+ If \a combine is true, then \a m is combined with the current
transformation matrix, otherwise \a m replaces the current
transformation matrix.
- If \a m is the identity matrix and \a combine is FALSE, this
- function calls setWorldXForm(FALSE). (The identity matrix is the
+ If \a m is the identity matrix and \a combine is false, this
+ function calls setWorldXForm(false). (The identity matrix is the
matrix where TQWMatrix::m11() and TQWMatrix::m22() are 1.0 and the
rest are 0.0.)
@@ -1411,7 +1411,7 @@ const TQWMatrix &TQPainter::worldMatrix() const
{
TQWMatrix m;
m.rotate( a );
- setWorldMatrix( m, TRUE );
+ setWorldMatrix( m, true );
}
\endcode
@@ -1449,9 +1449,9 @@ void TQPainter::setWorldMatrix( const TQWMatrix &m, bool combine )
pdev->cmd( TQPaintDevice::PdcSetWMatrix, this, param );
}
if ( identity && pdev->devType() != TQInternal::Picture )
- setWorldXForm( FALSE );
+ setWorldXForm( false );
else if ( !testf(WxF) )
- setWorldXForm( TRUE );
+ setWorldXForm( true );
else
updateXForm();
}
@@ -1467,7 +1467,7 @@ void TQPainter::saveWorldMatrix()
if ( stack == 0 ) {
stack = new TQPtrStack<TQWMatrix>;
TQ_CHECK_PTR( stack );
- stack->setAutoDelete( TRUE );
+ stack->setAutoDelete( true );
wm_stack = stack;
}
@@ -1520,7 +1520,7 @@ void TQPainter::translate( double dx, double dy )
#ifndef TQT_NO_TRANSFORMATIONS
TQWMatrix m;
m.translate( dx, dy );
- setWorldMatrix( m, TRUE );
+ setWorldMatrix( m, true );
#else
xlatex += (int)dx;
xlatey += (int)dy;
@@ -1541,7 +1541,7 @@ void TQPainter::scale( double sx, double sy )
{
TQWMatrix m;
m.scale( sx, sy );
- setWorldMatrix( m, TRUE );
+ setWorldMatrix( m, true );
}
/*!
@@ -1555,7 +1555,7 @@ void TQPainter::shear( double sh, double sv )
{
TQWMatrix m;
m.shear( sv, sh );
- setWorldMatrix( m, TRUE );
+ setWorldMatrix( m, true );
}
/*!
@@ -1569,7 +1569,7 @@ void TQPainter::rotate( double a )
{
TQWMatrix m;
m.rotate( a );
- setWorldMatrix( m, TRUE );
+ setWorldMatrix( m, true );
}
@@ -1589,8 +1589,8 @@ void TQPainter::resetXForm()
ww = vw = pdev->metric( TQPaintDeviceMetrics::PdmWidth );
wh = vh = pdev->metric( TQPaintDeviceMetrics::PdmHeight );
wxmat = TQWMatrix();
- setWorldXForm( FALSE );
- setViewXForm( FALSE );
+ setWorldXForm( false );
+ setViewXForm( false );
}
/*!
@@ -1614,7 +1614,7 @@ void TQPainter::updateXForm()
}
xmat = m;
- txinv = FALSE; // no inverted matrix
+ txinv = false; // no inverted matrix
txop = TxNone;
if ( m12()==0.0 && m21()==0.0 && m11() >= 0.0 && m22() >= 0.0 ) {
if ( m11()==1.0 && m22()==1.0 ) {
@@ -1643,9 +1643,9 @@ void TQPainter::updateXForm()
void TQPainter::updateInvXForm()
{
#if defined(QT_CHECK_STATE)
- Q_ASSERT( txinv == FALSE );
+ Q_ASSERT( txinv == false );
#endif
- txinv = TRUE; // creating inverted matrix
+ txinv = true; // creating inverted matrix
bool invertible;
TQWMatrix m;
if ( testf(VxF) ) {
@@ -2143,7 +2143,7 @@ void TQPainter::fillRect( int x, int y, int w, int h, const TQBrush &brush )
/*!
\fn bool TQPainter::hasClipping() const
- Returns TRUE if clipping has been set; otherwise returns FALSE.
+ Returns true if clipping has been set; otherwise returns false.
\sa setClipping()
*/
@@ -2799,13 +2799,13 @@ void qt_format_text( const TQFont& font, const TQRect &_r,
// tabs by spaces
TQChar *chr = (TQChar*)text.unicode();
const TQChar *end = chr + len;
- bool haveLineSep = FALSE;
+ bool haveLineSep = false;
while ( chr != end ) {
if ( *chr == '\r' || ( singleline && *chr == '\n' ) ) {
*chr = ' ';
} else if ( *chr == '\n' ) {
*chr = TQChar_linesep;
- haveLineSep = TRUE;
+ haveLineSep = true;
} else if ( *chr == '&' ) {
++maxUnderlines;
}
@@ -2944,8 +2944,8 @@ void qt_format_text( const TQFont& font, const TQRect &_r,
}
if (!(tf & TQPainter::DontPrint)) {
- bool restoreClipping = FALSE;
- bool painterHasClip = FALSE;
+ bool restoreClipping = false;
+ bool painterHasClip = false;
TQRegion painterClipRegion;
if ( !dontclip ) {
#ifndef TQT_NO_TRANSFORMATIONS
@@ -2959,14 +2959,14 @@ void qt_format_text( const TQFont& font, const TQRect &_r,
painterHasClip = painter->hasClipping();
painterClipRegion = painter->clipRegion();
- restoreClipping = TRUE;
+ restoreClipping = true;
painter->setClipRegion( reg );
} else {
if ( painter->hasClipping() ){
painterHasClip = painter->hasClipping();
painterClipRegion = painter->clipRegion();
- restoreClipping = TRUE;
- painter->setClipping( FALSE );
+ restoreClipping = true;
+ painter->setClipping( false );
}
}
@@ -3439,8 +3439,8 @@ void TQPen::setColor( const TQColor &c )
/*!
\fn bool TQPen::operator!=( const TQPen &p ) const
- Returns TRUE if the pen is different from \a p; otherwise returns
- FALSE.
+ Returns true if the pen is different from \a p; otherwise returns
+ false.
Two pens are different if they have different styles, widths or
colors.
@@ -3449,7 +3449,7 @@ void TQPen::setColor( const TQColor &c )
*/
/*!
- Returns TRUE if the pen is equal to \a p; otherwise returns FALSE.
+ Returns true if the pen is equal to \a p; otherwise returns false.
Two pens are equal if they have equal styles, widths and colors.
@@ -3816,8 +3816,8 @@ void TQBrush::setPixmap( const TQPixmap &pixmap )
/*!
\fn bool TQBrush::operator!=( const TQBrush &b ) const
- Returns TRUE if the brush is different from \a b; otherwise
- returns FALSE.
+ Returns true if the brush is different from \a b; otherwise
+ returns false.
Two brushes are different if they have different styles, colors or
pixmaps.
@@ -3826,8 +3826,8 @@ void TQBrush::setPixmap( const TQPixmap &pixmap )
*/
/*!
- Returns TRUE if the brush is equal to \a b; otherwise returns
- FALSE.
+ Returns true if the brush is equal to \a b; otherwise returns
+ false.
Two brushes are equal if they have equal styles, colors and
pixmaps.
diff --git a/src/kernel/tqpainter.h b/src/kernel/tqpainter.h
index 29a10406d..67dae0f6f 100644
--- a/src/kernel/tqpainter.h
+++ b/src/kernel/tqpainter.h
@@ -68,12 +68,12 @@ public:
enum CoordinateMode { CoordDevice, CoordPainter };
TQPainter();
- TQPainter( const TQPaintDevice *, bool unclipped = FALSE );
- TQPainter( const TQPaintDevice *, const TQWidget *, bool unclipped = FALSE );
+ TQPainter( const TQPaintDevice *, bool unclipped = false );
+ TQPainter( const TQPaintDevice *, const TQWidget *, bool unclipped = false );
~TQPainter();
- bool begin( const TQPaintDevice *, bool unclipped = FALSE );
- bool begin( const TQPaintDevice *, const TQWidget *, bool unclipped = FALSE );
+ bool begin( const TQPaintDevice *, bool unclipped = false );
+ bool begin( const TQPaintDevice *, const TQWidget *, bool unclipped = false );
bool end();
TQPaintDevice *device() const;
@@ -135,7 +135,7 @@ public:
void setWorldXForm( bool ); // set world xform on/off
const TQWMatrix &worldMatrix() const; // get/set world xform matrix
- void setWorldMatrix( const TQWMatrix &, bool combine=FALSE );
+ void setWorldMatrix( const TQWMatrix &, bool combine=false );
void saveWorldMatrix();
void restoreWorldMatrix();
@@ -201,7 +201,7 @@ public:
int index=0, int nlines=-1 );
void drawPolyline( const TQPointArray &,
int index=0, int npoints=-1 );
- void drawPolygon( const TQPointArray &, bool winding=FALSE,
+ void drawPolygon( const TQPointArray &, bool winding=false,
int index=0, int npoints=-1 );
void drawConvexPolygon( const TQPointArray &,
int index=0, int npoints=-1 );
@@ -298,7 +298,7 @@ private:
void map( int, int, int, int, int *, int *, int *, int * ) const;
void mapInv( int, int, int *, int * ) const;
void mapInv( int, int, int, int, int *, int *, int *, int * ) const;
- void drawPolyInternal( const TQPointArray &, bool close=TRUE );
+ void drawPolyInternal( const TQPointArray &, bool close=true );
void drawWinFocusRect( int x, int y, int w, int h, bool xorPaint,
const TQColor &penColor );
@@ -394,7 +394,7 @@ protected:
uint clip_serial; // clipping serial number
#elif defined(TQ_WS_MAC)
TQt::HANDLE hd; // handle to drawable
- void initPaintDevice(bool force=FALSE, TQPoint *off=NULL, TQRegion *rgn=NULL);
+ void initPaintDevice(bool force=false, TQPoint *off=NULL, TQRegion *rgn=NULL);
friend const TQRegion &qt_mac_update_painter(TQPainter *, bool);
friend class TQFontEngineMac;
friend class TQMacPainter;
diff --git a/src/kernel/tqpainter_x11.cpp b/src/kernel/tqpainter_x11.cpp
index e477f2aaa..a25614691 100644
--- a/src/kernel/tqpainter_x11.cpp
+++ b/src/kernel/tqpainter_x11.cpp
@@ -225,14 +225,14 @@ inline double qsin( double a )
return(r);
}
-double qsincos( double a, bool calcCos=FALSE )
+double qsincos( double a, bool calcCos=false )
{
return calcCos ? qcos(a) : qsin(a);
}
#else
-double qsincos( double a, bool calcCos=FALSE )
+double qsincos( double a, bool calcCos=false )
{
if ( calcCos ) // calculate cosine
a -= Q_PI2;
@@ -258,8 +258,8 @@ double qsincos( double a, bool calcCos=FALSE )
return (a-a3/6+a5/120-a7/5040+a9/362880-a11/39916800)*sign;
}
-inline double qsin( double a ) { return qsincos(a, FALSE); }
-inline double qcos( double a ) { return qsincos(a, TRUE); }
+inline double qsin( double a ) { return qsincos(a, false); }
+inline double qcos( double a ) { return qsincos(a, true); }
#endif
@@ -282,14 +282,14 @@ struct TQGC
const int gc_array_size = 256;
static TQGC gc_array[gc_array_size]; // array of GCs
-static bool gc_array_init = FALSE;
+static bool gc_array_init = false;
static void init_gc_array()
{
if ( !gc_array_init ) {
memset( gc_array, 0, gc_array_size*sizeof(TQGC) );
- gc_array_init = TRUE;
+ gc_array_init = true;
}
}
@@ -303,17 +303,17 @@ static void cleanup_gc_array( Display *dpy )
XFreeGC( dpy, p->gc );
p++;
}
- gc_array_init = FALSE;
+ gc_array_init = false;
}
}
// #define DONT_USE_GC_ARRAY
-static GC alloc_gc( Display *dpy, int scrn, Drawable hd, bool monochrome=FALSE,
- bool privateGC = FALSE )
+static GC alloc_gc( Display *dpy, int scrn, Drawable hd, bool monochrome=false,
+ bool privateGC = false )
{
#if defined(DONT_USE_GC_ARRAY)
- privateGC = TRUE; // will be slower
+ privateGC = true; // will be slower
#endif
if ( privateGC ) {
GC gc = XCreateGC( dpy, hd, 0, 0 );
@@ -329,11 +329,11 @@ static GC alloc_gc( Display *dpy, int scrn, Drawable hd, bool monochrome=FALSE,
p->gc = XCreateGC( dpy, hd, 0, 0 );
p->scrn = scrn;
XSetGraphicsExposures( dpy, p->gc, False );
- p->in_use = FALSE;
+ p->in_use = false;
p->mono = monochrome;
}
if ( !p->in_use && p->mono == monochrome && p->scrn == scrn ) {
- p->in_use = TRUE; // available/compatible GC
+ p->in_use = true; // available/compatible GC
return p->gc;
}
p++;
@@ -346,10 +346,10 @@ static GC alloc_gc( Display *dpy, int scrn, Drawable hd, bool monochrome=FALSE,
return gc;
}
-static void free_gc( Display *dpy, GC gc, bool privateGC = FALSE )
+static void free_gc( Display *dpy, GC gc, bool privateGC = false )
{
#if defined(DONT_USE_GC_ARRAY)
- privateGC = TRUE; // will be slower
+ privateGC = true; // will be slower
#endif
if ( privateGC ) {
Q_ASSERT( dpy != 0 );
@@ -361,7 +361,7 @@ static void free_gc( Display *dpy, GC gc, bool privateGC = FALSE )
if ( gc_array_init ) {
while ( i-- ) {
if ( p->gc == gc ) {
- p->in_use = FALSE; // set available
+ p->in_use = false; // set available
XSetClipMask( dpy, gc, None ); // make it reusable
XSetFunction( dpy, gc, GXcopy );
XSetFillStyle( dpy, gc, FillSolid );
@@ -408,14 +408,14 @@ struct TQGCC // cached GC
const int gc_cache_size = 29; // multiply by 4
static TQGCC *gc_cache_buf;
static TQGCC *gc_cache[4*gc_cache_size];
-static bool gc_cache_init = FALSE;
+static bool gc_cache_init = false;
static uint gc_cache_clip_serial = 0;
static void init_gc_cache()
{
if ( !gc_cache_init ) {
- gc_cache_init = TRUE;
+ gc_cache_init = true;
gc_cache_clip_serial = 0;
TQGCC *g = gc_cache_buf = new TQGCC[4*gc_cache_size];
memset( g, 0, 4*gc_cache_size*sizeof(TQGCC) );
@@ -461,7 +461,7 @@ static void cleanup_gc_cache()
}
#endif
delete [] gc_cache_buf;
- gc_cache_init = FALSE;
+ gc_cache_init = false;
}
@@ -499,13 +499,13 @@ static bool obtain_gc( void **ref, GC *gc, uint pix, Display *dpy, int scrn,
gc_cache[k-1] = g;
*ref = (void *)g;
*gc = g->gc;
- return TRUE;
+ return true;
} else { // all GCs in use
#if defined(GC_CACHE_STAT)
g_numfaults++;
#endif
*ref = 0;
- return FALSE;
+ return false;
}
}
}
@@ -527,19 +527,19 @@ static bool obtain_gc( void **ref, GC *gc, uint pix, Display *dpy, int scrn,
gc_cache[k] = prev;
gc_cache[k-1] = g;
}
- return TRUE;
+ return true;
} else { // create new GC
#if defined(GC_CACHE_STAT)
g_numcreates++;
#endif
- g->gc = alloc_gc( dpy, scrn, hd, FALSE );
+ g->gc = alloc_gc( dpy, scrn, hd, false );
g->scrn = scrn;
g->pix = pix;
g->count = 1;
g->hits = 1;
g->clip_serial = 0;
*gc = g->gc;
- return FALSE;
+ return false;
}
}
@@ -607,7 +607,7 @@ void TQPainter::init()
penRef = brushRef = 0;
clip_serial = 0;
pfont = 0;
- block_ext = FALSE;
+ block_ext = false;
}
@@ -681,7 +681,7 @@ void TQPainter::updatePen()
(ps == NoPen || ps == SolidLine) &&
cpen.width() == 0 && rop == CopyROP;
- bool obtained = FALSE;
+ bool obtained = false;
bool internclipok = hasClipping();
if ( cacheIt ) {
if ( gc ) {
@@ -693,7 +693,7 @@ void TQPainter::updatePen()
obtained = obtain_gc(&penRef, &gc, cpen.color().pixel(scrn), dpy, scrn,
hd, clip_serial);
if ( !obtained && !penRef )
- gc = alloc_gc( dpy, scrn, hd, FALSE );
+ gc = alloc_gc( dpy, scrn, hd, false );
} else {
if ( gc ) {
if ( penRef ) {
@@ -701,7 +701,7 @@ void TQPainter::updatePen()
penRef = 0;
gc = alloc_gc( dpy, scrn, hd, testf(MonoDev) );
} else {
- internclipok = TRUE;
+ internclipok = true;
}
} else {
gc = alloc_gc( dpy, scrn, hd, testf(MonoDev), testf(UsePrivateCx) );
@@ -738,7 +738,7 @@ void TQPainter::updatePen()
*/
int dot = cpen.width(); // width of a dot
int fudge = 1;
- bool allow_zero_lw = TRUE;
+ bool allow_zero_lw = true;
if ( dot <= 1 ) {
dot = 3;
fudge = 2;
@@ -753,13 +753,13 @@ void TQPainter::updatePen()
dashes[0] = fudge * 3 * dot;
dashes[1] = fudge * dot;
dash_len = 2;
- allow_zero_lw = FALSE;
+ allow_zero_lw = false;
break;
case DotLine:
dashes[0] = dot;
dashes[1] = dot;
dash_len = 2;
- allow_zero_lw = FALSE;
+ allow_zero_lw = false;
break;
case DashDotLine:
dashes[0] = 3 * dot;
@@ -767,7 +767,7 @@ void TQPainter::updatePen()
dashes[2] = dot;
dashes[3] = fudge * dot;
dash_len = 4;
- allow_zero_lw = FALSE;
+ allow_zero_lw = false;
break;
case DashDotDotLine:
dashes[0] = 3 * dot;
@@ -777,14 +777,14 @@ void TQPainter::updatePen()
dashes[4] = dot;
dashes[5] = dot;
dash_len = 6;
- allow_zero_lw = FALSE;
+ allow_zero_lw = false;
break;
case FineDotLine:
dot = 1;
dashes[0] = dot;
dashes[1] = dot;
dash_len = 2;
- allow_zero_lw = FALSE;
+ allow_zero_lw = false;
}
Q_ASSERT( dash_len <= (int) sizeof(dashes) );
@@ -888,7 +888,7 @@ void TQPainter::updateBrush()
(bs == NoBrush || bs == SolidPattern) &&
bro.x() == 0 && bro.y() == 0 && rop == CopyROP;
- bool obtained = FALSE;
+ bool obtained = false;
bool internclipok = hasClipping();
if ( cacheIt ) {
if ( gc_brush ) {
@@ -900,7 +900,7 @@ void TQPainter::updateBrush()
obtained = obtain_gc(&brushRef, &gc_brush, cbrush.color().pixel(scrn), dpy,
scrn, hd, clip_serial);
if ( !obtained && !brushRef )
- gc_brush = alloc_gc( dpy, scrn, hd, FALSE );
+ gc_brush = alloc_gc( dpy, scrn, hd, false );
} else {
if ( gc_brush ) {
if ( brushRef ) {
@@ -908,7 +908,7 @@ void TQPainter::updateBrush()
brushRef = 0;
gc_brush = alloc_gc( dpy, scrn, hd, testf(MonoDev) );
} else {
- internclipok = TRUE;
+ internclipok = true;
}
} else {
gc_brush = alloc_gc( dpy, scrn, hd, testf(MonoDev), testf(UsePrivateCx));
@@ -955,9 +955,9 @@ void TQPainter::updateBrush()
TQString key;
key.sprintf( "$qt-brush$%d", bs );
pm = TQPixmapCache::find( key );
- bool del = FALSE;
+ bool del = false;
if ( !pm ) { // not already in pm dict
- pm = new TQBitmap( d, d, pat, TRUE );
+ pm = new TQBitmap( d, d, pat, true );
TQ_CHECK_PTR( pm );
del = !TQPixmapCache::insert( key, pm );
}
@@ -981,8 +981,8 @@ void TQPainter::updateBrush()
/*!
- Begins painting the paint device \a pd and returns TRUE if
- successful; otherwise returns FALSE. If \a unclipped is TRUE, the
+ Begins painting the paint device \a pd and returns true if
+ successful; otherwise returns false. If \a unclipped is true, the
painting will not be clipped at the paint device's boundaries,
(although this is not supported by all platforms).
@@ -1015,13 +1015,13 @@ bool TQPainter::begin( const TQPaintDevice *pd, bool unclipped )
tqWarning( "TQPainter::begin: Painter is already active."
"\n\tYou must end() the painter before a second begin()" );
#endif
- return FALSE;
+ return false;
}
if ( pd == 0 ) {
#if defined(QT_CHECK_NULL)
tqWarning( "TQPainter::begin: Paint device cannot be null" );
#endif
- return FALSE;
+ return false;
}
TQPixmap::x11SetDefaultScreen( pd->x11Screen() );
@@ -1042,7 +1042,7 @@ bool TQPainter::begin( const TQPaintDevice *pd, bool unclipped )
"this device;\n\tAn extended paint device can only be "
"painted by one TQPainter at a time." );
#endif
- return FALSE;
+ return false;
}
bool reinit = flags != IsStartingUp; // 2nd or 3rd etc. time called
@@ -1067,7 +1067,7 @@ bool TQPainter::begin( const TQPaintDevice *pd, bool unclipped )
else
flags = IsStartingUp;
pdev = 0;
- return FALSE;
+ return false;
}
if ( tabstops ) // update tabstops for device
setTabStops( tabstops );
@@ -1131,7 +1131,7 @@ bool TQPainter::begin( const TQPaintDevice *pd, bool unclipped )
tqWarning( "TQPainter::begin: Cannot paint null pixmap" );
#endif
end();
- return FALSE;
+ return false;
}
bool mono = pm->depth() == 1; // monochrome bitmap
if ( mono ) {
@@ -1160,7 +1160,7 @@ bool TQPainter::begin( const TQPaintDevice *pd, bool unclipped )
clip_serial = gc_cache_clip_serial++;
updateBrush();
updatePen();
- return TRUE;
+ return true;
}
/*!
@@ -1190,7 +1190,7 @@ bool TQPainter::end() // end painting
#if defined(QT_CHECK_STATE)
tqWarning( "TQPainter::end: Missing begin() or begin() failed" );
#endif
- return FALSE;
+ return false;
}
killPStack();
@@ -1243,7 +1243,7 @@ bool TQPainter::end() // end painting
pdev->painters--;
pdev = 0;
dpy = 0;
- return TRUE;
+ return true;
}
/*!
@@ -1451,8 +1451,8 @@ void TQPainter::setBrushOrigin( int x, int y )
/*!
- Enables clipping if \a enable is TRUE, or disables clipping if \a
- enable is FALSE.
+ Enables clipping if \a enable is true, or disables clipping if \a
+ enable is false.
\sa hasClipping(), setClipRect(), setClipRegion()
*/
@@ -1543,7 +1543,7 @@ void TQPainter::setClipRegion( const TQRegion &rgn, CoordinateMode m )
return; // device cannot clip
}
clearf( ClipOn ); // be sure to update clip rgn
- setClipping( TRUE );
+ setClipping( true );
}
@@ -1803,7 +1803,7 @@ void TQPainter::drawRect( int x, int y, int w, int h )
void TQPainter::drawWinFocusRect( int x, int y, int w, int h )
{
- drawWinFocusRect( x, y, w, h, TRUE, color0 );
+ drawWinFocusRect( x, y, w, h, true, color0 );
}
/*!
@@ -1828,7 +1828,7 @@ void TQPainter::drawWinFocusRect( int x, int y, int w, int h )
void TQPainter::drawWinFocusRect( int x, int y, int w, int h,
const TQColor &bgColor )
{
- drawWinFocusRect( x, y, w, h, FALSE, bgColor );
+ drawWinFocusRect( x, y, w, h, false, bgColor );
}
@@ -2119,7 +2119,7 @@ void TQPainter::drawArc( int x, int y, int w, int h, int a, int alen )
if ( txop == TxRotShear ) { // rotate/shear
TQPointArray pa;
pa.makeArc( x, y, w, h, a, alen, xmat ); // arc polyline
- drawPolyInternal( pa, FALSE );
+ drawPolyInternal( pa, false );
return;
}
map( x, y, w, h, &x, &y, &w, &h );
@@ -2202,7 +2202,7 @@ void TQPainter::drawPie( int x, int y, int w, int h, int a, int alen )
XFillArc( dpy, hd, gc_brush, x, y, w, h, a*4, alen*4 );
if ( nopen ) {
g = gc_brush;
- nopen = FALSE;
+ nopen = false;
}
}
if ( !nopen ) { // draw pie outline
@@ -2278,7 +2278,7 @@ void TQPainter::drawChord( int x, int y, int w, int h, int a, int alen )
XFillArc( dpy, hd, gc_brush, x, y, w, h, a*4, alen*4 );
if ( nopen ) {
g = gc_brush;
- nopen = FALSE;
+ nopen = false;
}
}
if ( !nopen ) { // draw chord outline
@@ -2419,8 +2419,8 @@ static int global_polygon_shape = Complex;
The first point is always connected to the last point.
The polygon is filled with the current brush(). If \a winding is
- TRUE, the polygon is filled using the winding fill algorithm. If
- \a winding is FALSE, the polygon is filled using the even-odd
+ true, the polygon is filled using the winding fill algorithm. If
+ \a winding is false, the polygon is filled using the even-odd
(alternative) fill algorithm.
\warning On X11, coordinates that do not fit into 16-bit signed
@@ -2502,7 +2502,7 @@ void TQPainter::drawConvexPolygon( const TQPointArray &pa,
int index, int npoints )
{
global_polygon_shape = Convex;
- drawPolygon(pa, FALSE, index, npoints);
+ drawPolygon(pa, false, index, npoints);
global_polygon_shape = Complex;
}
@@ -2617,11 +2617,11 @@ void TQPainter::drawPixmap( int x, int y, const TQPixmap &pixmap,
if ( sx != 0 || sy != 0 ||
sw != pixmap.width() || sh != pixmap.height() ) {
TQPixmap tmp( sw, sh, pixmap.depth() );
- bitBlt( &tmp, 0, 0, &pixmap, sx, sy, sw, sh, CopyROP, TRUE );
+ bitBlt( &tmp, 0, 0, &pixmap, sx, sy, sw, sh, CopyROP, true );
if ( pixmap.mask() ) {
TQBitmap mask( sw, sh );
bitBlt( &mask, 0, 0, pixmap.mask(), sx, sy, sw, sh,
- CopyROP, TRUE );
+ CopyROP, true );
tmp.setMask( mask );
}
drawPixmap( x, y, tmp );
@@ -2706,7 +2706,7 @@ void TQPainter::drawPixmap( int x, int y, const TQPixmap &pixmap,
TQBitmap *comb = new TQBitmap( sw, sh );
comb->detach();
- GC cgc = tqt_xget_temp_gc( pixmap.x11Screen(), TRUE ); // get temporary mono GC
+ GC cgc = tqt_xget_temp_gc( pixmap.x11Screen(), true ); // get temporary mono GC
XSetForeground( dpy, cgc, 0 );
XFillRectangle( dpy, comb->handle(), cgc, 0, 0, sw, sh );
XSetBackground( dpy, cgc, 0 );
@@ -2792,15 +2792,15 @@ static void drawTile( TQPainter *p, int x, int y, int w, int h,
static void fillTile( TQPixmap *tile, const TQPixmap &pixmap )
{
- bitBlt( tile, 0, 0, &pixmap, 0, 0, -1, -1, TQt::CopyROP, TRUE );
+ bitBlt( tile, 0, 0, &pixmap, 0, 0, -1, -1, TQt::CopyROP, true );
int x = pixmap.width();
while ( x < tile->width() ) {
- bitBlt( tile, x,0, tile, 0,0, x,pixmap.height(), TQt::CopyROP, TRUE );
+ bitBlt( tile, x,0, tile, 0,0, x,pixmap.height(), TQt::CopyROP, true );
x *= 2;
}
int y = pixmap.height();
while ( y < tile->height() ) {
- bitBlt( tile, 0,y, tile, 0,0, tile->width(),y, TQt::CopyROP, TRUE );
+ bitBlt( tile, 0,y, tile, 0,0, tile->width(),y, TQt::CopyROP, true );
y *= 2;
}
}
@@ -3001,7 +3001,7 @@ void qt_draw_background( TQPainter *p, int x, int y, int w, int h )
return;
}
XSetForeground( p->dpy, p->gc, p->bg_col.pixel(p->scrn) );
- qt_draw_transformed_rect( p, x, y, w, h, TRUE);
+ qt_draw_transformed_rect( p, x, y, w, h, true);
XSetForeground( p->dpy, p->gc, p->cpen.color().pixel(p->scrn) );
}
diff --git a/src/kernel/tqpalette.cpp b/src/kernel/tqpalette.cpp
index fad57ce13..7fc7dff8c 100644
--- a/src/kernel/tqpalette.cpp
+++ b/src/kernel/tqpalette.cpp
@@ -484,15 +484,15 @@ void TQColorGroup::setBrush( ColorRole r, const TQBrush &b )
/*!
\fn bool TQColorGroup::operator!=( const TQColorGroup &g ) const
- Returns TRUE if this color group is different from \a g; otherwise
- returns FALSE.
+ Returns true if this color group is different from \a g; otherwise
+ returns false.
\sa operator!=()
*/
/*!
- Returns TRUE if this color group is equal to \a g; otherwise
- returns FALSE.
+ Returns true if this color group is equal to \a g; otherwise
+ returns false.
\sa operator==()
*/
@@ -500,11 +500,11 @@ void TQColorGroup::setBrush( ColorRole r, const TQBrush &b )
bool TQColorGroup::operator==( const TQColorGroup &g ) const
{
if ( d == g.d )
- return TRUE;
+ return true;
for( int r = 0 ; r < NColorRoles ; r++ )
if ( br[r] != g.br[r] )
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
@@ -883,13 +883,13 @@ void TQPalette::setInactive( const TQColorGroup &g )
/*!
\fn bool TQPalette::operator!=( const TQPalette &p ) const
- Returns TRUE (slowly) if this palette is different from \a p;
- otherwise returns FALSE (usually quickly).
+ Returns true (slowly) if this palette is different from \a p;
+ otherwise returns false (usually quickly).
*/
/*!
- Returns TRUE (usually quickly) if this palette is equal to \a p;
- otherwise returns FALSE (slowly).
+ Returns true (usually quickly) if this palette is equal to \a p;
+ otherwise returns false (slowly).
*/
bool TQPalette::operator==( const TQPalette &p ) const
@@ -1059,9 +1059,9 @@ TQDataStream &operator>>( TQDataStream &s, TQPalette &p )
#endif //TQT_NO_DATASTREAM
/*!
- Returns TRUE if this palette and \a p are copies of each other,
+ Returns true if this palette and \a p are copies of each other,
i.e. one of them was created as a copy of the other and neither
- was subsequently modified; otherwise returns FALSE. This is much
+ was subsequently modified; otherwise returns false. This is much
stricter than equality.
\sa operator=() operator==()
diff --git a/src/kernel/tqpicture.cpp b/src/kernel/tqpicture.cpp
index c0fb3d008..692e9087a 100644
--- a/src/kernel/tqpicture.cpp
+++ b/src/kernel/tqpicture.cpp
@@ -145,7 +145,7 @@ TQPicture::TQPicture( int formatVersion )
if ( formatVersion > 0 && formatVersion != (int)mfhdr_maj ) {
d->formatMajor = formatVersion;
d->formatMinor = 0;
- d->formatOk = FALSE;
+ d->formatOk = false;
}
else {
d->resetFormat();
@@ -176,8 +176,8 @@ TQPicture::~TQPicture()
/*!
\fn bool TQPicture::isNull() const
- Returns TRUE if the picture contains no data; otherwise returns
- FALSE.
+ Returns true if the picture contains no data; otherwise returns
+ false.
*/
/*!
@@ -217,7 +217,7 @@ void TQPicture::setData( const char* data, uint size )
/*!
Loads a picture from the file specified by \a fileName and returns
- TRUE if successful; otherwise returns FALSE.
+ true if successful; otherwise returns false.
By default, the file will be interpreted as being in the native
TQPicture format. Specifying the \a format string is optional and
@@ -236,7 +236,7 @@ bool TQPicture::load( const TQString &fileName, const char *format )
{
TQFile f( fileName );
if ( !f.open(IO_ReadOnly) )
- return FALSE;
+ return false;
return load( &f, format );
}
@@ -252,7 +252,7 @@ bool TQPicture::load( TQIODevice *dev, const char *format )
if ( qstrcmp( format, "svg" ) == 0 ) {
TQSvgDevice svg;
if ( !svg.load( dev ) )
- return FALSE;
+ return false;
TQPainter p( this );
bool b = svg.play( &p );
d->brect = svg.boundingRect();
@@ -261,7 +261,7 @@ bool TQPicture::load( TQIODevice *dev, const char *format )
#endif
if ( format ) {
tqWarning( "TQPicture::load: No such picture format: %s", format );
- return FALSE;
+ return false;
}
detach();
@@ -272,7 +272,7 @@ bool TQPicture::load( TQIODevice *dev, const char *format )
/*!
Saves a picture to the file specified by \a fileName and returns
- TRUE if successful; otherwise returns FALSE.
+ true if successful; otherwise returns false.
Specifying the file \a format string is optional. It's not
recommended unless you intend to export the picture data for
@@ -294,7 +294,7 @@ bool TQPicture::save( const TQString &fileName, const char *format )
tqWarning( "TQPicture::save: still being painted on. "
"Call TQPainter::end() first" );
#endif
- return FALSE;
+ return false;
}
#ifndef TQT_NO_SVG
@@ -304,7 +304,7 @@ bool TQPicture::save( const TQString &fileName, const char *format )
TQSvgDevice svg;
TQPainter p( &svg );
if ( !play( &p ) )
- return FALSE;
+ return false;
svg.setBoundingRect( boundingRect() );
return svg.save( fileName );
}
@@ -312,7 +312,7 @@ bool TQPicture::save( const TQString &fileName, const char *format )
TQFile f( fileName );
if ( !f.open(IO_WriteOnly) )
- return FALSE;
+ return false;
return save( &f, format );
}
@@ -329,7 +329,7 @@ bool TQPicture::save( TQIODevice *dev, const char *format )
tqWarning( "TQPicture::save: still being painted on. "
"Call TQPainter::end() first" );
#endif
- return FALSE;
+ return false;
}
#ifndef TQT_NO_SVG
@@ -337,18 +337,18 @@ bool TQPicture::save( TQIODevice *dev, const char *format )
TQSvgDevice svg;
TQPainter p( &svg );
if ( !play( &p ) )
- return FALSE;
+ return false;
svg.setBoundingRect( boundingRect() );
return svg.save( dev );
}
#endif
if ( format ) {
tqWarning( "TQPicture::save: No such picture format: %s", format );
- return FALSE;
+ return false;
}
dev->writeBlock( d->pictb.buffer().data(), d->pictb.buffer().size() );
- return TRUE;
+ return true;
}
/*!
@@ -376,8 +376,8 @@ void TQPicture::setBoundingRect( const TQRect &r )
}
/*!
- Replays the picture using \a painter, and returns TRUE if
- successful; otherwise returns FALSE.
+ Replays the picture using \a painter, and returns true if
+ successful; otherwise returns false.
This function does exactly the same as TQPainter::drawPicture()
with (x, y) = (0, 0).
@@ -386,10 +386,10 @@ void TQPicture::setBoundingRect( const TQRect &r )
bool TQPicture::play( TQPainter *painter )
{
if ( d->pictb.size() == 0 ) // nothing recorded
- return TRUE;
+ return true;
if ( !d->formatOk && !d->checkFormat() )
- return FALSE;
+ return false;
d->pictb.open( IO_ReadOnly ); // open buffer device
TQDataStream s;
@@ -412,10 +412,10 @@ bool TQPicture::play( TQPainter *painter )
tqWarning( "TQPicture::play: Format error" );
#endif
d->pictb.close();
- return FALSE;
+ return false;
}
d->pictb.close();
- return TRUE; // no end-command
+ return true; // no end-command
}
@@ -562,11 +562,11 @@ bool TQPicture::exec( TQPainter *painter, TQDataStream &s, int nrecords )
case PdcBegin:
s >> ul; // number of records
if ( !exec( painter, s, ul ) )
- return FALSE;
+ return false;
break;
case PdcEnd:
if ( nrecords == 0 )
- return TRUE;
+ return true;
break;
case PdcSave:
painter->save();
@@ -679,7 +679,7 @@ bool TQPicture::exec( TQPainter *painter, TQDataStream &s, int nrecords )
Q_ASSERT( TQ_INT32(s.device()->at() - strm_pos) == len );
#endif
}
- return FALSE;
+ return false;
}
@@ -719,8 +719,8 @@ bool TQPicture::TQPicturePrivate::cmd( int c, TQPainter *pt, TQPDevCmdParam *p )
}
trecs = 0;
s << (TQ_UINT32)trecs; // total number of records
- formatOk = FALSE;
- return TRUE;
+ formatOk = false;
+ return true;
} else if ( c == PdcEnd ) { // end; calc checksum and close
trecs++;
s << (TQ_UINT8)c << (TQ_UINT8)0;
@@ -739,14 +739,14 @@ bool TQPicture::TQPicturePrivate::cmd( int c, TQPainter *pt, TQPDevCmdParam *p )
TQ_UINT16 cs = (TQ_UINT16)tqChecksum( buf.data()+data_start, pos-data_start );
s << cs; // write checksum
pictb.close();
- return TRUE;
+ return true;
}
trecs++;
s << (TQ_UINT8)c; // write cmd to stream
s << (TQ_UINT8)0; // write dummy length info
int pos = (int)pictb.at(); // save position
TQRect br; // bounding rect addition
- bool corr = FALSE; // correction for pen width
+ bool corr = false; // correction for pen width
switch ( c ) {
case PdcDrawPoint:
@@ -755,18 +755,18 @@ bool TQPicture::TQPicturePrivate::cmd( int c, TQPainter *pt, TQPDevCmdParam *p )
case PdcSetBrushOrigin:
s << *p[0].point;
br = TQRect( *p[0].point, TQSize( 1, 1 ) );
- corr = TRUE;
+ corr = true;
break;
case PdcDrawLine:
s << *p[0].point << *p[1].point;
br = TQRect( *p[0].point, *p[1].point ).normalize();
- corr = TRUE;
+ corr = true;
break;
case PdcDrawRect:
case PdcDrawEllipse:
s << *p[0].rect;
br = *p[0].rect;
- corr = TRUE;
+ corr = true;
break;
case PdcDrawRoundRect:
case PdcDrawArc:
@@ -774,25 +774,25 @@ bool TQPicture::TQPicturePrivate::cmd( int c, TQPainter *pt, TQPDevCmdParam *p )
case PdcDrawChord:
s << *p[0].rect << (TQ_INT16)p[1].ival << (TQ_INT16)p[2].ival;
br = *p[0].rect;
- corr = TRUE;
+ corr = true;
break;
case PdcDrawLineSegments:
case PdcDrawPolyline:
s << *p[0].ptarr;
br = p[0].ptarr->boundingRect();
- corr = TRUE;
+ corr = true;
break;
#ifndef TQT_NO_BEZIER
case PdcDrawCubicBezier:
s << *p[0].ptarr;
br = p[0].ptarr->cubicBezier().boundingRect();
- corr = TRUE;
+ corr = true;
break;
#endif
case PdcDrawPolygon:
s << *p[0].ptarr << (TQ_INT8)p[1].ival;
br = p[0].ptarr->boundingRect();
- corr = TRUE;
+ corr = true;
break;
case PdcDrawText2:
if ( formatMajor == 1 ) {
@@ -935,7 +935,7 @@ bool TQPicture::TQPicturePrivate::cmd( int c, TQPainter *pt, TQPDevCmdParam *p )
brect |= br; // merge with existing rect
}
- return TRUE;
+ return true;
}
@@ -1087,12 +1087,12 @@ TQPicture& TQPicture::operator= (const TQPicture& p)
/*!
\internal
- Sets formatOk to FALSE and resets the format version numbers to default
+ Sets formatOk to false and resets the format version numbers to default
*/
void TQPicture::TQPicturePrivate::resetFormat()
{
- formatOk = FALSE;
+ formatOk = false;
formatMajor = mfhdr_maj;
formatMinor = mfhdr_min;
}
@@ -1100,8 +1100,8 @@ void TQPicture::TQPicturePrivate::resetFormat()
/*!
\internal
- Checks data integrity and format version number. Set formatOk to TRUE
- on success, to FALSE otherwise. Returns the resulting formatOk value.
+ Checks data integrity and format version number. Set formatOk to true
+ on success, to false otherwise. Returns the resulting formatOk value.
*/
bool TQPicture::TQPicturePrivate::checkFormat()
@@ -1110,7 +1110,7 @@ bool TQPicture::TQPicturePrivate::checkFormat()
// can't check anything in an empty buffer
if ( pictb.size() == 0 )
- return FALSE;
+ return false;
pictb.open( IO_ReadOnly ); // open buffer device
TQDataStream s;
@@ -1123,7 +1123,7 @@ bool TQPicture::TQPicturePrivate::checkFormat()
tqWarning( "TQPicture::checkFormat: Incorrect header" );
#endif
pictb.close();
- return FALSE;
+ return false;
}
int cs_start = sizeof(TQ_UINT32); // pos of checksum word
@@ -1138,7 +1138,7 @@ bool TQPicture::TQPicturePrivate::checkFormat()
ccs, cs );
#endif
pictb.close();
- return FALSE;
+ return false;
}
TQ_UINT16 major, minor;
@@ -1149,7 +1149,7 @@ bool TQPicture::TQPicturePrivate::checkFormat()
major, minor);
#endif
pictb.close();
- return FALSE;
+ return false;
}
s.setVersion( major != 4 ? major : 3 );
@@ -1166,14 +1166,14 @@ bool TQPicture::TQPicturePrivate::checkFormat()
tqWarning( "TQPicture::checkFormat: Format error" );
#endif
pictb.close();
- return FALSE;
+ return false;
}
pictb.close();
- formatOk = TRUE; // picture seems to be ok
+ formatOk = true; // picture seems to be ok
formatMajor = major;
formatMinor = minor;
- return TRUE;
+ return true;
}
/*****************************************************************************
diff --git a/src/kernel/tqpixmap.cpp b/src/kernel/tqpixmap.cpp
index c3eceba6b..db404beee 100644
--- a/src/kernel/tqpixmap.cpp
+++ b/src/kernel/tqpixmap.cpp
@@ -207,7 +207,7 @@ TQPixmap::TQPixmap( int w, int h, int depth, bool bitmap,
TQPixmap::TQPixmap()
: TQPaintDevice( TQInternal::Pixmap )
{
- init( 0, 0, 0, FALSE, defOptim );
+ init( 0, 0, 0, false, defOptim );
}
/*!
@@ -219,7 +219,7 @@ TQPixmap::TQPixmap()
TQPixmap::TQPixmap( const TQImage& image )
: TQPaintDevice( TQInternal::Pixmap )
{
- init( 0, 0, 0, FALSE, defOptim );
+ init( 0, 0, 0, false, defOptim );
convertFromImage( image );
}
@@ -242,7 +242,7 @@ TQPixmap::TQPixmap( const TQImage& image )
TQPixmap::TQPixmap( int w, int h, int depth, Optimization optimization )
: TQPaintDevice( TQInternal::Pixmap )
{
- init( w, h, depth, FALSE, optimization );
+ init( w, h, depth, false, optimization );
}
/*!
@@ -255,7 +255,7 @@ TQPixmap::TQPixmap( int w, int h, int depth, Optimization optimization )
TQPixmap::TQPixmap( const TQSize &size, int depth, Optimization optimization )
: TQPaintDevice( TQInternal::Pixmap )
{
- init( size.width(), size.height(), depth, FALSE, optimization );
+ init( size.width(), size.height(), depth, false, optimization );
}
#ifndef TQT_NO_IMAGEIO
@@ -281,7 +281,7 @@ TQPixmap::TQPixmap( const TQString& fileName, const char *format,
int conversion_flags )
: TQPaintDevice( TQInternal::Pixmap )
{
- init( 0, 0, 0, FALSE, defOptim );
+ init( 0, 0, 0, false, defOptim );
load( fileName, format, conversion_flags );
}
@@ -302,7 +302,7 @@ TQPixmap::TQPixmap( const TQString& fileName, const char *format,
TQPixmap::TQPixmap( const TQString& fileName, const char *format, ColorMode mode )
: TQPaintDevice( TQInternal::Pixmap )
{
- init( 0, 0, 0, FALSE, defOptim );
+ init( 0, 0, 0, false, defOptim );
load( fileName, format, mode );
}
@@ -332,7 +332,7 @@ TQPixmap::TQPixmap( const TQString& fileName, const char *format, ColorMode mode
TQPixmap::TQPixmap( const char *xpm[] )
: TQPaintDevice( TQInternal::Pixmap )
{
- init( 0, 0, 0, FALSE, defOptim );
+ init( 0, 0, 0, false, defOptim );
TQImage image( xpm );
if ( !image.isNull() )
convertFromImage( image );
@@ -348,7 +348,7 @@ TQPixmap::TQPixmap( const char *xpm[] )
TQPixmap::TQPixmap( const TQByteArray & img_data )
: TQPaintDevice( TQInternal::Pixmap )
{
- init( 0, 0, 0, FALSE, defOptim );
+ init( 0, 0, 0, false, defOptim );
loadFromData( img_data );
}
#endif //TQT_NO_IMAGEIO
@@ -437,7 +437,7 @@ TQPixmap TQPixmap::copy( bool ignoreMask ) const
#endif // TQ_WS_X11
if ( ignoreMask )
- bitBlt( &pm, 0, 0, this, 0, 0, data->w, data->h, TQt::CopyROP, TRUE );
+ bitBlt( &pm, 0, 0, this, 0, 0, data->w, data->h, TQt::CopyROP, true );
else
copyBlt( &pm, 0, 0, this, 0, 0, data->w, data->h );
}
@@ -468,7 +468,7 @@ TQPixmap &TQPixmap::operator=( const TQPixmap &pixmap )
if ( pixmap.paintingActive() ) { // make a deep copy
init( pixmap.width(), pixmap.height(), pixmap.depth(),
pixmap.data->bitmap, pixmap.data->optim );
- data->uninit = FALSE;
+ data->uninit = false;
if ( !isNull() )
copyBlt( this, 0, 0, &pixmap, 0, 0, pixmap.width(), pixmap.height() );
pixmap.data->deref();
@@ -508,13 +508,13 @@ TQPixmap &TQPixmap::operator=( const TQImage &image )
/*!
\fn bool TQPixmap::isTQBitmap() const
- Returns TRUE if this is a TQBitmap; otherwise returns FALSE.
+ Returns true if this is a TQBitmap; otherwise returns false.
*/
/*!
\fn bool TQPixmap::isNull() const
- Returns TRUE if this is a null pixmap; otherwise returns FALSE.
+ Returns true if this is a null pixmap; otherwise returns false.
A null pixmap has zero width, zero height and no contents. You
cannot draw in a null pixmap or bitBlt() anything to it.
@@ -666,7 +666,7 @@ void TQPixmap::resize( int w, int h )
if ( !data->uninit && !isNull() ) // has existing pixmap
bitBlt( &pm, 0, 0, this, 0, 0, // copy old pixmap
TQMIN(width(), w),
- TQMIN(height(),h), CopyROP, TRUE );
+ TQMIN(height(),h), CopyROP, true );
#if defined(TQ_WS_MAC)
if(data->alphapm) {
data->alphapm->resize(w, h);
@@ -724,16 +724,16 @@ void TQPixmap::setMask( const TQBitmap &newmask )
const TQPixmap *tmp = &newmask; // dec cxx bug
if ( (data == tmp->data) ||
( newmask.handle() && newmask.handle() == handle() ) ) {
- TQPixmap m = tmp->copy( TRUE );
+ TQPixmap m = tmp->copy( true );
setMask( *((TQBitmap*)&m) );
- data->selfmask = TRUE; // mask == pixmap
+ data->selfmask = true; // mask == pixmap
return;
}
if ( newmask.isNull() ) { // reset the mask
if (data->mask) {
detach();
- data->selfmask = FALSE;
+ data->selfmask = false;
delete data->mask;
data->mask = 0;
@@ -742,7 +742,7 @@ void TQPixmap::setMask( const TQBitmap &newmask )
}
detach();
- data->selfmask = FALSE;
+ data->selfmask = false;
if ( newmask.width() != width() || newmask.height() != height() ) {
#if defined(QT_CHECK_RANGE)
@@ -760,7 +760,7 @@ void TQPixmap::setMask( const TQBitmap &newmask )
delete data->mask;
TQBitmap* newmaskcopy;
if ( newmask.mask() )
- newmaskcopy = (TQBitmap*)new TQPixmap( tmp->copy( TRUE ) );
+ newmaskcopy = (TQBitmap*)new TQPixmap( tmp->copy( true ) );
else
newmaskcopy = new TQBitmap( newmask );
#ifdef TQ_WS_X11
@@ -773,8 +773,8 @@ void TQPixmap::setMask( const TQBitmap &newmask )
/*!
\fn bool TQPixmap::selfMask() const
- Returns TRUE if the pixmap's mask is identical to the pixmap
- itself; otherwise returns FALSE.
+ Returns true if the pixmap's mask is identical to the pixmap
+ itself; otherwise returns false.
\sa mask()
*/
@@ -795,7 +795,7 @@ void TQPixmap::setMask( const TQBitmap &newmask )
TQImage, non-trivial computations and a transformation back to a
TQBitmap.
- If \a clipTight is TRUE the mask is just large enough to cover the
+ If \a clipTight is true the mask is just large enough to cover the
pixels; otherwise, the mask is larger than the data pixels.
\sa TQImage::createHeuristicMask()
@@ -825,8 +825,8 @@ const char* TQPixmap::imageFormat( const TQString &fileName )
}
/*!
- Loads a pixmap from the file \a fileName at runtime. Returns TRUE
- if successful; otherwise returns FALSE.
+ Loads a pixmap from the file \a fileName at runtime. Returns true
+ if successful; otherwise returns false.
If \a format is specified, the loader attempts to read the pixmap
using the specified format. If \a format is not specified
@@ -892,7 +892,7 @@ bool TQPixmap::load( const TQString &fileName, const char *format,
\overload
Converts \a image and sets this pixmap using color mode \a mode.
- Returns TRUE if successful; otherwise returns FALSE.
+ Returns true if successful; otherwise returns false.
\sa TQPixmap::ColorMode
*/
@@ -902,7 +902,7 @@ bool TQPixmap::convertFromImage( const TQImage &image, ColorMode mode )
if ( image.isNull() ) {
// convert null image to null pixmap
*this = TQPixmap();
- return TRUE;
+ return true;
}
int conversion_flags = 0;
@@ -922,7 +922,7 @@ bool TQPixmap::convertFromImage( const TQImage &image, ColorMode mode )
#ifndef TQT_NO_IMAGEIO
/*!
Loads a pixmap from the binary data in \a buf (\a len bytes).
- Returns TRUE if successful; otherwise returns FALSE.
+ Returns true if successful; otherwise returns false.
If \a format is specified, the loader attempts to read the pixmap
using the specified format. If \a format is not specified
@@ -961,8 +961,8 @@ bool TQPixmap::loadFromData( const uchar *buf, uint len, const char *format,
\overload
Loads a pixmap from the binary data in \a buf (\a len bytes) using
- color mode \a mode. Returns TRUE if successful; otherwise returns
- FALSE.
+ color mode \a mode. Returns true if successful; otherwise returns
+ false.
If \a format is specified, the loader attempts to read the pixmap
using the specified format. If \a format is not specified
@@ -1006,8 +1006,8 @@ bool TQPixmap::loadFromData( const TQByteArray &buf, const char *format,
format \a format and a quality factor \a quality. \a quality must
be in the range [0,100] or -1. Specify 0 to obtain small
compressed files, 100 for large uncompressed files, and -1 to use
- the default settings. Returns TRUE if successful; otherwise
- returns FALSE.
+ the default settings. Returns true if successful; otherwise
+ returns false.
\sa load(), loadFromData(), imageFormat(), TQImage::save(),
TQImageIO
@@ -1016,7 +1016,7 @@ bool TQPixmap::loadFromData( const TQByteArray &buf, const char *format,
bool TQPixmap::save( const TQString &fileName, const char *format, int quality ) const
{
if ( isNull() )
- return FALSE; // nothing to save
+ return false; // nothing to save
TQImageIO io( fileName, format );
return doImageIO( &io, quality );
}
@@ -1039,7 +1039,7 @@ bool TQPixmap::save( const TQString &fileName, const char *format, int quality )
bool TQPixmap::save( TQIODevice* device, const char* format, int quality ) const
{
if ( isNull() )
- return FALSE; // nothing to save
+ return false; // nothing to save
TQImageIO io( device, format );
return doImageIO( &io, quality );
}
@@ -1050,7 +1050,7 @@ bool TQPixmap::save( TQIODevice* device, const char* format, int quality ) const
bool TQPixmap::doImageIO( TQImageIO* io, int quality ) const
{
if ( !io )
- return FALSE;
+ return false;
io->setImage( convertToImage() );
#if defined(QT_CHECK_RANGE)
if ( quality > 100 || quality < -1 )
@@ -1116,8 +1116,8 @@ static TQPixmap grabChildWidgets( TQWidget * w )
TQPaintDevice *oldRedirect = TQPainter::redirect( w );
TQPainter::redirect( w, &res );
bool dblbfr = TQSharedDoubleBuffer::isDisabled();
- TQSharedDoubleBuffer::setDisabled( TRUE );
- TQPaintEvent e( w->rect(), FALSE );
+ TQSharedDoubleBuffer::setDisabled( true );
+ TQPaintEvent e( w->rect(), false );
TQApplication::sendEvent( w, &e );
TQSharedDoubleBuffer::setDisabled( dblbfr );
TQPainter::redirect( w, oldRedirect );
@@ -1450,7 +1450,7 @@ bool qt_xForm_helper( const TQWMatrix &trueMat, int xoffset,
break;
default: {
- return FALSE;
+ return false;
}
}
} else {
@@ -1502,7 +1502,7 @@ bool qt_xForm_helper( const TQWMatrix &trueMat, int xoffset,
m22ydy += m22;
dptr += p_inc;
}
- return TRUE;
+ return true;
}
#undef IWX_MSB
#undef IWX_LSB
diff --git a/src/kernel/tqpixmap.h b/src/kernel/tqpixmap.h
index 1ab6dd0b9..0a89e98bf 100644
--- a/src/kernel/tqpixmap.h
+++ b/src/kernel/tqpixmap.h
@@ -102,7 +102,7 @@ public:
bool hasAlpha() const;
bool hasAlphaChannel() const;
#ifndef TQT_NO_IMAGE_HEURISTIC_MASK
- TQBitmap createHeuristicMask( bool clipTight = TRUE ) const;
+ TQBitmap createHeuristicMask( bool clipTight = true ) const;
#endif
#ifndef TQT_NO_MIME
static TQPixmap fromMimeSource( const TQString& abs_name );
@@ -160,7 +160,7 @@ public:
HBITMAP multiCellBitmap() const;
int multiCellOffset() const;
int allocCell();
- void freeCell( bool = FALSE );
+ void freeCell( bool = false );
#endif
#if defined(TQ_WS_X11)
@@ -197,8 +197,8 @@ protected:
#if defined(TQ_WS_WIN)
TQPixmap *maskpm;
union {
- HBITMAP hbm; // if mcp == FALSE
- TQMCPI *mcpi; // if mcp == TRUE
+ HBITMAP hbm; // if mcp == false
+ TQMCPI *mcpi; // if mcp == true
} hbm_or_mcpi;
uchar *realAlphaBits;
#ifdef Q_OS_TEMP
@@ -224,10 +224,10 @@ private:
TQPixmap( int w, int h, int depth, bool, Optimization );
void init( int, int, int, bool, Optimization );
void deref();
- TQPixmap copy( bool ignoreMask = FALSE ) const;
+ TQPixmap copy( bool ignoreMask = false ) const;
#if defined(TQ_WS_WIN)
void initAlphaPixmap( uchar *bytes, int length, struct tagBITMAPINFO *bmi );
- void convertToAlphaPixmap( bool initAlpha=TRUE );
+ void convertToAlphaPixmap( bool initAlpha=true );
static void bitBltAlphaPixmap( TQPixmap *dst, int dx, int dy,
const TQPixmap *src, int sx, int sy,
int sw, int sh, bool useDstAlpha );
diff --git a/src/kernel/tqpixmap_x11.cpp b/src/kernel/tqpixmap_x11.cpp
index f2e4b0ca2..bca842fda 100644
--- a/src/kernel/tqpixmap_x11.cpp
+++ b/src/kernel/tqpixmap_x11.cpp
@@ -107,7 +107,7 @@ inline static void qSafeXDestroyImage( XImage *x )
#if defined(QT_MITSHM_XFORM)
-static bool xshminit = FALSE;
+static bool xshminit = false;
static XShmSegmentInfo xshminfo;
static XImage *xshmimg = 0;
static Pixmap xshmpm = 0;
@@ -140,14 +140,14 @@ static bool qt_create_mitshm_buffer( const TQPaintDevice* dev, int w, int h )
tqt_cleanup_mitshm();
} else {
if ( !XShmQueryVersion(dpy, &major, &minor, &pixmaps_ok) )
- return FALSE; // MIT Shm not supported
+ return false; // MIT Shm not supported
tqAddPostRoutine( tqt_cleanup_mitshm );
- xshminit = TRUE;
+ xshminit = true;
}
xshmimg = XShmCreateImage( dpy, vis, dd, ZPixmap, 0, &xshminfo, w, h );
if ( !xshmimg )
- return FALSE;
+ return false;
bool ok;
xshminfo.shmid = shmget( IPC_PRIVATE,
@@ -159,7 +159,7 @@ static bool qt_create_mitshm_buffer( const TQPaintDevice* dev, int w, int h )
xshminfo.shmaddr = xshmimg->data;
ok = ( xshminfo.shmaddr != (char*)-1 );
}
- xshminfo.readOnly = FALSE;
+ xshminfo.readOnly = false;
if ( ok )
ok = XShmAttach( dpy, &xshminfo );
if ( !ok ) {
@@ -169,13 +169,13 @@ static bool qt_create_mitshm_buffer( const TQPaintDevice* dev, int w, int h )
shmdt( xshminfo.shmaddr );
if ( xshminfo.shmid != -1 )
shmctl( xshminfo.shmid, IPC_RMID, 0 );
- return FALSE;
+ return false;
}
if ( pixmaps_ok )
xshmpm = XShmCreatePixmap( dpy, DefaultRootWindow(dpy), xshmimg->data,
&xshminfo, w, h, dd );
- return TRUE;
+ return true;
}
#else
@@ -184,7 +184,7 @@ static bool qt_create_mitshm_buffer( const TQPaintDevice* dev, int w, int h )
//
// static bool qt_create_mitshm_buffer( TQPaintDevice*, int, int )
// {
-// return FALSE;
+// return false;
// }
#endif // QT_MITSHM_XFORM
@@ -355,10 +355,10 @@ static void build_scale_table( uint **table, uint nBits )
return;
}
if (!*table) {
- static bool firstTable = TRUE;
+ static bool firstTable = true;
if ( firstTable ) {
tqAddPostRoutine( cleanup_scale_tables );
- firstTable = FALSE;
+ firstTable = false;
}
*table = new uint[256];
}
@@ -395,7 +395,7 @@ void TQPixmap::init( int w, int h, int d, bool bitmap, Optimization optim )
static int serial = 0;
if ( defaultScreen >= 0 && defaultScreen != x11Screen() ) {
- TQPaintDeviceX11Data* xd = getX11Data( TRUE );
+ TQPaintDeviceX11Data* xd = getX11Data( true );
xd->x_screen = defaultScreen;
xd->x_depth = TQPaintDevice::x11AppDepth( xd->x_screen );
xd->x_cells = TQPaintDevice::x11AppCells( xd->x_screen );
@@ -419,7 +419,7 @@ void TQPixmap::init( int w, int h, int d, bool bitmap, Optimization optim )
memset( data, 0, sizeof(TQPixmapData) );
data->count = 1;
- data->uninit = TRUE;
+ data->uninit = true;
data->bitmap = bitmap;
data->ser_no = ++serial;
data->optim = optim;
@@ -487,18 +487,18 @@ void TQPixmap::deref()
/*!
Constructs a monochrome pixmap, with width \a w and height \a h,
that is initialized with the data in \a bits. The \a isXbitmap
- indicates whether the data is an X bitmap and defaults to FALSE.
+ indicates whether the data is an X bitmap and defaults to false.
This constructor is protected and used by the TQBitmap class.
*/
TQPixmap::TQPixmap( int w, int h, const uchar *bits, bool isXbitmap)
: TQPaintDevice( TQInternal::Pixmap )
{ // for bitmaps only
- init( 0, 0, 0, FALSE, defOptim );
+ init( 0, 0, 0, false, defOptim );
if ( w <= 0 || h <= 0 ) // create null pixmap
return;
- data->uninit = FALSE;
+ data->uninit = false;
data->w = w;
data->h = h;
data->d = 1;
@@ -548,7 +548,7 @@ void TQPixmap::detach()
{
if ( data->count != 1 )
*this = copy();
- data->uninit = FALSE;
+ data->uninit = false;
// reset cached data
if ( data->ximage ) {
@@ -778,7 +778,7 @@ TQImage TQPixmap::convertToImage() const
axi = XGetImage(x11Display(), alf->hd, 0, 0, w, h, AllPlanes, ZPixmap);
if (axi) {
- image.setAlphaBuffer( TRUE );
+ image.setAlphaBuffer( true );
alpha.create(w, h, 8);
// copy each scanline
@@ -797,7 +797,7 @@ TQImage TQPixmap::convertToImage() const
qSafeXDestroyImage( axi );
}
} else if (msk) {
- image.setAlphaBuffer( TRUE );
+ image.setAlphaBuffer( true );
alpha = msk->convertToImage();
}
bool ale = alpha.bitOrder() == TQImage::LittleEndian;
@@ -1070,15 +1070,15 @@ TQImage TQPixmap::convertToImage() const
/*!
- Converts image \a img and sets this pixmap. Returns TRUE if
- successful; otherwise returns FALSE.
+ Converts image \a img and sets this pixmap. Returns true if
+ successful; otherwise returns false.
The \a conversion_flags argument is a bitwise-OR of the
\l{TQt::ImageConversionFlags}. Passing 0 for \a conversion_flags
sets all the default options.
Note that even though a TQPixmap with depth 1 behaves much like a
- TQBitmap, isTQBitmap() returns FALSE.
+ TQBitmap, isTQBitmap() returns false.
If a pixmap with depth 1 is painted with color0 and color1 and
converted to an image, the pixels painted with color0 will produce
@@ -1095,7 +1095,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
#if defined(QT_CHECK_NULL)
tqWarning( "TQPixmap::convertFromImage: Cannot convert a null image" );
#endif
- return FALSE;
+ return false;
}
detach(); // detach other references
TQImage image = img;
@@ -1107,7 +1107,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
(conversion_flags & ColorMode_Mask)==MonoOnly );
if ( w >= 32768 || h >= 32768 )
- return FALSE;
+ return false;
// get rid of the mask
delete data->mask;
@@ -1125,12 +1125,12 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
d = 1;
}
} else { // can be both
- bool conv8 = FALSE;
+ bool conv8 = false;
if ( d > 8 && dd <= 8 ) { // convert to 8 bit
if ( (conversion_flags & DitherMode_Mask) == AutoDither )
conversion_flags = (conversion_flags & ~DitherMode_Mask)
| PreferDither;
- conv8 = TRUE;
+ conv8 = true;
} else if ( (conversion_flags & ColorMode_Mask) == ColorOnly ) {
conv8 = d == 1; // native depth wanted
} else if ( d == 1 ) {
@@ -1140,7 +1140,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
conv8 = TQMIN(c0,c1) != tqRgb(0,0,0) || TQMAX(c0,c1) != tqRgb(255,255,255);
} else {
// eg. 1-color monochrome images (they do exist).
- conv8 = TRUE;
+ conv8 = true;
}
}
if ( conv8 ) {
@@ -1227,7 +1227,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
m = image.createAlphaMask( conversion_flags );
setMask( m );
}
- return TRUE;
+ return true;
}
Display *dpy = x11Display();
@@ -1284,7 +1284,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
newbits = (uchar *)malloc( xi->bytes_per_line*h );
TQ_CHECK_PTR( newbits );
if ( !newbits ) // no memory
- return FALSE;
+ return false;
int bppc = xi->bits_per_pixel;
bool contig_bits = n_bits(red_mask) == rbits &&
@@ -1299,7 +1299,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
// Can do it? (Contiguous bits?)
contig_bits;
- static bool init=FALSE;
+ static bool init=false;
static int D[16][16];
if ( dither_tc && !init ) {
// I also contributed this code to XV - WWA.
@@ -1333,7 +1333,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
}
}
}
- init=TRUE;
+ init=true;
}
enum { BPP8,
@@ -1613,7 +1613,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
#endif
TQ_CHECK_PTR( newbits );
if ( !newbits ) // no memory
- return FALSE;
+ return false;
uchar* p = newbits;
memcpy( p, image.bits(), nbytes ); // copy image data into newbits
@@ -1744,7 +1744,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
#endif
TQ_CHECK_PTR( newerbits );
if ( !newerbits ) // no memory
- return FALSE;
+ return false;
uchar* p = newbits;
for ( uint y=0; y<h; y++ ) { // OOPS: Do right byte order!!
p2 = newerbits + p2inc*y;
@@ -1802,11 +1802,11 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
#ifdef QT_MITSHM_CONVERSIONS
if( mitshm_ximage )
- XShmPutImage( dpy, hd, tqt_xget_readonly_gc( x11Screen(), FALSE ),
+ XShmPutImage( dpy, hd, tqt_xget_readonly_gc( x11Screen(), false ),
xi, 0, 0, 0, 0, w, h, False );
else
#endif
- XPutImage( dpy, hd, tqt_xget_readonly_gc( x11Screen(), FALSE ),
+ XPutImage( dpy, hd, tqt_xget_readonly_gc( x11Screen(), false ),
xi, 0, 0, 0, 0, w, h );
data->w = w;
@@ -1831,7 +1831,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
for (int i = 0, count = image.numColors(); i < count; ++i) {
const int alpha = tqAlpha(rgb[i]);
if (alpha != 0 && alpha != 0xff) {
- alphamap = TRUE;
+ alphamap = true;
break;
}
}
@@ -1937,7 +1937,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
#endif
qSafeXDestroyImage(axi);
}
- return TRUE;
+ return true;
}
@@ -2019,10 +2019,10 @@ TQPixmap TQPixmap::grabWindow( WId window, int x, int y, int w, int h )
}
TQPixmap pm( w, h );
- pm.data->uninit = FALSE;
+ pm.data->uninit = false;
pm.x11SetScreen( scr );
- GC gc = tqt_xget_temp_gc( scr, FALSE );
+ GC gc = tqt_xget_temp_gc( scr, false );
XSetSubwindowMode( dpy, gc, IncludeInferiors );
XCopyArea( dpy, window, pm.handle(), gc, x, y, w, h, 0, 0 );
XSetSubwindowMode( dpy, gc, ClipByChildren );
@@ -2100,9 +2100,9 @@ TQPixmap TQPixmap::xForm( const TQWMatrix &matrix ) const
}
#if defined(QT_MITSHM_XFORM)
- static bool try_once = TRUE;
+ static bool try_once = true;
if (try_once) {
- try_once = FALSE;
+ try_once = false;
if ( !xshminit )
qt_create_mitshm_buffer( this, 800, 600 );
}
@@ -2212,9 +2212,9 @@ TQPixmap TQPixmap::xForm( const TQWMatrix &matrix ) const
}
return pm;
} else { // color pixmap
- GC gc = tqt_xget_readonly_gc( x11Screen(), FALSE );
+ GC gc = tqt_xget_readonly_gc( x11Screen(), false );
TQPixmap pm( w, h );
- pm.data->uninit = FALSE;
+ pm.data->uninit = false;
pm.x11SetScreen( x11Screen() );
#if defined(QT_MITSHM_XFORM)
if ( use_mitshm ) {
@@ -2312,7 +2312,7 @@ void TQPixmap::x11SetScreen( int screen )
return; // nothing to do
if ( isNull() ) {
- TQPaintDeviceX11Data* xd = getX11Data( TRUE );
+ TQPaintDeviceX11Data* xd = getX11Data( true );
xd->x_screen = screen;
xd->x_depth = TQPaintDevice::x11AppDepth( screen );
xd->x_cells = TQPaintDevice::x11AppCells( screen );
@@ -2329,7 +2329,7 @@ void TQPixmap::x11SetScreen( int screen )
TQImage img = convertToImage();
resize(0,0);
- TQPaintDeviceX11Data* xd = getX11Data( TRUE );
+ TQPaintDeviceX11Data* xd = getX11Data( true );
xd->x_screen = screen;
xd->x_depth = TQPaintDevice::x11AppDepth( screen );
xd->x_cells = TQPaintDevice::x11AppCells( screen );
@@ -2342,7 +2342,7 @@ void TQPixmap::x11SetScreen( int screen )
}
/*!
- Returns TRUE this pixmap has an alpha channel or a mask.
+ Returns true this pixmap has an alpha channel or a mask.
\sa hasAlphaChannel() mask()
*/
@@ -2352,11 +2352,11 @@ bool TQPixmap::hasAlpha() const
}
/*!
- Returns TRUE if the pixmap has an alpha channel; otherwise it
- returns FALSE.
+ Returns true if the pixmap has an alpha channel; otherwise it
+ returns false.
NOTE: If the pixmap has a mask but not alpha channel, this
- function returns FALSE.
+ function returns false.
\sa hasAlpha() mask()
*/
@@ -2397,7 +2397,7 @@ TQ_EXPORT void copyBlt( TQPixmap *dst, int dx, int dy,
}
// copy pixel data
- bitBlt( dst, dx, dy, src, sx, sy, sw, sh, TQt::CopyROP, TRUE );
+ bitBlt( dst, dx, dy, src, sx, sy, sw, sh, TQt::CopyROP, true );
// copy mask data
if ( src->data->mask ) {
@@ -2409,7 +2409,7 @@ TQ_EXPORT void copyBlt( TQPixmap *dst, int dx, int dy,
}
bitBlt( dst->data->mask, dx, dy,
- src->data->mask, sx, sy, sw, sh, TQt::CopyROP, TRUE );
+ src->data->mask, sx, sy, sw, sh, TQt::CopyROP, true );
}
#ifndef TQT_NO_XFTFREETYPE
@@ -2434,7 +2434,7 @@ TQ_EXPORT void copyBlt( TQPixmap *dst, int dx, int dy,
return;
// create an alpha pixmap for dst if it doesn't exist
- bool do_init = FALSE;
+ bool do_init = false;
if ( ! dst->data->alphapm ) {
dst->data->alphapm = new TQPixmap;
@@ -2450,7 +2450,7 @@ TQ_EXPORT void copyBlt( TQPixmap *dst, int dx, int dy,
dst->width(), dst->height(), 8);
// new alpha pixmaps should be fully opaque by default
- do_init = TRUE;
+ do_init = true;
dst->data->alphapm->rendhd =
(TQt::HANDLE) XftDrawCreateAlpha( dst->x11Display(),
diff --git a/src/kernel/tqpixmapcache.cpp b/src/kernel/tqpixmapcache.cpp
index 369df0c08..0976554fe 100644
--- a/src/kernel/tqpixmapcache.cpp
+++ b/src/kernel/tqpixmapcache.cpp
@@ -107,9 +107,9 @@ public:
TQPMCache():
TQObject( 0, "global pixmap cache" ),
TQCache<TQPixmap>( cache_limit * 1024, cache_size ),
- id( 0 ), ps( 0 ), t( FALSE )
+ id( 0 ), ps( 0 ), t( false )
{
- setAutoDelete( TRUE );
+ setAutoDelete( true );
}
~TQPMCache() {}
void timerEvent( TQTimerEvent * );
@@ -155,7 +155,7 @@ bool TQPMCache::insert( const TQString& k, const TQPixmap *d, int c, int p )
bool r = TQCache<TQPixmap>::insert( k, d, c, p );
if ( r && !id ) {
id = startTimer( 30000 );
- t = FALSE;
+ t = false;
}
return r;
}
@@ -198,7 +198,7 @@ TQPixmap *TQPixmapCache::find( const TQString &key )
Looks for a cached pixmap associated with the \a key in the cache.
If a pixmap is found, the function sets \a pm to that pixmap and
- returns TRUE; otherwise leaves \a pm alone and returns FALSE.
+ returns true; otherwise leaves \a pm alone and returns false.
Example:
\code
@@ -222,14 +222,14 @@ bool TQPixmapCache::find( const TQString &key, TQPixmap& pm )
/*!
\obsolete
Inserts the pixmap \a pm associated with \a key into the cache.
- Returns TRUE if successful, or FALSE if the pixmap is too big for the cache.
+ Returns true if successful, or false if the pixmap is too big for the cache.
<strong>
Note: \a pm must be allocated on the heap (using \c new).
- If this function returns FALSE, you must delete \a pm yourself.
+ If this function returns false, you must delete \a pm yourself.
- If this function returns TRUE, do not use \a pm afterwards or
+ If this function returns true, do not use \a pm afterwards or
keep references to it because any other insertions into the cache,
whether from anywhere in the application or within TQt itself, could cause
the pixmap to be discarded from the cache and the pointer to
diff --git a/src/kernel/tqpngio.cpp b/src/kernel/tqpngio.cpp
index cf4d5ca60..3bc0de639 100644
--- a/src/kernel/tqpngio.cpp
+++ b/src/kernel/tqpngio.cpp
@@ -165,7 +165,7 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc
if (!image.create(width, height, 32))
return;
- image.setAlphaBuffer(TRUE);
+ image.setAlphaBuffer(true);
if (TQImage::systemByteOrder() == TQImage::BigEndian)
png_set_swap_alpha(png_ptr);
@@ -193,7 +193,7 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc
const int g = info_ptr->trans_values.gray;
#endif
if (g < ncols) {
- image.setAlphaBuffer(TRUE);
+ image.setAlphaBuffer(true);
image.setColor(g, image.color(g) & TQT_RGB_MASK);
}
}
@@ -221,7 +221,7 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc
return;
int i = 0;
if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) {
- image.setAlphaBuffer( TRUE );
+ image.setAlphaBuffer( true );
#if PNG_LIBPNG_VER>=10500
while ( i < info_ptr_num_trans ) {
@@ -287,7 +287,7 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc
PNG_FILLER_BEFORE : PNG_FILLER_AFTER);
// We want 4 bytes, but it isn't an alpha channel
} else {
- image.setAlphaBuffer(TRUE);
+ image.setAlphaBuffer(true);
}
if ( TQImage::systemByteOrder() == TQImage::BigEndian ) {
@@ -438,7 +438,7 @@ png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)
while ( n-- && tqAlpha(*c++)==0xff )
;
if ( n<0 ) // LIAR!
- image.setAlphaBuffer(FALSE);
+ image.setAlphaBuffer(false);
}
iio->setImage(image);
@@ -531,7 +531,7 @@ bool TQPNGImageWriter::writeImage(const TQImage& image, int quality_in, int off_
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING,0,0,0);
if (!png_ptr) {
- return FALSE;
+ return false;
}
png_set_error_fn(png_ptr, 0, 0, qt_png_warning);
@@ -539,7 +539,7 @@ bool TQPNGImageWriter::writeImage(const TQImage& image, int quality_in, int off_
info_ptr = png_create_info_struct(png_ptr);
if (!info_ptr) {
png_destroy_write_struct(&png_ptr, 0);
- return FALSE;
+ return false;
}
#if PNG_LIBPNG_VER>=10500
@@ -548,7 +548,7 @@ bool TQPNGImageWriter::writeImage(const TQImage& image, int quality_in, int off_
if (setjmp(png_ptr->jmpbuf)) {
#endif /* LIBPNG 1.5 */
png_destroy_write_struct(&png_ptr, &info_ptr);
- return FALSE;
+ return false;
}
int quality = quality_in;
@@ -673,14 +673,14 @@ bool TQPNGImageWriter::writeImage(const TQImage& image, int quality_in, int off_
#ifndef TQT_NO_IMAGE_TEXT
// Write short texts early.
- set_text(image,png_ptr,info_ptr,TRUE);
+ set_text(image,png_ptr,info_ptr,true);
#endif
png_write_info(png_ptr, info_ptr);
#ifndef TQT_NO_IMAGE_TEXT
// Write long texts later.
- set_text(image,png_ptr,info_ptr,FALSE);
+ set_text(image,png_ptr,info_ptr,false);
#endif
if ( image.depth() != 1 )
@@ -733,7 +733,7 @@ bool TQPNGImageWriter::writeImage(const TQImage& image, int quality_in, int off_
png_destroy_write_struct(&png_ptr, &info_ptr);
- return TRUE;
+ return true;
}
static
@@ -816,11 +816,11 @@ bool TQPNGImagePacker::packImage(const TQImage& img)
TQRgb** pjt = (TQRgb**)previous.jumpTable();
// Find left edge of change
- done = FALSE;
+ done = false;
for (minx = 0; minx < w && !done; minx++) {
for (int ty = 0; ty < h; ty++) {
if ( jt[ty][minx] != pjt[ty][minx] ) {
- done = TRUE;
+ done = true;
break;
}
}
@@ -828,11 +828,11 @@ bool TQPNGImagePacker::packImage(const TQImage& img)
minx--;
// Find right edge of change
- done = FALSE;
+ done = false;
for (maxx = w-1; maxx >= 0 && !done; maxx--) {
for (int ty = 0; ty < h; ty++) {
if ( jt[ty][maxx] != pjt[ty][maxx] ) {
- done = TRUE;
+ done = true;
break;
}
}
@@ -840,11 +840,11 @@ bool TQPNGImagePacker::packImage(const TQImage& img)
maxx++;
// Find top edge of change
- done = FALSE;
+ done = false;
for (miny = 0; miny < h && !done; miny++) {
for (int tx = 0; tx < w; tx++) {
if ( jt[miny][tx] != pjt[miny][tx] ) {
- done = TRUE;
+ done = true;
break;
}
}
@@ -852,11 +852,11 @@ bool TQPNGImagePacker::packImage(const TQImage& img)
miny--;
// Find right edge of change
- done = FALSE;
+ done = false;
for (maxy = h-1; maxy >= 0 && !done; maxy--) {
for (int tx = 0; tx < w; tx++) {
if ( jt[maxy][tx] != pjt[maxy][tx] ) {
- done = TRUE;
+ done = true;
break;
}
}
@@ -876,7 +876,7 @@ bool TQPNGImagePacker::packImage(const TQImage& img)
TQImage diff(dw, dh, 32);
- diff.setAlphaBuffer(TRUE);
+ diff.setAlphaBuffer(true);
int x, y;
if ( alignx < 1 )
alignx = 1;
@@ -915,10 +915,10 @@ bool TQPNGImagePacker::packImage(const TQImage& img)
diff = diff.convertDepth(depth,convflags);
if ( !writeImage(diff, minx, miny) )
- return FALSE;
+ return false;
}
previous = image;
- return TRUE;
+ return true;
}
@@ -1239,14 +1239,14 @@ void TQPNGFormat::end(png_structp png, png_infop info)
static bool skip(png_uint_32& max, png_bytep& data)
{
while (*data) {
- if ( !max ) return FALSE;
+ if ( !max ) return false;
max--;
data++;
}
- if ( !max ) return FALSE;
+ if ( !max ) return false;
max--;
data++; // skip to after NUL
- return TRUE;
+ return true;
}
#endif
*/
@@ -1317,7 +1317,7 @@ static TQPNGFormatType* globalPngFormatTypeObject = 0;
#endif // TQT_NO_ASYNC_IMAGE_IO
-static bool done = FALSE;
+static bool done = false;
void qCleanupPngIO()
{
#ifndef TQT_NO_ASYNC_IMAGE_IO
@@ -1326,13 +1326,13 @@ void qCleanupPngIO()
globalPngFormatTypeObject = 0;
}
#endif
- done = FALSE;
+ done = false;
}
void qInitPngIO()
{
if ( !done ) {
- done = TRUE;
+ done = true;
TQImageIO::defineIOHandler( "PNG", "^.PNG\r", 0, read_png_image,
write_png_image);
#ifndef TQT_NO_ASYNC_IMAGE_IO
diff --git a/src/kernel/tqpoint.cpp b/src/kernel/tqpoint.cpp
index e9237521c..fe7ff3a22 100644
--- a/src/kernel/tqpoint.cpp
+++ b/src/kernel/tqpoint.cpp
@@ -98,7 +98,7 @@
/*!
\fn TQPoint::TQPoint()
- Constructs a point with coordinates (0, 0) (isNull() returns TRUE).
+ Constructs a point with coordinates (0, 0) (isNull() returns true).
*/
/*!
@@ -110,8 +110,8 @@
/*!
\fn bool TQPoint::isNull() const
- Returns TRUE if both the x value and the y value are 0; otherwise
- returns FALSE.
+ Returns true if both the x value and the y value are 0; otherwise
+ returns false.
*/
/*!
@@ -243,7 +243,7 @@
\relates TQPoint
- Returns TRUE if \a p1 and \a p2 are equal; otherwise returns FALSE.
+ Returns true if \a p1 and \a p2 are equal; otherwise returns false.
*/
/*!
@@ -251,7 +251,7 @@
\relates TQPoint
- Returns TRUE if \a p1 and \a p2 are not equal; otherwise returns FALSE.
+ Returns true if \a p1 and \a p2 are not equal; otherwise returns false.
*/
/*!
diff --git a/src/kernel/tqpointarray.cpp b/src/kernel/tqpointarray.cpp
index 9d7bafccc..4a1e35f8c 100644
--- a/src/kernel/tqpointarray.cpp
+++ b/src/kernel/tqpointarray.cpp
@@ -123,11 +123,11 @@ const double Q_PI = 3.14159265358979323846; // pi // one more useful comment
/*!
Constructs a point array from the rectangle \a r.
- If \a closed is FALSE, then the point array just contains the
+ If \a closed is false, then the point array just contains the
following four points in the listed order: r.topLeft(),
r.topRight(), r.bottomRight() and r.bottomLeft().
- If \a closed is TRUE, then a fifth point is set to r.topLeft().
+ If \a closed is true, then a fifth point is set to r.topLeft().
*/
TQPointArray::TQPointArray( const TQRect &r, bool closed )
@@ -247,7 +247,7 @@ void TQPointArray::setPoint( uint index, int x, int y )
Resizes the array to \a nPoints and sets the points in the array to
the values taken from \a points.
- Returns TRUE if successful, or FALSE if the array could not be
+ Returns true if successful, or false if the array could not be
resized (normally due to lack of memory).
The example code creates an array with two points (1,2) and (3,4):
@@ -263,14 +263,14 @@ void TQPointArray::setPoint( uint index, int x, int y )
bool TQPointArray::setPoints( int nPoints, const TQCOORD *points )
{
if ( !resize(nPoints) )
- return FALSE;
+ return false;
int i = 0;
while ( nPoints-- ) { // make array of points
setPoint( i++, *points, *(points+1) );
points++;
points++;
}
- return TRUE;
+ return true;
}
/*!
@@ -279,7 +279,7 @@ bool TQPointArray::setPoints( int nPoints, const TQCOORD *points )
Resizes the array to \a nPoints and sets the points in the array
to the values taken from the variable argument list.
- Returns TRUE if successful, or FALSE if the array could not be
+ Returns true if successful, or false if the array could not be
resized (typically due to lack of memory).
The example code creates an array with two points (1,2) and (3,4):
@@ -299,7 +299,7 @@ bool TQPointArray::setPoints( int nPoints, int firstx, int firsty, ... )
{
va_list ap;
if ( !resize(nPoints) )
- return FALSE;
+ return false;
setPoint( 0, firstx, firsty ); // set first point
int i = 1, x, y;
nPoints--;
@@ -310,7 +310,7 @@ bool TQPointArray::setPoints( int nPoints, int firstx, int firsty, ... )
setPoint( i++, x, y );
}
va_end( ap );
- return TRUE;
+ return true;
}
/*! \overload
@@ -319,7 +319,7 @@ bool TQPointArray::setPoints( int nPoints, int firstx, int firsty, ... )
this point array, and resizes the point array if
\c{index+nPoints} exceeds the size of the array.
- Returns TRUE if successful, or FALSE if the array could not be
+ Returns true if successful, or false if the array could not be
resized (typically due to lack of memory).
*/
@@ -328,7 +328,7 @@ bool TQPointArray::putPoints( int index, int nPoints, const TQCOORD *points )
{
if ( index + nPoints > (int)size() ) { // extend array
if ( !resize( index + nPoints ) )
- return FALSE;
+ return false;
}
int i = index;
while ( nPoints-- ) { // make array of points
@@ -336,7 +336,7 @@ bool TQPointArray::putPoints( int index, int nPoints, const TQCOORD *points )
points++;
points++;
}
- return TRUE;
+ return true;
}
/*!
@@ -344,7 +344,7 @@ bool TQPointArray::putPoints( int index, int nPoints, const TQCOORD *points )
point array from position \a index, and resizes the point array if
\c{index+nPoints} exceeds the size of the array.
- Returns TRUE if successful, or FALSE if the array could not be
+ Returns true if successful, or false if the array could not be
resized (typically due to lack of memory).
The example code creates an array with three points (4,5), (6,7)
@@ -376,10 +376,10 @@ bool TQPointArray::putPoints( int index, int nPoints, int firstx, int firsty,
va_list ap;
if ( index + nPoints > (int)size() ) { // extend array
if ( !resize(index + nPoints) )
- return FALSE;
+ return false;
}
if ( nPoints <= 0 )
- return TRUE;
+ return true;
setPoint( index, firstx, firsty ); // set first point
int i = index + 1, x, y;
nPoints--;
@@ -390,7 +390,7 @@ bool TQPointArray::putPoints( int index, int nPoints, int firstx, int firsty,
setPoint( i++, x, y );
}
va_end( ap );
- return TRUE;
+ return true;
}
@@ -418,16 +418,16 @@ bool TQPointArray::putPoints( int index, int nPoints,
{
if ( index + nPoints > (int)size() ) { // extend array
if ( !resize(index + nPoints) )
- return FALSE;
+ return false;
}
if ( nPoints <= 0 )
- return TRUE;
+ return true;
int n = 0;
while( n < nPoints ) {
setPoint( index+n, from[fromIndex+n] );
n++;
}
- return TRUE;
+ return true;
}
diff --git a/src/kernel/tqpointarray.h b/src/kernel/tqpointarray.h
index 386910f15..d72d24720 100644
--- a/src/kernel/tqpointarray.h
+++ b/src/kernel/tqpointarray.h
@@ -58,7 +58,7 @@ public:
~TQPointArray() {}
TQPointArray( int size ) : TQMemArray<TQPoint>( size ) {}
TQPointArray( const TQPointArray &a ) : TQMemArray<TQPoint>( a ) {}
- TQPointArray( const TQRect &r, bool closed=FALSE );
+ TQPointArray( const TQRect &r, bool closed=false );
TQPointArray( int nPoints, const TQCOORD *points );
TQPointArray &operator=( const TQPointArray &a )
diff --git a/src/kernel/tqpolygonscanner.cpp b/src/kernel/tqpolygonscanner.cpp
index 2df631730..54a075c66 100644
--- a/src/kernel/tqpolygonscanner.cpp
+++ b/src/kernel/tqpolygonscanner.cpp
@@ -432,7 +432,7 @@ miInsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE,
tmpSLLBlock =
(ScanLineListBlock *)malloc(sizeof(ScanLineListBlock));
if (!tmpSLLBlock)
- return FALSE;
+ return false;
(*SLLBlock)->next = tmpSLLBlock;
tmpSLLBlock->next = 0;
*SLLBlock = tmpSLLBlock;
@@ -462,7 +462,7 @@ miInsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE,
prev->next = ETE;
else
pSLL->edgelist = ETE;
- return TRUE;
+ return true;
}
/*
@@ -525,7 +525,7 @@ miCreateETandAET(int count, DDXPointPtr pts, EdgeTable *ET,
int dy;
- if (count < 2) return TRUE;
+ if (count < 2) return true;
/*
* initialize the Active Edge Table
@@ -584,7 +584,7 @@ miCreateETandAET(int count, DDXPointPtr pts, EdgeTable *ET,
if (!miInsertEdgeInET(ET, pETEs, top->y, &pSLLBlock, &iSLLBlock))
{
miFreeStorage(pSLLBlock->next);
- return FALSE;
+ return false;
}
ET->ymax = TQMAX(ET->ymax, PrevPt->y);
@@ -594,7 +594,7 @@ miCreateETandAET(int count, DDXPointPtr pts, EdgeTable *ET,
PrevPt = CurrPt;
}
- return TRUE;
+ return true;
}
/*
@@ -729,13 +729,13 @@ miInsertionSort(EdgeTableEntry *AET)
*/
void TQPolygonScanner::scan(const TQPointArray& pa, bool winding, int index, int npoints)
{
- scan( pa, winding, index, npoints, TRUE );
+ scan( pa, winding, index, npoints, true );
}
/*!
\overload
- If \a stitchable is FALSE, the right and bottom edges of the
+ If \a stitchable is false, the right and bottom edges of the
polygon are included. This causes adjacent polygons to overlap.
*/
void TQPolygonScanner::scan(const TQPointArray& pa, bool winding, int index, int npoints, bool stitchable)
@@ -748,7 +748,7 @@ void TQPolygonScanner::scan(const TQPointArray& pa, bool winding, int index, int
Calls processSpans() for all scanlines of the polygon defined by
\a npoints starting at \a index in \a pa.
- If \a winding is TRUE, the Winding algorithm rather than the
+ If \a winding is true, the Winding algorithm rather than the
Odd-Even rule is used.
The \a edges is any bitwise combination of:
diff --git a/src/kernel/tqprinter.cpp b/src/kernel/tqprinter.cpp
index eaaa3854f..67f11b48e 100644
--- a/src/kernel/tqprinter.cpp
+++ b/src/kernel/tqprinter.cpp
@@ -71,8 +71,8 @@
printer to provide (in dpi).
\i setFullPage() tells TQPrinter whether you want to deal with the
full page or just with the part the printer can draw on. The
- default is FALSE, so that by default you should be able to paint
- on (0,0). If TRUE the origin of the coordinate system will be in
+ default is false, so that by default you should be able to paint
+ on (0,0). If true the origin of the coordinate system will be in
the top left corner of the paper and most probably the printer
will not be able to paint something there due to it's physical
margins.
@@ -210,7 +210,7 @@
TQPrinter::setFullPage(), to determine the printable area (see
TQPaintDeviceMetrics).
- The defined sizes (with setFullPage(TRUE)) are:
+ The defined sizes (with setFullPage(true)) are:
\value A0 841 x 1189 mm This value is not supported on windows.
\value A1 594 x 841 mm This value is not supported on windows.
@@ -245,7 +245,7 @@
\value Custom
\value NPageSize (internal)
- With setFullPage(FALSE) (the default), the metrics will be a bit
+ With setFullPage(false) (the default), the metrics will be a bit
smaller; how much depends on the printer in use.
*/
@@ -342,9 +342,9 @@
/*!
\fn bool TQPrinter::outputToFile() const
- Returns TRUE if the output should be written to a file, or FALSE
+ Returns true if the output should be written to a file, or false
if the output should be sent directly to the printer. The default
- setting is FALSE.
+ setting is false.
This function is currently only supported under X11 and Mac OS X.
@@ -355,8 +355,8 @@
Specifies whether the output should be written to a file or sent
directly to the printer.
- Will output to a file if \a enable is TRUE, or will output
- directly to the printer if \a enable is FALSE.
+ Will output to a file if \a enable is true, or will output
+ directly to the printer if \a enable is false.
This function is currently only supported under X11 and Mac OS X.
@@ -388,8 +388,8 @@ void TQPrinter::setOutputToFile( bool enable )
Sets the name of the output file to \a fileName.
Setting a null or empty name (0 or "") disables output to a file,
- i.e. calls setOutputToFile(FALSE). Setting a non-empty name
- enables output to a file, i.e. calls setOutputToFile(TRUE).
+ i.e. calls setOutputToFile(false). Setting a non-empty name
+ enables output to a file, i.e. calls setOutputToFile(true).
This function is currently only supported under X11.
@@ -745,8 +745,8 @@ void TQPrinter::setMinMax( int minPage, int maxPage )
\internal
- Returns TRUE if the application should provide the user with the
- option of choosing a collated printout; otherwise returns FALSE.
+ Returns true if the application should provide the user with the
+ option of choosing a collated printout; otherwise returns false.
Collation means that each page is printed in order, i.e. print the
first page, then the second page, then the third page and so on, and
@@ -763,9 +763,9 @@ void TQPrinter::setMinMax( int minPage, int maxPage )
\internal
- If \a enable is TRUE (the default) the user is given the choice of
+ If \a enable is true (the default) the user is given the choice of
whether to print out multiple copies collated in the print dialog.
- If \a enable is FALSE, then collateCopies() will be ignored.
+ If \a enable is false, then collateCopies() will be ignored.
Collation means that each page is printed in order, i.e. print the
first page, then the second page, then the third page and so on, and
@@ -782,8 +782,8 @@ void TQPrinter::setMinMax( int minPage, int maxPage )
\internal
- Returns TRUE if collation is turned on when multiple copies is selected.
- Returns FALSE if it is turned off when multiple copies is selected.
+ Returns true if collation is turned on when multiple copies is selected.
+ Returns false if it is turned off when multiple copies is selected.
\sa collateCopiesEnabled() setCollateCopiesEnabled() setCollateCopies()
*/
@@ -792,8 +792,8 @@ void TQPrinter::setMinMax( int minPage, int maxPage )
\internal
Sets the default value for collation checkbox when the print dialog appears.
- If \a on is TRUE, it will enable setCollateCopiesEnabled().
- The default value is FALSE. This value will be changed by what the
+ If \a on is true, it will enable setCollateCopiesEnabled().
+ The default value is false. This value will be changed by what the
user presses in the print dialog.
\sa collateCopiesEnabled() setCollateCopiesEnabled() collateCopies()
@@ -862,16 +862,16 @@ void TQPrinter::setPrinterSelectionOption( const TQString & option )
/*!
Sets TQPrinter to have the origin of the coordinate system at the
- top-left corner of the paper if \a fp is TRUE, or where it thinks
- the top-left corner of the printable area is if \a fp is FALSE.
+ top-left corner of the paper if \a fp is true, or where it thinks
+ the top-left corner of the printable area is if \a fp is false.
- The default is FALSE. You can (probably) print on (0,0), and
+ The default is false. You can (probably) print on (0,0), and
TQPaintDeviceMetrics will report something smaller than the size
indicated by PageSize. (Note that TQPrinter may be wrong on Unix
systems - it does not have perfect knowledge of the physical
printer.)
- If you set \a fp to TRUE, TQPaintDeviceMetrics will report the
+ If you set \a fp to true, TQPaintDeviceMetrics will report the
exact same size as indicated by \c PageSize, but you cannot print
on all of that - you must take care of the output margins
yourself.
@@ -886,8 +886,8 @@ void TQPrinter::setFullPage( bool fp )
/*!
- Returns TRUE if the origin of the printer's coordinate system is
- at the corner of the sheet and FALSE if it is at the edge of the
+ Returns true if the origin of the printer's coordinate system is
+ at the corner of the sheet and false if it is at the edge of the
printable area.
See setFullPage() for details and caveats.
@@ -920,7 +920,7 @@ bool TQPrinter::fullPage() const
void TQPrinter::setResolution( int dpi )
{
res = dpi;
- res_set = TRUE;
+ res_set = true;
}
@@ -976,11 +976,11 @@ void TQPrinter::setPrintRange( PrintRange range )
if( range != AllPages ) {
if( range == Selection
&& !isOptionEnabled( PrintSelection ) ) {
- setOptionEnabled( PrintSelection, TRUE );
+ setOptionEnabled( PrintSelection, true );
}
else if( range == PageRange
&& !isOptionEnabled( PrintPageRange ) ) {
- setOptionEnabled( PrintPageRange, TRUE );
+ setOptionEnabled( PrintPageRange, true );
}
}
d->printRange = range;
@@ -999,7 +999,7 @@ TQPrinter::PrintRange TQPrinter::printRange() const
/*!
Enables the printer option with the identifier \a option if \a
- enable is TRUE, and disables option \a option if \a enable is FALSE.
+ enable is true, and disables option \a option if \a enable is false.
\sa isOptionEnabled()
*/
@@ -1015,8 +1015,8 @@ void TQPrinter::setOptionEnabled( PrinterOption option, bool enable )
}
/*!
- Returns TRUE if the printer option with identifier \a option is enabled;
- otherwise returns FALSE.
+ Returns true if the printer option with identifier \a option is enabled;
+ otherwise returns false.
\sa setOptionEnabled()
*/
diff --git a/src/kernel/tqprinter_unix.cpp b/src/kernel/tqprinter_unix.cpp
index e5bacff9c..e9caedc3d 100644
--- a/src/kernel/tqprinter_unix.cpp
+++ b/src/kernel/tqprinter_unix.cpp
@@ -121,8 +121,8 @@ TQPrinter::TQPrinter( PrinterMode m )
printer_name = getenv("PRINTER");
from_pg = to_pg = min_pg = max_pg = 0;
state = PST_IDLE;
- output_file = FALSE;
- to_edge = FALSE;
+ output_file = false;
+ to_edge = false;
paper_source = OnlyOne;
switch ( m ) {
case ScreenResolution:
@@ -137,10 +137,10 @@ TQPrinter::TQPrinter( PrinterMode m )
}
d = new TQPrinterUnixPrivate;
- D->marginsSpecified = FALSE;
+ D->marginsSpecified = false;
d->printerOptions = 0;
- setOptionEnabled( PrintToFile, TRUE );
- setOptionEnabled( PrintPageRange, TRUE );
+ setOptionEnabled( PrintToFile, true );
+ setOptionEnabled( PrintPageRange, true );
setPrintRange( AllPages );
}
@@ -161,21 +161,21 @@ TQPrinter::~TQPrinter()
/*!
- Advances to a new page on the printer. Returns TRUE if successful;
- otherwise returns FALSE.
+ Advances to a new page on the printer. Returns true if successful;
+ otherwise returns false.
*/
bool TQPrinter::newPage()
{
if ( state == PST_ACTIVE && pdrv )
return ((TQPSPrinter*)pdrv)->cmd( TQPSPrinter::NewPage, 0, 0 );
- return FALSE;
+ return false;
}
/*!
- Aborts the print job. Returns TRUE if successful; otherwise
- returns FALSE.
+ Aborts the print job. Returns true if successful; otherwise
+ returns false.
\sa aborted()
*/
@@ -195,8 +195,8 @@ bool TQPrinter::abort()
}
/*!
- Returns TRUE if the print job was aborted; otherwise returns
- FALSE.
+ Returns true if the print job was aborted; otherwise returns
+ false.
\sa abort()
*/
@@ -240,7 +240,7 @@ static void deleteGlobalPrinterDefaults()
user to specify which printer they wish to use and what settings
it should have.
- Returns TRUE if the user pressed "OK" to print, or FALSE if the
+ Returns true if the user pressed "OK" to print, or false if the
user canceled the operation.
*/
@@ -249,7 +249,7 @@ bool TQPrinter::setup( TQWidget * parent )
#ifndef TQT_NO_PRINTDIALOG
bool result = TQPrintDialog::getPrinterSetup( this, parent );
#else
- bool result = FALSE;
+ bool result = false;
#endif
if ( result ) {
if ( !globalPrinterDefaults ) {
@@ -329,7 +329,7 @@ bool TQPrinter::cmd( int c, TQPainter *paint, TQPDevCmdParam *p )
if ( pipe( fds ) != 0 ) {
tqWarning( "TQPSPrinter: could not open pipe to print" );
state = PST_ERROR;
- return FALSE;
+ return false;
}
// ### shouldn't we use TQProcess here????
@@ -453,7 +453,7 @@ bool TQPrinter::cmd( int c, TQPainter *paint, TQPDevCmdParam *p )
// ignore it? I don't know
}
} else {
- bool r = FALSE;
+ bool r = false;
if ( state == PST_ACTIVE && pdrv ) {
r = ((TQPSPrinter*)pdrv)->cmd( c, paint, p );
if ( c == PdcEnd ) {
@@ -469,7 +469,7 @@ bool TQPrinter::cmd( int c, TQPainter *paint, TQPDevCmdParam *p )
state = PST_IDLE;
return r;
}
- return TRUE;
+ return true;
}
@@ -593,12 +593,12 @@ int TQPrinter::metric( int m ) const
margin of the printer. On Unix, this is a best-effort guess, not
based on perfect knowledge.
- If you have called setFullPage( TRUE ), margins().width() may be
+ If you have called setFullPage( true ), margins().width() may be
treated as the smallest sane left margin you can use, and
margins().height() as the smallest sane top margin you can
use.
- If you have called setFullPage( FALSE ) (this is the default),
+ If you have called setFullPage( false ) (this is the default),
margins() is automatically subtracted from the pageSize() by
TQPrinter.
@@ -622,10 +622,10 @@ TQSize TQPrinter::margins() const
printer. On Unix, this is a best-effort guess, not based on
perfect knowledge.
- If you have called setFullPage( TRUE ), the four values specify
+ If you have called setFullPage( true ), the four values specify
the smallest sane margins you can use.
- If you have called setFullPage( FALSE ) (this is the default),
+ If you have called setFullPage( false ) (this is the default),
the margins are automatically subtracted from the pageSize() by
TQPrinter.
@@ -660,7 +660,7 @@ void TQPrinter::setMargins( uint top, uint left, uint bottom, uint right )
D->leftMargin = left;
D->bottomMargin = bottom;
D->rightMargin = right;
- D->marginsSpecified = TRUE;
+ D->marginsSpecified = true;
}
#endif
diff --git a/src/kernel/tqprocess.cpp b/src/kernel/tqprocess.cpp
index b43c12b4a..58b0bdbaf 100644
--- a/src/kernel/tqprocess.cpp
+++ b/src/kernel/tqprocess.cpp
@@ -225,9 +225,9 @@
\sa setArguments() addArgument() start()
*/
TQProcess::TQProcess( TQObject *parent, const char *name )
- : TQObject( parent, name ), ioRedirection( FALSE ), notifyOnExit( FALSE ),
- wroteToStdinConnected( FALSE ),
- readStdoutCalled( FALSE ), readStderrCalled( FALSE ),
+ : TQObject( parent, name ), ioRedirection( false ), notifyOnExit( false ),
+ wroteToStdinConnected( false ),
+ readStdoutCalled( false ), readStderrCalled( false ),
comms( Stdin|Stdout|Stderr )
{
init();
@@ -244,9 +244,9 @@ TQProcess::TQProcess( TQObject *parent, const char *name )
\sa setArguments() addArgument() start()
*/
TQProcess::TQProcess( const TQString& arg0, TQObject *parent, const char *name )
- : TQObject( parent, name ), ioRedirection( FALSE ), notifyOnExit( FALSE ),
- wroteToStdinConnected( FALSE ),
- readStdoutCalled( FALSE ), readStderrCalled( FALSE ),
+ : TQObject( parent, name ), ioRedirection( false ), notifyOnExit( false ),
+ wroteToStdinConnected( false ),
+ readStdoutCalled( false ), readStderrCalled( false ),
comms( Stdin|Stdout|Stderr )
{
init();
@@ -266,9 +266,9 @@ TQProcess::TQProcess( const TQString& arg0, TQObject *parent, const char *name )
\sa setArguments() addArgument() start()
*/
TQProcess::TQProcess( const TQStringList& args, TQObject *parent, const char *name )
- : TQObject( parent, name ), ioRedirection( FALSE ), notifyOnExit( FALSE ),
- wroteToStdinConnected( FALSE ),
- readStdoutCalled( FALSE ), readStderrCalled( FALSE ),
+ : TQObject( parent, name ), ioRedirection( false ), notifyOnExit( false ),
+ wroteToStdinConnected( false ),
+ readStdoutCalled( false ), readStderrCalled( false ),
comms( Stdin|Stdout|Stderr )
{
init();
@@ -408,8 +408,8 @@ void TQProcess::setCommunication( int commFlags )
}
/*!
- Returns TRUE if the process has exited normally; otherwise returns
- FALSE. This implies that this function returns FALSE if the
+ Returns true if the process has exited normally; otherwise returns
+ false. This implies that this function returns false if the
process is still running.
\sa isRunning() exitStatus() processExited()
@@ -418,7 +418,7 @@ bool TQProcess::normalExit() const
{
// isRunning() has the side effect that it determines the exit status!
if ( isRunning() )
- return FALSE;
+ return false;
else
return exitNormal;
}
@@ -428,7 +428,7 @@ bool TQProcess::normalExit() const
still running. This function returns immediately and does not wait
until the process is finished.
- If normalExit() is FALSE (e.g. if the program was killed or
+ If normalExit() is false (e.g. if the program was killed or
crashed), this function returns 0, so you should check the return
value of normalExit() before relying on this value.
@@ -459,9 +459,9 @@ TQByteArray TQProcess::readStdout()
if ( readStdoutCalled ) {
return TQByteArray();
}
- readStdoutCalled = TRUE;
+ readStdoutCalled = true;
TQMembuf *buf = membufStdout();
- readStdoutCalled = FALSE;
+ readStdoutCalled = false;
return buf->readAll();
}
@@ -481,9 +481,9 @@ TQByteArray TQProcess::readStderr()
if ( readStderrCalled ) {
return TQByteArray();
}
- readStderrCalled = TRUE;
+ readStderrCalled = true;
TQMembuf *buf = membufStderr();
- readStderrCalled = FALSE;
+ readStderrCalled = false;
return buf->readAll();
}
@@ -491,7 +491,7 @@ TQByteArray TQProcess::readStderr()
/*!
Reads a line of text from standard output, excluding any trailing
newline or carriage return characters, and returns it. Returns
- TQString::null if canReadLineStdout() returns FALSE.
+ TQString::null if canReadLineStdout() returns false.
By default, the text is interpreted to be in Latin-1 encoding. If you need
other codecs, you can set a different codec with
@@ -527,7 +527,7 @@ TQString TQProcess::readLineStdout()
/*!
Reads a line of text from standard error, excluding any trailing
newline or carriage return characters and returns it. Returns
- TQString::null if canReadLineStderr() returns FALSE.
+ TQString::null if canReadLineStderr() returns false.
By default, the text is interpreted to be in Latin-1 encoding. If you need
other codecs, you can set a different codec with
@@ -591,8 +591,8 @@ TQString TQProcess::readLineStderr()
settings for the environment variable \c LD_LIBRARY_PATH, then
this variable is inherited from the starting process.
- Returns TRUE if the process could be started; otherwise returns
- FALSE.
+ Returns true if the process could be started; otherwise returns
+ false.
Note that you should not use the slots writeToStdin() and
closeStdin() on processes started with launch(), since the result
@@ -628,10 +628,10 @@ bool TQProcess::launch( const TQByteArray& buf, TQStringList *env )
closeStdin();
emit launchFinished();
}
- return TRUE;
+ return true;
} else {
emit launchFinished();
- return FALSE;
+ return false;
}
}
@@ -652,10 +652,10 @@ bool TQProcess::launch( const TQString& buf, TQStringList *env )
closeStdin();
emit launchFinished();
}
- return TRUE;
+ return true;
} else {
emit launchFinished();
- return FALSE;
+ return false;
}
}
@@ -755,23 +755,23 @@ void TQProcess::connectNotify( const char * signal )
qstrcmp( signal, TQ_SIGNAL(readyReadStderr()) )==0
) {
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "TQProcess::connectNotify(): set ioRedirection to TRUE" );
+ tqDebug( "TQProcess::connectNotify(): set ioRedirection to true" );
#endif
- setIoRedirection( TRUE );
+ setIoRedirection( true );
return;
}
if ( !notifyOnExit && qstrcmp( signal, TQ_SIGNAL(processExited()) )==0 ) {
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "TQProcess::connectNotify(): set notifyOnExit to TRUE" );
+ tqDebug( "TQProcess::connectNotify(): set notifyOnExit to true" );
#endif
- setNotifyOnExit( TRUE );
+ setNotifyOnExit( true );
return;
}
if ( !wroteToStdinConnected && qstrcmp( signal, TQ_SIGNAL(wroteToStdin()) )==0 ) {
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "TQProcess::connectNotify(): set wroteToStdinConnected to TRUE" );
+ tqDebug( "TQProcess::connectNotify(): set wroteToStdinConnected to true" );
#endif
- setWroteStdinConnected( TRUE );
+ setWroteStdinConnected( true );
return;
}
}
@@ -785,21 +785,21 @@ void TQProcess::disconnectNotify( const char * )
receivers( TQ_SIGNAL(readyReadStderr()) ) ==0
) {
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "TQProcess::disconnectNotify(): set ioRedirection to FALSE" );
+ tqDebug( "TQProcess::disconnectNotify(): set ioRedirection to false" );
#endif
- setIoRedirection( FALSE );
+ setIoRedirection( false );
}
if ( notifyOnExit && receivers( TQ_SIGNAL(processExited()) ) == 0 ) {
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "TQProcess::disconnectNotify(): set notifyOnExit to FALSE" );
+ tqDebug( "TQProcess::disconnectNotify(): set notifyOnExit to false" );
#endif
- setNotifyOnExit( FALSE );
+ setNotifyOnExit( false );
}
if ( wroteToStdinConnected && receivers( TQ_SIGNAL(wroteToStdin()) ) == 0 ) {
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "TQProcess::disconnectNotify(): set wroteToStdinConnected to FALSE" );
+ tqDebug( "TQProcess::disconnectNotify(): set wroteToStdinConnected to false" );
#endif
- setWroteStdinConnected( FALSE );
+ setWroteStdinConnected( false );
}
}
diff --git a/src/kernel/tqprocess_unix.cpp b/src/kernel/tqprocess_unix.cpp
index 606d1fd28..e481c92c3 100644
--- a/src/kernel/tqprocess_unix.cpp
+++ b/src/kernel/tqprocess_unix.cpp
@@ -147,11 +147,11 @@ public:
#endif
if ( process ) {
if ( process->d->notifierStdin )
- process->d->notifierStdin->setEnabled( FALSE );
+ process->d->notifierStdin->setEnabled( false );
if ( process->d->notifierStdout )
- process->d->notifierStdout->setEnabled( FALSE );
+ process->d->notifierStdout->setEnabled( false );
if ( process->d->notifierStderr )
- process->d->notifierStderr->setEnabled( FALSE );
+ process->d->notifierStderr->setEnabled( false );
process->d->proc = 0;
}
if( socketStdin )
@@ -225,11 +225,11 @@ int qnx6SocketPairReplacement (int socketFD[2]) {
int socketOptions = 1;
setsockopt(tmpSocket, SOL_SOCKET, SO_REUSEADDR, &socketOptions, sizeof(int));
- bool found = FALSE;
+ bool found = false;
for (int socketIP = 2000; (socketIP < 2500) && !(found); socketIP++) {
ipAddr.sin_port = htons(socketIP);
if (bind(tmpSocket, (struct sockaddr *)&ipAddr, sizeof(ipAddr)))
- found = TRUE;
+ found = true;
}
if (listen(tmpSocket, 5)) { BAILOUT };
@@ -259,7 +259,7 @@ int qnx6SocketPairReplacement (int socketFD[2]) {
TQProcessManager::TQProcessManager() : sn(0)
{
procList = new TQPtrList<TQProc>;
- procList->setAutoDelete( TRUE );
+ procList->setAutoDelete( true );
// The SIGCHLD handler writes to a socket to tell the manager that
// something happened. This is done to get the processing in sync with the
@@ -279,7 +279,7 @@ TQProcessManager::TQProcessManager() : sn(0)
TQSocketNotifier::Read, this );
connect( sn, TQ_SIGNAL(activated(int)),
this, TQ_SLOT(sigchldHnd(int)) );
- sn->setEnabled( TRUE );
+ sn->setEnabled( true );
}
// install a SIGCHLD handler and ignore SIGPIPE
@@ -375,7 +375,7 @@ void TQProcessManager::sigchldHnd( int fd )
if ( sn ) {
if ( !sn->isEnabled() )
return;
- sn->setEnabled( FALSE );
+ sn->setEnabled( false );
}
char tmp;
@@ -390,7 +390,7 @@ void TQProcessManager::sigchldHnd( int fd )
bool removeProc;
proc = procList->first();
while ( proc != 0 ) {
- removeProc = FALSE;
+ removeProc = false;
process = proc->process;
if ( process != 0 ) {
if ( !process->isRunning() ) {
@@ -434,19 +434,19 @@ void TQProcessManager::sigchldHnd( int fd )
::close( proc->socketStdout );
proc->socketStdout = 0;
if (process->d->notifierStdout)
- process->d->notifierStdout->setEnabled(FALSE);
+ process->d->notifierStdout->setEnabled(false);
}
if ( proc->socketStderr ) {
::close( proc->socketStderr );
proc->socketStderr = 0;
if (process->d->notifierStderr)
- process->d->notifierStderr->setEnabled(FALSE);
+ process->d->notifierStderr->setEnabled(false);
}
if ( process->notifyOnExit )
emit process->processExited();
- removeProc = TRUE;
+ removeProc = true;
}
} else {
int status;
@@ -454,7 +454,7 @@ void TQProcessManager::sigchldHnd( int fd )
#if defined(QT_QPROCESS_DEBUG)
tqDebug( "TQProcessManager::sigchldHnd() (PID: %d): process exited (TQProcess not available)", proc->pid );
#endif
- removeProc = TRUE;
+ removeProc = true;
}
}
if ( removeProc ) {
@@ -466,7 +466,7 @@ void TQProcessManager::sigchldHnd( int fd )
}
}
if ( sn )
- sn->setEnabled( TRUE );
+ sn->setEnabled( true );
}
#include "tqprocess_unix.moc"
@@ -490,8 +490,8 @@ TQProcessPrivate::TQProcessPrivate()
notifierStdout = 0;
notifierStderr = 0;
- exitValuesCalculated = FALSE;
- socketReadCalled = FALSE;
+ exitValuesCalculated = false;
+ socketReadCalled = false;
proc = 0;
}
@@ -582,7 +582,7 @@ void TQProcess::init()
{
d = new TQProcessPrivate();
exitStat = 0;
- exitNormal = FALSE;
+ exitNormal = false;
}
/*
@@ -594,7 +594,7 @@ void TQProcess::reset()
delete d;
d = new TQProcessPrivate();
exitStat = 0;
- exitNormal = FALSE;
+ exitNormal = false;
d->bufStdout.clear();
d->bufStderr.clear();
}
@@ -684,8 +684,8 @@ TQProcess::~TQProcess()
this variable is inherited from the starting process; under
Windows the same applies for the environment variable \c PATH.
- Returns TRUE if the process could be started; otherwise returns
- FALSE.
+ Returns true if the process could be started; otherwise returns
+ false.
You can write data to the process's standard input with
writeToStdin(). You can close standard input with closeStdin() and
@@ -718,7 +718,7 @@ bool TQProcess::start( TQStringList *env )
#else
if ( (comms & Stdin) && qnx6SocketPairReplacement(sStdin) == -1 ) {
#endif
- return FALSE;
+ return false;
}
#ifndef Q_OS_QNX6
if ( (comms & Stderr) && ::socketpair( AF_UNIX, SOCK_STREAM, 0, sStderr ) == -1 ) {
@@ -729,7 +729,7 @@ bool TQProcess::start( TQStringList *env )
::close( sStdin[0] );
::close( sStdin[1] );
}
- return FALSE;
+ return false;
}
#ifndef Q_OS_QNX6
if ( (comms & Stdout) && ::socketpair( AF_UNIX, SOCK_STREAM, 0, sStdout ) == -1 ) {
@@ -744,7 +744,7 @@ bool TQProcess::start( TQStringList *env )
::close( sStderr[0] );
::close( sStderr[1] );
}
- return FALSE;
+ return false;
}
// the following pipe is only used to determine if the process could be
@@ -948,7 +948,7 @@ bool TQProcess::start( TQStringList *env )
this, TQ_SLOT(socketWrite(int)) );
// setup notifiers for the sockets
if ( !d->stdinBuf.isEmpty() ) {
- d->notifierStdin->setEnabled( TRUE );
+ d->notifierStdin->setEnabled( true );
}
}
if ( comms & Stdout ) {
@@ -958,7 +958,7 @@ bool TQProcess::start( TQStringList *env )
connect( d->notifierStdout, TQ_SIGNAL(activated(int)),
this, TQ_SLOT(socketRead(int)) );
if ( ioRedirection )
- d->notifierStdout->setEnabled( TRUE );
+ d->notifierStdout->setEnabled( true );
}
if ( comms & Stderr ) {
::close( sStderr[1] );
@@ -967,13 +967,13 @@ bool TQProcess::start( TQStringList *env )
connect( d->notifierStderr, TQ_SIGNAL(activated(int)),
this, TQ_SLOT(socketRead(int)) );
if ( ioRedirection )
- d->notifierStderr->setEnabled( TRUE );
+ d->notifierStderr->setEnabled( true );
}
// cleanup and return
delete[] arglistQ;
delete[] arglist;
- return TRUE;
+ return true;
error:
#if defined(QT_QPROCESS_DEBUG)
@@ -997,7 +997,7 @@ error:
::close( fd[1] );
delete[] arglistQ;
delete[] arglist;
- return FALSE;
+ return false;
}
@@ -1050,7 +1050,7 @@ void TQProcess::kill() const
}
/*!
- Returns TRUE if the process is running; otherwise returns FALSE.
+ Returns true if the process is running; otherwise returns false.
\sa normalExit() exitStatus() processExited()
*/
@@ -1058,12 +1058,12 @@ bool TQProcess::isRunning() const
{
if ( d->exitValuesCalculated ) {
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "TQProcess::isRunning(): FALSE (already computed)" );
+ tqDebug( "TQProcess::isRunning(): false (already computed)" );
#endif
- return FALSE;
+ return false;
}
if ( d->proc == 0 )
- return FALSE;
+ return false;
int status;
if ( ::waitpid( d->proc->pid, &status, WNOHANG ) == d->proc->pid ) {
// compute the exit values
@@ -1072,7 +1072,7 @@ bool TQProcess::isRunning() const
if ( exitNormal ) {
that->exitStat = (char)WEXITSTATUS( status );
}
- d->exitValuesCalculated = TRUE;
+ d->exitValuesCalculated = true;
// On heavy processing, the socket notifier for the sigchild might not
// have found time to fire yet.
@@ -1088,19 +1088,19 @@ bool TQProcess::isRunning() const
}
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "TQProcess::isRunning() (PID: %d): FALSE", d->proc->pid );
+ tqDebug( "TQProcess::isRunning() (PID: %d): false", d->proc->pid );
#endif
- return FALSE;
+ return false;
}
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "TQProcess::isRunning() (PID: %d): TRUE", d->proc->pid );
+ tqDebug( "TQProcess::isRunning() (PID: %d): true", d->proc->pid );
#endif
- return TRUE;
+ return true;
}
/*!
- Returns TRUE if it's possible to read an entire line of text from
- standard output at this time; otherwise returns FALSE.
+ Returns true if it's possible to read an entire line of text from
+ standard output at this time; otherwise returns false.
\sa readLineStdout() canReadLineStderr()
*/
@@ -1114,8 +1114,8 @@ bool TQProcess::canReadLineStdout() const
}
/*!
- Returns TRUE if it's possible to read an entire line of text from
- standard error at this time; otherwise returns FALSE.
+ Returns true if it's possible to read an entire line of text from
+ standard error at this time; otherwise returns false.
\sa readLineStderr() canReadLineStdout()
*/
@@ -1154,7 +1154,7 @@ void TQProcess::writeToStdin( const TQByteArray& buf )
#endif
d->stdinBuf.enqueue( new TQByteArray(buf) );
if ( d->notifierStdin != 0 )
- d->notifierStdin->setEnabled( TRUE );
+ d->notifierStdin->setEnabled( true );
}
@@ -1239,7 +1239,7 @@ void TQProcess::socketRead( int fd )
#if defined(QT_QPROCESS_DEBUG)
tqDebug( "TQProcess::socketRead(): stdout (%d) closed", fd );
#endif
- d->notifierStdout->setEnabled( FALSE );
+ d->notifierStdout->setEnabled( false );
delete d->notifierStdout;
d->notifierStdout = 0;
::close( d->proc->socketStdout );
@@ -1249,7 +1249,7 @@ void TQProcess::socketRead( int fd )
#if defined(QT_QPROCESS_DEBUG)
tqDebug( "TQProcess::socketRead(): stderr (%d) closed", fd );
#endif
- d->notifierStderr->setEnabled( FALSE );
+ d->notifierStderr->setEnabled( false );
delete d->notifierStderr;
d->notifierStderr = 0;
::close( d->proc->socketStderr );
@@ -1284,7 +1284,7 @@ void TQProcess::socketRead( int fd )
}
}
- d->socketReadCalled = TRUE;
+ d->socketReadCalled = true;
if ( fd == d->proc->socketStdout ) {
#if defined(QT_QPROCESS_DEBUG)
tqDebug( "TQProcess::socketRead(): %d bytes read from stdout (%d)",
@@ -1298,7 +1298,7 @@ void TQProcess::socketRead( int fd )
#endif
emit readyReadStderr();
}
- d->socketReadCalled = FALSE;
+ d->socketReadCalled = false;
}
@@ -1310,7 +1310,7 @@ void TQProcess::socketWrite( int fd )
{
while ( fd == d->proc->socketStdin && d->proc->socketStdin != 0 ) {
if ( d->stdinBuf.isEmpty() ) {
- d->notifierStdin->setEnabled( FALSE );
+ d->notifierStdin->setEnabled( false );
return;
}
ssize_t ret = ::write( fd,
@@ -1362,14 +1362,14 @@ void TQProcess::setIoRedirection( bool value )
ioRedirection = value;
if ( ioRedirection ) {
if ( d->notifierStdout )
- d->notifierStdout->setEnabled( TRUE );
+ d->notifierStdout->setEnabled( true );
if ( d->notifierStderr )
- d->notifierStderr->setEnabled( TRUE );
+ d->notifierStderr->setEnabled( true );
} else {
if ( d->notifierStdout )
- d->notifierStdout->setEnabled( FALSE );
+ d->notifierStdout->setEnabled( false );
if ( d->notifierStderr )
- d->notifierStderr->setEnabled( FALSE );
+ d->notifierStderr->setEnabled( false );
}
}
diff --git a/src/kernel/tqpsprinter.cpp b/src/kernel/tqpsprinter.cpp
index bc283807c..4ab9404c6 100644
--- a/src/kernel/tqpsprinter.cpp
+++ b/src/kernel/tqpsprinter.cpp
@@ -103,8 +103,8 @@
extern bool tqt_has_xft;
#endif
-static bool qt_gen_epsf = FALSE;
-static bool embedFonts = TRUE;
+static bool qt_gen_epsf = false;
+static bool embedFonts = true;
TQ_EXPORT void tqt_generate_epsf( bool b )
{
@@ -1370,7 +1370,7 @@ public:
void setFont( const TQFont &, int script );
void drawImage( TQPainter *, float x, float y, float w, float h, const TQImage &img, const TQImage &mask );
void initPage( TQPainter *paint );
- void flushPage( bool last = FALSE );
+ void flushPage( bool last = false );
TQPrinter *printer;
int pageCount;
@@ -1449,12 +1449,12 @@ public:
virtual unsigned short unicode_for_glyph(int glyphindex) { return glyphindex; }
virtual unsigned short glyph_for_unicode(unsigned short unicode) { return unicode; }
unsigned short insertIntoSubset( unsigned short unicode );
- virtual bool embedded() { return FALSE; }
+ virtual bool embedded() { return false; }
bool operator == ( const TQPSPrinterFontPrivate &other ) {
return other.psname == psname;
}
- inline void setSymbol() { symbol = TRUE; }
+ inline void setSymbol() { symbol = true; }
protected:
TQString psname;
@@ -1579,7 +1579,7 @@ static void appendReplacements( TQStringList &list, const psfont * const * repla
}
}
-static TQStringList makePSFontNameList( const TQFontEngine *fe, const TQString &psname = TQString::null, bool useNameForLookup = FALSE )
+static TQStringList makePSFontNameList( const TQFontEngine *fe, const TQString &psname = TQString::null, bool useNameForLookup = false )
{
int i;
int type;
@@ -1643,9 +1643,9 @@ static inline float pointSize( const TQFont &f, float scale )
TQPSPrinterFontPrivate::TQPSPrinterFontPrivate()
{
- global_dict = FALSE;
- downloaded = FALSE;
- symbol = FALSE;
+ global_dict = false;
+ downloaded = false;
+ symbol = false;
// map 0 to .notdef
subset.insert( 0, 0 );
subsetCount = 1;
@@ -1722,9 +1722,9 @@ static inline const char * toInt( int i )
if ( i == 0 ) {
intVal[--pos] = '0';
} else {
- bool neg = FALSE;
+ bool neg = false;
if ( i < 0 ) {
- neg = TRUE;
+ neg = true;
i = -i;
}
while ( i ) {
@@ -1800,15 +1800,15 @@ unsigned short TQPSPrinterFontPrivate::mapUnicode( unsigned short unicode )
TQMap<unsigned short, unsigned short>::iterator res;
res = subset.find( unicode );
unsigned short offset = 0;
- bool found = FALSE;
+ bool found = false;
if ( res != subset.end() ) {
- found = TRUE;
+ found = true;
} else {
if ( downloaded ) {
res = page_subset.find( unicode );
offset = (subsetCount/256 + 1) * 256;
if ( res != page_subset.end() )
- found = TRUE;
+ found = true;
}
}
if ( !found ) {
@@ -2117,7 +2117,7 @@ public:
const TQString &text, TQPSPrinterPrivate *d, TQPainter *paint);
// virtual ~TQPSPrinterFontTTF();
- virtual bool embedded() { return TRUE; }
+ virtual bool embedded() { return true; }
private:
TQByteArray data;
TQMemArray<ushort> uni2glyph; // to speed up lookups
@@ -2274,7 +2274,7 @@ static const char * const Apple_CharStrings[]={
TQPSPrinterFontTTF::TQPSPrinterFontTTF(const TQFontEngine *f, TQByteArray& d)
{
data = d;
- defective = FALSE;
+ defective = false;
BYTE *ptr;
@@ -2303,7 +2303,7 @@ TQPSPrinterFontTTF::TQPSPrinterFontTTF(const TQFontEngine *f, TQByteArray& d)
/* Load the "head" table and extract information from it. */
ptr = getTable("head");
if ( !ptr ) {
- defective = TRUE;
+ defective = true;
return;
}
MfrRevision = getFixed( ptr + 4 ); /* font revision number */
@@ -2319,12 +2319,12 @@ TQPSPrinterFontTTF::TQPSPrinterFontTTF(const TQFontEngine *f, TQByteArray& d)
indexToLocFormat = getSHORT( ptr + 50 ); /* size of 'loca' data */
if(indexToLocFormat != 0 && indexToLocFormat != 1) {
tqWarning("TrueType font is unusable because indexToLocFormat != 0");
- defective = TRUE;
+ defective = true;
return;
}
if( getSHORT(ptr+52) != 0 ) {
tqWarning("TrueType font is unusable because glyphDataFormat != 0");
- defective = TRUE;
+ defective = true;
return;
}
@@ -2339,7 +2339,7 @@ TQPSPrinterFontTTF::TQPSPrinterFontTTF(const TQFontEngine *f, TQByteArray& d)
BYTE* table_ptr = getTable("name"); /* pointer to table */
if ( !table_ptr ) {
- defective = TRUE;
+ defective = true;
tqDebug("couldn't find name table" );
return;
}
@@ -2395,13 +2395,13 @@ TQPSPrinterFontTTF::TQPSPrinterFontTTF(const TQFontEngine *f, TQByteArray& d)
tqWarning("TrueType font does not have a format 2.0 'post' table");
tqWarning("post format is %d.%d",post_format.whole,post_format.fraction);
// Sivan Feb 2001: no longer defective.
- // defective = TRUE;
+ // defective = true;
}
}
#endif
BYTE *maxp = getTable("maxp");
if ( !maxp ) {
- defective = TRUE;
+ defective = true;
tqDebug("no maxp table in font");
return;
}
@@ -2509,7 +2509,7 @@ void TQPSPrinterFontTTF::download(TQTextStream& s,bool global)
if ( !global )
subsetDict = &page_subset;
- downloaded = TRUE;
+ downloaded = true;
if (defective) {
s << "% Font ";
@@ -2684,8 +2684,8 @@ void TQPSPrinterFontTTF::download(TQTextStream& s,bool global)
bool glyphset[65536];
for(int c=0; c < 65536; c++)
- glyphset[c] = FALSE;
- glyphset[0] = TRUE; // always output .notdef
+ glyphset[c] = false;
+ glyphset[0] = true; // always output .notdef
TQMap<unsigned short, unsigned short>::iterator it;
for( it = subsetDict->begin(); it != subsetDict->end(); ++it ) {
@@ -2896,7 +2896,7 @@ void TQPSPrinterFontTTF::uni2glyphSetup()
ULONG offset = 0;
int map = -1;
- bool symbol = TRUE;
+ bool symbol = true;
for (i=0; i<nmaps; i++) {
USHORT platform = getUSHORT(cmap+pos); pos+=2;
USHORT encoding = getUSHORT(cmap+pos); pos+=2;
@@ -2904,7 +2904,7 @@ void TQPSPrinterFontTTF::uni2glyphSetup()
//fprintf(stderr,"[%d] plat %d enc %d\n",i,platform,encoding);
if (platform == 3 && encoding == 1) {
map = i;
- symbol = FALSE;
+ symbol = false;
break; // unicode
}
if (platform == 3 && encoding == 0) {
@@ -3019,7 +3019,7 @@ void TQPSPrinterFontTTF::sfnts_pputBYTE(BYTE n,TQTextStream& s,
s << "<";
string_len = 0;
line_len++;
- in_string = TRUE;
+ in_string = true;
}
s << hexdigits[ n / 16 ] ;
@@ -3080,7 +3080,7 @@ void TQPSPrinterFontTTF::sfnts_end_string(TQTextStream& s,
line_len++;
}
- in_string=FALSE;
+ in_string=false;
}
/*
@@ -3143,7 +3143,7 @@ void TQPSPrinterFontTTF::sfnts_glyf_table(ULONG oldoffset,
*/
if( length % 2 ) {
tqWarning("TrueType font contains a 'glyf' table without 2 byte padding");
- defective = TRUE;
+ defective = true;
return;
}
@@ -3166,7 +3166,7 @@ void TQPSPrinterFontTTF::sfnts_glyf_table(ULONG oldoffset,
/* Look for unexplainable descrepancies between sizes */
if( total != correct_total_length ) {
tqWarning("TQPSPrinterFontTTF::sfnts_glyf_table: total != correct_total_length");
- defective = TRUE;
+ defective = true;
return;
}
}
@@ -3239,7 +3239,7 @@ void TQPSPrinterFontTTF::download_sfnts(TQTextStream& s)
s << "/sfnts[<";
- bool in_string=TRUE;
+ bool in_string=true;
int string_len=0;
int line_len=8;
@@ -3295,7 +3295,7 @@ void TQPSPrinterFontTTF::download_sfnts(TQTextStream& s)
} else { // other tables should not exceed 64K (not always true; Sivan)
if( tables[x].length > 65535 ) {
tqWarning("TrueType font has a table which is too long");
- defective = TRUE;
+ defective = true;
return;
}
@@ -3762,7 +3762,7 @@ void TQPSPrinterFontTTF::subsetGlyph(int charindex,bool* glyphset)
USHORT glyphIndex;
charproc_data cd;
- glyphset[charindex] = TRUE;
+ glyphset[charindex] = true;
//printf("subsetting %s ==> ",glyphName(charindex).latin1());
/* Get a pointer to the data. */
@@ -3786,7 +3786,7 @@ void TQPSPrinterFontTTF::subsetGlyph(int charindex,bool* glyphset)
glyphIndex = getUSHORT(glyph); /* read the glyphindex word */
glyph += 2;
- glyphset[ glyphIndex ] = TRUE;
+ glyphset[ glyphIndex ] = true;
subsetGlyph( glyphIndex, glyphset );
//printf("subset contains: %d %s ",glyphIndex, glyphName(glyphIndex).latin1());
@@ -4036,7 +4036,7 @@ class TQPSPrinterFontPFA
public:
TQPSPrinterFontPFA(const TQFontEngine *f, TQByteArray& data);
virtual void download(TQTextStream& s, bool global);
- virtual bool embedded() { return TRUE; }
+ virtual bool embedded() { return true; }
private:
TQByteArray data;
};
@@ -4092,7 +4092,7 @@ class TQPSPrinterFontPFB
public:
TQPSPrinterFontPFB(const TQFontEngine *f, TQByteArray& data);
virtual void download(TQTextStream& s, bool global);
- virtual bool embedded() { return TRUE; }
+ virtual bool embedded() { return true; }
private:
TQByteArray data;
};
@@ -4235,7 +4235,7 @@ void TQPSPrinterFontNotFound::download(TQTextStream& s, bool)
s << "% No embeddable font for ";
s << psname;
s << " found\n";
- TQPSPrinterFontPrivate::download(s, TRUE);
+ TQPSPrinterFontPrivate::download(s, true);
}
#ifndef TQT_NO_TEXTCODEC
@@ -4855,13 +4855,13 @@ TQPSPrinterFontSimplifiedChinese::TQPSPrinterFontSimplifiedChinese(const TQFontE
codec = TQTextCodec::codecForMib( 114 ); // GB18030
int type = getPsFontType( f );
TQString family = f->fontDef.family.lower();
- if( family.contains("kai",FALSE) ) {
+ if( family.contains("kai",false) ) {
psname = KaiGBK2K[type].psname;
appendReplacements( replacementList, KaiGBK2KReplacements, type );
- } else if( family.contains("fangsong",FALSE) ) {
+ } else if( family.contains("fangsong",false) ) {
psname = FangSongGBK2K[type].psname;
appendReplacements( replacementList, FangSongGBK2KReplacements, type );
- } else if( family.contains("hei",FALSE) ) {
+ } else if( family.contains("hei",false) ) {
psname = HeiGBK2K[type].psname;
appendReplacements( replacementList, HeiGBK2KReplacements, type );
} else {
@@ -4916,7 +4916,7 @@ TQPSPrinterFont::TQPSPrinterFont(const TQFont &f, int script, TQPSPrinterPrivate
xfontname = makePSFontName( engine );
#if defined( TQ_WS_X11 )
- bool xlfd = FALSE;
+ bool xlfd = false;
//tqDebug("engine = %p name=%s, script=%d", engine, engine ? engine->name() : "(null)", script);
#ifndef TQT_NO_XFTFREETYPE
@@ -4944,7 +4944,7 @@ TQPSPrinterFont::TQPSPrinterFont(const TQFont &f, int script, TQPSPrinterPrivate
xfontname = rawName.mid(0,index);
if ( xfontname.endsWith( "*" ) )
xfontname.truncate( xfontname.length() - 1 );
- xlfd = TRUE;
+ xlfd = true;
}
}
#endif // TQ_WS_X11
@@ -5139,17 +5139,17 @@ TQPSPrinterFont::TQPSPrinterFont(const TQFont &f, int script, TQPSPrinterPrivate
TQPSPrinterPrivate::TQPSPrinterPrivate( TQPrinter *prt, int filedes )
- : buffer( 0 ), outDevice( 0 ), fd( filedes ), pageBuffer( 0 ), fonts(27, FALSE), fontBuffer(0), savedImage( 0 ),
- dirtypen( FALSE ), dirtybrush( FALSE ), dirtyBkColor( FALSE ), bkMode( TQt::TransparentMode ), dirtyBkMode( FALSE ),
+ : buffer( 0 ), outDevice( 0 ), fd( filedes ), pageBuffer( 0 ), fonts(27, false), fontBuffer(0), savedImage( 0 ),
+ dirtypen( false ), dirtybrush( false ), dirtyBkColor( false ), bkMode( TQt::TransparentMode ), dirtyBkMode( false ),
#ifndef TQT_NO_TEXTCODEC
currentFontCodec( 0 ),
#endif
fm( TQFont() ), textY( 0 )
{
printer = prt;
- headerFontNames.setAutoDelete( TRUE );
- pageFontNames.setAutoDelete( TRUE );
- fonts.setAutoDelete( TRUE );
+ headerFontNames.setAutoDelete( true );
+ pageFontNames.setAutoDelete( true );
+ fonts.setAutoDelete( true );
currentFontFile = 0;
scale = 1.;
scriptUsed = -1;
@@ -5157,18 +5157,18 @@ TQPSPrinterPrivate::TQPSPrinterPrivate( TQPrinter *prt, int filedes )
#ifdef TQ_WS_X11
// append tqsettings fontpath
TQSettings settings;
- embedFonts = settings.readBoolEntry( "/qt/embedFonts", TRUE );
+ embedFonts = settings.readBoolEntry( "/qt/embedFonts", true );
int npaths;
char** font_path;
font_path = XGetFontPath( tqt_xdisplay(), &npaths);
- bool xfsconfig_read = FALSE;
+ bool xfsconfig_read = false;
for (int i=0; i<npaths; i++) {
// If we're using xfs, append font paths from /etc/X11/fs/config
// can't hurt, and chances are we'll get all fonts that way.
if (((font_path[i])[0] != '/') && !xfsconfig_read) {
// We're using xfs -> read its config
- bool finished = FALSE;
+ bool finished = false;
TQFile f("/etc/X11/fs/config");
if ( !f.exists() )
f.setName("/usr/X11R6/lib/X11/fs/config");
@@ -5182,23 +5182,23 @@ TQPSPrinterPrivate::TQPSPrinterPrivate( TQPrinter *prt, int filedes )
fs=fs.stripWhiteSpace();
if (fs.left(9)=="catalogue" && fs.contains('=')) {
fs=fs.mid(fs.find('=')+1).stripWhiteSpace();
- bool end = FALSE;
+ bool end = false;
while( f.status()==IO_Ok && !end ) {
if ( fs[int(fs.length())-1] == ',' )
fs = fs.left(fs.length()-1);
else
- end = TRUE;
+ end = true;
if (fs[0] != '#' && !fs.contains(":unscaled"))
fontpath += fs;
f.readLine(fs, 1024);
fs=fs.stripWhiteSpace();
}
- finished = TRUE;
+ finished = true;
}
}
f.close();
}
- xfsconfig_read = TRUE;
+ xfsconfig_read = true;
} else if(!strstr(font_path[i], ":unscaled")) {
// Fonts paths marked :unscaled are always bitmapped fonts
// -> we can as well ignore them now and save time
@@ -5212,7 +5212,7 @@ TQPSPrinterPrivate::TQPSPrinterPrivate( TQPrinter *prt, int filedes )
if ( !fp.isEmpty() )
fontpath += fp;
#else
- embedFonts = FALSE;
+ embedFonts = false;
#endif
}
@@ -5560,13 +5560,13 @@ static TQByteArray compress( const TQImage & image, bool gray ) {
4 pixels back (an overlap of 6). */
if ( start + length > index && length > 0 ) {
int d = index-start;
- int equal = TRUE;
+ int equal = true;
while( equal && start + length > index &&
start > d && start-d >= index-tableSize ) {
int i = 0;
while( equal && i < d ) {
if( pixel[start+i] != pixel[start+i-d] )
- equal = FALSE;
+ equal = false;
i++;
}
if ( equal )
@@ -5825,7 +5825,7 @@ void TQPSPrinterPrivate::drawImage( TQPainter *paint, float x, float y, float w,
const char *bits;
if ( !mask.isNull() ) {
- out = ::compress( mask, TRUE );
+ out = ::compress( mask, true );
size = (width+7)/8*height;
pageStream << "/mask " << size << " string uc\n";
ps_r7( pageStream, out, out.size() );
@@ -5882,7 +5882,7 @@ void TQPSPrinterPrivate::matrixSetup( TQPainter *paint )
<< p.x() << ' ' << p.y()
<< "]ST\n";
#endif
- dirtyMatrix = FALSE;
+ dirtyMatrix = false;
}
void TQPSPrinterPrivate::orientationSetup()
@@ -6016,7 +6016,7 @@ void TQPSPrinterPrivate::emitHeader( bool finished )
<< pageCount << "\n";
TQDictIterator<TQPSPrinterFontPrivate> it(fonts);
while (it.current()) {
- it.current()->download(outStream,TRUE); // true means its global
+ it.current()->download(outStream,true); // true means its global
++it;
}
outStream.writeRawBytes( fontBuffer->buffer().data(),
@@ -6064,8 +6064,8 @@ void TQPSPrinterPrivate::resetDrawingTools( TQPainter *paint )
}
}
- dirtypen = TRUE;
- dirtybrush = TRUE;
+ dirtypen = true;
+ dirtybrush = true;
if ( paint->hasViewXForm() || paint->hasWorldXForm() )
matrixSetup( paint );
@@ -6104,7 +6104,7 @@ void TQPSPrinterPrivate::clippingSetup( TQPainter *paint )
boundingBox = boundingBox.unite( rects[i] );
}
pageStream << "CLEND\n"; // end clipping
- firstClipOnPage = FALSE;
+ firstClipOnPage = false;
} else {
if ( !firstClipOnPage ) // no need to turn off if first on page
setClippingOff( paint );
@@ -6115,7 +6115,7 @@ void TQPSPrinterPrivate::clippingSetup( TQPainter *paint )
if ( !boundingBox.isValid() )
boundingBox.setRect( 0, 0, m.width(), m.height() );
}
- dirtyClipping = FALSE;
+ dirtyClipping = false;
}
void TQPSPrinterPrivate::initPage(TQPainter *paint)
@@ -6144,12 +6144,12 @@ void TQPSPrinterPrivate::initPage(TQPainter *paint)
delete savedImage;
savedImage = 0;
textY = 0;
- dirtyClipping = TRUE;
- firstClipOnPage = TRUE;
+ dirtyClipping = true;
+ firstClipOnPage = true;
resetDrawingTools( paint );
- dirtyNewPage = FALSE;
+ dirtyNewPage = false;
pageFontNumber = headerFontNumber;
}
@@ -6176,7 +6176,7 @@ void TQPSPrinterPrivate::flushPage( bool last )
// we have already downloaded the header. Maybe we have page fonts here
TQDictIterator<TQPSPrinterFontPrivate> it(fonts);
while (it.current()) {
- it.current()->download( outStream, FALSE ); // FALSE means its for the page only
+ it.current()->download( outStream, false ); // false means its for the page only
++it;
}
}
@@ -6256,17 +6256,17 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
d->fontStream.setDevice( d->fontBuffer );
d->headerFontNumber = 0;
d->pageCount = 1; // initialize state
- d->dirtyMatrix = TRUE;
- d->dirtyClipping = TRUE;
- d->dirtyNewPage = TRUE;
- d->firstClipOnPage = TRUE;
+ d->dirtyMatrix = true;
+ d->dirtyClipping = true;
+ d->dirtyNewPage = true;
+ d->firstClipOnPage = true;
d->boundingBox = TQRect( 0, 0, -1, -1 );
d->fontsUsed = TQString::fromLatin1("");
TQPaintDeviceMetrics m( d->printer );
d->scale = 72. / ((float) m.logicalDpiY());
- return TRUE;
+ return true;
}
if ( c == PdcEnd ) { // painting done
@@ -6274,14 +6274,14 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
// we're writing to lp/lpr through a pipe, we don't want to crash with SIGPIPE
// if lp/lpr dies
- ignoreSigPipe(TRUE);
- d->flushPage( TRUE );
+ ignoreSigPipe(true);
+ d->flushPage( true );
d->outStream << "%%Trailer\n";
if ( pageCountAtEnd )
d->outStream << "%%Pages: " << d->pageCount - 1 << "\n" <<
wrapDSC( "%%DocumentFonts: " + d->fontsUsed );
d->outStream << "%%EOF\n";
- ignoreSigPipe(FALSE);
+ ignoreSigPipe(false);
d->outStream.unsetDevice();
if ( d->outDevice )
@@ -6295,7 +6295,7 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
if ( c >= PdcDrawFirst && c <= PdcDrawLast ) {
if ( !paint )
- return FALSE; // sanity
+ return false; // sanity
if ( d->dirtyNewPage )
d->initPage( paint );
if ( d->dirtyMatrix )
@@ -6314,7 +6314,7 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
<< ' ' << color( d->cpen.color(), d->printer )
<< psCap( d->cpen.capStyle() )
<< psJoin( d->cpen.joinStyle() ) << "PE\n";
- d->dirtypen = FALSE;
+ d->dirtypen = false;
}
if ( d->dirtybrush ) {
// we special-case for nobrush and solid white, since
@@ -6327,18 +6327,18 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
else
d->pageStream << (int)d->cbrush.style() << ' '
<< color( d->cbrush.color(), d->printer ) << "BR\n";
- d->dirtybrush = FALSE;
+ d->dirtybrush = false;
}
if ( d->dirtyBkColor ) {
d->pageStream << color( d->bkColor, d->printer ) << "BC\n";
- d->dirtyBkColor = FALSE;
+ d->dirtyBkColor = false;
}
if ( d->dirtyBkMode ) {
if ( d->bkMode == TQt::TransparentMode )
d->pageStream << "/OMo false d\n";
else
d->pageStream << "/OMo true d\n";
- d->dirtyBkMode = FALSE;
+ d->dirtyBkMode = false;
}
}
@@ -6442,15 +6442,15 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
break;
case PdcDrawText2:
// we use drawTextItem instead
- return TRUE;
+ return true;
case PdcDrawText2Formatted:
- return TRUE;
+ return true;
case PdcDrawTextItem: {
const TQTextItem *ti = p[1].textItem;
TQScriptItem &si = ti->engine->items[ti->item];
int len = ti->engine->length( ti->item );
if ( si.isSpace || si.isObject )
- return FALSE;
+ return false;
if ( d->currentSet != d->currentUsed || d->scriptUsed != si.analysis.script || !d->currentFontFile ) {
d->currentUsed = d->currentSet;
@@ -6459,7 +6459,7 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
if( d->currentFontFile ) // better not crash in case somethig goes wrong.
d->currentFontFile->drawText( d->pageStream, *p[0].point, ti->engine, ti->item,
ti->engine->string.mid( si.position, len ), d, paint);
- return FALSE;
+ return false;
}
case PdcDrawPixmap: {
if ( p[1].pixmap->isNull() )
@@ -6490,7 +6490,7 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
{
if ( d->bkColor != *(p[0].color) ) {
d->bkColor = *(p[0].color);
- d->dirtyBkColor = TRUE;
+ d->dirtyBkColor = true;
}
break;
}
@@ -6498,7 +6498,7 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
{
if ( d->bkMode != p[0].ival ) {
d->bkMode = (TQt::BGMode) p[0].ival;
- d->dirtyBkMode = TRUE;
+ d->dirtyBkMode = true;
}
break;
}
@@ -6514,12 +6514,12 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
d->currentSet = *(p[0].font);
d->fm = paint->fontMetrics();
// turn these off - they confuse the 'avoid font change' logic
- d->currentSet.setUnderline( FALSE );
- d->currentSet.setStrikeOut( FALSE );
+ d->currentSet.setUnderline( false );
+ d->currentSet.setStrikeOut( false );
break;
case PdcSetPen:
if ( d->cpen != *(p[0].pen) ) {
- d->dirtypen = TRUE;
+ d->dirtypen = true;
d->cpen = *(p[0].pen);
}
break;
@@ -6528,16 +6528,16 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
#if defined(CHECK_RANGE)
tqWarning( "TQPrinter: Pixmap brush not supported" );
#endif
- return FALSE;
+ return false;
}
if ( d->cbrush != *(p[0].brush) ) {
- d->dirtybrush = TRUE;
+ d->dirtybrush = true;
d->cbrush = *(p[0].brush);
}
break;
case PdcSetTabStops:
case PdcSetTabArray:
- return FALSE;
+ return false;
case PdcSetUnit:
break;
case PdcSetVXform:
@@ -6546,29 +6546,29 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
case PdcSetWXform:
case PdcSetWMatrix:
case PdcRestoreWMatrix:
- d->dirtyMatrix = TRUE;
+ d->dirtyMatrix = true;
break;
case PdcSetClip:
- d->dirtyClipping = TRUE;
+ d->dirtyClipping = true;
break;
case PdcSetClipRegion:
- d->dirtyClipping = TRUE;
+ d->dirtyClipping = true;
break;
case NewPage:
// we're writing to lp/lpr through a pipe, we don't want to crash with SIGPIPE
// if lp/lpr dies
- ignoreSigPipe(TRUE);
+ ignoreSigPipe(true);
d->flushPage();
- ignoreSigPipe(FALSE);
+ ignoreSigPipe(false);
- d->dirtyNewPage = TRUE;
+ d->dirtyNewPage = true;
break;
case AbortPrinting:
break;
default:
break;
}
- return TRUE;
+ return true;
}
#endif // TQT_NO_PRINTER
diff --git a/src/kernel/tqrect.cpp b/src/kernel/tqrect.cpp
index 0af8a22cb..6a03918e8 100644
--- a/src/kernel/tqrect.cpp
+++ b/src/kernel/tqrect.cpp
@@ -145,8 +145,8 @@ TQRect::TQRect( const TQPoint &topLeft, const TQSize &size )
/*!
\fn bool TQRect::isNull() const
- Returns TRUE if the rectangle is a null rectangle; otherwise
- returns FALSE.
+ Returns true if the rectangle is a null rectangle; otherwise
+ returns false.
A null rectangle has both the width and the height set to 0, that
is right() == left() - 1 and bottom() == top() - 1.
@@ -164,7 +164,7 @@ TQRect::TQRect( const TQPoint &topLeft, const TQSize &size )
/*!
\fn bool TQRect::isEmpty() const
- Returns TRUE if the rectangle is empty; otherwise returns FALSE.
+ Returns true if the rectangle is empty; otherwise returns false.
An empty rectangle has a left() \> right() or top() \> bottom().
@@ -176,7 +176,7 @@ TQRect::TQRect( const TQPoint &topLeft, const TQSize &size )
/*!
\fn bool TQRect::isValid() const
- Returns TRUE if the rectangle is valid; otherwise returns FALSE.
+ Returns true if the rectangle is valid; otherwise returns false.
A valid rectangle has a left() \<= right() and top() \<= bottom().
@@ -734,10 +734,10 @@ void TQRect::setSize( const TQSize &s )
}
/*!
- Returns TRUE if the point \a p is inside or on the edge of the
- rectangle; otherwise returns FALSE.
+ Returns true if the point \a p is inside or on the edge of the
+ rectangle; otherwise returns false.
- If \a proper is TRUE, this function returns TRUE only if \a p is
+ If \a proper is true, this function returns true only if \a p is
inside (not on the edge).
*/
@@ -754,27 +754,27 @@ bool TQRect::contains( const TQPoint &p, bool proper ) const
/*!
\overload bool TQRect::contains( int x, int y, bool proper ) const
- Returns TRUE if the point \a x, \a y is inside this rectangle;
- otherwise returns FALSE.
+ Returns true if the point \a x, \a y is inside this rectangle;
+ otherwise returns false.
- If \a proper is TRUE, this function returns TRUE only if the point
+ If \a proper is true, this function returns true only if the point
is entirely inside (not on the edge).
*/
/*!
\overload bool TQRect::contains( int x, int y ) const
- Returns TRUE if the point \a x, \a y is inside this rectangle;
- otherwise returns FALSE.
+ Returns true if the point \a x, \a y is inside this rectangle;
+ otherwise returns false.
*/
/*!
\overload
- Returns TRUE if the rectangle \a r is inside this rectangle;
- otherwise returns FALSE.
+ Returns true if the rectangle \a r is inside this rectangle;
+ otherwise returns false.
- If \a proper is TRUE, this function returns TRUE only if \a r is
+ If \a proper is true, this function returns true only if \a r is
entirely inside (not on the edge).
\sa unite(), intersect(), intersects()
@@ -873,9 +873,9 @@ TQRect TQRect::intersect( const TQRect &r ) const
}
/*!
- Returns TRUE if this rectangle intersects with rectangle \a r
+ Returns true if this rectangle intersects with rectangle \a r
(there is at least one pixel that is within both rectangles);
- otherwise returns FALSE.
+ otherwise returns false.
\sa intersect(), contains()
*/
@@ -890,7 +890,7 @@ bool TQRect::intersects( const TQRect &r ) const
/*!
\relates TQRect
- Returns TRUE if \a r1 and \a r2 are equal; otherwise returns FALSE.
+ Returns true if \a r1 and \a r2 are equal; otherwise returns false.
*/
bool operator==( const TQRect &r1, const TQRect &r2 )
@@ -901,7 +901,7 @@ bool operator==( const TQRect &r1, const TQRect &r2 )
/*!
\relates TQRect
- Returns TRUE if \a r1 and \a r2 are different; otherwise returns FALSE.
+ Returns true if \a r1 and \a r2 are different; otherwise returns false.
*/
bool operator!=( const TQRect &r1, const TQRect &r2 )
diff --git a/src/kernel/tqrect.h b/src/kernel/tqrect.h
index 1b66b1834..dffdc26a5 100644
--- a/src/kernel/tqrect.h
+++ b/src/kernel/tqrect.h
@@ -123,10 +123,10 @@ public:
TQRect& operator|=(const TQRect &r);
TQRect& operator&=(const TQRect &r);
- bool contains( const TQPoint &p, bool proper=FALSE ) const;
+ bool contains( const TQPoint &p, bool proper=false ) const;
bool contains( int x, int y ) const; // inline methods, _don't_ merge these
bool contains( int x, int y, bool proper ) const;
- bool contains( const TQRect &r, bool proper=FALSE ) const;
+ bool contains( const TQRect &r, bool proper=false ) const;
TQRect unite( const TQRect &r ) const;
TQRect intersect( const TQRect &r ) const;
bool intersects( const TQRect &r ) const;
diff --git a/src/kernel/tqregion.h b/src/kernel/tqregion.h
index e8590cbdb..ff56ad665 100644
--- a/src/kernel/tqregion.h
+++ b/src/kernel/tqregion.h
@@ -58,7 +58,7 @@ public:
TQRegion();
TQRegion( int x, int y, int w, int h, RegionType = Rectangle );
TQRegion( const TQRect &, RegionType = Rectangle );
- TQRegion( const TQPointArray &, bool winding=FALSE );
+ TQRegion( const TQPointArray &, bool winding=false );
TQRegion( const TQRegion & );
TQRegion( const TQBitmap & );
~TQRegion();
@@ -101,7 +101,7 @@ public:
#elif defined(TQ_WS_X11)
Region handle() const { if(!data->rgn) updateX11Region(); return data->rgn; }
#elif defined(TQ_WS_MAC)
- RgnHandle handle(bool require_rgn=FALSE) const;
+ RgnHandle handle(bool require_rgn=false) const;
#endif
#ifndef TQT_NO_DATASTREAM
diff --git a/src/kernel/tqregion_x11.cpp b/src/kernel/tqregion_x11.cpp
index a42b0f11e..4866ff539 100644
--- a/src/kernel/tqregion_x11.cpp
+++ b/src/kernel/tqregion_x11.cpp
@@ -1324,13 +1324,13 @@ static bool EqualRegion( TQRegionPrivate *r1, TQRegionPrivate *r2 )
{
int i;
- if( r1->numRects != r2->numRects ) return FALSE;
- else if( r1->numRects == 0 ) return TRUE;
+ if( r1->numRects != r2->numRects ) return false;
+ else if( r1->numRects == 0 ) return true;
else if ( r1->extents.left() != r2->extents.left() ||
r1->extents.right() != r2->extents.right() ||
r1->extents.top() != r2->extents.top() ||
r1->extents.bottom() != r2->extents.bottom() )
- return FALSE;
+ return false;
else {
TQRect *rr1 = r1->rects.data();
TQRect *rr2 = r2->rects.data();
@@ -1339,10 +1339,10 @@ static bool EqualRegion( TQRegionPrivate *r1, TQRegionPrivate *r2 )
rr1->right() != rr2->right() ||
rr1->top() != rr2->top() ||
rr1->bottom() != rr2->bottom() )
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
static bool PointInRegion( TQRegionPrivate *pRegion, int x, int y )
@@ -1350,15 +1350,15 @@ static bool PointInRegion( TQRegionPrivate *pRegion, int x, int y )
int i;
if (pRegion->numRects == 0)
- return FALSE;
+ return false;
if (!pRegion->extents.contains(x, y))
- return FALSE;
+ return false;
for (i=0; i<pRegion->numRects; i++)
{
if (pRegion->rects[i].contains(x, y))
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
static bool RectInRegion(TQRegionPrivate *region,
@@ -1374,10 +1374,10 @@ static bool RectInRegion(TQRegionPrivate *region,
if ((region->numRects == 0) || !EXTENTCHECK(&region->extents, prect))
return(RectangleOut);
- partOut = FALSE;
- partIn = FALSE;
+ partOut = false;
+ partIn = false;
- /* can stop when both partOut and partIn are TRUE, or we reach prect->y2 */
+ /* can stop when both partOut and partIn are true, or we reach prect->y2 */
for (pbox = region->rects.data(), pboxEnd = pbox + region->numRects;
pbox < pboxEnd;
pbox++)
@@ -1388,7 +1388,7 @@ static bool RectInRegion(TQRegionPrivate *region,
if (pbox->top() > ry)
{
- partOut = TRUE; /* missed part of rectangle above */
+ partOut = true; /* missed part of rectangle above */
if (partIn || (pbox->top() > prect->bottom()))
break;
ry = pbox->top(); /* x guaranteed to be == prect->x1 */
@@ -1399,14 +1399,14 @@ static bool RectInRegion(TQRegionPrivate *region,
if (pbox->left() > rx)
{
- partOut = TRUE; /* missed part of rectangle to left */
+ partOut = true; /* missed part of rectangle to left */
if (partIn)
break;
}
if (pbox->left() <= prect->right())
{
- partIn = TRUE; /* definitely overlap */
+ partIn = true; /* definitely overlap */
if (partOut)
break;
}
@@ -2166,7 +2166,7 @@ static int PtsToRegion(int numFullPtBlocks, int iCurPtBlock,
}
reg->numRects = numRects;
- return(TRUE);
+ return(true);
}
/*
@@ -2193,7 +2193,7 @@ static TQRegionPrivate *PolygonRegion(TQPoint *Pts, int Count, int rule)
EdgeTableEntry AET; /* header node for AET */
EdgeTableEntry *pETEs; /* EdgeTableEntries pool */
ScanLineListBlock SLLBlock; /* header for scanlinelist */
- int fixWAET = FALSE;
+ int fixWAET = false;
POINTBLOCK FirstPtBlock, *curPtBlock; /* PtBlock buffers */
POINTBLOCK *tmpPtBlock;
int numFullPtBlocks = 0;
@@ -2325,7 +2325,7 @@ static TQRegionPrivate *PolygonRegion(TQPoint *Pts, int Count, int rule)
*/
if (InsertionSort(&AET) || fixWAET) {
computeWAET(&AET);
- fixWAET = FALSE;
+ fixWAET = false;
}
}
}
@@ -2434,7 +2434,7 @@ TQRegion::TQRegion()
{
if ( !empty_region ) { // avoid too many allocs
tqAddPostRoutine( cleanup_empty_region );
- empty_region = new TQRegion( TRUE );
+ empty_region = new TQRegion( true );
TQ_CHECK_PTR( empty_region );
}
data = empty_region->data;
@@ -2470,7 +2470,7 @@ TQRegion::TQRegion( const TQRect &r, RegionType t )
if ( r.isEmpty() ) {
if ( !empty_region ) { // avoid too many allocs
tqAddPostRoutine( cleanup_empty_region );
- empty_region = new TQRegion( TRUE );
+ empty_region = new TQRegion( true );
TQ_CHECK_PTR( empty_region );
}
data = empty_region->data;
@@ -2478,7 +2478,7 @@ TQRegion::TQRegion( const TQRect &r, RegionType t )
} else {
data = new TQRegionData;
TQ_CHECK_PTR( data );
- data->is_null = FALSE;
+ data->is_null = false;
data->rgn = 0;
data->xrectangles = 0;
if ( t == Rectangle ) { // rectangular region
@@ -2496,7 +2496,7 @@ TQRegion::TQRegion( const TQRect &r, RegionType t )
/*!
Constructs a polygon region from the point array \a a.
- If \a winding is TRUE, the polygon region is filled using the
+ If \a winding is true, the polygon region is filled using the
winding algorithm, otherwise the default even-odd fill algorithm
is used.
@@ -2509,7 +2509,7 @@ TQRegion::TQRegion( const TQPointArray &a, bool winding )
if (a.size() > 2) {
data = new TQRegionData;
TQ_CHECK_PTR( data );
- data->is_null = FALSE;
+ data->is_null = false;
data->rgn = 0;
data->xrectangles = 0;
data->region = PolygonRegion( (TQPoint*)a.data(), a.size(),
@@ -2517,7 +2517,7 @@ TQRegion::TQRegion( const TQPointArray &a, bool winding )
} else {
if ( !empty_region ) {
tqAddPostRoutine( cleanup_empty_region );
- empty_region = new TQRegion( TRUE );
+ empty_region = new TQRegion( true );
TQ_CHECK_PTR( empty_region );
}
data = empty_region->data;
@@ -2552,7 +2552,7 @@ TQRegion::TQRegion( const TQBitmap & bm )
if ( bm.isNull() ) {
if ( !empty_region ) { // avoid too many allocs
tqAddPostRoutine( cleanup_empty_region );
- empty_region = new TQRegion( TRUE );
+ empty_region = new TQRegion( true );
TQ_CHECK_PTR( empty_region );
}
data = empty_region->data;
@@ -2560,7 +2560,7 @@ TQRegion::TQRegion( const TQBitmap & bm )
} else {
data = new TQRegionData;
TQ_CHECK_PTR( data );
- data->is_null = FALSE;
+ data->is_null = false;
data->rgn = 0;
data->xrectangles = 0;
data->region = qt_bitmapToRegion(bm);
@@ -2618,8 +2618,8 @@ TQRegion TQRegion::copy() const
}
/*!
- Returns TRUE if the region is a null region; otherwise returns
- FALSE.
+ Returns true if the region is a null region; otherwise returns
+ false.
A null region is a region that has not been initialized. A null
region is always empty.
@@ -2634,7 +2634,7 @@ bool TQRegion::isNull() const
/*!
- Returns TRUE if the region is empty; otherwise returns FALSE. An
+ Returns true if the region is empty; otherwise returns false. An
empty region is a region that contains no points.
Example:
@@ -2642,16 +2642,16 @@ bool TQRegion::isNull() const
TQRegion r1( 10, 10, 20, 20 );
TQRegion r2( 40, 40, 20, 20 );
TQRegion r3;
- r1.isNull(); // FALSE
- r1.isEmpty(); // FALSE
- r3.isNull(); // TRUE
- r3.isEmpty(); // TRUE
+ r1.isNull(); // false
+ r1.isEmpty(); // false
+ r3.isNull(); // true
+ r3.isEmpty(); // true
r3 = r1.intersect( r2 ); // r3 = intersection of r1 and r2
- r3.isNull(); // FALSE
- r3.isEmpty(); // TRUE
+ r3.isNull(); // false
+ r3.isEmpty(); // true
r3 = r1.unite( r2 ); // r3 = union of r1 and r2
- r3.isNull(); // FALSE
- r3.isEmpty(); // FALSE
+ r3.isNull(); // false
+ r3.isEmpty(); // false
\endcode
\sa isNull()
@@ -2664,8 +2664,8 @@ bool TQRegion::isEmpty() const
/*!
- Returns TRUE if the region contains the point \a p; otherwise
- returns FALSE.
+ Returns true if the region contains the point \a p; otherwise
+ returns false.
*/
bool TQRegion::contains( const TQPoint &p ) const
@@ -2676,8 +2676,8 @@ bool TQRegion::contains( const TQPoint &p ) const
/*!
\overload
- Returns TRUE if the region overlaps the rectangle \a r; otherwise
- returns FALSE.
+ Returns true if the region overlaps the rectangle \a r; otherwise
+ returns false.
*/
bool TQRegion::contains( const TQRect &r ) const
@@ -2715,7 +2715,7 @@ void TQRegion::translate( int dx, int dy )
TQRegion TQRegion::unite( const TQRegion &r ) const
{
- TQRegion result( FALSE );
+ TQRegion result( false );
UnionRegion( data->region, r.data->region, result.data->region );
return result;
}
@@ -2730,7 +2730,7 @@ TQRegion TQRegion::unite( const TQRegion &r ) const
TQRegion TQRegion::intersect( const TQRegion &r ) const
{
- TQRegion result( FALSE );
+ TQRegion result( false );
IntersectRegion( data->region, r.data->region, result.data->region );
return result;
}
@@ -2746,7 +2746,7 @@ TQRegion TQRegion::intersect( const TQRegion &r ) const
TQRegion TQRegion::subtract( const TQRegion &r ) const
{
- TQRegion result( FALSE );
+ TQRegion result( false );
SubtractRegion( data->region, r.data->region, result.data->region );
return result;
}
@@ -2762,7 +2762,7 @@ TQRegion TQRegion::subtract( const TQRegion &r ) const
TQRegion TQRegion::eor( const TQRegion &r ) const
{
- TQRegion result( FALSE );
+ TQRegion result( false );
XorRegion( data->region, r.data->region, result.data->region );
return result;
}
@@ -2806,7 +2806,7 @@ TQMemArray<TQRect> TQRegion::rects() const
*/
void TQRegion::setRects( const TQRect *rects, int num )
{
- *this = TQRegion( FALSE );
+ *this = TQRegion( false );
if ( !rects || (num == 1 && rects->isEmpty()) )
num = 0;
@@ -2828,21 +2828,21 @@ void TQRegion::setRects( const TQRect *rects, int num )
}
/*!
- Returns TRUE if the region is equal to \a r; otherwise returns
- FALSE.
+ Returns true if the region is equal to \a r; otherwise returns
+ false.
*/
bool TQRegion::operator==( const TQRegion &r ) const
{
return data == r.data ?
- TRUE : EqualRegion( data->region, r.data->region );
+ true : EqualRegion( data->region, r.data->region );
}
/*!
\fn bool TQRegion::operator!=( const TQRegion &r ) const
- Returns TRUE if the region is different from \a r; otherwise
- returns FALSE.
+ Returns true if the region is different from \a r; otherwise
+ returns false.
*/
/*
diff --git a/src/kernel/tqrichtext.cpp b/src/kernel/tqrichtext.cpp
index 98fbc8f53..eddb23761 100644
--- a/src/kernel/tqrichtext.cpp
+++ b/src/kernel/tqrichtext.cpp
@@ -83,7 +83,7 @@ const int border_tolerance = 2;
static inline bool is_printer( TQPainter *p )
{
if ( !p || !p->device() )
- return FALSE;
+ return false;
return p->device()->devType() == TQInternal::Printer;
}
@@ -111,7 +111,7 @@ static inline int scale( int value, TQPainter *painter )
inline bool isBreakable( TQTextString *string, int pos )
{
if (string->at(pos).nobreak)
- return FALSE;
+ return false;
return (pos < string->length()-1 && string->at(pos+1).softBreak);
}
@@ -121,7 +121,7 @@ void TQTextCommandHistory::addCommand( TQTextCommand *cmd )
{
if ( current < (int)history.count() - 1 ) {
TQPtrList<TQTextCommand> commands;
- commands.setAutoDelete( FALSE );
+ commands.setAutoDelete( false );
for( int i = 0; i <= current; ++i ) {
commands.insert( i, history.at( 0 ) );
@@ -131,7 +131,7 @@ void TQTextCommandHistory::addCommand( TQTextCommand *cmd )
commands.append( cmd );
history.clear();
history = commands;
- history.setAutoDelete( TRUE );
+ history.setAutoDelete( true );
} else {
history.append( cmd );
}
@@ -254,7 +254,7 @@ TQTextCursor *TQTextDeleteCommand::unexecute( TQTextCursor *c )
cursor.setParagraph( s );
cursor.setIndex( index );
TQString str = TQTextString::toString( text );
- cursor.insert( str, TRUE, &text );
+ cursor.insert( str, true, &text );
if ( c )
*c = cursor;
cursor.setParagraph( s );
@@ -275,7 +275,7 @@ TQTextCursor *TQTextDeleteCommand::unexecute( TQTextCursor *c )
s = cursor.paragraph();
while ( s ) {
s->format();
- s->setChanged( TRUE );
+ s->setChanged( true );
if ( s == c->paragraph() )
break;
s = s->next();
@@ -429,7 +429,7 @@ TQTextCursor *TQTextStyleCommand::unexecute( TQTextCursor *c )
TQTextCursor::TQTextCursor( TQTextDocument *d )
: idx( 0 ), tmpX( -1 ), ox( 0 ), oy( 0 ),
- valid( TRUE )
+ valid( true )
{
para = d ? d->firstParagraph() : 0;
}
@@ -522,7 +522,7 @@ void TQTextCursor::invalidateNested()
void TQTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<TQTextStringChar> *formatting )
{
tmpX = -1;
- bool justInsert = TRUE;
+ bool justInsert = true;
TQString s( str );
#if defined(TQ_WS_WIN)
if ( checkNewLine ) {
@@ -539,7 +539,7 @@ void TQTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<TQ
for ( int i = 0; i < (int)s.length(); ++i ) {
if ( formatting->at( i ).format() ) {
formatting->at( i ).format()->addRef();
- para->string()->setFormat( idx + i, formatting->at( i ).format(), TRUE );
+ para->string()->setFormat( idx + i, formatting->at( i ).format(), true );
}
}
}
@@ -562,7 +562,7 @@ void TQTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<TQ
for ( int i = 0; i < len; ++i ) {
if ( formatting->at( i + lastIndex ).format() ) {
formatting->at( i + lastIndex ).format()->addRef();
- para->string()->setFormat( i + idx, formatting->at( i + lastIndex ).format(), TRUE );
+ para->string()->setFormat( i + idx, formatting->at( i + lastIndex ).format(), true );
}
}
lastIndex += len;
@@ -570,15 +570,15 @@ void TQTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<TQ
start = end; // next start is at the end of this line
idx += len; // increase the index of the cursor to the end of the inserted text
if ( s[end] == '\n' ) { // if at the end was a line break, break the line
- splitAndInsertEmptyParagraph( FALSE, TRUE );
+ splitAndInsertEmptyParagraph( false, true );
para->setEndState( -1 );
- para->prev()->format( -1, FALSE );
+ para->prev()->format( -1, false );
lastIndex++;
}
} while ( end < (int)s.length() );
- para->format( -1, FALSE );
+ para->format( -1, false );
int dy = para->rect().y() + para->rect().height() - y;
TQTextParagraph *p = para;
p->setParagId( p->prev() ? p->prev()->paragId() + 1 : 0 );
@@ -593,11 +593,11 @@ void TQTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<TQ
}
int h = para->rect().height();
- para->format( -1, TRUE );
+ para->format( -1, true );
if ( h != para->rect().height() )
invalidateNested();
else if ( para->document() && para->document()->parent() )
- para->document()->nextDoubleBuffered = TRUE;
+ para->document()->nextDoubleBuffered = true;
fixCursorPosition();
}
@@ -688,7 +688,7 @@ bool TQTextCursor::place( const TQPoint &p, TQTextParagraph *s, bool link, bool
str = s;
if ( pos.y() >= r.y() && pos.y() <= r.y() + r.height() )
break;
- if ( loosePlacing == TRUE && !s->next() ) {
+ if ( loosePlacing && !s->next() ) {
#ifdef TQ_WS_MACX
pos.setX( s->rect().x() + s->rect().width() );
#endif
@@ -698,7 +698,7 @@ bool TQTextCursor::place( const TQPoint &p, TQTextParagraph *s, bool link, bool
}
if ( !s || !str )
- return FALSE;
+ return false;
s = str;
@@ -715,7 +715,7 @@ bool TQTextCursor::place( const TQPoint &p, TQTextParagraph *s, bool link, bool
cy = s->lineY( i );
ch = s->lineHeight( i );
if ( !chr )
- return FALSE;
+ return false;
if ( pos.y() <= y + cy + ch )
break;
}
@@ -731,7 +731,7 @@ bool TQTextCursor::place( const TQPoint &p, TQTextParagraph *s, bool link, bool
int cw;
int curpos = -1;
int dist = 10000000;
- bool inCustom = FALSE;
+ bool inCustom = false;
while ( i < nextLine ) {
chr = s->at(i);
int cpos = x + chr->x;
@@ -740,7 +740,7 @@ bool TQTextCursor::place( const TQPoint &p, TQTextParagraph *s, bool link, bool
if ( chr->isCustom() && chr->customItem()->isNested() ) {
if ( pos.x() >= cpos && pos.x() <= cpos + cw &&
pos.y() >= y + cy && pos.y() <= y + cy + chr->height() ) {
- inCustom = TRUE;
+ inCustom = true;
curpos = i;
break;
}
@@ -751,20 +751,20 @@ bool TQTextCursor::place( const TQPoint &p, TQTextParagraph *s, bool link, bool
cpos += cw;
int d = cpos - pos.x();
bool dm = d < 0 ? !chr->rightToLeft : chr->rightToLeft;
- if ( ( matchBetweenCharacters == TRUE && (TQABS( d ) < dist || (dist == d && dm == TRUE )) && para->string()->validCursorPosition( i ) ) ||
- ( matchBetweenCharacters == FALSE && ( d == 0 || dm == TRUE ) ) ) {
+ if ( ( matchBetweenCharacters && (TQABS( d ) < dist || (dist == d && dm)) && para->string()->validCursorPosition( i ) ) ||
+ ( !matchBetweenCharacters && ( d == 0 || dm ) ) ) {
dist = TQABS( d );
- if ( !link || ( pos.x() >= x + chr->x && ( loosePlacing == TRUE || pos.x() < cpos ) ) )
+ if ( !link || ( pos.x() >= x + chr->x && ( loosePlacing || pos.x() < cpos ) ) )
curpos = i;
}
}
i++;
}
if ( curpos == -1 ) {
- if ( loosePlacing == TRUE )
+ if ( loosePlacing )
curpos = s->length()-1;
else
- return FALSE;
+ return false;
}
setIndex( curpos );
@@ -773,26 +773,26 @@ bool TQTextCursor::place( const TQPoint &p, TQTextParagraph *s, bool link, bool
TQTextDocument *oldDoc = para->document();
gotoIntoNested( pos );
if ( oldDoc == para->document() )
- return TRUE;
+ return true;
TQPoint p( pos.x() - offsetX(), pos.y() - offsetY() );
if ( !place( p, document()->firstParagraph(), link ) )
pop();
}
#endif
- return TRUE;
+ return true;
}
bool TQTextCursor::processNesting( Operation op )
{
if ( !para->document() )
- return FALSE;
+ return false;
TQTextDocument* doc = para->document();
push();
ox = para->at( idx )->x;
int bl, y;
para->lineHeightOfChar( idx, &bl, &y );
oy = y + para->rect().y();
- bool ok = FALSE;
+ bool ok = false;
#ifndef TQT_NO_TEXTCUSTOMITEM
switch ( op ) {
@@ -800,7 +800,7 @@ bool TQTextCursor::processNesting( Operation op )
ok = para->at( idx )->customItem()->enter( this, doc, para, idx, ox, oy );
break;
case EnterEnd:
- ok = para->at( idx )->customItem()->enter( this, doc, para, idx, ox, oy, TRUE );
+ ok = para->at( idx )->customItem()->enter( this, doc, para, idx, ox, oy, true );
break;
case Next:
ok = para->at( idx )->customItem()->next( this, doc, para, idx, ox, oy );
@@ -1092,7 +1092,7 @@ void TQTextCursor::gotoPreviousWord( bool onlySpace )
gotoPreviousLetter();
tmpX = -1;
TQTextString *s = para->string();
- bool allowSame = FALSE;
+ bool allowSame = false;
if ( idx == ((int)s->length()-1) )
return;
for ( int i = idx; i >= 0; --i ) {
@@ -1103,7 +1103,7 @@ void TQTextCursor::gotoPreviousWord( bool onlySpace )
return;
}
if ( !allowSame && !is_seperator( s->at( i ).c, onlySpace ) )
- allowSame = TRUE;
+ allowSame = true;
}
idx = 0;
}
@@ -1112,7 +1112,7 @@ void TQTextCursor::gotoNextWord( bool onlySpace )
{
tmpX = -1;
TQTextString *s = para->string();
- bool allowSame = FALSE;
+ bool allowSame = false;
for ( int i = idx; i < (int)s->length(); ++i ) {
if ( !is_seperator( s->at( i ).c, onlySpace ) ) {
if ( !allowSame )
@@ -1121,7 +1121,7 @@ void TQTextCursor::gotoNextWord( bool onlySpace )
return;
}
if ( !allowSame && is_seperator( s->at( i ).c, onlySpace ) )
- allowSame = TRUE;
+ allowSame = true;
}
@@ -1170,7 +1170,7 @@ void TQTextCursor::splitAndInsertEmptyParagraph( bool ind, bool updateIds )
TQTextParagraph *n = para->next();
TQTextParagraph *s = para->document()->createParagraph( para->document(), para, n, updateIds );
if ( f )
- s->setFormat( 0, 1, f, TRUE );
+ s->setFormat( 0, 1, f, true );
s->copyParagData( para );
if ( ind ) {
int oi, ni;
@@ -1185,7 +1185,7 @@ void TQTextCursor::splitAndInsertEmptyParagraph( bool ind, bool updateIds )
TQTextParagraph *p = para->prev();
TQTextParagraph *s = para->document()->createParagraph( para->document(), p, para, updateIds );
if ( f )
- s->setFormat( 0, 1, f, TRUE );
+ s->setFormat( 0, 1, f, true );
s->copyParagData( para );
if ( ind ) {
s->indent();
@@ -1199,10 +1199,10 @@ void TQTextCursor::splitAndInsertEmptyParagraph( bool ind, bool updateIds )
TQTextParagraph *s = para->document()->createParagraph( para->document(), para, n, updateIds );
s->copyParagData( para );
s->remove( 0, 1 );
- s->append( str, TRUE );
+ s->append( str, true );
for ( uint i = 0; i < str.length(); ++i ) {
TQTextStringChar* tsc = para->at( idx + i );
- s->setFormat( i, 1, tsc->format(), TRUE );
+ s->setFormat( i, 1, tsc->format(), true );
#ifndef TQT_NO_TEXTCUSTOMITEM
if ( tsc->isCustom() ) {
TQTextCustomItem * item = tsc->customItem();
@@ -1236,18 +1236,18 @@ bool TQTextCursor::remove()
int next = para->string()->nextCursorPosition( idx );
para->remove( idx, next-idx );
int h = para->rect().height();
- para->format( -1, TRUE );
+ para->format( -1, true );
if ( h != para->rect().height() )
invalidateNested();
else if ( para->document() && para->document()->parent() )
- para->document()->nextDoubleBuffered = TRUE;
- return FALSE;
+ para->document()->nextDoubleBuffered = true;
+ return false;
} else if ( para->next() ) {
para->join( para->next() );
invalidateNested();
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/* needed to implement backspace the correct way */
@@ -1268,19 +1268,19 @@ bool TQTextCursor::removePreviousChar()
int h = para->rect().height();
// shouldn't be needed, just to make sure.
fixCursorPosition();
- para->format( -1, TRUE );
+ para->format( -1, true );
if ( h != para->rect().height() )
invalidateNested();
else if ( para->document() && para->document()->parent() )
- para->document()->nextDoubleBuffered = TRUE;
- return FALSE;
+ para->document()->nextDoubleBuffered = true;
+ return false;
} else if ( para->prev() ) {
para = para->prev();
para->join( para->next() );
invalidateNested();
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void TQTextCursor::indent()
@@ -1342,18 +1342,18 @@ TQTextDocument::TQTextDocument( TQTextDocument *p )
void TQTextDocument::init()
{
- oTextValid = TRUE;
- mightHaveCustomItems = FALSE;
+ oTextValid = true;
+ mightHaveCustomItems = false;
if ( par )
par->insertChild( this );
pProcessor = 0;
- useFC = TRUE;
+ useFC = true;
pFormatter = 0;
indenter = 0;
fParag = 0;
txtFormat = TQt::AutoText;
- preferRichText = FALSE;
- pages = FALSE;
+ preferRichText = false;
+ pages = false;
focusIndicator.parag = 0;
minw = 0;
wused = 0;
@@ -1367,15 +1367,15 @@ void TQTextDocument::init()
#endif
contxt = TQString::null;
- underlLinks = par ? par->underlLinks : TRUE;
+ underlLinks = par ? par->underlLinks : true;
backBrush = 0;
buf_pixmap = 0;
- nextDoubleBuffered = FALSE;
+ nextDoubleBuffered = false;
if ( par )
withoutDoubleBuffer = par->withoutDoubleBuffer;
else
- withoutDoubleBuffer = FALSE;
+ withoutDoubleBuffer = false;
lParag = fParag = createParagraph( this, 0, 0 );
@@ -1393,9 +1393,9 @@ void TQTextDocument::init()
selectionColors[ Standard ] = TQApplication::palette().color( TQPalette::Active, TQColorGroup::Highlight );
- selectionText[ Standard ] = TRUE;
- selectionText[ IMSelectionText ] = TRUE;
- selectionText[ IMCompositionText ] = FALSE;
+ selectionText[ Standard ] = true;
+ selectionText[ IMSelectionText ] = true;
+ selectionText[ IMCompositionText ] = false;
commandHistory = new TQTextCommandHistory( 100 );
tStopWidth = formatCollection()->defaultFormat()->width( 'x' ) * 8;
}
@@ -1433,7 +1433,7 @@ void TQTextDocument::clear( bool createEmptyParag )
focusIndicator.parag = 0;
selections.clear();
oText = TQString::null;
- oTextValid = FALSE;
+ oTextValid = false;
}
int TQTextDocument::widthUsed() const
@@ -1485,14 +1485,14 @@ bool TQTextDocument::setMinimumWidth( int needed, int used, TQTextParagraph *p )
wused = TQMAX( wused, used );
wused = TQMAX( wused, minw );
cw = TQMAX( minw, cw );
- return TRUE;
+ return true;
}
void TQTextDocument::setPlainText( const TQString &text )
{
- preferRichText = FALSE;
+ preferRichText = false;
clear();
- oTextValid = TRUE;
+ oTextValid = true;
oText = text;
int lastNl = 0;
@@ -1576,33 +1576,33 @@ struct TQ_EXPORT TQTextDocumentTag {
if ( !textEditMode && curpar && curpar->length()>1 && curpar->at( curpar->length()-2)->c == TQChar_linesep ) \
curpar->remove( curpar->length()-2, 1 ); \
curpar = createParagraph( this, curpar, curpar->next() ); styles.append( vec ); vec = 0;} \
- hasNewPar = TRUE; \
- curpar->rtext = TRUE; \
+ hasNewPar = true; \
+ curpar->rtext = true; \
curpar->align = curtag.alignment; \
curpar->lstyle = curtag.liststyle; \
curpar->litem = ( curtag.style->displayMode() == TQStyleSheetItem::DisplayListItem ); \
curpar->str->setDirection( (TQChar::Direction)curtag.direction ); \
- space = TRUE; \
+ space = true; \
tabExpansionColumn = 0; \
delete vec; vec = new TQPtrVector<TQStyleSheetItem>( (uint)tags.count() + 1); \
int i = 0; \
for ( TQValueStack<TQTextDocumentTag>::Iterator it = tags.begin(); it != tags.end(); ++it ) \
vec->insert( i++, (*it).style ); \
vec->insert( i, curtag.style ); \
- }while(FALSE);
+ }while(false);
void TQTextDocument::setRichText( const TQString &text, const TQString &context, const TQTextFormat *initialFormat )
{
- preferRichText = TRUE;
+ preferRichText = true;
if ( !context.isEmpty() )
setContext( context );
clear();
fParag = lParag = createParagraph( this );
- oTextValid = TRUE;
+ oTextValid = true;
oText = text;
setRichTextInternal( text, 0, initialFormat );
- fParag->rtext = TRUE;
+ fParag->rtext = true;
}
void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cursor, const TQTextFormat *initialFormat )
@@ -1616,10 +1616,10 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
if ( bodyText.isValid() )
initag.format.setColor( bodyText );
TQTextDocumentTag curtag = initag;
- bool space = TRUE;
- bool canMergeLi = FALSE;
+ bool space = true;
+ bool canMergeLi = false;
- bool textEditMode = FALSE;
+ bool textEditMode = false;
int tabExpansionColumn = 0;
const TQChar* doc = text.unicode();
@@ -1631,21 +1631,21 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
TQTextParagraph* stylesPar = curpar;
TQPtrVector<TQStyleSheetItem>* vec = 0;
TQPtrList< TQPtrVector<TQStyleSheetItem> > styles;
- styles.setAutoDelete( TRUE );
+ styles.setAutoDelete( true );
if ( cursor ) {
cursor->splitAndInsertEmptyParagraph();
TQTextCursor tmp = *cursor;
tmp.gotoPreviousLetter();
stylesPar = curpar = tmp.paragraph();
- hasNewPar = TRUE;
- textEditMode = TRUE;
+ hasNewPar = true;
+ textEditMode = true;
} else {
NEWPAR;
}
- // set rtext spacing to FALSE for the initial paragraph.
- curpar->rtext = FALSE;
+ // set rtext spacing to false for the initial paragraph.
+ curpar->rtext = false;
TQString wellKnownTags = "br hr wsp table qt body meta title";
@@ -1654,7 +1654,7 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
if ( !hasPrefix( doc, length, pos+1, TQChar('/') ) ) {
// open tag
TQMap<TQString, TQString> attr;
- bool emptyTag = FALSE;
+ bool emptyTag = false;
TQString tagname = parseOpenTag(doc, length, pos, attr, emptyTag);
if ( tagname.isEmpty() )
continue; // nothing we could do with this, probably parse error
@@ -1678,7 +1678,7 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
p, and we do not want new blocks inside non-empty
lis. Plus we want to merge empty lis sometimes. */
if( nstyle->displayMode() == TQStyleSheetItem::DisplayListItem ) {
- canMergeLi = TRUE;
+ canMergeLi = true;
} else if ( nstyle->displayMode() == TQStyleSheetItem::DisplayBlock ) {
while ( curtag.style->name() == "p" ) {
if ( tags.isEmpty() )
@@ -1689,7 +1689,7 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
if ( curtag.style->displayMode() == TQStyleSheetItem::DisplayListItem ) {
// we are in a li and a new block comes along
if ( nstyle->name() == "ul" || nstyle->name() == "ol" )
- hasNewPar = FALSE; // we want an empty li (like most browsers)
+ hasNewPar = false; // we want an empty li (like most browsers)
if ( !hasNewPar ) {
/* do not add new blocks inside
non-empty lis */
@@ -1703,7 +1703,7 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
comes along, merge them */
nstyle = curtag.style;
}
- canMergeLi = FALSE;
+ canMergeLi = false;
}
}
}
@@ -1711,25 +1711,25 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
#ifndef TQT_NO_TEXTCUSTOMITEM
TQTextCustomItem* custom = 0;
#else
- bool custom = FALSE;
+ bool custom = false;
#endif
// some well-known tags, some have a nstyle, some not
if ( wellKnownTags.find( tagname ) != -1 ) {
if ( tagname == "br" ) {
- emptyTag = space = TRUE;
+ emptyTag = space = true;
int index = TQMAX( curpar->length(),1) - 1;
TQTextFormat format = curtag.format.makeTextFormat( nstyle, attr, scaleFontsFactor );
curpar->append( TQChar_linesep );
curpar->setFormat( index, 1, &format );
hasNewPar = false;
} else if ( tagname == "hr" ) {
- emptyTag = space = TRUE;
+ emptyTag = space = true;
#ifndef TQT_NO_TEXTCUSTOMITEM
custom = sheet_->tag( tagname, attr, contxt, *factory_ , emptyTag, this );
#endif
} else if ( tagname == "table" ) {
- emptyTag = space = TRUE;
+ emptyTag = space = true;
#ifndef TQT_NO_TEXTCUSTOMITEM
TQTextFormat format = curtag.format.makeTextFormat( nstyle, attr, scaleFontsFactor );
curpar->setAlignment( curtag.alignment );
@@ -1785,7 +1785,7 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
// end qt- and body-tag handling
} else if ( tagname == "meta" ) {
if ( attr["name"] == "qrichtext" && attr["content"] == "1" )
- textEditMode = TRUE;
+ textEditMode = true;
} else if ( tagname == "title" ) {
TQString title;
while ( pos < length ) {
@@ -1821,7 +1821,7 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
anchorName = TQString::null;
}
registerCustomItem( custom, curpar );
- hasNewPar = FALSE;
+ hasNewPar = false;
#endif
} else if ( !emptyTag ) {
/* if we do nesting, push curtag on the stack,
@@ -1932,7 +1932,7 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
if ( attr.contains( "style" ) ) {
TQString a = attr["style"];
- bool ok = TRUE;
+ bool ok = true;
for ( int s = 0; ok && s < a.contains(';')+1; s++ ) {
TQString style = a.section( ';', s, s );
if ( style.startsWith("margin-top:" ) && style.endsWith("px") )
@@ -1985,7 +1985,7 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
if ( needNewPar ) {
if ( textEditMode && (tagname == "p" || tagname == "div" ) ) // preserve empty paragraphs
- hasNewPar = FALSE;
+ hasNewPar = false;
NEWPAR;
}
}
@@ -2026,9 +2026,9 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
*/
if ( curtag.wsm == TQStyleSheetItem::WhiteSpaceNormal && s.length() > 4096 ) do {
if ( doc[l] == '\n' ) {
- hasNewPar = FALSE; // for a new paragraph ...
+ hasNewPar = false; // for a new paragraph ...
NEWPAR;
- hasNewPar = FALSE; // ... and make it non-reusable
+ hasNewPar = false; // ... and make it non-reusable
c = '\n'; // make sure we break below
break;
}
@@ -2049,17 +2049,17 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
s += c;
}
if ( !s.isEmpty() && curtag.style->displayMode() != TQStyleSheetItem::DisplayNone ) {
- hasNewPar = FALSE;
+ hasNewPar = false;
int index = TQMAX( curpar->length(),1) - 1;
curpar->append( s );
if (curtag.wsm != TQStyleSheetItem::WhiteSpaceNormal) {
TQTextString *str = curpar->string();
for (uint i = index; i < index + s.length(); ++i)
- str->at(i).nobreak = TRUE;
+ str->at(i).nobreak = true;
}
TQTextFormat* f = formatCollection()->format( &curtag.format );
- curpar->setFormat( index, s.length(), f, FALSE ); // do not use collection because we have done that already
+ curpar->setFormat( index, s.length(), f, false ); // do not use collection because we have done that already
f->ref += s.length() -1; // that what friends are for...
if ( !curtag.anchorHref.isEmpty() ) {
for ( int i = 0; i < int(s.length()); i++ )
@@ -2113,7 +2113,7 @@ void TQTextDocument::setRichTextMarginsInternal( TQPtrList< TQPtrVector<TQStyleS
int i, mar;
TQStyleSheetItem* mainStyle = curStyle->size() ? (*curStyle)[curStyle->size()-1] : 0;
if ( mainStyle && mainStyle->displayMode() == TQStyleSheetItem::DisplayListItem )
- stylesPar->setListItem( TRUE );
+ stylesPar->setListItem( true );
int numLists = 0;
for ( i = 0; i < (int)curStyle->size(); ++i ) {
if ( (*curStyle)[ i ]->displayMode() == TQStyleSheetItem::DisplayBlock
@@ -2273,7 +2273,7 @@ TQString TQTextDocument::plainText() const
while ( p ) {
if ( !p->mightHaveCustomItems ) {
const TQTextString *ts = p->string();
- s = ts->toString(); // with FALSE we don't fix spaces (nbsp)
+ s = ts->toString(); // with false we don't fix spaces (nbsp)
} else {
for ( int i = 0; i < p->length() - 1; ++i ) {
#ifndef TQT_NO_TEXTCUSTOMITEM
@@ -2575,7 +2575,7 @@ bool TQTextDocument::setSelectionEnd( int id, const TQTextCursor &cursor )
{
TQMap<int, TQTextDocumentSelection>::Iterator it = selections.find( id );
if ( it == selections.end() )
- return FALSE;
+ return false;
TQTextDocumentSelection &sel = *it;
TQTextCursor start = sel.startCursor;
@@ -2584,15 +2584,15 @@ bool TQTextDocument::setSelectionEnd( int id, const TQTextCursor &cursor )
if ( start == end ) {
removeSelection( id );
setSelectionStart( id, cursor );
- return TRUE;
+ return true;
}
if ( sel.endCursor.paragraph() == end.paragraph() ) {
setSelectionEndHelper( id, sel, start, end );
- return TRUE;
+ return true;
}
- bool inSelection = FALSE;
+ bool inSelection = false;
TQTextCursor c( this );
TQTextCursor tmp = sel.startCursor;
if ( sel.swapped )
@@ -2601,32 +2601,32 @@ bool TQTextDocument::setSelectionEnd( int id, const TQTextCursor &cursor )
TQTextCursor tmp2 = cursor;
tmp2.restoreState();
c.setParagraph( tmp.paragraph()->paragId() < tmp2.paragraph()->paragId() ? tmp.paragraph() : tmp2.paragraph() );
- bool hadStart = FALSE;
- bool hadEnd = FALSE;
- bool hadStartParag = FALSE;
- bool hadEndParag = FALSE;
- bool hadOldStart = FALSE;
- bool hadOldEnd = FALSE;
- bool leftSelection = FALSE;
- sel.swapped = FALSE;
+ bool hadStart = false;
+ bool hadEnd = false;
+ bool hadStartParag = false;
+ bool hadEndParag = false;
+ bool hadOldStart = false;
+ bool hadOldEnd = false;
+ bool leftSelection = false;
+ sel.swapped = false;
for ( ;; ) {
if ( c == start )
- hadStart = TRUE;
+ hadStart = true;
if ( c == end )
- hadEnd = TRUE;
+ hadEnd = true;
if ( c.paragraph() == start.paragraph() )
- hadStartParag = TRUE;
+ hadStartParag = true;
if ( c.paragraph() == end.paragraph() )
- hadEndParag = TRUE;
+ hadEndParag = true;
if ( c == sel.startCursor )
- hadOldStart = TRUE;
+ hadOldStart = true;
if ( c == sel.endCursor )
- hadOldEnd = TRUE;
+ hadOldEnd = true;
if ( !sel.swapped &&
( ( hadEnd && !hadStart ) ||
( hadEnd && hadStart && start.paragraph() == end.paragraph() && start.index() > end.index() ) ) )
- sel.swapped = TRUE;
+ sel.swapped = true;
if ( ( c == end && hadStartParag ) ||
( c == start && hadEndParag ) ) {
@@ -2641,9 +2641,9 @@ bool TQTextDocument::setSelectionEnd( int id, const TQTextCursor &cursor )
if ( inSelection &&
( ( c == end && hadStart ) || ( c == start && hadEnd ) ) )
- leftSelection = TRUE;
+ leftSelection = true;
else if ( !leftSelection && !inSelection && ( hadStart || hadEnd ) )
- inSelection = TRUE;
+ inSelection = true;
bool noSelectionAnymore = hadOldStart && hadOldEnd && leftSelection && !inSelection && !c.paragraph()->hasSelection( id ) && c.atParagEnd();
c.paragraph()->removeSelection( id );
@@ -2664,7 +2664,7 @@ bool TQTextDocument::setSelectionEnd( int id, const TQTextCursor &cursor )
}
if ( leftSelection )
- inSelection = FALSE;
+ inSelection = false;
if ( noSelectionAnymore )
break;
@@ -2694,7 +2694,7 @@ bool TQTextDocument::setSelectionEnd( int id, const TQTextCursor &cursor )
setSelectionEndHelper( id, sel, start, end );
- return TRUE;
+ return true;
}
void TQTextDocument::selectAll( int id )
@@ -2702,7 +2702,7 @@ void TQTextDocument::selectAll( int id )
removeSelection( id );
TQTextDocumentSelection sel;
- sel.swapped = FALSE;
+ sel.swapped = false;
TQTextCursor c( this );
c.setParagraph( fParag );
@@ -2728,7 +2728,7 @@ void TQTextDocument::selectAll( int id )
bool TQTextDocument::removeSelection( int id )
{
if ( !selections.contains( id ) )
- return FALSE;
+ return false;
TQTextDocumentSelection &sel = selections[ id ];
@@ -2748,7 +2748,7 @@ bool TQTextDocument::removeSelection( int id )
p = start.paragraph();
p->removeSelection( id );
selections.remove( id );
- return TRUE;
+ return true;
}
TQString TQTextDocument::selectedText( int id, bool asRichText ) const
@@ -2916,17 +2916,17 @@ void TQTextDocument::setFormat( int id, TQTextFormat *f, int flags )
c1.restoreState();
if ( c1.paragraph() == c2.paragraph() ) {
- c1.paragraph()->setFormat( c1.index(), c2.index() - c1.index(), f, TRUE, flags );
+ c1.paragraph()->setFormat( c1.index(), c2.index() - c1.index(), f, true, flags );
return;
}
- c1.paragraph()->setFormat( c1.index(), c1.paragraph()->length() - c1.index(), f, TRUE, flags );
+ c1.paragraph()->setFormat( c1.index(), c1.paragraph()->length() - c1.index(), f, true, flags );
TQTextParagraph *p = c1.paragraph()->next();
while ( p && p != c2.paragraph() ) {
- p->setFormat( 0, p->length(), f, TRUE, flags );
+ p->setFormat( 0, p->length(), f, true, flags );
p = p->next();
}
- c2.paragraph()->setFormat( 0, c2.index(), f, TRUE, flags );
+ c2.paragraph()->setFormat( 0, c2.index(), f, true, flags );
}
void TQTextDocument::removeSelectedText( int id, TQTextCursor *cursor )
@@ -2960,9 +2960,9 @@ void TQTextDocument::removeSelectedText( int id, TQTextCursor *cursor )
if ( c1.paragraph() == fParag && c1.index() == 0 &&
c2.paragraph() == lParag && c2.index() == lParag->length() - 1 )
- cursor->setValid( FALSE );
+ cursor->setValid( false );
- bool didGoLeft = FALSE;
+ bool didGoLeft = false;
if ( c1.index() == 0 && c1.paragraph() != fParag ) {
cursor->gotoPreviousLetter();
didGoLeft = cursor->isValid();
@@ -3034,7 +3034,7 @@ bool TQTextDocument::find( TQTextCursor& cursor, const TQString &expr, bool cs,
removeSelection( Standard );
TQTextParagraph *p = 0;
if ( expr.isEmpty() )
- return FALSE;
+ return false;
for (;;) {
if ( p != cursor.paragraph() ) {
p = cursor.paragraph();
@@ -3054,7 +3054,7 @@ bool TQTextDocument::find( TQTextCursor& cursor, const TQString &expr, bool cs,
setSelectionEnd( Standard, cursor );
if ( !forward )
cursor.setIndex( res );
- return TRUE;
+ return true;
}
start = res + (forward ? 1 : -1);
}
@@ -3069,7 +3069,7 @@ bool TQTextDocument::find( TQTextCursor& cursor, const TQString &expr, bool cs,
cursor.gotoPreviousLetter();
}
}
- return FALSE;
+ return false;
}
void TQTextDocument::setTextFormat( TQt::TextFormat f )
@@ -3088,14 +3088,14 @@ bool TQTextDocument::inSelection( int selId, const TQPoint &pos ) const
{
TQMap<int, TQTextDocumentSelection>::ConstIterator it = selections.find( selId );
if ( it == selections.end() )
- return FALSE;
+ return false;
TQTextDocumentSelection sel = *it;
TQTextParagraph *startParag = sel.startCursor.paragraph();
TQTextParagraph *endParag = sel.endCursor.paragraph();
if ( sel.startCursor.paragraph() == sel.endCursor.paragraph() &&
sel.startCursor.paragraph()->selectionStart( selId ) == sel.endCursor.paragraph()->selectionEnd( selId ) )
- return FALSE;
+ return false;
if ( sel.endCursor.paragraph()->paragId() < sel.startCursor.paragraph()->paragId() ) {
endParag = sel.startCursor.paragraph();
startParag = sel.endCursor.paragraph();
@@ -3104,14 +3104,14 @@ bool TQTextDocument::inSelection( int selId, const TQPoint &pos ) const
TQTextParagraph *p = startParag;
while ( p ) {
if ( p->rect().contains( pos ) ) {
- bool inSel = FALSE;
+ bool inSel = false;
int selStart = p->selectionStart( selId );
int selEnd = p->selectionEnd( selId );
int y = 0;
int h = 0;
for ( int i = 0; i < p->length(); ++i ) {
if ( i == selStart )
- inSel = TRUE;
+ inSel = true;
if ( i == selEnd )
break;
if ( p->at( i )->lineStart ) {
@@ -3121,7 +3121,7 @@ bool TQTextDocument::inSelection( int selId, const TQPoint &pos ) const
if ( pos.y() - p->rect().y() >= y && pos.y() - p->rect().y() <= y + h ) {
if ( inSel && pos.x() >= p->at( i )->x &&
pos.x() <= p->at( i )->x + p->at( i )->format()->width( p->at( i )->c ) )
- return TRUE;
+ return true;
}
}
}
@@ -3132,7 +3132,7 @@ bool TQTextDocument::inSelection( int selId, const TQPoint &pos ) const
p = p->next();
}
- return FALSE;
+ return false;
}
void TQTextDocument::doLayout( TQPainter *p, int w )
@@ -3199,13 +3199,13 @@ void TQTextDocument::draw( TQPainter *p, const TQRect &rect, const TQColorGroup
}
p->translate( 0, y );
if ( rect.isValid() )
- parag->paint( *p, cg, 0, FALSE, rect.x(), rect.y(), rect.width(), rect.height() );
+ parag->paint( *p, cg, 0, false, rect.x(), rect.y(), rect.width(), rect.height() );
else
- parag->paint( *p, cg, 0, FALSE );
+ parag->paint( *p, cg, 0, false );
p->translate( 0, -y );
parag = parag->next();
if ( !flow()->isEmpty() )
- flow()->drawFloatingItems( p, rect.x(), rect.y(), rect.width(), rect.height(), cg, FALSE );
+ flow()->drawFloatingItems( p, rect.x(), rect.y(), rect.width(), rect.height(), cg, false );
}
TQTextFormat::setPainter(oldPainter);
}
@@ -3216,7 +3216,7 @@ void TQTextDocument::drawParagraph( TQPainter *p, TQTextParagraph *parag, int cx
{
TQPainter *painter = 0;
if ( resetChanged )
- parag->setChanged( FALSE );
+ parag->setChanged( false );
TQRect ir( parag->rect() );
#ifndef TQT_NO_TEXTCUSTOMITEM
if (!parag->tableCell())
@@ -3252,7 +3252,7 @@ void TQTextDocument::drawParagraph( TQPainter *p, TQTextParagraph *parag, int cx
painter->translate( -( ir.x() - parag->rect().x() ),
-( ir.y() - parag->rect().y() ) );
- parag->paint( *painter, cg, drawCursor ? cursor : 0, TRUE, cx, cy, cw, ch );
+ parag->paint( *painter, cg, drawCursor ? cursor : 0, true, cx, cy, cw, ch );
if ( uDoubleBuffer ) {
delete painter;
@@ -3262,19 +3262,19 @@ void TQTextDocument::drawParagraph( TQPainter *p, TQTextParagraph *parag, int cx
painter->translate( -ir.x(), -ir.y() );
}
- parag->document()->nextDoubleBuffered = FALSE;
+ parag->document()->nextDoubleBuffered = false;
}
TQTextParagraph *TQTextDocument::draw( TQPainter *p, int cx, int cy, int cw, int ch, const TQColorGroup &cg,
bool onlyChanged, bool drawCursor, TQTextCursor *cursor, bool resetChanged )
{
if ( withoutDoubleBuffer || ( par && par->withoutDoubleBuffer ) ) {
- withoutDoubleBuffer = TRUE;
+ withoutDoubleBuffer = true;
TQRect r;
draw( p, r, cg );
return 0;
}
- withoutDoubleBuffer = FALSE;
+ withoutDoubleBuffer = false;
if ( !firstParagraph() )
return 0;
@@ -3328,7 +3328,7 @@ TQTextParagraph *TQTextDocument::draw( TQPainter *p, int cx, int cy, int cw, int
}
if ( !flow()->isEmpty() ) {
TQRect cr( cx, cy, cw, ch );
- flow()->drawFloatingItems( p, cr.x(), cr.y(), cr.width(), cr.height(), cg, FALSE );
+ flow()->drawFloatingItems( p, cr.x(), cr.y(), cr.width(), cr.height(), cg, false );
}
}
@@ -3376,7 +3376,7 @@ void TQTextDocument::registerCustomItem( TQTextCustomItem *i, TQTextParagraph *p
p->registerFloatingItem( i );
}
if (i) i->setParagraph( p );
- p->mightHaveCustomItems = mightHaveCustomItems = TRUE;
+ p->mightHaveCustomItems = mightHaveCustomItems = true;
}
void TQTextDocument::unregisterCustomItem( TQTextCustomItem *i, TQTextParagraph *p )
@@ -3415,7 +3415,7 @@ bool TQTextDocument::focusNextPrevChild( bool next )
focusIndicator.len = 0;
}
} else {
- focusIndicator.parag->setChanged( TRUE );
+ focusIndicator.parag->setChanged( true );
}
focusIndicator.href = TQString::null;
focusIndicator.name = TQString::null;
@@ -3426,7 +3426,7 @@ bool TQTextDocument::focusNextPrevChild( bool next )
while ( p ) {
for ( int i = index; i < p->length(); ++i ) {
if ( p->at( i )->isAnchor() ) {
- p->setChanged( TRUE );
+ p->setChanged( true );
focusIndicator.parag = p;
focusIndicator.start = i;
focusIndicator.len = 0;
@@ -3434,7 +3434,7 @@ bool TQTextDocument::focusNextPrevChild( bool next )
focusIndicator.name = p->at( i )->anchorName();
while ( i < p->length() ) {
if ( !p->at( i )->isAnchor() )
- return TRUE;
+ return true;
focusIndicator.len++;
i++;
}
@@ -3445,19 +3445,19 @@ bool TQTextDocument::focusNextPrevChild( bool next )
TQPtrList<TQTextTableCell> cells = t->tableCells();
// first try to continue
TQTextTableCell *c;
- bool resetCells = TRUE;
+ bool resetCells = true;
for ( c = cells.first(); c; c = cells.next() ) {
if ( c->richText()->hasFocusParagraph() ) {
if ( c->richText()->focusNextPrevChild( next ) ) {
- p->setChanged( TRUE );
+ p->setChanged( true );
focusIndicator.parag = p;
focusIndicator.start = i;
focusIndicator.len = 0;
focusIndicator.href = c->richText()->focusHref();
focusIndicator.name = c->richText()->focusName();
- return TRUE;
+ return true;
} else {
- resetCells = FALSE;
+ resetCells = false;
c = cells.next();
break;
}
@@ -3468,13 +3468,13 @@ bool TQTextDocument::focusNextPrevChild( bool next )
c = cells.first();
for ( ; c; c = cells.next() ) {
if ( c->richText()->focusNextPrevChild( next ) ) {
- p->setChanged( TRUE );
+ p->setChanged( true );
focusIndicator.parag = p;
focusIndicator.start = i;
focusIndicator.len = 0;
focusIndicator.href = c->richText()->focusHref();
focusIndicator.name = c->richText()->focusName();
- return TRUE;
+ return true;
}
}
}
@@ -3492,7 +3492,7 @@ bool TQTextDocument::focusNextPrevChild( bool next )
while ( p ) {
for ( int i = index; i >= 0; --i ) {
if ( p->at( i )->isAnchor() ) {
- p->setChanged( TRUE );
+ p->setChanged( true );
focusIndicator.parag = p;
focusIndicator.start = i;
focusIndicator.len = 0;
@@ -3501,7 +3501,7 @@ bool TQTextDocument::focusNextPrevChild( bool next )
while ( i >= -1 ) {
if ( i < 0 || !p->at( i )->isAnchor() ) {
focusIndicator.start++;
- return TRUE;
+ return true;
}
if ( i < 0 )
break;
@@ -3516,19 +3516,19 @@ bool TQTextDocument::focusNextPrevChild( bool next )
TQPtrList<TQTextTableCell> cells = t->tableCells();
// first try to continue
TQTextTableCell *c;
- bool resetCells = TRUE;
+ bool resetCells = true;
for ( c = cells.last(); c; c = cells.prev() ) {
if ( c->richText()->hasFocusParagraph() ) {
if ( c->richText()->focusNextPrevChild( next ) ) {
- p->setChanged( TRUE );
+ p->setChanged( true );
focusIndicator.parag = p;
focusIndicator.start = i;
focusIndicator.len = 0;
focusIndicator.href = c->richText()->focusHref();
focusIndicator.name = c->richText()->focusName();
- return TRUE;
+ return true;
} else {
- resetCells = FALSE;
+ resetCells = false;
c = cells.prev();
break;
}
@@ -3541,13 +3541,13 @@ bool TQTextDocument::focusNextPrevChild( bool next )
c = cells.last();
for ( ; c; c = cells.prev() ) {
if ( c->richText()->focusNextPrevChild( next ) ) {
- p->setChanged( TRUE );
+ p->setChanged( true );
focusIndicator.parag = p;
focusIndicator.start = i;
focusIndicator.len = 0;
focusIndicator.href = c->richText()->focusHref();
focusIndicator.name = c->richText()->focusName();
- return TRUE;
+ return true;
}
if ( cells.at() == 0 )
break;
@@ -3564,7 +3564,7 @@ bool TQTextDocument::focusNextPrevChild( bool next )
focusIndicator.parag = 0;
- return FALSE;
+ return false;
}
int TQTextDocument::length() const
@@ -3656,15 +3656,15 @@ int TQTextFormat::width( const TQString &str, int pos ) const
TQTextString::TQTextString()
{
- bidiDirty = TRUE;
- bidi = FALSE;
- rightToLeft = FALSE;
+ bidiDirty = true;
+ bidi = false;
+ rightToLeft = false;
dir = TQChar::DirON;
}
TQTextString::TQTextString( const TQTextString &s )
{
- bidiDirty = TRUE;
+ bidiDirty = true;
bidi = s.bidi;
rightToLeft = s.rightToLeft;
dir = s.dir;
@@ -3695,14 +3695,14 @@ void TQTextString::insert( int index, const TQChar *unicode, int len, TQTextForm
ch->x = 0;
ch->lineStart = 0;
ch->d.format = 0;
- ch->nobreak = FALSE;
+ ch->nobreak = false;
ch->type = TQTextStringChar::Regular;
ch->d.format = f;
ch->rightToLeft = 0;
ch->c = unicode[i];
++ch;
}
- bidiDirty = TRUE;
+ bidiDirty = true;
}
TQTextString::~TQTextString()
@@ -3725,11 +3725,11 @@ void TQTextString::insert( int index, TQTextStringChar *c, bool doAddRefFormat
ch.rightToLeft = 0;
ch.d.format = 0;
ch.type = TQTextStringChar::Regular;
- ch.nobreak = FALSE;
+ ch.nobreak = false;
if ( doAddRefFormat && c->format() )
c->format()->addRef();
ch.setFormat( c->format() );
- bidiDirty = TRUE;
+ bidiDirty = true;
}
int TQTextString::appendParagraphs( TQTextParagraph *start, TQTextParagraph *end )
@@ -3755,14 +3755,14 @@ int TQTextString::appendParagraphs( TQTextParagraph *start, TQTextParagraph *end
d[i].lineStart = 0;
d[i].rightToLeft = 0;
d[i].type = TQTextStringChar::Regular;
- d[i].nobreak = FALSE;
+ d[i].nobreak = false;
d[i].d.format = src[i].format();
if (d[i].d.format)
d[i].d.format->addRef();
}
d[i].x = 0;
d[i].lineStart = 0;
- d[i].nobreak = FALSE;
+ d[i].nobreak = false;
d[i].type = TQTextStringChar::Regular;
d[i].d.format = 0;
d[i].rightToLeft = 0;
@@ -3770,7 +3770,7 @@ int TQTextString::appendParagraphs( TQTextParagraph *start, TQTextParagraph *end
d += p->length();
}
- bidiDirty = TRUE;
+ bidiDirty = true;
return paragCount;
}
@@ -3796,7 +3796,7 @@ void TQTextString::truncate( int index )
}
}
data.truncate( index );
- bidiDirty = TRUE;
+ bidiDirty = true;
}
void TQTextString::remove( int index, int len )
@@ -3819,7 +3819,7 @@ void TQTextString::remove( int index, int len )
memmove( data.data() + index, data.data() + index + len,
sizeof( TQTextStringChar ) * ( data.size() - index - len ) );
data.resize( data.size() - len, TQGArray::SpeedOptim );
- bidiDirty = TRUE;
+ bidiDirty = true;
}
void TQTextString::clear()
@@ -3841,7 +3841,7 @@ void TQTextString::clear()
}
}
data.resize( 0 );
- bidiDirty = TRUE;
+ bidiDirty = true;
}
void TQTextString::setFormat( int index, TQTextFormat *f, bool useCollection )
@@ -3855,10 +3855,10 @@ void TQTextString::setFormat( int index, TQTextFormat *f, bool useCollection )
void TQTextString::checkBidi() const
{
TQTextString *that = (TQTextString *)this;
- that->bidiDirty = FALSE;
+ that->bidiDirty = false;
int length = data.size();
if ( !length ) {
- that->bidi = FALSE;
+ that->bidi = false;
that->rightToLeft = dir == TQChar::DirR;
return;
}
@@ -3877,7 +3877,7 @@ void TQTextString::checkBidi() const
TQScriptItem *item = &textEngine.items[textEngine.items.size()-1];
unsigned char bidiLevel = item->analysis.bidiLevel;
if ( bidiLevel )
- that->bidi = TRUE;
+ that->bidi = true;
int pos = length-1;
while ( ch >= start ) {
if ( item->position > pos ) {
@@ -3886,7 +3886,7 @@ void TQTextString::checkBidi() const
Q_ASSERT( item < &textEngine.items[textEngine.items.size()] );
bidiLevel = item->analysis.bidiLevel;
if ( bidiLevel )
- that->bidi = TRUE;
+ that->bidi = true;
}
ch->softBreak = ca->softBreak;
ch->whiteSpace = ca->whiteSpace;
@@ -3900,10 +3900,10 @@ void TQTextString::checkBidi() const
}
if ( dir == TQChar::DirR ) {
- that->bidi = TRUE;
- that->rightToLeft = TRUE;
+ that->bidi = true;
+ that->rightToLeft = true;
} else if ( dir == TQChar::DirL ) {
- that->rightToLeft = FALSE;
+ that->rightToLeft = false;
} else {
that->rightToLeft = (textEngine.direction == TQChar::DirR);
}
@@ -4051,9 +4051,9 @@ int TQTextString::width( int idx ) const
TQTextParagraph::TQTextParagraph( TQTextDocument *d, TQTextParagraph *pr, TQTextParagraph *nx, bool updateIds )
: p( pr ), n( nx ), docOrPseudo( d ),
- changed(FALSE), firstFormat(TRUE), firstPProcess(TRUE), needPreProcess(FALSE), fullWidth(TRUE),
- lastInFrame(FALSE), visible(TRUE), breakable(TRUE), movedDown(FALSE),
- mightHaveCustomItems(FALSE), hasdoc( d != 0 ), litem(FALSE), rtext(FALSE),
+ changed(false), firstFormat(true), firstPProcess(true), needPreProcess(false), fullWidth(true),
+ lastInFrame(false), visible(true), breakable(true), movedDown(false),
+ mightHaveCustomItems(false), hasdoc( d != 0 ), litem(false), rtext(false),
align( 0 ), lstyle( TQStyleSheetItem::ListDisc ), invalid( 0 ), mSelections( 0 ),
#ifndef TQT_NO_TEXTCUSTOMITEM
mFloatingItems( 0 ),
@@ -4184,14 +4184,14 @@ void TQTextParagraph::insert( int index, const TQChar *unicode, int len )
else
str->insert( index, unicode, len, formatCollection()->defaultFormat() );
invalidate( index );
- needPreProcess = TRUE;
+ needPreProcess = true;
}
void TQTextParagraph::truncate( int index )
{
str->truncate( index );
insert( length(), " " );
- needPreProcess = TRUE;
+ needPreProcess = true;
}
void TQTextParagraph::remove( int index, int len )
@@ -4208,7 +4208,7 @@ void TQTextParagraph::remove( int index, int len )
#endif
str->remove( index, len );
invalidate( 0 );
- needPreProcess = TRUE;
+ needPreProcess = true;
}
void TQTextParagraph::join( TQTextParagraph *s )
@@ -4225,12 +4225,12 @@ void TQTextParagraph::join( TQTextParagraph *s )
remove( length() - 1, 1 );
--start;
}
- append( s->str->toString(), TRUE );
+ append( s->str->toString(), true );
for ( int i = 0; i < s->length(); ++i ) {
if ( !hasdoc || document()->useFormatCollection() ) {
s->str->at( i ).format()->addRef();
- str->setFormat( i + start, s->str->at( i ).format(), TRUE );
+ str->setFormat( i + start, s->str->at( i ).format(), true );
}
#ifndef TQT_NO_TEXTCUSTOMITEM
if ( s->str->at( i ).isCustom() ) {
@@ -4258,15 +4258,15 @@ void TQTextParagraph::join( TQTextParagraph *s )
delete s;
invalidate( 0 );
r.setHeight( oh );
- needPreProcess = TRUE;
+ needPreProcess = true;
if ( n ) {
TQTextParagraph *s = n;
s->invalidate( 0 );
while ( s ) {
s->id = s->p->id + 1;
s->state = -1;
- s->needPreProcess = TRUE;
- s->changed = TRUE;
+ s->needPreProcess = true;
+ s->changed = true;
s->invalidateStyleCache();
s = s->n;
}
@@ -4279,7 +4279,7 @@ void TQTextParagraph::move( int &dy )
{
if ( dy == 0 )
return;
- changed = TRUE;
+ changed = true;
r.moveBy( 0, dy );
#ifndef TQT_NO_TEXTCUSTOMITEM
if ( mFloatingItems ) {
@@ -4288,14 +4288,14 @@ void TQTextParagraph::move( int &dy )
}
#endif
if ( p )
- p->lastInFrame = TRUE;
+ p->lastInFrame = true;
// do page breaks if required
if ( hasdoc && document()->isPageBreakEnabled() ) {
int shift;
if ( ( shift = document()->formatter()->formatVertically( document(), this ) ) ) {
if ( p )
- p->setChanged( TRUE );
+ p->setChanged( true );
dy += shift;
}
}
@@ -4310,17 +4310,17 @@ void TQTextParagraph::format( int start, bool doMove )
{
document()->preProcessor()->process( document(), this, invalid <= 0 ? 0 : invalid );
}
- needPreProcess = FALSE;
+ needPreProcess = false;
if ( invalid == -1 )
return;
r.moveTopLeft( TQPoint( documentX(), p ? p->r.y() + p->r.height() : documentY() ) );
if ( p )
- p->lastInFrame = FALSE;
+ p->lastInFrame = false;
- movedDown = FALSE;
- bool formattedAgain = FALSE;
+ movedDown = false;
+ bool formattedAgain = false;
formatAgain:
@@ -4384,7 +4384,7 @@ void TQTextParagraph::format( int start, bool doMove )
if ( hasdoc && document()->isPageBreakEnabled() ) {
int shift = document()->formatter()->formatVertically( document(), this );
if ( shift && !formattedAgain ) {
- formattedAgain = TRUE;
+ formattedAgain = true;
goto formatAgain;
}
}
@@ -4395,20 +4395,20 @@ void TQTextParagraph::format( int start, bool doMove )
bool makeInvalid = p && p->lastInFrame;
while ( s && dy ) {
if ( !s->isFullWidth() )
- makeInvalid = TRUE;
+ makeInvalid = true;
if ( makeInvalid )
s->invalidate( 0 );
s->move( dy );
if ( s->lastInFrame )
- makeInvalid = TRUE;
+ makeInvalid = true;
s = s->n;
}
}
- firstFormat = FALSE;
- changed = TRUE;
+ firstFormat = false;
+ changed = true;
invalid = -1;
- //##### string()->setTextChanged( FALSE );
+ //##### string()->setTextChanged( false );
}
int TQTextParagraph::lineHeightOfChar( int i, int *bl, int *y ) const
@@ -4532,7 +4532,7 @@ void TQTextParagraph::setFormat( int index, int len, TQTextFormat *f, bool useCo
for ( int i = 0; i < len; ++i ) {
of = str->at( i + index ).format();
if ( !changed && ( !of || f->key() != of->key() ) )
- changed = TRUE;
+ changed = true;
if ( invalid == -1 &&
( f->font().family() != of->font().family() ||
f->font().pointSize() != of->font().pointSize() ||
@@ -4603,7 +4603,7 @@ void TQTextParagraph::paint( TQPainter &painter, const TQColorGroup &cg, TQTextC
// we flush at end of document
bool flush = (i == length()-1);
- bool ignoreSoftHyphen = FALSE;
+ bool ignoreSoftHyphen = false;
if ( !flush ) {
// we flush at end of line
flush |= nextchr->lineStart;
@@ -4619,9 +4619,9 @@ void TQTextParagraph::paint( TQPainter &painter, const TQColorGroup &cg, TQTextC
flush |= ( chr->c == '\t' || nextchr->c == '\t' );
// we flush on soft hypens
if (chr->c.unicode() == 0xad) {
- flush = TRUE;
+ flush = true;
if (!nextchr->lineStart)
- ignoreSoftHyphen = TRUE;
+ ignoreSoftHyphen = true;
}
// we flush on custom items
flush |= chr->isCustom();
@@ -4696,7 +4696,7 @@ void TQTextParagraph::paint( TQPainter &painter, const TQColorGroup &cg, TQTextC
chr, cg, chr->rightToLeft );
#ifndef TQT_NO_TEXTCUSTOMITEM
else if ( chr->customItem()->placement() == TQTextCustomItem::PlaceInline ) {
- bool inSelection = FALSE;
+ bool inSelection = false;
if (drawSelections) {
TQMap<int, TQTextParagraphSelection>::ConstIterator it = mSelections->find( TQTextDocument::Standard );
inSelection = (it != mSelections->end() && (*it).start <= i && (*it).end > i);
@@ -4767,7 +4767,7 @@ void TQTextParagraph::drawString( TQPainter &painter, const TQString &str, int s
TQTextStringChar *formatChar, const TQColorGroup& cg,
bool rightToLeft )
{
- bool plainText = hasdoc ? document()->textFormat() == TQt::PlainText : FALSE;
+ bool plainText = hasdoc ? document()->textFormat() == TQt::PlainText : false;
TQTextFormat* format = formatChar->format();
if ( !plainText || ( hasdoc && format->color() != document()->formatCollection()->defaultFormat()->color() ) )
@@ -4781,7 +4781,7 @@ void TQTextParagraph::drawString( TQPainter &painter, const TQString &str, int s
painter.setPen(document()->linkColor.isValid() ? document()->linkColor : cg.link());
if ( document()->underlineLinks() ) {
TQFont fn = format->font();
- fn.setUnderline( TRUE );
+ fn.setUnderline( true );
painter.setFont( fn );
}
}
@@ -4808,7 +4808,7 @@ void TQTextParagraph::drawString( TQPainter &painter, const TQString &str, int s
baseLine += (vAlign == TQTextFormat::AlignSubScript) ? h/6 : -h/2;
}
- bool allSelected = FALSE;
+ bool allSelected = false;
if (drawSelections) {
TQMap<int, TQTextParagraphSelection>::ConstIterator it = mSelections->find( TQTextDocument::Standard );
allSelected = (it != mSelections->end() && (*it).start <= start && (*it).end >= start+len);
@@ -4843,8 +4843,8 @@ void TQTextParagraph::drawString( TQPainter &painter, const TQString &str, int s
selStart = TQMAX(selStart, start);
int real_selEnd = TQMIN(selEnd, start+real_length);
selEnd = TQMIN(selEnd, start+len);
- bool extendRight = FALSE;
- bool extendLeft = FALSE;
+ bool extendRight = false;
+ bool extendLeft = false;
bool selWrap = (real_selEnd == length()-1 && n && n->hasSelection(it.key()));
if (selWrap || this->str->at(real_selEnd).lineStart) {
extendRight = (fullSelectionWidth != 0);
@@ -4852,10 +4852,10 @@ void TQTextParagraph::drawString( TQPainter &painter, const TQString &str, int s
tmpw += painter.fontMetrics().width(' ');
}
if (fullSelectionWidth && (selStart == 0 || this->str->at(selStart).lineStart)) {
- extendLeft = TRUE;
+ extendLeft = true;
}
if (this->str->isRightToLeft() != rightToLeft)
- extendLeft = extendRight = FALSE;
+ extendLeft = extendRight = false;
if (this->str->isRightToLeft()) {
bool tmp = extendLeft;
@@ -5046,7 +5046,7 @@ void TQTextParagraph::setListItem( bool li )
if ( (bool)litem == li )
return;
litem = li;
- changed = TRUE;
+ changed = true;
TQTextParagraph* s = prev() ? prev() : this;
while ( s ) {
s->invalidate( 0 );
@@ -5278,14 +5278,14 @@ void TQTextParagraph::show()
{
if ( visible || !hasdoc )
return;
- visible = TRUE;
+ visible = true;
}
void TQTextParagraph::hide()
{
if ( !visible || !hasdoc )
return;
- visible = FALSE;
+ visible = false;
}
void TQTextParagraph::setDirection( TQChar::Direction d )
@@ -5320,7 +5320,7 @@ TQTextPreProcessor::TQTextPreProcessor()
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
TQTextFormatter::TQTextFormatter()
- : thisminw(0), thiswused(0), wrapEnabled( TRUE ), wrapColumn( -1 ), biw( FALSE )
+ : thisminw(0), thiswused(0), wrapEnabled( true ), wrapColumn( -1 ), biw( false )
{
}
@@ -5506,11 +5506,11 @@ TQTextLineStart *TQTextFormatter::bidiReorderLine( TQTextParagraph * /*parag*/,
if ( text->isRightToLeft() ) {
xorig -= sw;
lastChar->x = xorig;
- ch->rightToLeft = TRUE;
+ ch->rightToLeft = true;
} else {
lastChar->x = x;
x += sw;
- ch->rightToLeft = FALSE;
+ ch->rightToLeft = false;
}
}
@@ -5559,7 +5559,7 @@ int TQTextFormatter::formatVertically( TQTextDocument* doc, TQTextParagraph* par
int delta = c->customItem()->height - h;
ls->h += delta;
if ( delta )
- parag->setMovedDown( TRUE );
+ parag->setMovedDown( true );
} else
#endif
{
@@ -5567,7 +5567,7 @@ int TQTextFormatter::formatVertically( TQTextDocument* doc, TQTextParagraph* par
int shift = doc->flow()->adjustFlow( parag->rect().y() + ls->y, ls->w, ls->h );
ls->y += shift;
if ( shift )
- parag->setMovedDown( TRUE );
+ parag->setMovedDown( true );
}
h = ls->y + ls->h;
}
@@ -5607,7 +5607,7 @@ int TQTextFormatterBreakInWords::format( TQTextDocument *doc,TQTextParagraph *pa
x = doc->flow()->adjustLMargin( y + parag->rect().y(), parag->rect().height(), x, 4 );
int rm = parag->rightMargin();
int w = dw - ( doc ? doc->flow()->adjustRMargin( y + parag->rect().y(), parag->rect().height(), rm, 4 ) : 0 );
- bool fullWidth = TRUE;
+ bool fullWidth = true;
int minw = 0;
int wused = 0;
bool wrapEnabled = isWrapEnabled( parag );
@@ -5723,7 +5723,7 @@ TQTextFormatterBreakWords::TQTextFormatterBreakWords()
int shift = doc->flow()->adjustFlow( yflow, dw, lineStart->h ); \
lineStart->y += shift;\
y += shift;\
- }}while(FALSE)
+ }}while(false)
int TQTextFormatterBreakWords::format( TQTextDocument *doc, TQTextParagraph *parag,
int start, const TQMap<int, TQTextLineStart*> & )
@@ -5747,7 +5747,7 @@ int TQTextFormatterBreakWords::format( TQTextDocument *doc, TQTextParagraph *par
int rm = parag->rightMargin();
int rdiff = doc ? doc->flow()->adjustRMargin( y + parag->rect().y(), parag->rect().height(), rm, 0 ) : 0;
int w = dw - rdiff;
- bool fullWidth = TRUE;
+ bool fullWidth = true;
int marg = left + rdiff;
int minw = 0;
int wused = 0;
@@ -5762,7 +5762,7 @@ int TQTextFormatterBreakWords::format( TQTextDocument *doc, TQTextParagraph *par
insertLineStart( parag, 0, lineStart );
int lastBreak = -1;
int tmpBaseLine = 0, tmph = 0;
- bool lastWasNonInlineCustom = FALSE;
+ bool lastWasNonInlineCustom = false;
int align = parag->alignment();
if ( align == TQt::AlignAuto && doc && doc->alignment() != TQt::AlignAuto )
@@ -6071,7 +6071,7 @@ TQTextFormatCollection::TQTextFormatCollection()
TQApplication::palette().color( TQPalette::Active, TQColorGroup::Text ) );
lastFormat = cres = 0;
cflags = -1;
- cKey.setAutoDelete( TRUE );
+ cKey.setAutoDelete( true );
cachedFormat = 0;
}
@@ -6184,7 +6184,7 @@ TQTextFormat *TQTextFormatCollection::format( const TQFont &f, const TQColor &c
return cachedFormat;
}
- TQString key = TQTextFormat::getKey( f, c, FALSE, TQTextFormat::AlignNormal );
+ TQString key = TQTextFormat::getKey( f, c, false, TQTextFormat::AlignNormal );
cachedFormat = cKey.find( key );
cfont = f;
ccol = c;
@@ -6264,7 +6264,7 @@ void TQTextFormatCollection::updateKeys()
{
if ( cKey.isEmpty() )
return;
- cKey.setAutoDelete( FALSE );
+ cKey.setAutoDelete( false );
TQTextFormat** formats = new TQTextFormat*[ cKey.count() + 1 ];
TQTextFormat **f = formats;
TQDictIterator<TQTextFormat> it( cKey );
@@ -6275,7 +6275,7 @@ void TQTextFormatCollection::updateKeys()
cKey.clear();
for ( f = formats; *f; f++ )
cKey.insert( (*f)->key(), *f );
- cKey.setAutoDelete( TRUE );
+ cKey.setAutoDelete( true );
delete [] formats;
}
@@ -6344,7 +6344,7 @@ void TQTextFormat::setPointSize( int s )
if ( s == fn.pointSize() )
return;
fn.setPointSize( s );
- usePixelSizes = FALSE;
+ usePixelSizes = false;
update();
}
@@ -6387,24 +6387,24 @@ TQString TQTextFormat::makeFormatChangeTags( TQTextFormat* defaultFormat, TQText
if ( font().weight() != defaultFormat->font().weight() )
s += TQString(!!s?";":"") + "font-weight:" + TQString::number( fn.weight() * 8 );
TQString textDecoration;
- bool none = FALSE;
+ bool none = false;
if ( font().underline() != defaultFormat->font().underline() ) {
if (font().underline())
textDecoration = "underline";
else
- none = TRUE;
+ none = true;
}
if ( font().overline() != defaultFormat->font().overline() ) {
if (font().overline())
textDecoration += " overline";
else
- none = TRUE;
+ none = true;
}
if ( font().strikeOut() != defaultFormat->font().strikeOut() ) {
if (font().strikeOut())
textDecoration += " line-through";
else
- none = TRUE;
+ none = true;
}
if (none && textDecoration.isEmpty())
textDecoration = "none";
@@ -6455,7 +6455,7 @@ TQTextFormat TQTextFormat::makeTextFormat( const TQStyleSheetItem *style, const
// the style is not an anchor and defines a color.
// It might be used inside an anchor and it should
// override the link color.
- format.linkColor = FALSE;
+ format.linkColor = false;
}
switch ( style->verticalAlignment() ) {
case TQStyleSheetItem::VAlignBaseline:
@@ -6505,7 +6505,7 @@ TQTextFormat TQTextFormat::makeTextFormat( const TQStyleSheetItem *style, const
TQString s = attr["color"];
if ( !s.isEmpty() ) {
format.col.setNamedColor( s );
- format.linkColor = FALSE;
+ format.linkColor = false;
}
}
if ( attr.contains("face") ) {
@@ -6538,12 +6538,12 @@ TQTextFormat TQTextFormat::makeTextFormat( const TQStyleSheetItem *style, const
} else if ( style.startsWith("font-style:" ) ) {
TQString s = style.mid( 11 ).stripWhiteSpace();
if ( s == "normal" )
- format.fn.setItalic( FALSE );
+ format.fn.setItalic( false );
else if ( s == "italic" || s == "oblique" )
- format.fn.setItalic( TRUE );
+ format.fn.setItalic( true );
} else if ( style.startsWith("font-weight:" ) ) {
TQString s = style.mid( 12 );
- bool ok = TRUE;
+ bool ok = true;
int n = s.toInt( &ok );
if ( ok )
format.fn.setWeight( n/8 );
@@ -6568,7 +6568,7 @@ TQTextFormat TQTextFormat::makeTextFormat( const TQStyleSheetItem *style, const
format.setVAlign( TQTextFormat::AlignNormal );
} else if ( style.startsWith("color:" ) ) {
format.col.setNamedColor( style.mid(6) );
- format.linkColor = FALSE;
+ format.linkColor = false;
}
}
}
@@ -6818,7 +6818,7 @@ void TQTextHorizontalLine::draw( TQPainter* p, int x, int y, int , int , int , i
g.setColor( TQColorGroup::Dark, color );
if ( selected )
p->fillRect( r, g.highlight() );
- qDrawShadeLine( p, r.left() - 1, y + height / 2, r.right() + 1, y + height / 2, g, TRUE, height / 8 );
+ qDrawShadeLine( p, r.left() - 1, y + height / 2, r.right() + 1, y + height / 2, g, true, height / 8 );
}
}
#endif //TQT_NO_TEXTCUSTOMITEM
@@ -6830,19 +6830,19 @@ void TQTextHorizontalLine::draw( TQPainter* p, int x, int y, int , int , int , i
bool TQTextDocument::hasPrefix(const TQChar* doc, int length, int pos, TQChar c)
{
if ( pos + 1 > length )
- return FALSE;
+ return false;
return doc[ pos ].lower() == c.lower();
}
bool TQTextDocument::hasPrefix( const TQChar* doc, int length, int pos, const TQString& s )
{
if ( pos + (int) s.length() > length )
- return FALSE;
+ return false;
for ( int i = 0; i < (int)s.length(); i++ ) {
if ( doc[ pos + i ].lower() != s[ i ].lower() )
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
#ifndef TQT_NO_TEXTCUSTOMITEM
@@ -6851,9 +6851,9 @@ static bool qt_is_cell_in_use( TQPtrList<TQTextTableCell>& cells, int row, int c
for ( TQTextTableCell* c = cells.first(); c; c = cells.next() ) {
if ( row >= c->row() && row < c->row() + c->rowspan()
&& col >= c->column() && col < c->column() + c->colspan() )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
TQTextCustomItem* TQTextDocument::parseTable( const TQMap<TQString, TQString> &attr, const TQTextFormat &fmt,
@@ -6881,7 +6881,7 @@ TQTextCustomItem* TQTextDocument::parseTable( const TQMap<TQString, TQString> &a
}
} else {
TQMap<TQString, TQString> attr2;
- bool emptyTag = FALSE;
+ bool emptyTag = false;
tagname = parseOpenTag( doc, length, pos, attr2, emptyTag );
if ( tagname == "tr" ) {
rowbgcolor = attr2["bgcolor"];
@@ -7378,7 +7378,7 @@ TQChar TQTextDocument::parseChar(const TQChar* doc, int length, int& pos, TQStyl
TQString TQTextDocument::parseOpenTag(const TQChar* doc, int length, int& pos,
TQMap<TQString, TQString> &attr, bool& emptyTag)
{
- emptyTag = FALSE;
+ emptyTag = false;
pos++;
if ( hasPrefix(doc, length, pos, '!') ) {
if ( hasPrefix( doc, length, pos+1, "--")) {
@@ -7389,9 +7389,9 @@ TQString TQTextDocument::parseOpenTag(const TQChar* doc, int length, int& pos,
pos++;
if ( hasPrefix(doc, length, pos, pref ) ) {
pos += 3;
- eatSpace(doc, length, pos, TRUE);
+ eatSpace(doc, length, pos, true);
}
- emptyTag = TRUE;
+ emptyTag = true;
return TQString::null;
}
else {
@@ -7400,20 +7400,20 @@ TQString TQTextDocument::parseOpenTag(const TQChar* doc, int length, int& pos,
pos++;
if ( hasPrefix(doc, length, pos, '>') ) {
pos++;
- eatSpace(doc, length, pos, TRUE);
+ eatSpace(doc, length, pos, true);
}
return TQString::null;
}
}
TQString tag = parseWord(doc, length, pos );
- eatSpace(doc, length, pos, TRUE);
+ eatSpace(doc, length, pos, true);
static TQString term = TQString::fromLatin1("/>");
static TQString s_TRUE = TQString::fromLatin1("TRUE");
while (doc[pos] != '>' && ! (emptyTag = hasPrefix(doc, length, pos, term) )) {
TQString key = parseWord(doc, length, pos );
- eatSpace(doc, length, pos, TRUE);
+ eatSpace(doc, length, pos, true);
if ( key.isEmpty()) {
// error recovery
while ( pos < length && doc[pos] != '>' )
@@ -7424,12 +7424,12 @@ TQString TQTextDocument::parseOpenTag(const TQChar* doc, int length, int& pos,
if (hasPrefix(doc, length, pos, '=') ){
pos++;
eatSpace(doc, length, pos);
- value = parseWord(doc, length, pos, FALSE);
+ value = parseWord(doc, length, pos, false);
}
else
value = s_TRUE;
attr.insert(key.lower(), value );
- eatSpace(doc, length, pos, TRUE);
+ eatSpace(doc, length, pos, true);
}
if (emptyTag) {
@@ -7447,7 +7447,7 @@ TQString TQTextDocument::parseCloseTag( const TQChar* doc, int length, int& pos
pos++;
pos++;
TQString tag = parseWord(doc, length, pos );
- eatSpace(doc, length, pos, TRUE);
+ eatSpace(doc, length, pos, true);
eat(doc, length, pos, '>');
return tag;
}
@@ -7465,12 +7465,12 @@ TQTextFlow::~TQTextFlow()
void TQTextFlow::clear()
{
#ifndef TQT_NO_TEXTCUSTOMITEM
- leftItems.setAutoDelete( TRUE );
- rightItems.setAutoDelete( TRUE );
+ leftItems.setAutoDelete( true );
+ rightItems.setAutoDelete( true );
leftItems.clear();
rightItems.clear();
- leftItems.setAutoDelete( FALSE );
- rightItems.setAutoDelete( FALSE );
+ leftItems.setAutoDelete( false );
+ rightItems.setAutoDelete( false );
#endif
}
@@ -7587,7 +7587,7 @@ void TQTextCustomItem::pageBreak( int /*y*/ , TQTextFlow* /*flow*/ )
TQTextTable::TQTextTable( TQTextDocument *p, const TQMap<TQString, TQString> & attr )
: TQTextCustomItem( p )
{
- cells.setAutoDelete( FALSE );
+ cells.setAutoDelete( false );
cellspacing = 2;
if ( attr.contains("cellspacing") )
cellspacing = attr["cellspacing"].toInt();
@@ -7657,7 +7657,7 @@ TQString TQTextTable::richText() const
s += ">\n";
int lastRow = -1;
- bool needEnd = FALSE;
+ bool needEnd = false;
TQPtrListIterator<TQTextTableCell> it2( cells );
while ( it2.current() ) {
TQTextTableCell *cell = it2.current();
@@ -7667,7 +7667,7 @@ TQString TQTextTable::richText() const
s += "</tr>\n";
s += "<tr>";
lastRow = cell->row();
- needEnd = TRUE;
+ needEnd = true;
}
s += "<td";
it = cell->attributes.begin();
@@ -7708,18 +7708,18 @@ void TQTextTable::adjustCells( int y , int shift )
{
TQPtrListIterator<TQTextTableCell> it( cells );
TQTextTableCell* cell;
- bool enlarge = FALSE;
+ bool enlarge = false;
while ( ( cell = it.current() ) ) {
++it;
TQRect r = cell->geometry();
if ( y <= r.top() ) {
r.moveBy(0, shift );
cell->setGeometry( r );
- enlarge = TRUE;
+ enlarge = true;
} else if ( y <= r.bottom() ) {
r.rBottom() += shift;
cell->setGeometry( r );
- enlarge = TRUE;
+ enlarge = true;
}
}
if ( enlarge )
@@ -7781,7 +7781,7 @@ void TQTextTable::draw(TQPainter* p, int x, int y, int cx, int cy, int cw, int c
p->fillRect( r.left()-s, r.top()-s, r.width()+2*s, s, cg.button() );
p->fillRect( r.left()-s, r.bottom(), r.width()+2*s, s, cg.button() );
}
- qDrawShadePanel( p, r, cg, TRUE, innerborder );
+ qDrawShadePanel( p, r, cg, true, innerborder );
}
}
}
@@ -7803,7 +7803,7 @@ void TQTextTable::draw(TQPainter* p, int x, int y, int cx, int cy, int cw, int c
p->fillRect( r.left(), r.top(), r.width(), s, cg.button() );
p->fillRect( r.left(), r.bottom()-s, r.width(), s, cg.button() );
}
- qDrawShadePanel( p, r, cg, FALSE, border );
+ qDrawShadePanel( p, r, cg, false, border );
}
}
@@ -7904,24 +7904,24 @@ bool TQTextTable::enterAt( TQTextCursor *c, TQTextDocument *&doc, TQTextParagrap
}
}
if ( i == (int) cells.count() )
- return FALSE; // no cell found
+ return false; // no cell found
if ( currCell.find( c ) == currCell.end() ) {
if ( lastY != -1 )
currCell.insert( c, lastCell );
else
- return FALSE;
+ return false;
}
TQTextTableCell *cell = cells.at( *currCell.find( c ) );
if ( !cell )
- return FALSE;
+ return false;
doc = cell->richText();
parag = doc->firstParagraph();
idx = 0;
ox += cell->geometry().x() + cell->horizontalAlignmentOffset() + outerborder + parent->x();
oy += cell->geometry().y() + cell->verticalAlignmentOffset() + outerborder;
- return TRUE;
+ return true;
}
bool TQTextTable::next( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy )
@@ -7938,23 +7938,23 @@ bool TQTextTable::next( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *
TQTextCustomItem::next( c, doc, parag, idx, ox, oy );
TQTextTableCell *cell = cells.first();
if ( !cell )
- return FALSE;
+ return false;
doc = cell->richText();
idx = -1;
- return TRUE;
+ return true;
}
if ( currCell.find( c ) == currCell.end() )
- return FALSE;
+ return false;
TQTextTableCell *cell = cells.at( *currCell.find( c ) );
if ( !cell )
- return FALSE;
+ return false;
doc = cell->richText();
parag = doc->firstParagraph();
idx = 0;
ox += cell->geometry().x() + cell->horizontalAlignmentOffset() + outerborder + parent->x();
oy += cell->geometry().y() + cell->verticalAlignmentOffset() + outerborder;
- return TRUE;
+ return true;
}
bool TQTextTable::prev( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy )
@@ -7971,45 +7971,45 @@ bool TQTextTable::prev( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *
TQTextCustomItem::prev( c, doc, parag, idx, ox, oy );
TQTextTableCell *cell = cells.first();
if ( !cell )
- return FALSE;
+ return false;
doc = cell->richText();
idx = -1;
- return TRUE;
+ return true;
}
if ( currCell.find( c ) == currCell.end() )
- return FALSE;
+ return false;
TQTextTableCell *cell = cells.at( *currCell.find( c ) );
if ( !cell )
- return FALSE;
+ return false;
doc = cell->richText();
parag = doc->lastParagraph();
idx = parag->length() - 1;
ox += cell->geometry().x() + cell->horizontalAlignmentOffset() + outerborder + parent->x();
oy += cell->geometry().y() + cell->verticalAlignmentOffset() + outerborder;
- return TRUE;
+ return true;
}
bool TQTextTable::down( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy )
{
if ( currCell.find( c ) == currCell.end() )
- return FALSE;
+ return false;
TQTextTableCell *cell = cells.at( *currCell.find( c ) );
if ( cell->row_ == layout->numRows() - 1 ) {
currCell.insert( c, 0 );
TQTextCustomItem::down( c, doc, parag, idx, ox, oy );
TQTextTableCell *cell = cells.first();
if ( !cell )
- return FALSE;
+ return false;
doc = cell->richText();
idx = -1;
- return TRUE;
+ return true;
}
int oldRow = cell->row_;
int oldCol = cell->col_;
if ( currCell.find( c ) == currCell.end() )
- return FALSE;
+ return false;
int cc = *currCell.find( c );
for ( int i = cc; i < (int)cells.count(); ++i ) {
cell = cells.at( i );
@@ -8020,34 +8020,34 @@ bool TQTextTable::down( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *
}
doc = cell->richText();
if ( !cell )
- return FALSE;
+ return false;
parag = doc->firstParagraph();
idx = 0;
ox += cell->geometry().x() + cell->horizontalAlignmentOffset() + outerborder + parent->x();
oy += cell->geometry().y() + cell->verticalAlignmentOffset() + outerborder;
- return TRUE;
+ return true;
}
bool TQTextTable::up( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy )
{
if ( currCell.find( c ) == currCell.end() )
- return FALSE;
+ return false;
TQTextTableCell *cell = cells.at( *currCell.find( c ) );
if ( cell->row_ == 0 ) {
currCell.insert( c, 0 );
TQTextCustomItem::up( c, doc, parag, idx, ox, oy );
TQTextTableCell *cell = cells.first();
if ( !cell )
- return FALSE;
+ return false;
doc = cell->richText();
idx = -1;
- return TRUE;
+ return true;
}
int oldRow = cell->row_;
int oldCol = cell->col_;
if ( currCell.find( c ) == currCell.end() )
- return FALSE;
+ return false;
int cc = *currCell.find( c );
for ( int i = cc; i >= 0; --i ) {
cell = cells.at( i );
@@ -8058,12 +8058,12 @@ bool TQTextTable::up( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&p
}
doc = cell->richText();
if ( !cell )
- return FALSE;
+ return false;
parag = doc->lastParagraph();
idx = parag->length() - 1;
ox += cell->geometry().x() + cell->horizontalAlignmentOffset() + outerborder + parent->x();
oy += cell->geometry().y() + cell->verticalAlignmentOffset() + outerborder;
- return TRUE;
+ return true;
}
TQTextTableCell::TQTextTableCell( TQTextTable* table,
@@ -8127,7 +8127,7 @@ TQTextTableCell::TQTextTableCell( TQTextTable* table,
}
- hasFixedWidth = FALSE;
+ hasFixedWidth = false;
if ( attr.contains("width") ) {
bool b;
TQString s( attr["width"] );
@@ -8135,7 +8135,7 @@ TQTextTableCell::TQTextTableCell( TQTextTable* table,
if ( b ) {
maxw = w;
minw = maxw;
- hasFixedWidth = TRUE;
+ hasFixedWidth = true;
} else {
s = s.stripWhiteSpace();
if ( s.length() > 1 && s[ (int)s.length()-1 ] == '%' )
@@ -8187,7 +8187,7 @@ TQSizePolicy::ExpandData TQTextTableCell::expanding() const
bool TQTextTableCell::isEmpty() const
{
- return FALSE;
+ return false;
}
void TQTextTableCell::setGeometry( const TQRect& r )
{
@@ -8205,7 +8205,7 @@ TQRect TQTextTableCell::geometry() const
bool TQTextTableCell::hasHeightForWidth() const
{
- return TRUE;
+ return true;
}
int TQTextTableCell::heightForWidth( int w ) const
@@ -8270,9 +8270,9 @@ void TQTextTableCell::draw( TQPainter* p, int x, int y, int cx, int cy, int cw,
if ( cx >= 0 && cy >= 0 )
richtext->draw( p, cx - ( x + horizontalAlignmentOffset() + geom.x() ),
cy - ( y + geom.y() + verticalAlignmentOffset() ),
- cw, ch, g, FALSE, FALSE, 0 );
+ cw, ch, g, false, false, 0 );
else
- richtext->draw( p, -1, -1, -1, -1, g, FALSE, FALSE, 0 );
+ richtext->draw( p, -1, -1, -1, -1, g, false, false, 0 );
p->restore();
}
diff --git a/src/kernel/tqrichtext_p.cpp b/src/kernel/tqrichtext_p.cpp
index 165d319db..13dba99c6 100644
--- a/src/kernel/tqrichtext_p.cpp
+++ b/src/kernel/tqrichtext_p.cpp
@@ -51,38 +51,38 @@ TQTextCustomItem::~TQTextCustomItem() {}
void TQTextCustomItem::adjustToPainter( TQPainter* p){ if ( p ) width = 0; }
TQTextCustomItem::Placement TQTextCustomItem::placement() const { return PlaceInline; }
-bool TQTextCustomItem::ownLine() const { return FALSE; }
+bool TQTextCustomItem::ownLine() const { return false; }
void TQTextCustomItem::resize( int nwidth ){ width = nwidth; }
void TQTextCustomItem::invalidate() {}
-bool TQTextCustomItem::isNested() const { return FALSE; }
+bool TQTextCustomItem::isNested() const { return false; }
int TQTextCustomItem::minimumWidth() const { return 0; }
TQString TQTextCustomItem::richText() const { return TQString::null; }
bool TQTextCustomItem::enter( TQTextCursor *, TQTextDocument*&, TQTextParagraph *&, int &, int &, int &, bool )
{
- return TRUE;
+ return true;
}
bool TQTextCustomItem::enterAt( TQTextCursor *, TQTextDocument *&, TQTextParagraph *&, int &, int &, int &, const TQPoint & )
{
- return TRUE;
+ return true;
}
bool TQTextCustomItem::next( TQTextCursor *, TQTextDocument *&, TQTextParagraph *&, int &, int &, int & )
{
- return TRUE;
+ return true;
}
bool TQTextCustomItem::prev( TQTextCursor *, TQTextDocument *&, TQTextParagraph *&, int &, int &, int & )
{
- return TRUE;
+ return true;
}
bool TQTextCustomItem::down( TQTextCursor *, TQTextDocument *&, TQTextParagraph *&, int &, int &, int & )
{
- return TRUE;
+ return true;
}
bool TQTextCustomItem::up( TQTextCursor *, TQTextDocument *&, TQTextParagraph *&, int &, int &, int & )
{
- return TRUE;
+ return true;
}
#endif // TQT_NO_TEXTCUSTOMITEM
@@ -90,7 +90,7 @@ void TQTextFlow::setPageSize( int ps ) { pagesize = ps; }
#ifndef TQT_NO_TEXTCUSTOMITEM
bool TQTextFlow::isEmpty() { return leftItems.isEmpty() && rightItems.isEmpty(); }
#else
-bool TQTextFlow::isEmpty() { return TRUE; }
+bool TQTextFlow::isEmpty() { return true; }
#endif
#ifndef TQT_NO_TEXTCUSTOMITEM
@@ -177,7 +177,7 @@ void TQTextDocument::setSelectionStart( int id, const TQTextCursor &cursor )
TQTextDocumentSelection sel;
sel.startCursor = cursor;
sel.endCursor = cursor;
- sel.swapped = FALSE;
+ sel.swapped = false;
selections[ id ] = sel;
}
@@ -198,33 +198,33 @@ TQTextFormat::~TQTextFormat()
}
TQTextFormat::TQTextFormat()
- : fm( TQFontMetrics( fn ) ), linkColor( TRUE ), logicalFontSize( 3 ), stdSize( tqApp->font().pointSize() )
+ : fm( TQFontMetrics( fn ) ), linkColor( true ), logicalFontSize( 3 ), stdSize( tqApp->font().pointSize() )
{
ref = 0;
- usePixelSizes = FALSE;
+ usePixelSizes = false;
if ( stdSize == -1 ) {
stdSize = tqApp->font().pixelSize();
- usePixelSizes = TRUE;
+ usePixelSizes = true;
}
- missp = FALSE;
+ missp = false;
ha = AlignNormal;
collection = 0;
}
TQTextFormat::TQTextFormat( const TQStyleSheetItem *style )
- : fm( TQFontMetrics( fn ) ), linkColor( TRUE ), logicalFontSize( 3 ), stdSize( tqApp->font().pointSize() )
+ : fm( TQFontMetrics( fn ) ), linkColor( true ), logicalFontSize( 3 ), stdSize( tqApp->font().pointSize() )
{
ref = 0;
- usePixelSizes = FALSE;
+ usePixelSizes = false;
if ( stdSize == -1 ) {
stdSize = tqApp->font().pixelSize();
- usePixelSizes = TRUE;
+ usePixelSizes = true;
}
- missp = FALSE;
+ missp = false;
ha = AlignNormal;
collection = 0;
fn = TQFont( style->fontFamily(),
@@ -240,7 +240,7 @@ TQTextFormat::TQTextFormat( const TQStyleSheetItem *style )
hei = fm.lineSpacing();
asc = fm.ascent() + (fm.leading()+1)/2;
dsc = fm.descent();
- missp = FALSE;
+ missp = false;
ha = AlignNormal;
memset( widths, 0, 256 );
generateKey();
@@ -248,14 +248,14 @@ TQTextFormat::TQTextFormat( const TQStyleSheetItem *style )
}
TQTextFormat::TQTextFormat( const TQFont &f, const TQColor &c, TQTextFormatCollection *parent )
- : fn( f ), col( c ), fm( TQFontMetrics( f ) ), linkColor( TRUE ),
+ : fn( f ), col( c ), fm( TQFontMetrics( f ) ), linkColor( true ),
logicalFontSize( 3 ), stdSize( f.pointSize() )
{
ref = 0;
- usePixelSizes = FALSE;
+ usePixelSizes = false;
if ( stdSize == -1 ) {
stdSize = f.pixelSize();
- usePixelSizes = TRUE;
+ usePixelSizes = true;
}
collection = parent;
leftBearing = fm.minLeftBearing();
@@ -263,7 +263,7 @@ TQTextFormat::TQTextFormat( const TQFont &f, const TQColor &c, TQTextFormatColle
hei = fm.lineSpacing();
asc = fm.ascent() + (fm.leading()+1)/2;
dsc = fm.descent();
- missp = FALSE;
+ missp = false;
ha = AlignNormal;
memset( widths, 0, 256 );
generateKey();
@@ -475,7 +475,7 @@ void TQTextParagraph::setSelection( int id, int start, int end )
sel.start = start;
sel.end = end;
(*mSelections)[ id ] = sel;
- setChanged( TRUE, TRUE );
+ setChanged( true, true );
}
void TQTextParagraph::removeSelection( int id )
@@ -484,7 +484,7 @@ void TQTextParagraph::removeSelection( int id )
return;
if ( mSelections )
mSelections->remove( id );
- setChanged( TRUE, TRUE );
+ setChanged( true, true );
}
int TQTextParagraph::selectionStart( int id ) const
@@ -509,16 +509,16 @@ int TQTextParagraph::selectionEnd( int id ) const
bool TQTextParagraph::hasSelection( int id ) const
{
- return mSelections ? mSelections->contains( id ) : FALSE;
+ return mSelections ? mSelections->contains( id ) : false;
}
bool TQTextParagraph::fullSelected( int id ) const
{
if ( !mSelections )
- return FALSE;
+ return false;
TQMap<int, TQTextParagraphSelection>::ConstIterator it = mSelections->find( id );
if ( it == mSelections->end() )
- return FALSE;
+ return false;
return ( *it ).start == 0 && ( *it ).end == str->length() - 1;
}
diff --git a/src/kernel/tqrichtext_p.h b/src/kernel/tqrichtext_p.h
index 11dfcc6d1..2d75c779b 100644
--- a/src/kernel/tqrichtext_p.h
+++ b/src/kernel/tqrichtext_p.h
@@ -103,7 +103,7 @@ class TQ_EXPORT TQTextStringChar
public:
// this is never called, initialize variables in TQTextString::insert()!!!
- TQTextStringChar() : nobreak(FALSE), lineStart( 0 ), type( Regular ) {d.format=0;}
+ TQTextStringChar() : nobreak(false), lineStart( 0 ), type( Regular ) {d.format=0;}
~TQTextStringChar();
struct CustomData
@@ -195,7 +195,7 @@ public:
void insert( int index, const TQString &s, TQTextFormat *f );
void insert( int index, const TQChar *unicode, int len, TQTextFormat *f );
- void insert( int index, TQTextStringChar *c, bool doAddRefFormat = FALSE );
+ void insert( int index, TQTextStringChar *c, bool doAddRefFormat = false );
void truncate( int index );
void remove( int index, int len );
void clear();
@@ -206,7 +206,7 @@ public:
bool isBidi() const;
bool isRightToLeft() const;
TQChar::Direction direction() const;
- void setDirection( TQChar::Direction d ) { dir = d; bidiDirty = TRUE; }
+ void setDirection( TQChar::Direction d ) { dir = d; bidiDirty = true; }
TQMemArray<TQTextStringChar> rawData() const { return data.copy(); }
@@ -338,13 +338,13 @@ public:
void gotoEnd();
void gotoPageUp( int visibleHeight );
void gotoPageDown( int visibleHeight );
- void gotoNextWord( bool onlySpace = FALSE );
- void gotoPreviousWord( bool onlySpace = FALSE );
+ void gotoNextWord( bool onlySpace = false );
+ void gotoPreviousWord( bool onlySpace = false );
void gotoWordLeft();
void gotoWordRight();
void insert( const TQString &s, bool checkNewLine, TQMemArray<TQTextStringChar> *formatting = 0 );
- void splitAndInsertEmptyParagraph( bool ind = TRUE, bool updateIds = TRUE );
+ void splitAndInsertEmptyParagraph( bool ind = true, bool updateIds = true );
bool remove();
bool removePreviousChar();
void indent();
@@ -364,8 +364,8 @@ public:
int totalOffsetX() const; // total document offset
int totalOffsetY() const; // total document offset
- bool place( const TQPoint &pos, TQTextParagraph *s ) { return place( pos, s, FALSE ); }
- bool place( const TQPoint &pos, TQTextParagraph *s, bool link ) { return place( pos, s, link, TRUE, TRUE ); }
+ bool place( const TQPoint &pos, TQTextParagraph *s ) { return place( pos, s, false ); }
+ bool place( const TQPoint &pos, TQTextParagraph *s, bool link ) { return place( pos, s, link, true, true ); }
bool place( const TQPoint &pos, TQTextParagraph *s, bool link, bool loosePlacing, bool matchBetweenCharacters );
void restoreState();
@@ -426,7 +426,7 @@ Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrList<TQTextCommand>;
class TQ_EXPORT TQTextCommandHistory
{
public:
- TQTextCommandHistory( int s ) : current( -1 ), steps( s ) { history.setAutoDelete( TRUE ); }
+ TQTextCommandHistory( int s ) : current( -1 ), steps( s ) { history.setAutoDelete( true ); }
virtual ~TQTextCommandHistory();
void clear() { history.clear(); current = -1; }
@@ -490,7 +490,7 @@ public:
TQRect geometry() const { return TQRect( xpos, ypos, width, height ); }
- virtual bool enter( TQTextCursor *, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy, bool atEnd = FALSE );
+ virtual bool enter( TQTextCursor *, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy, bool atEnd = false );
virtual bool enterAt( TQTextCursor *, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy, const TQPoint & );
virtual bool next( TQTextCursor *, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy );
virtual bool prev( TQTextCursor *, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy );
@@ -552,7 +552,7 @@ public:
void draw(TQPainter* p, int x, int y, int cx, int cy, int cw, int ch, const TQColorGroup& cg, bool selected );
TQString richText() const;
- bool ownLine() const { return TRUE; }
+ bool ownLine() const { return true; }
private:
int tmpheight;
@@ -702,14 +702,14 @@ public:
void draw( TQPainter* p, int x, int y, int cx, int cy, int cw, int ch,
const TQColorGroup& cg, bool selected );
- bool noErase() const { return TRUE; }
- bool ownLine() const { return TRUE; }
+ bool noErase() const { return true; }
+ bool ownLine() const { return true; }
Placement placement() const { return place; }
- bool isNested() const { return TRUE; }
+ bool isNested() const { return true; }
void resize( int nwidth );
virtual void invalidate();
- virtual bool enter( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy, bool atEnd = FALSE );
+ virtual bool enter( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy, bool atEnd = false );
virtual bool enterAt( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy, const TQPoint &pos );
virtual bool next( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy );
virtual bool prev( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy );
@@ -843,7 +843,7 @@ public:
bool invertSelectionText( int id ) const;
void setSelectionColor( int id, const TQColor &c );
void setInvertSelectionText( int id, bool b );
- bool hasSelection( int id, bool visible = FALSE ) const;
+ bool hasSelection( int id, bool visible = false ) const;
void setSelectionStart( int id, const TQTextCursor &cursor );
bool setSelectionEnd( int id, const TQTextCursor &cursor );
void selectAll( int id );
@@ -856,7 +856,7 @@ public:
int numSelections() const { return nSelections; }
void addSelection( int id );
- TQString selectedText( int id, bool asRichText = FALSE ) const;
+ TQString selectedText( int id, bool asRichText = false ) const;
void removeSelectedText( int id, TQTextCursor *cursor );
void indentSelection( int id );
@@ -901,10 +901,10 @@ public:
void drawParagraph( TQPainter *p, TQTextParagraph *parag, int cx, int cy, int cw, int ch,
TQPixmap *&doubleBuffer, const TQColorGroup &cg,
- bool drawCursor, TQTextCursor *cursor, bool resetChanged = TRUE );
+ bool drawCursor, TQTextCursor *cursor, bool resetChanged = true );
TQTextParagraph *draw( TQPainter *p, int cx, int cy, int cw, int ch, const TQColorGroup &cg,
- bool onlyChanged = FALSE, bool drawCursor = FALSE, TQTextCursor *cursor = 0,
- bool resetChanged = TRUE );
+ bool onlyChanged = false, bool drawCursor = false, TQTextCursor *cursor = 0,
+ bool resetChanged = true );
#ifndef TQT_NO_TEXTCUSTOMITEM
void registerCustomItem( TQTextCustomItem *i, TQTextParagraph *p );
@@ -944,9 +944,9 @@ public:
int undoDepth() const { return commandHistory->undoDepth(); }
int length() const;
- void clear( bool createEmptyParag = FALSE );
+ void clear( bool createEmptyParag = false );
- virtual TQTextParagraph *createParagraph( TQTextDocument *d, TQTextParagraph *pr = 0, TQTextParagraph *nx = 0, bool updateIds = TRUE );
+ virtual TQTextParagraph *createParagraph( TQTextDocument *d, TQTextParagraph *pr = 0, TQTextParagraph *nx = 0, bool updateIds = true );
void insertChild( TQObject *o ) { TQObject::insertChild( o ); }
void removeChild( TQObject *o ) { TQObject::removeChild( o ); }
void insertChild( TQTextDocument *d ) { childList.append( d ); }
@@ -957,7 +957,7 @@ public:
TQString focusHref() const;
TQString focusName() const;
- void invalidateOriginalText() { oTextValid = FALSE; oText = ""; }
+ void invalidateOriginalText() { oTextValid = false; oText = ""; }
signals:
void minimumWidthChanged( int );
@@ -972,12 +972,12 @@ private:
TQTextCustomItem* parseTable( const TQMap<TQString, TQString> &attr, const TQTextFormat &fmt,
const TQChar* doc, int length, int& pos, TQTextParagraph *curpar );
#endif
- bool eatSpace(const TQChar* doc, int length, int& pos, bool includeNbsp = FALSE );
+ bool eatSpace(const TQChar* doc, int length, int& pos, bool includeNbsp = false );
bool eat(const TQChar* doc, int length, int& pos, TQChar c);
TQString parseOpenTag(const TQChar* doc, int length, int& pos, TQMap<TQString, TQString> &attr, bool& emptyTag);
TQString parseCloseTag( const TQChar* doc, int length, int& pos );
TQChar parseHTMLSpecialChar(const TQChar* doc, int length, int& pos);
- TQString parseWord(const TQChar* doc, int length, int& pos, bool lower = TRUE);
+ TQString parseWord(const TQChar* doc, int length, int& pos, bool lower = true);
TQChar parseChar(const TQChar* doc, int length, int& pos, TQStyleSheetItem::WhiteSpaceMode wsm );
void setRichTextInternal( const TQString &text, TQTextCursor* cursor = 0, const TQTextFormat *initialFormat = 0 );
void setRichTextMarginsInternal( TQPtrList< TQPtrVector<TQStyleSheetItem> >& styles, TQTextParagraph* stylesPar );
@@ -1170,7 +1170,7 @@ class TQ_EXPORT TQTextParagraph
friend class TQSyntaxHighlighter;
public:
- TQTextParagraph( TQTextDocument *d, TQTextParagraph *pr = 0, TQTextParagraph *nx = 0, bool updateIds = TRUE );
+ TQTextParagraph( TQTextDocument *d, TQTextParagraph *pr = 0, TQTextParagraph *nx = 0, bool updateIds = true );
~TQTextParagraph();
TQTextString *string() const;
@@ -1178,7 +1178,7 @@ public:
int leftGap() const;
int length() const; // maybe remove later
- void setListStyle( TQStyleSheetItem::ListStyle ls ) { lstyle = ls; changed = TRUE; }
+ void setListStyle( TQStyleSheetItem::ListStyle ls ) { lstyle = ls; changed = true; }
TQStyleSheetItem::ListStyle listStyle() const { return (TQStyleSheetItem::ListStyle)lstyle; }
void setListItem( bool li );
bool isListItem() const { return litem; }
@@ -1210,7 +1210,7 @@ public:
void insert( int index, const TQString &s );
void insert( int index, const TQChar *unicode, int len );
- void append( const TQString &s, bool reallyAtEnd = FALSE );
+ void append( const TQString &s, bool reallyAtEnd = false );
void truncate( int index );
void remove( int index, int len );
void join( TQTextParagraph *s );
@@ -1218,11 +1218,11 @@ public:
void invalidate( int chr );
void move( int &dy );
- void format( int start = -1, bool doMove = TRUE );
+ void format( int start = -1, bool doMove = true );
bool isValid() const;
bool hasChanged() const;
- void setChanged( bool b, bool recursive = FALSE );
+ void setChanged( bool b, bool recursive = false );
int lineHeightOfChar( int i, int *bl = 0, int *y = 0 ) const;
TQTextStringChar *lineStartOfChar( int i, int *index = 0, int *line = 0 ) const;
@@ -1257,12 +1257,12 @@ public:
TQMap<int, TQTextLineStart*> &lineStartList();
- void setFormat( int index, int len, TQTextFormat *f, bool useCollection = TRUE, int flags = -1 );
+ void setFormat( int index, int len, TQTextFormat *f, bool useCollection = true, int flags = -1 );
void setAlignment( int a );
int alignment() const;
- void paint( TQPainter &painter, const TQColorGroup &cg, TQTextCursor *cursor = 0, bool drawSelections = FALSE,
+ void paint( TQPainter &painter, const TQColorGroup &cg, TQTextCursor *cursor = 0, bool drawSelections = false,
int clipx = -1, int clipy = -1, int clipw = -1, int cliph = -1 );
int topMargin() const;
@@ -1392,7 +1392,7 @@ public:
virtual int format( TQTextDocument *doc, TQTextParagraph *parag, int start, const TQMap<int, TQTextLineStart*> &oldLineStarts ) = 0;
virtual int formatVertically( TQTextDocument* doc, TQTextParagraph* parag );
- bool isWrapEnabled( TQTextParagraph *p ) const { if ( !wrapEnabled ) return FALSE; if ( p && !p->isBreakable() ) return FALSE; return TRUE;}
+ bool isWrapEnabled( TQTextParagraph *p ) const { if ( !wrapEnabled ) return false; if ( p && !p->isBreakable() ) return false; return true;}
int wrapAtColumn() const { return wrapColumn;}
virtual void setWrapEnabled( bool b );
virtual void setWrapAtColumn( int c );
@@ -1474,7 +1474,7 @@ public:
TQTextPreProcessor();
virtual ~TQTextPreProcessor() {}
- virtual void process( TQTextDocument *doc, TQTextParagraph *, int, bool = TRUE ) = 0;
+ virtual void process( TQTextDocument *doc, TQTextParagraph *, int, bool = true ) = 0;
virtual TQTextFormat *format( int id ) = 0;
};
@@ -1931,12 +1931,12 @@ inline void TQTextParagraph::setBackgroundColor( const TQColor & c )
{
delete bgcol;
bgcol = new TQColor( c );
- setChanged( TRUE );
+ setChanged( true );
}
inline void TQTextParagraph::clearBackgroundColor()
{
- delete bgcol; bgcol = 0; setChanged( TRUE );
+ delete bgcol; bgcol = 0; setChanged( true );
}
inline void TQTextParagraph::append( const TQString &s, bool reallyAtEnd )
@@ -1959,7 +1959,7 @@ inline TQTextParagraph *TQTextParagraph::next() const
inline bool TQTextParagraph::hasAnySelection() const
{
- return mSelections ? !selections().isEmpty() : FALSE;
+ return mSelections ? !selections().isEmpty() : false;
}
inline void TQTextParagraph::setEndState( int s )
diff --git a/src/kernel/tqscriptengine.cpp b/src/kernel/tqscriptengine.cpp
index 36df1fa77..963d2bb3b 100644
--- a/src/kernel/tqscriptengine.cpp
+++ b/src/kernel/tqscriptengine.cpp
@@ -259,7 +259,7 @@ static inline void positionCluster(TQShaperItem *item, int gfrom, int glast)
}
item->advances[gfrom+i] = 0;
}
- item->has_positioning = TRUE;
+ item->has_positioning = true;
}
@@ -306,31 +306,31 @@ static void heuristicSetGlyphAttributes(TQShaperItem *item, const TQChar *uc, in
// first char in a run is never (treated as) a mark
int cStart = 0;
- item->attributes[0].mark = FALSE;
- item->attributes[0].clusterStart = TRUE;
+ item->attributes[0].mark = false;
+ item->attributes[0].clusterStart = true;
item->attributes[0].combiningClass = 0;
if (qIsZeroWidthChar(uc[0].unicode())) {
- item->attributes[0].zeroWidth = TRUE;
+ item->attributes[0].zeroWidth = true;
item->advances[0] = 0;
- item->has_positioning = TRUE;
+ item->has_positioning = true;
} else {
- item->attributes[0].zeroWidth = FALSE;
+ item->attributes[0].zeroWidth = false;
}
int lastCat = ::category(uc[0]);
for (int i = 1; i < length; ++i) {
int cat = ::category(uc[i]);
if (qIsZeroWidthChar(uc[i].unicode())) {
- item->attributes[i].mark = FALSE;
- item->attributes[i].clusterStart = TRUE;
- item->attributes[i].zeroWidth = TRUE;
+ item->attributes[i].mark = false;
+ item->attributes[i].clusterStart = true;
+ item->attributes[i].zeroWidth = true;
item->attributes[i].combiningClass = 0;
cStart = i;
item->advances[i] = 0;
- item->has_positioning = TRUE;
+ item->has_positioning = true;
} else if (cat != TQChar::Mark_NonSpacing) {
- item->attributes[i].mark = FALSE;
- item->attributes[i].clusterStart = TRUE;
+ item->attributes[i].mark = false;
+ item->attributes[i].clusterStart = true;
item->attributes[i].combiningClass = 0;
cStart = i;
} else {
@@ -366,12 +366,12 @@ static void heuristicSetGlyphAttributes(TQShaperItem *item, const TQChar *uc, in
}
}
- item->attributes[i].mark = TRUE;
- item->attributes[i].clusterStart = FALSE;
+ item->attributes[i].mark = true;
+ item->attributes[i].clusterStart = false;
item->attributes[i].combiningClass = cmb;
logClusters[i] = cStart;
item->advances[i] = 0;
- item->has_positioning = TRUE;
+ item->has_positioning = true;
}
if (lastCat == TQChar::Separator_Space)
@@ -395,11 +395,11 @@ static bool basic_shape(TQShaperItem *item)
{
if (item->font->stringToCMap(item->string->unicode()+item->from, item->length, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
heuristicSetGlyphAttributes(item);
qt_heuristicPosition(item);
- return TRUE;
+ return true;
}
// --------------------------------------------------------------------------------------------------------------------------------------------
@@ -436,7 +436,7 @@ static bool hebrew_shape(TQShaperItem *item)
if (item->font->stringToCMap(item->string->unicode()+item->from, item->length, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
heuristicSetGlyphAttributes(item);
openType->shape(item);
@@ -467,7 +467,7 @@ static bool hebrew_shape(TQShaperItem *item)
for (i = 1; i < item->length; ++i) {
ushort base = shapedChars[slen-1].unicode();
ushort shaped = 0;
- bool invalid = FALSE;
+ bool invalid = false;
if (uc[i].unicode() == Dagesh) {
if (base >= 0x5d0
&& base <= 0x5ea
@@ -480,7 +480,7 @@ static bool hebrew_shape(TQShaperItem *item)
} else if (base == 0xfb2a || base == 0xfb2b /* Shin with Shin or Sin dot */) {
shaped = base + 2;
} else {
- invalid = TRUE;
+ invalid = true;
}
} else if (uc[i].unicode() == ShinDot) {
if (base == 0x05e9)
@@ -488,14 +488,14 @@ static bool hebrew_shape(TQShaperItem *item)
else if (base == 0xfb49)
shaped = 0xfb2c;
else
- invalid = TRUE;
+ invalid = true;
} else if (uc[i].unicode() == SinDot) {
if (base == 0x05e9)
shaped = 0xfb2b;
else if (base == 0xfb49)
shaped = 0xfb2d;
else
- invalid = TRUE;
+ invalid = true;
} else if (uc[i].unicode() == Patah) {
if (base == 0x5d0)
shaped = 0xfb2e;
@@ -516,8 +516,8 @@ static bool hebrew_shape(TQShaperItem *item)
if (invalid) {
shapedChars[slen] = 0x25cc;
- item->attributes[slen].clusterStart = TRUE;
- item->attributes[slen].mark = FALSE;
+ item->attributes[slen].clusterStart = true;
+ item->attributes[slen].mark = false;
item->attributes[slen].combiningClass = 0;
cluster_start = slen;
++slen;
@@ -531,13 +531,13 @@ static bool hebrew_shape(TQShaperItem *item)
if (!shaped) {
shapedChars[slen] = uc[i];
if (::category(uc[i]) != TQChar::Mark_NonSpacing) {
- item->attributes[slen].clusterStart = TRUE;
- item->attributes[slen].mark = FALSE;
+ item->attributes[slen].clusterStart = true;
+ item->attributes[slen].mark = false;
item->attributes[slen].combiningClass = 0;
cluster_start = slen;
} else {
- item->attributes[slen].clusterStart = FALSE;
- item->attributes[slen].mark = TRUE;
+ item->attributes[slen].clusterStart = false;
+ item->attributes[slen].mark = true;
item->attributes[slen].combiningClass = ::combiningClass(uc[i]);
}
++slen;
@@ -547,7 +547,7 @@ static bool hebrew_shape(TQShaperItem *item)
if (item->font->stringToCMap(shapedChars, slen, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
for (i = 0; i < item->num_glyphs; ++i) {
if (item->attributes[i].mark)
item->advances[i] = 0;
@@ -556,7 +556,7 @@ static bool hebrew_shape(TQShaperItem *item)
if (item->length > 256)
::free(shapedChars);
- return TRUE;
+ return true;
}
// these groups correspond to the groups defined in the Unicode standard.
@@ -957,7 +957,7 @@ static void getArabicProperties(const unsigned short *chars, int len, TQArabicPr
break;
default:
- Q_ASSERT(FALSE);
+ Q_ASSERT(false);
}
lastGroup = ArabicNone;
@@ -1005,7 +1005,7 @@ static void getArabicProperties(const unsigned short *chars, int len, TQArabicPr
lastGroup = Noon;
break;
case ArabicGroupsEnd:
- Q_ASSERT(FALSE);
+ Q_ASSERT(false);
}
lastPos = i;
@@ -1451,10 +1451,10 @@ static void shapedString(const TQString *uc, int from, int len, TQChar *shapeBuf
// ##### Fixme
//attributes[gpos].zeroWidth = zeroWidth;
if (::category(*ch) == TQChar::Mark_NonSpacing) {
- attributes[gpos].mark = TRUE;
+ attributes[gpos].mark = true;
// tqDebug("glyph %d (char %d) is mark!", gpos, i);
} else {
- attributes[gpos].mark = FALSE;
+ attributes[gpos].mark = false;
clusterStart = data - shapeBuffer;
}
attributes[gpos].clusterStart = !attributes[gpos].mark;
@@ -1524,7 +1524,7 @@ static bool arabicSyriacOpenTypeShape(TQOpenType *openType, TQShaperItem *item,
int nglyphs = item->num_glyphs;
if (item->font->stringToCMap(item->string->unicode()+item->from, item->length, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
heuristicSetGlyphAttributes(item);
unsigned short *logClusters = item->log_clusters;
@@ -1613,13 +1613,13 @@ static bool arabic_shape(TQShaperItem *item)
if (item->font->stringToCMap((TQChar *)shapedChars.data(), slen, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
for (int i = 0; i < slen; ++i)
if (item->attributes[i].mark)
item->advances[i] = 0;
qt_heuristicPosition(item);
- return TRUE;
+ return true;
}
#if defined(TQ_WS_X11)
diff --git a/src/kernel/tqscriptengine_x11.cpp b/src/kernel/tqscriptengine_x11.cpp
index 5d22fdf49..7d997457c 100644
--- a/src/kernel/tqscriptengine_x11.cpp
+++ b/src/kernel/tqscriptengine_x11.cpp
@@ -71,7 +71,7 @@ static bool thaana_shape(TQShaperItem *item)
openType->selectScript(TQFont::Thaana);
if (item->font->stringToCMap(item->string->unicode()+item->from, item->length, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
heuristicSetGlyphAttributes(item);
openType->shape(item);
return openType->positionAndAdd(item);
@@ -1252,7 +1252,7 @@ static bool indic_shape_syllable(TQOpenType *openType, TQShaperItem *item, bool
if (item->num_glyphs < len+4) {
item->num_glyphs = len+4;
- return FALSE;
+ return false;
}
TQVarLengthArray<unsigned short> reordered(len+4);
@@ -1283,7 +1283,7 @@ static bool indic_shape_syllable(TQOpenType *openType, TQShaperItem *item, bool
if (len != 1) {
unsigned short *uc = reordered.data();
- bool beginsWithRa = FALSE;
+ bool beginsWithRa = false;
// Rule 1: find base consonant
//
@@ -1306,7 +1306,7 @@ static bool indic_shape_syllable(TQOpenType *openType, TQShaperItem *item, bool
beginsWithRa = (properties & HasReph) && ((len > 2) && *uc == ra && *(uc+1) == halant);
if (beginsWithRa && form(*(uc+2)) == Control)
- beginsWithRa = FALSE;
+ beginsWithRa = false;
base = (beginsWithRa ? 2 : 0);
IDEBUG(" length = %d, beginsWithRa = %d, base=%d", len, beginsWithRa, base);
@@ -1320,7 +1320,7 @@ static bool indic_shape_syllable(TQOpenType *openType, TQShaperItem *item, bool
// figure out possible base glyphs
memset(position.data(), 0, len);
if (script == TQFont::Devanagari || script == TQFont::Gujarati) {
- bool vattu = FALSE;
+ bool vattu = false;
for (i = base; i < len; ++i) {
position[i] = form(uc[i]);
if (position[i] == Consonant) {
@@ -1552,22 +1552,22 @@ static bool indic_shape_syllable(TQOpenType *openType, TQShaperItem *item, bool
if (item->font->stringToCMap((const TQChar *)reordered.data(), len, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
IDEBUG(" base=%d, reph=%d", base, reph);
IDEBUG("reordered:");
for (i = 0; i < len; i++) {
- item->attributes[i].mark = FALSE;
- item->attributes[i].clusterStart = FALSE;
+ item->attributes[i].mark = false;
+ item->attributes[i].clusterStart = false;
item->attributes[i].justification = 0;
- item->attributes[i].zeroWidth = FALSE;
+ item->attributes[i].zeroWidth = false;
IDEBUG(" %d: %4x", i, reordered[i]);
}
// now we have the syllable in the right order, and can start running it through open type.
- bool control = FALSE;
+ bool control = false;
for (i = 0; i < len; ++i)
control |= (form(reordered[i]) == Control);
@@ -1618,7 +1618,7 @@ static bool indic_shape_syllable(TQOpenType *openType, TQShaperItem *item, bool
if (script == TQFont::Devanagari || script == TQFont::Gujarati) {
// vattu glyphs need this aswell
- bool vattu = FALSE;
+ bool vattu = false;
for (i = base-2; i > 1; --i) {
if (form(reordered[i]) == Consonant) {
vattu = (!vattu && reordered[i] == ra);
@@ -1694,8 +1694,8 @@ static bool indic_shape_syllable(TQOpenType *openType, TQShaperItem *item, bool
}
}
- if (!openType->positionAndAdd(item, FALSE))
- return FALSE;
+ if (!openType->positionAndAdd(item, false))
+ return false;
if (control) {
IDEBUG("found a control char in the syllable");
@@ -1716,9 +1716,9 @@ static bool indic_shape_syllable(TQOpenType *openType, TQShaperItem *item, bool
}
#endif
- item->attributes[0].clusterStart = TRUE;
+ item->attributes[0].clusterStart = true;
IDEBUG("<<<<<<");
- return TRUE;
+ return true;
}
@@ -1732,7 +1732,7 @@ static bool indic_shape_syllable(TQOpenType *openType, TQShaperItem *item, bool
*/
static int indic_nextSyllableBoundary(int script, const TQString &s, int start, int end, bool *invalid)
{
- *invalid = FALSE;
+ *invalid = false;
IDEBUG("indic_nextSyllableBoundary: start=%d, end=%d", start, end);
const TQChar *uc = s.unicode()+start;
@@ -1743,7 +1743,7 @@ static int indic_nextSyllableBoundary(int script, const TQString &s, int start,
if (state != Consonant && state != IndependentVowel) {
if (state != Other)
- *invalid = TRUE;
+ *invalid = true;
goto finish;
}
@@ -1846,7 +1846,7 @@ static bool indic_shape(TQShaperItem *item)
if (!indic_shape_syllable(openType, &syllable, invalid)) {
IDEBUG("syllable shaping failed, syllable requests %d glyphs", syllable.num_glyphs);
item->num_glyphs += syllable.num_glyphs;
- return FALSE;
+ return false;
}
item->has_positioning |= syllable.has_positioning;
@@ -1864,7 +1864,7 @@ static bool indic_shape(TQShaperItem *item)
first_glyph += syllable.num_glyphs;
}
item->num_glyphs = first_glyph;
- return TRUE;
+ return true;
}
@@ -1877,12 +1877,12 @@ static void indic_attributes(int script, const TQString &text, int from, int len
while (i < len) {
bool invalid;
int boundary = indic_nextSyllableBoundary(script, text, from+i, end, &invalid) - from;
- attributes[i].charStop = TRUE;
+ attributes[i].charStop = true;
if (boundary > len-1) boundary = len;
i++;
while (i < boundary) {
- attributes[i].charStop = FALSE;
+ attributes[i].charStop = false;
++uc;
++i;
}
@@ -1932,13 +1932,13 @@ static void thaiWordBreaks(const TQChar *string, const int len, TQCharAttributes
numbreaks = th_brk(cstr.data(),break_positions, numbreaks);
}
- attributes[0].softBreak = TRUE;
+ attributes[0].softBreak = true;
int i;
for (i = 1; i < len; ++i)
- attributes[i].softBreak = FALSE;
+ attributes[i].softBreak = false;
for (i = 0; i < numbreaks; ++i)
- attributes[break_positions[i]].softBreak = TRUE;
+ attributes[break_positions[i]].softBreak = true;
if (break_positions != brp)
delete [] break_positions;
@@ -2042,7 +2042,7 @@ static bool tibetan_shape_syllable(TQOpenType *openType, TQShaperItem *item, boo
if (item->num_glyphs < item->length + 4) {
item->num_glyphs = item->length + 4;
- return FALSE;
+ return false;
}
int i;
@@ -2058,13 +2058,13 @@ static bool tibetan_shape_syllable(TQOpenType *openType, TQShaperItem *item, boo
if (item->font->stringToCMap(str, len, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
for (i = 0; i < item->length; i++) {
- item->attributes[i].mark = FALSE;
- item->attributes[i].clusterStart = FALSE;
+ item->attributes[i].mark = false;
+ item->attributes[i].clusterStart = false;
item->attributes[i].justification = 0;
- item->attributes[i].zeroWidth = FALSE;
+ item->attributes[i].zeroWidth = false;
IDEBUG(" %d: %4x", i, str[i].unicode());
}
@@ -2075,13 +2075,13 @@ static bool tibetan_shape_syllable(TQOpenType *openType, TQShaperItem *item, boo
openType->selectScript(TQFont::Tibetan, tibetan_features);
openType->shape(item);
- if (!openType->positionAndAdd(item, FALSE))
- return FALSE;
+ if (!openType->positionAndAdd(item, false))
+ return false;
}
#endif
- item->attributes[0].clusterStart = TRUE;
- return TRUE;
+ item->attributes[0].clusterStart = true;
+ return true;
}
@@ -2097,7 +2097,7 @@ static int tibetan_nextSyllableBoundary(const TQString &s, int start, int end, b
if (state != TibetanHeadConsonant) {
if (state != TibetanOther)
- *invalid = TRUE;
+ *invalid = true;
goto finish;
}
@@ -2125,7 +2125,7 @@ static int tibetan_nextSyllableBoundary(const TQString &s, int start, int end, b
}
finish:
- *invalid = FALSE;
+ *invalid = false;
return start+pos;
}
@@ -2161,7 +2161,7 @@ static bool tibetan_shape(TQShaperItem *item)
syllable.num_glyphs = item->num_glyphs - first_glyph;
if (!tibetan_shape_syllable(openType, &syllable, invalid)) {
item->num_glyphs += syllable.num_glyphs;
- return FALSE;
+ return false;
}
item->has_positioning |= syllable.has_positioning;
@@ -2172,7 +2172,7 @@ static bool tibetan_shape(TQShaperItem *item)
first_glyph += syllable.num_glyphs;
}
item->num_glyphs = first_glyph;
- return TRUE;
+ return true;
}
static void tibetan_attributes(int script, const TQString &text, int from, int len, TQCharAttributes *attributes)
@@ -2187,12 +2187,12 @@ static void tibetan_attributes(int script, const TQString &text, int from, int l
bool invalid;
int boundary = tibetan_nextSyllableBoundary(text, from+i, end, &invalid) - from;
- attributes[i].charStop = TRUE;
+ attributes[i].charStop = true;
if (boundary > len-1) boundary = len;
i++;
while (i < boundary) {
- attributes[i].charStop = FALSE;
+ attributes[i].charStop = false;
++uc;
++i;
}
@@ -2484,7 +2484,7 @@ static const signed char khmerStateTable[][CC_COUNT] =
//
static inline int khmer_nextSyllableBoundary(const TQString &s, int start, int end, bool *invalid)
{
- *invalid = FALSE;
+ *invalid = false;
const TQChar *uc = s.unicode() + start;
int state = 0;
int pos = start;
@@ -2710,14 +2710,14 @@ static bool khmer_shape_syllable(TQOpenType *openType, TQShaperItem *item)
if (item->font->stringToCMap((const TQChar *)reordered, len, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
KHDEBUG("after shaping: len=%d", len);
for (i = 0; i < len; i++) {
- item->attributes[i].mark = FALSE;
- item->attributes[i].clusterStart = FALSE;
+ item->attributes[i].mark = false;
+ item->attributes[i].clusterStart = false;
item->attributes[i].justification = 0;
- item->attributes[i].zeroWidth = FALSE;
+ item->attributes[i].zeroWidth = false;
KHDEBUG(" %d: %4x property=%x", i, reordered[i], properties[i]);
}
@@ -2745,8 +2745,8 @@ static bool khmer_shape_syllable(TQOpenType *openType, TQShaperItem *item)
}
openType->shape(item, where);
- if (!openType->positionAndAdd(item, FALSE))
- return FALSE;
+ if (!openType->positionAndAdd(item, false))
+ return false;
} else
#endif
{
@@ -2754,8 +2754,8 @@ static bool khmer_shape_syllable(TQOpenType *openType, TQShaperItem *item)
Q_UNUSED(openType);
}
- item->attributes[0].clusterStart = TRUE;
- return TRUE;
+ item->attributes[0].clusterStart = true;
+ return true;
}
static bool khmer_shape(TQShaperItem *item)
@@ -2792,7 +2792,7 @@ static bool khmer_shape(TQShaperItem *item)
if (!khmer_shape_syllable(openType, &syllable)) {
KHDEBUG("syllable shaping failed, syllable requests %d glyphs", syllable.num_glyphs);
item->num_glyphs += syllable.num_glyphs;
- return FALSE;
+ return false;
}
item->has_positioning |= syllable.has_positioning;
@@ -2810,7 +2810,7 @@ static bool khmer_shape(TQShaperItem *item)
first_glyph += syllable.num_glyphs;
}
item->num_glyphs = first_glyph;
- return TRUE;
+ return true;
}
static void khmer_attributes( int script, const TQString &text, int from, int len, TQCharAttributes *attributes )
@@ -2825,12 +2825,12 @@ static void khmer_attributes( int script, const TQString &text, int from, int le
bool invalid;
int boundary = khmer_nextSyllableBoundary( text, from+i, end, &invalid ) - from;
- attributes[i].charStop = TRUE;
+ attributes[i].charStop = true;
if ( boundary > len-1 ) boundary = len;
i++;
while ( i < boundary ) {
- attributes[i].charStop = FALSE;
+ attributes[i].charStop = false;
++uc;
++i;
}
@@ -3008,7 +3008,7 @@ static const signed char mymrStateTable[][Mymr_CC_COUNT] =
//
static inline int myanmar_nextSyllableBoundary(const TQString &s, int start, int end, bool *invalid)
{
- *invalid = FALSE;
+ *invalid = false;
const TQChar *uc = s.unicode() + start;
int state = 0;
int pos = start;
@@ -3152,7 +3152,7 @@ static bool myanmar_shape_syllable(TQOpenType *openType, TQShaperItem *item, boo
++len;
}
- bool lastWasVirama = FALSE;
+ bool lastWasVirama = false;
int basePos = -1;
// copy the rest of the syllable to the output, inserting the kinzi
// at the correct place
@@ -3217,14 +3217,14 @@ static bool myanmar_shape_syllable(TQOpenType *openType, TQShaperItem *item, boo
if (item->font->stringToCMap((const TQChar *)reordered, len, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
MMDEBUG("after shaping: len=%d", len);
for (i = 0; i < len; i++) {
- item->attributes[i].mark = FALSE;
- item->attributes[i].clusterStart = FALSE;
+ item->attributes[i].mark = false;
+ item->attributes[i].clusterStart = false;
item->attributes[i].justification = 0;
- item->attributes[i].zeroWidth = FALSE;
+ item->attributes[i].zeroWidth = false;
MMDEBUG(" %d: %4x property=%x", i, reordered[i], properties[i]);
}
@@ -3252,8 +3252,8 @@ static bool myanmar_shape_syllable(TQOpenType *openType, TQShaperItem *item, boo
}
openType->shape(item, where);
- if (!openType->positionAndAdd(item, FALSE))
- return FALSE;
+ if (!openType->positionAndAdd(item, false))
+ return false;
} else
#endif
{
@@ -3261,8 +3261,8 @@ static bool myanmar_shape_syllable(TQOpenType *openType, TQShaperItem *item, boo
Q_UNUSED(openType);
}
- item->attributes[0].clusterStart = TRUE;
- return TRUE;
+ item->attributes[0].clusterStart = true;
+ return true;
}
static bool myanmar_shape(TQShaperItem *item)
@@ -3299,7 +3299,7 @@ static bool myanmar_shape(TQShaperItem *item)
if (!myanmar_shape_syllable(openType, &syllable, invalid)) {
MMDEBUG("syllable shaping failed, syllable requests %d glyphs", syllable.num_glyphs);
item->num_glyphs += syllable.num_glyphs;
- return FALSE;
+ return false;
}
item->has_positioning |= syllable.has_positioning;
@@ -3317,7 +3317,7 @@ static bool myanmar_shape(TQShaperItem *item)
first_glyph += syllable.num_glyphs;
}
item->num_glyphs = first_glyph;
- return TRUE;
+ return true;
}
static void myanmar_attributes( int script, const TQString &text, int from, int len, TQCharAttributes *attributes )
@@ -3332,14 +3332,14 @@ static void myanmar_attributes( int script, const TQString &text, int from, int
bool invalid;
int boundary = myanmar_nextSyllableBoundary( text, from+i, end, &invalid ) - from;
- attributes[i].charStop = TRUE;
- attributes[i].softBreak = TRUE;
+ attributes[i].charStop = true;
+ attributes[i].softBreak = true;
if ( boundary > len-1 ) boundary = len;
i++;
while ( i < boundary ) {
- attributes[i].charStop = FALSE;
- attributes[i].softBreak = FALSE;
+ attributes[i].charStop = false;
+ attributes[i].softBreak = false;
++uc;
++i;
}
@@ -3501,12 +3501,12 @@ static bool hangul_shape_syllable(TQOpenType *openType, TQShaperItem *item)
if (item->font->stringToCMap(ch, len, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
for (i = 0; i < len; i++) {
- item->attributes[i].mark = FALSE;
- item->attributes[i].clusterStart = FALSE;
+ item->attributes[i].mark = false;
+ item->attributes[i].clusterStart = false;
item->attributes[i].justification = 0;
- item->attributes[i].zeroWidth = FALSE;
+ item->attributes[i].zeroWidth = false;
IDEBUG(" %d: %4x", i, ch[i].unicode());
}
@@ -3519,14 +3519,14 @@ static bool hangul_shape_syllable(TQOpenType *openType, TQShaperItem *item)
item->log_clusters = logClusters.data();
openType->shape(item);
- if (!openType->positionAndAdd(item, FALSE))
- return FALSE;
+ if (!openType->positionAndAdd(item, false))
+ return false;
}
#endif
- item->attributes[0].clusterStart = TRUE;
- return TRUE;
+ item->attributes[0].clusterStart = true;
+ return true;
}
static bool hangul_shape(TQShaperItem *item)
@@ -3535,10 +3535,10 @@ static bool hangul_shape(TQShaperItem *item)
const TQChar *uc = item->string->unicode() + item->from;
- bool allPrecomposed = TRUE;
+ bool allPrecomposed = true;
for (int i = 0; i < item->length; ++i) {
if (!hangul_isPrecomposed(uc[i].unicode())) {
- allPrecomposed = FALSE;
+ allPrecomposed = false;
break;
}
}
@@ -3573,7 +3573,7 @@ static bool hangul_shape(TQShaperItem *item)
syllable.num_glyphs = item->num_glyphs - first_glyph;
if (!hangul_shape_syllable(openType, &syllable)) {
item->num_glyphs += syllable.num_glyphs;
- return FALSE;
+ return false;
}
item->has_positioning |= syllable.has_positioning;
// fix logcluster array
@@ -3583,7 +3583,7 @@ static bool hangul_shape(TQShaperItem *item)
first_glyph += syllable.num_glyphs;
}
item->num_glyphs = first_glyph;
- return TRUE;
+ return true;
}
return basic_shape(item);
@@ -3600,12 +3600,12 @@ static void hangul_attributes(int script, const TQString &text, int from, int le
while (i < len) {
int boundary = hangul_nextSyllableBoundary(text, from+i, end) - from;
- attributes[i].charStop = TRUE;
+ attributes[i].charStop = true;
if (boundary > len-1) boundary = len;
i++;
while (i < boundary) {
- attributes[i].charStop = FALSE;
+ attributes[i].charStop = false;
++uc;
++i;
}
diff --git a/src/kernel/tqsignal.cpp b/src/kernel/tqsignal.cpp
index 073b61949..f8f918bb2 100644
--- a/src/kernel/tqsignal.cpp
+++ b/src/kernel/tqsignal.cpp
@@ -114,7 +114,7 @@
TQSignal::TQSignal( TQObject *parent, const char *name )
: TQObject( parent, name )
{
- isSignal = TRUE;
+ isSignal = true;
#ifndef TQT_NO_VARIANT
val = 0;
#endif
@@ -128,7 +128,7 @@ TQSignal::~TQSignal()
{
}
#ifndef TQT_NO_VARIANT
-// Returns TRUE if it matches ".+(.*int.*"
+// Returns true if it matches ".+(.*int.*"
static inline bool intSignature( const char *member )
{
TQCString s( member );
diff --git a/src/kernel/tqsignalmapper.cpp b/src/kernel/tqsignalmapper.cpp
index 08a7b9400..fe9b9a7a4 100644
--- a/src/kernel/tqsignalmapper.cpp
+++ b/src/kernel/tqsignalmapper.cpp
@@ -60,7 +60,7 @@ class TQSignalMapperData {
public:
TQSignalMapperData()
{
- dict.setAutoDelete( TRUE );
+ dict.setAutoDelete( true );
}
TQPtrDict<TQSignalMapperRec> dict;
diff --git a/src/kernel/tqsimplerichtext.cpp b/src/kernel/tqsimplerichtext.cpp
index c2808b1cd..b78d2ad28 100644
--- a/src/kernel/tqsimplerichtext.cpp
+++ b/src/kernel/tqsimplerichtext.cpp
@@ -72,7 +72,7 @@ void TQSimpleRichTextData::adjustSize(TQPainter *p) {
}
}
cachedWidth = doc->width();
- cachedWidthWithPainter = FALSE;
+ cachedWidthWithPainter = false;
}
/*!
@@ -138,7 +138,7 @@ TQSimpleRichText::TQSimpleRichText( const TQString& text, const TQFont& fnt,
{
d = new TQSimpleRichTextData;
d->cachedWidth = -1;
- d->cachedWidthWithPainter = FALSE;
+ d->cachedWidthWithPainter = false;
d->font = fnt;
d->doc = new TQTextDocument( 0 );
d->doc->setTextFormat( TQt::RichText );
@@ -184,7 +184,7 @@ TQSimpleRichText::TQSimpleRichText( const TQString& text, const TQFont& fnt,
{
d = new TQSimpleRichTextData;
d->cachedWidth = -1;
- d->cachedWidthWithPainter = FALSE;
+ d->cachedWidthWithPainter = false;
d->font = fnt;
d->doc = new TQTextDocument( 0 );
d->doc->setTextFormat( TQt::RichText );
@@ -192,7 +192,7 @@ TQSimpleRichText::TQSimpleRichText( const TQString& text, const TQFont& fnt,
d->doc->setStyleSheet( (TQStyleSheet*)sheet );
d->doc->setDefaultFormat( fnt, TQColor() );
d->doc->flow()->setPageSize( pageBreak );
- d->doc->setPageBreakEnabled( TRUE );
+ d->doc->setPageBreakEnabled( true );
#ifndef TQT_NO_MIME
d->doc->setMimeSourceFactory( (TQMimeSourceFactory*)factory );
#endif
@@ -224,7 +224,7 @@ void TQSimpleRichText::setWidth( int w )
return;
d->doc->formatter()->setAllowBreakInWords( d->doc->isPageBreakEnabled() );
d->cachedWidth = w;
- d->cachedWidthWithPainter = FALSE;
+ d->cachedWidthWithPainter = false;
d->doc->doLayout( 0, w );
}
@@ -248,7 +248,7 @@ void TQSimpleRichText::setWidth( TQPainter *p, int w )
(p->device()->devType() == TQInternal::Printer)) );
p->save();
d->cachedWidth = w;
- d->cachedWidthWithPainter = TRUE;
+ d->cachedWidthWithPainter = true;
d->doc->doLayout( p, w );
p->restore();
}
@@ -382,13 +382,13 @@ TQString TQSimpleRichText::anchorAt( const TQPoint& pos ) const
if ( d->cachedWidth < 0 )
d->adjustSize();
TQTextCursor c( d->doc );
- c.place( pos, d->doc->firstParagraph(), TRUE );
+ c.place( pos, d->doc->firstParagraph(), true );
return c.paragraph()->at( c.index() )->anchorHref();
}
/*!
- Returns TRUE if \a pos is within a text line of the rich text
- object; otherwise returns FALSE.
+ Returns true if \a pos is within a text line of the rich text
+ object; otherwise returns false.
*/
bool TQSimpleRichText::inText( const TQPoint& pos ) const
@@ -396,7 +396,7 @@ bool TQSimpleRichText::inText( const TQPoint& pos ) const
if ( d->cachedWidth < 0 )
d->adjustSize();
if ( pos.y() > d->doc->height() )
- return FALSE;
+ return false;
TQTextCursor c( d->doc );
c.place( pos, d->doc->firstParagraph() );
return c.totalOffsetX() + c.paragraph()->at( c.index() )->x +
@@ -413,7 +413,7 @@ void TQSimpleRichText::setDefaultFont( const TQFont &f )
return;
d->font = f;
d->cachedWidth = -1;
- d->cachedWidthWithPainter = FALSE;
+ d->cachedWidthWithPainter = false;
d->doc->setDefaultFormat( f, TQColor() );
d->doc->setText( d->doc->originalText(), d->doc->context() );
}
diff --git a/src/kernel/tqsimplerichtext.h b/src/kernel/tqsimplerichtext.h
index 45ddd6b10..9fcae3649 100644
--- a/src/kernel/tqsimplerichtext.h
+++ b/src/kernel/tqsimplerichtext.h
@@ -64,7 +64,7 @@ public:
TQSimpleRichText( const TQString& text, const TQFont& fnt,
const TQString& context, const TQStyleSheet* sheet,
const TQMimeSourceFactory* factory, int pageBreak = -1,
- const TQColor& linkColor = TQt::blue, bool linkUnderline = TRUE );
+ const TQColor& linkColor = TQt::blue, bool linkUnderline = true );
~TQSimpleRichText();
void setWidth( int );
diff --git a/src/kernel/tqsize.cpp b/src/kernel/tqsize.cpp
index 8a302eaa6..77fb16278 100644
--- a/src/kernel/tqsize.cpp
+++ b/src/kernel/tqsize.cpp
@@ -83,20 +83,20 @@
/*!
\fn bool TQSize::isNull() const
- Returns TRUE if the width is 0 and the height is 0; otherwise
- returns FALSE.
+ Returns true if the width is 0 and the height is 0; otherwise
+ returns false.
*/
/*!
\fn bool TQSize::isEmpty() const
- Returns TRUE if the width is less than or equal to 0, or the height is
- less than or equal to 0; otherwise returns FALSE.
+ Returns true if the width is less than or equal to 0, or the height is
+ less than or equal to 0; otherwise returns false.
*/
/*!
\fn bool TQSize::isValid() const
- Returns TRUE if the width is equal to or greater than 0 and the height is
- equal to or greater than 0; otherwise returns FALSE.
+ Returns true if the width is equal to or greater than 0 and the height is
+ equal to or greater than 0; otherwise returns false.
*/
/*!
@@ -182,7 +182,7 @@ void TQSize::scale( int w, int h, ScaleMode mode )
wd = (TQCOORD)w;
ht = (TQCOORD)h;
} else {
- bool useHeight = TRUE;
+ bool useHeight = true;
int w0 = width();
int h0 = height();
int rw = h * w0 / h0;
@@ -287,13 +287,13 @@ void TQSize::scale( const TQSize &s, ScaleMode mode )
/*!
\fn bool operator==( const TQSize &s1, const TQSize &s2 )
\relates TQSize
- Returns TRUE if \a s1 and \a s2 are equal; otherwise returns FALSE.
+ Returns true if \a s1 and \a s2 are equal; otherwise returns false.
*/
/*!
\fn bool operator!=( const TQSize &s1, const TQSize &s2 )
\relates TQSize
- Returns TRUE if \a s1 and \a s2 are different; otherwise returns FALSE.
+ Returns true if \a s1 and \a s2 are different; otherwise returns false.
*/
/*!
diff --git a/src/kernel/tqsizegrip.cpp b/src/kernel/tqsizegrip.cpp
index 65b29a1c9..928c8e7dc 100644
--- a/src/kernel/tqsizegrip.cpp
+++ b/src/kernel/tqsizegrip.cpp
@@ -280,7 +280,7 @@ bool TQSizeGrip::eventFilter( TQObject *o, TQEvent *e )
}
#endif
}
- return FALSE;
+ return false;
}
#endif //TQT_NO_SIZEGRIP
diff --git a/src/kernel/tqsizepolicy.h b/src/kernel/tqsizepolicy.h
index 6bb8aa0cf..bab360cc4 100644
--- a/src/kernel/tqsizepolicy.h
+++ b/src/kernel/tqsizepolicy.h
@@ -72,9 +72,9 @@ public:
TQSizePolicy() : data( 0 ) { }
- TQSizePolicy( SizeType hor, SizeType ver, bool hfw = FALSE )
+ TQSizePolicy( SizeType hor, SizeType ver, bool hfw = false )
: data( hor | (ver<<HSize) | (hfw ? (TQ_UINT32)(1<<2*HSize) : 0) ) { }
- TQSizePolicy( SizeType hor, SizeType ver, uchar hors, uchar vers, bool hfw = FALSE );
+ TQSizePolicy( SizeType hor, SizeType ver, uchar hors, uchar vers, bool hfw = false );
SizeType horData() const { return (SizeType)( data & HMask ); }
SizeType verData() const { return (SizeType)( (data & VMask) >> HSize ); }
diff --git a/src/kernel/tqsocketnotifier.cpp b/src/kernel/tqsocketnotifier.cpp
index 3a3d32a07..e16a35a41 100644
--- a/src/kernel/tqsocketnotifier.cpp
+++ b/src/kernel/tqsocketnotifier.cpp
@@ -154,7 +154,7 @@ TQSocketNotifier::TQSocketNotifier( int socket, Type type, TQObject *parent,
#endif
sockfd = socket;
sntype = type;
- snenabled = TRUE;
+ snenabled = true;
TQApplication::eventLoop()->registerSocketNotifier( this );
}
@@ -164,7 +164,7 @@ TQSocketNotifier::TQSocketNotifier( int socket, Type type, TQObject *parent,
TQSocketNotifier::~TQSocketNotifier()
{
- setEnabled( FALSE );
+ setEnabled( false );
}
@@ -208,14 +208,14 @@ TQSocketNotifier::~TQSocketNotifier()
/*!
\fn bool TQSocketNotifier::isEnabled() const
- Returns TRUE if the notifier is enabled; otherwise returns FALSE.
+ Returns true if the notifier is enabled; otherwise returns false.
\sa setEnabled()
*/
/*!
- Enables the notifier if \a enable is TRUE or disables it if \a
- enable is FALSE.
+ Enables the notifier if \a enable is true or disables it if \a
+ enable is false.
The notifier is enabled by default.
@@ -259,7 +259,7 @@ bool TQSocketNotifier::event( TQEvent *e )
TQObject::event( e ); // will activate filters
if ( e->type() == TQEvent::SockAct ) {
emit activated( sockfd );
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
diff --git a/src/kernel/tqsound.cpp b/src/kernel/tqsound.cpp
index c5c64300f..5e7a1c826 100644
--- a/src/kernel/tqsound.cpp
+++ b/src/kernel/tqsound.cpp
@@ -141,7 +141,7 @@ public:
/*!
\fn static bool TQSound::available()
- Returns TRUE if sound support is available; otherwise returns FALSE.
+ Returns true if sound support is available; otherwise returns false.
*/
/*!
@@ -181,9 +181,9 @@ TQSound::~TQSound()
}
/*!
- Returns TRUE if the sound has finished playing; otherwise returns FALSE.
+ Returns true if the sound has finished playing; otherwise returns false.
- \warning On Windows this function always returns TRUE for unlooped sounds.
+ \warning On Windows this function always returns true for unlooped sounds.
*/
bool TQSound::isFinished() const
{
@@ -257,8 +257,8 @@ void TQSound::stop()
/*!
- Returns TRUE if sound facilities exist on the platform; otherwise
- returns FALSE. An application may choose either to notify the user
+ Returns true if sound facilities exist on the platform; otherwise
+ returns false. An application may choose either to notify the user
if sound is crucial to the application or to operate silently
without bothering the user.
diff --git a/src/kernel/tqsound_x11.cpp b/src/kernel/tqsound_x11.cpp
index dba19b144..84999b79f 100644
--- a/src/kernel/tqsound_x11.cpp
+++ b/src/kernel/tqsound_x11.cpp
@@ -58,22 +58,22 @@ static AuBool eventPred(AuServer *, AuEvent *e, AuPointer p)
{
if (e && (e->type == AuEventTypeElementNotify)) {
if (e->auelementnotify.flow == *((AuFlowID *)p))
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
class TQAuBucketNAS : public TQAuBucket {
public:
- TQAuBucketNAS(AuBucketID b, AuFlowID f = 0) : id(b), flow(f), stopped(TRUE), numplaying(0) { }
+ TQAuBucketNAS(AuBucketID b, AuFlowID f = 0) : id(b), flow(f), stopped(true), numplaying(0) { }
~TQAuBucketNAS()
{
if ( nas ) {
- AuSync(nas, FALSE);
+ AuSync(nas, false);
AuDestroyBucket(nas, id, NULL);
AuEvent ev;
- while (AuScanEvents(nas, AuEventsQueuedAfterFlush, TRUE, eventPred, &flow, &ev))
+ while (AuScanEvents(nas, AuEventsQueuedAfterFlush, true, eventPred, &flow, &ev))
;
}
}
@@ -142,7 +142,7 @@ void TQAuServerNAS::soundDestroyed(TQObject *o)
if (inprogress) {
TQSound *so = static_cast<TQSound *>(o);
while (inprogress->remove(so))
- ; // Loop while remove returns TRUE
+ ; // Loop while remove returns true
}
}
@@ -175,11 +175,11 @@ void TQAuServerNAS::setDone(TQSound* s)
if (nas) {
decLoop(s);
if (s->loopsRemaining() && !bucket(s)->stopped) {
- bucket(s)->stopped = TRUE;
+ bucket(s)->stopped = true;
play(s);
} else {
if (--(bucket(s)->numplaying) == 0)
- bucket(s)->stopped = TRUE;
+ bucket(s)->stopped = true;
inprogress->remove(s);
}
}
@@ -193,7 +193,7 @@ void TQAuServerNAS::play(TQSound* s)
stop(s);
}
- bucket(s)->stopped = FALSE;
+ bucket(s)->stopped = false;
if ( !inprogress )
inprogress = new TQPtrDict<void>;
inprogress->insert(s,(void*)this);
@@ -212,7 +212,7 @@ void TQAuServerNAS::play(TQSound* s)
void TQAuServerNAS::stop(TQSound* s)
{
if (nas && !bucket(s)->stopped) {
- bucket(s)->stopped = TRUE;
+ bucket(s)->stopped = true;
AuStopFlow(nas, bucket(s)->flow, NULL);
AuFlush(nas);
dataReceived();
@@ -256,7 +256,7 @@ public:
void play(const TQString&) { }
void play(TQSound*s) { while(decLoop(s) > 0) /* nothing */ ; }
void stop(TQSound*) { }
- bool okay() { return FALSE; }
+ bool okay() { return false; }
};
TQAuServerNull::TQAuServerNull(TQObject* parent) :
diff --git a/src/kernel/tqstyle.cpp b/src/kernel/tqstyle.cpp
index 7b21783b0..ccf8fb66f 100644
--- a/src/kernel/tqstyle.cpp
+++ b/src/kernel/tqstyle.cpp
@@ -63,7 +63,7 @@ public:
};
TQStyleOption::TQStyleOption(StyleOptionDefault) :
- def(TRUE),
+ def(true),
tb(NULL),
i1(-1),
i2(-1),
@@ -76,7 +76,7 @@ TQStyleOption::TQStyleOption(StyleOptionDefault) :
}
TQStyleOption::TQStyleOption(int in1) :
- def(FALSE),
+ def(false),
tb(NULL),
i1(in1),
i2(-1),
@@ -89,7 +89,7 @@ TQStyleOption::TQStyleOption(int in1) :
}
TQStyleOption::TQStyleOption(int in1, int in2) :
- def(FALSE),
+ def(false),
tb(NULL),
i1(in1),
i2(in2),
@@ -102,7 +102,7 @@ TQStyleOption::TQStyleOption(int in1, int in2) :
}
TQStyleOption::TQStyleOption(int in1, int in2, int in3, int in4) :
- def(FALSE),
+ def(false),
tb(NULL),
i1(in1),
i2(in2),
@@ -115,7 +115,7 @@ TQStyleOption::TQStyleOption(int in1, int in2, int in3, int in4) :
}
TQStyleOption::TQStyleOption(TQMenuItem* m) :
- def(FALSE),
+ def(false),
mi(m),
tb(NULL),
i1(-1),
@@ -129,7 +129,7 @@ TQStyleOption::TQStyleOption(TQMenuItem* m) :
}
TQStyleOption::TQStyleOption(TQMenuItem* m, int in1) :
- def(FALSE),
+ def(false),
mi(m),
tb(NULL),
i1(in1),
@@ -143,7 +143,7 @@ TQStyleOption::TQStyleOption(TQMenuItem* m, int in1) :
}
TQStyleOption::TQStyleOption(TQMenuItem* m, int in1, int in2) :
- def(FALSE),
+ def(false),
mi(m),
tb(NULL),
i1(in1),
@@ -157,7 +157,7 @@ TQStyleOption::TQStyleOption(TQMenuItem* m, int in1, int in2) :
}
TQStyleOption::TQStyleOption(const TQColor& c) :
- def(FALSE),
+ def(false),
tb(NULL),
cl(&c),
i1(-1),
@@ -171,7 +171,7 @@ TQStyleOption::TQStyleOption(const TQColor& c) :
}
TQStyleOption::TQStyleOption(TQTab* t) :
- def(FALSE),
+ def(false),
tb(t),
i1(-1),
i2(-1),
@@ -184,7 +184,7 @@ TQStyleOption::TQStyleOption(TQTab* t) :
}
TQStyleOption::TQStyleOption(TQListViewItem* i) :
- def(FALSE),
+ def(false),
tb(NULL),
li(i),
i1(-1),
@@ -198,7 +198,7 @@ TQStyleOption::TQStyleOption(TQListViewItem* i) :
}
TQStyleOption::TQStyleOption(TQCheckListItem* i) :
- def(FALSE),
+ def(false),
tb(NULL),
i1(-1),
i2(-1),
@@ -211,7 +211,7 @@ TQStyleOption::TQStyleOption(TQCheckListItem* i) :
}
TQStyleOption::TQStyleOption(TQt::ArrowType a) :
- def(FALSE),
+ def(false),
tb(NULL),
i1((int)a),
i2(-1),
@@ -224,7 +224,7 @@ TQStyleOption::TQStyleOption(TQt::ArrowType a) :
}
TQStyleOption::TQStyleOption(const TQRect& r) :
- def(FALSE),
+ def(false),
tb(NULL),
i1(r.x()),
i2(r.y()),
@@ -237,7 +237,7 @@ TQStyleOption::TQStyleOption(const TQRect& r) :
}
TQStyleOption::TQStyleOption(TQWidget *w) :
- def(FALSE),
+ def(false),
tb(NULL),
i1(-1),
i2(-1),
@@ -383,8 +383,8 @@ TQStyleOption::TQStyleOption(TQWidget *w) :
/*!
\fn bool TQStyleOption::isDefault() const
- Returns TRUE if the option was constructed with the default
- constructor; otherwise returns FALSE.
+ Returns true if the option was constructed with the default
+ constructor; otherwise returns false.
*/
/*!
@@ -883,7 +883,7 @@ void TQStyle::drawItem( TQPainter *p, const TQRect &r,
bool clip = (flags & TQt::DontClip) == 0;
if ( clip ) {
if ( pm.width() < w && pm.height() < h ) {
- clip = FALSE;
+ clip = false;
} else {
p->save();
TQRegion cr = TQRect(x, y, w, h);
@@ -917,7 +917,7 @@ void TQStyle::drawItem( TQPainter *p, const TQRect &r,
TQString k;
k.sprintf( "$qt-drawitem-%x", pm.serialNumber() );
TQPixmap *mask = TQPixmapCache::find(k);
- bool del=FALSE;
+ bool del=false;
if ( !mask ) {
mask = new TQPixmap( pm.createHeuristicMask() );
mask->setMask( *((TQBitmap*)mask) );
@@ -1973,19 +1973,19 @@ void TQStyle::drawItem( TQPainter *p, const TQRect &r,
TQt::BackgroundMode BackgroundMode\endlink enum.
\value SH_ScrollBar_MiddleClickAbsolutePosition a boolean value.
- If TRUE, middle clicking on a scrollbar causes the slider to
- jump to that position. If FALSE, the middle clicking is
+ If true, middle clicking on a scrollbar causes the slider to
+ jump to that position. If false, the middle clicking is
ignored.
\value SH_ScrollBar_LeftClickAbsolutePosition a boolean value.
- If TRUE, left clicking on a scrollbar causes the slider to
- jump to that position. If FALSE, the left clicking will
+ If true, left clicking on a scrollbar causes the slider to
+ jump to that position. If false, the left clicking will
behave as appropriate for each control.
\value SH_ScrollBar_ScrollWhenPointerLeavesControl a boolean
- value. If TRUE, when clicking a scrollbar SubControl, holding
+ value. If true, when clicking a scrollbar SubControl, holding
the mouse button down and moving the pointer outside the
- SubControl, the scrollbar continues to scroll. If FALSE, the
+ SubControl, the scrollbar continues to scroll. If false, the
scrollbar stops scrolling when the pointer leaves the
SubControl.
@@ -2402,7 +2402,7 @@ void TQStyle::setWidgetActionRequestHook( WidgetActionRequestHook hook ) {
/*!
\fn bool widgetActionRequestHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, WidgetActionRequest request );
- Handles widget action requests. Return FALSE to continue processing in base classes, TRUE to eat the request and halt processing.
+ Handles widget action requests. Return false to continue processing in base classes, true to eat the request and halt processing.
*/
bool TQStyle::widgetActionRequest( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, WidgetActionRequest request, TQStyleWidgetActionRequestData requestData ) {
bool cbret = false;
@@ -2413,33 +2413,33 @@ bool TQStyle::widgetActionRequest( const TQStyleControlElementData &ceData, Cont
if (ceData.widgetObjectTypes.contains("TQWidget")) {
TQWidget* widget = reinterpret_cast<TQWidget*>(source);
if (request == WAR_Repaint) {
- widget->repaint(FALSE);
+ widget->repaint(false);
}
else if (request == WAR_RepaintRect) {
- widget->repaint(requestData.rect, FALSE);
+ widget->repaint(requestData.rect, false);
}
else if (request == WAR_EnableMouseTracking) {
- widget->setMouseTracking(TRUE);
+ widget->setMouseTracking(true);
}
else if (request == WAR_DisableMouseTracking) {
- widget->setMouseTracking(FALSE);
+ widget->setMouseTracking(false);
}
else if (request == WAR_SetAutoMask) {
- widget->setAutoMask(TRUE);
+ widget->setAutoMask(true);
}
else if (request == WAR_UnSetAutoMask) {
- widget->setAutoMask(FALSE);
+ widget->setAutoMask(false);
}
else if (request == WAR_SetCheckable) {
TQPopupMenu *pm = dynamic_cast<TQPopupMenu*>(widget);
if (pm) {
- pm->setCheckable(TRUE);
+ pm->setCheckable(true);
}
}
else if (request == WAR_UnSetCheckable) {
TQPopupMenu *pm = dynamic_cast<TQPopupMenu*>(widget);
if (pm) {
- pm->setCheckable(FALSE);
+ pm->setCheckable(false);
}
}
else if (request == WAR_FrameSetStyle) {
@@ -2493,7 +2493,7 @@ bool TQStyle::widgetActionRequest( const TQStyleControlElementData &ceData, Cont
it2.toFirst();
while ( (w = (TQWidget*)it2.current()) != 0 ) {
++it2;
- w->repaint(FALSE);
+ w->repaint(false);
}
delete l;
}
@@ -2502,13 +2502,13 @@ bool TQStyle::widgetActionRequest( const TQStyleControlElementData &ceData, Cont
else if (request == WAR_SetDefault) {
TQPushButton *button = dynamic_cast<TQPushButton*>(widget);
if (button) {
- button->setDefault(TRUE);
+ button->setDefault(true);
}
}
else if (request == WAR_UnSetDefault) {
TQPushButton *button = dynamic_cast<TQPushButton*>(widget);
if (button) {
- button->setDefault(FALSE);
+ button->setDefault(false);
}
}
else if (request == WAR_SendPaintEvent) {
@@ -2536,7 +2536,7 @@ void TQStyle::setApplicationActionRequestHook( ApplicationActionRequestHook hook
/*!
\fn bool applicationActionRequestHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, ApplicationActionRequest request );
- Handles application action requests. Return FALSE to continue processing in base classes, TRUE to eat the request and halt processing.
+ Handles application action requests. Return false to continue processing in base classes, true to eat the request and halt processing.
*/
bool TQStyle::applicationActionRequest( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, ApplicationActionRequest request, TQStyleApplicationActionRequestData requestData ) {
bool cbret = false;
diff --git a/src/kernel/tqstyle.h b/src/kernel/tqstyle.h
index 01e091ff9..54ea59cbe 100644
--- a/src/kernel/tqstyle.h
+++ b/src/kernel/tqstyle.h
@@ -103,7 +103,7 @@ public:
TQRect rect() const { return TQRect( i1, i2, i3, i4 ); }
TQWidget* widget() const { return (TQWidget*)p1; }
- TQStyleOption(TQTab* t, TQTab* h) : def(FALSE), tb(t), cli(NULL), tbh(h) {}
+ TQStyleOption(TQTab* t, TQTab* h) : def(false), tb(t), cli(NULL), tbh(h) {}
TQTab* hoverTab() const { return tbh; }
private:
@@ -302,8 +302,8 @@ class TQ_EXPORT TQStyleWidgetActionRequestData {
public:
TQStyleWidgetActionRequestData();
TQStyleWidgetActionRequestData(int metric1, int metric2=0);
- TQStyleWidgetActionRequestData(TQPalette palette, bool informWidgets = FALSE, const char* className = 0);
- TQStyleWidgetActionRequestData(TQFont font, bool informWidgets = FALSE, const char* className = 0);
+ TQStyleWidgetActionRequestData(TQPalette palette, bool informWidgets = false, const char* className = 0);
+ TQStyleWidgetActionRequestData(TQFont font, bool informWidgets = false, const char* className = 0);
TQStyleWidgetActionRequestData(TQRect rect);
TQStyleWidgetActionRequestData(TQPaintEvent* paintEvent);
~TQStyleWidgetActionRequestData();
diff --git a/src/kernel/tqstylesheet.cpp b/src/kernel/tqstylesheet.cpp
index c03cc792e..afa9fa057 100644
--- a/src/kernel/tqstylesheet.cpp
+++ b/src/kernel/tqstylesheet.cpp
@@ -226,7 +226,7 @@ void TQStyleSheetItem::init()
d->fontsizestep = 0;
d->ncolumns = Undefined;
d->col = TQColor(); // !isValid()
- d->anchor = FALSE;
+ d->anchor = false;
d->align = Undefined;
d->valign = VAlignBaseline;
d->margin[0] = Undefined;
@@ -236,7 +236,7 @@ void TQStyleSheetItem::init()
d->margin[4] = Undefined;
d->list = ListStyleUndefined;
d->whitespacemode = WhiteSpaceModeUndefined;
- d->selfnest = TRUE;
+ d->selfnest = true;
d->lineSpacing = Undefined;
}
@@ -356,8 +356,8 @@ void TQStyleSheetItem::setVerticalAlignment( VerticalAlignment valign )
/*!
- Returns TRUE if the style sets an italic font; otherwise returns
- FALSE.
+ Returns true if the style sets an italic font; otherwise returns
+ false.
\sa setFontItalic(), definesFontItalic()
*/
@@ -367,7 +367,7 @@ bool TQStyleSheetItem::fontItalic() const
}
/*!
- If \a italic is TRUE sets italic for the style; otherwise sets
+ If \a italic is true sets italic for the style; otherwise sets
upright.
\sa fontItalic(), definesFontItalic()
@@ -378,8 +378,8 @@ void TQStyleSheetItem::setFontItalic(bool italic)
}
/*!
- Returns TRUE if the style defines a font shape; otherwise returns
- FALSE. A style does not define any shape until setFontItalic() is
+ Returns true if the style defines a font shape; otherwise returns
+ false. A style does not define any shape until setFontItalic() is
called.
\sa setFontItalic(), fontItalic()
@@ -390,8 +390,8 @@ bool TQStyleSheetItem::definesFontItalic() const
}
/*!
- Returns TRUE if the style sets an underlined font; otherwise
- returns FALSE.
+ Returns true if the style sets an underlined font; otherwise
+ returns false.
\sa setFontUnderline(), definesFontUnderline()
*/
@@ -401,7 +401,7 @@ bool TQStyleSheetItem::fontUnderline() const
}
/*!
- If \a underline is TRUE, sets underline for the style; otherwise
+ If \a underline is true, sets underline for the style; otherwise
sets no underline.
\sa fontUnderline(), definesFontUnderline()
@@ -412,8 +412,8 @@ void TQStyleSheetItem::setFontUnderline(bool underline)
}
/*!
- Returns TRUE if the style defines a setting for the underline
- property of the font; otherwise returns FALSE. A style does not
+ Returns true if the style defines a setting for the underline
+ property of the font; otherwise returns false. A style does not
define this until setFontUnderline() is called.
\sa setFontUnderline(), fontUnderline()
@@ -425,8 +425,8 @@ bool TQStyleSheetItem::definesFontUnderline() const
/*!
- Returns TRUE if the style sets a strike out font; otherwise
- returns FALSE.
+ Returns true if the style sets a strike out font; otherwise
+ returns false.
\sa setFontStrikeOut(), definesFontStrikeOut()
*/
@@ -436,7 +436,7 @@ bool TQStyleSheetItem::fontStrikeOut() const
}
/*!
- If \a strikeOut is TRUE, sets strike out for the style; otherwise
+ If \a strikeOut is true, sets strike out for the style; otherwise
sets no strike out.
\sa fontStrikeOut(), definesFontStrikeOut()
@@ -447,8 +447,8 @@ void TQStyleSheetItem::setFontStrikeOut(bool strikeOut)
}
/*!
- Returns TRUE if the style defines a setting for the strikeOut
- property of the font; otherwise returns FALSE. A style does not
+ Returns true if the style defines a setting for the strikeOut
+ property of the font; otherwise returns false. A style does not
define this until setFontStrikeOut() is called.
\sa setFontStrikeOut(), fontStrikeOut()
@@ -633,7 +633,7 @@ bool TQStyleSheetItem::isAnchor() const
}
/*!
- If \a anc is TRUE, sets this style to be an anchor (hypertext
+ If \a anc is true, sets this style to be an anchor (hypertext
link); otherwise sets it to not be an anchor. Elements in this
style link to other documents or anchors.
@@ -781,22 +781,22 @@ void TQStyleSheetItem::setContexts( const TQString& c)
}
/*!
- Returns TRUE if this style can be nested into an element of style
- \a s; otherwise returns FALSE.
+ Returns true if this style can be nested into an element of style
+ \a s; otherwise returns false.
\sa contexts(), setContexts()
*/
bool TQStyleSheetItem::allowedInContext( const TQStyleSheetItem* s) const
{
if ( d->contxt.isEmpty() )
- return TRUE;
+ return true;
return d->contxt.find( TQChar(' ')+s->name()+TQChar(' ')) != -1;
}
/*!
- Returns TRUE if this style has self-nesting enabled; otherwise
- returns FALSE.
+ Returns true if this style has self-nesting enabled; otherwise
+ returns false.
\sa setSelfNesting()
*/
@@ -1112,7 +1112,7 @@ TQStyleSheet::~TQStyleSheet()
*/
void TQStyleSheet::init()
{
- styles.setAutoDelete( TRUE );
+ styles.setAutoDelete( true );
nullstyle = new TQStyleSheetItem( this,
TQString::fromLatin1("") );
@@ -1126,13 +1126,13 @@ void TQStyleSheet::init()
style->setDisplayMode( TQStyleSheetItem::DisplayBlock );
style = new TQStyleSheetItem( this, TQString::fromLatin1("a") );
- style->setAnchor( TRUE );
+ style->setAnchor( true );
style = new TQStyleSheetItem( this, TQString::fromLatin1("em") );
- style->setFontItalic( TRUE );
+ style->setFontItalic( true );
style = new TQStyleSheetItem( this, TQString::fromLatin1("i") );
- style->setFontItalic( TRUE );
+ style->setFontItalic( true );
style = new TQStyleSheetItem( this, TQString::fromLatin1("big") );
style->setLogicalFontSizeStep( 1 );
@@ -1185,7 +1185,7 @@ void TQStyleSheet::init()
style = new TQStyleSheetItem( this, TQString::fromLatin1("p") );
style->setDisplayMode(TQStyleSheetItem::DisplayBlock);
style-> setMargin(TQStyleSheetItem::MarginVertical, 12);
- style->setSelfNesting( FALSE );
+ style->setSelfNesting( false );
style = new TQStyleSheetItem( this, TQString::fromLatin1("center") );
style->setDisplayMode(TQStyleSheetItem::DisplayBlock);
@@ -1213,7 +1213,7 @@ void TQStyleSheet::init()
style = new TQStyleSheetItem( this, TQString::fromLatin1("li") );
style->setDisplayMode(TQStyleSheetItem::DisplayListItem);
- style->setSelfNesting( FALSE );
+ style->setSelfNesting( false );
style = new TQStyleSheetItem( this, TQString::fromLatin1("code") );
style->setFontFamily( TQString::fromLatin1("Courier New,courier") );
@@ -1258,9 +1258,9 @@ void TQStyleSheet::init()
style->setMargin(TQStyleSheetItem::MarginLeft, 30);
style->setContexts(TQString::fromLatin1("dt dl") );
style = new TQStyleSheetItem( this, TQString::fromLatin1("u") );
- style->setFontUnderline( TRUE);
+ style->setFontUnderline( true);
style = new TQStyleSheetItem( this, TQString::fromLatin1("s") );
- style->setFontStrikeOut( TRUE);
+ style->setFontStrikeOut( true);
style = new TQStyleSheetItem( this, TQString::fromLatin1("nobr") );
style->setWhiteSpaceMode( TQStyleSheetItem::WhiteSpaceNoWrap );
@@ -1498,7 +1498,7 @@ TQString TQStyleSheet::escape( const TQString& plain)
string using the current TQStyleSheet::defaultSheet().
\value AutoText The text string is interpreted as for \c RichText
- if TQStyleSheet::mightBeRichText() returns TRUE, otherwise as
+ if TQStyleSheet::mightBeRichText() returns true, otherwise as
\c PlainText.
\value LogText A special, limited text format which is only used
@@ -1506,8 +1506,8 @@ TQString TQStyleSheet::escape( const TQString& plain)
*/
/*!
- Returns TRUE if the string \a text is likely to be rich text;
- otherwise returns FALSE.
+ Returns true if the string \a text is likely to be rich text;
+ otherwise returns false.
This function uses a fast and therefore simple heuristic. It
mainly checks whether there is something that looks like a tag
@@ -1517,18 +1517,18 @@ TQString TQStyleSheet::escape( const TQString& plain)
bool TQStyleSheet::mightBeRichText( const TQString& text)
{
if ( text.isEmpty() )
- return FALSE;
+ return false;
int start = 0;
while ( start < int(text.length()) && text[start].isSpace() )
++start;
if ( text.mid( start, 5 ).lower() == "<!doc" )
- return TRUE;
+ return true;
int open = start;
while ( open < int(text.length()) && text[open] != '<'
&& text[open] != '\n' ) {
if ( text[open] == '&' && text.mid(open+1,3) == "lt;" )
- return TRUE; // support desperate attempt of user to see <...>
+ return true; // support desperate attempt of user to see <...>
++open;
}
if ( open < (int)text.length() && text[open] == '<' ) {
@@ -1541,12 +1541,12 @@ bool TQStyleSheet::mightBeRichText( const TQString& text)
else if ( !tag.isEmpty() && text[i].isSpace() )
break;
else if ( !text[i].isSpace() && (!tag.isEmpty() || text[i] != '!' ) )
- return FALSE; // that's not a tag
+ return false; // that's not a tag
}
return defaultSheet()->item( tag.lower() ) != 0;
}
}
- return FALSE;
+ return false;
}
@@ -1586,10 +1586,10 @@ void TQStyleSheet::scaleFont( TQFont& font, int logicalSize ) const
if ( logicalSize > 7 )
logicalSize = 7;
int baseSize = font.pointSize();
- bool pixel = FALSE;
+ bool pixel = false;
if ( baseSize == -1 ) {
baseSize = font.pixelSize();
- pixel = TRUE;
+ pixel = true;
}
int s;
switch ( logicalSize ) {
diff --git a/src/kernel/tqtextengine.cpp b/src/kernel/tqtextengine.cpp
index 067a21740..1cda53f96 100644
--- a/src/kernel/tqtextengine.cpp
+++ b/src/kernel/tqtextengine.cpp
@@ -86,12 +86,12 @@ struct BidiControl {
};
inline BidiControl( bool rtl )
- : cCtx( 0 ), singleLine( FALSE ) {
+ : cCtx( 0 ), singleLine( false ) {
ctx[0].level = (rtl ? 1 : 0);
- ctx[0].override = FALSE;
+ ctx[0].override = false;
}
- inline void embed( int level, bool override = FALSE ) {
+ inline void embed( int level, bool override = false ) {
if ( ctx[cCtx].level < 61 && cCtx < 61 ) {
(void) ++cCtx;
ctx[cCtx].level = level;
@@ -215,12 +215,12 @@ static void appendItems(TQTextEngine *engine, int &start, int &stop, BidiControl
if ( uc == 0xfffcU || uc == 0x2028U ) {
item.analysis.bidiLevel = level % 2 ? level-1 : level;
item.analysis.script = TQFont::Latin;
- item.isObject = TRUE;
+ item.isObject = true;
s = TQFont::NoScript;
} else if ((uc >= 9 && uc <=13) ||
(category >= TQChar::Separator_Space && category <= TQChar::Separator_Paragraph)) {
item.analysis.script = TQFont::Latin;
- item.isSpace = TRUE;
+ item.isSpace = true;
item.isTab = ( uc == '\t' );
item.analysis.bidiLevel = item.isTab ? control.baseLevel() : level;
s = TQFont::NoScript;
@@ -236,7 +236,7 @@ static void appendItems(TQTextEngine *engine, int &start, int &stop, BidiControl
item.position = i;
items.append( item );
script = s;
- item.isSpace = item.isTab = item.isObject = FALSE;
+ item.isSpace = item.isTab = item.isObject = false;
}
}
++stop;
@@ -248,13 +248,13 @@ static void bidiItemize( TQTextEngine *engine, bool rightToLeft, int mode )
{
BidiControl control( rightToLeft );
if ( mode & TQTextEngine::SingleLine )
- control.singleLine = TRUE;
+ control.singleLine = true;
int sor = 0;
int eor = -1;
// ### should get rid of this!
- bool first = TRUE;
+ bool first = true;
int length = engine->string.length();
@@ -652,7 +652,7 @@ static void bidiItemize( TQTextEngine *engine, bool rightToLeft, int mode )
status.last = dirCurrent;
}
- first = FALSE;
+ first = false;
++current;
}
@@ -807,9 +807,9 @@ static void calcLineBreaks(const TQString &str, TQCharAttributes *charAttributes
if (cls >= TQUnicodeTables::LineBreak_CM)
cls = TQUnicodeTables::LineBreak_ID;
- charAttributes[0].softBreak = FALSE;
+ charAttributes[0].softBreak = false;
charAttributes[0].whiteSpace = (cls == TQUnicodeTables::LineBreak_SP);
- charAttributes[0].charStop = TRUE;
+ charAttributes[0].charStop = true;
bool prevIsHighSurrogate = uc[0].isHighSurrogate();
for (int i = 1; i < len; ++i)
@@ -818,9 +818,9 @@ static void calcLineBreaks(const TQString &str, TQCharAttributes *charAttributes
if (prevIsHighSurrogate && uc[i].isLowSurrogate())
{
prevIsHighSurrogate = false;
- charAttributes[i].softBreak = FALSE;
- charAttributes[i].whiteSpace = FALSE;
- charAttributes[i].charStop = FALSE;
+ charAttributes[i].softBreak = false;
+ charAttributes[i].whiteSpace = false;
+ charAttributes[i].charStop = false;
continue;
}
prevIsHighSurrogate = uc[i].isHighSurrogate();
@@ -829,16 +829,16 @@ static void calcLineBreaks(const TQString &str, TQCharAttributes *charAttributes
int category = ::category(uc[i]);
if (category == TQChar::Mark_NonSpacing)
{
- charAttributes[i].softBreak = FALSE;
- charAttributes[i].whiteSpace = FALSE;
- charAttributes[i].charStop = FALSE;
+ charAttributes[i].softBreak = false;
+ charAttributes[i].whiteSpace = false;
+ charAttributes[i].charStop = false;
continue;
}
if (ncls == TQUnicodeTables::LineBreak_SP) {
- charAttributes[i].softBreak = FALSE;
- charAttributes[i].whiteSpace = TRUE;
- charAttributes[i].charStop = TRUE;
+ charAttributes[i].softBreak = false;
+ charAttributes[i].whiteSpace = true;
+ charAttributes[i].charStop = true;
cls = ncls;
continue;
}
@@ -847,9 +847,9 @@ static void calcLineBreaks(const TQString &str, TQCharAttributes *charAttributes
{
// two complex chars (thai or lao), thai_attributes might override, but here
// we do a best guess
- charAttributes[i].softBreak = TRUE;
- charAttributes[i].whiteSpace = FALSE;
- charAttributes[i].charStop = TRUE;
+ charAttributes[i].softBreak = true;
+ charAttributes[i].whiteSpace = false;
+ charAttributes[i].charStop = true;
cls = ncls;
continue;
}
@@ -868,8 +868,8 @@ static void calcLineBreaks(const TQString &str, TQCharAttributes *charAttributes
softBreak = (brk == Dbk);
// tqDebug("char = %c %04x, cls=%d, ncls=%d, brk=%d soft=%d", uc[i].cell(), uc[i].unicode(), cls, ncls, brk, charAttributes[i].softBreak);
charAttributes[i].softBreak = softBreak;
- charAttributes[i].whiteSpace = FALSE;
- charAttributes[i].charStop = TRUE;
+ charAttributes[i].whiteSpace = false;
+ charAttributes[i].charStop = true;
cls = ncls;
}
}
@@ -885,7 +885,7 @@ static void calcLineBreaks(const TQString &str, TQCharAttributes *charAttributes
TQTextEngine::TQTextEngine( const TQString &str, TQFontPrivate *f )
- : string( str ), fnt( f ), direction( TQChar::DirON ), haveCharAttributes( FALSE ), widthOnly( FALSE )
+ : string( str ), fnt( f ), direction( TQChar::DirON ), haveCharAttributes( false ), widthOnly( false )
{
#ifdef TQ_WS_WIN
if ( !resolvedUsp10 )
@@ -996,7 +996,7 @@ const TQCharAttributes *TQTextEngine::attributes()
attributes( script, string, from, len, charAttributes );
}
- haveCharAttributes = TRUE;
+ haveCharAttributes = true;
return charAttributes;
}
@@ -1115,15 +1115,15 @@ void TQTextEngine::itemize( int mode )
direction = basicDirection( string );
bidiItemize( this, direction == TQChar::DirR, mode );
} else {
- BidiControl control( FALSE );
+ BidiControl control( false );
if ( mode & TQTextEngine::SingleLine )
- control.singleLine = TRUE;
+ control.singleLine = true;
int start = 0;
int stop = string.length() - 1;
appendItems(this, start, stop, control, TQChar::DirL);
}
if ( (mode & WidthOnly) == WidthOnly )
- widthOnly = TRUE;
+ widthOnly = true;
}
glyph_metrics_t TQTextEngine::boundingBox( int from, int len ) const
diff --git a/src/kernel/tqtextengine_p.h b/src/kernel/tqtextengine_p.h
index d3e8ea3ee..4ba2ed942 100644
--- a/src/kernel/tqtextengine_p.h
+++ b/src/kernel/tqtextengine_p.h
@@ -197,8 +197,8 @@ class TQFontEngine;
struct TQScriptItem
{
- inline TQScriptItem() : position( 0 ), isSpace( FALSE ), isTab( FALSE ),
- isObject( FALSE ), hasPositioning( FALSE ),
+ inline TQScriptItem() : position( 0 ), isSpace( false ), isTab( false ),
+ isObject( false ), hasPositioning( false ),
descent( -1 ), ascent( -1 ), width( -1 ),
x( 0 ), y( 0 ), num_glyphs( 0 ), glyph_data_offset( 0 ),
fontEngine( 0 ) { }
diff --git a/src/kernel/tqtextengine_unix.cpp b/src/kernel/tqtextengine_unix.cpp
index 0de67f04a..37a786c2e 100644
--- a/src/kernel/tqtextengine_unix.cpp
+++ b/src/kernel/tqtextengine_unix.cpp
@@ -93,7 +93,7 @@ void TQTextEngine::shape( int item ) const
shaper_item.font = si.fontEngine;
shaper_item.num_glyphs = TQMAX(int(num_glyphs - used), shaper_item.length);
shaper_item.flags = si.analysis.bidiLevel % 2 ? RightToLeft : 0;
- shaper_item.has_positioning = FALSE;
+ shaper_item.has_positioning = false;
while (1) {
ensureSpace(shaper_item.num_glyphs);
diff --git a/src/kernel/tqtextlayout.cpp b/src/kernel/tqtextlayout.cpp
index 0d50e4106..5d424f423 100644
--- a/src/kernel/tqtextlayout.cpp
+++ b/src/kernel/tqtextlayout.cpp
@@ -453,7 +453,7 @@ TQTextLayout::Result TQTextLayout::endLine( int x, int y, int alignment,
if ( breakItem != i )
itemWidth = 0;
if (itemAttrs->softBreak)
- breakany = FALSE;
+ breakany = false;
breakItem = i;
breakPosition = pos;
// tqDebug("found possible break at item %d, position %d (absolute=%d), w=%d, tmpWidth=%d, tmpItemWidth=%d", breakItem, breakPosition, d->items[breakItem].position+breakPosition, w, tmpWidth, tmpItemWidth);
@@ -633,7 +633,7 @@ bool TQTextLayout::validCursorPosition( int pos ) const
{
const TQCharAttributes *attributes = d->attributes();
if ( pos < 0 || pos > (int)d->string.length() )
- return FALSE;
+ return false;
return attributes[pos].charStop;
}
diff --git a/src/kernel/tqthread.cpp b/src/kernel/tqthread.cpp
index 9a1d1f602..ac6aa0ecb 100644
--- a/src/kernel/tqthread.cpp
+++ b/src/kernel/tqthread.cpp
@@ -159,7 +159,7 @@ TQThread::TQThread( unsigned int stackSize )
Note that deleting a TQThread object will not stop the execution of
the thread it represents. Deleting a running TQThread (i.e.
- finished() returns FALSE) will probably result in a program crash.
+ finished() returns false) will probably result in a program crash.
You can wait() on a thread to make sure that it has finished.
*/
TQThread::~TQThread()
@@ -170,7 +170,7 @@ TQThread::~TQThread()
tqWarning("TQThread object destroyed while thread is still running.");
#endif
- d->orphan = TRUE;
+ d->orphan = true;
return;
}
@@ -202,7 +202,7 @@ void TQThread::terminate()
}
/*!
- Returns TRUE if the thread is finished; otherwise returns FALSE.
+ Returns true if the thread is finished; otherwise returns false.
*/
bool TQThread::finished() const
{
@@ -211,7 +211,7 @@ bool TQThread::finished() const
}
/*!
- Returns TRUE if the thread is running; otherwise returns FALSE.
+ Returns true if the thread is running; otherwise returns false.
*/
bool TQThread::running() const
{
@@ -221,10 +221,10 @@ bool TQThread::running() const
/*!
Changes the way cross thread signals are handled
- If disable is FALSE, signals emitted from this thread will be
+ If disable is false, signals emitted from this thread will be
posted to any other connected threads' event loops (default).
- If disable is TRUE, calls to emit from this thread
+ If disable is true, calls to emit from this thread
will immediately execute slots in another thread.
This mode of operation is inherently unsafe and is provided
solely to support thread management by a third party application.
@@ -235,7 +235,7 @@ void TQThread::setThreadPostedEventsDisabled(bool disable)
}
/*!
- Returns TRUE if thread posted events are disabled, FALSE if not
+ Returns true if thread posted events are disabled, false if not
*/
bool TQThread::threadPostedEventsDisabled() const
{
diff --git a/src/kernel/tqthread_unix.cpp b/src/kernel/tqthread_unix.cpp
index 27b8ec7af..4f4ec8d79 100644
--- a/src/kernel/tqthread_unix.cpp
+++ b/src/kernel/tqthread_unix.cpp
@@ -98,10 +98,10 @@ void TQThreadInstance::init(unsigned int stackSize)
stacksize = stackSize;
args[0] = args[1] = 0;
thread_storage = 0;
- finished = FALSE;
- running = FALSE;
- orphan = FALSE;
- disableThreadPostedEvents = FALSE;
+ finished = false;
+ running = false;
+ orphan = false;
+ disableThreadPostedEvents = false;
pthread_cond_init(&thread_done, nullptr);
thread_id = 0;
@@ -132,7 +132,7 @@ void *TQThreadInstance::start( void *_arg )
( (TQThread *) arg[0] )->run();
- pthread_cleanup_pop( TRUE );
+ pthread_cleanup_pop( true );
return 0;
}
@@ -154,8 +154,8 @@ void TQThreadInstance::finish( void * )
TQApplication::threadTerminationHandler((TQThread*)d->args[0]);
TQMutexLocker locker( d->mutex() );
- d->running = FALSE;
- d->finished = TRUE;
+ d->running = false;
+ d->finished = true;
d->args[0] = d->args[1] = 0;
@@ -210,9 +210,9 @@ TQt::HANDLE TQThread::currentThread()
void TQThread::initialize()
{
if ( ! tqt_global_mutexpool )
- tqt_global_mutexpool = new TQMutexPool( TRUE, 73 );
+ tqt_global_mutexpool = new TQMutexPool( true, 73 );
if ( ! qt_thread_mutexpool )
- qt_thread_mutexpool = new TQMutexPool( FALSE, 127 );
+ qt_thread_mutexpool = new TQMutexPool( false, 127 );
}
/*! \internal
@@ -321,8 +321,8 @@ void TQThread::start(Priority priority)
pthread_cond_wait(&d->thread_done, &locker.mutex()->d->handle);
}
- d->running = TRUE;
- d->finished = FALSE;
+ d->running = true;
+ d->finished = false;
int ret;
pthread_attr_t attr;
@@ -401,8 +401,8 @@ void TQThread::start(Priority priority)
// we failed to set the stacksize, and as the documentation states,
// the thread will fail to run...
- d->running = FALSE;
- d->finished = FALSE;
+ d->running = false;
+ d->finished = false;
return;
}
}
@@ -423,8 +423,8 @@ void TQThread::start(Priority priority)
tqWarning( "TQThread::start: thread creation error: %s", strerror( ret ) );
#endif // QT_CHECK_STATE
- d->running = FALSE;
- d->finished = FALSE;
+ d->running = false;
+ d->finished = false;
d->args[0] = d->args[1] = 0;
}
}
@@ -441,11 +441,11 @@ void TQThread::start()
\list
\i The thread associated with this TQThread object has finished
execution (i.e. when it returns from \l{run()}). This function
- will return TRUE if the thread has finished. It also returns
- TRUE if the thread has not been started yet.
+ will return true if the thread has finished. It also returns
+ true if the thread has not been started yet.
\i \a time milliseconds has elapsed. If \a time is ULONG_MAX (the
default), then the wait will never timeout (the thread must
- return from \l{run()}). This function will return FALSE if the
+ return from \l{run()}). This function will return false if the
wait timed out.
\endlist
@@ -460,11 +460,11 @@ bool TQThread::wait( unsigned long time )
tqWarning( "TQThread::wait: thread tried to wait on itself" );
#endif // QT_CHECK_STATE
- return FALSE;
+ return false;
}
if ( d->finished || ! d->running ) {
- return TRUE;
+ return true;
}
int ret;
diff --git a/src/kernel/tqtimer.cpp b/src/kernel/tqtimer.cpp
index 84803f1b5..1244a4690 100644
--- a/src/kernel/tqtimer.cpp
+++ b/src/kernel/tqtimer.cpp
@@ -63,7 +63,7 @@
\code
TQTimer *timer = new TQTimer( myObject );
connect( timer, TQ_SIGNAL(timeout()), myObject, TQ_SLOT(timerDone()) );
- timer->start( 2000, TRUE ); // 2 seconds single-shot timer
+ timer->start( 2000, true ); // 2 seconds single-shot timer
\endcode
You can also use the static singleShot() function to create a
@@ -78,7 +78,7 @@
\code
TQTimer *t = new TQTimer( myObject );
connect( t, TQ_SIGNAL(timeout()), TQ_SLOT(processOneThing()) );
- t->start( 0, FALSE );
+ t->start( 0, false );
\endcode
myObject->processOneThing() will be called repeatedly and should
@@ -140,8 +140,8 @@ TQTimer::~TQTimer()
/*!
\fn bool TQTimer::isActive() const
- Returns TRUE if the timer is running (pending); otherwise returns
- FALSE.
+ Returns true if the timer is running (pending); otherwise returns
+ false.
*/
/*!
@@ -156,7 +156,7 @@ TQTimer::~TQTimer()
Starts the timer with a \a msec milliseconds timeout, and returns
the ID of the timer, or zero when starting the timer failed.
- If \a sshot is TRUE, the timer will be activated only once;
+ If \a sshot is true, the timer will be activated only once;
otherwise it will continue until it is stopped.
Any pending timer will be stopped.
@@ -216,11 +216,11 @@ void TQTimer::stop()
bool TQTimer::event( TQEvent *e )
{
if ( e->type() != TQEvent::Timer ) // ignore all other events
- return FALSE;
+ return false;
if ( single ) // stop single shot timer
stop();
emit timeout(); // emit timeout signal
- return TRUE;
+ return true;
}
@@ -235,7 +235,7 @@ static TQObjectList *sst_list = 0; // list of single shot timers
static void sst_cleanup()
{
if ( sst_list ) {
- sst_list->setAutoDelete( TRUE );
+ sst_list->setAutoDelete( true );
delete sst_list;
sst_list = 0;
}
@@ -289,7 +289,7 @@ bool TQSingleShotTimer::event( TQEvent * )
signal.activate(); // emit the signal
signal.disconnect( 0, 0 );
timerId = 0; // mark as inactive
- return TRUE;
+ return true;
}
diff --git a/src/kernel/tqtimer.h b/src/kernel/tqtimer.h
index 40aae8724..461a2e486 100644
--- a/src/kernel/tqtimer.h
+++ b/src/kernel/tqtimer.h
@@ -55,7 +55,7 @@ public:
bool isActive() const;
- int start( int msec, bool sshot = FALSE );
+ int start( int msec, bool sshot = false );
void changeInterval( int msec );
void stop();
diff --git a/src/kernel/tqtranslator.cpp b/src/kernel/tqtranslator.cpp
index b6a11feb3..59444c327 100644
--- a/src/kernel/tqtranslator.cpp
+++ b/src/kernel/tqtranslator.cpp
@@ -377,8 +377,8 @@ extern bool qt_detectRTLLanguage();
/*!
Loads \a filename, which may be an absolute file name or relative
to \a directory. The previous contents of this translator object
- is discarded. Returns TRUE if the file is loaded successfully;
- otherwise returns FALSE.
+ is discarded. Returns true if the file is loaded successfully;
+ otherwise returns false.
If the full file name does not exist, other file names are tried
in the following order:
@@ -467,7 +467,7 @@ bool TQTranslator::load( const TQString & filename, const TQString & directory,
if (d->oldPermissionLookup != qt_ntfs_permission_lookup)
qt_ntfs_permission_lookup++;
#endif
- return FALSE;
+ return false;
}
fname.truncate( rightmost );
@@ -493,13 +493,13 @@ bool TQTranslator::load( const TQString & filename, const TQString & directory,
f = qt_open( TQFile::encodeName(realname), O_RDONLY, 0666 );
if ( f < 0 ) {
// tqDebug( "can't open %s: %s", realname.ascii(), strerror( errno ) );
- return FALSE;
+ return false;
}
struct stat st;
if ( fstat( f, &st ) ) {
// tqDebug( "can't stat %s: %s", realname.ascii(), strerror( errno ) );
- return FALSE;
+ return false;
}
char * tmp;
tmp = (char*)mmap( 0, st.st_size, // any address, whole file
@@ -508,7 +508,7 @@ bool TQTranslator::load( const TQString & filename, const TQString & directory,
f, 0 ); // from offset 0 of f
if ( !tmp || tmp == (char*)MAP_FAILED ) {
// tqDebug( "can't mmap %s: %s", filename.ascii(), strerror( errno ) );
- return FALSE;
+ return false;
}
::close( f );
@@ -518,10 +518,10 @@ bool TQTranslator::load( const TQString & filename, const TQString & directory,
#else
TQFile f( realname );
if ( !f.exists() )
- return FALSE;
+ return false;
d->unmapLength = f.size();
d->unmapPointer = new char[d->unmapLength];
- bool ok = FALSE;
+ bool ok = false;
if ( f.open(IO_ReadOnly) ) {
ok = d->unmapLength ==
(uint)f.readBlock( d->unmapPointer, d->unmapLength );
@@ -530,7 +530,7 @@ bool TQTranslator::load( const TQString & filename, const TQString & directory,
if ( !ok ) {
delete [] d->unmapPointer;
d->unmapPointer = 0;
- return FALSE;
+ return false;
}
#endif
@@ -542,8 +542,8 @@ bool TQTranslator::load( const TQString & filename, const TQString & directory,
\fn bool TQTranslator::load( const uchar *data, int len )
Loads the .qm file data \a data of length \a len into the
- translator. Returns TRUE if the data is loaded successfully;
- otherwise returns FALSE.
+ translator. Returns true if the data is loaded successfully;
+ otherwise returns false.
The data is not copied. The caller must be able to guarantee that \a data
will not be deleted or modified.
@@ -553,13 +553,13 @@ bool TQTranslator::do_load( const uchar *data, int len )
{
if ( len < MagicLength || memcmp( data, magic, MagicLength ) != 0 ) {
clear();
- return FALSE;
+ return false;
}
TQByteArray array;
array.setRawData( (const char *) data, len );
TQDataStream s( array, IO_ReadOnly );
- bool ok = TRUE;
+ bool ok = true;
s.device()->at( MagicLength );
@@ -568,7 +568,7 @@ bool TQTranslator::do_load( const uchar *data, int len )
s >> tag >> blockLen;
while ( tag && blockLen ) {
if ( (TQ_UINT32) s.device()->at() + blockLen > (TQ_UINT32) len ) {
- ok = FALSE;
+ ok = false;
break;
}
@@ -587,7 +587,7 @@ bool TQTranslator::do_load( const uchar *data, int len )
}
if ( !s.device()->at(s.device()->at() + blockLen) ) {
- ok = FALSE;
+ ok = false;
break;
}
tag = 0;
@@ -642,9 +642,9 @@ bool TQTranslator::save( const TQString & filename, SaveMode mode )
s << tag << cas;
s.writeRawBytes( d->contextArray->data(), cas );
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
#endif
@@ -884,8 +884,8 @@ void TQTranslator::unsqueeze()
/*!
- Returns TRUE if this message file contains a message with the key
- (\a context, \a sourceText, \a comment); otherwise returns FALSE.
+ Returns true if this message file contains a message with the key
+ (\a context, \a sourceText, \a comment); otherwise returns false.
This function works with stripped translator files.
@@ -1071,7 +1071,7 @@ TQTranslatorMessage TQTranslator::findMessage( const char* context,
}
/*!
- Returns TRUE if this translator is empty, otherwise returns FALSE.
+ Returns true if this translator is empty, otherwise returns false.
This function works with stripped and unstripped translation files.
*/
bool TQTranslator::isEmpty() const
@@ -1342,8 +1342,8 @@ TQTranslatorMessage & TQTranslatorMessage::operator=(
/*!
Writes this translator message to the \a stream. If \a strip is
- FALSE (the default), all the information in the message is
- written. If \a strip is TRUE, only the part of the extended key
+ false (the default), all the information in the message is
+ written. If \a strip is true, only the part of the extended key
specified by \a prefix is written with the translation (\c
HashContextSourceTextComment by default).
@@ -1359,7 +1359,7 @@ void TQTranslatorMessage::write( TQDataStream & stream, bool strip,
stream.writeRawBytes( &tag, 1 );
stream << tn;
- bool mustWriteHash = TRUE;
+ bool mustWriteHash = true;
if ( !strip )
prefix = HashContextSourceTextComment;
@@ -1420,8 +1420,8 @@ TQTranslatorMessage::Prefix TQTranslatorMessage::commonPrefix(
/*!
- Returns TRUE if the extended key of this object is equal to that of
- \a m; otherwise returns FALSE.
+ Returns true if the extended key of this object is equal to that of
+ \a m; otherwise returns false.
*/
bool TQTranslatorMessage::operator==( const TQTranslatorMessage& m ) const
@@ -1433,15 +1433,15 @@ bool TQTranslatorMessage::operator==( const TQTranslatorMessage& m ) const
/*!
\fn bool TQTranslatorMessage::operator!=( const TQTranslatorMessage& m ) const
- Returns TRUE if the extended key of this object is different from
- that of \a m; otherwise returns FALSE.
+ Returns true if the extended key of this object is different from
+ that of \a m; otherwise returns false.
*/
/*!
- Returns TRUE if the extended key of this object is
+ Returns true if the extended key of this object is
lexicographically before than that of \a m; otherwise returns
- FALSE.
+ false.
*/
bool TQTranslatorMessage::operator<( const TQTranslatorMessage& m ) const
@@ -1455,24 +1455,24 @@ bool TQTranslatorMessage::operator<( const TQTranslatorMessage& m ) const
/*!
\fn bool TQTranslatorMessage::operator<=( const TQTranslatorMessage& m ) const
- Returns TRUE if the extended key of this object is
+ Returns true if the extended key of this object is
lexicographically before that of \a m or if they are equal;
- otherwise returns FALSE.
+ otherwise returns false.
*/
/*!
\fn bool TQTranslatorMessage::operator>( const TQTranslatorMessage& m ) const
- Returns TRUE if the extended key of this object is
- lexicographically after that of \a m; otherwise returns FALSE.
+ Returns true if the extended key of this object is
+ lexicographically after that of \a m; otherwise returns false.
*/
/*!
\fn bool TQTranslatorMessage::operator>=( const TQTranslatorMessage& m ) const
- Returns TRUE if the extended key of this object is
+ Returns true if the extended key of this object is
lexicographically after that of \a m or if they are equal;
- otherwise returns FALSE.
+ otherwise returns false.
*/
#endif // TQT_NO_TRANSLATION
diff --git a/src/kernel/tqtranslator.h b/src/kernel/tqtranslator.h
index 39f9faa36..634b37dd5 100644
--- a/src/kernel/tqtranslator.h
+++ b/src/kernel/tqtranslator.h
@@ -74,7 +74,7 @@ public:
enum Prefix { NoPrefix, Hash, HashContext, HashContextSourceText,
HashContextSourceTextComment };
- void write( TQDataStream & s, bool strip = FALSE,
+ void write( TQDataStream & s, bool strip = false,
Prefix prefix = HashContextSourceTextComment ) const;
Prefix commonPrefix( const TQTranslatorMessage& ) const;
diff --git a/src/kernel/tqucomextra.cpp b/src/kernel/tqucomextra.cpp
index f44355adc..b92552fd7 100644
--- a/src/kernel/tqucomextra.cpp
+++ b/src/kernel/tqucomextra.cpp
@@ -68,13 +68,13 @@ bool TQUType_TQVariant::canConvertFrom( TQUObject *o, TQUType *t )
|| isEqual( o->type, &static_QUType_bool )
|| isEqual( o->type, &static_QUType_double )
|| isEqual( o->type, &static_QUType_charstar ) )
- return TRUE;
+ return true;
return t->canConvertTo( o, this );
}
bool TQUType_TQVariant::canConvertTo( TQUObject * /*o*/, TQUType * /*t*/ )
{
- return FALSE;
+ return false;
}
bool TQUType_TQVariant::convertFrom( TQUObject *o, TQUType *t )
@@ -96,12 +96,12 @@ bool TQUType_TQVariant::convertFrom( TQUObject *o, TQUType *t )
o->type->clear( o );
o->payload.ptr = var;
o->type = this;
- return TRUE;
+ return true;
}
bool TQUType_TQVariant::convertTo( TQUObject * /*o*/, TQUType * /*t*/ )
{
- return FALSE;
+ return false;
}
void TQUType_TQVariant::clear( TQUObject *o )
@@ -137,7 +137,7 @@ void TQUType_varptr::set( TQUObject *o, const void* v )
bool TQUType_varptr::canConvertFrom( TQUObject *o, TQUType *t )
{
if ( isEqual( t, &static_QUType_ptr ) )
- return TRUE;
+ return true;
return t->canConvertTo( o, this );
}
@@ -154,16 +154,16 @@ bool TQUType_varptr::convertFrom( TQUObject *o, TQUType *t )
return t->convertTo( o, this );
o->type = this;
- return TRUE;
+ return true;
}
bool TQUType_varptr::convertTo( TQUObject *o, TQUType * t)
{
if ( isEqual( t, &static_QUType_ptr ) ) {
o->type = &static_QUType_ptr;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
int TQUType_varptr::serializeTo( TQUObject *, TQUBuffer * )
diff --git a/src/kernel/tqurl.cpp b/src/kernel/tqurl.cpp
index 7d0066f0c..ae5d7c992 100644
--- a/src/kernel/tqurl.cpp
+++ b/src/kernel/tqurl.cpp
@@ -63,12 +63,12 @@ public:
/*!
Replaces backslashes with slashes and removes multiple occurrences
- of slashes or backslashes if \c allowMultiple is FALSE.
+ of slashes or backslashes if \c allowMultiple is false.
*/
-static void slashify( TQString& s, bool allowMultiple = TRUE )
+static void slashify( TQString& s, bool allowMultiple = true )
{
- bool justHadSlash = FALSE;
+ bool justHadSlash = false;
for ( int i = 0; i < (int)s.length(); i++ ) {
if ( !allowMultiple && justHadSlash &&
( s[ i ] == '/' || s[ i ] == '\\' ) ) {
@@ -83,9 +83,9 @@ static void slashify( TQString& s, bool allowMultiple = TRUE )
s[ i ] = '/';
#endif
if ( s[ i ] == '/' )
- justHadSlash = TRUE;
+ justHadSlash = true;
else
- justHadSlash = FALSE;
+ justHadSlash = false;
}
}
@@ -170,7 +170,7 @@ static void slashify( TQString& s, bool allowMultiple = TRUE )
Use the static functions, encode() and decode() to encode or
decode a URL in a string. (They operate on the string in-place.)
- The isRelativeUrl() static function returns TRUE if the given
+ The isRelativeUrl() static function returns true if the given
string is a relative URL.
If you want to use a URL to work on a hierarchical structure (e.g.
@@ -188,9 +188,9 @@ static void slashify( TQString& s, bool allowMultiple = TRUE )
TQUrl::TQUrl()
{
d = new TQUrlPrivate;
- d->isValid = FALSE;
+ d->isValid = false;
d->port = -1;
- d->cleanPathDirty = TRUE;
+ d->cleanPathDirty = true;
}
/*!
@@ -219,7 +219,7 @@ TQUrl::TQUrl( const TQUrl& url )
}
/*!
- Returns TRUE if \a url is relative; otherwise returns FALSE.
+ Returns true if \a url is relative; otherwise returns false.
*/
bool TQUrl::isRelativeUrl( const TQString &url )
@@ -260,7 +260,7 @@ bool TQUrl::isRelativeUrl( const TQString &url )
want the constructor to handle the last part of the path as a file
name if there is no slash at the end, and to let it be replaced by
the file name of \a relUrl (if it contains one), set \a checkSlash
- to TRUE.
+ to true.
*/
TQUrl::TQUrl( const TQUrl& url, const TQString& relUrl, bool checkSlash )
@@ -303,7 +303,7 @@ TQUrl::TQUrl( const TQUrl& url, const TQString& relUrl, bool checkSlash )
p += "/";
p += rel;
d->path = p;
- d->cleanPathDirty = TRUE;
+ d->cleanPathDirty = true;
}
}
} else {
@@ -349,7 +349,7 @@ void TQUrl::setProtocol( const TQString& protocol )
{
d->protocol = protocol;
if ( hasHost() )
- d->isValid = TRUE;
+ d->isValid = true;
}
/*!
@@ -375,8 +375,8 @@ void TQUrl::setUser( const TQString& user )
}
/*!
- Returns TRUE if the URL contains a username; otherwise returns
- FALSE.
+ Returns true if the URL contains a username; otherwise returns
+ false.
\sa setUser() setPassword()
*/
@@ -415,8 +415,8 @@ void TQUrl::setPassword( const TQString& pass )
}
/*!
- Returns TRUE if the URL contains a password; otherwise returns
- FALSE.
+ Returns true if the URL contains a password; otherwise returns
+ false.
\warning Passwords passed in URLs are normally \e insecure; this
is due to the mechanism, not because of TQt.
@@ -450,12 +450,12 @@ void TQUrl::setHost( const TQString& host )
{
d->host = host;
if ( !d->protocol.isNull() && d->protocol != "file" )
- d->isValid = TRUE;
+ d->isValid = true;
}
/*!
- Returns TRUE if the URL contains a hostname; otherwise returns
- FALSE.
+ Returns true if the URL contains a hostname; otherwise returns
+ false.
\sa setHost()
*/
@@ -488,7 +488,7 @@ void TQUrl::setPort( int port )
}
/*!
- Returns TRUE if the URL contains a port; otherwise returns FALSE.
+ Returns true if the URL contains a port; otherwise returns false.
\sa setPort()
*/
@@ -508,12 +508,12 @@ void TQUrl::setPath( const TQString& path )
{
d->path = path;
slashify( d->path );
- d->cleanPathDirty = TRUE;
- d->isValid = TRUE;
+ d->cleanPathDirty = true;
+ d->isValid = true;
}
/*!
- Returns TRUE if the URL contains a path; otherwise returns FALSE.
+ Returns true if the URL contains a path; otherwise returns false.
\sa path() setPath()
*/
@@ -568,7 +568,7 @@ void TQUrl::setRef( const TQString& txt )
}
/*!
- Returns TRUE if the URL has a reference; otherwise returns FALSE.
+ Returns true if the URL has a reference; otherwise returns false.
\sa setRef()
*/
@@ -579,7 +579,7 @@ bool TQUrl::hasRef() const
}
/*!
- Returns TRUE if the URL is valid; otherwise returns FALSE. A URL
+ Returns true if the URL is valid; otherwise returns false. A URL
is invalid if it cannot be parsed, for example.
*/
@@ -602,9 +602,9 @@ void TQUrl::reset()
d->path = "";
d->queryEncoded = "";
d->refEncoded = "";
- d->isValid = TRUE;
+ d->isValid = true;
d->port = -1;
- d->cleanPathDirty = TRUE;
+ d->cleanPathDirty = true;
}
/*!
@@ -617,12 +617,12 @@ bool TQUrl::parse( const TQString& url )
slashify( url_ );
if ( url_.isEmpty() ) {
- d->isValid = FALSE;
- return FALSE;
+ d->isValid = false;
+ return false;
}
- d->cleanPathDirty = TRUE;
- d->isValid = TRUE;
+ d->cleanPathDirty = true;
+ d->isValid = true;
TQString oldProtocol = d->protocol;
d->protocol = TQString::null;
@@ -664,15 +664,15 @@ bool TQUrl::parse( const TQString& url )
{ 0, 0, Port, Path, 0, 0, 0, 0, } // Port
};
- bool relPath = FALSE;
+ bool relPath = false;
- relPath = FALSE;
- bool forceRel = FALSE;
+ relPath = false;
+ bool forceRel = false;
// If ':' is at pos 1, we have only one letter
// before that separator => that's a drive letter!
if ( url_.length() >= 2 && url_[1] == ':' )
- relPath = forceRel = TRUE;
+ relPath = forceRel = true;
int hasNoHost = -1;
int cs = url_.find( ":/" );
@@ -688,7 +688,7 @@ bool TQUrl::parse( const TQString& url )
} else {
table[ 0 ][ 1 ] = Protocol;
}
- relPath = TRUE;
+ relPath = true;
} else { // some checking
table[ 0 ][ 1 ] = Protocol;
@@ -799,8 +799,8 @@ bool TQUrl::parse( const TQString& url )
// error
if ( i < (int)url_.length() - 1 ) {
- d->isValid = FALSE;
- return FALSE;
+ d->isValid = false;
+ return false;
}
@@ -846,7 +846,7 @@ bool TQUrl::parse( const TQString& url )
#endif
decode( d->path );
- d->cleanPathDirty = TRUE;
+ d->cleanPathDirty = true;
#if 0
tqDebug( "URL: %s", url.latin1() );
@@ -860,7 +860,7 @@ bool TQUrl::parse( const TQString& url )
tqDebug( "port: %d\n\n----------------------------\n\n", d->port );
#endif
- return TRUE;
+ return true;
}
/*!
@@ -891,14 +891,14 @@ TQUrl& TQUrl::operator=( const TQUrl& url )
}
/*!
- Compares this URL with \a url and returns TRUE if they are equal;
- otherwise returns FALSE.
+ Compares this URL with \a url and returns true if they are equal;
+ otherwise returns false.
*/
bool TQUrl::operator==( const TQUrl& url ) const
{
if ( !isValid() || !url.isValid() )
- return FALSE;
+ return false;
if ( d->protocol == url.d->protocol &&
d->user == url.d->user &&
@@ -909,16 +909,16 @@ bool TQUrl::operator==( const TQUrl& url ) const
d->refEncoded == url.d->refEncoded &&
d->isValid == url.d->isValid &&
d->port == url.d->port )
- return TRUE;
+ return true;
- return FALSE;
+ return false;
}
/*!
\overload
Compares this URL with \a url. \a url is parsed first. Returns
- TRUE if \a url is equal to this url; otherwise returns FALSE.
+ true if \a url is equal to this url; otherwise returns false.
*/
bool TQUrl::operator==( const TQString& url ) const
@@ -996,7 +996,7 @@ TQString TQUrl::encodedPathAndQuery()
void TQUrl::setEncodedPathAndQuery( const TQString& pathAndQuery )
{
- d->cleanPathDirty = TRUE;
+ d->cleanPathDirty = true;
int pos = pathAndQuery.find( '?' );
if ( pos == -1 ) {
d->path = pathAndQuery;
@@ -1007,13 +1007,13 @@ void TQUrl::setEncodedPathAndQuery( const TQString& pathAndQuery )
}
decode( d->path );
- d->cleanPathDirty = TRUE;
+ d->cleanPathDirty = true;
}
extern bool tqt_resolve_symlinks; // defined in tqapplication.cpp
/*!
- Returns the path of the URL. If \a correct is TRUE, the path is
+ Returns the path of the URL. If \a correct is true, the path is
cleaned (deals with too many or too few slashes, cleans things
like "/../..", etc). Otherwise path() returns exactly the path
that was parsed or set.
@@ -1026,7 +1026,7 @@ TQString TQUrl::path( bool correct ) const
return d->path;
if ( d->cleanPathDirty ) {
- bool check = TRUE;
+ bool check = true;
if ( TQDir::isRelativePath( d->path ) ) {
d->cleanPath = d->path;
} else if ( isLocalFile() ) {
@@ -1037,10 +1037,10 @@ TQString TQUrl::path( bool correct ) const
d->cleanPath = d->path;
bool share = (d->cleanPath[0] == '\\' && d->cleanPath[1] == '\\') ||
(d->cleanPath[0] == '/' && d->cleanPath[1] == '/');
- slashify( d->cleanPath, FALSE );
+ slashify( d->cleanPath, false );
d->cleanPath = TQDir::cleanDirPath( d->cleanPath );
if ( share ) {
- check = FALSE;
+ check = false;
while (d->cleanPath.at(0) != '/' || d->cleanPath.at(1) != '/')
d->cleanPath.prepend("/");
}
@@ -1078,15 +1078,15 @@ TQString TQUrl::path( bool correct ) const
}
if ( check )
- slashify( d->cleanPath, FALSE );
- d->cleanPathDirty = FALSE;
+ slashify( d->cleanPath, false );
+ d->cleanPathDirty = false;
}
return d->cleanPath;
}
/*!
- Returns TRUE if the URL is a local file; otherwise returns FALSE.
+ Returns true if the URL is a local file; otherwise returns false.
*/
bool TQUrl::isLocalFile() const
@@ -1140,7 +1140,7 @@ void TQUrl::addPath( const TQString& pa )
else
d->path += p;
}
- d->cleanPathDirty = TRUE;
+ d->cleanPathDirty = true;
}
/*!
@@ -1264,8 +1264,8 @@ void TQUrl::decode( TQString& url )
/*!
Composes a string version of the URL and returns it. If \a
- encodedPath is TRUE the path in the returned string is encoded. If
- \a forcePrependProtocol is TRUE and \a encodedPath looks like a
+ encodedPath is true the path in the returned string is encoded. If
+ \a forcePrependProtocol is true and \a encodedPath looks like a
local filename, the "file:/" protocol is also prepended.
\sa encode() decode()
@@ -1338,8 +1338,8 @@ TQUrl::operator TQString() const
bool TQUrl::cdUp()
{
d->path += "/..";
- d->cleanPathDirty = TRUE;
- return TRUE;
+ d->cleanPathDirty = true;
+ return true;
}
#endif // TQT_NO_URL
diff --git a/src/kernel/tqurl.h b/src/kernel/tqurl.h
index 741719d44..e89d91e58 100644
--- a/src/kernel/tqurl.h
+++ b/src/kernel/tqurl.h
@@ -55,7 +55,7 @@ public:
TQUrl();
TQUrl( const TQString& url );
TQUrl( const TQUrl& url );
- TQUrl( const TQUrl& url, const TQString& relUrl, bool checkSlash = FALSE );
+ TQUrl( const TQUrl& url, const TQString& relUrl, bool checkSlash = false );
virtual ~TQUrl();
TQString protocol() const;
@@ -77,7 +77,7 @@ public:
virtual void setPort( int port );
bool hasPort() const;
- TQString path( bool correct = TRUE ) const;
+ TQString path( bool correct = true ) const;
virtual void setPath( const TQString& path );
bool hasPath() const;
@@ -110,7 +110,7 @@ public:
static void encode( TQString& url );
operator TQString() const;
- virtual TQString toString( bool encodedPath = FALSE, bool forcePrependProtocol = TRUE ) const;
+ virtual TQString toString( bool encodedPath = false, bool forcePrependProtocol = true ) const;
virtual bool cdUp();
diff --git a/src/kernel/tqurlinfo.cpp b/src/kernel/tqurlinfo.cpp
index 5f1c9e519..4beca83bf 100644
--- a/src/kernel/tqurlinfo.cpp
+++ b/src/kernel/tqurlinfo.cpp
@@ -52,12 +52,12 @@ public:
TQUrlInfoPrivate() :
permissions(0),
size(0),
- isDir(FALSE),
- isFile(TRUE),
- isSymLink(FALSE),
- isWritable(TRUE),
- isReadable(TRUE),
- isExecutable(FALSE)
+ isDir(false),
+ isFile(true),
+ isSymLink(false),
+ isWritable(true),
+ isReadable(true),
+ isExecutable(false)
{}
TQString name;
@@ -134,7 +134,7 @@ TQUrlInfo::TQUrlInfo()
file in the TQUrlOperator \a path.
If the information is not found, this constructor creates an
- invalid TQUrlInfo, i.e. isValid() returns FALSE. You should always
+ invalid TQUrlInfo, i.e. isValid() returns false. You should always
check if the URL info is valid before relying on the return values
of any getter functions.
@@ -260,8 +260,8 @@ void TQUrlInfo::setName( const TQString &name )
/*!
- If \a b is TRUE then the URL is set to be a directory; if \b is
- FALSE then the URL is set not to be a directory (which normally
+ If \a b is true then the URL is set to be a directory; if \b is
+ false then the URL is set not to be a directory (which normally
means it is a file). (Note that a URL can refer to both a file and
a directory even though most file systems do not support this.)
@@ -280,7 +280,7 @@ void TQUrlInfo::setDir( bool b )
/*!
- If \a b is TRUE then the URL is set to be a file; if \b is FALSE
+ If \a b is true then the URL is set to be a file; if \b is false
then the URL is set not to be a file (which normally means it is a
directory). (Note that a URL can refer to both a file and a
directory even though most file systems do not support this.)
@@ -300,8 +300,8 @@ void TQUrlInfo::setFile( bool b )
/*!
- Specifies that the URL refers to a symbolic link if \a b is TRUE
- and that it does not if \a b is FALSE.
+ Specifies that the URL refers to a symbolic link if \a b is true
+ and that it does not if \a b is false.
If you call this function for an invalid URL info, this function
turns it into a valid one.
@@ -318,8 +318,8 @@ void TQUrlInfo::setSymLink( bool b )
/*!
- Specifies that the URL is writable if \a b is TRUE and not
- writable if \a b is FALSE.
+ Specifies that the URL is writable if \a b is true and not
+ writable if \a b is false.
If you call this function for an invalid URL info, this function
turns it into a valid one.
@@ -336,8 +336,8 @@ void TQUrlInfo::setWritable( bool b )
/*!
- Specifies that the URL is readable if \a b is TRUE and not
- readable if \a b is FALSE.
+ Specifies that the URL is readable if \a b is true and not
+ readable if \a b is false.
If you call this function for an invalid URL info, this function
turns it into a valid one.
@@ -562,7 +562,7 @@ TQDateTime TQUrlInfo::lastRead() const
}
/*!
- Returns TRUE if the URL is a directory; otherwise returns FALSE.
+ Returns true if the URL is a directory; otherwise returns false.
\sa isValid()
*/
@@ -570,12 +570,12 @@ TQDateTime TQUrlInfo::lastRead() const
bool TQUrlInfo::isDir() const
{
if ( !d )
- return FALSE;
+ return false;
return d->isDir;
}
/*!
- Returns TRUE if the URL is a file; otherwise returns FALSE.
+ Returns true if the URL is a file; otherwise returns false.
\sa isValid()
*/
@@ -583,12 +583,12 @@ bool TQUrlInfo::isDir() const
bool TQUrlInfo::isFile() const
{
if ( !d )
- return FALSE;
+ return false;
return d->isFile;
}
/*!
- Returns TRUE if the URL is a symbolic link; otherwise returns FALSE.
+ Returns true if the URL is a symbolic link; otherwise returns false.
\sa isValid()
*/
@@ -596,12 +596,12 @@ bool TQUrlInfo::isFile() const
bool TQUrlInfo::isSymLink() const
{
if ( !d )
- return FALSE;
+ return false;
return d->isSymLink;
}
/*!
- Returns TRUE if the URL is writable; otherwise returns FALSE.
+ Returns true if the URL is writable; otherwise returns false.
\sa isValid()
*/
@@ -609,12 +609,12 @@ bool TQUrlInfo::isSymLink() const
bool TQUrlInfo::isWritable() const
{
if ( !d )
- return FALSE;
+ return false;
return d->isWritable;
}
/*!
- Returns TRUE if the URL is readable; otherwise returns FALSE.
+ Returns true if the URL is readable; otherwise returns false.
\sa isValid()
*/
@@ -622,12 +622,12 @@ bool TQUrlInfo::isWritable() const
bool TQUrlInfo::isReadable() const
{
if ( !d )
- return FALSE;
+ return false;
return d->isReadable;
}
/*!
- Returns TRUE if the URL is executable; otherwise returns FALSE.
+ Returns true if the URL is executable; otherwise returns false.
\sa isValid()
*/
@@ -635,13 +635,13 @@ bool TQUrlInfo::isReadable() const
bool TQUrlInfo::isExecutable() const
{
if ( !d )
- return FALSE;
+ return false;
return d->isExecutable;
}
/*!
- Returns TRUE if \a i1 is greater than \a i2; otherwise returns
- FALSE. The objects are compared by the value, which is specified
+ Returns true if \a i1 is greater than \a i2; otherwise returns
+ false. The objects are compared by the value, which is specified
by \a sortBy. This must be one of TQDir::Name, TQDir::Time or
TQDir::Size.
*/
@@ -657,12 +657,12 @@ bool TQUrlInfo::greaterThan( const TQUrlInfo &i1, const TQUrlInfo &i2,
case TQDir::Size:
return i1.size() > i2.size();
default:
- return FALSE;
+ return false;
}
}
/*!
- Returns TRUE if \a i1 is less than \a i2; otherwise returns FALSE.
+ Returns true if \a i1 is less than \a i2; otherwise returns false.
The objects are compared by the value, which is specified by \a
sortBy. This must be one of TQDir::Name, TQDir::Time or TQDir::Size.
*/
@@ -674,7 +674,7 @@ bool TQUrlInfo::lessThan( const TQUrlInfo &i1, const TQUrlInfo &i2,
}
/*!
- Returns TRUE if \a i1 equals to \a i2; otherwise returns FALSE.
+ Returns true if \a i1 equals to \a i2; otherwise returns false.
The objects are compared by the value, which is specified by \a
sortBy. This must be one of TQDir::Name, TQDir::Time or TQDir::Size.
*/
@@ -690,13 +690,13 @@ bool TQUrlInfo::equal( const TQUrlInfo &i1, const TQUrlInfo &i2,
case TQDir::Size:
return i1.size() == i2.size();
default:
- return FALSE;
+ return false;
}
}
/*!
- Compares this TQUrlInfo with \a i and returns TRUE if they are
- equal; otherwise returns FALSE.
+ Compares this TQUrlInfo with \a i and returns true if they are
+ equal; otherwise returns false.
*/
bool TQUrlInfo::operator==( const TQUrlInfo &i ) const
@@ -704,7 +704,7 @@ bool TQUrlInfo::operator==( const TQUrlInfo &i ) const
if ( !d )
return i.d == 0;
if ( !i.d )
- return FALSE;
+ return false;
return ( d->name == i.d->name &&
d->permissions == i.d->permissions &&
@@ -722,7 +722,7 @@ bool TQUrlInfo::operator==( const TQUrlInfo &i ) const
}
/*!
- Returns TRUE if the URL info is valid; otherwise returns FALSE.
+ Returns true if the URL info is valid; otherwise returns false.
Valid means that the TQUrlInfo contains real information. For
example, a call to TQUrlOperator::info() might return a an invalid
TQUrlInfo, if no information about the requested entry is
diff --git a/src/kernel/tqurloperator.cpp b/src/kernel/tqurloperator.cpp
index d8567e467..2cb656aa2 100644
--- a/src/kernel/tqurloperator.cpp
+++ b/src/kernel/tqurloperator.cpp
@@ -56,7 +56,7 @@ class TQUrlOperatorPrivate
public:
TQUrlOperatorPrivate()
{
- oldOps.setAutoDelete( FALSE );
+ oldOps.setAutoDelete( false );
networkProtocol = 0;
nameFilter = "*";
currPut = 0;
@@ -539,10 +539,10 @@ const TQNetworkOperation *TQUrlOperator::rename( const TQString &oldname, const
}
/*!
- Copies the file \a from to \a to. If \a move is TRUE, the file is
+ Copies the file \a from to \a to. If \a move is true, the file is
moved (copied and removed). \a from must point to a file and \a to
must point to a directory (into which \a from is copied) unless \a
- toPath is set to FALSE. If \a toPath is set to FALSE then the \a
+ toPath is set to false. If \a toPath is set to false then the \a
to variable is assumed to be the absolute file path (destination
file path + file name). The copying is done using the get() and
put() operations. If you want to be notified about the progress of
@@ -574,7 +574,7 @@ TQPtrList<TQNetworkOperation> TQUrlOperator::copy( const TQString &from, const T
#endif
TQPtrList<TQNetworkOperation> ops;
- ops.setAutoDelete( FALSE );
+ ops.setAutoDelete( false );
TQUrlOperator *uFrom = new TQUrlOperator( *this, from );
TQUrlOperator *uTo = new TQUrlOperator( to );
@@ -635,13 +635,13 @@ TQPtrList<TQNetworkOperation> TQUrlOperator::copy( const TQString &from, const T
d->getOpPutOpMap.insert( (void*)opGet, opPut );
if ( move && (gProt->supportedOperations()&TQNetworkProtocol::OpRemove) ) {
- gProt->setAutoDelete( FALSE );
+ gProt->setAutoDelete( false );
TQNetworkOperation *opRm = new TQNetworkOperation( TQNetworkProtocol::OpRemove, frm, TQString::null, TQString::null );
ops.append( opRm );
d->getOpRemoveOpMap.insert( (void*)opGet, opRm );
} else {
- gProt->setAutoDelete( TRUE );
+ gProt->setAutoDelete( true );
}
#ifdef TQURLOPERATOR_DEBUG
tqDebug( "TQUrlOperator: copy operation should start now..." );
@@ -674,7 +674,7 @@ TQPtrList<TQNetworkOperation> TQUrlOperator::copy( const TQString &from, const T
/*!
\overload
- Copies the \a files to the directory \a dest. If \a move is TRUE
+ Copies the \a files to the directory \a dest. If \a move is true
the files are moved, not copied. \a dest must point to a
directory.
@@ -695,22 +695,22 @@ void TQUrlOperator::copy( const TQStringList &files, const TQString &dest,
}
/*!
- Returns TRUE if the URL is a directory; otherwise returns FALSE.
+ Returns true if the URL is a directory; otherwise returns false.
This may not always work correctly, if the protocol of the URL is
something other than file (local filesystem). If you pass a bool
- pointer as the \a ok argument, \a *ok is set to TRUE if the result
- of this function is known to be correct, and to FALSE otherwise.
+ pointer as the \a ok argument, \a *ok is set to true if the result
+ of this function is known to be correct, and to false otherwise.
*/
bool TQUrlOperator::isDir( bool *ok )
{
if ( ok )
- *ok = TRUE;
+ *ok = true;
if ( isLocalFile() ) {
if ( TQFileInfo( path() ).isDir() )
- return TRUE;
+ return true;
else
- return FALSE;
+ return false;
}
if ( d->entryMap.contains( "." ) ) {
@@ -718,8 +718,8 @@ bool TQUrlOperator::isDir( bool *ok )
}
// #### can assume that we are a directory?
if ( ok )
- *ok = FALSE;
- return TRUE;
+ *ok = false;
+ return true;
}
/*!
@@ -907,14 +907,14 @@ TQUrlInfo TQUrlOperator::info( const TQString &entry ) const
// return a faked TQUrlInfo
TQUrlInfo inf;
inf.setName( entry );
- inf.setDir( TRUE );
- inf.setFile( FALSE );
- inf.setSymLink( FALSE );
+ inf.setDir( true );
+ inf.setFile( false );
+ inf.setSymLink( false );
inf.setOwner( tr( "(unknown)" ) );
inf.setGroup( tr( "(unknown)" ) );
inf.setSize( 0 );
- inf.setWritable( FALSE );
- inf.setReadable( TRUE );
+ inf.setWritable( false );
+ inf.setReadable( true );
return inf;
}
return TQUrlInfo();
@@ -1005,7 +1005,7 @@ TQUrlOperator& TQUrlOperator::operator=( const TQUrlOperator &url )
*d = *url.d;
- d->oldOps.setAutoDelete( FALSE );
+ d->oldOps.setAutoDelete( false );
d->getOpPutOpMap = getOpPutOpMap;
d->getOpPutProtMap = getOpPutProtMap;
d->getOpGetProtMap = getOpGetProtMap;
@@ -1024,7 +1024,7 @@ TQUrlOperator& TQUrlOperator::operator=( const TQString &url )
{
deleteNetworkProtocol();
TQUrl::operator=( url );
- d->oldOps.setAutoDelete( FALSE );
+ d->oldOps.setAutoDelete( false );
getNetworkProtocol();
return *this;
}
@@ -1050,9 +1050,9 @@ bool TQUrlOperator::checkValid()
// ######
if ( !isValid() ) {
//emit error( ErrValid, tr( "The entered URL is not valid!" ) );
- return FALSE;
+ return false;
} else
- return TRUE;
+ return true;
}
@@ -1102,7 +1102,7 @@ void TQUrlOperator::continueCopy( TQNetworkOperation *op )
d->getOpPutProtMap.take( op );
d->getOpRemoveOpMap.take( op );
if ( pProt )
- pProt->setAutoDelete( TRUE );
+ pProt->setAutoDelete( true );
if ( put && pProt ) {
if ( op->state() != TQNetworkProtocol::StFailed ) {
pProt->addOperation( put );
@@ -1112,7 +1112,7 @@ void TQUrlOperator::continueCopy( TQNetworkOperation *op )
}
}
if ( gProt ) {
- gProt->setAutoDelete( TRUE );
+ gProt->setAutoDelete( true );
}
if ( rm && gProt ) {
if ( op->state() != TQNetworkProtocol::StFailed ) {
@@ -1155,8 +1155,8 @@ void TQUrlOperator::stop()
{
d->getOpPutOpMap.clear();
d->getOpRemoveOpMap.clear();
- d->getOpGetProtMap.setAutoDelete( TRUE );
- d->getOpPutProtMap.setAutoDelete( TRUE );
+ d->getOpGetProtMap.setAutoDelete( true );
+ d->getOpPutProtMap.setAutoDelete( true );
TQPtrDictIterator<TQNetworkProtocol> it( d->getOpPutProtMap );
for ( ; it.current(); ++it )
it.current()->stop();
diff --git a/src/kernel/tqurloperator.h b/src/kernel/tqurloperator.h
index bad14db39..0099885fb 100644
--- a/src/kernel/tqurloperator.h
+++ b/src/kernel/tqurloperator.h
@@ -64,7 +64,7 @@ public:
TQUrlOperator();
TQUrlOperator( const TQString &urL );
TQUrlOperator( const TQUrlOperator& url );
- TQUrlOperator( const TQUrlOperator& url, const TQString& relUrl, bool checkSlash = FALSE );
+ TQUrlOperator( const TQUrlOperator& url, const TQString& relUrl, bool checkSlash = false );
virtual ~TQUrlOperator();
virtual void setPath( const TQString& path );
@@ -76,8 +76,8 @@ public:
virtual const TQNetworkOperation *rename( const TQString &oldname, const TQString &newname );
virtual const TQNetworkOperation *get( const TQString &location = TQString::null );
virtual const TQNetworkOperation *put( const TQByteArray &data, const TQString &location = TQString::null );
- virtual TQPtrList<TQNetworkOperation> copy( const TQString &from, const TQString &to, bool move = FALSE, bool toPath = TRUE );
- virtual void copy( const TQStringList &files, const TQString &dest, bool move = FALSE );
+ virtual TQPtrList<TQNetworkOperation> copy( const TQString &from, const TQString &to, bool move = false, bool toPath = true );
+ virtual void copy( const TQStringList &files, const TQString &dest, bool move = false );
virtual bool isDir( bool *ok = 0 );
virtual void setNameFilter( const TQString &nameFilter );
diff --git a/src/kernel/tqvariant.cpp b/src/kernel/tqvariant.cpp
index 71175edac..af0e3183b 100644
--- a/src/kernel/tqvariant.cpp
+++ b/src/kernel/tqvariant.cpp
@@ -93,7 +93,7 @@ TQVariant::Private::Private()
qv_count++;
#endif
typ = TQVariant::Invalid;
- is_null = TRUE;
+ is_null = true;
}
TQVariant::Private::Private( Private* d )
@@ -350,7 +350,7 @@ void TQVariant::Private::clear()
}
typ = TQVariant::Invalid;
- is_null = TRUE;
+ is_null = true;
}
/*!
@@ -426,7 +426,7 @@ void TQVariant::Private::clear()
\code
TQVariant x, y( TQString() ), z( TQString("") );
x.asInt();
- // x.isNull() == TRUE, y.isNull() == TRUE, z.isNull() == FALSE
+ // x.isNull() == true, y.isNull() == true, z.isNull() == false
\endcode
See the \link collection.html Collection Classes\endlink.
@@ -571,7 +571,7 @@ TQVariant::TQVariant( const TQStringList& val )
d = new Private;
d->typ = StringList;
d->value.ptr = new TQStringList( val );
- d->is_null = FALSE;
+ d->is_null = false;
}
#endif // TQT_NO_STRINGLIST
@@ -584,7 +584,7 @@ TQVariant::TQVariant( const TQMap<TQString,TQVariant>& val )
d = new Private;
d->typ = Map;
d->value.ptr = new TQMap<TQString,TQVariant>( val );
- d->is_null = FALSE;
+ d->is_null = false;
}
#endif
/*!
@@ -595,7 +595,7 @@ TQVariant::TQVariant( const TQFont& val )
d = new Private;
d->typ = Font;
d->value.ptr = new TQFont( val );
- d->is_null = FALSE;
+ d->is_null = false;
}
/*!
@@ -631,7 +631,7 @@ TQVariant::TQVariant( const TQBrush& val )
d = new Private;
d->typ = Brush;
d->value.ptr = new TQBrush( val );
- d->is_null = FALSE;
+ d->is_null = false;
}
/*!
@@ -672,7 +672,7 @@ TQVariant::TQVariant( const TQColor& val )
d = new Private;
d->typ = Color;
d->value.ptr = new TQColor( val );
- d->is_null = FALSE;
+ d->is_null = false;
}
#ifndef TQT_NO_PALETTE
@@ -684,7 +684,7 @@ TQVariant::TQVariant( const TQPalette& val )
d = new Private;
d->typ = Palette;
d->value.ptr = new TQPalette( val );
- d->is_null = FALSE;
+ d->is_null = false;
}
/*!
@@ -695,7 +695,7 @@ TQVariant::TQVariant( const TQColorGroup& val )
d = new Private;
d->typ = ColorGroup;
d->value.ptr = new TQColorGroup( val );
- d->is_null = FALSE;
+ d->is_null = false;
}
#endif //TQT_NO_PALETTE
#ifndef TQT_NO_ICONSET
@@ -739,7 +739,7 @@ TQVariant::TQVariant( const TQCursor& val )
d = new Private;
d->typ = Cursor;
d->value.ptr = new TQCursor( val );
- d->is_null = FALSE;
+ d->is_null = false;
}
/*!
@@ -816,7 +816,7 @@ TQVariant::TQVariant( const TQKeySequence& val )
d = new Private;
d->typ = KeySequence;
d->value.ptr = new TQKeySequence( val );
- d->is_null = FALSE;
+ d->is_null = false;
}
#endif
@@ -839,7 +839,7 @@ TQVariant::TQVariant( int val )
d = new Private;
d->typ = Int;
d->value.i = val;
- d->is_null = FALSE;
+ d->is_null = false;
}
/*!
@@ -850,7 +850,7 @@ TQVariant::TQVariant( uint val )
d = new Private;
d->typ = UInt;
d->value.u = val;
- d->is_null = FALSE;
+ d->is_null = false;
}
/*!
@@ -861,7 +861,7 @@ TQVariant::TQVariant( TQ_LLONG val )
d = new Private;
d->typ = LongLong;
d->value.ll = val;
- d->is_null = FALSE;
+ d->is_null = false;
}
/*!
@@ -873,7 +873,7 @@ TQVariant::TQVariant( TQ_ULLONG val )
d = new Private;
d->typ = ULongLong;
d->value.ull = val;
- d->is_null = FALSE;
+ d->is_null = false;
}
/*!
@@ -884,7 +884,7 @@ TQVariant::TQVariant( bool val )
d = new Private;
d->typ = Bool;
d->value.b = val;
- d->is_null = FALSE;
+ d->is_null = false;
}
@@ -896,7 +896,7 @@ TQVariant::TQVariant( double val )
d = new Private;
d->typ = Double;
d->value.d = val;
- d->is_null = FALSE;
+ d->is_null = false;
}
#ifndef TQT_NO_TEMPLATE_VARIANT
@@ -908,7 +908,7 @@ TQVariant::TQVariant( const TQValueList<TQVariant>& val )
d = new Private;
d->typ = List;
d->value.ptr = new TQValueList<TQVariant>( val );
- d->is_null = FALSE;
+ d->is_null = false;
}
#endif
@@ -920,7 +920,7 @@ TQVariant::TQVariant( TQSizePolicy val )
d = new Private;
d->typ = SizePolicy;
d->value.ptr = new TQSizePolicy( val );
- d->is_null = FALSE;
+ d->is_null = false;
}
/*!
@@ -1079,7 +1079,7 @@ void TQVariant::load( TQDataStream& s )
TQString x;
s >> x;
d->typ = t;
- d->is_null = TRUE;
+ d->is_null = true;
}
break;
#ifndef TQT_NO_TEMPLATE_VARIANT
@@ -1088,7 +1088,7 @@ void TQVariant::load( TQDataStream& s )
TQMap<TQString,TQVariant>* x = new TQMap<TQString,TQVariant>;
s >> *x;
d->value.ptr = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
case List:
@@ -1096,7 +1096,7 @@ void TQVariant::load( TQDataStream& s )
TQValueList<TQVariant>* x = new TQValueList<TQVariant>;
s >> *x;
d->value.ptr = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
#endif
@@ -1106,7 +1106,7 @@ void TQVariant::load( TQDataStream& s )
TQCursor* x = new TQCursor;
s >> *x;
d->value.ptr = x;
- d->is_null = FALSE;
+ d->is_null = false;
#endif
}
break;
@@ -1153,7 +1153,7 @@ void TQVariant::load( TQDataStream& s )
TQStringList* x = new TQStringList;
s >> *x;
d->value.ptr = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
#endif // TQT_NO_STRINGLIST
@@ -1162,7 +1162,7 @@ void TQVariant::load( TQDataStream& s )
TQFont* x = new TQFont;
s >> *x;
d->value.ptr = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
case Pixmap:
@@ -1188,7 +1188,7 @@ void TQVariant::load( TQDataStream& s )
TQBrush* x = new TQBrush;
s >> *x;
d->value.ptr = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
case Rect:
@@ -1217,7 +1217,7 @@ void TQVariant::load( TQDataStream& s )
TQColor* x = new TQColor;
s >> *x;
d->value.ptr = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
#ifndef TQT_NO_PALETTE
@@ -1226,7 +1226,7 @@ void TQVariant::load( TQDataStream& s )
TQPalette* x = new TQPalette;
s >> *x;
d->value.ptr = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
case ColorGroup:
@@ -1234,7 +1234,7 @@ void TQVariant::load( TQDataStream& s )
TQColorGroup* x = new TQColorGroup;
s >> *x;
d->value.ptr = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
#endif
@@ -1252,7 +1252,7 @@ void TQVariant::load( TQDataStream& s )
int x;
s >> x;
d->value.i = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
case UInt:
@@ -1260,7 +1260,7 @@ void TQVariant::load( TQDataStream& s )
uint x;
s >> x;
d->value.u = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
case LongLong:
@@ -1282,7 +1282,7 @@ void TQVariant::load( TQDataStream& s )
TQ_INT8 x;
s >> x;
d->value.b = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
case Double:
@@ -1290,7 +1290,7 @@ void TQVariant::load( TQDataStream& s )
double x;
s >> x;
d->value.d = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
case SizePolicy:
@@ -1301,7 +1301,7 @@ void TQVariant::load( TQDataStream& s )
d->value.ptr = new TQSizePolicy( (TQSizePolicy::SizeType)h,
(TQSizePolicy::SizeType)v,
(bool) hfw);
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
case Date:
@@ -1345,7 +1345,7 @@ void TQVariant::load( TQDataStream& s )
TQKeySequence* x = new TQKeySequence;
s >> *x;
d->value.ptr = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
#endif // TQT_NO_ACCEL
@@ -1354,7 +1354,7 @@ void TQVariant::load( TQDataStream& s )
TQPen* x = new TQPen;
s >> *x;
d->value.ptr = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
}
@@ -1560,8 +1560,8 @@ TQDataStream& operator<< ( TQDataStream& s, const TQVariant::Type p )
/*!
\fn bool TQVariant::isValid() const
- Returns TRUE if the storage type of this variant is not
- TQVariant::Invalid; otherwise returns FALSE.
+ Returns true if the storage type of this variant is not
+ TQVariant::Invalid; otherwise returns false.
*/
/*!
@@ -2162,8 +2162,8 @@ const TQPen TQVariant::toPen() const
Returns the variant as an int if the variant can be cast to Int;
otherwise returns 0.
- If \a ok is non-null: \a *ok is set to TRUE if the value could be
- converted to an int; otherwise \a *ok is set to FALSE.
+ If \a ok is non-null: \a *ok is set to true if the value could be
+ converted to an int; otherwise \a *ok is set to false.
\sa asInt(), canCast()
*/
@@ -2203,8 +2203,8 @@ int TQVariant::toInt( bool * ok ) const
Returns the variant as an unsigned int if the variant can be cast
to UInt; otherwise returns 0.
- If \a ok is non-null: \a *ok is set to TRUE if the value could be
- converted to an unsigned int; otherwise \a *ok is set to FALSE.
+ If \a ok is non-null: \a *ok is set to true if the value could be
+ converted to an unsigned int; otherwise \a *ok is set to false.
\sa asUInt(), canCast()
*/
@@ -2240,8 +2240,8 @@ uint TQVariant::toUInt( bool * ok ) const
Returns the variant as a long long int if the variant can be cast
to LongLong; otherwise returns 0.
- If \a ok is non-null: \a *ok is set to TRUE if the value could be
- converted to an int; otherwise \a *ok is set to FALSE.
+ If \a ok is non-null: \a *ok is set to true if the value could be
+ converted to an int; otherwise \a *ok is set to false.
\sa asLongLong(), canCast()
*/
@@ -2277,8 +2277,8 @@ TQ_LLONG TQVariant::toLongLong( bool * ok ) const
Returns the variant as as an unsigned long long int if the variant
can be cast to ULongLong; otherwise returns 0.
- If \a ok is non-null: \a *ok is set to TRUE if the value could be
- converted to an int; otherwise \a *ok is set to FALSE.
+ If \a ok is non-null: \a *ok is set to true if the value could be
+ converted to an int; otherwise \a *ok is set to false.
\sa asULongLong(), canCast()
*/
@@ -2312,12 +2312,12 @@ TQ_ULLONG TQVariant::toULongLong( bool * ok ) const
/*!
Returns the variant as a bool if the variant can be cast to Bool;
- otherWise returns FALSE.
+ otherWise returns false.
- Returns TRUE if the variant has a numeric type and its value is
+ Returns true if the variant has a numeric type and its value is
non-zero, or if the variant has type String, ByteArray or CString
and its lower-case content is not empty, "0" or "false"; otherwise
- returns FALSE.
+ returns false.
\sa asBool(), canCast()
*/
@@ -2344,7 +2344,7 @@ bool TQVariant::toBool() const
return !(str == "0" || str == "false" || str.isEmpty() );
}
default:
- return FALSE;
+ return false;
}
}
@@ -2352,8 +2352,8 @@ bool TQVariant::toBool() const
Returns the variant as a double if the variant can be cast to
Double; otherwise returns 0.0.
- If \a ok is non-null: \a *ok is set to TRUE if the value could be
- converted to a double; otherwise \a *ok is set to FALSE.
+ If \a ok is non-null: \a *ok is set to true if the value could be
+ converted to a double; otherwise \a *ok is set to false.
\sa asDouble(), canCast()
*/
@@ -2935,7 +2935,7 @@ TQMap<TQString, TQVariant>& TQVariant::asMap()
#endif
/*!
- Returns TRUE if the variant's type can be cast to the requested
+ Returns true if the variant's type can be cast to the requested
type, \a t. Such casting is done automatically when calling the
toInt(), toBool(), ... or asInt(), asBool(), ... methods.
@@ -2966,7 +2966,7 @@ TQMap<TQString, TQVariant>& TQVariant::asMap()
bool TQVariant::canCast( Type t ) const
{
if ( Type( d->typ ) == t )
- return TRUE;
+ return true;
switch ( t ) {
case Bool:
@@ -2988,7 +2988,7 @@ bool TQVariant::canCast( Type t ) const
case String:
case UInt:
case ULongLong:
- return TRUE;
+ return true;
default: break;
}
break;
@@ -3012,7 +3012,7 @@ bool TQVariant::canCast( Type t ) const
case Time:
case UInt:
case ULongLong:
- return TRUE;
+ return true;
default: break;
}
break;
@@ -3028,7 +3028,7 @@ bool TQVariant::canCast( Type t ) const
case Date:
case DateTime:
case String:
- return TRUE;
+ return true;
default: break;
}
break;
@@ -3043,7 +3043,7 @@ bool TQVariant::canCast( Type t ) const
case ULongLong:
case Double:
case String:
- return TRUE;
+ return true;
default: break;
}
break;
@@ -3054,7 +3054,7 @@ bool TQVariant::canCast( Type t ) const
case ByteArray:
case CString:
case String:
- return TRUE;
+ return true;
default: break;
}
break;
@@ -3070,9 +3070,9 @@ bool TQVariant::canCast( Type t ) const
TQValueList<TQVariant>::ConstIterator end = listEnd();
for( ; it != end; ++it ) {
if ( !(*it).canCast( String ) )
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
#endif
case Invalid:
@@ -3095,7 +3095,7 @@ bool TQVariant::canCast( Type t ) const
case Pen:
break;
}
- return FALSE;
+ return false;
}
/*!
@@ -3103,8 +3103,8 @@ bool TQVariant::canCast( Type t ) const
done, the variant is set to the default value of the requested
type (e.g. an empty string if the requested type \a t is
TQVariant::String, an empty point array if the requested type \a t
- is TQVariant::PointArray, etc). Returns TRUE if the current type of
- the variant was successfully cast; otherwise returns FALSE.
+ is TQVariant::PointArray, etc). Returns true if the current type of
+ the variant was successfully cast; otherwise returns false.
\sa canCast()
*/
@@ -3232,8 +3232,8 @@ bool TQVariant::cast( Type t )
}
/*!
- Compares this TQVariant with \a v and returns TRUE if they are
- equal; otherwise returns FALSE.
+ Compares this TQVariant with \a v and returns true if they are
+ equal; otherwise returns false.
*/
bool TQVariant::operator==( const TQVariant &v ) const
@@ -3273,12 +3273,12 @@ bool TQVariant::operator==( const TQVariant &v ) const
}
default:
- Q_ASSERT(FALSE);
+ Q_ASSERT(false);
}
}
if (!v.canCast(d->typ)) {
- return FALSE;
+ return false;
}
switch( d->typ ) {
@@ -3297,16 +3297,16 @@ bool TQVariant::operator==( const TQVariant &v ) const
return v.toList() == toList();
case Map: {
if ( v.toMap().count() != toMap().count() )
- return FALSE;
+ return false;
TQMap<TQString, TQVariant>::ConstIterator it = v.toMap().begin();
TQMap<TQString, TQVariant>::ConstIterator it2 = toMap().begin();
while ( it != v.toMap().end() ) {
if ( *it != *it2 )
- return FALSE;
+ return false;
++it;
++it2;
}
- return TRUE;
+ return true;
}
#endif
case String:
@@ -3377,12 +3377,12 @@ bool TQVariant::operator==( const TQVariant &v ) const
case Invalid:
break;
}
- return FALSE;
+ return false;
}
/*!
- Compares this TQVariant with \a v and returns TRUE if they are not
- equal; otherwise returns FALSE.
+ Compares this TQVariant with \a v and returns true if they are not
+ equal; otherwise returns false.
*/
bool TQVariant::operator!=( const TQVariant &v ) const
@@ -3401,7 +3401,7 @@ void* TQVariant::rawAccess( void* ptr, Type typ, bool deepCopy )
clear();
d->typ = typ;
d->value.ptr = ptr;
- d->is_null = FALSE;
+ d->is_null = false;
if ( deepCopy ) {
TQVariant::Private* p = new Private( d );
d->typ = Invalid;
@@ -3420,7 +3420,7 @@ void* TQVariant::rawAccess( void* ptr, Type typ, bool deepCopy )
}
/*!
- Returns TRUE if this is a NULL variant, FALSE otherwise.
+ Returns true if this is a NULL variant, false otherwise.
*/
bool TQVariant::isNull() const
{
diff --git a/src/kernel/tqvariant.h b/src/kernel/tqvariant.h
index 2a6eeec19..ad753a8c8 100644
--- a/src/kernel/tqvariant.h
+++ b/src/kernel/tqvariant.h
@@ -320,7 +320,7 @@ private:
Private* d;
public:
- void* rawAccess( void* ptr = 0, Type typ = Invalid, bool deepCopy = FALSE );
+ void* rawAccess( void* ptr = 0, Type typ = Invalid, bool deepCopy = false );
};
inline TQVariant::Type TQVariant::type() const
diff --git a/src/kernel/tqwidget.cpp b/src/kernel/tqwidget.cpp
index ac56e302a..a4b4ca218 100644
--- a/src/kernel/tqwidget.cpp
+++ b/src/kernel/tqwidget.cpp
@@ -377,7 +377,7 @@
\i mouseMoveEvent() - called whenever the mouse moves while a
button is held down. This is useful for, for example, dragging. If
- you call setMouseTracking(TRUE), you get mouse move events even
+ you call setMouseTracking(true), you get mouse move events even
when no buttons are held down. (Note that applications which make
use of mouse tracking are often not very useful on low-bandwidth X
connections.) (See also the \link dnd.html drag and drop\endlink
@@ -894,7 +894,7 @@ TQWidget::TQWidget( TQWidget *parent, const char *name, WFlags f, NFlags n )
fstrut_dirty = 1;
- isWidget = TRUE; // is a widget
+ isWidget = true; // is a widget
winid = 0; // default attributes
widget_state = 0;
widget_flags = f;
@@ -904,7 +904,7 @@ TQWidget::TQWidget( TQWidget *parent, const char *name, WFlags f, NFlags n )
own_palette = 0;
sizehint_forced = 0;
is_closing = 0;
- im_enabled = FALSE;
+ im_enabled = false;
#ifndef TQT_NO_LAYOUT
lay_out = 0;
#endif
@@ -931,7 +931,7 @@ TQWidget::TQWidget( TQWidget *parent, const char *name, WFlags f, NFlags n )
crect.size()) );
if ( isTopLevel() ) {
setWState( WState_ForceHide | WState_CreatedHidden );
- TQFocusData *fd = focusData( TRUE );
+ TQFocusData *fd = focusData( true );
if ( fd->focusWidgets.findRef(this) < 0 )
fd->focusWidgets.append( this );
} else {
@@ -961,7 +961,7 @@ TQWidget::~TQWidget()
#endif
// Remove myself and all children from the can-take-focus list
- TQFocusData *f = focusData( FALSE );
+ TQFocusData *f = focusData( false );
if ( f ) {
TQPtrListIterator<TQWidget> it(f->focusWidgets);
TQWidget *w;
@@ -1045,7 +1045,7 @@ void TQWidget::destroyMapper()
while ( (w=it.current()) ) { // remove parents widgets
++it;
if ( !w->parentObj ) // widget is a parent
- w->destroy( TRUE, TRUE );
+ w->destroy( true, true );
}
delete myMapper;
}
@@ -1075,7 +1075,7 @@ static TQWidgetList *wListInternal( TQWidgetMapper *mapper, bool onlyTopLevel )
TQWidgetList *TQWidget::wList()
{
- return wListInternal( mapper, FALSE );
+ return wListInternal( mapper, false );
}
/*!
@@ -1086,7 +1086,7 @@ TQWidgetList *TQWidget::wList()
TQWidgetList *TQWidget::tlwList()
{
- return wListInternal( mapper, TRUE );
+ return wListInternal( mapper, true );
}
@@ -1545,7 +1545,7 @@ uint TQWidget::windowState() const
combination of TQt::WindowState: \c WindowMinimized, \c
WindowMaximized, \c WindowFullScreen and \c WindowActive.
- If the window is not visible (i.e. isVisible() returns FALSE), the
+ If the window is not visible (i.e. isVisible() returns false), the
window state will take effect when show() is called. For visible
windows, the change is immediate. For example, to toggle between
full-screen and mormal mode, use the following code:
@@ -1659,8 +1659,8 @@ void TQWidget::showNormal()
}
/*!
- Returns TRUE if this widget would become enabled if \a ancestor is
- enabled; otherwise returns FALSE.
+ Returns true if this widget would become enabled if \a ancestor is
+ enabled; otherwise returns false.
This is the case if neither the widget itself nor every parent up
to but excluding \a ancestor has been explicitly disabled.
@@ -1731,7 +1731,7 @@ void TQWidget::setEnabled( bool enable )
++it;
if ( w->isWidgetType() &&
!w->testWState( WState_ForceDisabled ) )
- w->setEnabled( TRUE );
+ w->setEnabled( true );
}
}
}
@@ -1739,7 +1739,7 @@ void TQWidget::setEnabled( bool enable )
if ( !testWState(WState_Disabled) ) {
if (focusWidget() == this) {
bool parentIsEnabled = (!parentWidget() || parentWidget()->isEnabled());
- if (!parentIsEnabled || !focusNextPrevChild(TRUE))
+ if (!parentIsEnabled || !focusNextPrevChild(true))
clearFocus();
}
setWState( WState_Disabled );
@@ -1751,7 +1751,7 @@ void TQWidget::setEnabled( bool enable )
while( (w = (TQWidget *)it.current()) != 0 ) {
++it;
if ( w->isWidgetType() && w->isEnabled() ) {
- w->setEnabled( FALSE );
+ w->setEnabled( false );
w->clearWState( WState_ForceDisabled );
}
}
@@ -1773,7 +1773,7 @@ void TQWidget::setEnabled( bool enable )
}
/*!
- Disables widget input events if \a disable is TRUE; otherwise
+ Disables widget input events if \a disable is true; otherwise
enables input events.
See the \l enabled documentation for more information.
@@ -2906,7 +2906,7 @@ const TQColorGroup &TQWidget::colorGroup() const
#ifndef TQT_NO_PALETTE
void TQWidget::setPalette( const TQPalette &palette )
{
- own_palette = TRUE;
+ own_palette = true;
if ( pal == palette )
return;
TQPalette old = pal;
@@ -2932,7 +2932,7 @@ void TQWidget::unsetPalette()
{
// reset the palette
setPalette( qt_naturalWidgetPalette( this ) );
- own_palette = FALSE;
+ own_palette = false;
}
/*!
@@ -2985,7 +2985,7 @@ void TQWidget::paletteChange( const TQPalette & )
*/
void TQWidget::setFont( const TQFont &font )
{
- own_font = TRUE;
+ own_font = true;
if ( fnt == font && fnt.d->mask == font.d->mask )
return;
TQFont old = fnt;
@@ -3013,7 +3013,7 @@ void TQWidget::unsetFont()
{
// reset the font
setFont( qt_naturalWidgetFont( this ) );
- own_font = FALSE;
+ own_font = false;
}
/*!
@@ -3286,7 +3286,7 @@ void TQWidget::setFocus()
return;
}
- TQFocusData * f = focusData( TRUE );
+ TQFocusData * f = focusData( true );
if ( f->it.current() == this && tqApp->focusWidget() == this
#if defined(TQ_WS_WIN)
&& GetFocus() == winId()
@@ -3409,11 +3409,11 @@ void TQWidget::clearFocus()
/*!
Finds a new widget to give the keyboard focus to, as appropriate
- for Tab and Shift+Tab, and returns TRUE if is can find a new
- widget and FALSE if it can't,
+ for Tab and Shift+Tab, and returns true if is can find a new
+ widget and false if it can't,
- If \a next is TRUE, this function searches "forwards", if \a next
- is FALSE, it searches "backwards".
+ If \a next is true, this function searches "forwards", if \a next
+ is false, it searches "backwards".
Sometimes, you will want to reimplement this function. For
example, a web browser might reimplement it to move its "current
@@ -3441,7 +3441,7 @@ bool TQWidget::focusNextPrevChild( bool next )
if ( !isTopLevel() && p )
return p->focusNextPrevChild(next);
- TQFocusData *f = focusData( TRUE );
+ TQFocusData *f = focusData( true );
TQWidget *startingPoint = f->it.current();
TQWidget *candidate = 0;
@@ -3457,10 +3457,10 @@ bool TQWidget::focusNextPrevChild( bool next )
} while( w && !(candidate && w==startingPoint) );
if ( !candidate )
- return FALSE;
+ return false;
candidate->setFocus();
- return TRUE;
+ return true;
}
/*!
@@ -3472,7 +3472,7 @@ bool TQWidget::focusNextPrevChild( bool next )
TQWidget *TQWidget::focusWidget() const
{
TQWidget *that = (TQWidget *)this; // mutable
- TQFocusData *f = that->focusData( FALSE );
+ TQFocusData *f = that->focusData( false );
if ( f && f->focusWidgets.count() && f->it.current() == 0 )
f->it.toFirst();
return ( f && f->it.current() ) ? f->it.current() : 0;
@@ -3492,14 +3492,14 @@ TQWidget *TQWidget::focusWidget() const
*/
TQFocusData * TQWidget::focusData()
{
- return focusData( TRUE );
+ return focusData( true );
}
/*!
\internal
Internal function which lets us ask for the focus data, creating
- it if it doesn't exist and \a create is TRUE.
+ it if it doesn't exist and \a create is true.
*/
TQFocusData * TQWidget::focusData( bool create )
{
@@ -3524,7 +3524,7 @@ TQFocusData * TQWidget::focusData( bool create )
Most Widgets (as eg. buttons) that do not handle text input should have
the input method disabled if they have focus. This is the default.
- If a widget handles text input it should set this property to TRUE.
+ If a widget handles text input it should set this property to true.
*/
void TQWidget::setInputMethodEnabled( bool b )
@@ -3537,8 +3537,8 @@ void TQWidget::setInputMethodEnabled( bool b )
/*!
- Enables key event compression, if \a compress is TRUE, and
- disables it if \a compress is FALSE.
+ Enables key event compression, if \a compress is true, and
+ disables it if \a compress is false.
Key compression is off by default (except for TQLineEdit and
TQTextEdit), so widgets receive one key press event for each key
@@ -3581,7 +3581,7 @@ void TQWidget::setKeyCompression(bool compress)
The active window is the window that contains the widget
that has keyboard focus.
- When popup windows are visible, this property is TRUE for both the
+ When popup windows are visible, this property is true for both the
active window \e and for the popup.
\sa setActiveWindow(), TQApplication::activeWindow()
@@ -3592,7 +3592,7 @@ bool TQWidget::isActiveWindow() const
if(testWFlags(WSubWindow) && parentWidget())
tlw = parentWidget()->topLevelWidget();
if(tlw == tqApp->activeWindow() || ( isVisible() && tlw->isPopup() ))
- return TRUE;
+ return true;
#ifndef TQT_NO_STYLE
const_cast<TQWidget*>(this)->createExtra();
if (!extra->m_ceData) {
@@ -3606,16 +3606,16 @@ bool TQWidget::isActiveWindow() const
if((tlw->isDialog() || (tlw->testWFlags(TQt::WStyle_Tool) && !tlw->isPopup())) &&
!tlw->testWFlags(TQt::WShowModal) &&
(!tlw->parentWidget() || tlw->parentWidget()->isActiveWindow()))
- return TRUE;
+ return true;
TQWidget *w = tqApp->activeWindow();
if( !testWFlags(WSubWindow) && w && w->testWFlags(WSubWindow) &&
w->parentWidget()->topLevelWidget() == tlw)
- return TRUE;
+ return true;
while(w && (tlw->isDialog() || tlw->testWFlags(TQt::WStyle_Tool)) &&
!w->testWFlags(TQt::WShowModal) && w->parentWidget()) {
w = w->parentWidget()->topLevelWidget();
if( w == tlw )
- return TRUE;
+ return true;
}
}
#endif
@@ -3625,11 +3625,11 @@ bool TQWidget::isActiveWindow() const
while ( parent ) {
parent = ::GetParent( parent );
if ( parent && parent == topparent )
- return TRUE;
+ return true;
}
#endif
- return FALSE;
+ return false;
}
/*!
@@ -3690,7 +3690,7 @@ void TQWidget::setTabOrder( TQWidget* first, TQWidget *second )
while ( second->focusProxy() )
second = second->focusProxy();
- TQFocusData *f = first->focusData( TRUE );
+ TQFocusData *f = first->focusData( true );
bool focusThere = (f->it.current() == second );
f->focusWidgets.removeRef( second );
if ( f->focusWidgets.findRef( first ) >= 0 )
@@ -3818,7 +3818,7 @@ void TQWidget::move( int x, int y )
TQPoint oldp(pos());
internalSetGeometry( x + geometry().x() - TQWidget::x(),
y + geometry().y() - TQWidget::y(),
- width(), height(), TRUE );
+ width(), height(), true );
if ( isVisible() && oldp != pos() )
qt_update_bg_recursive( this );
}
@@ -3830,7 +3830,7 @@ void TQWidget::move( int x, int y )
*/
void TQWidget::resize( int w, int h )
{
- internalSetGeometry( geometry().x(), geometry().y(), w, h, FALSE );
+ internalSetGeometry( geometry().x(), geometry().y(), w, h, false );
setWState( WState_Resized );
}
@@ -3842,7 +3842,7 @@ void TQWidget::resize( int w, int h )
void TQWidget::setGeometry( int x, int y, int w, int h )
{
TQPoint oldp( pos( ));
- internalSetGeometry( x, y, w, h, TRUE );
+ internalSetGeometry( x, y, w, h, true );
setWState( WState_Resized );
if ( isVisible() && oldp != pos() )
qt_update_bg_recursive( this );
@@ -3906,7 +3906,7 @@ void TQWidget::setFocusPolicy( FocusPolicy policy )
if ( focusProxy() )
focusProxy()->setFocusPolicy( policy );
if ( policy != NoFocus ) {
- TQFocusData * f = focusData( TRUE );
+ TQFocusData * f = focusData( true );
if ( f->focusWidgets.findRef( this ) < 0 )
f->focusWidgets.append( this );
}
@@ -3927,9 +3927,9 @@ void TQWidget::setFocusPolicy( FocusPolicy policy )
Example:
\code
- setUpdatesEnabled( FALSE );
+ setUpdatesEnabled( false );
bigVisualChanges();
- setUpdatesEnabled( TRUE );
+ setUpdatesEnabled( true );
repaint();
\endcode
@@ -4032,7 +4032,7 @@ void TQWidget::show()
if ( !testWState(WState_Polished) )
polish();
- showChildren( FALSE );
+ showChildren( false );
if ( postLayoutHint )
TQApplication::postEvent( parentWidget(),
@@ -4118,10 +4118,10 @@ void TQWidget::hide()
// next bit tries to move the focus if the focus widget is now
// hidden.
if ( tqApp && tqApp->focusWidget() == this )
- focusNextPrevChild( TRUE );
+ focusNextPrevChild( true );
TQHideEvent hideEvent;
TQApplication::sendEvent( this, &hideEvent );
- hideChildren( FALSE );
+ hideChildren( false );
#if defined(QT_ACCESSIBILITY_SUPPORT)
TQAccessible::updateAccessibility( this, 0, TQAccessible::ObjectHide );
@@ -4286,10 +4286,10 @@ void TQWidget::polish()
/*!
\overload
- Closes this widget. Returns TRUE if the widget was closed;
- otherwise returns FALSE.
+ Closes this widget. Returns true if the widget was closed;
+ otherwise returns false.
- If \a alsoDelete is TRUE or the widget has the \c
+ If \a alsoDelete is true or the widget has the \c
WDestructiveClose widget flag, the widget is also deleted. The
widget can prevent itself from being closed by rejecting the
\l TQCloseEvent it gets. A close events is delivered to the widget
@@ -4308,18 +4308,18 @@ void TQWidget::polish()
bool TQWidget::close( bool alsoDelete )
{
if ( is_closing )
- return TRUE;
+ return true;
is_closing = 1;
WId id = winId();
bool isMain = tqApp->mainWidget() == this;
bool checkLastWindowClosed = isTopLevel() && !isPopup();
- bool deleted = FALSE;
+ bool deleted = false;
TQCloseEvent e;
TQApplication::sendEvent( this, &e );
deleted = !TQWidget::find(id);
if ( !deleted && !e.isAccepted() ) {
is_closing = 0;
- return FALSE;
+ return false;
}
if ( !deleted && !isHidden() )
hide();
@@ -4345,7 +4345,7 @@ bool TQWidget::close( bool alsoDelete )
if ( isMain )
tqApp->quit();
if ( deleted )
- return TRUE;
+ return true;
is_closing = 0;
if ( alsoDelete )
delete this;
@@ -4353,15 +4353,15 @@ bool TQWidget::close( bool alsoDelete )
clearWFlags(WDestructiveClose);
deleteLater();
}
- return TRUE;
+ return true;
}
/*!
\fn bool TQWidget::close()
- Closes this widget. Returns TRUE if the widget was closed;
- otherwise returns FALSE.
+ Closes this widget. Returns true if the widget was closed;
+ otherwise returns false.
First it sends the widget a TQCloseEvent. The widget is \link
hide() hidden\endlink if it \link TQCloseEvent::accept()
@@ -4407,13 +4407,13 @@ bool TQWidget::close( bool alsoDelete )
/*!
- Returns TRUE if this widget would become visible if \a ancestor is
- shown; otherwise returns FALSE.
+ Returns true if this widget would become visible if \a ancestor is
+ shown; otherwise returns false.
- The TRUE case occurs if neither the widget itself nor any parent
+ The true case occurs if neither the widget itself nor any parent
up to but excluding \a ancestor has been explicitly hidden.
- This function will still return TRUE if the widget is obscured by
+ This function will still return true if the widget is obscured by
other windows on the screen, but could be physically visible if it
or they were to be moved.
@@ -4448,7 +4448,7 @@ bool TQWidget::isVisibleTo(TQWidget* ancestor) const
\property TQWidget::hidden
\brief whether the widget is explicitly hidden
- If FALSE, the widget is visible or would become visible if all its
+ If false, the widget is visible or would become visible if all its
ancestors became visible.
\sa hide(), show(), isVisible(), isVisibleTo(), shown
@@ -4458,7 +4458,7 @@ bool TQWidget::isVisibleTo(TQWidget* ancestor) const
\property TQWidget::shown
\brief whether the widget is shown
- If TRUE, the widget is visible or would become visible if all its
+ If true, the widget is visible or would become visible if all its
ancestors became visible.
\sa hide(), show(), isVisible(), isVisibleTo(), hidden
@@ -4616,7 +4616,7 @@ TQSize TQWidget::minimumSizeHint() const
\fn TQWidget *TQWidget::parentWidget( bool sameWindow ) const
Returns the parent of this widget, or 0 if it does not have any
- parent widget. If \a sameWindow is TRUE and the widget is top
+ parent widget. If \a sameWindow is true and the widget is top
level returns 0; otherwise returns the widget's parent.
*/
@@ -4693,8 +4693,8 @@ TQSize TQWidget::minimumSizeHint() const
(or the key press is not Tab or Shift+Tab), event() calls
keyPressEvent().
- This function returns TRUE if it is able to pass the event over to
- someone (i.e. someone wanted the event); otherwise returns FALSE.
+ This function returns true if it is able to pass the event over to
+ someone (i.e. someone wanted the event); otherwise returns false.
\sa closeEvent(), focusInEvent(), focusOutEvent(), enterEvent(),
keyPressEvent(), keyReleaseEvent(), leaveEvent(),
@@ -4706,13 +4706,13 @@ TQSize TQWidget::minimumSizeHint() const
bool TQWidget::event( TQEvent *e )
{
if ( TQObject::event( e ) )
- return TRUE;
+ return true;
switch ( e->type() ) {
case TQEvent::MouseMove:
mouseMoveEvent( (TQMouseEvent*)e );
if ( ! ((TQMouseEvent*)e)->isAccepted() )
- return FALSE;
+ return false;
break;
case TQEvent::MouseButtonPress:
@@ -4725,25 +4725,25 @@ bool TQWidget::event( TQEvent *e )
#endif
mousePressEvent( (TQMouseEvent*)e );
if ( ! ((TQMouseEvent*)e)->isAccepted() )
- return FALSE;
+ return false;
break;
case TQEvent::MouseButtonRelease:
mouseReleaseEvent( (TQMouseEvent*)e );
if ( ! ((TQMouseEvent*)e)->isAccepted() )
- return FALSE;
+ return false;
break;
case TQEvent::MouseButtonDblClick:
mouseDoubleClickEvent( (TQMouseEvent*)e );
if ( ! ((TQMouseEvent*)e)->isAccepted() )
- return FALSE;
+ return false;
break;
#ifndef TQT_NO_WHEELEVENT
case TQEvent::Wheel:
wheelEvent( (TQWheelEvent*)e );
if ( ! ((TQWheelEvent*)e)->isAccepted() )
- return FALSE;
+ return false;
break;
#endif
case TQEvent::TabletMove:
@@ -4751,25 +4751,25 @@ bool TQWidget::event( TQEvent *e )
case TQEvent::TabletRelease:
tabletEvent( (TQTabletEvent*)e );
if ( ! ((TQTabletEvent*)e)->isAccepted() )
- return FALSE;
+ return false;
break;
case TQEvent::Accel:
((TQKeyEvent*)e)->ignore();
- return FALSE;
+ return false;
case TQEvent::KeyPress: {
TQKeyEvent *k = (TQKeyEvent *)e;
- bool res = FALSE;
+ bool res = false;
if ( !(k->state() & ControlButton || k->state() & AltButton) ) {
if ( k->key() == Key_Backtab ||
(k->key() == Key_Tab &&
(k->state() & ShiftButton)) ) {
TQFocusEvent::setReason( TQFocusEvent::Backtab );
- res = focusNextPrevChild( FALSE );
+ res = focusNextPrevChild( false );
TQFocusEvent::resetReason();
} else if ( k->key() == Key_Tab ) {
TQFocusEvent::setReason( TQFocusEvent::Tab );
- res = focusNextPrevChild( TRUE );
+ res = focusNextPrevChild( true );
TQFocusEvent::resetReason();
}
if ( res )
@@ -4777,21 +4777,21 @@ bool TQWidget::event( TQEvent *e )
}
keyPressEvent( k );
if ( !k->isAccepted() )
- return FALSE;
+ return false;
}
break;
case TQEvent::KeyRelease:
keyReleaseEvent( (TQKeyEvent*)e );
if ( ! ((TQKeyEvent*)e)->isAccepted() )
- return FALSE;
+ return false;
break;
case TQEvent::IMStart: {
TQIMEvent *i = (TQIMEvent *) e;
imStartEvent(i);
if (! i->isAccepted())
- return FALSE;
+ return false;
}
break;
@@ -4799,7 +4799,7 @@ bool TQWidget::event( TQEvent *e )
TQIMEvent *i = (TQIMEvent *) e;
imComposeEvent(i);
if (! i->isAccepted())
- return FALSE;
+ return false;
}
break;
@@ -4807,7 +4807,7 @@ bool TQWidget::event( TQEvent *e )
TQIMEvent *i = (TQIMEvent *) e;
imEndEvent(i);
if (! i->isAccepted())
- return FALSE;
+ return false;
}
break;
@@ -4847,7 +4847,7 @@ bool TQWidget::event( TQEvent *e )
TQCloseEvent *c = (TQCloseEvent *)e;
closeEvent( c );
if ( !c->isAccepted() )
- return FALSE;
+ return false;
}
break;
@@ -4855,7 +4855,7 @@ bool TQWidget::event( TQEvent *e )
TQContextMenuEvent *c = (TQContextMenuEvent *)e;
contextMenuEvent( c );
if ( !c->isAccepted() )
- return FALSE;
+ return false;
}
break;
@@ -4939,7 +4939,7 @@ bool TQWidget::event( TQEvent *e )
}
}
if ( e->type() == TQEvent::LanguageChange ) {
- int index = metaObject()->findSlot( "languageChange()", TRUE );
+ int index = metaObject()->findSlot( "languageChange()", true );
if ( index >= 0 )
tqt_invoke( index, 0 );
}
@@ -4950,7 +4950,7 @@ bool TQWidget::event( TQEvent *e )
if ( layout() ) {
layout()->activate();
} else {
- TQObjectList* llist = queryList( "TQLayout", 0, TRUE, TRUE );
+ TQObjectList* llist = queryList( "TQLayout", 0, true, true );
TQObjectListIt lit( *llist );
TQLayout *lay;
while ( ( lay = (TQLayout*)lit.current() ) != 0 ) {
@@ -4994,9 +4994,9 @@ bool TQWidget::event( TQEvent *e )
break;
default:
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
/*!
@@ -5208,7 +5208,7 @@ void TQWidget::focusInEvent( TQFocusEvent * )
update();
if ( testWState(WState_AutoMask) )
updateMask();
- setMicroFocusHint(width()/2, 0, 1, height(), FALSE);
+ setMicroFocusHint(width()/2, 0, 1, height(), false);
}
}
@@ -5538,7 +5538,7 @@ void TQWidget::hideEvent( TQHideEvent * )
receive native X11 events.
In your reimplementation of this function, if you want to stop the
- event being handled by TQt, return TRUE. If you return FALSE, this
+ event being handled by TQt, return true. If you return false, this
native event is passed back to TQt, which translates the event into
a TQt event and sends it to the widget.
@@ -5555,7 +5555,7 @@ void TQWidget::hideEvent( TQHideEvent * )
receive native Macintosh events.
In your reimplementation of this function, if you want to stop the
- event being handled by TQt, return TRUE. If you return FALSE, this
+ event being handled by TQt, return true. If you return false, this
native event is passed back to TQt, which translates the event into
a TQt event and sends it to the widget.
@@ -5566,7 +5566,7 @@ void TQWidget::hideEvent( TQHideEvent * )
bool TQWidget::macEvent( MSG * )
{
- return FALSE;
+ return false;
}
#endif
@@ -5577,7 +5577,7 @@ bool TQWidget::macEvent( MSG * )
receive native Windows events.
In your reimplementation of this function, if you want to stop the
- event being handled by TQt, return TRUE. If you return FALSE, this
+ event being handled by TQt, return true. If you return false, this
native event is passed back to TQt, which translates the event into
a TQt event and sends it to the widget.
@@ -5587,7 +5587,7 @@ bool TQWidget::macEvent( MSG * )
*/
bool TQWidget::winEvent( MSG * )
{
- return FALSE;
+ return false;
}
#endif
@@ -5598,7 +5598,7 @@ bool TQWidget::winEvent( MSG * )
receive native X11 events.
In your reimplementation of this function, if you want to stop the
- event being handled by TQt, return TRUE. If you return FALSE, this
+ event being handled by TQt, return true. If you return false, this
native event is passed back to TQt, which translates the event into
a TQt event and sends it to the widget.
@@ -5608,7 +5608,7 @@ bool TQWidget::winEvent( MSG * )
*/
bool TQWidget::x11Event( XEvent * )
{
- return FALSE;
+ return false;
}
#endif
@@ -5619,7 +5619,7 @@ bool TQWidget::x11Event( XEvent * )
Transparent widgets use a mask to define their visible region.
TQWidget has some built-in support to make the task of
- recalculating the mask easier. When setting auto mask to TRUE,
+ recalculating the mask easier. When setting auto mask to true,
updateMask() will be called whenever the widget is resized or
changes its focus state. Note that you must reimplement
updateMask() (which should include a call to setMask()) or nothing
@@ -5742,13 +5742,13 @@ TQPoint TQWidget::backgroundOffset() const
{
const TQWidget *topl = this;
while(topl && !topl->isTopLevel() && !topl->testWFlags(TQt::WSubWindow))
- topl = topl->parentWidget(TRUE);
+ topl = topl->parentWidget(true);
return mapTo((TQWidget *)topl, TQPoint(0, 0) );
}
case AncestorOrigin:
{
const TQWidget *topl = this;
- bool ancestorIsWindowOrigin = FALSE;
+ bool ancestorIsWindowOrigin = false;
while(topl && !topl->isTopLevel() && !topl->testWFlags(TQt::WSubWindow))
{
if (!ancestorIsWindowOrigin) {
@@ -5756,13 +5756,13 @@ TQPoint TQWidget::backgroundOffset() const
break;
if (topl->backgroundOrigin() == TQWidget::ParentOrigin)
{
- topl = topl->parentWidget(TRUE);
+ topl = topl->parentWidget(true);
break;
}
if (topl->backgroundOrigin() == TQWidget::WindowOrigin)
- ancestorIsWindowOrigin = TRUE;
+ ancestorIsWindowOrigin = true;
}
- topl = topl->parentWidget(TRUE);
+ topl = topl->parentWidget(true);
}
return mapTo((TQWidget *) topl, TQPoint(0,0) );
@@ -5868,7 +5868,7 @@ int TQWidget::heightForWidth( int w ) const
\property TQWidget::customWhatsThis
\brief whether the widget wants to handle What's This help manually
- The default implementation of customWhatsThis() returns FALSE,
+ The default implementation of customWhatsThis() returns false,
which means the widget will not receive any events in Whats This
mode.
@@ -5884,14 +5884,14 @@ int TQWidget::heightForWidth( int w ) const
*/
bool TQWidget::customWhatsThis() const
{
- return FALSE;
+ return false;
}
/*!
Returns the visible child widget at pixel position \a (x, y) in
the widget's own coordinate system.
- If \a includeThis is TRUE, and there is no child visible at \a (x,
+ If \a includeThis is true, and there is no child visible at \a (x,
y), the widget itself is returned.
*/
TQWidget *TQWidget::childAt( int x, int y, bool includeThis ) const
@@ -5905,7 +5905,7 @@ TQWidget *TQWidget::childAt( int x, int y, bool includeThis ) const
while( (w=(TQWidget *)it.current()) != 0 ) {
--it;
if ( w->isWidgetType() && !w->isTopLevel() && !w->isHidden() ) {
- if ( ( t = w->childAt( x - w->x(), y - w->y(), TRUE ) ) )
+ if ( ( t = w->childAt( x - w->x(), y - w->y(), true ) ) )
return t;
}
}
@@ -5921,7 +5921,7 @@ TQWidget *TQWidget::childAt( int x, int y, bool includeThis ) const
Returns the visible child widget at point \a p in the widget's own
coordinate system.
- If \a includeThis is TRUE, and there is no child visible at \a p,
+ If \a includeThis is true, and there is no child visible at \a p,
the widget itself is returned.
*/
@@ -5954,7 +5954,7 @@ void TQWidget::updateGeometry()
flags (\a f, but as usual, use 0) at a new position in its new
parent (\a p).
- If \a showIt is TRUE, show() is called once the widget has been
+ If \a showIt is true, show() is called once the widget has been
reparented.
If the new parent widget is in a different top-level widget, the
@@ -6011,7 +6011,7 @@ void TQWidget::reparent( TQWidget *parent, const TQPoint & p,
\property TQWidget::ownCursor
\brief whether the widget uses its own cursor
- If FALSE, the widget uses its parent widget's cursor.
+ If false, the widget uses its parent widget's cursor.
\sa cursor
*/
@@ -6020,7 +6020,7 @@ void TQWidget::reparent( TQWidget *parent, const TQPoint & p,
\property TQWidget::ownFont
\brief whether the widget uses its own font
- If FALSE, the widget uses its parent widget's font.
+ If false, the widget uses its parent widget's font.
\sa font
*/
@@ -6029,7 +6029,7 @@ void TQWidget::reparent( TQWidget *parent, const TQPoint & p,
\property TQWidget::ownPalette
\brief whether the widget uses its own palette
- If FALSE, the widget uses its parent widget's palette.
+ If false, the widget uses its parent widget's palette.
\sa palette
*/
diff --git a/src/kernel/tqwidget.h b/src/kernel/tqwidget.h
index cf0325f3c..ce26e00cb 100644
--- a/src/kernel/tqwidget.h
+++ b/src/kernel/tqwidget.h
@@ -342,9 +342,9 @@ public slots:
void update( const TQRect& );
void repaint();
void repaint( bool erase );
- void repaint( int x, int y, int w, int h, bool erase=TRUE );
- void repaint( const TQRect &, bool erase = TRUE );
- void repaint( const TQRegion &, bool erase = TRUE );
+ void repaint( int x, int y, int w, int h, bool erase=true );
+ void repaint( const TQRect &, bool erase = true );
+ void repaint( const TQRegion &, bool erase = true );
// Widget management functions
@@ -392,7 +392,7 @@ public:
virtual TQSize minimumSizeHint() const;
virtual TQSizePolicy sizePolicy() const;
virtual void setSizePolicy( TQSizePolicy );
- void setSizePolicy( TQSizePolicy::SizeType hor, TQSizePolicy::SizeType ver, bool hfw = FALSE );
+ void setSizePolicy( TQSizePolicy::SizeType hor, TQSizePolicy::SizeType ver, bool hfw = false );
virtual int heightForWidth(int) const;
TQRegion clipRegion() const;
@@ -407,12 +407,12 @@ public:
#endif
void updateGeometry();
virtual void reparent( TQWidget *parent, WFlags, const TQPoint &,
- bool showIt=FALSE );
+ bool showIt=false );
void reparent( TQWidget *parent, const TQPoint &,
- bool showIt=FALSE );
+ bool showIt=false );
#ifndef TQT_NO_COMPAT
void recreate( TQWidget *parent, WFlags f, const TQPoint & p,
- bool showIt=FALSE ) { reparent(parent,f,p,showIt); }
+ bool showIt=false ) { reparent(parent,f,p,showIt); }
#endif
void erase();
@@ -449,7 +449,7 @@ public:
// whats this help
virtual bool customWhatsThis() const;
- TQWidget * parentWidget( bool sameWindow = FALSE ) const;
+ TQWidget * parentWidget( bool sameWindow = false ) const;
WState testWState( WState s ) const;
WFlags testWFlags( WFlags f ) const;
NFlags testNFlags( NFlags f ) const;
@@ -459,14 +459,14 @@ public:
static TQWidget * find( WId );
static TQWidgetMapper *wmapper();
- TQWidget *childAt( int x, int y, bool includeThis = FALSE ) const;
- TQWidget *childAt( const TQPoint &, bool includeThis = FALSE ) const;
+ TQWidget *childAt( int x, int y, bool includeThis = false ) const;
+ TQWidget *childAt( const TQPoint &, bool includeThis = false ) const;
#if defined(TQ_WS_MAC)
- TQRegion clippedRegion(bool do_children=TRUE);
- uint clippedSerial(bool do_children=TRUE);
+ TQRegion clippedRegion(bool do_children=true);
+ uint clippedSerial(bool do_children=true);
#ifndef TQMAC_NO_QUARTZ
- CGContextRef macCGContext(bool clipped=TRUE) const;
+ CGContextRef macCGContext(bool clipped=true) const;
#endif
#endif
#if defined(TQ_WS_X11)
@@ -561,10 +561,10 @@ protected:
#endif
void resetInputContext();
- virtual void create( WId = 0, bool initializeWindow = TRUE,
- bool destroyOldWindow = TRUE );
- virtual void destroy( bool destroyWindow = TRUE,
- bool destroySubWindows = TRUE );
+ virtual void create( WId = 0, bool initializeWindow = true,
+ bool destroyOldWindow = true );
+ virtual void destroy( bool destroyWindow = true,
+ bool destroySubWindows = true );
virtual void setWState( uint );
void clearWState( uint n );
virtual void setWFlags( WFlags );
@@ -579,7 +579,7 @@ protected:
TQFocusData *focusData();
virtual void setKeyCompression(bool);
- virtual void setMicroFocusHint(int x, int y, int w, int h, bool text=TRUE, TQFont *f = 0);
+ virtual void setMicroFocusHint(int x, int y, int w, int h, bool text=true, TQFont *f = 0);
#if defined(TQ_WS_MAC)
void dirtyClippedRegion(bool);
@@ -613,7 +613,7 @@ private:
uint own_id : 1, macDropEnabled : 1;
EventHandlerRef window_event;
//mac event functions
- void propagateUpdates(bool update_rgn=TRUE);
+ void propagateUpdates(bool update_rgn=true);
void update( const TQRegion& );
//friends, way too many - fix this immediately!
friend void qt_clean_root_win();
@@ -824,7 +824,7 @@ inline void TQWidget::update( const TQRect &r )
{ update( r.x(), r.y(), r.width(), r.height() ); }
inline void TQWidget::repaint()
-{ repaint( TRUE ); }
+{ repaint( true ); }
inline void TQWidget::repaint( const TQRect &r, bool erase )
{ repaint( r.x(), r.y(), r.width(), r.height(), erase ); }
@@ -836,7 +836,7 @@ inline void TQWidget::erase( const TQRect &r )
{ erase( r.x(), r.y(), r.width(), r.height() ); }
inline bool TQWidget::close()
-{ return close( FALSE ); }
+{ return close( false ); }
inline bool TQWidget::isVisible() const
{ return testWState(WState_Visible); }
diff --git a/src/kernel/tqwidget_x11.cpp b/src/kernel/tqwidget_x11.cpp
index c8492c6e6..808d2ef4c 100644
--- a/src/kernel/tqwidget_x11.cpp
+++ b/src/kernel/tqwidget_x11.cpp
@@ -304,15 +304,15 @@ static void qt_net_change_wm_state(const TQWidget* w, bool set, Atom one, Atom t
widget's window to \a window.
Initializes the window (sets the geometry etc.) if \a
- initializeWindow is TRUE. If \a initializeWindow is FALSE, no
+ initializeWindow is true. If \a initializeWindow is false, no
initialization is performed. This parameter only makes sense if \a
window is a valid window.
- Destroys the old window if \a destroyOldWindow is TRUE. If \a
- destroyOldWindow is FALSE, you are responsible for destroying the
+ Destroys the old window if \a destroyOldWindow is true. If \a
+ destroyOldWindow is false, you are responsible for destroying the
window yourself (using platform native code).
- The TQWidget constructor calls create(0,TRUE,TRUE) to create a
+ The TQWidget constructor calls create(0,true,true) to create a
window for this widget.
*/
@@ -346,13 +346,13 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow)
// always initialize
if ( !window )
- initializeWindow = TRUE;
+ initializeWindow = true;
if ( desktop &&
qt_x11_create_desktop_on_screen >= 0 &&
qt_x11_create_desktop_on_screen != x11Screen() ) {
// desktop on a certain screen other than the default requested
- TQPaintDeviceX11Data* xd = getX11Data( TRUE );
+ TQPaintDeviceX11Data* xd = getX11Data( true );
xd->x_screen = qt_x11_create_desktop_on_screen;
xd->x_depth = TQPaintDevice::x11AppDepth( xd->x_screen );
xd->x_cells = TQPaintDevice::x11AppCells( xd->x_screen );
@@ -363,7 +363,7 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow)
setX11Data( xd );
} else if ( parentWidget() && parentWidget()->x11Screen() != x11Screen() ) {
// if we have a parent widget, move to its screen if necessary
- TQPaintDeviceX11Data* xd = getX11Data( TRUE );
+ TQPaintDeviceX11Data* xd = getX11Data( true );
xd->x_screen = parentWidget()->x11Screen();
xd->x_depth = TQPaintDevice::x11AppDepth( xd->x_screen );
xd->x_cells = TQPaintDevice::x11AppCells( xd->x_screen );
@@ -383,7 +383,7 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow)
int sh = DisplayHeight(dpy,scr);
if ( desktop ) { // desktop widget
- dialog = popup = FALSE; // force these flags off
+ dialog = popup = false; // force these flags off
crect.setRect( 0, 0, sw, sh );
} else if ( topLevel ) { // calc pos/size from screen
crect.setRect( sw/4, 3*sh/10, sw/2, 4*sh/10 );
@@ -409,7 +409,7 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow)
else
setWState( WState_Visible );
- TQPaintDeviceX11Data* xd = getX11Data( TRUE );
+ TQPaintDeviceX11Data* xd = getX11Data( true );
// find which screen the window is on...
xd->x_screen = TQPaintDevice::x11AppScreen(); // by default, use the default :)
@@ -757,7 +757,7 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow)
}
setWState( WState_MouseTracking );
- setMouseTracking( FALSE ); // also sets event mask
+ setMouseTracking( false ); // also sets event mask
if ( desktop ) {
setWState( WState_Visible );
} else if ( topLevel ) { // set X cursor
@@ -777,7 +777,7 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow)
/*!
Frees up window system resources. Destroys the widget window if \a
- destroyWindow is TRUE.
+ destroyWindow is true.
destroy() calls itself recursively for all the child widgets,
passing \a destroySubWindows for the \a destroyWindow parameter.
@@ -825,7 +825,7 @@ void TQWidget::destroy( bool destroyWindow, bool destroySubWindows )
if ( testWFlags(WType_Desktop) ) {
if ( acceptDrops() )
- qt_dnd_enable( this, FALSE );
+ qt_dnd_enable( this, false );
} else {
if ( destroyWindow )
qt_XDestroyWindow( this, x11Display(), winid );
@@ -867,7 +867,7 @@ void TQWidget::reparentSys( TQWidget *parent, WFlags f, const TQPoint &p, bool s
// dnd unregister (we will register again below)
bool accept_drops = acceptDrops();
- setAcceptDrops( FALSE );
+ setAcceptDrops( false );
// clear mouse tracking, re-enabled below
bool mouse_tracking = hasMouseTracking();
@@ -987,7 +987,7 @@ void TQWidget::reparentSys( TQWidget *parent, WFlags f, const TQPoint &p, bool s
oldparent->checkChildrenDnd();
if ( accept_drops )
- setAcceptDrops( TRUE );
+ setAcceptDrops( true );
else {
checkChildrenDnd();
topData()->dnd = 0;
@@ -1099,15 +1099,15 @@ TQPoint TQWidget::mapFromGlobal( const TQPoint &pos ) const
height. This has no \e visual effect, it just provides hints to
any system-specific input handling tools.
- The \a text argument should be TRUE if this is a position for text
+ The \a text argument should be true if this is a position for text
input.
In the Windows version of TQt, this method sets the system caret,
which is used for user Accessibility focus handling. If \a text
- is TRUE, it also sets the IME composition window in Far East Asian
+ is true, it also sets the IME composition window in Far East Asian
language input systems.
- In the X11 version of TQt, if \a text is TRUE, this method sets the
+ In the X11 version of TQt, if \a text is true, this method sets the
input method focus point in the preedit (XIM "spot" point) for
complex language input handling.
@@ -1241,13 +1241,13 @@ static XTextProperty*
tqstring_to_xtp( const TQString& s )
{
static XTextProperty tp = { 0, 0, 0, 0 };
- static bool free_prop = TRUE; // we can't free tp.value in case it references
+ static bool free_prop = true; // we can't free tp.value in case it references
// the data of the static TQCString below.
if ( tp.value ) {
if ( free_prop )
XFree( tp.value );
tp.value = 0;
- free_prop = TRUE;
+ free_prop = true;
}
static const TQTextCodec* mapper = TQTextCodec::codecForLocale();
@@ -1271,7 +1271,7 @@ tqstring_to_xtp( const TQString& s )
tp.encoding = XA_STRING;
tp.format = 8;
tp.nitems = qcs.length();
- free_prop = FALSE;
+ free_prop = false;
}
// ### If we knew WM could understand unicode, we could use
@@ -1436,7 +1436,7 @@ void TQWidget::setMouseTracking( bool enable )
button is released.
Note that only visible widgets can grab mouse input. If
- isVisible() returns FALSE for a widget, that widget cannot call
+ isVisible() returns false for a widget, that widget cannot call
grabMouse().
\sa releaseMouse() grabKeyboard() releaseKeyboard() grabKeyboard()
@@ -1736,7 +1736,7 @@ void TQWidget::update( int x, int y, int w, int h )
Repaints the widget directly by calling paintEvent() immediately,
unless updates are disabled or the widget is hidden.
- If \a erase is TRUE, TQt erases the area \a (x, y, w, h) before the
+ If \a erase is true, TQt erases the area \a (x, y, w, h) before the
paintEvent() call.
If \a w is negative, it is replaced with \c{width() - x}, and if
@@ -1786,7 +1786,7 @@ void TQWidget::repaint( int x, int y, int w, int h, bool erase )
Repaints the widget directly by calling paintEvent() directly,
unless updates are disabled or the widget is hidden.
- Erases the widget region \a reg if \a erase is TRUE.
+ Erases the widget region \a reg if \a erase is true.
Only use repaint if your widget needs to be repainted immediately,
for example when doing some animation. In all other cases, use
@@ -1818,12 +1818,12 @@ void TQWidget::repaint( const TQRegion& reg, bool erase )
Repaints the widget directly by calling paintEvent() directly,
unless updates are disabled or the widget is hidden.
- Erases the widget region \a r if \a erase is TRUE.
+ Erases the widget region \a r if \a erase is true.
*/
void TQWidget::setWindowState(uint newstate)
{
- bool needShow = FALSE;
+ bool needShow = false;
uint oldstate = windowState();
if (isTopLevel()) {
TQTLWExtra *top = topData();
@@ -1920,7 +1920,7 @@ void TQWidget::setWindowState(uint newstate)
}
}
- needShow = FALSE;
+ needShow = false;
}
}
@@ -2031,7 +2031,7 @@ void TQWidget::hideWindow()
// zero the frame strut and mark it dirty
top->fleft = top->fright = top->ftop = top->fbottom = 0;
- fstrut_dirty = TRUE;
+ fstrut_dirty = true;
XFlush( x11Display() );
} else {
@@ -2472,7 +2472,7 @@ void TQWidget::scroll( int dx, int dy, const TQRect& r )
return;
Display *dpy = x11Display();
- GC gc = tqt_xget_readonly_gc( x11Screen(), FALSE );
+ GC gc = tqt_xget_readonly_gc( x11Screen(), false );
// Want expose events
if ( w > 0 && h > 0 && !just_update ) {
XSetGraphicsExposures( dpy, gc, True );
@@ -2604,8 +2604,8 @@ int TQWidget::metric( int m ) const
void TQWidget::createSysExtra()
{
extra->xDndProxy = 0;
- extra->children_use_dnd = FALSE;
- extra->compress_events = TRUE;
+ extra->children_use_dnd = false;
+ extra->compress_events = true;
}
void TQWidget::deleteSysExtra()
@@ -2646,7 +2646,7 @@ void TQWidget::checkChildrenDnd()
while (widget && ! widget->isDesktop()) {
// note: this isn't done for the desktop widget
- bool children_use_dnd = FALSE;
+ bool children_use_dnd = false;
children = widget->children();
if ( children ) {
TQObjectListIt it(*children);
@@ -2718,7 +2718,7 @@ void TQWidget::handleSyncRequest( void* ev )
\property TQWidget::acceptDrops
\brief whether drop events are enabled for this widget
- Setting this property to TRUE announces to the system that this
+ Setting this property to true announces to the system that this
widget \e may be able to accept drop events.
If the widget is the desktop (TQWidget::isDesktop()), this may
@@ -2992,7 +2992,7 @@ void TQWidget::changeInputContext( const TQString& identifierName )
according to a configuration for default input method
When TQT_NO_IM_EXTENSIONS is not set, input context is
- generated only when isInputMethodEnabled() returns TRUE.
+ generated only when isInputMethodEnabled() returns true.
*/
void TQWidget::createInputContext()
{
diff --git a/src/kernel/tqwmatrix.cpp b/src/kernel/tqwmatrix.cpp
index eb5ce5087..0c5fddc67 100644
--- a/src/kernel/tqwmatrix.cpp
+++ b/src/kernel/tqwmatrix.cpp
@@ -157,7 +157,7 @@ double qsincos( double, bool calcCos ); // defined in tqpainter_x11.cpp
\sa TQPainter::setWorldMatrix(), TQPixmap::xForm()
*/
-bool qt_old_transformations = TRUE;
+bool qt_old_transformations = true;
/*!
\enum TQWMatrix::TransformationMode
@@ -216,9 +216,9 @@ bool qt_old_transformations = TRUE;
void TQWMatrix::setTransformationMode( TQWMatrix::TransformationMode m )
{
if ( m == TQWMatrix::Points )
- qt_old_transformations = TRUE;
+ qt_old_transformations = true;
else
- qt_old_transformations = FALSE;
+ qt_old_transformations = false;
}
@@ -772,7 +772,7 @@ void TQWMatrix::reset()
}
/*!
- Returns TRUE if the matrix is the identity matrix; otherwise returns FALSE.
+ Returns true if the matrix is the identity matrix; otherwise returns false.
\sa reset()
*/
@@ -852,8 +852,8 @@ TQWMatrix &TQWMatrix::rotate( double a )
{
double b = deg2rad*a; // convert to radians
#if defined(TQ_WS_X11)
- double sina = qsincos(b,FALSE); // fast and convenient
- double cosa = qsincos(b,TRUE);
+ double sina = qsincos(b,false); // fast and convenient
+ double cosa = qsincos(b,true);
#else
double sina = sin(b);
double cosa = cos(b);
@@ -870,7 +870,7 @@ TQWMatrix &TQWMatrix::rotate( double a )
/*!
\fn bool TQWMatrix::isInvertible() const
- Returns TRUE if the matrix is invertible; otherwise returns FALSE.
+ Returns true if the matrix is invertible; otherwise returns false.
\sa invert()
*/
@@ -889,8 +889,8 @@ TQWMatrix &TQWMatrix::rotate( double a )
returned.
If \a invertible is not 0: the value of \a *invertible is set
- to TRUE if the matrix is invertible; otherwise \a *invertible is
- set to FALSE.
+ to true if the matrix is invertible; otherwise \a *invertible is
+ set to false.
\sa isInvertible()
*/
@@ -900,13 +900,13 @@ TQWMatrix TQWMatrix::invert( bool *invertible ) const
double determinant = det();
if ( determinant == 0.0 ) {
if ( invertible )
- *invertible = FALSE; // singular matrix
+ *invertible = false; // singular matrix
TQWMatrix defaultMatrix;
return defaultMatrix;
}
else { // invertible matrix
if ( invertible )
- *invertible = TRUE;
+ *invertible = true;
double dinv = 1.0/determinant;
TQWMatrix imatrix( (_m22*dinv), (-_m12*dinv),
(-_m21*dinv), ( _m11*dinv),
@@ -918,7 +918,7 @@ TQWMatrix TQWMatrix::invert( bool *invertible ) const
/*!
- Returns TRUE if this matrix is equal to \a m; otherwise returns FALSE.
+ Returns true if this matrix is equal to \a m; otherwise returns false.
*/
bool TQWMatrix::operator==( const TQWMatrix &m ) const
@@ -932,7 +932,7 @@ bool TQWMatrix::operator==( const TQWMatrix &m ) const
}
/*!
- Returns TRUE if this matrix is not equal to \a m; otherwise returns FALSE.
+ Returns true if this matrix is not equal to \a m; otherwise returns false.
*/
bool TQWMatrix::operator!=( const TQWMatrix &m ) const
diff --git a/src/network/tqdns.cpp b/src/network/tqdns.cpp
index fa248533c..4e5038657 100644
--- a/src/network/tqdns.cpp
+++ b/src/network/tqdns.cpp
@@ -109,7 +109,7 @@ static TQ_UINT32 now()
static TQPtrList<TQHostAddress> * ns = 0;
static TQStrList * domains = 0;
-static bool ipv6support = FALSE;
+static bool ipv6support = false;
#if defined(Q_MODERN_RES_API)
#else
@@ -135,13 +135,13 @@ static int tqdns_res_init()
class TQDnsPrivate {
public:
- TQDnsPrivate() : queryTimer( 0 ), noNames(FALSE)
+ TQDnsPrivate() : queryTimer( 0 ), noNames(false)
{
#if defined(Q_DNS_SYNCHRONOUS)
#if defined(Q_OS_UNIX)
noEventLoop = tqApp==0 || tqApp->loopLevel()==0;
#else
- noEventLoop = FALSE;
+ noEventLoop = false;
#endif
#endif
}
@@ -267,7 +267,7 @@ private:
TQString label;
TQDnsRR * rr;
- TQString readString(bool multipleLabels = TRUE);
+ TQString readString(bool multipleLabels = true);
void parseA();
void parseAaaa();
void parseMx();
@@ -281,7 +281,7 @@ private:
TQDnsRR::TQDnsRR( const TQString & label )
: domain( 0 ), t( TQDns::None ),
- nxdomain( FALSE ), current( FALSE ),
+ nxdomain( false ), current( false ),
expireTime( 0 ), deleteTime( 0 ),
priority( 0 ), weight( 0 ), port( 0 )
{
@@ -299,14 +299,14 @@ TQDnsRR::~TQDnsRR()
// this one just sticks in a NXDomain
TQDnsAnswer::TQDnsAnswer( TQDnsQuery * query_ )
{
- ok = TRUE;
+ ok = true;
answer = 0;
size = 0;
query = query_;
pp = 0;
rrs = new TQPtrList<TQDnsRR>;
- rrs->setAutoDelete( FALSE );
+ rrs->setAutoDelete( false );
next = size;
ttl = 0;
label = TQString::null;
@@ -316,8 +316,8 @@ TQDnsAnswer::TQDnsAnswer( TQDnsQuery * query_ )
newrr->t = query->t;
newrr->deleteTime = query->started + 10;
newrr->expireTime = query->started + 10;
- newrr->nxdomain = TRUE;
- newrr->current = TRUE;
+ newrr->nxdomain = true;
+ newrr->current = true;
rrs->append( newrr );
}
@@ -325,14 +325,14 @@ TQDnsAnswer::TQDnsAnswer( TQDnsQuery * query_ )
TQDnsAnswer::TQDnsAnswer( const TQByteArray& answer_,
TQDnsQuery * query_ )
{
- ok = TRUE;
+ ok = true;
answer = (TQ_UINT8 *)(answer_.data());
size = (int)answer_.size();
query = query_;
pp = 0;
rrs = new TQPtrList<TQDnsRR>;
- rrs->setAutoDelete( FALSE );
+ rrs->setAutoDelete( false );
next = size;
ttl = 0;
label = TQString::null;
@@ -408,7 +408,7 @@ TQString TQDnsAnswer::readString(bool multipleLabels)
}
}
not_ok:
- ok = FALSE;
+ ok = false;
return TQString::null;
}
@@ -577,7 +577,7 @@ void TQDnsAnswer::parsePtr()
void TQDnsAnswer::parseTxt()
{
- TQString text = readString(FALSE);
+ TQString text = readString(false);
if ( !ok ) {
#if defined(TQDNS_DEBUG)
tqDebug( "TQDns: saw bad TXT for for %s", label.ascii() );
@@ -602,7 +602,7 @@ void TQDnsAnswer::parse()
#if defined(TQDNS_DEBUG)
tqDebug( "DNS Manager: answer to wrong query type (%d)", answer[1] );
#endif
- ok = FALSE;
+ ok = false;
return;
}
@@ -631,8 +631,8 @@ void TQDnsAnswer::parse()
rr->t = query->t;
rr->deleteTime = query->started + 60;
rr->expireTime = query->started + 60;
- rr->nxdomain = TRUE;
- rr->current = TRUE;
+ rr->nxdomain = true;
+ rr->current = true;
rrs->append( rr );
return;
}
@@ -641,7 +641,7 @@ void TQDnsAnswer::parse()
#if defined(TQDNS_DEBUG)
tqDebug( "DNS Manager: error code %d", answer[3] & 0x0f );
#endif
- ok = FALSE;
+ ok = false;
return;
}
@@ -745,7 +745,7 @@ void TQDnsAnswer::parse()
answers++;
rr->deleteTime = rr->expireTime;
}
- rr->current = TRUE;
+ rr->current = true;
rrs->append( rr );
}
}
@@ -766,7 +766,7 @@ void TQDnsAnswer::parse()
// by something we care about. we want to cache such As.
rrs->first();
TQDict<void> used( 17 );
- used.setAutoDelete( FALSE );
+ used.setAutoDelete( false );
while( (rr=rrs->current()) != 0 ) {
rrs->next();
if ( rr->target.length() && rr->deleteTime > 0 && rr->current )
@@ -822,7 +822,7 @@ void TQDnsAnswer::parse()
class TQDnsUgleHack: public TQDns {
public:
- void ugle( bool emitAnyway=FALSE );
+ void ugle( bool emitAnyway=false );
};
@@ -832,7 +832,7 @@ void TQDnsAnswer::notify()
return;
TQPtrDict<void> notified;
- notified.setAutoDelete( FALSE );
+ notified.setAutoDelete( false );
TQPtrDictIterator<void> it( *query->dns );
TQDns * dns;
@@ -845,8 +845,8 @@ void TQDnsAnswer::notify()
#if defined(TQDNS_DEBUG)
tqDebug( "DNS Manager: found no answers!" );
#endif
- dns->d->noNames = TRUE;
- ((TQDnsUgleHack*)dns)->ugle( TRUE );
+ dns->d->noNames = true;
+ ((TQDnsUgleHack*)dns)->ugle( true );
} else {
TQStringList n = dns->qualifiedNames();
if ( query && n.contains(query->l) )
@@ -931,13 +931,13 @@ void TQDnsUgleHack::ugle( bool emitAnyway)
TQDnsManager::TQDnsManager()
: TQDnsSocket( tqApp, "Internal DNS manager" ),
queries( TQPtrVector<TQDnsQuery>( 0 ) ),
- cache( TQDict<TQDnsDomain>( 83, FALSE ) ),
+ cache( TQDict<TQDnsDomain>( 83, false ) ),
ipv4Socket( new TQSocketDevice( TQSocketDevice::Datagram, TQSocketDevice::IPv4, 0 ) )
#if !defined (TQT_NO_IPV6)
, ipv6Socket( new TQSocketDevice( TQSocketDevice::Datagram, TQSocketDevice::IPv6, 0 ) )
#endif
{
- cache.setAutoDelete( TRUE );
+ cache.setAutoDelete( true );
globalManager = this;
TQTimer * sweepTimer = new TQTimer( this );
@@ -948,8 +948,8 @@ TQDnsManager::TQDnsManager()
TQSocketNotifier * rn4 = new TQSocketNotifier( ipv4Socket->socket(),
TQSocketNotifier::Read,
this, "dns IPv4 socket watcher" );
- ipv4Socket->setAddressReusable( FALSE );
- ipv4Socket->setBlocking( FALSE );
+ ipv4Socket->setAddressReusable( false );
+ ipv4Socket->setBlocking( false );
connect( rn4, TQ_SIGNAL(activated(int)), TQ_SLOT(answer()) );
#if !defined (TQT_NO_IPV6)
@@ -960,9 +960,9 @@ TQDnsManager::TQDnsManager()
TQSocketNotifier::Read,
this, "dns IPv6 socket watcher" );
- ipv6support = TRUE;
- ipv6Socket->setAddressReusable( FALSE );
- ipv6Socket->setBlocking( FALSE );
+ ipv6support = true;
+ ipv6Socket->setAddressReusable( false );
+ ipv6Socket->setBlocking( false );
connect( rn6, TQ_SIGNAL(activated(int)), TQ_SLOT(answer()) );
}
#endif
@@ -994,9 +994,9 @@ TQDnsManager::TQDnsManager()
delete ::ns;
::ns = ns;
- ::ns->setAutoDelete( TRUE );
+ ::ns->setAutoDelete( true );
- TQStrList * domains = new TQStrList( TRUE );
+ TQStrList * domains = new TQStrList( true );
::domains->first();
const char * s;
@@ -1017,7 +1017,7 @@ TQDnsManager::TQDnsManager()
delete ::domains;
::domains = domains;
- ::domains->setAutoDelete( TRUE );
+ ::domains->setAutoDelete( true );
}
@@ -1025,8 +1025,8 @@ TQDnsManager::~TQDnsManager()
{
if ( globalManager )
globalManager = 0;
- queries.setAutoDelete( TRUE );
- cache.setAutoDelete( TRUE );
+ queries.setAutoDelete( true );
+ cache.setAutoDelete( true );
delete ipv4Socket;
#if !defined (TQT_NO_IPV6)
delete ipv6Socket;
@@ -1037,7 +1037,7 @@ static TQ_UINT32 lastSweep = 0;
void TQDnsManager::cleanCache()
{
- bool again = FALSE;
+ bool again = false;
TQDictIterator<TQDnsDomain> it( cache );
TQDnsDomain * d;
TQ_UINT32 thisSweep = now();
@@ -1305,7 +1305,7 @@ void TQDnsManager::transmitQuery( int i )
// seconds. the graph becomes steep around that point, and the
// number of errors rises... so it seems good to retry at that
// point.
- q->start( q->step < ns->count() ? 800 : 1500, TRUE );
+ q->start( q->step < ns->count() ? 800 : 1500, true );
}
@@ -1350,7 +1350,7 @@ void TQDnsDomain::add( const TQString & label, TQDnsRR * rr )
TQDnsDomain * d = TQDnsManager::manager()->domain( label );
if ( !d->rrs ) {
d->rrs = new TQPtrList<TQDnsRR>;
- d->rrs->setAutoDelete( TRUE );
+ d->rrs->setAutoDelete( true );
}
d->rrs->append( rr );
rr->domain = d;
@@ -1370,7 +1370,7 @@ TQPtrList<TQDnsRR> * TQDnsDomain::cached( const TQDns * r )
TQDnsRR *rrTmp = new TQDnsRR( r->label() );
rrTmp->t = TQDns::A;
rrTmp->address = TQHostAddress( 0x7f000001 );
- rrTmp->current = TRUE;
+ rrTmp->current = true;
l->append( rrTmp );
return l;
}
@@ -1380,10 +1380,10 @@ TQPtrList<TQDnsRR> * TQDnsDomain::cached( const TQDns * r )
if ( tmp.isIPv4Address() ) {
rrTmp->t = TQDns::A;
rrTmp->address = tmp;
- rrTmp->current = TRUE;
+ rrTmp->current = true;
l->append( rrTmp );
} else {
- rrTmp->nxdomain = TRUE;
+ rrTmp->nxdomain = true;
}
return l;
}
@@ -1395,10 +1395,10 @@ TQPtrList<TQDnsRR> * TQDnsDomain::cached( const TQDns * r )
if ( tmp.isIPv6Address() ) {
rrTmp->t = TQDns::Aaaa;
rrTmp->address = tmp;
- rrTmp->current = TRUE;
+ rrTmp->current = true;
l->append( rrTmp );
} else {
- rrTmp->nxdomain = TRUE;
+ rrTmp->nxdomain = true;
}
return l;
}
@@ -1413,7 +1413,7 @@ TQPtrList<TQDnsRR> * TQDnsDomain::cached( const TQDns * r )
int cnamecount = 0;
while( it != end ) {
TQString s = *it++;
- nxdomain = FALSE;
+ nxdomain = false;
#if defined(TQDNS_DEBUG)
tqDebug( "looking at cache for %s (%s %d)",
s.ascii(), r->label().ascii(), r->recordType() );
@@ -1425,7 +1425,7 @@ TQPtrList<TQDnsRR> * TQDnsDomain::cached( const TQDns * r )
if ( d->rrs )
d->rrs->first();
TQDnsRR * rr;
- bool answer = FALSE;
+ bool answer = false;
while( d->rrs && (rr=d->rrs->current()) != 0 ) {
if ( rr->t == TQDns::Cname && r->recordType() != TQDns::Cname &&
!rr->nxdomain && cnamecount < 16 ) {
@@ -1448,9 +1448,9 @@ TQPtrList<TQDnsRR> * TQDnsDomain::cached( const TQDns * r )
} else {
if ( rr->t == r->recordType() ) {
if ( rr->nxdomain )
- nxdomain = TRUE;
+ nxdomain = true;
else
- answer = TRUE;
+ answer = true;
l->append( rr );
if ( rr->deleteTime <= lastSweep ) {
// we're returning something that'll be
@@ -1551,7 +1551,7 @@ void TQDnsDomain::sweep( TQ_UINT32 thisSweep )
rr->expireTime, rr->deleteTime,
rr->target.latin1(), rr->address.toString().latin1());
#endif
- if ( rr->current == FALSE ||
+ if ( !rr->current ||
rr->t == TQDns::None ||
rr->deleteTime <= thisSweep ||
rr->expireTime <= thisSweep )
@@ -1746,7 +1746,7 @@ TQDns::~TQDns()
void TQDns::setLabel( const TQString & label )
{
l = label;
- d->noNames = FALSE;
+ d->noNames = false;
// construct a list of qualified names
n.clear();
@@ -1877,7 +1877,7 @@ void TQDns::setLabel( const TQHostAddress & address )
void TQDns::setRecordType( RecordType rr )
{
t = rr;
- d->noNames = FALSE;
+ d->noNames = false;
setStartQueryTimer(); // start query the next time we enter event loop
}
@@ -1910,7 +1910,7 @@ void TQDns::setStartQueryTimer()
d->queryTimer = new TQTimer( this );
connect( d->queryTimer, TQ_SIGNAL(timeout()),
this, TQ_SLOT(startQuery()) );
- d->queryTimer->start( 0, TRUE );
+ d->queryTimer->start( 0, true );
}
}
@@ -1962,11 +1962,11 @@ TQString TQDns::toInAddrArpaDomain( const TQHostAddress &address )
*/
/*!
- Returns TRUE if TQDns is doing a lookup for this object (i.e. if it
+ Returns true if TQDns is doing a lookup for this object (i.e. if it
does not already have the necessary information); otherwise
- returns FALSE.
+ returns false.
- TQDns emits the resultsReady() signal when the status changes to FALSE.
+ TQDns emits the resultsReady() signal when the status changes to false.
*/
bool TQDns::isWorking() const
@@ -1975,11 +1975,11 @@ bool TQDns::isWorking() const
tqDebug( "TQDns::isWorking (%s, %d)", l.ascii(), t );
#endif
if ( t == None )
- return FALSE;
+ return false;
#if defined(Q_DNS_SYNCHRONOUS)
if ( d->noEventLoop )
- return TRUE;
+ return true;
#endif
TQPtrList<TQDnsRR> * ll = TQDnsDomain::cached( this );
@@ -1989,17 +1989,17 @@ bool TQDns::isWorking() const
queries--;
} else {
delete ll;
- return FALSE;
+ return false;
}
ll->next();
}
delete ll;
if ( queries <= 0 )
- return FALSE;
+ return false;
if ( d->noNames )
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
@@ -2392,13 +2392,13 @@ void TQDns::doResInit()
if ( ns )
delete ns;
ns = new TQPtrList<TQHostAddress>;
- ns->setAutoDelete( TRUE );
- domains = new TQStrList( TRUE );
- domains->setAutoDelete( TRUE );
+ ns->setAutoDelete( true );
+ domains = new TQStrList( true );
+ domains->setAutoDelete( true );
TQString domainName, nameServer, searchList;
- bool gotNetworkParams = FALSE;
+ bool gotNetworkParams = false;
// try the API call GetNetworkParams() first and use registry lookup only
// as a fallback
#ifdef Q_OS_TEMP
@@ -2431,7 +2431,7 @@ void TQDns::doResInit()
}
searchList = "";
separator = ' ';
- gotNetworkParams = TRUE;
+ gotNetworkParams = true;
}
delete[] finfo;
}
@@ -2551,9 +2551,9 @@ void TQDns::doResInit()
if ( ns )
return;
ns = new TQPtrList<TQHostAddress>;
- ns->setAutoDelete( TRUE );
- domains = new TQStrList( TRUE );
- domains->setAutoDelete( TRUE );
+ ns->setAutoDelete( true );
+ domains = new TQStrList( true );
+ domains->setAutoDelete( true );
// read resolv.conf manually.
TQFile resolvConf("/etc/resolv.conf");
@@ -2659,7 +2659,7 @@ void TQDns::doResInit()
TQHostAddress a;
a.setAddress( ip );
if ( ( a.isIPv4Address() || a.isIPv6Address() ) && !a.isNull() ) {
- bool first = TRUE;
+ bool first = true;
line = line.mid( n+1 );
n = 0;
while( n < line.length() && !line[(int)n].isSpace() )
@@ -2675,15 +2675,15 @@ void TQDns::doResInit()
rr->address = a;
rr->deleteTime = UINT_MAX;
rr->expireTime = UINT_MAX;
- rr->current = TRUE;
+ rr->current = true;
if ( first ) {
- first = FALSE;
+ first = false;
TQDnsRR * ptr = new TQDnsRR( TQDns::toInAddrArpaDomain( a ) );
ptr->t = TQDns::Ptr;
ptr->target = hostname;
ptr->deleteTime = UINT_MAX;
ptr->expireTime = UINT_MAX;
- ptr->current = TRUE;
+ ptr->current = true;
}
}
}
diff --git a/src/network/tqftp.cpp b/src/network/tqftp.cpp
index 8c7dbb184..93bdfc6fb 100644
--- a/src/network/tqftp.cpp
+++ b/src/network/tqftp.cpp
@@ -136,7 +136,7 @@ private slots:
private:
void clearData()
{
- is_ba = FALSE;
+ is_ba = false;
data.dev = 0;
}
@@ -147,7 +147,7 @@ private:
int bytesTotal;
bool callWriteData;
- // If is_ba is TRUE, ba is used; ba is never 0.
+ // If is_ba is true, ba is used; ba is never 0.
// Otherwise dev is used; dev can be 0 or not.
union {
TQByteArray *ba;
@@ -244,7 +244,7 @@ public:
TQFtp::Command command;
TQStringList rawCmds;
- // If is_ba is TRUE, ba is used; ba is never 0.
+ // If is_ba is true, ba is used; ba is never 0.
// Otherwise dev is used; dev can be 0 or not.
union {
TQByteArray *ba;
@@ -258,21 +258,21 @@ public:
int TQFtpCommand::idCounter = 0;
TQFtpCommand::TQFtpCommand( TQFtp::Command cmd, TQStringList raw )
- : command(cmd), rawCmds(raw), is_ba(FALSE)
+ : command(cmd), rawCmds(raw), is_ba(false)
{
id = ++idCounter;
data.dev = 0;
}
TQFtpCommand::TQFtpCommand( TQFtp::Command cmd, TQStringList raw, const TQByteArray &ba )
- : command(cmd), rawCmds(raw), is_ba(TRUE)
+ : command(cmd), rawCmds(raw), is_ba(true)
{
id = ++idCounter;
data.ba = new TQByteArray( ba );
}
TQFtpCommand::TQFtpCommand( TQFtp::Command cmd, TQStringList raw, TQIODevice *dev )
- : command(cmd), rawCmds(raw), is_ba(FALSE)
+ : command(cmd), rawCmds(raw), is_ba(false)
{
id = ++idCounter;
data.dev = dev;
@@ -293,7 +293,7 @@ TQFtpDTP::TQFtpDTP( TQFtpPI *p, TQObject *parent, const char *name ) :
TQObject( parent, name ),
socket( 0, "TQFtpDTP_socket" ),
pi( p ),
- callWriteData( FALSE )
+ callWriteData( false )
{
clearData();
@@ -311,13 +311,13 @@ TQFtpDTP::TQFtpDTP( TQFtpPI *p, TQObject *parent, const char *name ) :
void TQFtpDTP::setData( TQByteArray *ba )
{
- is_ba = TRUE;
+ is_ba = true;
data.ba = ba;
}
void TQFtpDTP::setDevice( TQIODevice *dev )
{
- is_ba = FALSE;
+ is_ba = false;
data.dev = dev;
}
@@ -334,7 +334,7 @@ void TQFtpDTP::writeData()
socket.close();
clearData();
} else if ( data.dev ) {
- callWriteData = FALSE;
+ callWriteData = false;
const int blockSize = 16*1024;
char buf[blockSize];
while ( !data.dev->atEnd() && socket.bytesToWrite()==0 ) {
@@ -352,7 +352,7 @@ void TQFtpDTP::writeData()
socket.close();
clearData();
} else {
- callWriteData = TRUE;
+ callWriteData = true;
}
}
}
@@ -377,7 +377,7 @@ void TQFtpDTP::abortConnection()
#if defined(TQFTPDTP_DEBUG)
tqDebug( "TQFtpDTP::abortConnection" );
#endif
- callWriteData = FALSE;
+ callWriteData = false;
clearData();
socket.clearPendingData();
@@ -389,7 +389,7 @@ bool TQFtpDTP::parseDir( const TQString &buffer, const TQString &userName, TQUrl
TQStringList lst = TQStringList::split( " ", buffer );
if ( lst.count() < 9 )
- return FALSE;
+ return false;
TQString tmp;
@@ -397,19 +397,19 @@ bool TQFtpDTP::parseDir( const TQString &buffer, const TQString &userName, TQUrl
tmp = lst[ 0 ];
if ( tmp[ 0 ] == TQChar( 'd' ) ) {
- info->setDir( TRUE );
- info->setFile( FALSE );
- info->setSymLink( FALSE );
+ info->setDir( true );
+ info->setFile( false );
+ info->setSymLink( false );
} else if ( tmp[ 0 ] == TQChar( '-' ) ) {
- info->setDir( FALSE );
- info->setFile( TRUE );
- info->setSymLink( FALSE );
+ info->setDir( false );
+ info->setFile( true );
+ info->setSymLink( false );
} else if ( tmp[ 0 ] == TQChar( 'l' ) ) {
- info->setDir( TRUE ); // #### todo
- info->setFile( FALSE );
- info->setSymLink( TRUE );
+ info->setDir( true ); // #### todo
+ info->setFile( false );
+ info->setSymLink( true );
} else {
- return FALSE;
+ return false;
}
static int user = 0;
@@ -510,7 +510,7 @@ bool TQFtpDTP::parseDir( const TQString &buffer, const TQString &userName, TQUrl
n = n.stripWhiteSpace();
info->setName( n );
}
- return TRUE;
+ return true;
}
void TQFtpDTP::socketConnected()
@@ -627,13 +627,13 @@ void TQFtpDTP::socketBytesWritten( int bytes )
*********************************************************************/
TQFtpPI::TQFtpPI( TQObject *parent ) :
TQObject( parent ),
- rawCommand(FALSE),
+ rawCommand(false),
dtp( this ),
commandSocket( 0, "TQFtpPI_socket" ),
state( Begin ), abortState( None ),
currentCmd( TQString::null ),
- waitForDtpToConnect( FALSE ),
- waitForDtpToClose( FALSE )
+ waitForDtpToConnect( false ),
+ waitForDtpToClose( false )
{
connect( &commandSocket, TQ_SIGNAL(hostFound()),
TQ_SLOT(hostFound()) );
@@ -663,22 +663,22 @@ void TQFtpPI::connectToHost( const TQString &host, TQ_UINT16 port )
are all done the finished() signal is emitted. When an error occurs, the
error() signal is emitted.
- If there are pending commands in the queue this functions returns FALSE and
- the \a cmds are not added to the queue; otherwise it returns TRUE.
+ If there are pending commands in the queue this functions returns false and
+ the \a cmds are not added to the queue; otherwise it returns true.
*/
bool TQFtpPI::sendCommands( const TQStringList &cmds )
{
if ( !pendingCommands.isEmpty() )
- return FALSE;
+ return false;
if ( commandSocket.state()!=TQSocket::Connected || state!=Idle ) {
emit error( TQFtp::NotConnected, TQFtp::tr( "Not connected" ) );
- return TRUE; // there are no pending commands
+ return true; // there are no pending commands
}
pendingCommands = cmds;
startNextCmd();
- return TRUE;
+ return true;
}
void TQFtpPI::clearPendingCommands()
@@ -799,7 +799,7 @@ void TQFtpPI::readyRead()
/*
Process a reply from the FTP server.
- Returns TRUE if the reply was processed or FALSE if the reply has to be
+ Returns true if the reply was processed or false if the reply has to be
processed at a later point.
*/
bool TQFtpPI::processReply()
@@ -816,8 +816,8 @@ bool TQFtpPI::processReply()
// connection is really closed to avoid short reads of the DTP
if ( 100*replyCode[0]+10*replyCode[1]+replyCode[2] == 226 ) {
if ( dtp.socketState() != TQSocket::Idle ) {
- waitForDtpToClose = TRUE;
- return FALSE;
+ waitForDtpToClose = true;
+ return false;
}
}
@@ -827,7 +827,7 @@ bool TQFtpPI::processReply()
break;
case WaitForAbortToFinish:
abortState = None;
- return TRUE;
+ return true;
default:
break;
}
@@ -840,14 +840,14 @@ bool TQFtpPI::processReply()
switch ( state ) {
case Begin:
if ( replyCode[0] == 1 ) {
- return TRUE;
+ return true;
} else if ( replyCode[0] == 2 ) {
state = Idle;
emit finished( TQFtp::tr( "Connected to host %1" ).arg( commandSocket.peerName() ) );
break;
}
// ### error handling
- return TRUE;
+ return true;
case Waiting:
if ( replyCode[0]<0 || replyCode[0]>5 )
state = Failure;
@@ -856,7 +856,7 @@ bool TQFtpPI::processReply()
break;
default:
// ### spontaneous message
- return TRUE;
+ return true;
}
#if defined(TQFTPPI_DEBUG)
// tqDebug( "TQFtpPI state: %d [processReply() intermediate]", state );
@@ -866,7 +866,7 @@ bool TQFtpPI::processReply()
int replyCodeInt = 100*replyCode[0] + 10*replyCode[1] + replyCode[2];
emit rawFtpReply( replyCodeInt, replyText );
if ( rawCommand ) {
- rawCommand = FALSE;
+ rawCommand = false;
} else if ( replyCodeInt == 227 ) {
// 227 Entering Passive Mode (h1,h2,h3,h4,p1,p2)
// rfc959 does not define this response precisely, and gives
@@ -883,7 +883,7 @@ bool TQFtpPI::processReply()
TQStringList lst = addrPortPattern.capturedTexts();
TQString host = lst[1] + "." + lst[2] + "." + lst[3] + "." + lst[4];
TQ_UINT16 port = ( lst[5].toUInt() << 8 ) + lst[6].toUInt();
- waitForDtpToConnect = TRUE;
+ waitForDtpToConnect = true;
dtp.connectToHost( host, port );
}
} else if ( replyCodeInt == 230 ) {
@@ -930,7 +930,7 @@ bool TQFtpPI::processReply()
#if defined(TQFTPPI_DEBUG)
// tqDebug( "TQFtpPI state: %d [processReply() end]", state );
#endif
- return TRUE;
+ return true;
}
#ifndef TQT_NO_TEXTCODEC
@@ -938,14 +938,14 @@ TQM_EXPORT_FTP TQTextCodec *tqt_ftp_filename_codec = 0;
#endif
/*
- Starts next pending command. Returns FALSE if there are no pending commands,
- otherwise it returns TRUE.
+ Starts next pending command. Returns false if there are no pending commands,
+ otherwise it returns true.
*/
bool TQFtpPI::startNextCmd()
{
if ( waitForDtpToConnect )
// don't process any new commands until we are connected
- return TRUE;
+ return true;
#if defined(TQFTPPI_DEBUG)
if ( state != Idle )
@@ -954,7 +954,7 @@ bool TQFtpPI::startNextCmd()
if ( pendingCommands.isEmpty() ) {
currentCmd = TQString::null;
emit finished( replyText );
- return FALSE;
+ return false;
}
currentCmd = pendingCommands.first();
pendingCommands.pop_front();
@@ -972,7 +972,7 @@ bool TQFtpPI::startNextCmd()
{
commandSocket.writeBlock( currentCmd.latin1(), currentCmd.length() );
}
- return TRUE;
+ return true;
}
void TQFtpPI::dtpConnectState( int s )
@@ -986,11 +986,11 @@ void TQFtpPI::dtpConnectState( int s )
else
return;
}
- waitForDtpToClose = FALSE;
+ waitForDtpToClose = false;
readyRead();
return;
case TQFtpDTP::CsConnected:
- waitForDtpToConnect = FALSE;
+ waitForDtpToConnect = false;
startNextCmd();
return;
case TQFtpDTP::CsHostNotFound:
@@ -1013,11 +1013,11 @@ class TQFtpPrivate
{
public:
TQFtpPrivate() :
- close_waitForStateChange(FALSE),
+ close_waitForStateChange(false),
state( TQFtp::Unconnected ),
error( TQFtp::NoError ),
- npWaitForLoginDone( FALSE )
- { pending.setAutoDelete( TRUE ); }
+ npWaitForLoginDone( false )
+ { pending.setAutoDelete( true ); }
TQFtpPI pi;
TQPtrList<TQFtpCommand> pending;
@@ -1039,7 +1039,7 @@ static TQFtpPrivate* d( const TQFtp* foo )
{
if ( !d_ptr ) {
d_ptr = new TQPtrDict<TQFtpPrivate>;
- d_ptr->setAutoDelete( TRUE );
+ d_ptr->setAutoDelete( true );
tqAddPostRoutine( cleanup_d_ptr );
}
TQFtpPrivate* ret = d_ptr->find( (void*)foo );
@@ -1158,14 +1158,14 @@ static void delete_d( const TQFtp* foo )
stateChanged( HostLookup )
stateChanged( Connecting )
stateChanged( Connected )
- finished( 1, FALSE )
+ finished( 1, false )
start( 2 )
stateChanged( LoggedIn )
- finished( 2, FALSE )
+ finished( 2, false )
start( 3 )
- finished( 3, FALSE )
+ finished( 3, false )
start( 4 )
dataTransferProgress( 0, 3798 )
@@ -1173,14 +1173,14 @@ static void delete_d( const TQFtp* foo )
readyRead()
dataTransferProgress( 3798, 3798 )
readyRead()
- finished( 4, FALSE )
+ finished( 4, false )
start( 5 )
stateChanged( Closing )
stateChanged( Unconnected )
- finished( 5, FALSE )
+ finished( 5, false )
- done( FALSE )
+ done( false )
\endcode
The dataTransferProgress() signal in the above example is useful
@@ -1199,12 +1199,12 @@ static void delete_d( const TQFtp* foo )
stateChanged( HostLookup )
stateChanged( Connecting )
stateChanged( Connected )
- finished( 1, FALSE )
+ finished( 1, false )
start( 2 )
- finished( 2, TRUE )
+ finished( 2, true )
- done( TRUE )
+ done( true )
\endcode
You can then get details about the error with the error() and
@@ -1361,8 +1361,8 @@ void TQFtp::init()
\fn void TQFtp::commandFinished( int id, bool error )
This signal is emitted when processing the command identified by
- \a id has finished. \a error is TRUE if an error occurred during
- the processing; otherwise \a error is FALSE.
+ \a id has finished. \a error is true if an error occurred during
+ the processing; otherwise \a error is false.
\sa commandStarted() done() error() errorString()
*/
@@ -1372,8 +1372,8 @@ void TQFtp::init()
This signal is emitted when the last pending command has finished;
(it is emitted after the last command's commandFinished() signal).
- \a error is TRUE if an error occurred during the processing;
- otherwise \a error is FALSE.
+ \a error is true if an error occurred during the processing;
+ otherwise \a error is false.
\sa commandFinished() error() errorString()
*/
@@ -1797,11 +1797,11 @@ TQByteArray TQFtp::readAll()
commandFinished() signal has not been emitted), this function
sends an \c ABORT command to the server. When the server replies
that the command is aborted, the commandFinished() signal with the
- \c error argument set to \c TRUE is emitted for the command. Due
+ \c error argument set to \c true is emitted for the command. Due
to timing issues, it is possible that the command had already
finished before the abort request reached the server, in which
case, the commandFinished() signal is emitted with the \c error
- argument set to \c FALSE.
+ argument set to \c false.
For all other commands that are affected by the abort(), no
signals are emitted.
@@ -1813,7 +1813,7 @@ TQByteArray TQFtp::readAll()
\warning Some FTP servers, for example the BSD FTP daemon (version
0.3), wrongly return a positive reply even when an abort has
occurred. For these servers the commandFinished() signal has its
- error flag set to \c FALSE, even though the command did not
+ error flag set to \c false, even though the command did not
complete successfully.
\sa clearPendingCommands()
@@ -1880,8 +1880,8 @@ TQIODevice* TQFtp::currentDevice() const
}
/*!
- Returns TRUE if there are any commands scheduled that have not yet
- been executed; otherwise returns FALSE.
+ Returns true if there are any commands scheduled that have not yet
+ been executed; otherwise returns false.
The command that is being executed is \e not considered as a
scheduled command.
@@ -1927,7 +1927,7 @@ TQFtp::State TQFtp::state() const
/*!
Returns the last error that occurred. This is useful to find out
what when wrong when receiving a commandFinished() or a done()
- signal with the \c error argument set to \c TRUE.
+ signal with the \c error argument set to \c true.
If you start a new command, the error status is reset to \c NoError.
*/
@@ -1941,7 +1941,7 @@ TQFtp::Error TQFtp::error() const
Returns a human-readable description of the last error that
occurred. This is useful for presenting a error message to the
user when receiving a commandFinished() or a done() signal with
- the \c error argument set to \c TRUE.
+ the \c error argument set to \c true.
The error string is often (but not always) the reply from the
server, so it is not always possible to translate the string. If
@@ -2022,15 +2022,15 @@ void TQFtp::piFinished( const TQString& )
// don't get the commandFinished() signal before the stateChanged()
// signal.
if ( d->state != TQFtp::Unconnected ) {
- d->close_waitForStateChange = TRUE;
+ d->close_waitForStateChange = true;
return;
}
}
- emit commandFinished( c->id, FALSE );
+ emit commandFinished( c->id, false );
d->pending.removeFirst();
if ( d->pending.isEmpty() ) {
- emit done( FALSE );
+ emit done( false );
} else {
startNextCommand();
}
@@ -2085,11 +2085,11 @@ void TQFtp::piError( int errorCode, const TQString &text )
d->pi.clearPendingCommands();
clearPendingCommands();
- emit commandFinished( c->id, TRUE );
+ emit commandFinished( c->id, true );
d->pending.removeFirst();
if ( d->pending.isEmpty() )
- emit done( TRUE );
+ emit done( true );
else
startNextCommand();
}
@@ -2100,7 +2100,7 @@ void TQFtp::piConnectState( int state )
d->state = (State)state;
emit stateChanged( d->state );
if ( d->close_waitForStateChange ) {
- d->close_waitForStateChange = FALSE;
+ d->close_waitForStateChange = false;
piFinished( tr( "Connection closed" ) );
}
}
@@ -2109,7 +2109,7 @@ void TQFtp::piFtpReply( int code, const TQString &text )
{
if ( currentCommand() == RawCommand ) {
TQFtpPrivate *d = ::d( this );
- d->pi.rawCommand = TRUE;
+ d->pi.rawCommand = true;
emit rawCommandReply( code, text );
}
}
@@ -2206,7 +2206,7 @@ bool TQFtp::checkConnection( TQNetworkOperation *op )
connect( this, TQ_SIGNAL(readyRead()),
this, TQ_SLOT(npReadyRead()) );
- d->npWaitForLoginDone = TRUE;
+ d->npWaitForLoginDone = true;
switch ( op->operation() ) {
case OpGet:
case OpPut:
@@ -2225,8 +2225,8 @@ bool TQFtp::checkConnection( TQNetworkOperation *op )
}
if ( state() == LoggedIn )
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
/*! \reimp
@@ -2249,7 +2249,7 @@ void TQFtp::parseDir( const TQString &buffer, TQUrlInfo &info )
void TQFtp::npListInfo( const TQUrlInfo & i )
{
if ( url() ) {
- TQRegExp filt( url()->nameFilter(), FALSE, TRUE );
+ TQRegExp filt( url()->nameFilter(), false, true );
if ( i.isDir() || filt.search( i.name() ) != -1 ) {
emit newChild( i, operationInProgress() );
}
@@ -2262,7 +2262,7 @@ void TQFtp::npDone( bool err )
{
TQFtpPrivate *d = ::d( this );
- bool emitFinishedSignal = FALSE;
+ bool emitFinishedSignal = false;
TQNetworkOperation *op = operationInProgress();
if ( op ) {
if ( err ) {
@@ -2292,7 +2292,7 @@ void TQFtp::npDone( bool err )
break;
}
}
- emitFinishedSignal = TRUE;
+ emitFinishedSignal = true;
} else if ( !d->npWaitForLoginDone ) {
switch ( op->operation() ) {
case OpRemove:
@@ -2301,7 +2301,7 @@ void TQFtp::npDone( bool err )
case OpMkDir:
{
TQUrlInfo inf( op->arg( 0 ), 0, "", "", 0, TQDateTime(),
- TQDateTime(), TRUE, FALSE, FALSE, TRUE, TRUE, TRUE );
+ TQDateTime(), true, false, false, true, true, true );
emit newChild( inf, op );
emit createdDirectory( inf, op );
}
@@ -2313,10 +2313,10 @@ void TQFtp::npDone( bool err )
break;
}
op->setState( StDone );
- emitFinishedSignal = TRUE;
+ emitFinishedSignal = true;
}
}
- d->npWaitForLoginDone = FALSE;
+ d->npWaitForLoginDone = false;
if ( state() == Unconnected ) {
disconnect( this, TQ_SIGNAL(listInfo(const TQUrlInfo&)),
diff --git a/src/network/tqhostaddress.cpp b/src/network/tqhostaddress.cpp
index 07d08c492..766ca006f 100644
--- a/src/network/tqhostaddress.cpp
+++ b/src/network/tqhostaddress.cpp
@@ -45,7 +45,7 @@
class TQHostAddressPrivate
{
public:
- TQHostAddressPrivate( TQ_UINT32 a_=0 ) : a(a_), isIp4(TRUE)
+ TQHostAddressPrivate( TQ_UINT32 a_=0 ) : a(a_), isIp4(true)
{
}
TQHostAddressPrivate( TQ_UINT8 *a_ );
@@ -70,14 +70,14 @@ private:
friend class TQHostAddress;
};
-TQHostAddressPrivate::TQHostAddressPrivate(TQ_UINT8 *a_) : a(0), isIp4(FALSE)
+TQHostAddressPrivate::TQHostAddressPrivate(TQ_UINT8 *a_) : a(0), isIp4(false)
{
for ( int i=0; i<16; i++ ) {
a6.c[i] = a_[i];
}
}
-TQHostAddressPrivate::TQHostAddressPrivate(const Q_IPV6ADDR &a_) : a(0), isIp4(FALSE)
+TQHostAddressPrivate::TQHostAddressPrivate(const Q_IPV6ADDR &a_) : a(0), isIp4(false)
{
a6 = a_;
}
@@ -212,31 +212,31 @@ void TQHostAddress::setAddress( TQ_UINT8 *ip6Addr )
#ifndef TQT_NO_STRINGLIST
static bool parseIp4(const TQString& address, TQ_UINT32 *addr)
{
- TQStringList ipv4 = TQStringList::split(".", address, FALSE);
+ TQStringList ipv4 = TQStringList::split(".", address, false);
if (ipv4.count() == 4) {
int i = 0;
- bool ok = TRUE;
+ bool ok = true;
while(ok && i < 4) {
uint byteValue = ipv4[i].toUInt(&ok);
if (byteValue > 255)
- ok = FALSE;
+ ok = false;
if (ok)
*addr = (*addr << 8) + byteValue;
++i;
}
if (ok)
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/*!
\overload
Sets the IPv4 or IPv6 address specified by the string
- representation \a address (e.g. "127.0.0.1"). Returns TRUE and
+ representation \a address (e.g. "127.0.0.1"). Returns true and
sets the address if the address was successfully parsed; otherwise
- returns FALSE and leaves the address unchanged.
+ returns false and leaves the address unchanged.
*/
bool TQHostAddress::setAddress(const TQString& address)
{
@@ -246,46 +246,46 @@ bool TQHostAddress::setAddress(const TQString& address)
TQ_UINT32 maybeIp4 = 0;
if (parseIp4(address, &maybeIp4)) {
setAddress(maybeIp4);
- return TRUE;
+ return true;
}
// try ipv6
- TQStringList ipv6 = TQStringList::split(":", a, TRUE);
+ TQStringList ipv6 = TQStringList::split(":", a, true);
int count = (int)ipv6.count();
if (count < 3)
- return FALSE; // there must be at least two ":"
+ return false; // there must be at least two ":"
if (count > 8)
- return FALSE; // maximum of seven ":" exceeded
+ return false; // maximum of seven ":" exceeded
TQ_UINT8 maybeIp6[16];
int mc = 16;
int fillCount = 9 - count;
for (int i=count-1; i>=0; --i) {
if ( mc <= 0 )
- return FALSE;
+ return false;
if (ipv6[i].isEmpty()) {
if (i==count-1) {
// special case: ":" is last character
if (!ipv6[i-1].isEmpty())
- return FALSE;
+ return false;
maybeIp6[--mc] = 0;
maybeIp6[--mc] = 0;
} else if (i==0) {
// special case: ":" is first character
if (!ipv6[i+1].isEmpty())
- return FALSE;
+ return false;
maybeIp6[--mc] = 0;
maybeIp6[--mc] = 0;
} else {
for (int j=0; j<fillCount; ++j) {
if ( mc <= 0 )
- return FALSE;
+ return false;
maybeIp6[--mc] = 0;
maybeIp6[--mc] = 0;
}
}
} else {
- bool ok = FALSE;
+ bool ok = false;
uint byteValue = ipv6[i].toUInt(&ok, 16);
if (ok && byteValue <= 0xffff) {
maybeIp6[--mc] = byteValue & 0xff;
@@ -294,24 +294,24 @@ bool TQHostAddress::setAddress(const TQString& address)
if (i == count-1) {
// parse the ipv4 part of a mixed type
if (!parseIp4(ipv6[i], &maybeIp4))
- return FALSE;
+ return false;
maybeIp6[--mc] = maybeIp4 & 0xff;
maybeIp6[--mc] = (maybeIp4 >> 8) & 0xff;
maybeIp6[--mc] = (maybeIp4 >> 16) & 0xff;
maybeIp6[--mc] = (maybeIp4 >> 24) & 0xff;
--fillCount;
} else {
- return FALSE;
+ return false;
}
}
}
}
if (mc == 0) {
setAddress(maybeIp6);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
#endif
@@ -326,8 +326,8 @@ bool TQHostAddress::isIp4Addr() const
}
/*!
- Returns TRUE if the host address represents an IPv4 address;
- otherwise returns FALSE.
+ Returns true if the host address represents an IPv4 address;
+ otherwise returns false.
*/
bool TQHostAddress::isIPv4Address() const
{
@@ -350,7 +350,7 @@ TQ_UINT32 TQHostAddress::ip4Addr() const
For example, if the address is 127.0.0.1, the returned value is
2130706433 (i.e. 0x7f000001).
- This value is only valid when isIp4Addr() returns TRUE.
+ This value is only valid when isIp4Addr() returns true.
\sa toString()
*/
@@ -360,8 +360,8 @@ TQ_UINT32 TQHostAddress::toIPv4Address() const
}
/*!
- Returns TRUE if the host address represents an IPv6 address;
- otherwise returns FALSE.
+ Returns true if the host address represents an IPv6 address;
+ otherwise returns false.
*/
bool TQHostAddress::isIPv6Address() const
{
@@ -381,7 +381,7 @@ bool TQHostAddress::isIPv6Address() const
}
\endcode
- This value is only valid when isIPv6Address() returns TRUE.
+ This value is only valid when isIPv6Address() returns true.
\sa toString()
*/
@@ -424,8 +424,8 @@ TQString TQHostAddress::toString() const
/*!
- Returns TRUE if this host address is the same as \a other;
- otherwise returns FALSE.
+ Returns true if this host address is the same as \a other;
+ otherwise returns false.
*/
bool TQHostAddress::operator==( const TQHostAddress & other ) const
{
@@ -434,7 +434,7 @@ bool TQHostAddress::operator==( const TQHostAddress & other ) const
/*!
- Returns TRUE if this host address is null (INADDR_ANY or in6addr_any). The
+ Returns true if this host address is null (INADDR_ANY or in6addr_any). The
default constructor creates a null address, and that address isn't valid
for any particular host or interface.
*/
@@ -445,9 +445,9 @@ bool TQHostAddress::isNull() const
int i = 0;
while( i < 16 ) {
if ( d->a6.c[i++] != 0 )
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
#endif //TQT_NO_NETWORK
diff --git a/src/network/tqhttp.cpp b/src/network/tqhttp.cpp
index 389a731c7..bea20e42b 100644
--- a/src/network/tqhttp.cpp
+++ b/src/network/tqhttp.cpp
@@ -69,7 +69,7 @@ public:
chunkedSize( -1 ),
idleTimer( 0 )
{
- pending.setAutoDelete( TRUE );
+ pending.setAutoDelete( true );
}
TQSocket socket;
@@ -128,7 +128,7 @@ int TQHttpRequest::idCounter = 0;
bool TQHttpRequest::hasRequestHeader()
{
- return FALSE;
+ return false;
}
TQHttpRequestHeader TQHttpRequest::requestHeader()
@@ -148,14 +148,14 @@ public:
TQHttpNormalRequest( const TQHttpRequestHeader &h, TQIODevice *d, TQIODevice *t ) :
header(h), to(t)
{
- is_ba = FALSE;
+ is_ba = false;
data.dev = d;
}
TQHttpNormalRequest( const TQHttpRequestHeader &h, TQByteArray *d, TQIODevice *t ) :
header(h), to(t)
{
- is_ba = TRUE;
+ is_ba = true;
data.ba = d;
}
@@ -216,7 +216,7 @@ void TQHttpNormalRequest::start( TQHttp *http )
bool TQHttpNormalRequest::hasRequestHeader()
{
- return TRUE;
+ return true;
}
TQHttpRequestHeader TQHttpNormalRequest::requestHeader()
@@ -389,7 +389,7 @@ void TQHttpCloseRequest::start( TQHttp *http )
Constructs an empty HTTP header.
*/
TQHttpHeader::TQHttpHeader()
- : valid( TRUE )
+ : valid( true )
{
}
@@ -411,7 +411,7 @@ TQHttpHeader::TQHttpHeader( const TQHttpHeader& header )
key, colon, space, value.
*/
TQHttpHeader::TQHttpHeader( const TQString& str )
- : valid( TRUE )
+ : valid( true )
{
parse( str );
}
@@ -434,7 +434,7 @@ TQHttpHeader& TQHttpHeader::operator=( const TQHttpHeader& h )
}
/*!
- Returns TRUE if the HTTP header is valid; otherwise returns FALSE.
+ Returns true if the HTTP header is valid; otherwise returns false.
A TQHttpHeader is invalid if it was created by parsing a malformed string.
*/
@@ -448,7 +448,7 @@ bool TQHttpHeader::isValid() const
the keys/values it finds. If the string is not parsed successfully
the TQHttpHeader becomes \link isValid() invalid\endlink.
- Returns TRUE if \a str was successfully parsed; otherwise returns FALSE.
+ Returns true if \a str was successfully parsed; otherwise returns false.
\sa toString()
*/
@@ -457,12 +457,12 @@ bool TQHttpHeader::parse( const TQString& str )
TQStringList lst;
int pos = str.find( '\n' );
if ( pos > 0 && str.at( pos - 1 ) == '\r' )
- lst = TQStringList::split( "\r\n", str.stripWhiteSpace(), FALSE );
+ lst = TQStringList::split( "\r\n", str.stripWhiteSpace(), false );
else
- lst = TQStringList::split( "\n", str.stripWhiteSpace(), FALSE );
+ lst = TQStringList::split( "\n", str.stripWhiteSpace(), false );
if ( lst.isEmpty() )
- return TRUE;
+ return true;
TQStringList lines;
TQStringList::Iterator it = lst.begin();
@@ -483,11 +483,11 @@ bool TQHttpHeader::parse( const TQString& str )
it = lines.begin();
for( ; it != lines.end(); ++it ) {
if ( !parseLine( *it, number++ ) ) {
- valid = FALSE;
- return FALSE;
+ valid = false;
+ return false;
}
}
- return TRUE;
+ return true;
}
/*! \internal
@@ -519,8 +519,8 @@ TQStringList TQHttpHeader::keys() const
}
/*!
- Returns TRUE if the HTTP header has an entry with the given \a
- key; otherwise returns FALSE.
+ Returns true if the HTTP header has an entry with the given \a
+ key; otherwise returns false.
\sa value() setValue() keys()
*/
@@ -557,8 +557,8 @@ void TQHttpHeader::removeValue( const TQString& key )
/*! \internal
Parses the single HTTP header line \a line which has the format
key, colon, space, value, and adds key/value to the headers. The
- linenumber is \a number. Returns TRUE if the line was successfully
- parsed and the key/value added; otherwise returns FALSE.
+ linenumber is \a number. Returns true if the line was successfully
+ parsed and the key/value added; otherwise returns false.
\sa parse()
*/
@@ -566,11 +566,11 @@ bool TQHttpHeader::parseLine( const TQString& line, int )
{
int i = line.find( ":" );
if ( i == -1 )
- return FALSE;
+ return false;
values.insert( line.left( i ).stripWhiteSpace().lower(), line.mid( i + 1 ).stripWhiteSpace() );
- return TRUE;
+ return true;
}
/*!
@@ -595,8 +595,8 @@ TQString TQHttpHeader::toString() const
}
/*!
- Returns TRUE if the header has an entry for the special HTTP
- header field \c content-length; otherwise returns FALSE.
+ Returns true if the header has an entry for the special HTTP
+ header field \c content-length; otherwise returns false.
\sa contentLength() setContentLength()
*/
@@ -628,8 +628,8 @@ void TQHttpHeader::setContentLength( int len )
}
/*!
- Returns TRUE if the header has an entry for the the special HTTP
- header field \c content-type; otherwise returns FALSE.
+ Returns true if the header has an entry for the the special HTTP
+ header field \c content-type; otherwise returns false.
\sa contentType() setContentType()
*/
@@ -701,7 +701,7 @@ void TQHttpHeader::setContentType( const TQString& type )
*/
TQHttpResponseHeader::TQHttpResponseHeader()
{
- setValid( FALSE );
+ setValid( false );
}
/*!
@@ -744,7 +744,7 @@ TQHttpResponseHeader::TQHttpResponseHeader( const TQString& str )
*/
void TQHttpResponseHeader::setStatusLine( int code, const TQString& text, int majorVer, int minorVer )
{
- setValid( TRUE );
+ setValid( true );
statCode = code;
reasonPhr = text;
majVer = majorVer;
@@ -800,7 +800,7 @@ bool TQHttpResponseHeader::parseLine( const TQString& line, int number )
TQString l = line.simplifyWhiteSpace();
if ( l.length() < 10 )
- return FALSE;
+ return false;
if ( l.left( 5 ) == "HTTP/" && l[5].isDigit() && l[6] == '.' &&
l[7].isDigit() && l[8] == ' ' && l[9].isDigit() ) {
@@ -816,10 +816,10 @@ bool TQHttpResponseHeader::parseLine( const TQString& line, int number )
reasonPhr = TQString::null;
}
} else {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
/*! \reimp
@@ -878,7 +878,7 @@ TQString TQHttpResponseHeader::toString() const
TQHttpRequestHeader::TQHttpRequestHeader()
: TQHttpHeader()
{
- setValid( FALSE );
+ setValid( false );
}
/*!
@@ -920,7 +920,7 @@ TQHttpRequestHeader::TQHttpRequestHeader( const TQString& str )
*/
void TQHttpRequestHeader::setRequest( const TQString& method, const TQString& path, int majorVer, int minorVer )
{
- setValid( TRUE );
+ setValid( true );
m = method;
p = path;
majVer = majorVer;
@@ -985,13 +985,13 @@ bool TQHttpRequestHeader::parseLine( const TQString& line, int number )
v[5].isDigit() && v[6] == '.' && v[7].isDigit() ) {
majVer = v[5].latin1() - '0';
minVer = v[7].latin1() - '0';
- return TRUE;
+ return true;
}
}
}
}
- return FALSE;
+ return false;
}
/*! \reimp
@@ -1096,7 +1096,7 @@ TQString TQHttpRequestHeader::toString() const
\code
requestStarted( 1 )
- requestFinished( 1, FALSE )
+ requestFinished( 1, false )
requestStarted( 2 )
stateChanged( Connecting )
@@ -1109,9 +1109,9 @@ TQString TQHttpRequestHeader::toString() const
dataReadProgress( 18300, 0 )
readyRead( responseheader )
stateChanged( Connected )
- requestFinished( 2, FALSE )
+ requestFinished( 2, false )
- done( FALSE )
+ done( false )
stateChanged( Closing )
stateChanged( Unconnected )
@@ -1152,13 +1152,13 @@ TQString TQHttpRequestHeader::toString() const
\code
requestStarted( 1 )
- requestFinished( 1, FALSE )
+ requestFinished( 1, false )
requestStarted( 2 )
stateChanged( HostLookup )
- requestFinished( 2, TRUE )
+ requestFinished( 2, true )
- done( TRUE )
+ done( true )
stateChanged( Unconnected )
\endcode
@@ -1384,8 +1384,8 @@ TQHttp::~TQHttp()
\fn void TQHttp::requestFinished( int id, bool error )
This signal is emitted when processing the request identified by
- \a id has finished. \a error is TRUE if an error occurred during
- the processing; otherwise \a error is FALSE.
+ \a id has finished. \a error is true if an error occurred during
+ the processing; otherwise \a error is false.
\sa requestStarted() done() error() errorString()
*/
@@ -1395,8 +1395,8 @@ TQHttp::~TQHttp()
This signal is emitted when the last pending request has finished;
(it is emitted after the last request's requestFinished() signal).
- \a error is TRUE if an error occurred during the processing;
- otherwise \a error is FALSE.
+ \a error is true if an error occurred during the processing;
+ otherwise \a error is false.
\sa requestFinished() error() errorString()
*/
@@ -1405,12 +1405,12 @@ TQHttp::~TQHttp()
Aborts the current request and deletes all scheduled requests.
For the current request, the requestFinished() signal with the \c
- error argument \c TRUE is emitted. For all other requests that are
+ error argument \c true is emitted. For all other requests that are
affected by the abort(), no signals are emitted.
Since this slot also deletes the scheduled requests, there are no
requests left and the done() signal is emitted (with the \c error
- argument \c TRUE).
+ argument \c true).
\sa clearPendingRequests()
*/
@@ -1497,7 +1497,7 @@ int TQHttp::currentId() const
Returns the request header of the HTTP request being executed. If
the request is one issued by setHost() or closeConnection(), it
returns an invalid request header, i.e.
- TQHttpRequestHeader::isValid() returns FALSE.
+ TQHttpRequestHeader::isValid() returns false.
\sa currentId()
*/
@@ -1546,8 +1546,8 @@ TQIODevice* TQHttp::currentDestinationDevice() const
}
/*!
- Returns TRUE if there are any requests scheduled that have not yet
- been executed; otherwise returns FALSE.
+ Returns true if there are any requests scheduled that have not yet
+ been executed; otherwise returns false.
The request that is being executed is \e not considered as a
scheduled request.
@@ -1825,10 +1825,10 @@ void TQHttp::finishedWithSuccess()
if ( r == 0 )
return;
- emit requestFinished( r->id, FALSE );
+ emit requestFinished( r->id, false );
d->pending.removeFirst();
if ( d->pending.isEmpty() ) {
- emit done( FALSE );
+ emit done( false );
} else {
startNextRequest();
}
@@ -1842,10 +1842,10 @@ void TQHttp::finishedWithError( const TQString& detail, int errorCode )
d->error = (Error)errorCode;
d->errorString = detail;
- emit requestFinished( r->id, TRUE );
+ emit requestFinished( r->id, true );
d->pending.clear();
- emit done( TRUE );
+ emit done( true );
}
void TQHttp::slotClosed()
@@ -1944,19 +1944,19 @@ void TQHttp::slotReadyRead()
if ( d->state != Reading ) {
setState( Reading );
d->buffer = TQByteArray();
- d->readHeader = TRUE;
+ d->readHeader = true;
d->headerStr = "";
d->bytesDone = 0;
d->chunkedSize = -1;
}
while ( d->readHeader ) {
- bool end = FALSE;
+ bool end = false;
TQString tmp;
while ( !end && d->socket.canReadLine() ) {
tmp = d->socket.readLine();
if ( tmp == "\r\n" || tmp == "\n" )
- end = TRUE;
+ end = true;
else
d->headerStr += tmp;
}
@@ -1983,7 +1983,7 @@ void TQHttp::slotReadyRead()
// POST method, we send both the request header and data in
// one chunk.
if (d->response.statusCode() != 100) {
- d->readHeader = FALSE;
+ d->readHeader = false;
if ( d->response.hasKey( "transfer-encoding" ) &&
d->response.value( "transfer-encoding" ).lower().contains( "chunked" ) )
d->chunkedSize = 0;
@@ -1993,10 +1993,10 @@ void TQHttp::slotReadyRead()
}
if ( !d->readHeader ) {
- bool everythingRead = FALSE;
+ bool everythingRead = false;
if ( currentRequest().method() == "HEAD" ) {
- everythingRead = TRUE;
+ everythingRead = true;
} else {
TQ_ULONG n = d->socket.bytesAvailable();
TQByteArray *arr = 0;
@@ -2030,7 +2030,7 @@ void TQHttp::slotReadyRead()
d->chunkedSize = -1;
}
if ( d->chunkedSize == -1 ) {
- everythingRead = TRUE;
+ everythingRead = true;
break;
}
@@ -2075,7 +2075,7 @@ void TQHttp::slotReadyRead()
arr->resize( read );
}
if ( d->bytesDone + bytesAvailable() + n == d->response.contentLength() )
- everythingRead = TRUE;
+ everythingRead = true;
} else if ( n > 0 ) {
// workaround for VC++ bug
TQByteArray temp = d->socket.readAll();
@@ -2137,7 +2137,7 @@ TQHttp::State TQHttp::state() const
/*!
Returns the last error that occurred. This is useful to find out
what happened when receiving a requestFinished() or a done()
- signal with the \c error argument \c TRUE.
+ signal with the \c error argument \c true.
If you start a new request, the error status is reset to \c NoError.
*/
@@ -2150,7 +2150,7 @@ TQHttp::Error TQHttp::error() const
Returns a human-readable description of the last error that
occurred. This is useful to present a error message to the user
when receiving a requestFinished() or a done() signal with the \c
- error argument \c TRUE.
+ error argument \c true.
*/
TQString TQHttp::errorString() const
{
diff --git a/src/network/tqserversocket.cpp b/src/network/tqserversocket.cpp
index 456add216..d65eac0ad 100644
--- a/src/network/tqserversocket.cpp
+++ b/src/network/tqserversocket.cpp
@@ -147,7 +147,7 @@ TQServerSocket::TQServerSocket( TQObject *parent, const char *name )
/*!
- Returns TRUE if the construction succeeded; otherwise returns FALSE.
+ Returns true if the construction succeeded; otherwise returns false.
*/
bool TQServerSocket::ok() const
{
@@ -166,7 +166,7 @@ void TQServerSocket::init( const TQHostAddress & address, TQ_UINT16 port, int ba
// same address-port is in TIME_WAIT. Under Windows this is possible anyway
// -- furthermore, the meaning of reusable is different: it means that you
// can use the same address-port for multiple listening sockets.
- d->s->setAddressReusable( TRUE );
+ d->s->setAddressReusable( true );
#endif
if ( d->s->bind( address, port )
&& d->s->listen( backlog ) )
@@ -219,7 +219,7 @@ void TQServerSocket::incomingConnection( int )
/*!
Returns the port number on which this server socket listens. This
is always non-zero; if you specify 0 in the constructor,
- TQServerSocket will pick a non-zero port itself. ok() must be TRUE
+ TQServerSocket will pick a non-zero port itself. ok() must be true
before calling this function.
\sa address() TQSocketDevice::port()
@@ -245,7 +245,7 @@ int TQServerSocket::socket() const
/*!
Returns the address on which this object listens, or 0.0.0.0 if
- this object listens on more than one address. ok() must be TRUE
+ this object listens on more than one address. ok() must be true
before calling this function.
\sa port() TQSocketDevice::address()
diff --git a/src/network/tqsocket.cpp b/src/network/tqsocket.cpp
index 9314318d1..91d48cec2 100644
--- a/src/network/tqsocket.cpp
+++ b/src/network/tqsocket.cpp
@@ -152,7 +152,7 @@ TQSocketPrivate::TQSocketPrivate()
dns4 = 0;
dns6 = 0;
#endif
- wba.setAutoDelete( TRUE );
+ wba.setAutoDelete( true );
}
TQSocketPrivate::~TQSocketPrivate()
@@ -208,8 +208,8 @@ void TQSocketPrivate::setSocketDevice( TQSocket *q, TQSocketDevice *device )
( addr.isIPv4Address() ?
TQSocketDevice::IPv4 :
TQSocketDevice::IPv6 ), 0 );
- socket->setBlocking( FALSE );
- socket->setAddressReusable( TRUE );
+ socket->setBlocking( false );
+ socket->setAddressReusable( true );
}
rsn = new TQSocketNotifier( socket->socket(),
@@ -218,9 +218,9 @@ void TQSocketPrivate::setSocketDevice( TQSocket *q, TQSocketDevice *device )
TQSocketNotifier::Write, q, "write" );
TQObject::connect( rsn, TQ_SIGNAL(activated(int)), q, TQ_SLOT(sn_read()) );
- rsn->setEnabled( FALSE );
+ rsn->setEnabled( false );
TQObject::connect( wsn, TQ_SIGNAL(activated(int)), q, TQ_SLOT(sn_write()) );
- wsn->setEnabled( FALSE );
+ wsn->setEnabled( false );
}
/*!
@@ -504,14 +504,14 @@ void TQSocket::tryConnecting()
// or do multiple TCP-level connects at a time, with staggered
// starts to avoid bandwidth waste and cause fewer
// "connect-and-abort" errors. but that later.)
- bool stuck = TRUE;
+ bool stuck = true;
while( stuck ) {
- stuck = FALSE;
+ stuck = false;
if ( d->socket &&
- d->socket->connect( d->addr, d->port ) == FALSE ) {
+ !d->socket->connect( d->addr, d->port ) ) {
if ( d->socket->error() == TQSocketDevice::NoError ) {
if ( d->wsn )
- d->wsn->setEnabled( TRUE );
+ d->wsn->setEnabled( true );
return; // not serious, try again later
}
@@ -537,7 +537,7 @@ void TQSocket::tryConnecting()
d->addr = *d->addresses.begin();
d->addresses.remove( d->addresses.begin() );
d->setSocketDevice( this, 0 );
- stuck = TRUE;
+ stuck = true;
#if defined(TQSOCKET_DEBUG)
tqDebug( "TQSocket (%s)::tryConnecting: Trying IP address %s",
name(), d->addr.toString().ascii() );
@@ -547,7 +547,7 @@ void TQSocket::tryConnecting()
// The socket write notifier will fire when the connection succeeds
if ( d->wsn )
- d->wsn->setEnabled( TRUE );
+ d->wsn->setEnabled( true );
}
#endif
}
@@ -656,11 +656,11 @@ bool TQSocket::open( int m )
#if defined(QT_CHECK_STATE)
tqWarning( "TQSocket::open: Already open" );
#endif
- return FALSE;
+ return false;
}
TQIODevice::setMode( m & IO_ReadWrite );
setState( IO_Open );
- return TRUE;
+ return true;
}
@@ -697,9 +697,9 @@ void TQSocket::close()
if ( d->socket && d->wsize ) { // there's data to be written
d->state = Closing;
if ( d->rsn )
- d->rsn->setEnabled( FALSE );
+ d->rsn->setEnabled( false );
if ( d->wsn )
- d->wsn->setEnabled( TRUE );
+ d->wsn->setEnabled( true );
d->rba.clear(); // clear incoming data
return;
}
@@ -719,7 +719,7 @@ void TQSocket::close()
bool TQSocket::consumeWriteBuf( TQ_ULONG nbytes )
{
if ( nbytes <= 0 || nbytes > d->wsize )
- return FALSE;
+ return false;
#if defined(TQSOCKET_DEBUG)
tqDebug( "TQSocket (%s): skipWriteBuf %d bytes", name(), (int)nbytes );
#endif
@@ -737,7 +737,7 @@ bool TQSocket::consumeWriteBuf( TQ_ULONG nbytes )
break;
}
}
- return TRUE;
+ return true;
}
@@ -750,7 +750,7 @@ void TQSocket::flush()
{
if ( !d->socket )
return;
- bool osBufferFull = FALSE;
+ bool osBufferFull = false;
int consumed = 0;
while ( !osBufferFull && d->state >= Connecting && d->wsize > 0 ) {
#if defined(TQSOCKET_DEBUG)
@@ -781,20 +781,20 @@ void TQSocket::flush()
}
nwritten = d->socket->writeBlock( out.data(), i );
if ( d->wsn )
- d->wsn->setEnabled( FALSE ); // the TQSocketNotifier documentation says so
+ d->wsn->setEnabled( false ); // the TQSocketNotifier documentation says so
} else {
// Big block, write it immediately
i = a->size() - d->windex;
nwritten = d->socket->writeBlock( a->data() + d->windex, i );
if ( d->wsn )
- d->wsn->setEnabled( FALSE ); // the TQSocketNotifier documentation says so
+ d->wsn->setEnabled( false ); // the TQSocketNotifier documentation says so
}
if ( nwritten > 0 ) {
if ( consumeWriteBuf( nwritten ) )
consumed += nwritten;
}
if ( nwritten < i )
- osBufferFull = TRUE;
+ osBufferFull = true;
}
if ( consumed > 0 ) {
#if defined(TQSOCKET_DEBUG)
@@ -851,15 +851,15 @@ TQIODevice::Offset TQSocket::at() const
/*!
\overload
- Moves the read index forward to \a index and returns TRUE if the
- operation was successful; otherwise returns FALSE. Moving the
+ Moves the read index forward to \a index and returns true if the
+ operation was successful; otherwise returns false. Moving the
index forward means skipping incoming data.
*/
bool TQSocket::at( Offset index )
{
if ( index > d->rba.size() )
- return FALSE;
+ return false;
d->rba.consumeBytes( (TQ_ULONG)index, 0 ); // throw away data 0..index-1
// After we read data from our internal buffer, if we use the
// setReadBufferSize() to limit our buffer, we might now be able to
@@ -869,19 +869,19 @@ bool TQSocket::at( Offset index )
// We can test for this condition by looking at the
// sn_read_alreadyCalled flag.
if ( d->rsn && TQSocketPrivate::sn_read_alreadyCalled.findRef(this) == -1 )
- d->rsn->setEnabled( TRUE );
- return TRUE;
+ d->rsn->setEnabled( true );
+ return true;
}
/*!
- Returns TRUE if there is no more data to read; otherwise returns FALSE.
+ Returns true if there is no more data to read; otherwise returns false.
*/
bool TQSocket::atEnd() const
{
if ( d->socket == 0 )
- return TRUE;
+ return true;
TQSocket * that = (TQSocket *)this;
if ( that->d->socket->bytesAvailable() ) // a little slow, perhaps...
that->sn_read();
@@ -918,9 +918,9 @@ TQ_ULONG TQSocket::bytesAvailable() const
Returns the number of bytes available.
If \a timeout is non-null and no error occurred (i.e. it does not
- return -1): this function sets \a *timeout to TRUE, if the reason
+ return -1): this function sets \a *timeout to true, if the reason
for returning was that the timeout was reached; otherwise it sets
- \a *timeout to FALSE. This is useful to find out if the peer
+ \a *timeout to false. This is useful to find out if the peer
closed the connection.
\warning This is a blocking call and should be avoided in event
@@ -935,7 +935,7 @@ TQ_ULONG TQSocket::waitForMore( int msecs, bool *timeout ) const
return 0;
TQSocket * that = (TQSocket *)this;
if ( that->d->socket->waitForMore( msecs, timeout ) > 0 )
- (void)that->sn_read( TRUE );
+ (void)that->sn_read( true );
return that->d->rba.size();
}
@@ -1005,7 +1005,7 @@ TQ_LONG TQSocket::readBlock( char *data, TQ_ULONG maxlen )
// We can test for this condition by looking at the
// sn_read_alreadyCalled flag.
if ( d->rsn && TQSocketPrivate::sn_read_alreadyCalled.findRef(this) == -1 )
- d->rsn->setEnabled( TRUE );
+ d->rsn->setEnabled( true );
return maxlen;
}
@@ -1059,7 +1059,7 @@ TQ_LONG TQSocket::writeBlock( const char *data, TQ_ULONG len )
if ( writeNow )
flush();
else if ( d->wsn )
- d->wsn->setEnabled( TRUE );
+ d->wsn->setEnabled( true );
#if defined(TQSOCKET_DEBUG)
tqDebug( "TQSocket (%s): writeBlock %d bytes", name(), (int)len );
#endif
@@ -1088,7 +1088,7 @@ int TQSocket::getch()
// We can test for this condition by looking at the
// sn_read_alreadyCalled flag.
if ( d->rsn && TQSocketPrivate::sn_read_alreadyCalled.findRef(this) == -1 )
- d->rsn->setEnabled( TRUE );
+ d->rsn->setEnabled( true );
return c;
}
return -1;
@@ -1130,11 +1130,11 @@ int TQSocket::ungetch( int ch )
/*!
- Returns TRUE if it's possible to read an entire line of text from
- this socket at this time; otherwise returns FALSE.
+ Returns true if it's possible to read an entire line of text from
+ this socket at this time; otherwise returns false.
Note that if the peer closes the connection unexpectedly, this
- function returns FALSE. This means that loops such as this won't
+ function returns false. This means that loops such as this won't
work:
\code
@@ -1148,7 +1148,7 @@ int TQSocket::ungetch( int ch )
bool TQSocket::canReadLine() const
{
if ( ((TQSocket*)this)->d->rba.scanNewline( 0 ) )
- return TRUE;
+ return true;
return ( bytesAvailable() > 0 &&
((TQSocket*)this)->d->rba.scanNewline( 0 ) );
}
@@ -1165,7 +1165,7 @@ TQ_LONG TQSocket::readLine( char *data, TQ_ULONG maxlen )
/*!
Returns a line of text including a terminating newline character
- (\n). Returns "" if canReadLine() returns FALSE.
+ (\n). Returns "" if canReadLine() returns false.
\sa canReadLine()
*/
@@ -1187,7 +1187,7 @@ TQString TQSocket::readLine()
Internal slot for handling socket read notifications.
This function has can usually only be entered once (i.e. no
- recursive calls). If the argument \a force is TRUE, the function
+ recursive calls). If the argument \a force is true, the function
is executed, but no readyRead() signals are emitted. This
behaviour is useful for the waitForMore() function, so that it is
possible to call waitForMore() in a slot connected to the
@@ -1201,7 +1201,7 @@ void TQSocket::sn_read( bool force )
maxToRead = d->readBufferSize - d->rba.size();
if ( maxToRead <= 0 ) {
if ( d->rsn )
- d->rsn->setEnabled( FALSE );
+ d->rsn->setEnabled( false );
return;
}
}
@@ -1261,7 +1261,7 @@ void TQSocket::sn_read( bool force )
tqWarning( "TQSocket::sn_read (%s): Close error", name() );
#endif
if ( d->rsn )
- d->rsn->setEnabled( FALSE );
+ d->rsn->setEnabled( false );
emit error( ErrSocketRead );
TQSocketPrivate::sn_read_alreadyCalled.removeRef( this );
return;
@@ -1309,7 +1309,7 @@ void TQSocket::sn_read( bool force )
tqWarning( "TQSocket::sn_read: Read error" );
#endif
if ( d->rsn )
- d->rsn->setEnabled( FALSE );
+ d->rsn->setEnabled( false );
emit error( ErrSocketRead );
TQSocketPrivate::sn_read_alreadyCalled.removeRef( this );
return;
@@ -1324,10 +1324,10 @@ void TQSocket::sn_read( bool force )
d->rba.append( a );
if ( !force ) {
if ( d->rsn )
- d->rsn->setEnabled( FALSE );
+ d->rsn->setEnabled( false );
emit readyRead();
if ( d->rsn )
- d->rsn->setEnabled( TRUE );
+ d->rsn->setEnabled( true );
}
TQSocketPrivate::sn_read_alreadyCalled.removeRef( this );
@@ -1360,7 +1360,7 @@ void TQSocket::tryConnection()
name(), peerName().ascii() );
#endif
if ( d->rsn )
- d->rsn->setEnabled( TRUE );
+ d->rsn->setEnabled( true );
emit connected();
} else {
d->state = Idle;
@@ -1393,7 +1393,7 @@ void TQSocket::setSocket( int socket )
{
setSocketIntern( socket );
d->state = Connection;
- d->rsn->setEnabled( TRUE );
+ d->rsn->setEnabled( true );
}
@@ -1416,8 +1416,8 @@ void TQSocket::setSocketIntern( int socket )
d->readBufferSize = oldBufferSize;
if ( socket >= 0 ) {
TQSocketDevice *sd = new TQSocketDevice( socket, TQSocketDevice::Stream );
- sd->setBlocking( FALSE );
- sd->setAddressReusable( TRUE );
+ sd->setBlocking( false );
+ sd->setAddressReusable( true );
d->setSocketDevice( this, sd );
}
d->state = Idle;
diff --git a/src/network/tqsocket.h b/src/network/tqsocket.h
index 5af4a21ab..b6e050051 100644
--- a/src/network/tqsocket.h
+++ b/src/network/tqsocket.h
@@ -131,7 +131,7 @@ signals:
void error( int );
protected slots:
- virtual void sn_read( bool force=FALSE );
+ virtual void sn_read( bool force=false );
virtual void sn_write();
private slots:
diff --git a/src/network/tqsocketdevice.cpp b/src/network/tqsocketdevice.cpp
index f82d1625f..8ae73f61a 100644
--- a/src/network/tqsocketdevice.cpp
+++ b/src/network/tqsocketdevice.cpp
@@ -237,7 +237,7 @@ TQSocketDevice::~TQSocketDevice()
/*!
- Returns TRUE if this is a valid socket; otherwise returns FALSE.
+ Returns true if this is a valid socket; otherwise returns false.
\sa socket()
*/
@@ -333,13 +333,13 @@ void TQSocketDevice::setSocket( int socket, Type type )
bool TQSocketDevice::open( int mode )
{
if ( isOpen() || !isValid() )
- return FALSE;
+ return false;
#if defined(TQSOCKETDEVICE_DEBUG)
tqDebug( "TQSocketDevice::open: mode %x", mode );
#endif
setMode( mode & IO_ReadWrite );
setState( IO_Open );
- return TRUE;
+ return true;
}
@@ -381,19 +381,19 @@ TQIODevice::Offset TQSocketDevice::at() const
\reimp
The read/write index is meaningless for a socket, therefore this
- function does nothing and returns TRUE.
+ function does nothing and returns true.
*/
bool TQSocketDevice::at( Offset )
{
- return TRUE;
+ return true;
}
/*!
\reimp
- Returns TRUE if no data is currently available at the socket;
- otherwise returns FALSE.
+ Returns true if no data is currently available at the socket;
+ otherwise returns false.
*/
bool TQSocketDevice::atEnd() const
{
@@ -445,8 +445,8 @@ int TQSocketDevice::ungetch( int )
/*!
- Returns TRUE if the address of this socket can be used by other
- sockets at the same time, and FALSE if this socket claims
+ Returns true if the address of this socket can be used by other
+ sockets at the same time, and false if this socket claims
exclusive ownership.
\sa setAddressReusable()
@@ -459,8 +459,8 @@ bool TQSocketDevice::addressReusable() const
/*!
Sets the address of this socket to be usable by other sockets too
- if \a enable is TRUE, and to be used exclusively by this socket if
- \a enable is FALSE.
+ if \a enable is true, and to be used exclusively by this socket if
+ \a enable is false.
When a socket is reusable, other sockets can use the same port
number (and IP address), which is generally useful. Of course
diff --git a/src/network/tqsocketdevice_unix.cpp b/src/network/tqsocketdevice_unix.cpp
index 39a9560dd..eaf9e1bf3 100644
--- a/src/network/tqsocketdevice_unix.cpp
+++ b/src/network/tqsocketdevice_unix.cpp
@@ -232,12 +232,12 @@ void TQSocketDevice::close()
/*!
- Returns TRUE if the socket is valid and in blocking mode;
- otherwise returns FALSE.
+ Returns true if the socket is valid and in blocking mode;
+ otherwise returns false.
Note that this function does not set error().
- \warning On Windows, this function always returns TRUE since the
+ \warning On Windows, this function always returns true since the
ioctlsocket() function is broken.
\sa setBlocking(), isValid()
@@ -245,15 +245,15 @@ void TQSocketDevice::close()
bool TQSocketDevice::blocking() const
{
if ( !isValid() )
- return TRUE;
+ return true;
int s = fcntl(fd, F_GETFL, 0);
return !(s >= 0 && ((s & O_NDELAY) != 0));
}
/*!
- Makes the socket blocking if \a enable is TRUE or nonblocking if
- \a enable is FALSE.
+ Makes the socket blocking if \a enable is true or nonblocking if
+ \a enable is false.
Sockets are blocking by default, but we recommend using
nonblocking socket operations, especially for GUI programs that
@@ -395,8 +395,8 @@ void TQSocketDevice::setOption( Option opt, int v )
/*!
Connects to the IP address and port specified by \a addr and \a
- port. Returns TRUE if it establishes a connection; otherwise returns FALSE.
- If it returns FALSE, error() explains why.
+ port. Returns true if it establishes a connection; otherwise returns false.
+ If it returns false, error() explains why.
Note that error() commonly returns NoError for non-blocking
sockets; this just means that you can call connect() again in a
@@ -405,7 +405,7 @@ void TQSocketDevice::setOption( Option opt, int v )
bool TQSocketDevice::connect( const TQHostAddress &addr, TQ_UINT16 port )
{
if ( !isValid() )
- return FALSE;
+ return false;
pa = addr;
pp = port;
@@ -438,20 +438,20 @@ bool TQSocketDevice::connect( const TQHostAddress &addr, TQ_UINT16 port )
aa = (struct sockaddr *)&a4;
} else {
e = Impossible;
- return FALSE;
+ return false;
}
int r = qt_socket_connect( fd, aa, aalen );
if ( r == 0 ) {
fetchConnectionParameters();
- return TRUE;
+ return true;
}
if ( errno == EISCONN || errno == EALREADY || errno == EINPROGRESS ) {
fetchConnectionParameters();
- return TRUE;
+ return true;
}
if ( e != NoError || errno == EAGAIN || errno == EWOULDBLOCK ) {
- return FALSE;
+ return false;
}
switch( errno ) {
case EBADF:
@@ -480,14 +480,14 @@ bool TQSocketDevice::connect( const TQHostAddress &addr, TQ_UINT16 port )
e = UnknownError;
break;
}
- return FALSE;
+ return false;
}
/*!
Assigns a name to an unnamed socket. The name is the host address
\a address and the port number \a port. If the operation succeeds,
- bind() returns TRUE; otherwise it returns FALSE without changing
+ bind() returns true; otherwise it returns false without changing
what port() and address() return.
bind() is used by servers for setting up incoming connections.
@@ -496,7 +496,7 @@ bool TQSocketDevice::connect( const TQHostAddress &addr, TQ_UINT16 port )
bool TQSocketDevice::bind( const TQHostAddress &address, TQ_UINT16 port )
{
if ( !isValid() )
- return FALSE;
+ return false;
int r;
struct sockaddr_in a4;
#if !defined(TQT_NO_IPV6)
@@ -521,7 +521,7 @@ bool TQSocketDevice::bind( const TQHostAddress &address, TQ_UINT16 port )
r = qt_socket_bind( fd, (struct sockaddr*)&a4, sizeof(a4) );
} else {
e = Impossible;
- return FALSE;
+ return false;
}
if ( r < 0 ) {
@@ -551,17 +551,17 @@ bool TQSocketDevice::bind( const TQHostAddress &address, TQ_UINT16 port )
e = UnknownError;
break;
}
- return FALSE;
+ return false;
}
fetchConnectionParameters();
- return TRUE;
+ return true;
}
/*!
Specifies how many pending connections a server socket can have.
- Returns TRUE if the operation was successful; otherwise returns
- FALSE. A \a backlog value of 50 is quite common.
+ Returns true if the operation was successful; otherwise returns
+ false. A \a backlog value of 50 is quite common.
The listen() call only applies to sockets where type() is \c
Stream, i.e. not to \c Datagram sockets. listen() must not be
@@ -572,12 +572,12 @@ bool TQSocketDevice::bind( const TQHostAddress &address, TQ_UINT16 port )
bool TQSocketDevice::listen( int backlog )
{
if ( !isValid() )
- return FALSE;
+ return false;
if ( qt_socket_listen( fd, backlog ) >= 0 )
- return TRUE;
+ return true;
if ( !e )
e = Impossible;
- return FALSE;
+ return false;
}
@@ -604,11 +604,11 @@ int TQSocketDevice::accept()
do {
s = qt_socket_accept( fd, (struct sockaddr*)&aa, &l );
// we'll blithely throw away the stuff accept() wrote to aa
- done = TRUE;
+ done = true;
if ( s < 0 && e == NoError ) {
switch( errno ) {
case EINTR:
- done = FALSE;
+ done = false;
break;
#if defined(EPROTO)
case EPROTO:
@@ -707,9 +707,9 @@ TQ_LONG TQSocketDevice::bytesAvailable() const
error occurred.
If \a timeout is non-null and no error occurred (i.e. it does not
- return -1): this function sets \a *timeout to TRUE, if the reason
+ return -1): this function sets \a *timeout to true, if the reason
for returning was that the timeout was reached; otherwise it sets
- \a *timeout to FALSE. This is useful to find out if the peer
+ \a *timeout to false. This is useful to find out if the peer
closed the connection.
\warning This is a blocking call and should be avoided in event
@@ -740,9 +740,9 @@ TQ_LONG TQSocketDevice::waitForMore( int msecs, bool *timeout ) const
if ( timeout ) {
if ( rv == 0 )
- *timeout = TRUE;
+ *timeout = true;
else
- *timeout = FALSE;
+ *timeout = false;
}
return bytesAvailable();
@@ -777,9 +777,9 @@ TQ_LONG TQSocketDevice::readBlock( char *data, TQ_ULONG maxlen )
return -1;
}
#endif
- bool done = FALSE;
+ bool done = false;
int r = 0;
- while ( done == FALSE ) {
+ while ( !done ) {
if ( t == Datagram ) {
#if !defined(TQT_NO_IPV6)
struct sockaddr_storage aa;
@@ -797,14 +797,14 @@ TQ_LONG TQSocketDevice::readBlock( char *data, TQ_ULONG maxlen )
} else {
r = ::read( fd, data, maxlen );
}
- done = TRUE;
+ done = true;
if ( r == 0 && t == Stream && maxlen > 0 ) {
// connection closed
close();
} else if ( r >= 0 || errno == EAGAIN || errno == EWOULDBLOCK ) {
// nothing
} else if ( errno == EINTR ) {
- done = FALSE;
+ done = false;
} else if ( e == NoError ) {
switch( errno ) {
case EIO:
@@ -873,17 +873,17 @@ TQ_LONG TQSocketDevice::writeBlock( const char *data, TQ_ULONG len )
#endif
return -1;
}
- bool done = FALSE;
+ bool done = false;
int r = 0;
bool timeout;
while ( !done ) {
r = ::write( fd, data, len );
- done = TRUE;
+ done = true;
if ( r < 0 && e == NoError &&
errno != EAGAIN && errno != EWOULDBLOCK ) {
switch( errno ) {
case EINTR: // signal - call read() or whatever again
- done = FALSE;
+ done = false;
break;
case EPIPE:
case ECONNRESET:
@@ -998,16 +998,16 @@ TQ_LONG TQSocketDevice::writeBlock( const char * data, TQ_ULONG len,
// we'd use MSG_DONTWAIT + MSG_NOSIGNAL if Stevens were right.
// but apparently Stevens and most implementors disagree
- bool done = FALSE;
+ bool done = false;
int r = 0;
while ( !done ) {
r = ::sendto( fd, data, len, 0, aa, slen);
- done = TRUE;
+ done = true;
if ( r < 0 && e == NoError &&
errno != EAGAIN && errno != EWOULDBLOCK ) {
switch( errno ) {
case EINTR: // signal - call read() or whatever again
- done = FALSE;
+ done = false;
break;
case ENOSPC:
case EPIPE:
diff --git a/src/opengl/tqgl.cpp b/src/opengl/tqgl.cpp
index 4ec6dec30..dab303c17 100644
--- a/src/opengl/tqgl.cpp
+++ b/src/opengl/tqgl.cpp
@@ -135,8 +135,8 @@ static TQCleanupHandler<TQGLFormat> qgl_cleanup_format;
default for the entire application:
\code
TQGLFormat f;
- f.setAlpha( TRUE );
- f.setStereo( TRUE );
+ f.setAlpha( true );
+ f.setStereo( true );
TQGLFormat::setDefaultFormat( f );
\endcode
@@ -144,8 +144,8 @@ static TQCleanupHandler<TQGLFormat> qgl_cleanup_format;
your TQGLWidget subclass:
\code
TQGLFormat f;
- f.setDoubleBuffer( FALSE ); // single buffer
- f.setDirectRendering( FALSE ); // software rendering
+ f.setDoubleBuffer( false ); // single buffer
+ f.setDirectRendering( false ); // software rendering
MyGLWidget* myWidget = new MyGLWidget( f, ... );
\endcode
@@ -153,8 +153,8 @@ static TQCleanupHandler<TQGLFormat> qgl_cleanup_format;
requested features the system was able to provide:
\code
TQGLFormat f;
- f.setOverlay( TRUE );
- f.setStereo( TRUE );
+ f.setOverlay( true );
+ f.setStereo( true );
MyGLWidget* myWidget = new MyGLWidget( f, ... );
if ( !w->format().stereo() ) {
// ok, goggles off
@@ -242,14 +242,14 @@ TQGLFormat::TQGLFormat( int options, int plane )
/*!
\fn bool TQGLFormat::doubleBuffer() const
- Returns TRUE if double buffering is enabled; otherwise returns
- FALSE. Double buffering is enabled by default.
+ Returns true if double buffering is enabled; otherwise returns
+ false. Double buffering is enabled by default.
\sa setDoubleBuffer()
*/
/*!
- If \a enable is TRUE sets double buffering; otherwise sets single
+ If \a enable is true sets double buffering; otherwise sets single
buffering.
Double buffering is enabled by default.
@@ -273,14 +273,14 @@ void TQGLFormat::setDoubleBuffer( bool enable )
/*!
\fn bool TQGLFormat::depth() const
- Returns TRUE if the depth buffer is enabled; otherwise returns
- FALSE. The depth buffer is enabled by default.
+ Returns true if the depth buffer is enabled; otherwise returns
+ false. The depth buffer is enabled by default.
\sa setDepth()
*/
/*!
- If \a enable is TRUE enables the depth buffer; otherwise disables
+ If \a enable is true enables the depth buffer; otherwise disables
the depth buffer.
The depth buffer is enabled by default.
@@ -303,14 +303,14 @@ void TQGLFormat::setDepth( bool enable )
/*!
\fn bool TQGLFormat::rgba() const
- Returns TRUE if RGBA color mode is set. Returns FALSE if color
+ Returns true if RGBA color mode is set. Returns false if color
index mode is set. The default color mode is RGBA.
\sa setRgba()
*/
/*!
- If \a enable is TRUE sets RGBA mode. If \a enable is FALSE sets
+ If \a enable is true sets RGBA mode. If \a enable is false sets
color index mode.
The default color mode is RGBA.
@@ -334,14 +334,14 @@ void TQGLFormat::setRgba( bool enable )
/*!
\fn bool TQGLFormat::alpha() const
- Returns TRUE if the alpha channel of the framebuffer is enabled;
- otherwise returns FALSE. The alpha channel is disabled by default.
+ Returns true if the alpha channel of the framebuffer is enabled;
+ otherwise returns false. The alpha channel is disabled by default.
\sa setAlpha()
*/
/*!
- If \a enable is TRUE enables the alpha channel; otherwise disables
+ If \a enable is true enables the alpha channel; otherwise disables
the alpha channel.
The alpha buffer is disabled by default.
@@ -362,14 +362,14 @@ void TQGLFormat::setAlpha( bool enable )
/*!
\fn bool TQGLFormat::accum() const
- Returns TRUE if the accumulation buffer is enabled; otherwise
- returns FALSE. The accumulation buffer is disabled by default.
+ Returns true if the accumulation buffer is enabled; otherwise
+ returns false. The accumulation buffer is disabled by default.
\sa setAccum()
*/
/*!
- If \a enable is TRUE enables the accumulation buffer; otherwise
+ If \a enable is true enables the accumulation buffer; otherwise
disables the accumulation buffer.
The accumulation buffer is disabled by default.
@@ -389,14 +389,14 @@ void TQGLFormat::setAccum( bool enable )
/*!
\fn bool TQGLFormat::stencil() const
- Returns TRUE if the stencil buffer is enabled; otherwise returns
- FALSE. The stencil buffer is disabled by default.
+ Returns true if the stencil buffer is enabled; otherwise returns
+ false. The stencil buffer is disabled by default.
\sa setStencil()
*/
/*!
- If \a enable is TRUE enables the stencil buffer; otherwise
+ If \a enable is true enables the stencil buffer; otherwise
disables the stencil buffer.
The stencil buffer is disabled by default.
@@ -416,14 +416,14 @@ void TQGLFormat::setStencil( bool enable )
/*!
\fn bool TQGLFormat::stereo() const
- Returns TRUE if stereo buffering is enabled; otherwise returns
- FALSE. Stereo buffering is disabled by default.
+ Returns true if stereo buffering is enabled; otherwise returns
+ false. Stereo buffering is disabled by default.
\sa setStereo()
*/
/*!
- If \a enable is TRUE enables stereo buffering; otherwise disables
+ If \a enable is true enables stereo buffering; otherwise disables
stereo buffering.
Stereo buffering is disabled by default.
@@ -443,8 +443,8 @@ void TQGLFormat::setStereo( bool enable )
/*!
\fn bool TQGLFormat::directRendering() const
- Returns TRUE if direct rendering is enabled; otherwise returns
- FALSE.
+ Returns true if direct rendering is enabled; otherwise returns
+ false.
Direct rendering is enabled by default.
@@ -452,7 +452,7 @@ void TQGLFormat::setStereo( bool enable )
*/
/*!
- If \a enable is TRUE enables direct rendering; otherwise disables
+ If \a enable is true enables direct rendering; otherwise disables
direct rendering.
Direct rendering is enabled by default.
@@ -473,7 +473,7 @@ void TQGLFormat::setDirectRendering( bool enable )
/*!
\fn bool TQGLFormat::hasOverlay() const
- Returns TRUE if overlay plane is enabled; otherwise returns FALSE.
+ Returns true if overlay plane is enabled; otherwise returns false.
Overlay is disabled by default.
@@ -481,7 +481,7 @@ void TQGLFormat::setDirectRendering( bool enable )
*/
/*!
- If \a enable is TRUE enables an overlay plane; otherwise disables
+ If \a enable is true enables an overlay plane; otherwise disables
the overlay plane.
Enabling the overlay plane will cause TQGLWidget to create an
@@ -543,7 +543,7 @@ void TQGLFormat::setOption( FormatOption opt )
/*!
- Returns TRUE if format option \a opt is set; otherwise returns FALSE.
+ Returns true if format option \a opt is set; otherwise returns false.
\sa setOption()
*/
@@ -561,8 +561,8 @@ bool TQGLFormat::testOption( FormatOption opt ) const
/*!
\fn bool TQGLFormat::hasOpenGL()
- Returns TRUE if the window system has any OpenGL support;
- otherwise returns FALSE.
+ Returns true if the window system has any OpenGL support;
+ otherwise returns false.
\warning This function must not be called until the TQApplication
object has been created.
@@ -573,8 +573,8 @@ bool TQGLFormat::testOption( FormatOption opt ) const
/*!
\fn bool TQGLFormat::hasOpenGLOverlays()
- Returns TRUE if the window system supports OpenGL overlays;
- otherwise returns FALSE.
+ Returns true if the window system supports OpenGL overlays;
+ otherwise returns false.
\warning This function must not be called until the TQApplication
object has been created.
@@ -608,7 +608,7 @@ TQGLFormat TQGLFormat::defaultFormat()
\code
TQApplication a(argc, argv);
TQGLFormat f;
- f.setDoubleBuffer( FALSE );
+ f.setDoubleBuffer( false );
TQGLFormat::setDefaultFormat( f );
\endcode
@@ -666,7 +666,7 @@ TQGLFormat TQGLFormat::defaultOverlayFormat()
\code
TQGLFormat f = TQGLFormat::defaultOverlayFormat();
- f.setDoubleBuffer( TRUE );
+ f.setDoubleBuffer( true );
TQGLFormat::setDefaultOverlayFormat( f );
\endcode
@@ -700,13 +700,13 @@ void TQGLFormat::setDefaultOverlayFormat( const TQGLFormat &f )
// Make sure the user doesn't request that the overlays themselves
// have overlays, since it is unlikely that the system supports
// infinitely many planes...
- qgl_default_overlay_format->setOverlay( FALSE );
+ qgl_default_overlay_format->setOverlay( false );
}
/*!
- Returns TRUE if all the options of the two TQGLFormats are equal;
- otherwise returns FALSE.
+ Returns true if all the options of the two TQGLFormats are equal;
+ otherwise returns false.
*/
bool operator==( const TQGLFormat& a, const TQGLFormat& b )
@@ -716,8 +716,8 @@ bool operator==( const TQGLFormat& a, const TQGLFormat& b )
/*!
- Returns FALSE if all the options of the two TQGLFormats are equal;
- otherwise returns TRUE.
+ Returns false if all the options of the two TQGLFormats are equal;
+ otherwise returns true.
*/
bool operator!=( const TQGLFormat& a, const TQGLFormat& b )
@@ -849,7 +849,7 @@ TQGLContext::~TQGLContext()
TQGLContext *cx;
// ...
TQGLFormat f;
- f.setStereo( TRUE );
+ f.setStereo( true );
cx->setFormat( f );
if ( !cx->create() )
exit(); // no OpenGL support, or cannot render on the specified paintdevice
@@ -885,7 +885,7 @@ void TQGLContext::setDevice( TQPaintDevice *pDev )
void TQGLContext::init( TQPaintDevice *dev )
{
d = new Private;
- d->valid = FALSE;
+ d->valid = false;
#if defined(TQ_WS_X11)
qt_resolve_gl_symbols();
gpm = 0;
@@ -900,16 +900,16 @@ void TQGLContext::init( TQPaintDevice *dev )
#if defined(TQ_WS_MAC)
d->oldR = TQRect(1, 1, 1, 1);
#endif
- d->crWin = FALSE;
- d->initDone = FALSE;
- d->sharing = FALSE;
+ d->crWin = false;
+ d->initDone = false;
+ d->sharing = false;
}
/*!
\fn bool TQGLContext::isValid() const
- Returns TRUE if a GL rendering context has been successfully
- created; otherwise returns FALSE.
+ Returns true if a GL rendering context has been successfully
+ created; otherwise returns false.
*/
/*!
@@ -922,9 +922,9 @@ void TQGLContext::init( TQPaintDevice *dev )
/*!
\fn bool TQGLContext::isSharing() const
- Returns TRUE if display list sharing with another context was
+ Returns true if display list sharing with another context was
requested in the create() call and the GL system was able to
- fulfill this request; otherwise returns FALSE. Note that display
+ fulfill this request; otherwise returns false. Note that display
list sharing might not be supported between contexts with
different formats.
*/
@@ -932,15 +932,15 @@ void TQGLContext::init( TQPaintDevice *dev )
/*!
\fn bool TQGLContext::deviceIsPixmap() const
- Returns TRUE if the paint device of this context is a pixmap;
- otherwise returns FALSE.
+ Returns true if the paint device of this context is a pixmap;
+ otherwise returns false.
*/
/*!
\fn bool TQGLContext::windowCreated() const
- Returns TRUE if a window has been created for this context;
- otherwise returns FALSE.
+ Returns true if a window has been created for this context;
+ otherwise returns false.
\sa setWindowCreated()
*/
@@ -948,8 +948,8 @@ void TQGLContext::init( TQPaintDevice *dev )
/*!
\fn void TQGLContext::setWindowCreated( bool on )
- If \a on is TRUE the context has had a window created for it. If
- \a on is FALSE no window has been created for the context.
+ If \a on is true the context has had a window created for it. If
+ \a on is false no window has been created for the context.
\sa windowCreated()
*/
@@ -967,9 +967,9 @@ void TQGLContext::init( TQPaintDevice *dev )
/*!
\fn bool TQGLContext::initialized() const
- Returns TRUE if this context has been initialized, i.e. if
+ Returns true if this context has been initialized, i.e. if
TQGLWidget::initializeGL() has been performed on it; otherwise
- returns FALSE.
+ returns false.
\sa setInitialized()
*/
@@ -977,9 +977,9 @@ void TQGLContext::init( TQPaintDevice *dev )
/*!
\fn void TQGLContext::setInitialized( bool on )
- If \a on is TRUE the context has been initialized, i.e.
+ If \a on is true the context has been initialized, i.e.
TQGLContext::setInitialized() has been called on it. If \a on is
- FALSE the context has not been initialized.
+ false the context has not been initialized.
\sa initialized()
*/
@@ -1014,9 +1014,9 @@ void TQGLContext::init( TQPaintDevice *dev )
/*!
- Creates the GL context. Returns TRUE if it was successful in
+ Creates the GL context. Returns true if it was successful in
creating a valid GL rendering context on the paint device
- specified in the constructor; otherwise returns FALSE (i.e. the
+ specified in the constructor; otherwise returns false (i.e. the
context is invalid).
After successful creation, format() returns the set of features of
@@ -1275,7 +1275,7 @@ static TQGLWidgetPrivate * qgl_d( const TQGLWidget * w )
if ( !qgl_d_ptr ) {
qgl_d_ptr = new TQPtrDict<TQGLWidgetPrivate>;
qgl_cleanup_d_ptr.set( &qgl_d_ptr );
- qgl_d_ptr->setAutoDelete( TRUE );
+ qgl_d_ptr->setAutoDelete( true );
}
TQGLWidgetPrivate * ret = qgl_d_ptr->find( (void *) w );
if ( !ret ) {
@@ -1430,8 +1430,8 @@ TQGLWidget::~TQGLWidget()
/*!
\fn bool TQGLWidget::doubleBuffer() const
- Returns TRUE if the contained GL rendering context has double
- buffering; otherwise returns FALSE.
+ Returns true if the contained GL rendering context has double
+ buffering; otherwise returns false.
\sa TQGLFormat::doubleBuffer()
*/
@@ -1439,10 +1439,10 @@ TQGLWidget::~TQGLWidget()
/*!
\fn void TQGLWidget::setAutoBufferSwap( bool on )
- If \a on is TRUE automatic GL buffer swapping is switched on;
+ If \a on is true automatic GL buffer swapping is switched on;
otherwise it is switched off.
- If \a on is TRUE and the widget is using a double-buffered format,
+ If \a on is true and the widget is using a double-buffered format,
the background and foreground GL buffers will automatically be
swapped after each paintGL() call.
@@ -1454,8 +1454,8 @@ TQGLWidget::~TQGLWidget()
/*!
\fn bool TQGLWidget::autoBufferSwap() const
- Returns TRUE if the widget is doing automatic GL buffer swapping;
- otherwise returns FALSE.
+ Returns true if the widget is doing automatic GL buffer swapping;
+ otherwise returns false.
\sa setAutoBufferSwap()
*/
@@ -1463,8 +1463,8 @@ TQGLWidget::~TQGLWidget()
/*!
\fn bool TQGLWidget::isValid() const
- Returns TRUE if the widget has a valid GL rendering context;
- otherwise returns FALSE. A widget will be invalid if the system
+ Returns true if the widget has a valid GL rendering context;
+ otherwise returns false. A widget will be invalid if the system
has no \link TQGLFormat::hasOpenGL() OpenGL support\endlink.
*/
@@ -1476,9 +1476,9 @@ bool TQGLWidget::isValid() const
/*!
\fn bool TQGLWidget::isSharing() const
- Returns TRUE if display list sharing with another TQGLWidget was
+ Returns true if display list sharing with another TQGLWidget was
requested in the constructor, and the GL system was able to
- provide it; otherwise returns FALSE. The GL system may fail to
+ provide it; otherwise returns false. The GL system may fail to
provide display list sharing if the two TQGLWidgets use different
formats.
@@ -1625,8 +1625,8 @@ void TQGLWidget::setFormat( const TQGLFormat &format )
list sharing with that context, but it may fail. Use isSharing() to
test.
- If \a deleteOldContext is TRUE (the default), the existing context
- will be deleted. You may use FALSE here if you have kept a pointer
+ If \a deleteOldContext is true (the default), the existing context
+ will be deleted. You may use false here if you have kept a pointer
to the old context (as returned by context()), and want to restore
that context later.
@@ -1803,9 +1803,9 @@ void TQGLWidget::paintEvent( TQPaintEvent * )
high unless one of these parameters is 0 (the default), in which
case the pixmap will have the same size as the widget.
- If \a useContext is TRUE, this method will try to be more
+ If \a useContext is true, this method will try to be more
efficient by using the existing GL context to render the pixmap.
- The default is FALSE. Only use TRUE if you understand the risks.
+ The default is false. Only use true if you understand the risks.
Overlays are not rendered onto the pixmap.
@@ -1830,7 +1830,7 @@ TQPixmap TQGLWidget::renderPixmap( int w, int h, bool useContext )
// make sure the pixmap uses the same visual as the widget itself
if ( needConversion ) {
- TQPaintDeviceX11Data* xd = pm.getX11Data( TRUE );
+ TQPaintDeviceX11Data* xd = pm.getX11Data( true );
xd->x_depth = x11Depth();
xd->x_visual = (Visual *) x11Visual();
pm.setX11Data( xd );
@@ -1842,14 +1842,14 @@ TQPixmap TQGLWidget::renderPixmap( int w, int h, bool useContext )
glcx->doneCurrent();
- bool success = TRUE;
+ bool success = true;
if ( useContext && isValid() && renderCxPm( &pm ) )
return pm;
TQGLFormat fmt = glcx->requestedFormat();
- fmt.setDirectRendering( FALSE ); // Direct is unlikely to work
- fmt.setDoubleBuffer( FALSE ); // We don't need dbl buf
+ fmt.setDirectRendering( false ); // Direct is unlikely to work
+ fmt.setDoubleBuffer( false ); // We don't need dbl buf
TQGLContext* ocx = glcx;
bool wasCurrent = (TQGLContext::currentContext() == ocx );
@@ -1860,7 +1860,7 @@ TQPixmap TQGLWidget::renderPixmap( int w, int h, bool useContext )
if ( glcx->isValid() )
updateGL();
else
- success = FALSE;
+ success = false;
delete glcx;
glcx = ocx;
@@ -1885,7 +1885,7 @@ TQPixmap TQGLWidget::renderPixmap( int w, int h, bool useContext )
/*!
- Returns an image of the frame buffer. If \a withAlpha is TRUE the
+ Returns an image of the frame buffer. If \a withAlpha is true the
alpha channel is included.
Depending on your hardware, you can explicitly select which color
@@ -1895,7 +1895,7 @@ TQPixmap TQGLWidget::renderPixmap( int w, int h, bool useContext )
TQImage TQGLWidget::grabFrameBuffer( bool withAlpha )
{
#if defined( TQ_WS_MAC )
- if(dblbuf == macInternalDoubleBuffer(FALSE) && gl_pix) //why not optimize?
+ if(dblbuf == macInternalDoubleBuffer(false) && gl_pix) //why not optimize?
return ((TQPixmap*)gl_pix)->convertToImage();
#endif
makeCurrent();
@@ -1958,7 +1958,7 @@ void TQGLWidget::glInit()
return;
makeCurrent();
initializeGL();
- glcx->setInitialized( TRUE );
+ glcx->setInitialized( true );
}
diff --git a/src/opengl/tqgl.h b/src/opengl/tqgl.h
index 53bdd0e5a..604dfee1d 100644
--- a/src/opengl/tqgl.h
+++ b/src/opengl/tqgl.h
@@ -304,12 +304,12 @@ public:
#ifndef Q_QDOC
virtual void setContext( TQGLContext* context,
const TQGLContext* shareContext = 0,
- bool deleteOldContext = TRUE );
+ bool deleteOldContext = true );
#endif
virtual TQPixmap renderPixmap( int w = 0, int h = 0,
- bool useContext = FALSE );
- virtual TQImage grabFrameBuffer( bool withAlpha = FALSE );
+ bool useContext = false );
+ virtual TQImage grabFrameBuffer( bool withAlpha = false );
virtual void makeOverlayCurrent();
const TQGLContext* overlayContext() const;
@@ -318,7 +318,7 @@ public:
void setMouseTracking( bool enable );
virtual void reparent( TQWidget* parent, WFlags f, const TQPoint& p,
- bool showIt = FALSE );
+ bool showIt = false );
const TQGLColormap & colormap() const;
void setColormap( const TQGLColormap & map );
@@ -384,8 +384,8 @@ private:
void macInternalRecreateContext( TQGLContext *ctx,
const TQGLContext* = NULL,
- bool update = TRUE );
- bool macInternalDoubleBuffer( bool fix = TRUE );
+ bool update = true );
+ bool macInternalDoubleBuffer( bool fix = true );
virtual void setRegionDirty( bool );
virtual void macWidgetChangedWindow();
#endif
diff --git a/src/opengl/tqgl_x11.cpp b/src/opengl/tqgl_x11.cpp
index 95a92e566..4c716fac2 100644
--- a/src/opengl/tqgl_x11.cpp
+++ b/src/opengl/tqgl_x11.cpp
@@ -124,19 +124,19 @@ _glXWaitX qt_glXWaitX;
bool qt_resolve_gl_symbols(bool fatal)
{
- static bool gl_syms_resolved = FALSE;
+ static bool gl_syms_resolved = false;
if (gl_syms_resolved)
- return TRUE;
+ return true;
TQLibrary gl("GL.so.1");
- gl.setAutoUnload(FALSE);
+ gl.setAutoUnload(false);
qt_glCallLists = (_glCallLists) gl.resolve("glCallLists");
if (!qt_glCallLists) { // if this fails the rest will surely fail
if (fatal)
tqFatal("Unable to resolve GL/GLX symbols - please check your GL library installation.");
- return FALSE;
+ return false;
}
qt_glClearColor = (_glClearColor) gl.resolve("glClearColor");
@@ -181,8 +181,8 @@ bool qt_resolve_gl_symbols(bool fatal)
qt_glXSwapBuffers = (_glXSwapBuffers) gl.resolve("glXSwapBuffers");
qt_glXUseXFont = (_glXUseXFont) gl.resolve("glXUseXFont");
qt_glXWaitX = (_glXWaitX) gl.resolve("glXWaitX");
- gl_syms_resolved = TRUE;
- return TRUE;
+ gl_syms_resolved = true;
+ return true;
}
#endif // QT_DLOPEN_OPENGL
@@ -206,7 +206,7 @@ struct CMapEntry {
CMapEntry::CMapEntry()
{
cmap = 0;
- alloc = FALSE;
+ alloc = false;
scmap.colormap = 0;
}
@@ -217,18 +217,18 @@ CMapEntry::~CMapEntry()
}
static TQIntDict<CMapEntry> *cmap_dict = 0;
-static bool mesa_gl = FALSE;
+static bool mesa_gl = false;
static TQIntDict< TQMap<int, TQRgb> > *qglcmap_dict = 0;
static void cleanup_cmaps()
{
if (cmap_dict) {
- cmap_dict->setAutoDelete(TRUE);
+ cmap_dict->setAutoDelete(true);
delete cmap_dict;
cmap_dict = 0;
}
if (qglcmap_dict) {
- qglcmap_dict->setAutoDelete(TRUE);
+ qglcmap_dict->setAutoDelete(true);
delete qglcmap_dict;
qglcmap_dict = 0;
}
@@ -262,7 +262,7 @@ static Colormap choose_cmap( Display *dpy, XVisualInfo *vi )
}
if ( mesa_gl ) { // we're using MesaGL
- Atom hp_cmaps = XInternAtom( dpy, "_HP_RGB_SMOOTH_MAP_LIST", TRUE );
+ Atom hp_cmaps = XInternAtom( dpy, "_HP_RGB_SMOOTH_MAP_LIST", true );
if ( hp_cmaps && vi->visual->c_class == TrueColor && vi->depth == 8 ) {
if ( XGetRGBColormaps(dpy,RootWindow(dpy,vi->screen),&c,&n,
hp_cmaps) ) {
@@ -294,7 +294,7 @@ static Colormap choose_cmap( Display *dpy, XVisualInfo *vi )
#endif
if ( XmuLookupStandardColormap(dpy,vi->screen,vi->visualid,vi->depth,
- XA_RGB_DEFAULT_MAP,FALSE,TRUE) ) {
+ XA_RGB_DEFAULT_MAP,false,true) ) {
if ( XGetRGBColormaps(dpy,RootWindow(dpy,vi->screen),&c,&n,
XA_RGB_DEFAULT_MAP) ) {
i = 0;
@@ -314,7 +314,7 @@ static Colormap choose_cmap( Display *dpy, XVisualInfo *vi )
if ( !x->cmap ) { // no shared cmap found
x->cmap = XCreateColormap( dpy, RootWindow(dpy,vi->screen), vi->visual,
AllocNone );
- x->alloc = TRUE;
+ x->alloc = true;
// tqDebug( "Allocating cmap" );
}
@@ -331,7 +331,7 @@ struct TransColor
};
static TQMemArray<TransColor> trans_colors;
-static int trans_colors_init = FALSE;
+static int trans_colors_init = false;
static void find_trans_colors()
@@ -343,7 +343,7 @@ static void find_trans_colors()
long layer;
};
- trans_colors_init = TRUE;
+ trans_colors_init = true;
Display* appDisplay = TQPaintDevice::x11AppDisplay();
@@ -397,8 +397,8 @@ static void find_trans_colors()
bool TQGLFormat::hasOpenGL()
{
- if (!qt_resolve_gl_symbols(FALSE))
- return FALSE;
+ if (!qt_resolve_gl_symbols(false))
+ return false;
return glXQueryExtension(tqt_xdisplay(),0,0) != 0;
}
@@ -422,7 +422,7 @@ bool TQGLContext::chooseContext( const TQGLContext* shareContext )
Display* disp = d->paintDevice->x11Display();
vi = chooseVisual();
if ( !vi )
- return FALSE;
+ return false;
if ( deviceIsPixmap() &&
(((XVisualInfo*)vi)->depth != d->paintDevice->x11Depth() ||
@@ -436,12 +436,12 @@ bool TQGLContext::chooseContext( const TQGLContext* shareContext )
int nvis;
vi = XGetVisualInfo( disp, VisualIDMask | VisualScreenMask, &appVisInfo, &nvis );
if ( !vi )
- return FALSE;
+ return false;
int useGL;
glXGetConfig( disp, (XVisualInfo*)vi, GLX_USE_GL, &useGL );
if ( !useGL )
- return FALSE; //# Chickening out already...
+ return false; //# Chickening out already...
}
int res;
glXGetConfig( disp, (XVisualInfo*)vi, GLX_LEVEL, &res );
@@ -484,12 +484,12 @@ bool TQGLContext::chooseContext( const TQGLContext* shareContext )
cx = glXCreateContext( disp, (XVisualInfo *)vi,
(GLXContext)shareContext->cx, direct );
if ( cx )
- d->sharing = TRUE;
+ d->sharing = true;
}
if ( !cx )
cx = glXCreateContext( disp, (XVisualInfo *)vi, None, direct );
if ( !cx )
- return FALSE;
+ return false;
glFormat.setDirectRendering( glXIsDirect( disp, (GLXContext)cx ) );
if ( deviceIsPixmap() ) {
#if defined(GLX_MESA_pixmap_colormap) && defined(TQGL_USE_MESA_EXT)
@@ -501,9 +501,9 @@ bool TQGLContext::chooseContext( const TQGLContext* shareContext )
d->paintDevice->handle() );
#endif
if ( !gpm )
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
@@ -525,50 +525,50 @@ void *TQGLContext::chooseVisual()
//todo: if pixmap, also make sure that vi->depth == pixmap->depth
void* vis = 0;
int i = 0;
- bool fail = FALSE;
+ bool fail = false;
TQGLFormat fmt = format();
bool tryDouble = !fmt.doubleBuffer(); // Some GL impl's only have double
- bool triedDouble = FALSE;
+ bool triedDouble = false;
while( !fail && !( vis = tryVisual( fmt, bufDepths[i] ) ) ) {
if ( !fmt.rgba() && bufDepths[i] > 1 ) {
i++;
continue;
}
if ( tryDouble ) {
- fmt.setDoubleBuffer( TRUE );
- tryDouble = FALSE;
- triedDouble = TRUE;
+ fmt.setDoubleBuffer( true );
+ tryDouble = false;
+ triedDouble = true;
continue;
}
else if ( triedDouble ) {
- fmt.setDoubleBuffer( FALSE );
- triedDouble = FALSE;
+ fmt.setDoubleBuffer( false );
+ triedDouble = false;
}
if ( fmt.stereo() ) {
- fmt.setStereo( FALSE );
+ fmt.setStereo( false );
continue;
}
if ( fmt.accum() ) {
- fmt.setAccum( FALSE );
+ fmt.setAccum( false );
continue;
}
if ( fmt.stencil() ) {
- fmt.setStencil( FALSE );
+ fmt.setStencil( false );
continue;
}
if ( fmt.alpha() ) {
- fmt.setAlpha( FALSE );
+ fmt.setAlpha( false );
continue;
}
if ( fmt.depth() ) {
- fmt.setDepth( FALSE );
+ fmt.setDepth( false );
continue;
}
if ( fmt.doubleBuffer() ) {
- fmt.setDoubleBuffer( FALSE );
+ fmt.setDoubleBuffer( false );
continue;
}
- fail = TRUE;
+ fail = true;
}
glFormat = fmt;
return vis;
@@ -594,8 +594,8 @@ void *TQGLContext::tryVisual( const TQGLFormat& f, int bufDepth )
spec[i++] = f.plane();
#if defined(GLX_VERSION_1_1) && defined(GLX_EXT_visual_info)
- static bool useTranspExt = FALSE;
- static bool useTranspExtChecked = FALSE;
+ static bool useTranspExt = false;
+ static bool useTranspExtChecked = false;
if ( f.plane() && !useTranspExtChecked && d->paintDevice ) {
TQCString estr( glXQueryExtensionsString( d->paintDevice->x11Display(),
d->paintDevice->x11Screen() ) );
@@ -615,12 +615,12 @@ void *TQGLContext::tryVisual( const TQGLFormat& f, int bufDepth )
XVisualInfo * vinf = glXChooseVisual( d->paintDevice->x11Display(),
d->paintDevice->x11Screen(), tmpSpec );
if ( !vinf ) {
- useTranspExt = FALSE;
+ useTranspExt = false;
}
}
}
- useTranspExtChecked = TRUE;
+ useTranspExtChecked = true;
}
if ( f.plane() && useTranspExt ) {
// Required to avoid non-transparent overlay visual(!) on some systems
@@ -691,11 +691,11 @@ void TQGLContext::reset()
XFree( vi );
vi = 0;
cx = 0;
- d->crWin = FALSE;
- d->sharing = FALSE;
- d->valid = FALSE;
+ d->crWin = false;
+ d->sharing = false;
+ d->valid = false;
d->transpColor = TQColor();
- d->initDone = FALSE;
+ d->initDone = false;
}
@@ -707,7 +707,7 @@ void TQGLContext::makeCurrent()
#endif
return;
}
- bool ok = TRUE;
+ bool ok = true;
if ( deviceIsPixmap() )
ok = glXMakeCurrent( d->paintDevice->x11Display(),
(GLXPixmap)gpm,
@@ -816,7 +816,7 @@ uint TQGLContext::colorIndex( const TQColor& c ) const
// need to alloc color
unsigned long plane_mask[2];
unsigned long color_map_entry;
- if (!XAllocColorCells (TQPaintDevice::x11AppDisplay(), x->cmap, TRUE, plane_mask, 0,
+ if (!XAllocColorCells (TQPaintDevice::x11AppDisplay(), x->cmap, true, plane_mask, 0,
&color_map_entry, 1))
return c.pixel(screen);
@@ -1034,7 +1034,7 @@ void TQGLWidget::init( TQGLContext *context, const TQGLWidget *shareWidget )
glcx = 0;
olw = 0;
- autoSwap = TRUE;
+ autoSwap = true;
if ( !context->device() )
context->setDevice( this );
@@ -1050,13 +1050,13 @@ void TQGLWidget::init( TQGLContext *context, const TQGLWidget *shareWidget )
olw = new TQGLOverlayWidget( TQGLFormat::defaultOverlayFormat(),
this, olwName, shareWidget );
if ( olw->isValid() ) {
- olw->setAutoBufferSwap( FALSE );
+ olw->setAutoBufferSwap( false );
olw->setFocusProxy( this );
}
else {
delete olw;
olw = 0;
- glcx->glFormat.setOverlay( FALSE );
+ glcx->glFormat.setOverlay( false );
}
}
}
@@ -1067,7 +1067,7 @@ void TQGLWidget::reparent( TQWidget* parent, WFlags f, const TQPoint& p,
{
if (glcx)
glcx->doneCurrent();
- TQWidget::reparent( parent, f, p, FALSE );
+ TQWidget::reparent( parent, f, p, false );
if ( showIt )
show();
}
@@ -1138,10 +1138,10 @@ void TQGLWidget::setContext( TQGLContext *context,
TQGLContext* oldcx = glcx;
glcx = context;
- bool createFailed = FALSE;
+ bool createFailed = false;
if ( !glcx->isValid() ) {
if ( !glcx->create( shareContext ? shareContext : oldcx ) )
- createFailed = TRUE;
+ createFailed = true;
}
if ( createFailed ) {
if ( deleteOldContext )
@@ -1213,14 +1213,14 @@ void TQGLWidget::setContext( TQGLContext *context,
if ( visible )
show();
XFlush( x11Display() );
- glcx->setWindowCreated( TRUE );
+ glcx->setWindowCreated( true );
}
bool TQGLWidget::renderCxPm( TQPixmap* pm )
{
if ( ((XVisualInfo*)glcx->vi)->depth != pm->depth() )
- return FALSE;
+ return false;
GLXPixmap glPm;
#if defined(GLX_MESA_pixmap_colormap) && defined(TQGL_USE_MESA_EXT)
@@ -1237,7 +1237,7 @@ bool TQGLWidget::renderCxPm( TQPixmap* pm )
if ( !glXMakeCurrent( x11Display(), glPm, (GLXContext)glcx->cx ) ) {
glXDestroyGLXPixmap( x11Display(), glPm );
- return FALSE;
+ return false;
}
glDrawBuffer( GL_FRONT );
@@ -1249,7 +1249,7 @@ bool TQGLWidget::renderCxPm( TQPixmap* pm )
makeCurrent();
glXDestroyGLXPixmap( x11Display(), glPm );
resizeGL( width(), height() );
- return TRUE;
+ return true;
}
const TQGLColormap & TQGLWidget::colormap() const
@@ -1282,7 +1282,7 @@ static void qStoreColors( TQWidget * tlw, Colormap cmap,
*/
static bool qCanAllocColors( TQWidget * w )
{
- bool validVisual = FALSE;
+ bool validVisual = false;
int numVisuals;
long mask;
XVisualInfo templ;
@@ -1301,11 +1301,11 @@ static bool qCanAllocColors( TQWidget * w )
case StaticColor:
case StaticGray:
case GrayScale:
- validVisual = FALSE;
+ validVisual = false;
break;
case DirectColor:
case PseudoColor:
- validVisual = TRUE;
+ validVisual = true;
break;
}
break;
@@ -1314,8 +1314,8 @@ static bool qCanAllocColors( TQWidget * w )
XFree( visuals );
if ( !validVisual )
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
void TQGLWidget::setColormap( const TQGLColormap & c )
diff --git a/src/opengl/tqgl_x11_p.h b/src/opengl/tqgl_x11_p.h
index cbcd741b9..076d83b8d 100644
--- a/src/opengl/tqgl_x11_p.h
+++ b/src/opengl/tqgl_x11_p.h
@@ -52,7 +52,7 @@
#ifdef QT_DLOPEN_OPENGL
// resolve the GL symbols we use ourselves
-bool qt_resolve_gl_symbols(bool = TRUE);
+bool qt_resolve_gl_symbols(bool = true);
extern "C" {
// GL symbols
typedef void (*_glCallLists)( GLsizei n, GLenum type, const GLvoid *lists );
@@ -192,6 +192,6 @@ extern _glXWaitX qt_glXWaitX;
#define glXWaitX qt_glXWaitX
#else
-inline bool qt_resolve_gl_symbols(bool = TRUE) { return TRUE; }
+inline bool qt_resolve_gl_symbols(bool = true) { return true; }
#endif // QT_DLOPEN_OPENGL
#endif // TQGL_P_H
diff --git a/src/opengl/tqglcolormap.cpp b/src/opengl/tqglcolormap.cpp
index 5f1c580f1..8765a6d55 100644
--- a/src/opengl/tqglcolormap.cpp
+++ b/src/opengl/tqglcolormap.cpp
@@ -234,7 +234,7 @@ TQColor TQGLColormap::entryColor( int idx ) const
}
/*!
- Returns TRUE if the colormap is empty; otherwise returns FALSE. A
+ Returns true if the colormap is empty; otherwise returns false. A
colormap with no color values set is considered to be empty.
*/
bool TQGLColormap::isEmpty() const
diff --git a/src/sql/drivers/cache/tqsqlcachedresult.cpp b/src/sql/drivers/cache/tqsqlcachedresult.cpp
index 709e61944..b22c56b28 100644
--- a/src/sql/drivers/cache/tqsqlcachedresult.cpp
+++ b/src/sql/drivers/cache/tqsqlcachedresult.cpp
@@ -61,7 +61,7 @@ public:
};
TQtSqlCachedResultPrivate::TQtSqlCachedResultPrivate():
- cache(0), current(0), rowCacheEnd(0), colCount(0), forwardOnly(FALSE)
+ cache(0), current(0), rowCacheEnd(0), colCount(0), forwardOnly(false)
{
}
@@ -76,7 +76,7 @@ void TQtSqlCachedResultPrivate::cleanup()
if (forwardOnly)
delete current;
current = 0;
- forwardOnly = FALSE;
+ forwardOnly = false;
colCount = 0;
rowCacheEnd = 0;
}
@@ -108,11 +108,11 @@ TQtSqlCachedResult::RowCache *TQtSqlCachedResultPrivate::next()
bool TQtSqlCachedResultPrivate::seek(int i)
{
if (forwardOnly || i < 0)
- return FALSE;
+ return false;
if (i >= rowCacheEnd)
- return FALSE;
+ return false;
current = (*cache)[i];
- return TRUE;
+ return true;
}
void TQtSqlCachedResultPrivate::revertLast()
@@ -144,40 +144,40 @@ void TQtSqlCachedResult::init(int colCount)
bool TQtSqlCachedResult::fetch(int i)
{
if ((!isActive()) || (i < 0))
- return FALSE;
+ return false;
if (at() == i)
- return TRUE;
+ return true;
if (d->forwardOnly) {
// speed hack - do not copy values if not needed
if (at() > i || at() == TQSql::AfterLast)
- return FALSE;
+ return false;
while(at() < i - 1) {
if (!gotoNext(0))
- return FALSE;
+ return false;
setAt(at() + 1);
}
if (!gotoNext(d->current))
- return FALSE;
+ return false;
setAt(at() + 1);
- return TRUE;
+ return true;
}
if (d->seek(i)) {
setAt(i);
- return TRUE;
+ return true;
}
setAt(d->rowCacheEnd - 1);
while (at() < i) {
if (!cacheNext())
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
bool TQtSqlCachedResult::fetchNext()
{
if (d->seek(at() + 1)) {
setAt(at() + 1);
- return TRUE;
+ return true;
}
return cacheNext();
}
@@ -190,11 +190,11 @@ bool TQtSqlCachedResult::fetchPrev()
bool TQtSqlCachedResult::fetchFirst()
{
if (d->forwardOnly && at() != TQSql::BeforeFirst) {
- return FALSE;
+ return false;
}
if (d->seek(0)) {
setAt(0);
- return TRUE;
+ return true;
}
return cacheNext();
}
@@ -203,7 +203,7 @@ bool TQtSqlCachedResult::fetchLast()
{
if (at() == TQSql::AfterLast) {
if (d->forwardOnly)
- return FALSE;
+ return false;
else
return fetch(d->rowCacheEnd - 1);
}
@@ -213,7 +213,7 @@ bool TQtSqlCachedResult::fetchLast()
i++; /* brute force */
if (d->forwardOnly && at() == TQSql::AfterLast) {
setAt(i);
- return TRUE;
+ return true;
} else {
return fetch(d->rowCacheEnd - 1);
}
@@ -230,7 +230,7 @@ TQVariant TQtSqlCachedResult::data(int i)
bool TQtSqlCachedResult::isNull(int i)
{
if (!d->current || i >= (int)d->current->size() || i < 0)
- return TRUE;
+ return true;
return (*d->current)[i].isNull();
}
@@ -238,7 +238,7 @@ bool TQtSqlCachedResult::isNull(int i)
void TQtSqlCachedResult::cleanup()
{
setAt(TQSql::BeforeFirst);
- setActive(FALSE);
+ setActive(false);
d->cleanup();
}
@@ -246,10 +246,10 @@ bool TQtSqlCachedResult::cacheNext()
{
if (!gotoNext(d->next())) {
d->revertLast();
- return FALSE;
+ return false;
}
setAt(at() + 1);
- return TRUE;
+ return true;
}
int TQtSqlCachedResult::colCount() const
diff --git a/src/sql/drivers/ibase/tqsql_ibase.cpp b/src/sql/drivers/ibase/tqsql_ibase.cpp
index 425d0e311..f7e29999d 100644
--- a/src/sql/drivers/ibase/tqsql_ibase.cpp
+++ b/src/sql/drivers/ibase/tqsql_ibase.cpp
@@ -46,13 +46,13 @@ public:
static bool getIBaseError(TQString& msg, ISC_STATUS* status, long &sqlcode)
{
if (status[0] != 1 || status[1] <= 0)
- return FALSE;
+ return false;
sqlcode = isc_sqlcode(status);
char buf[512];
isc_sql_interprete(sqlcode, buf, 512);
msg = TQString::fromUtf8(buf);
- return TRUE;
+ return true;
}
static void createDA(XSQLDA *&sqlda)
@@ -227,10 +227,10 @@ public:
TQString imsg;
long sqlcode;
if (!getIBaseError(imsg, status, sqlcode))
- return FALSE;
+ return false;
q->setLastError(TQSqlError(msg, imsg, typ, (int)sqlcode));
- return TRUE;
+ return true;
}
public:
@@ -252,10 +252,10 @@ public:
TQString imsg;
long sqlcode;
if (!getIBaseError(imsg, status, sqlcode))
- return FALSE;
+ return false;
q->setLastError(TQSqlError(msg, imsg, typ, (int)sqlcode));
- return TRUE;
+ return true;
}
bool transaction();
@@ -356,7 +356,7 @@ bool TQIBaseResultPrivate::isSelect()
char qType = isc_info_sql_stmt_type;
isc_dsql_sql_info(status, &stmt, 1, &qType, sizeof(acBuffer), acBuffer);
if (isError("Could not get query info", TQSqlError::Statement))
- return FALSE;
+ return false;
int iLength = isc_vax_integer(&acBuffer[1], 2);
queryType = isc_vax_integer(&acBuffer[3], iLength);
return (queryType == isc_info_sql_stmt_select);
@@ -365,19 +365,19 @@ bool TQIBaseResultPrivate::isSelect()
bool TQIBaseResultPrivate::transaction()
{
if (trans)
- return TRUE;
+ return true;
if (db->d->trans) {
- localTransaction = FALSE;
+ localTransaction = false;
trans = db->d->trans;
- return TRUE;
+ return true;
}
- localTransaction = TRUE;
+ localTransaction = true;
isc_start_transaction(status, &trans, 1, &ibase, 0, NULL);
if (isError("Could not start transaction", TQSqlError::Statement))
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
// does nothing if the transaction is on the
@@ -385,10 +385,10 @@ bool TQIBaseResultPrivate::transaction()
bool TQIBaseResultPrivate::commit()
{
if (!trans)
- return FALSE;
+ return false;
// don't commit driver's transaction, the driver will do it for us
if (!localTransaction)
- return TRUE;
+ return true;
isc_commit_transaction(status, &trans);
trans = 0;
@@ -413,33 +413,33 @@ bool TQIBaseResult::prepare(const TQString& query)
{
//tqDebug("prepare: %s", query.ascii());
if (!driver() || !driver()->isOpen() || driver()->isOpenError())
- return FALSE;
+ return false;
d->cleanup();
- setActive(FALSE);
+ setActive(false);
setAt(TQSql::BeforeFirst);
createDA(d->sqlda);
createDA(d->inda);
if (!d->transaction())
- return FALSE;
+ return false;
isc_dsql_allocate_statement(d->status, &d->ibase, &d->stmt);
if (d->isError("Could not allocate statement", TQSqlError::Statement))
- return FALSE;
+ return false;
isc_dsql_prepare(d->status, &d->trans, &d->stmt, 0, query.utf8().data(), 3, d->sqlda);
if (d->isError("Could not prepare statement", TQSqlError::Statement))
- return FALSE;
+ return false;
isc_dsql_describe_bind(d->status, &d->stmt, 1, d->inda);
if (d->isError("Could not describe input statement", TQSqlError::Statement))
- return FALSE;
+ return false;
if (d->inda->sqld > d->inda->sqln) {
enlargeDA(d->inda, d->inda->sqld);
isc_dsql_describe_bind(d->status, &d->stmt, 1, d->inda);
if (d->isError("Could not describe input statement", TQSqlError::Statement))
- return FALSE;
+ return false;
}
initDA(d->inda);
if (d->sqlda->sqld > d->sqlda->sqln) {
@@ -448,7 +448,7 @@ bool TQIBaseResult::prepare(const TQString& query)
isc_dsql_describe(d->status, &d->stmt, 1, d->sqlda);
if (d->isError("Could not describe statement", TQSqlError::Statement))
- return FALSE;
+ return false;
}
initDA(d->sqlda);
@@ -458,21 +458,21 @@ bool TQIBaseResult::prepare(const TQString& query)
d->sqlda = 0;
}
- return TRUE;
+ return true;
}
bool TQIBaseResult::exec()
{
if (!driver() || !driver()->isOpen() || driver()->isOpenError())
- return FALSE;
- setActive(FALSE);
+ return false;
+ setActive(false);
setAt(TQSql::BeforeFirst);
if (d->inda && extension()->index.count() > 0) {
TQMap<int, TQString>::ConstIterator it;
if ((int)extension()->index.count() > d->inda->sqld) {
tqWarning("TQIBaseResult::exec: Parameter mismatch, expected %d, got %d parameters", d->inda->sqld, extension()->index.count());
- return FALSE;
+ return false;
}
int para = 0;
for (it = extension()->index.constBegin(); it != extension()->index.constEnd(); ++it, ++para) {
@@ -530,7 +530,7 @@ bool TQIBaseResult::exec()
memcpy(d->inda->sqlvar[para].sqldata + sizeof(short), str.data(), buflen);
break; }
case SQL_TEXT: {
- TQCString str(val.toString().utf8().leftJustify(d->inda->sqlvar[para].sqllen, ' ', TRUE));
+ TQCString str(val.toString().utf8().leftJustify(d->inda->sqlvar[para].sqllen, ' ', true));
memcpy(d->inda->sqlvar[para].sqldata, str.data(), d->inda->sqlvar[para].sqllen);
break; }
case SQL_BLOB:
@@ -545,39 +545,39 @@ bool TQIBaseResult::exec()
if (colCount()) {
isc_dsql_free_statement(d->status, &d->stmt, DSQL_close);
if (d->isError("Unable to close statement"))
- return FALSE;
+ return false;
cleanup();
}
if (d->sqlda)
init(d->sqlda->sqld);
isc_dsql_execute2(d->status, &d->trans, &d->stmt, 1, d->inda, 0);
if (d->isError("Unable to execute query"))
- return FALSE;
+ return false;
- setActive(TRUE);
- return TRUE;
+ setActive(true);
+ return true;
}
bool TQIBaseResult::reset (const TQString& query)
{
// tqDebug("reset: %s", query.ascii());
if (!driver() || !driver()->isOpen() || driver()->isOpenError())
- return FALSE;
+ return false;
d->cleanup();
- setActive(FALSE);
+ setActive(false);
setAt(TQSql::BeforeFirst);
createDA(d->sqlda);
if (!d->transaction())
- return FALSE;
+ return false;
isc_dsql_allocate_statement(d->status, &d->ibase, &d->stmt);
if (d->isError("Could not allocate statement", TQSqlError::Statement))
- return FALSE;
+ return false;
isc_dsql_prepare(d->status, &d->trans, &d->stmt, 0, query.utf8().data(), 3, d->sqlda);
if (d->isError("Could not prepare statement", TQSqlError::Statement))
- return FALSE;
+ return false;
if (d->sqlda->sqld > d->sqlda->sqln) {
// need more field descriptors
@@ -589,7 +589,7 @@ bool TQIBaseResult::reset (const TQString& query)
isc_dsql_describe(d->status, &d->stmt, 1, d->sqlda);
if (d->isError("Could not describe statement", TQSqlError::Statement))
- return FALSE;
+ return false;
}
initDA(d->sqlda);
@@ -604,14 +604,14 @@ bool TQIBaseResult::reset (const TQString& query)
isc_dsql_execute(d->status, &d->trans, &d->stmt, 1, 0);
if (d->isError("Unable to execute query"))
- return FALSE;
+ return false;
// commit non-select queries (if they are local)
if (!isSelect() && !d->commit())
- return FALSE;
+ return false;
- setActive(TRUE);
- return TRUE;
+ setActive(true);
+ return true;
}
bool TQIBaseResult::gotoNext(TQtSqlCachedResult::RowCache* row)
@@ -621,12 +621,12 @@ bool TQIBaseResult::gotoNext(TQtSqlCachedResult::RowCache* row)
if (stat == 100) {
// no more rows
setAt(TQSql::AfterLast);
- return FALSE;
+ return false;
}
if (d->isError("Could not fetch next item", TQSqlError::Statement))
- return FALSE;
+ return false;
if (!row) // not interested in actual values
- return TRUE;
+ return true;
Q_ASSERT(row);
Q_ASSERT((int)row->size() == d->sqlda->sqld);
@@ -691,7 +691,7 @@ bool TQIBaseResult::gotoNext(TQtSqlCachedResult::RowCache* row)
}
}
- return TRUE;
+ return true;
}
int TQIBaseResult::size()
@@ -768,8 +768,8 @@ TQIBaseDriver::TQIBaseDriver(void *connection, TQObject *parent, const char *nam
{
d = new TQIBaseDriverPrivate(this);
d->ibase = (isc_db_handle)(long int)connection;
- setOpen(TRUE);
- setOpenError(FALSE);
+ setOpen(true);
+ setOpenError(false);
}
TQIBaseDriver::~TQIBaseDriver()
@@ -786,9 +786,9 @@ bool TQIBaseDriver::hasFeature(DriverFeature f) const
case PositionalPlaceholders:
case Unicode:
case BLOB:
- return TRUE;
+ return true;
default:
- return FALSE;
+ return false;
}
}
@@ -830,12 +830,12 @@ bool TQIBaseDriver::open(const TQString & db,
ldb += db;
isc_attach_database(d->status, 0, (char*)ldb.latin1(), &d->ibase, i, ba.data());
if (d->isError("Error opening database", TQSqlError::Connection)) {
- setOpenError(TRUE);
- return FALSE;
+ setOpenError(true);
+ return false;
}
- setOpen(TRUE);
- return TRUE;
+ setOpen(true);
+ return true;
}
void TQIBaseDriver::close()
@@ -843,20 +843,20 @@ void TQIBaseDriver::close()
if (isOpen()) {
isc_detach_database(d->status, &d->ibase);
d->ibase = 0;
- setOpen(FALSE);
- setOpenError(FALSE);
+ setOpen(false);
+ setOpenError(false);
}
}
bool TQIBaseDriver::ping()
{
if ( !isOpen() ) {
- return FALSE;
+ return false;
}
// FIXME
// Implement ping if available
- return TRUE;
+ return true;
}
TQSqlQuery TQIBaseDriver::createQuery() const
@@ -867,9 +867,9 @@ TQSqlQuery TQIBaseDriver::createQuery() const
bool TQIBaseDriver::beginTransaction()
{
if (!isOpen() || isOpenError())
- return FALSE;
+ return false;
if (d->trans)
- return FALSE;
+ return false;
isc_start_transaction(d->status, &d->trans, 1, &d->ibase, 0, NULL);
return !d->isError("Could not start transaction", TQSqlError::Transaction);
@@ -878,9 +878,9 @@ bool TQIBaseDriver::beginTransaction()
bool TQIBaseDriver::commitTransaction()
{
if (!isOpen() || isOpenError())
- return FALSE;
+ return false;
if (!d->trans)
- return FALSE;
+ return false;
isc_commit_transaction(d->status, &d->trans);
d->trans = 0;
@@ -890,9 +890,9 @@ bool TQIBaseDriver::commitTransaction()
bool TQIBaseDriver::rollbackTransaction()
{
if (!isOpen() || isOpenError())
- return FALSE;
+ return false;
if (!d->trans)
- return FALSE;
+ return false;
isc_rollback_transaction(d->status, &d->trans);
d->trans = 0;
@@ -926,7 +926,7 @@ TQStringList TQIBaseDriver::tables(const TQString& typeName) const
typeFilter.prepend("where ");
TQSqlQuery q = createQuery();
- q.setForwardOnly(TRUE);
+ q.setForwardOnly(true);
if (!q.exec("select rdb$relation_name from rdb$relations " + typeFilter))
return res;
while(q.next())
@@ -942,7 +942,7 @@ TQSqlRecord TQIBaseDriver::record(const TQString& tablename) const
return rec;
TQSqlQuery q = createQuery();
- q.setForwardOnly(TRUE);
+ q.setForwardOnly(true);
q.exec("SELECT a.RDB$FIELD_NAME, b.RDB$FIELD_TYPE "
"FROM RDB$RELATION_FIELDS a, RDB$FIELDS b "
@@ -964,7 +964,7 @@ TQSqlRecordInfo TQIBaseDriver::recordInfo(const TQString& tablename) const
return rec;
TQSqlQuery q = createQuery();
- q.setForwardOnly(TRUE);
+ q.setForwardOnly(true);
q.exec("SELECT a.RDB$FIELD_NAME, b.RDB$FIELD_TYPE, b.RDB$FIELD_LENGTH, b.RDB$FIELD_SCALE, "
"b.RDB$FIELD_PRECISION, a.RDB$NULL_FLAG "
@@ -991,7 +991,7 @@ TQSqlIndex TQIBaseDriver::primaryIndex(const TQString &table) const
return index;
TQSqlQuery q = createQuery();
- q.setForwardOnly(TRUE);
+ q.setForwardOnly(true);
q.exec("SELECT a.RDB$INDEX_NAME, b.RDB$FIELD_NAME, d.RDB$FIELD_TYPE "
"FROM RDB$RELATION_CONSTRAINTS a, RDB$INDEX_SEGMENTS b, RDB$RELATION_FIELDS c, RDB$FIELDS d "
"WHERE a.RDB$CONSTRAINT_TYPE = 'PRIMARY KEY' "
@@ -1060,7 +1060,7 @@ TQString TQIBaseDriver::formatValue(const TQSqlField* field, bool trimStrings) c
TQString::number(datetime.time().hour()) + ":" +
TQString::number(datetime.time().minute()) + ":" +
TQString::number(datetime.time().second()) + "." +
- TQString::number(datetime.time().msec()).rightJustify(3, '0', TRUE) + "'";
+ TQString::number(datetime.time().msec()).rightJustify(3, '0', true) + "'";
else
return "NULL";
}
@@ -1070,7 +1070,7 @@ TQString TQIBaseDriver::formatValue(const TQSqlField* field, bool trimStrings) c
return "'" + TQString::number(time.hour()) + ":" +
TQString::number(time.minute()) + ":" +
TQString::number(time.second()) + "." +
- TQString::number(time.msec()).rightJustify(3, '0', TRUE) + "'";
+ TQString::number(time.msec()).rightJustify(3, '0', true) + "'";
else
return "NULL";
}
diff --git a/src/sql/drivers/mysql/tqsql_mysql.cpp b/src/sql/drivers/mysql/tqsql_mysql.cpp
index 603a5b960..47e3c6ff0 100644
--- a/src/sql/drivers/mysql/tqsql_mysql.cpp
+++ b/src/sql/drivers/mysql/tqsql_mysql.cpp
@@ -56,7 +56,7 @@
TQPtrDict<TQSqlOpenExtension> *tqSqlOpenExtDict();
static int qMySqlConnectionCount = 0;
-static bool qMySqlInitHandledByUser = FALSE;
+static bool qMySqlInitHandledByUser = false;
class TQMYSQLOpenExtension : public TQSqlOpenExtension
{
@@ -181,7 +181,7 @@ void TQMYSQLResult::cleanup()
d->result = NULL;
d->row = NULL;
setAt( -1 );
- setActive( FALSE );
+ setActive( false );
}
bool TQMYSQLResult::fetch( int i )
@@ -192,26 +192,26 @@ bool TQMYSQLResult::fetch( int i )
while ( --x && fetchNext() );
return fetchNext();
} else {
- return FALSE;
+ return false;
}
}
if ( at() == i )
- return TRUE;
+ return true;
mysql_data_seek( d->result, i );
d->row = mysql_fetch_row( d->result );
if ( !d->row )
- return FALSE;
+ return false;
setAt( i );
- return TRUE;
+ return true;
}
bool TQMYSQLResult::fetchNext()
{
d->row = mysql_fetch_row( d->result );
if ( !d->row )
- return FALSE;
+ return false;
setAt( at() + 1 );
- return TRUE;
+ return true;
}
bool TQMYSQLResult::fetchLast()
@@ -223,7 +223,7 @@ bool TQMYSQLResult::fetchLast()
}
my_ulonglong numRows = mysql_num_rows( d->result );
if ( !numRows )
- return FALSE;
+ return false;
return fetch( numRows - 1 );
}
@@ -292,22 +292,22 @@ TQVariant TQMYSQLResult::data( int field )
bool TQMYSQLResult::isNull( int field )
{
if ( d->row[field] == NULL )
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
bool TQMYSQLResult::reset ( const TQString& query )
{
if ( !driver() )
- return FALSE;
+ return false;
if ( !driver()-> isOpen() || driver()->isOpenError() )
- return FALSE;
+ return false;
cleanup();
const char *encQuery = query.ascii();
if ( mysql_real_query( d->mysql, encQuery, tqstrlen(encQuery) ) ) {
setLastError( qMakeError("Unable to execute query", TQSqlError::Statement, d ) );
- return FALSE;
+ return false;
}
if ( isForwardOnly() ) {
if ( isActive() || isValid() ) // have to empty the results from previous query
@@ -318,7 +318,7 @@ bool TQMYSQLResult::reset ( const TQString& query )
}
if ( !d->result && mysql_field_count( d->mysql ) > 0 ) {
setLastError( qMakeError( "Unable to store result", TQSqlError::Statement, d ) );
- return FALSE;
+ return false;
}
int numFields = mysql_field_count( d->mysql );
setSelect( !( numFields == 0) );
@@ -332,8 +332,8 @@ bool TQMYSQLResult::reset ( const TQString& query )
d->fieldTypes[i] = qDecodeMYSQLType( field->type, field->flags );
}
}
- setActive( TRUE );
- return TRUE;
+ setActive( true );
+ return true;
}
int TQMYSQLResult::size()
@@ -403,10 +403,10 @@ TQMYSQLDriver::TQMYSQLDriver( MYSQL * con, TQObject * parent, const char * name
init();
if ( con ) {
d->mysql = (MYSQL *) con;
- setOpen( TRUE );
- setOpenError( FALSE );
+ setOpen( true );
+ setOpenError( false );
if (qMySqlConnectionCount == 1)
- qMySqlInitHandledByUser = TRUE;
+ qMySqlInitHandledByUser = true;
} else {
qServerInit();
}
@@ -441,18 +441,18 @@ bool TQMYSQLDriver::hasFeature( DriverFeature f ) const
#ifdef CLIENT_TRANSACTIONS
if ( d->mysql ) {
if ( ( d->mysql->server_capabilities & CLIENT_TRANSACTIONS ) == CLIENT_TRANSACTIONS )
- return TRUE;
+ return true;
}
#endif
- return FALSE;
+ return false;
case QuerySize:
- return TRUE;
+ return true;
case BLOB:
- return TRUE;
+ return true;
case Unicode:
- return FALSE;
+ return false;
default:
- return FALSE;
+ return false;
}
}
@@ -463,7 +463,7 @@ bool TQMYSQLDriver::open( const TQString&,
int )
{
tqWarning("TQMYSQLDriver::open(): This version of open() is no longer supported." );
- return FALSE;
+ return false;
}
bool TQMYSQLDriver::open( const TQString& db,
@@ -513,8 +513,8 @@ bool TQMYSQLDriver::open( const TQString& db,
if (!(d->mysql = mysql_init((MYSQL*) 0))) {
setLastError( qMakeError( "Unable to connect", TQSqlError::Connection, d ) );
mysql_close( d->mysql );
- setOpenError( TRUE );
- return FALSE;
+ setOpenError( true );
+ return false;
}
bool reconnect = 0;
@@ -563,41 +563,41 @@ bool TQMYSQLDriver::open( const TQString& db,
if ( !db.isEmpty() && mysql_select_db( d->mysql, db )) {
setLastError( qMakeError("Unable open database '" + db + "'", TQSqlError::Connection, d ) );
mysql_close( d->mysql );
- setOpenError( TRUE );
- return FALSE;
+ setOpenError( true );
+ return false;
}
} else {
setLastError( qMakeError( "Unable to connect", TQSqlError::Connection, d ) );
mysql_close( d->mysql );
- setOpenError( TRUE );
- return FALSE;
+ setOpenError( true );
+ return false;
}
- setOpen( TRUE );
- setOpenError( FALSE );
- return TRUE;
+ setOpen( true );
+ setOpenError( false );
+ return true;
}
void TQMYSQLDriver::close()
{
if ( isOpen() ) {
mysql_close( d->mysql );
- setOpen( FALSE );
- setOpenError( FALSE );
+ setOpen( false );
+ setOpenError( false );
}
}
bool TQMYSQLDriver::ping()
{
if ( !isOpen() ) {
- return FALSE;
+ return false;
}
if (mysql_ping( d->mysql )) {
- return TRUE;
+ return true;
}
else {
setLastError( qMakeError("Unable to execute ping", TQSqlError::Statement, d ) );
- return FALSE;
+ return false;
}
}
@@ -617,7 +617,7 @@ TQStringList TQMYSQLDriver::tables( const TQString& typeName ) const
MYSQL_RES* tableRes = mysql_list_tables( d->mysql, NULL );
MYSQL_ROW row;
int i = 0;
- while ( tableRes && TRUE ) {
+ while ( tableRes ) {
mysql_data_seek( tableRes, i );
row = mysql_fetch_row( tableRes );
if ( !row )
@@ -749,55 +749,55 @@ MYSQL* TQMYSQLDriver::mysql()
bool TQMYSQLDriver::beginTransaction()
{
#ifndef CLIENT_TRANSACTIONS
- return FALSE;
+ return false;
#endif
if ( !isOpen() ) {
#ifdef QT_CHECK_RANGE
tqWarning( "TQMYSQLDriver::beginTransaction: Database not open" );
#endif
- return FALSE;
+ return false;
}
if ( mysql_query( d->mysql, "BEGIN WORK" ) ) {
setLastError( qMakeError("Unable to begin transaction", TQSqlError::Statement, d ) );
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
bool TQMYSQLDriver::commitTransaction()
{
#ifndef CLIENT_TRANSACTIONS
- return FALSE;
+ return false;
#endif
if ( !isOpen() ) {
#ifdef QT_CHECK_RANGE
tqWarning( "TQMYSQLDriver::commitTransaction: Database not open" );
#endif
- return FALSE;
+ return false;
}
if ( mysql_query( d->mysql, "COMMIT" ) ) {
setLastError( qMakeError("Unable to commit transaction", TQSqlError::Statement, d ) );
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
bool TQMYSQLDriver::rollbackTransaction()
{
#ifndef CLIENT_TRANSACTIONS
- return FALSE;
+ return false;
#endif
if ( !isOpen() ) {
#ifdef QT_CHECK_RANGE
tqWarning( "TQMYSQLDriver::rollbackTransaction: Database not open" );
#endif
- return FALSE;
+ return false;
}
if ( mysql_query( d->mysql, "ROLLBACK" ) ) {
setLastError( qMakeError("Unable to rollback transaction", TQSqlError::Statement, d ) );
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
TQString TQMYSQLDriver::formatValue( const TQSqlField* field, bool trimStrings ) const
diff --git a/src/sql/drivers/odbc/tqsql_odbc.cpp b/src/sql/drivers/odbc/tqsql_odbc.cpp
index 3da2dd50c..bc09fb28b 100644
--- a/src/sql/drivers/odbc/tqsql_odbc.cpp
+++ b/src/sql/drivers/odbc/tqsql_odbc.cpp
@@ -81,10 +81,10 @@ class TQODBCPrivate
{
public:
TQODBCPrivate()
- : hEnv(0), hDbc(0), hStmt(0), useSchema(FALSE)
+ : hEnv(0), hDbc(0), hStmt(0), useSchema(false)
{
sql_char_type = sql_varchar_type = sql_longvarchar_type = TQVariant::CString;
- unicode = FALSE;
+ unicode = false;
}
SQLHANDLE hEnv;
@@ -258,7 +258,7 @@ static TQVariant::Type qDecodeODBCType( SQLSMALLINT sqltype, const TQODBCPrivate
return type;
}
-static TQString qGetStringData( SQLHANDLE hStmt, int column, int colSize, bool& isNull, bool unicode = FALSE )
+static TQString qGetStringData( SQLHANDLE hStmt, int column, int colSize, bool& isNull, bool unicode = false )
{
TQString fieldVal;
SQLRETURN r = SQL_ERROR;
@@ -275,7 +275,7 @@ static TQString qGetStringData( SQLHANDLE hStmt, int column, int colSize, bool&
}
}
char* buf = new char[ colSize ];
- while ( TRUE ) {
+ while ( true ) {
r = SQLGetData( hStmt,
column+1,
unicode ? SQL_C_WCHAR : SQL_C_CHAR,
@@ -285,7 +285,7 @@ static TQString qGetStringData( SQLHANDLE hStmt, int column, int colSize, bool&
if ( r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO ) {
if ( lengthIndicator == SQL_NULL_DATA || lengthIndicator == SQL_NO_TOTAL ) {
fieldVal = TQString::null;
- isNull = TRUE;
+ isNull = true;
break;
}
// if SQL_SUCCESS_WITH_INFO is returned, indicating that
@@ -350,7 +350,7 @@ static TQByteArray qGetBinaryData( SQLHANDLE hStmt, int column, TQSQLLEN& length
colSize = 65536;
}
char * buf = new char[ colSize ];
- while ( TRUE ) {
+ while ( true ) {
r = SQLGetData( hStmt,
column+1,
SQL_C_BINARY,
@@ -359,7 +359,7 @@ static TQByteArray qGetBinaryData( SQLHANDLE hStmt, int column, TQSQLLEN& length
&lengthIndicator );
if ( r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO ) {
if ( lengthIndicator == SQL_NULL_DATA ) {
- isNull = TRUE;
+ isNull = true;
break;
} else {
int rSize;
@@ -391,7 +391,7 @@ static TQByteArray qGetBinaryData( SQLHANDLE hStmt, int column, TQSQLLEN& length
static int qGetIntData( SQLHANDLE hStmt, int column, bool& isNull )
{
TQSQLLEN intbuf = 0;
- isNull = FALSE;
+ isNull = false;
TQSQLLEN lengthIndicator = 0;
SQLRETURN r = SQLGetData( hStmt,
column+1,
@@ -400,7 +400,7 @@ static int qGetIntData( SQLHANDLE hStmt, int column, bool& isNull )
(TQSQLLEN)0,
&lengthIndicator );
if ( ( r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO ) || lengthIndicator == SQL_NULL_DATA ) {
- isNull = TRUE;
+ isNull = true;
return 0;
}
return (int)intbuf;
@@ -410,7 +410,7 @@ static double qGetDoubleData( SQLHANDLE hStmt, int column, bool& isNull )
{
SQLDOUBLE dblbuf;
TQSQLLEN lengthIndicator = 0;
- isNull = FALSE;
+ isNull = false;
SQLRETURN r = SQLGetData( hStmt,
column+1,
SQL_C_DOUBLE,
@@ -418,7 +418,7 @@ static double qGetDoubleData( SQLHANDLE hStmt, int column, bool& isNull )
(TQSQLLEN)0,
&lengthIndicator );
if ( ( r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO ) || lengthIndicator == SQL_NULL_DATA ) {
- isNull = TRUE;
+ isNull = true;
return 0.0;
}
@@ -428,7 +428,7 @@ static double qGetDoubleData( SQLHANDLE hStmt, int column, bool& isNull )
static SQLBIGINT qGetBigIntData( SQLHANDLE hStmt, int column, bool& isNull )
{
SQLBIGINT lngbuf = TQ_INT64_C( 0 );
- isNull = FALSE;
+ isNull = false;
TQSQLLEN lengthIndicator = 0;
SQLRETURN r = SQLGetData( hStmt,
column+1,
@@ -437,7 +437,7 @@ static SQLBIGINT qGetBigIntData( SQLHANDLE hStmt, int column, bool& isNull )
(TQSQLLEN)0,
&lengthIndicator );
if ( ( r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO ) || lengthIndicator == SQL_NULL_DATA )
- isNull = TRUE;
+ isNull = true;
return lngbuf;
}
@@ -600,11 +600,11 @@ bool TQODBCPrivate::setConnectionOptions( const TQString& connOpts )
#ifdef QT_CHECK_RANGE
qSqlWarning( TQString("TQODBCDriver::open: Unable to set connection attribute '%1'").arg( opt ), this );
#endif
- return FALSE;
+ return false;
}
}
}
- return TRUE;
+ return true;
}
void TQODBCPrivate::splitTableQualifier(const TQString & qualifier, TQString &catalog,
@@ -614,7 +614,7 @@ void TQODBCPrivate::splitTableQualifier(const TQString & qualifier, TQString &ca
table = qualifier;
return;
}
- TQStringList l = TQStringList::split( ".", qualifier, TRUE );
+ TQStringList l = TQStringList::split( ".", qualifier, true );
if ( l.count() > 3 )
return; // can't possibly be a valid table qualifier
int i = 0, n = l.count();
@@ -667,7 +667,7 @@ TQODBCResult::~TQODBCResult()
bool TQODBCResult::reset ( const TQString& query )
{
- setActive( FALSE );
+ setActive( false );
setAt( TQSql::BeforeFirst );
SQLRETURN r;
@@ -680,7 +680,7 @@ bool TQODBCResult::reset ( const TQString& query )
#ifdef QT_CHECK_RANGE
qSqlWarning( "TQODBCResult::reset: Unable to free statement handle", d );
#endif
- return FALSE;
+ return false;
}
}
r = SQLAllocHandle( SQL_HANDLE_STMT,
@@ -690,7 +690,7 @@ bool TQODBCResult::reset ( const TQString& query )
#ifdef QT_CHECK_RANGE
qSqlWarning( "TQODBCResult::reset: Unable to allocate statement handle", d );
#endif
- return FALSE;
+ return false;
}
if ( isForwardOnly() ) {
@@ -708,7 +708,7 @@ bool TQODBCResult::reset ( const TQString& query )
#ifdef QT_CHECK_RANGE
qSqlWarning( "TQODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration", d );
#endif
- return FALSE;
+ return false;
}
#ifdef UNICODE
@@ -723,38 +723,38 @@ bool TQODBCResult::reset ( const TQString& query )
#endif
if ( r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO ) {
setLastError( qMakeError( "Unable to execute statement", TQSqlError::Statement, d ) );
- return FALSE;
+ return false;
}
SQLSMALLINT count;
r = SQLNumResultCols( d->hStmt, &count );
if ( count ) {
- setSelect( TRUE );
+ setSelect( true );
for ( int i = 0; i < count; ++i ) {
d->rInf.append( qMakeFieldInfo( d, i ) );
}
} else {
- setSelect( FALSE );
+ setSelect( false );
}
- setActive( TRUE );
- return TRUE;
+ setActive( true );
+ return true;
}
bool TQODBCResult::fetch(int i)
{
if ( isForwardOnly() && i < at() )
- return FALSE;
+ return false;
if ( i == at() )
- return TRUE;
+ return true;
fieldCache.clear();
nullCache.clear();
int actualIdx = i + 1;
if ( actualIdx <= 0 ) {
setAt( TQSql::BeforeFirst );
- return FALSE;
+ return false;
}
SQLRETURN r;
if ( isForwardOnly() ) {
- bool ok = TRUE;
+ bool ok = true;
while ( ok && i > at() )
ok = fetchNext();
return ok;
@@ -764,10 +764,10 @@ bool TQODBCResult::fetch(int i)
actualIdx );
}
if ( r != SQL_SUCCESS ){
- return FALSE;
+ return false;
}
setAt( i );
- return TRUE;
+ return true;
}
bool TQODBCResult::fetchNext()
@@ -779,15 +779,15 @@ bool TQODBCResult::fetchNext()
SQL_FETCH_NEXT,
0 );
if ( r != SQL_SUCCESS )
- return FALSE;
+ return false;
setAt( at() + 1 );
- return TRUE;
+ return true;
}
bool TQODBCResult::fetchFirst()
{
if ( isForwardOnly() && at() != TQSql::BeforeFirst )
- return FALSE;
+ return false;
SQLRETURN r;
fieldCache.clear();
nullCache.clear();
@@ -798,15 +798,15 @@ bool TQODBCResult::fetchFirst()
SQL_FETCH_FIRST,
0 );
if ( r != SQL_SUCCESS )
- return FALSE;
+ return false;
setAt( 0 );
- return TRUE;
+ return true;
}
bool TQODBCResult::fetchPrior()
{
if ( isForwardOnly() )
- return FALSE;
+ return false;
SQLRETURN r;
fieldCache.clear();
nullCache.clear();
@@ -814,9 +814,9 @@ bool TQODBCResult::fetchPrior()
SQL_FETCH_PRIOR,
0 );
if ( r != SQL_SUCCESS )
- return FALSE;
+ return false;
setAt( at() - 1 );
- return TRUE;
+ return true;
}
bool TQODBCResult::fetchLast()
@@ -829,20 +829,20 @@ bool TQODBCResult::fetchLast()
// cannot seek to last row in forwardOnly mode, so we have to use brute force
int i = at();
if ( i == TQSql::AfterLast )
- return FALSE;
+ return false;
if ( i == TQSql::BeforeFirst )
i = 0;
while ( fetchNext() )
++i;
setAt( i );
- return TRUE;
+ return true;
}
r = SQLFetchScroll( d->hStmt,
SQL_FETCH_LAST,
0 );
if ( r != SQL_SUCCESS ) {
- return FALSE;
+ return false;
}
SQLINTEGER currRow;
r = SQLGetStmtAttr( d->hStmt,
@@ -851,9 +851,9 @@ bool TQODBCResult::fetchLast()
SQL_IS_INTEGER,
0 );
if ( r != SQL_SUCCESS )
- return FALSE;
+ return false;
setAt( currRow-1 );
- return TRUE;
+ return true;
}
TQVariant TQODBCResult::data( int field )
@@ -866,7 +866,7 @@ TQVariant TQODBCResult::data( int field )
return fieldCache[ field ];
SQLRETURN r(0);
TQSQLLEN lengthIndicator = 0;
- bool isNull = FALSE;
+ bool isNull = false;
int current = fieldCache.count();
for ( ; current < (field + 1); ++current ) {
const TQSqlFieldInfo info = d->rInf[ current ];
@@ -889,10 +889,10 @@ TQVariant TQODBCResult::data( int field )
&lengthIndicator );
if ( ( r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO ) && ( lengthIndicator != SQL_NULL_DATA ) ) {
fieldCache[ current ] = TQVariant( TQDate( dbuf.year, dbuf.month, dbuf.day ) );
- nullCache[ current ] = FALSE;
+ nullCache[ current ] = false;
} else {
fieldCache[ current ] = TQVariant( TQDate() );
- nullCache[ current ] = TRUE;
+ nullCache[ current ] = true;
}
break;
case TQVariant::Time:
@@ -905,10 +905,10 @@ TQVariant TQODBCResult::data( int field )
&lengthIndicator );
if ( ( r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO ) && ( lengthIndicator != SQL_NULL_DATA ) ) {
fieldCache[ current ] = TQVariant( TQTime( tbuf.hour, tbuf.minute, tbuf.second ) );
- nullCache[ current ] = FALSE;
+ nullCache[ current ] = false;
} else {
fieldCache[ current ] = TQVariant( TQTime() );
- nullCache[ current ] = TRUE;
+ nullCache[ current ] = true;
}
break;
case TQVariant::DateTime:
@@ -921,38 +921,38 @@ TQVariant TQODBCResult::data( int field )
&lengthIndicator );
if ( ( r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO ) && ( lengthIndicator != SQL_NULL_DATA ) ) {
fieldCache[ current ] = TQVariant( TQDateTime( TQDate( dtbuf.year, dtbuf.month, dtbuf.day ), TQTime( dtbuf.hour, dtbuf.minute, dtbuf.second, dtbuf.fraction / 1000000 ) ) );
- nullCache[ current ] = FALSE;
+ nullCache[ current ] = false;
} else {
fieldCache[ current ] = TQVariant( TQDateTime() );
- nullCache[ current ] = TRUE;
+ nullCache[ current ] = true;
}
break;
case TQVariant::ByteArray: {
- isNull = FALSE;
+ isNull = false;
TQByteArray val = qGetBinaryData( d->hStmt, current, lengthIndicator, isNull );
fieldCache[ current ] = TQVariant( val );
nullCache[ current ] = isNull;
break; }
case TQVariant::String:
- isNull = FALSE;
+ isNull = false;
fieldCache[ current ] = TQVariant( qGetStringData( d->hStmt, current,
- info.length(), isNull, TRUE ) );
+ info.length(), isNull, true ) );
nullCache[ current ] = isNull;
break;
case TQVariant::Double:
if ( info.typeID() == SQL_DECIMAL || info.typeID() == SQL_NUMERIC )
// bind Double values as string to prevent loss of precision
fieldCache[ current ] = TQVariant( qGetStringData( d->hStmt, current,
- info.length() + 1, isNull, FALSE ) ); // length + 1 for the comma
+ info.length() + 1, isNull, false ) ); // length + 1 for the comma
else
fieldCache[ current ] = TQVariant( qGetDoubleData( d->hStmt, current, isNull ) );
nullCache[ current ] = isNull;
break;
case TQVariant::CString:
default:
- isNull = FALSE;
+ isNull = false;
fieldCache[ current ] = TQVariant( qGetStringData( d->hStmt, current,
- info.length(), isNull, FALSE ) );
+ info.length(), isNull, false ) );
nullCache[ current ] = isNull;
break;
}
@@ -991,7 +991,7 @@ int TQODBCResult::numRowsAffected()
bool TQODBCResult::prepare( const TQString& query )
{
- setActive( FALSE );
+ setActive( false );
setAt( TQSql::BeforeFirst );
SQLRETURN r;
@@ -1002,7 +1002,7 @@ bool TQODBCResult::prepare( const TQString& query )
#ifdef QT_CHECK_RANGE
qSqlWarning( "TQODBCResult::prepare: Unable to close statement", d );
#endif
- return FALSE;
+ return false;
}
}
r = SQLAllocHandle( SQL_HANDLE_STMT,
@@ -1012,7 +1012,7 @@ bool TQODBCResult::prepare( const TQString& query )
#ifdef QT_CHECK_RANGE
qSqlWarning( "TQODBCResult::prepare: Unable to allocate statement handle", d );
#endif
- return FALSE;
+ return false;
}
if ( isForwardOnly() ) {
@@ -1030,7 +1030,7 @@ bool TQODBCResult::prepare( const TQString& query )
#ifdef QT_CHECK_RANGE
qSqlWarning( "TQODBCResult::prepare: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration", d );
#endif
- return FALSE;
+ return false;
}
#ifdef UNICODE
@@ -1048,18 +1048,18 @@ bool TQODBCResult::prepare( const TQString& query )
#ifdef QT_CHECK_RANGE
qSqlWarning( "TQODBCResult::prepare: Unable to prepare statement", d );
#endif
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
bool TQODBCResult::exec()
{
SQLRETURN r;
TQPtrList<TQVirtualDestructor> tmpStorage; // holds temporary ptrs. which will be deleted on fu exit
- tmpStorage.setAutoDelete( TRUE );
+ tmpStorage.setAutoDelete( true );
- setActive( FALSE );
+ setActive( false );
setAt( TQSql::BeforeFirst );
d->rInf.clear();
@@ -1067,12 +1067,12 @@ bool TQODBCResult::exec()
#ifdef QT_CHECK_RANGE
qSqlWarning( "TQODBCResult::exec: No statement handle available", d );
#endif
- return FALSE;
+ return false;
} else {
r = SQLFreeStmt( d->hStmt, SQL_CLOSE );
if ( r != SQL_SUCCESS ) {
qSqlWarning( "TQODBCResult::exec: Unable to close statement handle", d );
- return FALSE;
+ return false;
}
}
@@ -1232,7 +1232,7 @@ bool TQODBCResult::exec()
tqWarning( "TQODBCResult::exec: unable to bind variable: %s", qODBCWarn( d ).local8Bit().data() );
#endif
setLastError( qMakeError( "Unable to bind variable", TQSqlError::Statement, d ) );
- return FALSE;
+ return false;
}
}
}
@@ -1242,19 +1242,19 @@ bool TQODBCResult::exec()
tqWarning( "TQODBCResult::exec: Unable to execute statement: %s", qODBCWarn( d ).local8Bit().data() );
#endif
setLastError( qMakeError( "Unable to execute statement", TQSqlError::Statement, d ) );
- return FALSE;
+ return false;
}
SQLSMALLINT count;
r = SQLNumResultCols( d->hStmt, &count );
if ( count ) {
- setSelect( TRUE );
+ setSelect( true );
for ( int i = 0; i < count; ++i ) {
d->rInf.append( qMakeFieldInfo( d, i ) );
}
} else {
- setSelect( FALSE );
+ setSelect( false );
}
- setActive( TRUE );
+ setActive( true );
//get out parameters
if ( extension()->index.count() > 0 ) {
@@ -1263,7 +1263,7 @@ bool TQODBCResult::exec()
SQLINTEGER* indPtr = qAutoDeleterData( (TQAutoDeleter<SQLINTEGER>*)tmpStorage.getFirst() );
if ( !indPtr )
- return FALSE;
+ return false;
bool isNull = (*indPtr == SQL_NULL_DATA);
tmpStorage.removeFirst();
@@ -1318,7 +1318,7 @@ bool TQODBCResult::exec()
}
}
- return TRUE;
+ return true;
}
////////////////////////////////////////
@@ -1337,8 +1337,8 @@ TQODBCDriver::TQODBCDriver( SQLHANDLE env, SQLHANDLE con, TQObject * parent, con
d->hEnv = env;
d->hDbc = con;
if ( env && con ) {
- setOpen( TRUE );
- setOpenError( FALSE );
+ setOpen( true );
+ setOpenError( false );
}
}
@@ -1363,7 +1363,7 @@ bool TQODBCDriver::hasFeature( DriverFeature f ) const
switch ( f ) {
case Transactions: {
if ( !d->hDbc )
- return FALSE;
+ return false;
SQLUSMALLINT txn;
SQLSMALLINT t;
int r = SQLGetInfo( d->hDbc,
@@ -1372,22 +1372,22 @@ bool TQODBCDriver::hasFeature( DriverFeature f ) const
sizeof(txn),
&t);
if ( r != SQL_SUCCESS || txn == SQL_TC_NONE )
- return FALSE;
+ return false;
else
- return TRUE;
+ return true;
}
case QuerySize:
- return FALSE;
+ return false;
case BLOB:
- return TRUE;
+ return true;
case Unicode:
return d->unicode;
case PreparedQueries:
- return TRUE;
+ return true;
case PositionalPlaceholders:
- return TRUE;
+ return true;
default:
- return FALSE;
+ return false;
}
}
@@ -1398,7 +1398,7 @@ bool TQODBCDriver::open( const TQString&,
int )
{
tqWarning("TQODBCDriver::open(): This version of open() is no longer supported." );
- return FALSE;
+ return false;
}
bool TQODBCDriver::open( const TQString & db,
@@ -1418,8 +1418,8 @@ bool TQODBCDriver::open( const TQString & db,
#ifdef QT_CHECK_RANGE
qSqlWarning( "TQODBCDriver::open: Unable to allocate environment", d );
#endif
- setOpenError( TRUE );
- return FALSE;
+ setOpenError( true );
+ return false;
}
r = SQLSetEnvAttr( d->hEnv,
SQL_ATTR_ODBC_VERSION,
@@ -1432,12 +1432,12 @@ bool TQODBCDriver::open( const TQString & db,
#ifdef QT_CHECK_RANGE
qSqlWarning( "TQODBCDriver::open: Unable to allocate connection", d );
#endif
- setOpenError( TRUE );
- return FALSE;
+ setOpenError( true );
+ return false;
}
if ( !d->setConnectionOptions( connOpts ) )
- return FALSE;
+ return false;
// Create the connection string
TQString connTQStr;
@@ -1465,36 +1465,36 @@ bool TQODBCDriver::open( const TQString & db,
SQL_DRIVER_NOPROMPT );
if ( r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO ) {
setLastError( qMakeError( "Unable to connect", TQSqlError::Connection, d ) );
- setOpenError( TRUE );
- return FALSE;
+ setOpenError( true );
+ return false;
}
if ( !d->checkDriver() ) {
setLastError( qMakeError( "Unable to connect - Driver doesn't support all needed functionality", TQSqlError::Connection, d ) );
- setOpenError( TRUE );
- return FALSE;
+ setOpenError( true );
+ return false;
}
d->checkUnicode();
d->checkSchemaUsage();
- setOpen( TRUE );
- setOpenError( FALSE );
- return TRUE;
+ setOpen( true );
+ setOpenError( false );
+ return true;
}
void TQODBCDriver::close()
{
cleanup();
- setOpen( FALSE );
- setOpenError( FALSE );
+ setOpen( false );
+ setOpenError( false );
}
bool TQODBCDriver::ping()
{
// FIXME
// Implement ping if supported
- return TRUE;
+ return true;
}
void TQODBCDriver::cleanup()
@@ -1537,14 +1537,14 @@ void TQODBCPrivate::checkUnicode()
{
#if defined(TQ_WS_WIN)
if ( !qt_winunicode ) {
- unicode = FALSE;
+ unicode = false;
return;
}
#endif
SQLRETURN r;
SQLUINTEGER fFunc;
- unicode = FALSE;
+ unicode = false;
r = SQLGetInfo( hDbc,
SQL_CONVERT_CHAR,
(SQLPOINTER)&fFunc,
@@ -1552,7 +1552,7 @@ void TQODBCPrivate::checkUnicode()
NULL );
if ( ( r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO ) && ( fFunc & SQL_CVT_WCHAR ) ) {
sql_char_type = TQVariant::String;
- unicode = TRUE;
+ unicode = true;
}
r = SQLGetInfo( hDbc,
@@ -1562,7 +1562,7 @@ void TQODBCPrivate::checkUnicode()
NULL );
if ( ( r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO ) && ( fFunc & SQL_CVT_WVARCHAR ) ) {
sql_varchar_type = TQVariant::String;
- unicode = TRUE;
+ unicode = true;
}
r = SQLGetInfo( hDbc,
@@ -1572,7 +1572,7 @@ void TQODBCPrivate::checkUnicode()
NULL );
if ( ( r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO ) && ( fFunc & SQL_CVT_WLONGVARCHAR ) ) {
sql_longvarchar_type = TQVariant::String;
- unicode = TRUE;
+ unicode = true;
}
}
@@ -1604,7 +1604,7 @@ bool TQODBCPrivate::checkDriver() const
#ifdef QT_CHECK_RANGE
if ( r != SQL_SUCCESS ) {
qSqlWarning( "TQODBCDriver::checkDriver: Cannot get list of supported functions", this );
- return FALSE;
+ return false;
}
#endif
if ( sup == SQL_FALSE ) {
@@ -1612,7 +1612,7 @@ bool TQODBCPrivate::checkDriver() const
tqWarning ( "TQODBCDriver::open: Warning - Driver doesn't support all needed functionality (%d). "
"Please look at the TQt SQL Module Driver documentation for more information.", reqFunc[ i ] );
#endif
- return FALSE;
+ return false;
}
}
@@ -1624,19 +1624,19 @@ bool TQODBCPrivate::checkDriver() const
#ifdef QT_CHECK_RANGE
if ( r != SQL_SUCCESS ) {
qSqlWarning( "TQODBCDriver::checkDriver: Cannot get list of supported functions", this );
- return FALSE;
+ return false;
}
#endif
if ( sup == SQL_FALSE ) {
#ifdef QT_CHECK_RANGE
tqWarning( "TQODBCDriver::checkDriver: Warning - Driver doesn't support some non-critical functions (%d)", optFunc[ i ] );
#endif
- return TRUE;
+ return true;
}
}
#endif //ODBC_CHECK_DRIVER
- return TRUE;
+ return true;
}
void TQODBCPrivate::checkSchemaUsage()
@@ -1664,7 +1664,7 @@ bool TQODBCDriver::beginTransaction()
#ifdef QT_CHECK_RANGE
tqWarning(" TQODBCDriver::beginTransaction: Database not open" );
#endif
- return FALSE;
+ return false;
}
SQLUINTEGER ac(SQL_AUTOCOMMIT_OFF);
SQLRETURN r = SQLSetConnectAttr( d->hDbc,
@@ -1673,9 +1673,9 @@ bool TQODBCDriver::beginTransaction()
sizeof(ac) );
if ( r != SQL_SUCCESS ) {
setLastError( qMakeError( "Unable to disable autocommit", TQSqlError::Transaction, d ) );
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
bool TQODBCDriver::commitTransaction()
@@ -1684,14 +1684,14 @@ bool TQODBCDriver::commitTransaction()
#ifdef QT_CHECK_RANGE
tqWarning(" TQODBCDriver::commitTransaction: Database not open" );
#endif
- return FALSE;
+ return false;
}
SQLRETURN r = SQLEndTran( SQL_HANDLE_DBC,
d->hDbc,
SQL_COMMIT );
if ( r != SQL_SUCCESS ) {
setLastError( qMakeError("Unable to commit transaction", TQSqlError::Transaction, d ) );
- return FALSE;
+ return false;
}
return endTrans();
}
@@ -1702,14 +1702,14 @@ bool TQODBCDriver::rollbackTransaction()
#ifdef QT_CHECK_RANGE
tqWarning(" TQODBCDriver::rollbackTransaction: Database not open" );
#endif
- return FALSE;
+ return false;
}
SQLRETURN r = SQLEndTran( SQL_HANDLE_DBC,
d->hDbc,
SQL_ROLLBACK );
if ( r != SQL_SUCCESS ) {
setLastError( qMakeError( "Unable to rollback transaction", TQSqlError::Transaction, d ) );
- return FALSE;
+ return false;
}
return endTrans();
}
@@ -1723,9 +1723,9 @@ bool TQODBCDriver::endTrans()
sizeof(ac));
if ( r != SQL_SUCCESS ) {
setLastError( qMakeError( "Unable to enable autocommit", TQSqlError::Transaction, d ) );
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
TQStringList TQODBCDriver::tables( const TQString& typeName ) const
@@ -1801,7 +1801,7 @@ TQSqlIndex TQODBCDriver::primaryIndex( const TQString& tablename ) const
TQSqlIndex index( tablename );
if ( !isOpen() )
return index;
- bool usingSpecialColumns = FALSE;
+ bool usingSpecialColumns = false;
TQSqlRecord rec = record( tablename );
SQLHANDLE hStmt;
@@ -1873,7 +1873,7 @@ TQSqlIndex TQODBCDriver::primaryIndex( const TQString& tablename ) const
qSqlWarning( "TQODBCDriver::primaryIndex: Unable to execute primary key list", d );
#endif
} else {
- usingSpecialColumns = TRUE;
+ usingSpecialColumns = true;
}
}
r = SQLFetchScroll( hStmt,
@@ -2018,8 +2018,8 @@ TQString TQODBCDriver::formatValue( const TQSqlField* field,
// Dateformat has to be "yyyy-MM-dd hh:mm:ss", with leading zeroes if month or day < 10
r = "{ ts '" +
TQString::number(dt.year()) + "-" +
- TQString::number(dt.month()).rightJustify( 2, '0', TRUE ) + "-" +
- TQString::number(dt.day()).rightJustify( 2, '0', TRUE ) + " " +
+ TQString::number(dt.month()).rightJustify( 2, '0', true ) + "-" +
+ TQString::number(dt.day()).rightJustify( 2, '0', true ) + " " +
tm.toString() +
"' }";
} else
diff --git a/src/sql/drivers/psql/tqsql_psql.cpp b/src/sql/drivers/psql/tqsql_psql.cpp
index df79ac2fd..625177c7b 100644
--- a/src/sql/drivers/psql/tqsql_psql.cpp
+++ b/src/sql/drivers/psql/tqsql_psql.cpp
@@ -70,7 +70,7 @@ TQPtrDict<TQSqlOpenExtension> *tqSqlOpenExtDict();
class TQPSQLPrivate
{
public:
- TQPSQLPrivate():connection(0), result(0), isUtf8(FALSE) {}
+ TQPSQLPrivate():connection(0), result(0), isUtf8(false) {}
PGconn *connection;
PGresult *result;
bool isUtf8;
@@ -231,21 +231,21 @@ void TQPSQLResult::cleanup()
d->result = 0;
setAt( -1 );
currentSize = 0;
- setActive( FALSE );
+ setActive( false );
}
bool TQPSQLResult::fetch( int i )
{
if ( !isActive() )
- return FALSE;
+ return false;
if ( i < 0 )
- return FALSE;
+ return false;
if ( i >= currentSize )
- return FALSE;
+ return false;
if ( at() == i )
- return TRUE;
+ return true;
setAt( i );
- return TRUE;
+ return true;
}
bool TQPSQLResult::fetchFirst()
@@ -460,10 +460,10 @@ bool TQPSQLResult::reset ( const TQString& query )
{
cleanup();
if ( !driver() )
- return FALSE;
+ return false;
if ( !driver()->isOpen() || driver()->isOpenError() )
- return FALSE;
- setActive( FALSE );
+ return false;
+ setActive( false );
setAt( TQSql::BeforeFirst );
if ( d->result )
PQclear( d->result );
@@ -475,17 +475,17 @@ bool TQPSQLResult::reset ( const TQString& query )
int status = PQresultStatus( d->result );
if ( status == PGRES_COMMAND_OK || status == PGRES_TUPLES_OK ) {
if ( status == PGRES_TUPLES_OK ) {
- setSelect( TRUE );
+ setSelect( true );
currentSize = PQntuples( d->result );
} else {
- setSelect( FALSE );
+ setSelect( false );
currentSize = -1;
}
- setActive( TRUE );
- return TRUE;
+ setActive( true );
+ return true;
}
setLastError( qMakeError( "Unable to create query", TQSqlError::Statement, d ) );
- return FALSE;
+ return false;
}
int TQPSQLResult::size()
@@ -527,7 +527,7 @@ static TQPSQLDriver::Protocol getPSQLVersion( PGconn* connection )
TQString val( PQgetvalue( result, 0, 0 ) );
PQclear( result );
TQRegExp rx( "(\\d+)\\.(\\d+)" );
- rx.setMinimal ( TRUE ); // enforce non-greedy RegExp
+ rx.setMinimal ( true ); // enforce non-greedy RegExp
if ( rx.search( val ) != -1 ) {
int vMaj = rx.cap( 1 ).toInt();
int vMin = rx.cap( 2 ).toInt();
@@ -569,8 +569,8 @@ TQPSQLDriver::TQPSQLDriver( PGconn * conn, TQObject * parent, const char * name
d->connection = conn;
if ( conn ) {
pro = getPSQLVersion( d->connection );
- setOpen( TRUE );
- setOpenError( FALSE );
+ setOpen( true );
+ setOpenError( false );
}
}
@@ -607,15 +607,15 @@ bool TQPSQLDriver::hasFeature( DriverFeature f ) const
{
switch ( f ) {
case Transactions:
- return TRUE;
+ return true;
case QuerySize:
- return TRUE;
+ return true;
case BLOB:
return pro >= TQPSQLDriver::Version71;
case Unicode:
return d->isUtf8;
default:
- return FALSE;
+ return false;
}
}
@@ -626,7 +626,7 @@ bool TQPSQLDriver::open( const TQString&,
int )
{
tqWarning("TQPSQLDriver::open(): This version of open() is no longer supported." );
- return FALSE;
+ return false;
}
bool TQPSQLDriver::open( const TQString & db,
@@ -657,17 +657,17 @@ bool TQPSQLDriver::open( const TQString & db,
d->connection = PQconnectdb( connectString.local8Bit().data() );
if ( PQstatus( d->connection ) == CONNECTION_BAD ) {
setLastError( qMakeError("Unable to connect", TQSqlError::Connection, d ) );
- setOpenError( TRUE );
- return FALSE;
+ setOpenError( true );
+ return false;
}
pro = getPSQLVersion( d->connection );
d->isUtf8 = setEncodingUtf8( d->connection );
setDatestyle( d->connection );
- setOpen( TRUE );
- setOpenError( FALSE );
- return TRUE;
+ setOpen( true );
+ setOpenError( false );
+ return true;
}
void TQPSQLDriver::close()
@@ -676,15 +676,15 @@ void TQPSQLDriver::close()
if (d->connection)
PQfinish( d->connection );
d->connection = 0;
- setOpen( FALSE );
- setOpenError( FALSE );
+ setOpen( false );
+ setOpenError( false );
}
}
bool TQPSQLDriver::ping()
{
if ( !isOpen() ) {
- return FALSE;
+ return false;
}
PGresult *res = NULL;
@@ -698,10 +698,10 @@ bool TQPSQLDriver::ping()
PQreset( d->connection );
if ( PQstatus( d->connection ) != CONNECTION_OK ) {
setLastError( qMakeError("Unable to execute ping", TQSqlError::Statement, d ) );
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
TQSqlQuery TQPSQLDriver::createQuery() const
@@ -715,16 +715,16 @@ bool TQPSQLDriver::beginTransaction()
#ifdef QT_CHECK_RANGE
tqWarning( "TQPSQLDriver::beginTransaction: Database not open" );
#endif
- return FALSE;
+ return false;
}
PGresult* res = PQexec( d->connection, "BEGIN" );
if ( !res || PQresultStatus( res ) != PGRES_COMMAND_OK ) {
PQclear( res );
setLastError( qMakeError( "Could not begin transaction", TQSqlError::Transaction, d ) );
- return FALSE;
+ return false;
}
PQclear( res );
- return TRUE;
+ return true;
}
bool TQPSQLDriver::commitTransaction()
@@ -733,16 +733,16 @@ bool TQPSQLDriver::commitTransaction()
#ifdef QT_CHECK_RANGE
tqWarning( "TQPSQLDriver::commitTransaction: Database not open" );
#endif
- return FALSE;
+ return false;
}
PGresult* res = PQexec( d->connection, "COMMIT" );
if ( !res || PQresultStatus( res ) != PGRES_COMMAND_OK ) {
PQclear( res );
setLastError( qMakeError( "Could not commit transaction", TQSqlError::Transaction, d ) );
- return FALSE;
+ return false;
}
PQclear( res );
- return TRUE;
+ return true;
}
bool TQPSQLDriver::rollbackTransaction()
@@ -751,16 +751,16 @@ bool TQPSQLDriver::rollbackTransaction()
#ifdef QT_CHECK_RANGE
tqWarning( "TQPSQLDriver::rollbackTransaction: Database not open" );
#endif
- return FALSE;
+ return false;
}
PGresult* res = PQexec( d->connection, "ROLLBACK" );
if ( !res || PQresultStatus( res ) != PGRES_COMMAND_OK ) {
setLastError( qMakeError( "Could not rollback transaction", TQSqlError::Transaction, d ) );
PQclear( res );
- return FALSE;
+ return false;
}
PQclear( res );
- return TRUE;
+ return true;
}
TQStringList TQPSQLDriver::tables( const TQString& typeName ) const
@@ -770,7 +770,7 @@ TQStringList TQPSQLDriver::tables( const TQString& typeName ) const
return tl;
int type = typeName.toInt();
TQSqlQuery t = createQuery();
- t.setForwardOnly( TRUE );
+ t.setForwardOnly( true );
if ( typeName.isEmpty() || ((type & (int)TQSql::Tables) == (int)TQSql::Tables) ) {
@@ -1127,7 +1127,7 @@ TQString TQPSQLDriver::formatValue( const TQSqlField* field,
r += uc;
} else {
r += "\\\\";
- r += TQString::number( (unsigned char) ba[ i ], 8 ).rightJustify( 3, '0', TRUE );
+ r += TQString::number( (unsigned char) ba[ i ], 8 ).rightJustify( 3, '0', true );
}
}
r += "'";
diff --git a/src/sql/drivers/sqlite/tqsql_sqlite.cpp b/src/sql/drivers/sqlite/tqsql_sqlite.cpp
index de7fde7e2..a0e78db91 100644
--- a/src/sql/drivers/sqlite/tqsql_sqlite.cpp
+++ b/src/sql/drivers/sqlite/tqsql_sqlite.cpp
@@ -82,7 +82,7 @@ public:
static const uint initial_cache_size = 128;
TQSQLiteResultPrivate::TQSQLiteResultPrivate(TQSQLiteResult* res) : q(res), access(0), currentTail(0),
- currentMachine(0), skippedStatus(FALSE), skipRow(0), utf8(FALSE)
+ currentMachine(0), skippedStatus(false), skipRow(0), utf8(false)
{
}
@@ -92,11 +92,11 @@ void TQSQLiteResultPrivate::cleanup()
rInf.clear();
currentTail = 0;
currentMachine = 0;
- skippedStatus = FALSE;
+ skippedStatus = false;
delete skipRow;
skipRow = 0;
q->setAt(TQSql::BeforeFirst);
- q->setActive(FALSE);
+ q->setActive(false);
q->cleanup();
}
@@ -155,7 +155,7 @@ bool TQSQLiteResultPrivate::fetchNext(TQtSqlCachedResult::RowCache* row)
}
if (!currentMachine)
- return FALSE;
+ return false;
// keep trying while busy, wish I could implement this better.
while ((res = sqlite_step(currentMachine, &colNum, &fvals, &cnames)) == SQLITE_BUSY) {
@@ -174,27 +174,27 @@ bool TQSQLiteResultPrivate::fetchNext(TQtSqlCachedResult::RowCache* row)
// must be first call.
init(cnames, colNum, &row);
if (!fvals)
- return FALSE;
+ return false;
if (!row)
- return TRUE;
+ return true;
for (i = 0; i < colNum; ++i)
(*row)[i] = utf8 ? TQString::fromUtf8(fvals[i]) : TQString(fvals[i]);
- return TRUE;
+ return true;
case SQLITE_DONE:
if (rInf.isEmpty())
// must be first call.
init(cnames, colNum);
q->setAt(TQSql::AfterLast);
- return FALSE;
+ return false;
case SQLITE_ERROR:
case SQLITE_MISUSE:
default:
// something wrong, don't get col info, but still return false
finalize(); // finalize to get the error message.
q->setAt(TQSql::AfterLast);
- return FALSE;
+ return false;
}
- return FALSE;
+ return false;
}
TQSQLiteResult::TQSQLiteResult(const TQSQLiteDriver* db)
@@ -218,14 +218,14 @@ bool TQSQLiteResult::reset (const TQString& query)
{
// this is where we build a query.
if (!driver())
- return FALSE;
+ return false;
if (!driver()-> isOpen() || driver()->isOpenError())
- return FALSE;
+ return false;
d->cleanup();
// Um, ok. callback based so.... pass private static function for this.
- setSelect(FALSE);
+ setSelect(false);
char *err = 0;
int res = sqlite_compile(d->access,
d->utf8 ? (const char*)query.utf8().data() : query.ascii(),
@@ -238,8 +238,8 @@ bool TQSQLiteResult::reset (const TQString& query)
}
//if (*d->currentTail != '\000' then there is more sql to eval
if (!d->currentMachine) {
- setActive(FALSE);
- return FALSE;
+ setActive(false);
+ return false;
}
// we have to fetch one row to find out about
// the structure of the result set
@@ -247,8 +247,8 @@ bool TQSQLiteResult::reset (const TQString& query)
setSelect(!d->rInf.isEmpty());
if (isSelect())
init(d->rInf.count());
- setActive(TRUE);
- return TRUE;
+ setActive(true);
+ return true;
}
bool TQSQLiteResult::gotoNext(TQtSqlCachedResult::RowCache* row)
@@ -279,8 +279,8 @@ TQSQLiteDriver::TQSQLiteDriver(sqlite *connection, TQObject *parent, const char
{
d = new TQSQLiteDriverPrivate();
d->access = connection;
- setOpen(TRUE);
- setOpenError(FALSE);
+ setOpen(true);
+ setOpenError(false);
}
@@ -293,14 +293,14 @@ bool TQSQLiteDriver::hasFeature(DriverFeature f) const
{
switch (f) {
case Transactions:
- return TRUE;
+ return true;
#if (TQT_VERSION-0 >= 0x030000)
case Unicode:
return d->utf8;
#endif
// case BLOB:
default:
- return FALSE;
+ return false;
}
}
@@ -314,7 +314,7 @@ bool TQSQLiteDriver::open(const TQString & db, const TQString &, const TQString
close();
if (db.isEmpty())
- return FALSE;
+ return false;
char* err = 0;
d->access = sqlite_open(TQFile::encodeName(db), 0, &err);
@@ -325,12 +325,12 @@ bool TQSQLiteDriver::open(const TQString & db, const TQString &, const TQString
}
if (d->access) {
- setOpen(TRUE);
- setOpenError(FALSE);
- return TRUE;
+ setOpen(true);
+ setOpenError(false);
+ return true;
}
- setOpenError(TRUE);
- return FALSE;
+ setOpenError(true);
+ return false;
}
void TQSQLiteDriver::close()
@@ -338,20 +338,20 @@ void TQSQLiteDriver::close()
if (isOpen()) {
sqlite_close(d->access);
d->access = 0;
- setOpen(FALSE);
- setOpenError(FALSE);
+ setOpen(false);
+ setOpenError(false);
}
}
bool TQSQLiteDriver::ping()
{
if ( !isOpen() ) {
- return FALSE;
+ return false;
}
// FIXME
// Implement ping if available
- return TRUE;
+ return true;
}
TQSqlQuery TQSQLiteDriver::createQuery() const
@@ -362,49 +362,49 @@ TQSqlQuery TQSQLiteDriver::createQuery() const
bool TQSQLiteDriver::beginTransaction()
{
if (!isOpen() || isOpenError())
- return FALSE;
+ return false;
char* err;
int res = sqlite_exec(d->access, "BEGIN", 0, this, &err);
if (res == SQLITE_OK)
- return TRUE;
+ return true;
setLastError(TQSqlError("Unable to begin transaction", err, TQSqlError::Transaction, res));
sqlite_freemem(err);
- return FALSE;
+ return false;
}
bool TQSQLiteDriver::commitTransaction()
{
if (!isOpen() || isOpenError())
- return FALSE;
+ return false;
char* err;
int res = sqlite_exec(d->access, "COMMIT", 0, this, &err);
if (res == SQLITE_OK)
- return TRUE;
+ return true;
setLastError(TQSqlError("Unable to commit transaction", err, TQSqlError::Transaction, res));
sqlite_freemem(err);
- return FALSE;
+ return false;
}
bool TQSQLiteDriver::rollbackTransaction()
{
if (!isOpen() || isOpenError())
- return FALSE;
+ return false;
char* err;
int res = sqlite_exec(d->access, "ROLLBACK", 0, this, &err);
if (res == SQLITE_OK)
- return TRUE;
+ return true;
setLastError(TQSqlError("Unable to rollback Transaction", err, TQSqlError::Transaction, res));
sqlite_freemem(err);
- return FALSE;
+ return false;
}
TQStringList TQSQLiteDriver::tables(const TQString &typeName) const
@@ -415,7 +415,7 @@ TQStringList TQSQLiteDriver::tables(const TQString &typeName) const
int type = typeName.toInt();
TQSqlQuery q = createQuery();
- q.setForwardOnly(TRUE);
+ q.setForwardOnly(true);
#if (TQT_VERSION-0 >= 0x030000)
if ((type & (int)TQSql::Tables) && (type & (int)TQSql::Views))
q.exec("SELECT name FROM sqlite_master WHERE type='table' OR type='view'");
@@ -451,7 +451,7 @@ TQSqlIndex TQSQLiteDriver::primaryIndex(const TQString &tblname) const
return TQSqlIndex();
TQSqlQuery q = createQuery();
- q.setForwardOnly(TRUE);
+ q.setForwardOnly(true);
// finrst find a UNIQUE INDEX
q.exec("PRAGMA index_list('" + tblname + "');");
TQString indexname;
@@ -483,7 +483,7 @@ TQSqlRecordInfo TQSQLiteDriver::recordInfo(const TQString &tbl) const
return TQSqlRecordInfo();
TQSqlQuery q = createQuery();
- q.setForwardOnly(TRUE);
+ q.setForwardOnly(true);
q.exec("SELECT * FROM " + tbl + " LIMIT 1");
return recordInfo(q);
}
diff --git a/src/sql/drivers/sqlite3/tqsql_sqlite3.cpp b/src/sql/drivers/sqlite3/tqsql_sqlite3.cpp
index f75feaa1b..a3ce63e35 100644
--- a/src/sql/drivers/sqlite3/tqsql_sqlite3.cpp
+++ b/src/sql/drivers/sqlite3/tqsql_sqlite3.cpp
@@ -331,12 +331,12 @@ void TQSQLite3Driver::close()
bool TQSQLite3Driver::ping()
{
if ( !isOpen() ) {
- return FALSE;
+ return false;
}
// FIXME
// Implement ping if available
- return TRUE;
+ return true;
}
TQSqlQuery TQSQLite3Driver::createQuery() const
@@ -397,7 +397,7 @@ TQStringList TQSQLite3Driver::tables(const TQString &typeName) const
int type = typeName.toInt();
TQSqlQuery q = createQuery();
- q.setForwardOnly(TRUE);
+ q.setForwardOnly(true);
#if (TQT_VERSION-0 >= 0x030200)
if ((type & (int)TQSql::Tables) && (type & (int)TQSql::Views))
q.exec("SELECT name FROM sqlite_master WHERE type='table' OR type='view'");
@@ -433,7 +433,7 @@ TQSqlIndex TQSQLite3Driver::primaryIndex(const TQString &tblname) const
return TQSqlIndex();
TQSqlQuery q = createQuery();
- q.setForwardOnly(TRUE);
+ q.setForwardOnly(true);
// finrst find a UNIQUE INDEX
q.exec("PRAGMA index_list('" + tblname + "');");
TQString indexname;
@@ -465,7 +465,7 @@ TQSqlRecordInfo TQSQLite3Driver::recordInfo(const TQString &tbl) const
return TQSqlRecordInfo();
TQSqlQuery q = createQuery();
- q.setForwardOnly(TRUE);
+ q.setForwardOnly(true);
q.exec("SELECT * FROM " + tbl + " LIMIT 1");
return recordInfo(q);
}
diff --git a/src/sql/tqdatabrowser.cpp b/src/sql/tqdatabrowser.cpp
index a716d8832..b1921204e 100644
--- a/src/sql/tqdatabrowser.cpp
+++ b/src/sql/tqdatabrowser.cpp
@@ -49,7 +49,7 @@
class TQDataBrowserPrivate
{
public:
- TQDataBrowserPrivate() : boundaryCheck( TRUE ), readOnly( FALSE ) {}
+ TQDataBrowserPrivate() : boundaryCheck( true ), readOnly( false ) {}
TQSqlCursorManager cur;
TQSqlFormManager frm;
TQDataManager dat;
@@ -310,7 +310,7 @@ TQString TQDataBrowser::filter() const
/*!
Sets the default cursor used by the data browser to \a cursor. If
- \a autoDelete is TRUE (the default is FALSE), the data browser
+ \a autoDelete is true (the default is false), the data browser
takes ownership of the \a cursor pointer, which will be deleted
when the browser is destroyed, or when setSqlCursor() is called
again. To activate the \a cursor use refresh(). The cursor's edit
@@ -326,7 +326,7 @@ void TQDataBrowser::setSqlCursor( TQSqlCursor* cursor, bool autoDelete )
d->cur.setCursor( cursor, autoDelete );
d->frm.setRecord( cursor->editBuffer() );
if ( cursor->isReadOnly() )
- setReadOnly( TRUE );
+ setReadOnly( true );
}
@@ -369,7 +369,7 @@ TQSqlForm* TQDataBrowser::form()
\property TQDataBrowser::readOnly
\brief whether the browser is read-only
- The default is FALSE, i.e. data can be edited. If the data browser
+ The default is false, i.e. data can be edited. If the data browser
is read-only, no database edits will be allowed.
*/
@@ -392,7 +392,7 @@ void TQDataBrowser::setConfirmEdits( bool confirm )
\property TQDataBrowser::confirmInsert
\brief whether the data browser confirms insertions
- If this property is TRUE, the browser confirms insertions,
+ If this property is true, the browser confirms insertions,
otherwise insertions happen immediately.
\sa confirmCancels() confirmEdits() confirmUpdate() confirmDelete() confirmEdit()
@@ -407,7 +407,7 @@ void TQDataBrowser::setConfirmInsert( bool confirm )
\property TQDataBrowser::confirmUpdate
\brief whether the browser confirms updates
- If this property is TRUE, the browser confirms updates, otherwise
+ If this property is true, the browser confirms updates, otherwise
updates happen immediately.
\sa confirmCancels() confirmEdits() confirmInsert() confirmDelete() confirmEdit()
@@ -422,7 +422,7 @@ void TQDataBrowser::setConfirmUpdate( bool confirm )
\property TQDataBrowser::confirmDelete
\brief whether the browser confirms deletions
- If this property is TRUE, the browser confirms deletions,
+ If this property is true, the browser confirms deletions,
otherwise deletions happen immediately.
\sa confirmCancels() confirmEdits() confirmUpdate() confirmInsert() confirmEdit()
@@ -437,7 +437,7 @@ void TQDataBrowser::setConfirmDelete( bool confirm )
\property TQDataBrowser::confirmEdits
\brief whether the browser confirms edits
- If this property is TRUE, the browser confirms all edit operations
+ If this property is true, the browser confirms all edit operations
(insertions, updates and deletions), otherwise all edit operations
happen immediately. Confirmation is achieved by presenting the
user with a message box -- this behavior can be changed by
@@ -470,10 +470,10 @@ bool TQDataBrowser::confirmDelete() const
\property TQDataBrowser::confirmCancels
\brief whether the browser confirms cancel operations
- If this property is TRUE, all cancels must be confirmed by the
+ If this property is true, all cancels must be confirmed by the
user through a message box (this behavior can be changed by
overriding the confirmCancel() function), otherwise all cancels
- occur immediately. The default is FALSE.
+ occur immediately. The default is false.
\sa confirmEdits() confirmCancel()
*/
@@ -492,13 +492,13 @@ bool TQDataBrowser::confirmCancels() const
\property TQDataBrowser::autoEdit
\brief whether the browser automatically applies edits
- The default value for this property is TRUE. When the user begins
+ The default value for this property is true. When the user begins
an insertion or an update on a form there are two possible
outcomes when they navigate to another record:
\list
- \i the insert or update is is performed -- this occurs if autoEdit is TRUE
- \i the insert or update is discarded -- this occurs if autoEdit is FALSE
+ \i the insert or update is is performed -- this occurs if autoEdit is true
+ \i the insert or update is discarded -- this occurs if autoEdit is false
\endlist
*/
@@ -657,7 +657,7 @@ void TQDataBrowser::insert()
TQSqlCursor* cur = d->cur.cursor();
if ( !buf || !cur )
return;
- bool doIns = TRUE;
+ bool doIns = true;
TQSql::Confirm conf = TQSql::Yes;
switch ( d->dat.mode() ) {
case TQSql::Insert:
@@ -671,7 +671,7 @@ void TQDataBrowser::insert()
case TQSql::No:
break;
case TQSql::Cancel:
- doIns = FALSE;
+ doIns = false;
break;
}
}
@@ -687,7 +687,7 @@ void TQDataBrowser::insert()
case TQSql::No:
break;
case TQSql::Cancel:
- doIns = FALSE;
+ doIns = false;
break;
}
}
@@ -733,7 +733,7 @@ void TQDataBrowser::update()
break;
case TQSql::No:
d->dat.setMode( TQSql::Update );
- cur->editBuffer( TRUE );
+ cur->editBuffer( true );
readFields();
break;
case TQSql::Cancel:
@@ -782,7 +782,7 @@ void TQDataBrowser::del()
if ( confirmCancels() )
conf = confirmCancel( TQSql::Insert );
if ( conf == TQSql::Yes ) {
- cur->editBuffer( TRUE ); /* restore from cursor */
+ cur->editBuffer( true ); /* restore from cursor */
readFields();
d->dat.setMode( TQSql::Update );
} else
@@ -809,7 +809,7 @@ void TQDataBrowser::del()
Moves the default cursor to the record specified by the index \a i
and refreshes the default form to display this record. If there is
no default form or no default cursor, nothing happens. If \a
- relative is TRUE (the default is FALSE), the cursor is moved
+ relative is true (the default is false), the cursor is moved
relative to its current position. If the data browser successfully
navigated to the desired record, the default cursor is primed for
update and the primeUpdate() signal is emitted.
@@ -823,7 +823,7 @@ bool TQDataBrowser::seek( int i, bool relative )
int b = 0;
TQSqlCursor* cur = d->cur.cursor();
if ( !cur )
- return FALSE;
+ return false;
if ( preNav() )
b = cur->seek( i, relative );
postNav( b );
@@ -940,9 +940,9 @@ void TQDataBrowser::clearValues()
performs an insert on the default cursor. If there is no default
form or no default cursor, nothing happens. If an error occurred
during the insert into the database, handleError() is called and
- FALSE is returned. If the insert was successfull, the cursor is
+ false is returned. If the insert was successfull, the cursor is
refreshed and relocated to the newly inserted record, the
- cursorChanged() signal is emitted, and TRUE is returned.
+ cursorChanged() signal is emitted, and true is returned.
\sa cursorChanged() sqlCursor() form() handleError()
*/
@@ -950,11 +950,11 @@ void TQDataBrowser::clearValues()
bool TQDataBrowser::insertCurrent()
{
if ( isReadOnly() )
- return FALSE;
+ return false;
TQSqlRecord* buf = d->frm.record();
TQSqlCursor* cur = d->cur.cursor();
if ( !buf || !cur )
- return FALSE;
+ return false;
writeFields();
emit beforeInsert( buf );
int ar = cur->insert();
@@ -967,9 +967,9 @@ bool TQDataBrowser::insertCurrent()
d->cur.findBuffer( cur->primaryIndex() );
updateBoundary();
cursorChanged( TQSqlCursor::Insert );
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -978,9 +978,9 @@ bool TQDataBrowser::insertCurrent()
performs an update on the default cursor. If there is no default
form or no default cursor, nothing happens. If an error occurred
during the update on the database, handleError() is called and
- FALSE is returned. If the update was successfull, the cursor is
+ false is returned. If the update was successfull, the cursor is
refreshed and relocated to the updated record, the cursorChanged()
- signal is emitted, and TRUE is returned.
+ signal is emitted, and true is returned.
\sa cursor() form() handleError()
*/
@@ -988,11 +988,11 @@ bool TQDataBrowser::insertCurrent()
bool TQDataBrowser::updateCurrent()
{
if ( isReadOnly() )
- return FALSE;
+ return false;
TQSqlRecord* buf = d->frm.record();
TQSqlCursor* cur = d->cur.cursor();
if ( !buf || !cur )
- return FALSE;
+ return false;
writeFields();
emit beforeUpdate( buf );
int ar = cur->update();
@@ -1004,12 +1004,12 @@ bool TQDataBrowser::updateCurrent()
refresh();
d->cur.findBuffer( cur->primaryIndex() );
updateBoundary();
- cur->editBuffer( TRUE );
+ cur->editBuffer( true );
cursorChanged( TQSqlCursor::Update );
readFields();
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -1018,10 +1018,10 @@ bool TQDataBrowser::updateCurrent()
default form and updates the default form. If there is no default
form or no default cursor, nothing happens. If the deletion was
successful, the cursor is repositioned to the nearest record and
- TRUE is returned. The nearest record is the next record if there
+ true is returned. The nearest record is the next record if there
is one otherwise the previous record if there is one. If an error
occurred during the deletion from the database, handleError() is
- called and FALSE is returned.
+ called and false is returned.
\sa cursor() form() handleError()
*/
@@ -1029,11 +1029,11 @@ bool TQDataBrowser::updateCurrent()
bool TQDataBrowser::deleteCurrent()
{
if ( isReadOnly() )
- return FALSE;
+ return false;
TQSqlRecord* buf = d->frm.record();
TQSqlCursor* cur = d->cur.cursor();
if ( !buf || !cur )
- return FALSE;
+ return false;
writeFields();
int n = cur->at();
emit beforeDelete( buf );
@@ -1045,12 +1045,12 @@ bool TQDataBrowser::deleteCurrent()
if ( !cur->seek( n ) )
last();
if ( cur->isValid() ) {
- cur->editBuffer( TRUE );
+ cur->editBuffer( true );
readFields();
} else {
clearValues();
}
- return TRUE;
+ return true;
} else {
if ( !cur->isActive() ) {
handleError( cur->lastError() );
@@ -1058,13 +1058,13 @@ bool TQDataBrowser::deleteCurrent()
updateBoundary();
}
}
- return FALSE;
+ return false;
}
/*!
- Returns TRUE if the form's edit buffer differs from the current
- cursor buffer; otherwise returns FALSE.
+ Returns true if the form's edit buffer differs from the current
+ cursor buffer; otherwise returns false.
*/
bool TQDataBrowser::currentEdited()
@@ -1072,15 +1072,15 @@ bool TQDataBrowser::currentEdited()
TQSqlRecord* buf = d->frm.record();
TQSqlCursor* cur = d->cur.cursor();
if ( !buf || !cur )
- return FALSE;
+ return false;
if ( !cur->isActive() || !cur->isValid() )
- return FALSE;
+ return false;
writeFields();
for ( uint i = 0; i < cur->count(); ++i ) {
if ( cur->value(i) != buf->value(i) )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/*! \internal
@@ -1093,10 +1093,10 @@ bool TQDataBrowser::preNav()
TQSqlRecord* buf = d->frm.record();
TQSqlCursor* cur = d->cur.cursor();
if ( !buf || !cur )
- return FALSE;
+ return false;
if ( !isReadOnly() && autoEdit() && currentEdited() ) {
- bool ok = TRUE;
+ bool ok = true;
TQSql::Confirm conf = TQSql::Yes;
switch ( d->dat.mode() ){
case TQSql::Insert:
@@ -1111,7 +1111,7 @@ bool TQDataBrowser::preNav()
d->dat.setMode( TQSql::Update );
break;
case TQSql::Cancel:
- return FALSE;
+ return false;
}
break;
default:
@@ -1124,12 +1124,12 @@ bool TQDataBrowser::preNav()
case TQSql::No:
break;
case TQSql::Cancel:
- return FALSE;
+ return false;
}
}
return ok;
}
- return TRUE;
+ return true;
}
/*! \internal
@@ -1169,7 +1169,7 @@ void TQDataBrowser::nav( Nav nav )
}
/*!
- If boundaryChecking() is TRUE, checks the boundary of the current
+ If boundaryChecking() is true, checks the boundary of the current
default cursor and emits signals which indicate the position of
the cursor.
*/
@@ -1181,38 +1181,38 @@ void TQDataBrowser::updateBoundary()
switch ( bound ) {
case Unknown:
case None:
- emit firstRecordAvailable( TRUE );
- emit prevRecordAvailable( TRUE );
- emit nextRecordAvailable( TRUE );
- emit lastRecordAvailable( TRUE );
+ emit firstRecordAvailable( true );
+ emit prevRecordAvailable( true );
+ emit nextRecordAvailable( true );
+ emit lastRecordAvailable( true );
break;
case BeforeBeginning:
- emit firstRecordAvailable( FALSE );
- emit prevRecordAvailable( FALSE );
- emit nextRecordAvailable( TRUE );
- emit lastRecordAvailable( TRUE );
+ emit firstRecordAvailable( false );
+ emit prevRecordAvailable( false );
+ emit nextRecordAvailable( true );
+ emit lastRecordAvailable( true );
break;
case Beginning:
- emit firstRecordAvailable( FALSE );
- emit prevRecordAvailable( FALSE );
- emit nextRecordAvailable( TRUE );
- emit lastRecordAvailable( TRUE );
+ emit firstRecordAvailable( false );
+ emit prevRecordAvailable( false );
+ emit nextRecordAvailable( true );
+ emit lastRecordAvailable( true );
break;
case End:
- emit firstRecordAvailable( TRUE );
- emit prevRecordAvailable( TRUE );
- emit nextRecordAvailable( FALSE );
- emit lastRecordAvailable( FALSE );
+ emit firstRecordAvailable( true );
+ emit prevRecordAvailable( true );
+ emit nextRecordAvailable( false );
+ emit lastRecordAvailable( false );
break;
case AfterEnd:
- emit firstRecordAvailable( TRUE );
- emit prevRecordAvailable( TRUE );
- emit nextRecordAvailable( FALSE );
- emit lastRecordAvailable( FALSE );
+ emit firstRecordAvailable( true );
+ emit prevRecordAvailable( true );
+ emit nextRecordAvailable( false );
+ emit lastRecordAvailable( false );
break;
}
}
diff --git a/src/sql/tqdatabrowser.h b/src/sql/tqdatabrowser.h
index c1d715a3a..3fd8e9756 100644
--- a/src/sql/tqdatabrowser.h
+++ b/src/sql/tqdatabrowser.h
@@ -92,7 +92,7 @@ public:
TQStringList sort() const;
void setFilter( const TQString& filter );
TQString filter() const;
- virtual void setSqlCursor( TQSqlCursor* cursor, bool autoDelete = FALSE );
+ virtual void setSqlCursor( TQSqlCursor* cursor, bool autoDelete = false );
TQSqlCursor* sqlCursor() const;
virtual void setForm( TQSqlForm* form );
TQSqlForm* form();
@@ -113,7 +113,7 @@ public:
virtual void setAutoEdit( bool autoEdit );
bool autoEdit() const;
- virtual bool seek( int i, bool relative = FALSE );
+ virtual bool seek( int i, bool relative = false );
signals:
void firstRecordAvailable( bool available );
diff --git a/src/sql/tqdatatable.cpp b/src/sql/tqdatatable.cpp
index ac4c11267..cef756b00 100644
--- a/src/sql/tqdatatable.cpp
+++ b/src/sql/tqdatatable.cpp
@@ -61,9 +61,9 @@ class TQDataTablePrivate
{
public:
TQDataTablePrivate()
- : nullTxtChanged( FALSE ),
- haveAllRows( FALSE ),
- continuousEdit( FALSE ),
+ : nullTxtChanged( false ),
+ haveAllRows( false ),
+ continuousEdit( false ),
editorFactory( 0 ),
propertyMap( 0 ),
editRow( -1 ),
@@ -71,9 +71,9 @@ public:
insertRowLast( -1 ),
insertPreRows( -1 ),
editBuffer( 0 ),
- cancelMode( FALSE ),
- cancelInsert( FALSE ),
- cancelUpdate( FALSE )
+ cancelMode( false ),
+ cancelInsert( false ),
+ cancelUpdate( false )
{}
~TQDataTablePrivate() { if ( propertyMap ) delete propertyMap; }
@@ -171,7 +171,7 @@ void qt_debug_buffer( const TQString& msg, TQSqlRecord* cursor )
appropriate popup menu item) and canceled by pressing Esc. If
there is a problem updating or adding data, errors are handled
automatically (see handleError() to change this behavior). Note
- that if autoEdit() is FALSE navigating to another record will
+ that if autoEdit() is false navigating to another record will
cancel the insert or update.
The user can be asked to confirm all edits with setConfirmEdits().
@@ -220,7 +220,7 @@ void qt_debug_buffer( const TQString& msg, TQSqlRecord* cursor )
expected if you are using a TQSqlSelectCursor because it uses
user-defined SQL queries to obtain data.
- The text used to represent NULL, TRUE and FALSE values can be
+ The text used to represent NULL, true and false values can be
changed with setNullText(), setTrueText() and setFalseText()
respectively. You can change the appearance of cells by
reimplementing paintField().
@@ -249,7 +249,7 @@ TQDataTable::TQDataTable ( TQWidget * parent, const char * name )
Constructs a data table which is a child of \a parent, called name
\a name using the cursor \a cursor.
- If \a autoPopulate is TRUE (the default is FALSE), columns are
+ If \a autoPopulate is true (the default is false), columns are
automatically created based upon the fields in the \a cursor
record. Note that \a autoPopulate only governs the creation of
columns; to load the cursor's data into the table use refresh().
@@ -273,7 +273,7 @@ TQDataTable::TQDataTable ( TQSqlCursor* cursor, bool autoPopulate, TQWidget * pa
void TQDataTable::init()
{
d = new TQDataTablePrivate();
- setAutoEdit( TRUE );
+ setAutoEdit( true );
setSelectionMode( SingleRow );
setFocusStyle( FollowStyle );
d->trueTxt = tr( "True" );
@@ -315,7 +315,7 @@ void TQDataTable::addColumn( const TQString& fieldName,
d->fldLabel += label;
d->fldIcon += iconset;
d->fldWidth += width;
- d->fldHidden += FALSE;
+ d->fldHidden += false;
}
/*!
@@ -339,7 +339,7 @@ void TQDataTable::setColumn( uint col, const TQString& fieldName,
d->fldLabel[col] = label;
d->fldIcon[col] = iconset;
d->fldWidth[col] = width;
- d->fldHidden[col] = FALSE;
+ d->fldHidden[col] = false;
}
/*!
@@ -525,7 +525,7 @@ void TQDataTable::setConfirmDelete( bool confirm )
\property TQDataTable::confirmEdits
\brief whether the data table confirms edit operations
- If the confirmEdits property is TRUE, the data table confirms all
+ If the confirmEdits property is true, the data table confirms all
edit operations (inserts, updates and deletes). Finer control of
edit confirmation can be achieved using \l confirmCancels, \l
confirmInsert, \l confirmUpdate and \l confirmDelete.
@@ -542,7 +542,7 @@ bool TQDataTable::confirmEdits() const
\property TQDataTable::confirmInsert
\brief whether the data table confirms insert operations
- If the confirmInsert property is TRUE, all insertions must be
+ If the confirmInsert property is true, all insertions must be
confirmed by the user through a message box (this behaviour can be
changed by overriding the confirmEdit() function), otherwise all
insert operations occur immediately.
@@ -559,7 +559,7 @@ bool TQDataTable::confirmInsert() const
\property TQDataTable::confirmUpdate
\brief whether the data table confirms update operations
- If the confirmUpdate property is TRUE, all updates must be
+ If the confirmUpdate property is true, all updates must be
confirmed by the user through a message box (this behaviour can be
changed by overriding the confirmEdit() function), otherwise all
update operations occur immediately.
@@ -576,7 +576,7 @@ bool TQDataTable::confirmUpdate() const
\property TQDataTable::confirmDelete
\brief whether the data table confirms delete operations
- If the confirmDelete property is TRUE, all deletions must be
+ If the confirmDelete property is true, all deletions must be
confirmed by the user through a message box (this behaviour can be
changed by overriding the confirmEdit() function), otherwise all
delete operations occur immediately.
@@ -593,10 +593,10 @@ bool TQDataTable::confirmDelete() const
\property TQDataTable::confirmCancels
\brief whether the data table confirms cancel operations
- If the confirmCancel property is TRUE, all cancels must be
+ If the confirmCancel property is true, all cancels must be
confirmed by the user through a message box (this behavior can be
changed by overriding the confirmCancel() function), otherwise all
- cancels occur immediately. The default is FALSE.
+ cancels occur immediately. The default is false.
\sa confirmEdits() confirmCancel()
*/
@@ -620,7 +620,7 @@ bool TQDataTable::confirmCancels() const
installEditorFactory(). The editor is primed with the value of the
field in \a col using a property map. The property map used is the
default property map, unless a new property map was installed with
- installPropertMap(). If \a initFromCell is TRUE then the editor is
+ installPropertMap(). If \a initFromCell is true then the editor is
primed with the value in the TQDataTable cell.
*/
@@ -648,7 +648,7 @@ TQWidget * TQDataTable::createEditor( int , int col, bool initFromCell ) const
bool TQDataTable::eventFilter( TQObject *o, TQEvent *e )
{
if ( d->cancelMode )
- return TRUE;
+ return true;
int r = currentRow();
int c = currentColumn();
@@ -658,65 +658,65 @@ bool TQDataTable::eventFilter( TQObject *o, TQEvent *e )
c = d->editCol;
}
- d->cancelInsert = FALSE;
- d->cancelUpdate = FALSE;
+ d->cancelInsert = false;
+ d->cancelUpdate = false;
switch ( e->type() ) {
case TQEvent::KeyPress: {
int conf = TQSql::Yes;
TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ( ke->key() == Key_Tab || ke->key() == TQt::Key_BackTab )
&& ke->state() & TQt::ControlButton )
- return FALSE;
+ return false;
if ( ke->key() == Key_Escape && d->dat.mode() == TQSql::Insert ){
if ( confirmCancels() && !d->cancelMode ) {
- d->cancelMode = TRUE;
+ d->cancelMode = true;
conf = confirmCancel( TQSql::Insert );
- d->cancelMode = FALSE;
+ d->cancelMode = false;
}
if ( conf == TQSql::Yes ) {
- d->cancelInsert = TRUE;
+ d->cancelInsert = true;
} else {
TQWidget *editorWidget = cellWidget( r, c );
if ( editorWidget ) {
editorWidget->setActiveWindow();
editorWidget->setFocus();
}
- return TRUE;
+ return true;
}
}
if ( ke->key() == Key_Escape && d->dat.mode() == TQSql::Update ) {
if ( confirmCancels() && !d->cancelMode ) {
- d->cancelMode = TRUE;
+ d->cancelMode = true;
conf = confirmCancel( TQSql::Update );
- d->cancelMode = FALSE;
+ d->cancelMode = false;
}
if ( conf == TQSql::Yes ){
- d->cancelUpdate = TRUE;
+ d->cancelUpdate = true;
} else {
TQWidget *editorWidget = cellWidget( r, c );
if ( editorWidget ) {
editorWidget->setActiveWindow();
editorWidget->setFocus();
}
- return TRUE;
+ return true;
}
}
if ( ke->key() == Key_Insert && d->dat.mode() == TQSql::None ) {
beginInsert();
- return TRUE;
+ return true;
}
if ( ke->key() == Key_Delete && d->dat.mode() == TQSql::None ) {
deleteCurrent();
- return TRUE;
+ return true;
}
if ( d->dat.mode() != TQSql::None ) {
if ( (ke->key() == Key_Tab) && (c < numCols() - 1) && (!isColumnReadOnly( c+1 ) || d->dat.mode() == TQSql::Insert) )
- d->continuousEdit = TRUE;
+ d->continuousEdit = true;
else if ( (ke->key() == Key_BackTab) && (c > 0) && (!isColumnReadOnly( c-1 ) || d->dat.mode() == TQSql::Insert) )
- d->continuousEdit = TRUE;
+ d->continuousEdit = true;
else
- d->continuousEdit = FALSE;
+ d->continuousEdit = false;
}
TQSqlCursor * sql = sqlCursor();
if ( sql && sql->driver() &&
@@ -737,7 +737,7 @@ bool TQDataTable::eventFilter( TQObject *o, TQEvent *e )
#ifndef TQT_NO_CURSOR
TQApplication::restoreOverrideCursor();
#endif
- return TRUE;
+ return true;
}
break;
}
@@ -747,9 +747,9 @@ bool TQDataTable::eventFilter( TQObject *o, TQEvent *e )
if ( !d->cancelMode && editorWidget && o == editorWidget &&
( d->dat.mode() == TQSql::Insert) && !d->continuousEdit) {
setCurrentCell( r, c );
- d->cancelInsert = TRUE;
+ d->cancelInsert = true;
}
- d->continuousEdit = FALSE;
+ d->continuousEdit = false;
break;
}
case TQEvent::FocusIn:
@@ -776,7 +776,7 @@ void TQDataTable::contentsContextMenuEvent( TQContextMenuEvent* e )
{
TQTable::contentsContextMenuEvent( e );
if ( isEditing() && d->dat.mode() != TQSql::None )
- endEdit( d->editRow, d->editCol, autoEdit(), FALSE );
+ endEdit( d->editRow, d->editCol, autoEdit(), false );
if ( !sqlCursor() )
return;
if ( d->dat.mode() == TQSql::None ) {
@@ -803,7 +803,7 @@ void TQDataTable::contentsContextMenuEvent( TQContextMenuEvent* e )
if ( r == id[ IdInsert ] )
beginInsert();
else if ( r == id[ IdUpdate ] ) {
- if ( beginEdit( currentRow(), currentColumn(), FALSE ) )
+ if ( beginEdit( currentRow(), currentColumn(), false ) )
setEditMode( Editing, currentRow(), currentColumn() );
else
endUpdate();
@@ -836,7 +836,7 @@ TQWidget* TQDataTable::beginEdit ( int row, int col, bool replace )
if ( d->continuousEdit ) {
// see comment in beginInsert()
bool fakeReadOnly = isColumnReadOnly( col );
- setColumnReadOnly( col, FALSE );
+ setColumnReadOnly( col, false );
TQWidget* w = TQTable::beginEdit( row, col, replace );
setColumnReadOnly( col, fakeReadOnly );
return w;
@@ -959,9 +959,9 @@ void TQDataTable::endUpdate()
bool TQDataTable::beginInsert()
{
if ( !sqlCursor() || isReadOnly() || !numCols() )
- return FALSE;
+ return false;
if ( !sqlCursor()->canInsert() )
- return FALSE;
+ return false;
int i = 0;
int row = currentRow();
@@ -992,11 +992,11 @@ bool TQDataTable::beginInsert()
// into a table that has read-only columns - temporarily
// switch off read-only mode for such columns
bool fakeReadOnly = isColumnReadOnly( 0 );
- setColumnReadOnly( 0, FALSE );
- if ( TQTable::beginEdit( row, 0, FALSE ) )
+ setColumnReadOnly( 0, false );
+ if ( TQTable::beginEdit( row, 0, false ) )
setEditMode( Editing, row, 0 );
setColumnReadOnly( 0, fakeReadOnly );
- return TRUE;
+ return true;
}
/*!
@@ -1032,9 +1032,9 @@ TQWidget* TQDataTable::beginUpdate ( int row, int col, bool replace )
For an editable table, issues an insert on the current cursor
using the values in the cursor's edit buffer. If there is no
current cursor or there is no current "insert" row, nothing
- happens. If confirmEdits() or confirmInsert() is TRUE,
- confirmEdit() is called to confirm the insert. Returns TRUE if the
- insert succeeded; otherwise returns FALSE.
+ happens. If confirmEdits() or confirmInsert() is true,
+ confirmEdit() is called to confirm the insert. Returns true if the
+ insert succeeded; otherwise returns false.
The underlying cursor must have a valid primary index to ensure
that a unique record is inserted within the database otherwise the
@@ -1044,14 +1044,14 @@ TQWidget* TQDataTable::beginUpdate ( int row, int col, bool replace )
bool TQDataTable::insertCurrent()
{
if ( d->dat.mode() != TQSql::Insert || ! numCols() )
- return FALSE;
+ return false;
if ( !sqlCursor()->canInsert() ) {
#ifdef QT_CHECK_RANGE
tqWarning("TQDataTable::insertCurrent: insert not allowed for %s",
sqlCursor()->name().latin1() );
#endif
endInsert();
- return FALSE;
+ return false;
}
int b = 0;
int conf = TQSql::Yes;
@@ -1076,7 +1076,7 @@ bool TQDataTable::insertCurrent()
refresh();
TQSqlIndex idx = sqlCursor()->primaryIndex();
findBuffer( idx, d->lastAt );
- repaintContents( contentsX(), contentsY(), visibleWidth(), visibleHeight(), FALSE );
+ repaintContents( contentsX(), contentsY(), visibleWidth(), visibleHeight(), false );
emit cursorChanged( TQSql::Insert );
}
break;
@@ -1085,7 +1085,7 @@ bool TQDataTable::insertCurrent()
endInsert();
break;
case TQSql::Cancel:
- if ( TQTable::beginEdit( currentRow(), currentColumn(), FALSE ) )
+ if ( TQTable::beginEdit( currentRow(), currentColumn(), false ) )
setEditMode( Editing, currentRow(), currentColumn() );
break;
}
@@ -1107,8 +1107,8 @@ void TQDataTable::updateRow( int row )
For an editable table, issues an update using the cursor's edit
buffer. If there is no current cursor or there is no current
selection, nothing happens. If confirmEdits() or confirmUpdate()
- is TRUE, confirmEdit() is called to confirm the update. Returns
- TRUE if the update succeeded; otherwise returns FALSE.
+ is true, confirmEdit() is called to confirm the update. Returns
+ true if the update succeeded; otherwise returns false.
The underlying cursor must have a valid primary index to ensure
that a unique record is updated within the database otherwise the
@@ -1118,14 +1118,14 @@ void TQDataTable::updateRow( int row )
bool TQDataTable::updateCurrent()
{
if ( d->dat.mode() != TQSql::Update )
- return FALSE;
+ return false;
if ( sqlCursor()->primaryIndex().count() == 0 ) {
#ifdef QT_CHECK_RANGE
tqWarning("TQDataTable::updateCurrent: no primary index for %s",
sqlCursor()->name().latin1() );
#endif
endUpdate();
- return FALSE;
+ return false;
}
if ( !sqlCursor()->canUpdate() ) {
#ifdef QT_CHECK_RANGE
@@ -1133,7 +1133,7 @@ bool TQDataTable::updateCurrent()
sqlCursor()->name().latin1() );
#endif
endUpdate();
- return FALSE;
+ return false;
}
int b = 0;
int conf = TQSql::Yes;
@@ -1154,7 +1154,7 @@ bool TQDataTable::updateCurrent()
endUpdate();
refresh();
setCurrentCell( d->editRow, d->editCol );
- if ( TQTable::beginEdit( d->editRow, d->editCol, FALSE ) )
+ if ( TQTable::beginEdit( d->editRow, d->editCol, false ) )
setEditMode( Editing, d->editRow, d->editCol );
} else {
emit cursorChanged( TQSql::Update );
@@ -1169,7 +1169,7 @@ bool TQDataTable::updateCurrent()
break;
case TQSql::Cancel:
setCurrentCell( d->editRow, d->editCol );
- if ( TQTable::beginEdit( d->editRow, d->editCol, FALSE ) )
+ if ( TQTable::beginEdit( d->editRow, d->editCol, false ) )
setEditMode( Editing, d->editRow, d->editCol );
break;
}
@@ -1180,9 +1180,9 @@ bool TQDataTable::updateCurrent()
For an editable table, issues a delete on the current cursor's
primary index using the values of the currently selected row. If
there is no current cursor or there is no current selection,
- nothing happens. If confirmEdits() or confirmDelete() is TRUE,
- confirmEdit() is called to confirm the delete. Returns TRUE if the
- delete succeeded; otherwise FALSE.
+ nothing happens. If confirmEdits() or confirmDelete() is true,
+ confirmEdit() is called to confirm the delete. Returns true if the
+ delete succeeded; otherwise false.
The underlying cursor must have a valid primary index to ensure
that a unique record is deleted within the database otherwise the
@@ -1192,16 +1192,16 @@ bool TQDataTable::updateCurrent()
bool TQDataTable::deleteCurrent()
{
if ( !sqlCursor() || isReadOnly() )
- return FALSE;
+ return false;
if ( sqlCursor()->primaryIndex().count() == 0 ) {
#ifdef QT_CHECK_RANGE
tqWarning("TQDataTable::deleteCurrent: no primary index %s",
sqlCursor()->name().latin1() );
#endif
- return FALSE;
+ return false;
}
if ( !sqlCursor()->canDelete() )
- return FALSE;
+ return false;
int b = 0;
int conf = TQSql::Yes;
@@ -1212,7 +1212,7 @@ bool TQDataTable::deleteCurrent()
// dialog that causes a repaint which the cursor to the
// record it has to repaint.
if ( !sqlCursor()->seek( currentRow() ) )
- return FALSE;
+ return false;
switch ( conf ) {
case TQSql::Yes:{
#ifndef TQT_NO_CURSOR
@@ -1230,7 +1230,7 @@ bool TQDataTable::deleteCurrent()
refresh();
emit cursorChanged( TQSql::Delete );
setCurrentCell( currentRow(), currentColumn() );
- repaintContents( contentsX(), contentsY(), visibleWidth(), visibleHeight(), FALSE );
+ repaintContents( contentsX(), contentsY(), visibleWidth(), visibleHeight(), false );
verticalHeader()->repaint(); // get rid of trailing garbage
}
break;
@@ -1271,11 +1271,11 @@ TQSql::Confirm TQDataTable::confirmCancel( TQSql::Op m )
/*!
Searches the current cursor for a cell containing the string \a
str starting at the current cell and working forwards (or
- backwards if \a backwards is TRUE). If the string is found, the
+ backwards if \a backwards is true). If the string is found, the
cell containing the string is set as the current cell. If \a
- caseSensitive is FALSE the case of \a str will be ignored.
+ caseSensitive is false the case of \a str will be ignored.
- The search will wrap, i.e. if the first (or if backwards is TRUE,
+ The search will wrap, i.e. if the first (or if backwards is true,
last) cell is reached without finding \a str the search will
continue until it reaches the starting cell. If \a str is not
found the search will fail and the current cell will remain
@@ -1290,7 +1290,7 @@ void TQDataTable::find( const TQString & str, bool caseSensitive, bool backwards
TQString tmp, text;
uint row = currentRow(), startRow = row,
col = backwards ? currentColumn() - 1 : currentColumn() + 1;
- bool wrap = TRUE, found = FALSE;
+ bool wrap = true, found = false;
if( str.isEmpty() || str.isNull() )
return;
@@ -1315,7 +1315,7 @@ void TQDataTable::find( const TQString & str, bool caseSensitive, bool backwards
if( text.contains( tmp ) ){
setCurrentCell( row, i );
col = i;
- found = TRUE;
+ found = true;
}
}
if( !backwards ){
@@ -1330,7 +1330,7 @@ void TQDataTable::find( const TQString & str, bool caseSensitive, bool backwards
if( startRow != 0 ){
startRow = 0;
} else {
- wrap = FALSE;
+ wrap = false;
}
r->first();
row = 0;
@@ -1338,7 +1338,7 @@ void TQDataTable::find( const TQString & str, bool caseSensitive, bool backwards
if( startRow != (uint) (numRows() - 1) ){
startRow = numRows() - 1;
} else {
- wrap = FALSE;
+ wrap = false;
}
r->last();
row = numRows() - 1;
@@ -1373,14 +1373,14 @@ void TQDataTable::reset()
verticalScrollBar()->setValue(0);
setNumRows(0);
- d->haveAllRows = FALSE;
- d->continuousEdit = FALSE;
+ d->haveAllRows = false;
+ d->continuousEdit = false;
d->dat.setMode( TQSql::None );
d->editRow = -1;
d->editCol = -1;
d->insertRowLast = -1;
d->insertHeaderLabelLast = TQString::null;
- d->cancelMode = FALSE;
+ d->cancelMode = false;
d->lastAt = -1;
d->fld.clear();
d->fldLabel.clear();
@@ -1405,8 +1405,8 @@ int TQDataTable::indexOf( uint i ) const
}
/*!
- Returns TRUE if the table will automatically delete the cursor
- specified by setSqlCursor(); otherwise returns FALSE.
+ Returns true if the table will automatically delete the cursor
+ specified by setSqlCursor(); otherwise returns false.
*/
bool TQDataTable::autoDelete() const
@@ -1416,8 +1416,8 @@ bool TQDataTable::autoDelete() const
/*!
Sets the cursor auto-delete flag to \a enable. If \a enable is
- TRUE, the table will automatically delete the cursor specified by
- setSqlCursor(). If \a enable is FALSE (the default), the cursor
+ true, the table will automatically delete the cursor specified by
+ setSqlCursor(). If \a enable is false (the default), the cursor
will not be deleted.
*/
@@ -1430,13 +1430,13 @@ void TQDataTable::setAutoDelete( bool enable )
\property TQDataTable::autoEdit
\brief whether the data table automatically applies edits
- The default value for this property is TRUE. When the user begins
+ The default value for this property is true. When the user begins
an insert or update in the table there are two possible outcomes
when they navigate to another record:
\list 1
- \i the insert or update is is performed -- this occurs if autoEdit is TRUE
- \i the insert or update is abandoned -- this occurs if autoEdit is FALSE
+ \i the insert or update is is performed -- this occurs if autoEdit is true
+ \i the insert or update is abandoned -- this occurs if autoEdit is false
\endlist
*/
@@ -1461,7 +1461,7 @@ bool TQDataTable::autoEdit() const
void TQDataTable::setNullText( const TQString& nullText )
{
d->nullTxt = nullText;
- d->nullTxtChanged = TRUE;
+ d->nullTxtChanged = true;
}
TQString TQDataTable::nullText() const
@@ -1631,14 +1631,14 @@ void TQDataTable::loadNextPage()
// check for empty result set
if ( sqlCursor()->at() == TQSql::BeforeFirst && !sqlCursor()->next() ) {
- d->haveAllRows = TRUE;
+ d->haveAllRows = true;
return;
}
while ( endIdx > 0 && !sqlCursor()->seek( endIdx ) )
endIdx--;
if ( endIdx != ( startIdx + pageSize + lookAhead ) )
- d->haveAllRows = TRUE;
+ d->haveAllRows = true;
// small hack to prevent TQTable from moving the view when a row
// is selected and the contents is resized
SelectionMode m = selectionMode();
@@ -1665,7 +1665,7 @@ void TQDataTable::sliderReleased()
}
/*!
- Sorts column \a col in ascending order if \a ascending is TRUE
+ Sorts column \a col in ascending order if \a ascending is true
(the default); otherwise sorts in descending order.
The \a wholeRows parameter is ignored; TQDataTable always sorts
@@ -1677,7 +1677,7 @@ void TQDataTable::sortColumn ( int col, bool ascending,
{
if ( sorting() ) {
if ( isEditing() && d->dat.mode() != TQSql::None )
- endEdit( d->editRow, d->editCol, autoEdit(), FALSE );
+ endEdit( d->editRow, d->editCol, autoEdit(), false );
if ( !sqlCursor() )
return;
TQSqlIndex lastSort = sqlCursor()->sort();
@@ -1699,7 +1699,7 @@ void TQDataTable::columnClicked ( int col )
if ( !sqlCursor() )
return;
TQSqlIndex lastSort = sqlCursor()->sort();
- bool asc = TRUE;
+ bool asc = true;
if ( lastSort.count() && lastSort.field( 0 )->name() == sqlCursor()->field( indexOf( col ) )->name() )
asc = lastSort.isDescending( 0 );
sortColumn( col, asc );
@@ -1717,7 +1717,7 @@ void TQDataTable::repaintCell( int row, int col )
TQRect cg = cellGeometry( row, col );
TQRect re( TQPoint( cg.x() - 2, cg.y() - 2 ),
TQSize( cg.width() + 4, cg.height() + 4 ) );
- repaintContents( re, FALSE );
+ repaintContents( re, false );
}
/*!
@@ -1727,7 +1727,7 @@ void TQDataTable::repaintCell( int row, int col )
the corresponding cursor field on the painter \a p. Depending on
the table's current edit mode, paintField() is called for the
appropriate cursor field. \a cr describes the cell coordinates in
- the content coordinate system. If \a selected is TRUE the cell has
+ the content coordinate system. If \a selected is true the cell has
been selected and would normally be rendered differently than an
unselected cell.
@@ -1833,9 +1833,9 @@ void TQDataTable::setSize( TQSqlCursor* sql )
/*!
Sets \a cursor as the data source for the table. To force the
display of the data from \a cursor, use refresh(). If \a
- autoPopulate is TRUE, columns are automatically created based upon
- the fields in the \a cursor record. If \a autoDelete is TRUE (the
- default is FALSE), the table will take ownership of the \a cursor
+ autoPopulate is true, columns are automatically created based upon
+ the fields in the \a cursor record. If \a autoDelete is true (the
+ default is false), the table will take ownership of the \a cursor
and delete it when appropriate. If the \a cursor is read-only, the
table becomes read-only. The table adopts the cursor's driver's
definition for representing NULL values as strings.
@@ -1845,7 +1845,7 @@ void TQDataTable::setSize( TQSqlCursor* sql )
void TQDataTable::setSqlCursor( TQSqlCursor* cursor, bool autoPopulate, bool autoDelete )
{
- setUpdatesEnabled( FALSE );
+ setUpdatesEnabled( false );
d->cur.setCursor( 0 );
if ( cursor ) {
d->cur.setCursor( cursor, autoDelete );
@@ -1868,7 +1868,7 @@ void TQDataTable::setSqlCursor( TQSqlCursor* cursor, bool autoPopulate, bool aut
setNumRows( 0 );
setNumCols( 0 );
}
- setUpdatesEnabled( TRUE );
+ setUpdatesEnabled( true );
}
@@ -2033,7 +2033,7 @@ TQSqlRecord* TQDataTable::currentRecord() const
void TQDataTable::sortAscending( int col )
{
- sortColumn( col, TRUE );
+ sortColumn( col, true );
}
/*!
@@ -2044,7 +2044,7 @@ void TQDataTable::sortAscending( int col )
void TQDataTable::sortDescending( int col )
{
- sortColumn( col, FALSE );
+ sortColumn( col, false );
}
/*!
@@ -2065,13 +2065,13 @@ void TQDataTable::refresh( TQDataTable::Refresh mode )
bool refreshData = ( (mode & RefreshData) == RefreshData );
bool refreshCol = ( (mode & RefreshColumns) == RefreshColumns );
if ( ( (mode & RefreshAll) == RefreshAll ) ) {
- refreshData = TRUE;
- refreshCol = TRUE;
+ refreshData = true;
+ refreshCol = true;
}
if ( !refreshCol && d->fld.count() && numCols() == 0 )
- refreshCol = TRUE;
- viewport()->setUpdatesEnabled( FALSE );
- d->haveAllRows = FALSE;
+ refreshCol = true;
+ viewport()->setUpdatesEnabled( false );
+ d->haveAllRows = false;
if ( refreshData ) {
if ( !d->cur.refresh() && d->cur.cursor() ) {
handleError( d->cur.cursor()->lastError() );
@@ -2113,8 +2113,8 @@ void TQDataTable::refresh( TQDataTable::Refresh mode )
}
}
}
- viewport()->setUpdatesEnabled( TRUE );
- viewport()->repaint( FALSE );
+ viewport()->setUpdatesEnabled( true );
+ viewport()->repaint( false );
horizontalHeader()->repaint();
verticalHeader()->repaint();
setSize( cur );
@@ -2151,7 +2151,7 @@ bool TQDataTable::findBuffer( const TQSqlIndex& idx, int atHint )
{
TQSqlCursor* cur = sqlCursor();
if ( !cur )
- return FALSE;
+ return false;
bool found = d->cur.findBuffer( idx, atHint );
if ( found )
setCurrentCell( cur->at(), currentColumn() );
@@ -2232,7 +2232,7 @@ void TQDataTable::drawContents( TQPainter * p, int cx, int cy, int cw, int ch )
void TQDataTable::hideColumn( int col )
{
- d->fldHidden[col] = TRUE;
+ d->fldHidden[col] = true;
refresh( RefreshColumns );
}
@@ -2242,7 +2242,7 @@ void TQDataTable::hideColumn( int col )
void TQDataTable::showColumn( int col )
{
- d->fldHidden[col] = FALSE;
+ d->fldHidden[col] = false;
refresh( RefreshColumns );
}
diff --git a/src/sql/tqdatatable.h b/src/sql/tqdatatable.h
index 530d30ce1..c287ec042 100644
--- a/src/sql/tqdatatable.h
+++ b/src/sql/tqdatatable.h
@@ -86,7 +86,7 @@ class TQM_EXPORT_SQL TQDataTable : public TQTable
public:
TQDataTable ( TQWidget* parent=0, const char* name=0 );
- TQDataTable ( TQSqlCursor* cursor, bool autoPopulate = FALSE, TQWidget* parent=0, const char* name=0 );
+ TQDataTable ( TQSqlCursor* cursor, bool autoPopulate = false, TQWidget* parent=0, const char* name=0 );
~TQDataTable();
virtual void addColumn( const TQString& fieldName,
@@ -114,7 +114,7 @@ public:
TQStringList sort() const;
virtual void setSqlCursor( TQSqlCursor* cursor = 0,
- bool autoPopulate = FALSE, bool autoDelete = FALSE );
+ bool autoPopulate = false, bool autoDelete = false );
TQSqlCursor* sqlCursor() const;
virtual void setNullText( const TQString& nullText );
@@ -138,8 +138,8 @@ public:
RefreshAll = 3
};
void refresh( Refresh mode );
- void sortColumn ( int col, bool ascending = TRUE,
- bool wholeRows = FALSE );
+ void sortColumn ( int col, bool ascending = true,
+ bool wholeRows = false );
TQString text ( int row, int col ) const;
TQVariant value ( int row, int col ) const;
TQSqlRecord* currentRecord() const;
@@ -174,7 +174,7 @@ public slots:
void setColumnWidth( int col, int w );
void adjustColumn( int col );
void setColumnStretchable( int col, bool stretch );
- void swapColumns( int col1, int col2, bool swapHeaders = FALSE );
+ void swapColumns( int col1, int col2, bool swapHeaders = false );
protected:
virtual bool insertCurrent();
diff --git a/src/sql/tqeditorfactory.cpp b/src/sql/tqeditorfactory.cpp
index 098d850c7..6c1cf4a60 100644
--- a/src/sql/tqeditorfactory.cpp
+++ b/src/sql/tqeditorfactory.cpp
@@ -150,7 +150,7 @@ TQWidget * TQEditorFactory::createEditor( TQWidget * parent, const TQVariant & v
case TQVariant::CString:
case TQVariant::Double:
w = new TQLineEdit( parent, "qt_editor_double" );
- ((TQLineEdit*)w)->setFrame( FALSE );
+ ((TQLineEdit*)w)->setFrame( false );
break;
case TQVariant::Date:
w = new TQDateEdit( parent, "qt_editor_date" );
diff --git a/src/sql/tqsqlcursor.cpp b/src/sql/tqsqlcursor.cpp
index 55f9c9a38..5950b79e9 100644
--- a/src/sql/tqsqlcursor.cpp
+++ b/src/sql/tqsqlcursor.cpp
@@ -109,7 +109,7 @@ TQString qWhereClause( TQSqlRecord* rec, const TQString& prefix, const TQString&
{
static TQString blank( " " );
TQString filter;
- bool separator = FALSE;
+ bool separator = false;
for ( uint j = 0; j < rec->count(); ++j ) {
TQSqlField* f = rec->field( j );
if ( rec->isGenerated( j ) ) {
@@ -117,7 +117,7 @@ TQString qWhereClause( TQSqlRecord* rec, const TQString& prefix, const TQString&
filter += sep + blank;
filter += qWhereClause( prefix, f, driver );
filter += blank;
- separator = TRUE;
+ separator = true;
}
}
return filter;
@@ -145,13 +145,13 @@ TQString qWhereClause( TQSqlRecord* rec, const TQString& prefix, const TQString&
For browsing data, a cursor must first select() data from the
database. After a successful select() the cursor is active
- (isActive() returns TRUE), but is initially not positioned on a
- valid record (isValid() returns FALSE). To position the cursor on
+ (isActive() returns true), but is initially not positioned on a
+ valid record (isValid() returns false). To position the cursor on
a valid record, use one of the navigation functions, next(),
prev(), first(), last(), or seek(). Once positioned on a valid
record, data can be retrieved from the browse buffer using
value(). If a navigation function is not successful, it returns
- FALSE, the cursor will no longer be positioned on a valid record
+ false, the cursor will no longer be positioned on a valid record
and the values returned by value() are undefined.
For example:
@@ -165,7 +165,7 @@ TQString qWhereClause( TQSqlRecord* rec, const TQString& prefix, const TQString&
view name in the database. Then, select() is called, which can be
optionally parameterised to filter and order the records
retrieved. Each record in the cursor is retrieved using next().
- When next() returns FALSE, there are no more records to process,
+ When next() returns false, there are no more records to process,
and the loop terminates.
For editing records (rows of data), a cursor contains a separate
@@ -209,10 +209,10 @@ TQString qWhereClause( TQSqlRecord* rec, const TQString& prefix, const TQString&
After calling insert(), update() or del(), the cursor is no longer
positioned on a valid record and can no longer be navigated
- (isValid() return FALSE). The reason for this is that any changes
+ (isValid() return false). The reason for this is that any changes
made to the database will not be visible until select() is called
to refresh the cursor. You can change this behavior by passing
- FALSE to insert(), update() or del() which will prevent the cursor
+ false to insert(), update() or del() which will prevent the cursor
from becoming invalid. The edits will still not be visible when
navigating the cursor until select() is called.
@@ -258,7 +258,7 @@ TQString qWhereClause( TQSqlRecord* rec, const TQString& prefix, const TQString&
/*!
Constructs a cursor on database \a db using table or view \a name.
- If \a autopopulate is TRUE (the default), the \a name of the
+ If \a autopopulate is true (the default), the \a name of the
cursor must correspond to an existing table or view name in the
database so that field information can be automatically created.
If the table or view does not exist, the cursor will not be
@@ -381,7 +381,7 @@ TQString TQSqlCursor::filter() const
}
/*!
- Sets the name of the cursor to \a name. If \a autopopulate is TRUE
+ Sets the name of the cursor to \a name. If \a autopopulate is true
(the default), the \a name must correspond to a valid table or
view name in the database. Also, note that all references to the
cursor edit buffer become invalidated when fields are
@@ -421,7 +421,7 @@ TQString TQSqlCursor::toString( const TQString& prefix, const TQString& sep ) co
{
TQString pflist;
TQString pfix = prefix.isEmpty() ? TQString::null : prefix + ".";
- bool comma = FALSE;
+ bool comma = false;
for ( uint i = 0; i < count(); ++i ) {
const TQString fname = fieldName( i );
@@ -429,7 +429,7 @@ TQString TQSqlCursor::toString( const TQString& prefix, const TQString& sep ) co
if( comma )
pflist += sep + " ";
pflist += pfix + fname;
- comma = TRUE;
+ comma = true;
}
}
return pflist;
@@ -503,7 +503,7 @@ void TQSqlCursor::remove( int pos )
/*!
Sets the generated flag for the field \a name to \a generated. If
the field does not exist, nothing happens. Only fields that have
- \a generated set to TRUE are included in the SQL that is
+ \a generated set to true are included in the SQL that is
generated by insert(), update() or del().
\sa isGenerated()
@@ -538,7 +538,7 @@ void TQSqlCursor::setGenerated( int i, bool generated )
/*!
Returns the primary index associated with the cursor as defined in
the database, or an empty index if there is no primary index. If
- \a setFromCursor is TRUE (the default), the index fields are
+ \a setFromCursor is true (the default), the index fields are
populated with the corresponding values in the cursor's current
record.
*/
@@ -618,8 +618,8 @@ TQSqlIndex TQSqlCursor::index( const char* fieldName ) const
/*!
Selects all fields in the cursor from the database matching the
filter criteria \a filter. The data is returned in the order
- specified by the index \a sort. Returns TRUE if the data was
- successfully selected; otherwise returns FALSE.
+ specified by the index \a sort. Returns true if the data was
+ successfully selected; otherwise returns false.
The \a filter is a string containing a SQL \c WHERE clause but
without the 'WHERE' keyword. The cursor is initially positioned at
@@ -661,7 +661,7 @@ bool TQSqlCursor::select( const TQString & filter, const TQSqlIndex & sort )
{
TQString fieldList = toString( d->nm );
if ( fieldList.isEmpty() )
- return FALSE;
+ return false;
TQString str= "select " + fieldList;
str += " from " + d->nm;
if ( !filter.isEmpty() ) {
@@ -798,12 +798,12 @@ void TQSqlCursor::setCalculated( const TQString& name, bool calculated )
return;
d->infoBuffer[ pos ].setCalculated( calculated );
if ( calculated )
- setGenerated( pos, FALSE );
+ setGenerated( pos, false );
}
/*!
- Returns TRUE if the field \a name exists and is calculated;
- otherwise returns FALSE.
+ Returns true if the field \a name exists and is calculated;
+ otherwise returns false.
\sa setCalculated()
*/
@@ -812,7 +812,7 @@ bool TQSqlCursor::isCalculated( const TQString& name ) const
{
int pos = position( name );
if ( pos < 0 )
- return FALSE;
+ return false;
return d->infoBuffer[ pos ].isCalculated();
}
@@ -835,8 +835,8 @@ void TQSqlCursor::setTrimmed( const TQString& name, bool trim )
}
/*!
- Returns TRUE if the field \a name exists and is trimmed; otherwise
- returns FALSE.
+ Returns true if the field \a name exists and is trimmed; otherwise
+ returns false.
When a trimmed field of type string or cstring is read from the
database any trailing (right-most) spaces are removed.
@@ -848,13 +848,13 @@ bool TQSqlCursor::isTrimmed( const TQString& name ) const
{
int pos = position( name );
if ( pos < 0 )
- return FALSE;
+ return false;
return d->infoBuffer[ pos ].isTrim();
}
/*!
- Returns TRUE if the cursor is read-only; otherwise returns FALSE.
- The default is FALSE. Read-only cursors cannot be edited using
+ Returns true if the cursor is read-only; otherwise returns false.
+ The default is false. Read-only cursors cannot be edited using
insert(), update() or del().
\sa setMode()
@@ -866,8 +866,8 @@ bool TQSqlCursor::isReadOnly() const
}
/*!
- Returns TRUE if the cursor will perform inserts; otherwise returns
- FALSE.
+ Returns true if the cursor will perform inserts; otherwise returns
+ false.
\sa setMode()
*/
@@ -879,8 +879,8 @@ bool TQSqlCursor::canInsert() const
/*!
- Returns TRUE if the cursor will perform updates; otherwise returns
- FALSE.
+ Returns true if the cursor will perform updates; otherwise returns
+ false.
\sa setMode()
*/
@@ -891,8 +891,8 @@ bool TQSqlCursor::canUpdate() const
}
/*!
- Returns TRUE if the cursor will perform deletes; otherwise returns
- FALSE.
+ Returns true if the cursor will perform deletes; otherwise returns
+ false.
\sa setMode()
*/
@@ -933,7 +933,7 @@ TQString TQSqlCursor::toString( const TQString& prefix, TQSqlField* field, const
".", the field name, the \a fieldSep and the field value. If the
\a prefix is empty then each field will begin with the field name.
The fields are then joined together separated by \a sep. Fields
- where isGenerated() returns FALSE are not included. This function
+ where isGenerated() returns false are not included. This function
is useful for generating SQL statements.
*/
@@ -942,7 +942,7 @@ TQString TQSqlCursor::toString( TQSqlRecord* rec, const TQString& prefix, const
{
static TQString blank( " " );
TQString filter;
- bool separator = FALSE;
+ bool separator = false;
for ( uint j = 0; j < count(); ++j ) {
TQSqlField* f = rec->field( j );
if ( rec->isGenerated( j ) ) {
@@ -950,7 +950,7 @@ TQString TQSqlCursor::toString( TQSqlRecord* rec, const TQString& prefix, const
filter += sep + blank;
filter += toString( prefix, f, fieldSep );
filter += blank;
- separator = TRUE;
+ separator = true;
}
}
return filter;
@@ -965,7 +965,7 @@ TQString TQSqlCursor::toString( TQSqlRecord* rec, const TQString& prefix, const
If the \a prefix is empty then each field will begin with the field
name. The field values are taken from \a rec. The fields are then
joined together separated by \a sep. Fields where isGenerated()
- returns FALSE are ignored. This function is useful for generating
+ returns false are ignored. This function is useful for generating
SQL statements.
*/
@@ -973,7 +973,7 @@ TQString TQSqlCursor::toString( const TQSqlIndex& i, TQSqlRecord* rec, const TQS
const TQString& fieldSep, const TQString& sep ) const
{
TQString filter;
- bool separator = FALSE;
+ bool separator = false;
for( uint j = 0; j < i.count(); ++j ){
if ( rec->isGenerated( j ) ) {
if( separator ) {
@@ -982,7 +982,7 @@ TQString TQSqlCursor::toString( const TQSqlIndex& i, TQSqlRecord* rec, const TQS
TQString fn = i.fieldName( j );
TQSqlField* f = rec->field( fn );
filter += toString( prefix, f, fieldSep );
- separator = TRUE;
+ separator = true;
}
}
return filter;
@@ -996,7 +996,7 @@ TQString TQSqlCursor::toString( const TQSqlIndex& i, TQSqlRecord* rec, const TQS
number of rows affected by the insert. For error information, use
lastError().
- If \a invalidate is TRUE (the default), the cursor will no longer
+ If \a invalidate is true (the default), the cursor will no longer
be positioned on a valid record and can no longer be navigated. A
new select() call must be made before navigating to a valid
record.
@@ -1020,14 +1020,14 @@ TQString TQSqlCursor::toString( const TQSqlIndex& i, TQSqlRecord* rec, const TQS
int TQSqlCursor::insert( bool invalidate )
{
if ( ( d->md & Insert ) != Insert || !driver() )
- return FALSE;
+ return false;
int k = d->editBuffer.count();
if ( k == 0 )
return 0;
TQString fList;
TQString vList;
- bool comma = FALSE;
+ bool comma = false;
// use a prepared query if the driver supports it
if ( driver()->hasFeature( TQSqlDriver::PreparedQueries ) ) {
int cnt = 0;
@@ -1040,9 +1040,9 @@ int TQSqlCursor::insert( bool invalidate )
vList += ",";
}
fList += f->name();
- vList += (oraStyle == TRUE) ? ":f" + TQString::number(cnt) : TQString("?");
+ vList += oraStyle ? ":f" + TQString::number(cnt) : TQString("?");
cnt++;
- comma = TRUE;
+ comma = true;
}
}
if ( !comma ) {
@@ -1061,7 +1061,7 @@ int TQSqlCursor::insert( bool invalidate )
}
fList += f->name();
vList += driver()->formatValue( f );
- comma = TRUE;
+ comma = true;
}
}
@@ -1076,8 +1076,8 @@ int TQSqlCursor::insert( bool invalidate )
}
/*!
- Returns the current internal edit buffer. If \a copy is TRUE (the
- default is FALSE), the current cursor field values are first
+ Returns the current internal edit buffer. If \a copy is true (the
+ default is false), the current cursor field values are first
copied into the edit buffer. The edit buffer is valid as long as
the cursor remains valid. The cursor retains ownership of the
returned pointer, so it must not be deleted or modified.
@@ -1104,7 +1104,7 @@ TQSqlRecord* TQSqlCursor::editBuffer( bool copy )
returns the edit buffer. The default implementation copies the
field values from the current cursor record into the edit buffer
(therefore, this function is equivalent to calling editBuffer(
- TRUE ) ). The cursor retains ownership of the returned pointer, so
+ true ) ). The cursor retains ownership of the returned pointer, so
it must not be deleted or modified.
\sa editBuffer() update()
@@ -1113,8 +1113,8 @@ TQSqlRecord* TQSqlCursor::editBuffer( bool copy )
TQSqlRecord* TQSqlCursor::primeUpdate()
{
// memorize the primary keys as they were before the user changed the values in editBuffer
- TQSqlRecord* buf = editBuffer( TRUE );
- TQSqlIndex idx = primaryIndex( FALSE );
+ TQSqlRecord* buf = editBuffer( true );
+ TQSqlIndex idx = primaryIndex( false );
if ( !idx.isEmpty() )
d->editIndex = toString( idx, buf, d->nm, "=", "and" );
else
@@ -1127,7 +1127,7 @@ TQSqlRecord* TQSqlCursor::primeUpdate()
returns the edit buffer. The default implementation copies the
field values from the current cursor record into the edit buffer
(therefore, this function is equivalent to calling editBuffer(
- TRUE ) ). The cursor retains ownership of the returned pointer, so
+ true ) ). The cursor retains ownership of the returned pointer, so
it must not be deleted or modified.
\sa editBuffer() del()
@@ -1135,7 +1135,7 @@ TQSqlRecord* TQSqlCursor::primeUpdate()
TQSqlRecord* TQSqlCursor::primeDelete()
{
- return editBuffer( TRUE );
+ return editBuffer( true );
}
/*!
@@ -1163,7 +1163,7 @@ TQSqlRecord* TQSqlCursor::primeInsert()
cursor's primary index are updated. If the cursor does not contain
a primary index, no update is performed and 0 is returned.
- If \a invalidate is TRUE (the default), the current cursor can no
+ If \a invalidate is true (the default), the current cursor can no
longer be navigated. A new select() call must be made before you
can move to a valid record. For example:
@@ -1208,7 +1208,7 @@ int TQSqlCursor::update( bool invalidate )
Only records which meet the filter criteria are updated, otherwise
all records in the table are updated.
- If \a invalidate is TRUE (the default), the cursor can no longer
+ If \a invalidate is true (the default), the cursor can no longer
be navigated. A new select() call must be made before you can move
to a valid record.
@@ -1218,7 +1218,7 @@ int TQSqlCursor::update( bool invalidate )
int TQSqlCursor::update( const TQString & filter, bool invalidate )
{
if ( ( d->md & Update ) != Update ) {
- return FALSE;
+ return false;
}
int k = count();
if ( k == 0 ) {
@@ -1228,7 +1228,7 @@ int TQSqlCursor::update( const TQString & filter, bool invalidate )
// use a prepared query if the driver supports it
if ( driver()->hasFeature( TQSqlDriver::PreparedQueries ) ) {
TQString fList;
- bool comma = FALSE;
+ bool comma = false;
int cnt = 0;
bool oraStyle = driver()->hasFeature( TQSqlDriver::NamedPlaceholders );
for( int j = 0; j < k; ++j ) {
@@ -1237,9 +1237,9 @@ int TQSqlCursor::update( const TQString & filter, bool invalidate )
if ( comma ) {
fList += ",";
}
- fList += f->name() + " = " + (oraStyle == TRUE ? ":f" + TQString::number(cnt) : TQString("?"));
+ fList += f->name() + " = " + (oraStyle ? ":f" + TQString::number(cnt) : TQString("?"));
cnt++;
- comma = TRUE;
+ comma = true;
}
}
if ( !comma ) {
@@ -1269,7 +1269,7 @@ int TQSqlCursor::update( const TQString & filter, bool invalidate )
Only records which meet the filter criteria specified by the
cursor's primary index are deleted. If the cursor does not contain
a primary index, no delete is performed and 0 is returned. If \a
- invalidate is TRUE (the default), the current cursor can no longer
+ invalidate is true (the default), the current cursor can no longer
be navigated. A new select() call must be made before you can move
to a valid record. For example:
@@ -1291,7 +1291,7 @@ int TQSqlCursor::update( const TQString & filter, bool invalidate )
int TQSqlCursor::del( bool invalidate )
{
- TQSqlIndex idx = primaryIndex( FALSE );
+ TQSqlIndex idx = primaryIndex( false );
if ( idx.isEmpty() )
return del( qWhereClause( &d->editBuffer, d->nm, "and", driver() ), invalidate );
else
@@ -1305,7 +1305,7 @@ int TQSqlCursor::del( bool invalidate )
Deletes the current cursor record from the database using the
filter \a filter. Only records which meet the filter criteria are
deleted. Returns the number of records which were deleted. If \a
- invalidate is TRUE (the default), the current cursor can no longer
+ invalidate is true (the default), the current cursor can no longer
be navigated. A new select() call must be made before you can move
to a valid record. For error information, use lastError().
@@ -1384,8 +1384,8 @@ int TQSqlCursor::applyPrepared( const TQString& q, bool invalidate )
/*! \reimp
- Executes the SQL query \a sql. Returns TRUE of the cursor is
- active, otherwise returns FALSE.
+ Executes the SQL query \a sql. Returns true of the cursor is
+ active, otherwise returns false.
*/
bool TQSqlCursor::exec( const TQString & sql )
@@ -1434,10 +1434,10 @@ void TQSqlCursor::sync()
d->lastAt = at();
uint i = 0;
uint j = 0;
- bool haveCalculatedFields = FALSE;
+ bool haveCalculatedFields = false;
for ( ; i < count(); ++i ) {
if ( !haveCalculatedFields && d->infoBuffer[i].isCalculated() ) {
- haveCalculatedFields = TRUE;
+ haveCalculatedFields = true;
}
if ( TQSqlRecord::isGenerated( i ) ) {
TQVariant v = TQSqlQuery::value( j );
@@ -1507,8 +1507,8 @@ void TQSqlCursor::insert( int pos, const TQSqlField& field )
}
/*!
- Returns TRUE if the field \a i is NULL or if there is no field at
- position \a i; otherwise returns FALSE.
+ Returns true if the field \a i is NULL or if there is no field at
+ position \a i; otherwise returns false.
This is the same as calling TQSqlRecord::isNull( \a i )
*/
@@ -1519,8 +1519,8 @@ bool TQSqlCursor::isNull( int i ) const
/*!
\overload
- Returns TRUE if the field called \a name is NULL or if there is no
- field called \a name; otherwise returns FALSE.
+ Returns true if the field called \a name is NULL or if there is no
+ field called \a name; otherwise returns false.
This is the same as calling TQSqlRecord::isNull( \a name )
*/
diff --git a/src/sql/tqsqlcursor.h b/src/sql/tqsqlcursor.h
index a8530ec53..35a06daef 100644
--- a/src/sql/tqsqlcursor.h
+++ b/src/sql/tqsqlcursor.h
@@ -62,7 +62,7 @@ class TQSqlCursorPrivate;
class TQM_EXPORT_SQL TQSqlCursor : public TQSqlRecord, public TQSqlQuery
{
public:
- TQSqlCursor( const TQString & name = TQString::null, bool autopopulate = TRUE, TQSqlDatabase* db = 0 );
+ TQSqlCursor( const TQString & name = TQString::null, bool autopopulate = true, TQSqlDatabase* db = 0 );
TQSqlCursor( const TQSqlCursor & other );
TQSqlCursor& operator=( const TQSqlCursor& other );
~TQSqlCursor();
@@ -79,7 +79,7 @@ public:
TQVariant value( const TQString& name ) const;
void setValue( int i, const TQVariant& val );
void setValue( const TQString& name, const TQVariant& val );
- virtual TQSqlIndex primaryIndex( bool prime = TRUE ) const;
+ virtual TQSqlIndex primaryIndex( bool prime = true ) const;
virtual TQSqlIndex index( const TQStringList& fieldNames ) const;
TQSqlIndex index( const TQString& fieldName ) const;
TQSqlIndex index( const char* fieldName ) const;
@@ -92,13 +92,13 @@ public:
void setGenerated( const TQString& name, bool generated );
void setGenerated( int i, bool generated );
- virtual TQSqlRecord* editBuffer( bool copy = FALSE );
+ virtual TQSqlRecord* editBuffer( bool copy = false );
virtual TQSqlRecord* primeInsert();
virtual TQSqlRecord* primeUpdate();
virtual TQSqlRecord* primeDelete();
- virtual int insert( bool invalidate = TRUE );
- virtual int update( bool invalidate = TRUE );
- virtual int del( bool invalidate = TRUE );
+ virtual int insert( bool invalidate = true );
+ virtual int update( bool invalidate = true );
+ virtual int del( bool invalidate = true );
virtual void setMode( int flags );
int mode() const;
@@ -121,7 +121,7 @@ public:
TQSqlIndex sort() const;
virtual void setFilter( const TQString& filter );
TQString filter() const;
- virtual void setName( const TQString& name, bool autopopulate = TRUE );
+ virtual void setName( const TQString& name, bool autopopulate = true );
TQString name() const;
TQString toString( const TQString& prefix = TQString::null,
const TQString& sep = "," ) const;
@@ -133,8 +133,8 @@ protected:
bool exec( const TQString & sql );
virtual TQVariant calculateField( const TQString& name );
- virtual int update( const TQString & filter, bool invalidate = TRUE );
- virtual int del( const TQString & filter, bool invalidate = TRUE );
+ virtual int update( const TQString & filter, bool invalidate = true );
+ virtual int del( const TQString & filter, bool invalidate = true );
virtual TQString toString( const TQString& prefix, TQSqlField* field, const TQString& fieldSep ) const;
virtual TQString toString( TQSqlRecord* rec, const TQString& prefix, const TQString& fieldSep,
diff --git a/src/sql/tqsqldatabase.cpp b/src/sql/tqsqldatabase.cpp
index f818a8f62..4734c2d09 100644
--- a/src/sql/tqsqldatabase.cpp
+++ b/src/sql/tqsqldatabase.cpp
@@ -120,11 +120,11 @@ public:
~TQNullResult(){}
protected:
TQVariant data( int ) { return TQVariant(); }
- bool reset ( const TQString& sqlquery ) { TQString s(sqlquery); return FALSE; }
- bool fetch( int i ) { i = i; return FALSE; }
- bool fetchFirst() { return FALSE; }
- bool fetchLast() { return FALSE; }
- bool isNull( int ) {return FALSE; }
+ bool reset ( const TQString& sqlquery ) { TQString s(sqlquery); return false; }
+ bool fetch( int i ) { i = i; return false; }
+ bool fetchFirst() { return false; }
+ bool fetchLast() { return false; }
+ bool isNull( int ) {return false; }
TQSqlRecord record() {return TQSqlRecord();}
int size() {return 0;}
int numRowsAffected() {return 0;}
@@ -135,16 +135,16 @@ class TQNullDriver : public TQSqlDriver
public:
TQNullDriver(): TQSqlDriver(){}
~TQNullDriver(){}
- bool hasFeature( DriverFeature /* f */ ) const { return FALSE; } ;
+ bool hasFeature( DriverFeature /* f */ ) const { return false; } ;
bool open( const TQString & ,
const TQString & ,
const TQString & ,
const TQString &,
int ) {
- return FALSE;
+ return false;
}
void close() {}
- bool ping() { return TRUE; }
+ bool ping() { return true; }
TQSqlQuery createQuery() const { return TQSqlQuery( new TQNullResult(this) ); }
};
@@ -208,7 +208,7 @@ TQDriverDict* TQSqlDatabaseManager::driverDict()
TQSqlDatabaseManager* sqlConnection = instance();
if ( !sqlConnection->drDict ) {
sqlConnection->drDict = new TQDriverDict();
- sqlConnection->drDict->setAutoDelete( TRUE );
+ sqlConnection->drDict->setAutoDelete( true );
}
return sqlConnection->drDict;
}
@@ -233,7 +233,7 @@ TQSqlDatabaseManager* TQSqlDatabaseManager::instance()
/*!
Returns the database connection called \a name. If \a open is
- TRUE, the database connection is opened. If \a name does not exist
+ true, the database connection is opened. If \a name does not exist
in the list of managed databases, 0 is returned.
*/
@@ -256,8 +256,8 @@ TQSqlDatabase* TQSqlDatabaseManager::database( const TQString& name, bool open )
}
/*!
- Returns TRUE if the list of database connections contains \a name;
- otherwise returns FALSE.
+ Returns true if the list of database connections contains \a name;
+ otherwise returns false.
*/
bool TQSqlDatabaseManager::contains( const TQString& name )
@@ -265,8 +265,8 @@ bool TQSqlDatabaseManager::contains( const TQString& name )
TQSqlDatabaseManager* sqlConnection = instance();
TQSqlDatabase* db = sqlConnection->dbDict.find( name );
if ( db )
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
@@ -308,9 +308,9 @@ TQSqlDatabase* TQSqlDatabaseManager::addDatabase( TQSqlDatabase* db, const TQStr
void TQSqlDatabaseManager::removeDatabase( const TQString& name )
{
TQSqlDatabaseManager* sqlConnection = instance();
- sqlConnection->dbDict.setAutoDelete( TRUE );
+ sqlConnection->dbDict.setAutoDelete( true );
sqlConnection->dbDict.remove( name );
- sqlConnection->dbDict.setAutoDelete( FALSE );
+ sqlConnection->dbDict.setAutoDelete( false );
}
@@ -417,7 +417,7 @@ TQSqlDatabase* TQSqlDatabase::addDatabase( const TQString& type, const TQString&
/*!
Returns the database connection called \a connectionName. The
database connection must have been previously added with
- addDatabase(). If \a open is TRUE (the default) and the database
+ addDatabase(). If \a open is true (the default) and the database
connection is not already open it is opened now. If no \a
connectionName is specified the default connection is used. If \a
connectionName does not exist in the list of databases, 0 is
@@ -565,8 +565,8 @@ void TQSqlDatabase::registerSqlDriver( const TQString& name, const TQSqlDriverCr
}
/*!
- Returns TRUE if the list of database connections contains \a
- connectionName; otherwise returns FALSE.
+ Returns true if the list of database connections contains \a
+ connectionName; otherwise returns false.
*/
bool TQSqlDatabase::contains( const TQString& connectionName )
@@ -752,7 +752,7 @@ TQSqlQuery TQSqlDatabase::exec( const TQString & query ) const
/*!
Opens the database connection using the current connection values.
- Returns TRUE on success; otherwise returns FALSE. Error
+ Returns true on success; otherwise returns false. Error
information can be retrieved using the lastError() function.
\sa lastError()
@@ -768,7 +768,7 @@ bool TQSqlDatabase::open()
\overload
Opens the database connection using the given \a user name and \a
- password. Returns TRUE on success; otherwise returns FALSE. Error
+ password. Returns true on success; otherwise returns false. Error
information can be retrieved using the lastError() function.
This function does not store the password it is given. Instead,
@@ -806,8 +806,8 @@ bool TQSqlDatabase::ping()
}
/*!
- Returns TRUE if the database connection is currently open;
- otherwise returns FALSE.
+ Returns true if the database connection is currently open;
+ otherwise returns false.
*/
bool TQSqlDatabase::isOpen() const
@@ -816,8 +816,8 @@ bool TQSqlDatabase::isOpen() const
}
/*!
- Returns TRUE if there was an error opening the database
- connection; otherwise returns FALSE. Error information can be
+ Returns true if there was an error opening the database
+ connection; otherwise returns false. Error information can be
retrieved using the lastError() function.
*/
@@ -828,8 +828,8 @@ bool TQSqlDatabase::isOpenError() const
/*!
Begins a transaction on the database if the driver supports
- transactions. Returns TRUE if the operation succeeded; otherwise
- returns FALSE.
+ transactions. Returns true if the operation succeeded; otherwise
+ returns false.
\sa TQSqlDriver::hasFeature() commit() rollback()
*/
@@ -837,14 +837,14 @@ bool TQSqlDatabase::isOpenError() const
bool TQSqlDatabase::transaction()
{
if ( !d->driver->hasFeature( TQSqlDriver::Transactions ) )
- return FALSE;
+ return false;
return d->driver->beginTransaction();
}
/*!
Commits a transaction to the database if the driver supports
- transactions. Returns TRUE if the operation succeeded; otherwise
- returns FALSE.
+ transactions. Returns true if the operation succeeded; otherwise
+ returns false.
\sa TQSqlDriver::hasFeature() rollback()
*/
@@ -852,14 +852,14 @@ bool TQSqlDatabase::transaction()
bool TQSqlDatabase::commit()
{
if ( !d->driver->hasFeature( TQSqlDriver::Transactions ) )
- return FALSE;
+ return false;
return d->driver->commitTransaction();
}
/*!
Rolls a transaction back on the database if the driver supports
- transactions. Returns TRUE if the operation succeeded; otherwise
- returns FALSE.
+ transactions. Returns true if the operation succeeded; otherwise
+ returns false.
\sa TQSqlDriver::hasFeature() commit() transaction()
*/
@@ -867,7 +867,7 @@ bool TQSqlDatabase::commit()
bool TQSqlDatabase::rollback()
{
if ( !d->driver->hasFeature( TQSqlDriver::Transactions ) )
- return FALSE;
+ return false;
return d->driver->rollbackTransaction();
}
@@ -1229,8 +1229,8 @@ TQString TQSqlDatabase::connectOptions() const
}
/*!
- Returns TRUE if a driver called \a name is available; otherwise
- returns FALSE.
+ Returns true if a driver called \a name is available; otherwise
+ returns false.
\sa drivers()
*/
@@ -1241,9 +1241,9 @@ bool TQSqlDatabase::isDriverAvailable( const TQString& name )
TQStringList::ConstIterator it = l.begin();
for ( ;it != l.end(); ++it ) {
if ( *it == name )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/*! \overload
diff --git a/src/sql/tqsqldatabase.h b/src/sql/tqsqldatabase.h
index 84e0b1baa..1629b8ad4 100644
--- a/src/sql/tqsqldatabase.h
+++ b/src/sql/tqsqldatabase.h
@@ -134,7 +134,7 @@ public:
static TQSqlDatabase* addDatabase( const TQString& type, const TQString& connectionName = defaultConnection );
static TQSqlDatabase* addDatabase( TQSqlDriver* driver, const TQString& connectionName = defaultConnection );
- static TQSqlDatabase* database( const TQString& connectionName = defaultConnection, bool open = TRUE );
+ static TQSqlDatabase* database( const TQString& connectionName = defaultConnection, bool open = true );
static void removeDatabase( const TQString& connectionName );
static void removeDatabase( TQSqlDatabase* db );
static bool contains( const TQString& connectionName = defaultConnection );
diff --git a/src/sql/tqsqldriver.cpp b/src/sql/tqsqldriver.cpp
index d688b9a46..d608805cd 100644
--- a/src/sql/tqsqldriver.cpp
+++ b/src/sql/tqsqldriver.cpp
@@ -93,7 +93,7 @@ TQSqlDriver::~TQSqlDriver()
order to open a database connection on database \a db, using user
name \a user, password \a password, host \a host and port \a port.
- The function \e must return TRUE on success and FALSE on failure.
+ The function \e must return true on success and false on failure.
\sa setOpen()
@@ -103,8 +103,8 @@ TQSqlDriver::~TQSqlDriver()
\fn bool TQSqlDriver::close()
Derived classes must reimplement this abstract virtual function in
- order to close the database connection. Return TRUE on success,
- FALSE on failure.
+ order to close the database connection. Return true on success,
+ false on failure.
\sa setOpen()
@@ -126,8 +126,8 @@ TQSqlDriver::~TQSqlDriver()
//}
/*!
- Returns TRUE if the database connection is open; otherwise returns
- FALSE.
+ Returns true if the database connection is open; otherwise returns
+ false.
*/
bool TQSqlDriver::isOpen() const
@@ -142,8 +142,8 @@ bool TQSqlDriver::isOpen() const
}
/*!
- Returns TRUE if the there was an error opening the database
- connection; otherwise returns FALSE.
+ Returns true if the there was an error opening the database
+ connection; otherwise returns false.
*/
bool TQSqlDriver::isOpenError() const
@@ -178,8 +178,8 @@ bool TQSqlDriver::isOpenError() const
/*!
\fn bool TQSqlDriver::hasFeature( DriverFeature f ) const
- Returns TRUE if the driver supports feature \a f; otherwise
- returns FALSE.
+ Returns true if the driver supports feature \a f; otherwise
+ returns false.
Note that some databases need to be open() before this can be
determined.
@@ -206,8 +206,8 @@ void TQSqlDriver::setOpen( bool o )
/*!
Protected function which sets the open error state of the database
to \a e. Derived classes can use this function to report the
- status of open(). Note that if \a e is TRUE the open state of the
- database is set to closed (i.e. isOpen() returns FALSE).
+ status of open(). Note that if \a e is true the open state of the
+ database is set to closed (i.e. isOpen() returns false).
\sa open(), setOpenError()
*/
@@ -224,41 +224,41 @@ void TQSqlDriver::setOpenError( bool e )
/*!
Protected function which derived classes can reimplement to begin
- a transaction. If successful, return TRUE, otherwise return FALSE.
- The default implementation returns FALSE.
+ a transaction. If successful, return true, otherwise return false.
+ The default implementation returns false.
\sa commitTransaction(), rollbackTransaction()
*/
bool TQSqlDriver::beginTransaction()
{
- return FALSE;
+ return false;
}
/*!
Protected function which derived classes can reimplement to commit
- a transaction. If successful, return TRUE, otherwise return FALSE.
- The default implementation returns FALSE.
+ a transaction. If successful, return true, otherwise return false.
+ The default implementation returns false.
\sa beginTransaction(), rollbackTransaction()
*/
bool TQSqlDriver::commitTransaction()
{
- return FALSE;
+ return false;
}
/*!
Protected function which derived classes can reimplement to
- rollback a transaction. If successful, return TRUE, otherwise
- return FALSE. The default implementation returns FALSE.
+ rollback a transaction. If successful, return true, otherwise
+ return false. The default implementation returns false.
\sa beginTransaction(), commitTransaction()
*/
bool TQSqlDriver::rollbackTransaction()
{
- return FALSE;
+ return false;
}
/*!
@@ -387,7 +387,7 @@ TQString TQSqlDriver::nullText() const
in single quotation marks, which is appropriate for many SQL
databases. Any embedded single-quote characters are escaped
(replaced with two single-quote characters). If \a trimStrings is
- TRUE (the default is FALSE), all trailing whitespace is trimmed
+ true (the default is false), all trailing whitespace is trimmed
from the field.
\i If \a field is date/time data, the value is formatted in ISO
@@ -487,7 +487,7 @@ TQString TQSqlDriver::formatValue( const TQSqlField* field, bool trimStrings ) c
user, password \a password, host \a host, port \a port and
connection options \a connOpts.
- Returns TRUE on success and FALSE on failure.
+ Returns true on success and false on failure.
\sa setOpen()
*/
diff --git a/src/sql/tqsqldriver.h b/src/sql/tqsqldriver.h
index 34309ff37..2d041d9ca 100644
--- a/src/sql/tqsqldriver.h
+++ b/src/sql/tqsqldriver.h
@@ -88,7 +88,7 @@ public:
virtual TQSqlRecordInfo recordInfo( const TQString& tablename ) const;
virtual TQSqlRecordInfo recordInfo( const TQSqlQuery& query ) const;
virtual TQString nullText() const;
- virtual TQString formatValue( const TQSqlField* field, bool trimStrings = FALSE ) const;
+ virtual TQString formatValue( const TQSqlField* field, bool trimStrings = false ) const;
TQSqlError lastError() const;
virtual bool hasFeature( DriverFeature f ) const = 0;
diff --git a/src/sql/tqsqleditorfactory.cpp b/src/sql/tqsqleditorfactory.cpp
index 3598a7cac..0f8d202c6 100644
--- a/src/sql/tqsqleditorfactory.cpp
+++ b/src/sql/tqsqleditorfactory.cpp
@@ -178,7 +178,7 @@ TQWidget * TQSqlEditorFactory::createEditor( TQWidget * parent,
case TQVariant::CString:
case TQVariant::Double:
w = new TQLineEdit( parent, "qt_editor_double" );
- ((TQLineEdit*)w)->setFrame( FALSE );
+ ((TQLineEdit*)w)->setFrame( false );
break;
case TQVariant::Date:
w = new TQDateEdit( parent, "qt_editor_date" );
diff --git a/src/sql/tqsqlextension_p.cpp b/src/sql/tqsqlextension_p.cpp
index 6ad4251c3..4c1dd252b 100644
--- a/src/sql/tqsqlextension_p.cpp
+++ b/src/sql/tqsqlextension_p.cpp
@@ -52,12 +52,12 @@ TQSqlExtension::~TQSqlExtension()
bool TQSqlExtension::prepare( const TQString& /*query*/ )
{
- return FALSE;
+ return false;
}
bool TQSqlExtension::exec()
{
- return FALSE;
+ return false;
}
void TQSqlExtension::bindValue( const TQString& placeholder, const TQVariant& val, TQSql::ParameterType tp )
diff --git a/src/sql/tqsqlfield.cpp b/src/sql/tqsqlfield.cpp
index 7a99de333..b87f0d570 100644
--- a/src/sql/tqsqlfield.cpp
+++ b/src/sql/tqsqlfield.cpp
@@ -99,7 +99,7 @@
*/
TQSqlField::TQSqlField( const TQString& fieldName, TQVariant::Type type )
- : nm(fieldName), ro(FALSE), nul(FALSE)
+ : nm(fieldName), ro(false), nul(false)
{
d = new TQSqlFieldPrivate();
d->type = type;
@@ -132,8 +132,8 @@ TQSqlField& TQSqlField::operator=( const TQSqlField& other )
}
/*!
- Returns TRUE if the field is equal to \a other; otherwise returns
- FALSE. Fields are considered equal when the following field
+ Returns true if the field is equal to \a other; otherwise returns
+ false. Fields are considered equal when the following field
properties are the same:
\list
@@ -171,7 +171,7 @@ TQSqlField::~TQSqlField()
/*!
Sets the value of the field to \a value. If the field is read-only
- (isReadOnly() returns TRUE), nothing happens. If the data type of
+ (isReadOnly() returns true), nothing happens. If the data type of
\a value differs from the field's current data type, an attempt is
made to cast it to the proper type. This preserves the data type
of the field in the case of assignment, e.g. a TQString to an
@@ -199,14 +199,14 @@ void TQSqlField::setValue( const TQVariant& value )
val = value;
if ( value.isNull() )
- nul = TRUE;
+ nul = true;
else
nul = val.type() == TQVariant::Invalid;
}
/*!
Clears the value of the field. If the field is read-only, nothing
- happens. If \a nullify is TRUE (the default), the field is set to
+ happens. If \a nullify is true (the default), the field is set to
NULL.
*/
@@ -218,7 +218,7 @@ void TQSqlField::clear( bool nullify )
v.cast( type() );
val = v;
if ( nullify )
- nul = TRUE;
+ nul = true;
}
/*!
@@ -243,7 +243,7 @@ void TQSqlField::setName( const TQString& name )
void TQSqlField::setNull()
{
- clear( TRUE );
+ clear( true );
}
/*!
@@ -277,15 +277,15 @@ void TQSqlField::setReadOnly( bool readOnly )
/*!
\fn bool TQSqlField::isReadOnly() const
- Returns TRUE if the field's value is read only; otherwise returns
- FALSE.
+ Returns true if the field's value is read only; otherwise returns
+ false.
*/
/*!
\fn bool TQSqlField::isNull() const
- Returns TRUE if the field is currently NULL; otherwise returns
- FALSE.
+ Returns true if the field is currently NULL; otherwise returns
+ false.
*/
@@ -339,12 +339,12 @@ struct TQSqlFieldInfoPrivate
no default value or it cannot be determined.
\row \i \a typeID \i the internal typeID of the database system
(only useful for low-level programming). 0 if unknown.
- \row \i \a generated \i TRUE indicates that this field should be
+ \row \i \a generated \i true indicates that this field should be
included in auto-generated SQL statments, e.g. in TQSqlCursor.
- \row \i \a trim \i TRUE indicates that widgets should remove
+ \row \i \a trim \i true indicates that widgets should remove
trailing whitespace from character fields. This does not affect
the field value but only its representation inside widgets.
- \row \i \a calculated \i TRUE indicates that the value of this
+ \row \i \a calculated \i true indicates that the value of this
field is calculated. The value of calculated fields can by
modified by subclassing TQSqlCursor and overriding
TQSqlCursor::calculateField().
@@ -384,7 +384,7 @@ TQSqlFieldInfo::TQSqlFieldInfo( const TQSqlFieldInfo & other )
/*!
Creates a TQSqlFieldInfo object with the type and the name of the
- TQSqlField \a other. If \a generated is TRUE this field will be
+ TQSqlField \a other. If \a generated is true this field will be
included in auto-generated SQL statments, e.g. in TQSqlCursor.
*/
TQSqlFieldInfo::TQSqlFieldInfo( const TQSqlField & other, bool generated )
@@ -397,8 +397,8 @@ TQSqlFieldInfo::TQSqlFieldInfo( const TQSqlField & other, bool generated )
d->prec = -1;
d->typeID = 0;
d->generated = generated;
- d->trim = FALSE;
- d->calculated = FALSE;
+ d->trim = false;
+ d->calculated = false;
}
/*!
@@ -420,8 +420,8 @@ TQSqlFieldInfo& TQSqlFieldInfo::operator=( const TQSqlFieldInfo& other )
}
/*!
- Returns TRUE if this fieldinfo is equal to \a f; otherwise returns
- FALSE.
+ Returns true if this fieldinfo is equal to \a f; otherwise returns
+ false.
Two field infos are considered equal if all their attributes
match.
@@ -506,8 +506,8 @@ int TQSqlFieldInfo::typeID() const
{ return d->typeID; }
/*!
- Returns TRUE if the field should be included in auto-generated
- SQL statments, e.g. in TQSqlCursor; otherwise returns FALSE.
+ Returns true if the field should be included in auto-generated
+ SQL statments, e.g. in TQSqlCursor; otherwise returns false.
\sa setGenerated()
*/
@@ -515,8 +515,8 @@ bool TQSqlFieldInfo::isGenerated() const
{ return d->generated; }
/*!
- Returns TRUE if trailing whitespace should be removed from
- character fields; otherwise returns FALSE.
+ Returns true if trailing whitespace should be removed from
+ character fields; otherwise returns false.
\sa setTrim()
*/
@@ -524,7 +524,7 @@ bool TQSqlFieldInfo::isTrim() const
{ return d->trim; }
/*!
- Returns TRUE if the field is calculated; otherwise returns FALSE.
+ Returns true if the field is calculated; otherwise returns false.
\sa setCalculated()
*/
@@ -532,7 +532,7 @@ bool TQSqlFieldInfo::isCalculated() const
{ return d->calculated; }
/*!
- If \a trim is TRUE widgets should remove trailing whitespace from
+ If \a trim is true widgets should remove trailing whitespace from
character fields. This does not affect the field value but only
its representation inside widgets.
@@ -542,7 +542,7 @@ void TQSqlFieldInfo::setTrim( bool trim )
{ d->trim = trim; }
/*!
- \a gen set to FALSE indicates that this field should not appear
+ \a gen set to false indicates that this field should not appear
in auto-generated SQL statements (for example in TQSqlCursor).
\sa isGenerated()
@@ -551,7 +551,7 @@ void TQSqlFieldInfo::setGenerated( bool gen )
{ d->generated = gen; }
/*!
- \a calc set to TRUE indicates that this field is a calculated
+ \a calc set to true indicates that this field is a calculated
field. The value of calculated fields can by modified by subclassing
TQSqlCursor and overriding TQSqlCursor::calculateField().
diff --git a/src/sql/tqsqlfield.h b/src/sql/tqsqlfield.h
index 580fcd7df..898e9f498 100644
--- a/src/sql/tqsqlfield.h
+++ b/src/sql/tqsqlfield.h
@@ -77,7 +77,7 @@ public:
bool isNull() const;
virtual void setReadOnly( bool readOnly );
bool isReadOnly() const;
- void clear( bool nullify = TRUE );
+ void clear( bool nullify = true );
TQVariant::Type type() const;
private:
@@ -120,11 +120,11 @@ public:
int prec = -1,
const TQVariant& defValue = TQVariant(),
int sqlType = 0,
- bool generated = TRUE,
- bool trim = FALSE,
- bool calculated = FALSE );
+ bool generated = true,
+ bool trim = false,
+ bool calculated = false );
TQSqlFieldInfo( const TQSqlFieldInfo & other );
- TQSqlFieldInfo( const TQSqlField & other, bool generated = TRUE );
+ TQSqlFieldInfo( const TQSqlField & other, bool generated = true );
virtual ~TQSqlFieldInfo();
TQSqlFieldInfo& operator=( const TQSqlFieldInfo& other );
bool operator==( const TQSqlFieldInfo& f ) const;
diff --git a/src/sql/tqsqlform.cpp b/src/sql/tqsqlform.cpp
index c3da08e30..741df3a7a 100644
--- a/src/sql/tqsqlform.cpp
+++ b/src/sql/tqsqlform.cpp
@@ -52,7 +52,7 @@
class TQSqlFormPrivate
{
public:
- TQSqlFormPrivate() : propertyMap( 0 ), buf( 0 ), dirty( FALSE ) {}
+ TQSqlFormPrivate() : propertyMap( 0 ), buf( 0 ), dirty( false ) {}
~TQSqlFormPrivate() { if ( propertyMap ) delete propertyMap; }
TQStringList fld;
TQDict<TQWidget> wgt;
@@ -172,7 +172,7 @@ void TQSqlForm::installPropertyMap( TQSqlPropertyMap * pmap )
void TQSqlForm::setRecord( TQSqlRecord* buf )
{
- d->dirty = TRUE;
+ d->dirty = true;
d->buf = buf;
}
@@ -186,7 +186,7 @@ void TQSqlForm::setRecord( TQSqlRecord* buf )
void TQSqlForm::insert( TQWidget * widget, const TQString& field )
{
- d->dirty = TRUE;
+ d->dirty = true;
d->wgt.insert( field, widget );
d->fld += field;
}
@@ -199,7 +199,7 @@ void TQSqlForm::insert( TQWidget * widget, const TQString& field )
void TQSqlForm::remove( const TQString& field )
{
- d->dirty = TRUE;
+ d->dirty = true;
if ( d->fld.find( field ) != d->fld.end() )
d->fld.remove( d->fld.find( field ) );
d->wgt.remove( field );
@@ -229,8 +229,8 @@ void TQSqlForm::remove( TQWidget * widget )
/*!
Clears the values in all the widgets, and the fields they are
- mapped to, in the form. If \a nullify is TRUE (the default is
- FALSE), each field is also set to NULL.
+ mapped to, in the form. If \a nullify is true (the default is
+ false), each field is also set to NULL.
*/
void TQSqlForm::clearValues( bool nullify )
{
@@ -248,7 +248,7 @@ void TQSqlForm::clearValues( bool nullify )
*/
void TQSqlForm::clear()
{
- d->dirty = TRUE;
+ d->dirty = true;
d->fld.clear();
clearMap();
}
@@ -387,7 +387,7 @@ void TQSqlForm::sync()
insert( d->wgt[ d->fld[ i ] ], d->buf->field( d->fld[ i ] ) );
}
}
- d->dirty = FALSE;
+ d->dirty = false;
}
/*! \internal
diff --git a/src/sql/tqsqlform.h b/src/sql/tqsqlform.h
index cdd00b7cd..35fc0228f 100644
--- a/src/sql/tqsqlform.h
+++ b/src/sql/tqsqlform.h
@@ -87,7 +87,7 @@ public slots:
virtual void writeFields();
virtual void clear();
- virtual void clearValues( bool nullify = FALSE );
+ virtual void clearValues( bool nullify = false );
protected:
virtual void insert( TQWidget * widget, TQSqlField * field );
diff --git a/src/sql/tqsqlindex.cpp b/src/sql/tqsqlindex.cpp
index 0a8a8f5b5..750126a43 100644
--- a/src/sql/tqsqlindex.cpp
+++ b/src/sql/tqsqlindex.cpp
@@ -126,7 +126,7 @@ void TQSqlIndex::setName( const TQString& name )
void TQSqlIndex::append( const TQSqlField& field )
{
- append( field, FALSE );
+ append( field, false );
}
/*!
@@ -134,7 +134,7 @@ void TQSqlIndex::append( const TQSqlField& field )
Appends the field \a field to the list of indexed fields. The
field is appended with an ascending sort order, unless \a desc is
- TRUE.
+ true.
*/
void TQSqlIndex::append( const TQSqlField& field, bool desc )
@@ -145,19 +145,19 @@ void TQSqlIndex::append( const TQSqlField& field, bool desc )
/*!
- Returns TRUE if field \a i in the index is sorted in descending
- order; otherwise returns FALSE.
+ Returns true if field \a i in the index is sorted in descending
+ order; otherwise returns false.
*/
bool TQSqlIndex::isDescending( int i ) const
{
if ( sorts.at( i ) != sorts.end() )
return sorts[i];
- return FALSE;
+ return false;
}
/*!
- If \a desc is TRUE, field \a i is sorted in descending order.
+ If \a desc is true, field \a i is sorted in descending order.
Otherwise, field \a i is sorted in ascending order (the default).
If the field does not exist, nothing happens.
*/
@@ -180,19 +180,19 @@ void TQSqlIndex::setDescending( int i, bool desc )
"\a{prefix}.<fieldname>"
If \a sep is specified, each field is separated by \a sep. If \a
- verbose is TRUE (the default), each field contains a suffix
+ verbose is true (the default), each field contains a suffix
indicating an ASCending or DESCending sort order.
*/
TQString TQSqlIndex::toString( const TQString& prefix, const TQString& sep, bool verbose ) const
{
TQString s;
- bool comma = FALSE;
+ bool comma = false;
for ( uint i = 0; i < count(); ++i ) {
if( comma )
s += sep + " ";
s += createField( i, prefix, verbose );
- comma = TRUE;
+ comma = true;
}
return s;
}
@@ -207,7 +207,7 @@ TQString TQSqlIndex::toString( const TQString& prefix, const TQString& sep, bool
"\a{prefix}.<fieldname>"
- If \a verbose is TRUE (the default), each field contains a suffix
+ If \a verbose is true (the default), each field contains a suffix
indicating an ASCending or DESCending sort order.
Note that if you want to iterate over the list, you should iterate
@@ -233,7 +233,7 @@ TQStringList TQSqlIndex::toStringList( const TQString& prefix, bool verbose ) co
/*! \internal
Creates a string representing the field number \a i using prefix \a
- prefix. If \a verbose is TRUE, ASC or DESC is included in the field
+ prefix. If \a verbose is true, ASC or DESC is included in the field
description if the field is sorted in ASCending or DESCending order.
*/
@@ -263,11 +263,11 @@ TQSqlIndex TQSqlIndex::fromStringList( const TQStringList& l, const TQSqlCursor*
TQSqlIndex newSort;
for ( uint i = 0; i < l.count(); ++i ) {
TQString f = l[ i ];
- bool desc = FALSE;
+ bool desc = false;
if ( f.mid( f.length()-3 ) == "ASC" )
f = f.mid( 0, f.length()-3 );
if ( f.mid( f.length()-4 ) == "DESC" ) {
- desc = TRUE;
+ desc = true;
f = f.mid( 0, f.length()-4 );
}
int dot = f.findRev( '.' );
diff --git a/src/sql/tqsqlindex.h b/src/sql/tqsqlindex.h
index 066c693c1..cd3e7c5f3 100644
--- a/src/sql/tqsqlindex.h
+++ b/src/sql/tqsqlindex.h
@@ -80,9 +80,9 @@ public:
TQString toString( const TQString& prefix = TQString::null,
const TQString& sep = ",",
- bool verbose = TRUE ) const;
+ bool verbose = true ) const;
TQStringList toStringList( const TQString& prefix = TQString::null,
- bool verbose = TRUE ) const;
+ bool verbose = true ) const;
static TQSqlIndex fromStringList( const TQStringList& l, const TQSqlCursor* cursor );
diff --git a/src/sql/tqsqlmanager_p.cpp b/src/sql/tqsqlmanager_p.cpp
index 64345bde2..75f37d239 100644
--- a/src/sql/tqsqlmanager_p.cpp
+++ b/src/sql/tqsqlmanager_p.cpp
@@ -57,7 +57,7 @@ class TQSqlCursorManagerPrivate
{
public:
TQSqlCursorManagerPrivate()
- : cur( 0 ), autoDelete( FALSE )
+ : cur( 0 ), autoDelete( false )
{}
TQString ftr;
@@ -166,7 +166,7 @@ TQString TQSqlCursorManager::filter() const
/*! \internal
- Sets auto-delete to \a enable. If TRUE, the default cursor will
+ Sets auto-delete to \a enable. If true, the default cursor will
be deleted when necessary.
\sa autoDelete()
@@ -180,7 +180,7 @@ void TQSqlCursorManager::setAutoDelete( bool enable )
/*! \internal
- Returns TRUE if auto-deletion is enabled, otherwise FALSE.
+ Returns true if auto-deletion is enabled, otherwise false.
\sa setAutoDelete()
@@ -194,7 +194,7 @@ bool TQSqlCursorManager::autoDelete() const
/*! \internal
Sets the default cursor used by the manager to \a cursor. If \a
- autoDelete is TRUE (the default is FALSE), the manager takes
+ autoDelete is true (the default is false), the manager takes
ownership of the \a cursor pointer, which will be deleted when the
manager is destroyed, or when setCursor() is called again. To
activate the \a cursor use refresh().
@@ -229,7 +229,7 @@ TQSqlCursor* TQSqlCursorManager::cursor() const
/*! \internal
Refreshes the manager using the default cursor. The manager's
- filter and sort are applied. Returns TRUE on success, FALSE if an
+ filter and sort are applied. Returns true on success, false if an
error occurred or there is no current cursor.
\sa setFilter() setSort()
@@ -240,7 +240,7 @@ bool TQSqlCursorManager::refresh()
{
TQSqlCursor* cur = cursor();
if ( !cur )
- return FALSE;
+ return false;
TQString currentFilter = d->ftr;
TQStringList currentSort = d->srt;
TQSqlIndex newSort = TQSqlIndex::fromStringList( currentSort, cur );
@@ -249,20 +249,20 @@ bool TQSqlCursorManager::refresh()
/* \internal
- Returns TRUE if the \a buf field values that correspond to \a idx
+ Returns true if the \a buf field values that correspond to \a idx
match the field values in \a cur that correspond to \a idx.
*/
static bool index_matches( const TQSqlCursor* cur, const TQSqlRecord* buf,
const TQSqlIndex& idx )
{
- bool indexEquals = FALSE;
+ bool indexEquals = false;
for ( uint i = 0; i < idx.count(); ++i ) {
const TQString fn( idx.field(i)->name() );
if ( cur->value( fn ) == buf->value( fn ) )
- indexEquals = TRUE;
+ indexEquals = true;
else {
- indexEquals = FALSE;
+ indexEquals = false;
break;
}
}
@@ -352,16 +352,16 @@ bool TQSqlCursorManager::findBuffer( const TQSqlIndex& idx, int atHint )
#endif
TQSqlCursor* cur = cursor();
if ( !cur )
- return FALSE;
+ return false;
if ( !cur->isActive() )
- return FALSE;
+ return false;
if ( !idx.count() ) {
if ( cur->at() == TQSql::BeforeFirst )
cur->next();
- return FALSE;
+ return false;
}
TQSqlRecord* buf = cur->editBuffer();
- bool indexEquals = FALSE;
+ bool indexEquals = false;
#ifdef QT_DEBUG_DATAMANAGER
tqDebug(" Checking hint...");
#endif
@@ -402,7 +402,7 @@ bool TQSqlCursorManager::findBuffer( const TQSqlIndex& idx, int atHint )
if ( !cur->seek( mid ) )
break;
if ( index_matches( cur, buf, idx ) ) {
- indexEquals = TRUE;
+ indexEquals = true;
break;
}
int c = compare_recs( buf, cur, cur->sort() );
@@ -416,7 +416,7 @@ bool TQSqlCursorManager::findBuffer( const TQSqlIndex& idx, int atHint )
if ( !cur->seek( mid ) )
break;
if ( index_matches( cur, buf, idx ) ) {
- indexEquals = TRUE;
+ indexEquals = true;
break;
}
} while ( compare_recs( buf, cur, cur->sort() ) == 0 );
@@ -428,7 +428,7 @@ bool TQSqlCursorManager::findBuffer( const TQSqlIndex& idx, int atHint )
if ( !cur->seek( mid ) )
break;
if ( index_matches( cur, buf, idx ) ) {
- indexEquals = TRUE;
+ indexEquals = true;
break;
}
} while ( compare_recs( buf, cur, cur->sort() ) == 0 );
@@ -453,7 +453,7 @@ bool TQSqlCursorManager::findBuffer( const TQSqlIndex& idx, int atHint )
cur->seek( startIdx );
}
for ( ;; ) {
- indexEquals = FALSE;
+ indexEquals = false;
indexEquals = index_matches( cur, buf, idx );
if ( indexEquals )
break;
@@ -620,8 +620,8 @@ class TQDataManagerPrivate
{
public:
TQDataManagerPrivate()
- : mode( TQSql::None ), autoEd( TRUE ), confEdits( 3 ),
- confCancs( FALSE ) {}
+ : mode( TQSql::None ), autoEd( true ), confEdits( 3 ),
+ confCancs( false ) {}
TQSql::Op mode;
bool autoEd;
TQBitArray confEdits;
@@ -727,7 +727,7 @@ void TQDataManager::setAutoEdit( bool autoEdit )
/*! \internal
- Returns TRUE if auto-edit mode is enabled; otherwise returns FALSE.
+ Returns true if auto-edit mode is enabled; otherwise returns false.
*/
@@ -738,8 +738,8 @@ bool TQDataManager::autoEdit() const
/*! \internal
- If \a confirm is TRUE, all edit operations (inserts, updates and
- deletes) will be confirmed by the user. If \a confirm is FALSE (the
+ If \a confirm is true, all edit operations (inserts, updates and
+ deletes) will be confirmed by the user. If \a confirm is false (the
default), all edits are posted to the database immediately.
*/
@@ -750,8 +750,8 @@ void TQDataManager::setConfirmEdits( bool confirm )
/*! \internal
- If \a confirm is TRUE, all inserts will be confirmed by the user.
- If \a confirm is FALSE (the default), all edits are posted to the
+ If \a confirm is true, all inserts will be confirmed by the user.
+ If \a confirm is false (the default), all edits are posted to the
database immediately.
*/
@@ -763,8 +763,8 @@ void TQDataManager::setConfirmInsert( bool confirm )
/*! \internal
- If \a confirm is TRUE, all updates will be confirmed by the user.
- If \a confirm is FALSE (the default), all edits are posted to the
+ If \a confirm is true, all updates will be confirmed by the user.
+ If \a confirm is false (the default), all edits are posted to the
database immediately.
*/
@@ -776,8 +776,8 @@ void TQDataManager::setConfirmUpdate( bool confirm )
/*! \internal
- If \a confirm is TRUE, all deletes will be confirmed by the user.
- If \a confirm is FALSE (the default), all edits are posted to the
+ If \a confirm is true, all deletes will be confirmed by the user.
+ If \a confirm is false (the default), all edits are posted to the
database immediately.
*/
@@ -789,8 +789,8 @@ void TQDataManager::setConfirmDelete( bool confirm )
/*! \internal
- Returns TRUE if the table confirms all edit operations (inserts,
- updates and deletes), otherwise returns FALSE.
+ Returns true if the table confirms all edit operations (inserts,
+ updates and deletes), otherwise returns false.
*/
bool TQDataManager::confirmEdits() const
@@ -800,8 +800,8 @@ bool TQDataManager::confirmEdits() const
/*! \internal
- Returns TRUE if the table confirms inserts, otherwise returns
- FALSE.
+ Returns true if the table confirms inserts, otherwise returns
+ false.
*/
bool TQDataManager::confirmInsert() const
@@ -811,8 +811,8 @@ bool TQDataManager::confirmInsert() const
/*! \internal
- Returns TRUE if the table confirms updates, otherwise returns
- FALSE.
+ Returns true if the table confirms updates, otherwise returns
+ false.
*/
bool TQDataManager::confirmUpdate() const
@@ -822,8 +822,8 @@ bool TQDataManager::confirmUpdate() const
/*! \internal
- Returns TRUE if the table confirms deletes, otherwise returns
- FALSE.
+ Returns true if the table confirms deletes, otherwise returns
+ false.
*/
bool TQDataManager::confirmDelete() const
@@ -833,8 +833,8 @@ bool TQDataManager::confirmDelete() const
/*! \internal
- If \a confirm is TRUE, all cancels will be confirmed by the user
- through a message box. If \a confirm is FALSE (the default), all
+ If \a confirm is true, all cancels will be confirmed by the user
+ through a message box. If \a confirm is false (the default), all
cancels occur immediately.
*/
@@ -845,7 +845,7 @@ void TQDataManager::setConfirmCancels( bool confirm )
/*! \internal
- Returns TRUE if the table confirms cancels, otherwise returns FALSE.
+ Returns true if the table confirms cancels, otherwise returns false.
*/
bool TQDataManager::confirmCancels() const
diff --git a/src/sql/tqsqlmanager_p.h b/src/sql/tqsqlmanager_p.h
index 8b667d68e..fdad28abe 100644
--- a/src/sql/tqsqlmanager_p.h
+++ b/src/sql/tqsqlmanager_p.h
@@ -86,7 +86,7 @@ public:
TQStringList sort() const;
virtual void setFilter( const TQString& filter );
TQString filter() const;
- virtual void setCursor( TQSqlCursor* cursor, bool autoDelete = FALSE );
+ virtual void setCursor( TQSqlCursor* cursor, bool autoDelete = false );
TQSqlCursor* cursor() const;
virtual void setAutoDelete( bool enable );
diff --git a/src/sql/tqsqlquery.cpp b/src/sql/tqsqlquery.cpp
index 256694eee..394532d6e 100644
--- a/src/sql/tqsqlquery.cpp
+++ b/src/sql/tqsqlquery.cpp
@@ -99,11 +99,11 @@ void TQSqlResultShared::slotResultDestroyed()
(e.g. \c{SET DATESTYLE=ISO} for PostgreSQL).
Successfully executed SQL statements set the query's state to
- active (isActive() returns TRUE); otherwise the query's state is
+ active (isActive() returns true); otherwise the query's state is
set to inactive. In either case, when executing a new SQL
statement, the query is positioned on an invalid record; an active
query must be navigated to a valid record (so that isValid()
- returns TRUE) before values can be retrieved.
+ returns true) before values can be retrieved.
Navigating records is performed with the following functions:
@@ -288,7 +288,7 @@ void TQSqlQuery::init( const TQString& query, TQSqlDatabase* db )
d = new TQSqlResultShared( 0 );
TQSqlDatabase* database = db;
if ( !database )
- database = TQSqlDatabase::database( TQSqlDatabase::defaultConnection, FALSE );
+ database = TQSqlDatabase::database( TQSqlDatabase::defaultConnection, false );
if ( database )
*this = database->driver()->createQuery();
if ( !query.isNull() )
@@ -308,8 +308,8 @@ TQSqlQuery& TQSqlQuery::operator=( const TQSqlQuery& other )
}
/*!
- Returns TRUE if the query is active and positioned on a valid
- record and the \a field is NULL; otherwise returns FALSE. Note
+ Returns true if the query is active and positioned on a valid
+ record and the \a field is NULL; otherwise returns false. Note
that for some drivers isNull() will not return accurate
information until after an attempt is made to retrieve data.
@@ -319,16 +319,16 @@ TQSqlQuery& TQSqlQuery::operator=( const TQSqlQuery& other )
bool TQSqlQuery::isNull( int field ) const
{
if ( !d->sqlResult )
- return FALSE;
+ return false;
if ( d->sqlResult->isActive() && d->sqlResult->isValid() )
return d->sqlResult->isNull( field );
- return FALSE;
+ return false;
}
/*!
- Executes the SQL in \a query. Returns TRUE and sets the query
+ Executes the SQL in \a query. Returns true and sets the query
state to active if the query was successful; otherwise returns
- FALSE and sets the query state to inactive. The \a query string
+ false and sets the query state to inactive. The \a query string
must use syntax appropriate for the SQL database being queried,
for example, standard SQL.
@@ -345,17 +345,17 @@ bool TQSqlQuery::isNull( int field ) const
bool TQSqlQuery::exec ( const TQString& query )
{
if ( !d->sqlResult )
- return FALSE;
+ return false;
if ( d->sqlResult->extension() && driver()->hasFeature( TQSqlDriver::PreparedQueries ) )
d->sqlResult->extension()->clear();
- d->sqlResult->setActive( FALSE );
+ d->sqlResult->setActive( false );
d->sqlResult->setLastError( TQSqlError() );
d->sqlResult->setAt( TQSql::BeforeFirst );
if ( !driver() ) {
#ifdef QT_CHECK_RANGE
tqWarning("TQSqlQuery::exec: no driver" );
#endif
- return FALSE;
+ return false;
}
if ( d->count > 1 )
*this = driver()->createQuery();
@@ -365,13 +365,13 @@ bool TQSqlQuery::exec ( const TQString& query )
#ifdef QT_CHECK_RANGE
tqWarning("TQSqlQuery::exec: database not open" );
#endif
- return FALSE;
+ return false;
}
if ( query.isNull() || query.length() == 0 ) {
#ifdef QT_CHECK_RANGE
tqWarning("TQSqlQuery::exec: empty query" );
#endif
- return FALSE;
+ return false;
}
#ifdef QT_DEBUG_SQL
tqDebug( "\n TQSqlQuery: " + query );
@@ -462,38 +462,38 @@ const TQSqlResult* TQSqlQuery::result() const
Retrieves the record at position (offset) \a i, if available, and
positions the query on the retrieved record. The first record is
at position 0. Note that the query must be in an active state and
- isSelect() must return TRUE before calling this function.
+ isSelect() must return true before calling this function.
- If \a relative is FALSE (the default), the following rules apply:
+ If \a relative is false (the default), the following rules apply:
\list
\i If \a i is negative, the result is positioned before the
- first record and FALSE is returned.
+ first record and false is returned.
\i Otherwise, an attempt is made to move to the record at position
\a i. If the record at position \a i could not be retrieved, the
- result is positioned after the last record and FALSE is returned. If
- the record is successfully retrieved, TRUE is returned.
+ result is positioned after the last record and false is returned. If
+ the record is successfully retrieved, true is returned.
\endlist
- If \a relative is TRUE, the following rules apply:
+ If \a relative is true, the following rules apply:
\list
\i If the result is currently positioned before the first
record or on the first record, and \a i is negative, there is no
- change, and FALSE is returned.
+ change, and false is returned.
\i If the result is currently located after the last record, and
- \a i is positive, there is no change, and FALSE is returned.
+ \a i is positive, there is no change, and false is returned.
\i If the result is currently located somewhere in the middle,
and the relative offset \a i moves the result below zero, the
- result is positioned before the first record and FALSE is
+ result is positioned before the first record and false is
returned.
\i Otherwise, an attempt is made to move to the record \a i
records ahead of the current record (or \a i records behind the
current record if \a i is negative). If the record at offset \a i
could not be retrieved, the result is positioned after the last
record if \a i >= 0, (or before the first record if \a i is
- negative), and FALSE is returned. If the record is successfully
- retrieved, TRUE is returned.
+ negative), and false is returned. If the record is successfully
+ retrieved, true is returned.
\endlist
\sa next() prev() first() last() at() isActive() isValid()
@@ -501,7 +501,7 @@ const TQSqlResult* TQSqlQuery::result() const
bool TQSqlQuery::seek( int i, bool relative )
{
if ( !isSelect() || !isActive() )
- return FALSE;
+ return false;
beforeSeek();
checkDetach();
int actualIdx;
@@ -509,7 +509,7 @@ bool TQSqlQuery::seek( int i, bool relative )
if ( i < 0 ) {
d->sqlResult->setAt( TQSql::BeforeFirst );
afterSeek();
- return FALSE;
+ return false;
}
actualIdx = i;
} else {
@@ -519,7 +519,7 @@ bool TQSqlQuery::seek( int i, bool relative )
actualIdx = i;
else {
afterSeek();
- return FALSE;
+ return false;
}
break;
case TQSql::AfterLast:
@@ -528,14 +528,14 @@ bool TQSqlQuery::seek( int i, bool relative )
actualIdx = at() + i;
} else {
afterSeek();
- return FALSE;
+ return false;
}
break;
default:
if ( ( at() + i ) < 0 ) {
d->sqlResult->setAt( TQSql::BeforeFirst );
afterSeek();
- return FALSE;
+ return false;
}
actualIdx = at() + i;
break;
@@ -547,40 +547,40 @@ bool TQSqlQuery::seek( int i, bool relative )
tqWarning("TQSqlQuery::seek: cannot seek backwards in a forward only query" );
#endif
afterSeek();
- return FALSE;
+ return false;
}
if ( actualIdx == ( at() + 1 ) && at() != TQSql::BeforeFirst ) {
if ( !d->sqlResult->fetchNext() ) {
d->sqlResult->setAt( TQSql::AfterLast );
afterSeek();
- return FALSE;
+ return false;
}
afterSeek();
- return TRUE;
+ return true;
}
if ( actualIdx == ( at() - 1 ) ) {
if ( !d->sqlResult->fetchPrev() ) {
d->sqlResult->setAt( TQSql::BeforeFirst );
afterSeek();
- return FALSE;
+ return false;
}
afterSeek();
- return TRUE;
+ return true;
}
if ( !d->sqlResult->fetch( actualIdx ) ) {
d->sqlResult->setAt( TQSql::AfterLast );
afterSeek();
- return FALSE;
+ return false;
}
afterSeek();
- return TRUE;
+ return true;
}
/*!
Retrieves the next record in the result, if available, and
positions the query on the retrieved record. Note that the result
- must be in an active state and isSelect() must return TRUE before
- calling this function or it will do nothing and return FALSE.
+ must be in an active state and isSelect() must return true before
+ calling this function or it will do nothing and return false.
The following rules apply:
@@ -590,15 +590,15 @@ bool TQSqlQuery::seek( int i, bool relative )
made to retrieve the first record.
\i If the result is currently located after the last record,
- there is no change and FALSE is returned.
+ there is no change and false is returned.
\i If the result is located somewhere in the middle, an attempt
is made to retrieve the next record.
\endlist
If the record could not be retrieved, the result is positioned after
- the last record and FALSE is returned. If the record is successfully
- retrieved, TRUE is returned.
+ the last record and false is returned. If the record is successfully
+ retrieved, true is returned.
\sa prev() first() last() seek() at() isActive() isValid()
*/
@@ -606,10 +606,10 @@ bool TQSqlQuery::seek( int i, bool relative )
bool TQSqlQuery::next()
{
if ( !isSelect() || !isActive() )
- return FALSE;
+ return false;
beforeSeek();
checkDetach();
- bool b = FALSE;
+ bool b = false;
switch ( at() ) {
case TQSql::BeforeFirst:
b = d->sqlResult->fetchFirst();
@@ -617,29 +617,29 @@ bool TQSqlQuery::next()
return b;
case TQSql::AfterLast:
afterSeek();
- return FALSE;
+ return false;
default:
if ( !d->sqlResult->fetchNext() ) {
d->sqlResult->setAt( TQSql::AfterLast );
afterSeek();
- return FALSE;
+ return false;
}
afterSeek();
- return TRUE;
+ return true;
}
}
/*!
Retrieves the previous record in the result, if available, and
positions the query on the retrieved record. Note that the result
- must be in an active state and isSelect() must return TRUE before
- calling this function or it will do nothing and return FALSE.
+ must be in an active state and isSelect() must return true before
+ calling this function or it will do nothing and return false.
The following rules apply:
\list
\i If the result is currently located before the first record,
- there is no change and FALSE is returned.
+ there is no change and false is returned.
\i If the result is currently located after the last record, an
attempt is made to retrieve the last record.
@@ -649,8 +649,8 @@ bool TQSqlQuery::next()
\endlist
If the record could not be retrieved, the result is positioned
- before the first record and FALSE is returned. If the record is
- successfully retrieved, TRUE is returned.
+ before the first record and false is returned. If the record is
+ successfully retrieved, true is returned.
\sa next() first() last() seek() at() isActive() isValid()
*/
@@ -658,21 +658,21 @@ bool TQSqlQuery::next()
bool TQSqlQuery::prev()
{
if ( !isSelect() || !isActive() )
- return FALSE;
+ return false;
if ( isForwardOnly() ) {
#ifdef QT_CHECK_RANGE
tqWarning("TQSqlQuery::seek: cannot seek backwards in a forward only query" );
#endif
- return FALSE;
+ return false;
}
beforeSeek();
checkDetach();
- bool b = FALSE;
+ bool b = false;
switch ( at() ) {
case TQSql::BeforeFirst:
afterSeek();
- return FALSE;
+ return false;
case TQSql::AfterLast:
b = d->sqlResult->fetchLast();
afterSeek();
@@ -681,20 +681,20 @@ bool TQSqlQuery::prev()
if ( !d->sqlResult->fetchPrev() ) {
d->sqlResult->setAt( TQSql::BeforeFirst );
afterSeek();
- return FALSE;
+ return false;
}
afterSeek();
- return TRUE;
+ return true;
}
}
/*!
Retrieves the first record in the result, if available, and
positions the query on the retrieved record. Note that the result
- must be in an active state and isSelect() must return TRUE before
- calling this function or it will do nothing and return FALSE.
- Returns TRUE if successful. If unsuccessful the query position is
- set to an invalid position and FALSE is returned.
+ must be in an active state and isSelect() must return true before
+ calling this function or it will do nothing and return false.
+ Returns true if successful. If unsuccessful the query position is
+ set to an invalid position and false is returned.
\sa next() prev() last() seek() at() isActive() isValid()
*/
@@ -702,16 +702,16 @@ bool TQSqlQuery::prev()
bool TQSqlQuery::first()
{
if ( !isSelect() || !isActive() )
- return FALSE;
+ return false;
if ( isForwardOnly() && at() > TQSql::BeforeFirst ) {
#ifdef QT_CHECK_RANGE
tqWarning("TQSqlQuery::seek: cannot seek backwards in a forward only query" );
#endif
- return FALSE;
+ return false;
}
beforeSeek();
checkDetach();
- bool b = FALSE;
+ bool b = false;
b = d->sqlResult->fetchFirst();
afterSeek();
return b;
@@ -720,10 +720,10 @@ bool TQSqlQuery::first()
/*!
Retrieves the last record in the result, if available, and
positions the query on the retrieved record. Note that the result
- must be in an active state and isSelect() must return TRUE before
- calling this function or it will do nothing and return FALSE.
- Returns TRUE if successful. If unsuccessful the query position is
- set to an invalid position and FALSE is returned.
+ must be in an active state and isSelect() must return true before
+ calling this function or it will do nothing and return false.
+ Returns true if successful. If unsuccessful the query position is
+ set to an invalid position and false is returned.
\sa next() prev() first() seek() at() isActive() isValid()
*/
@@ -731,10 +731,10 @@ bool TQSqlQuery::first()
bool TQSqlQuery::last()
{
if ( !isSelect() || !isActive() )
- return FALSE;
+ return false;
beforeSeek();
checkDetach();
- bool b = FALSE;
+ bool b = false;
b = d->sqlResult->fetchLast();
afterSeek();
return b;
@@ -744,8 +744,8 @@ bool TQSqlQuery::last()
Returns the size of the result, (number of rows returned), or -1
if the size cannot be determined or if the database does not
support reporting information about query sizes. Note that for
- non-\c SELECT statements (isSelect() returns FALSE), size() will
- return -1. If the query is not active (isActive() returns FALSE),
+ non-\c SELECT statements (isSelect() returns false), size() will
+ return -1. If the query is not active (isActive() returns false),
-1 is returned.
To determine the number of rows affected by a non-SELECT
@@ -766,7 +766,7 @@ int TQSqlQuery::size() const
Returns the number of rows affected by the result's SQL statement,
or -1 if it cannot be determined. Note that for \c SELECT
statements, the value is undefined; see size() instead. If the
- query is not active (isActive() returns FALSE), -1 is returned.
+ query is not active (isActive() returns false), -1 is returned.
\sa size() TQSqlDriver::hasFeature()
*/
@@ -795,56 +795,56 @@ TQSqlError TQSqlQuery::lastError() const
}
/*!
- Returns TRUE if the query is currently positioned on a valid
- record; otherwise returns FALSE.
+ Returns true if the query is currently positioned on a valid
+ record; otherwise returns false.
*/
bool TQSqlQuery::isValid() const
{
if ( !d->sqlResult )
- return FALSE;
+ return false;
return d->sqlResult->isValid();
}
/*!
- Returns TRUE if the query is currently active; otherwise returns
- FALSE.
+ Returns true if the query is currently active; otherwise returns
+ false.
*/
bool TQSqlQuery::isActive() const
{
if ( !d->sqlResult )
- return FALSE;
+ return false;
return d->sqlResult->isActive();
}
/*!
- Returns TRUE if the current query is a \c SELECT statement;
- otherwise returns FALSE.
+ Returns true if the current query is a \c SELECT statement;
+ otherwise returns false.
*/
bool TQSqlQuery::isSelect() const
{
if ( !d->sqlResult )
- return FALSE;
+ return false;
return d->sqlResult->isSelect();
}
/*!
- Returns TRUE if you can only scroll \e forward through a result
- set; otherwise returns FALSE.
+ Returns true if you can only scroll \e forward through a result
+ set; otherwise returns false.
\sa setForwardOnly()
*/
bool TQSqlQuery::isForwardOnly() const
{
if ( !d->sqlResult )
- return FALSE;
+ return false;
return d->sqlResult->isForwardOnly();
}
/*!
- Sets forward only mode to \a forward. If forward is TRUE only
+ Sets forward only mode to \a forward. If forward is true only
next(), and seek() with positive values, are allowed for
navigating the results. Forward only mode needs far less memory
since results do not need to be cached.
@@ -885,9 +885,9 @@ bool TQSqlQuery::checkDetach()
TQString sql = d->sqlResult->lastQuery();
*this = driver()->createQuery();
exec( sql );
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -930,8 +930,8 @@ void TQSqlQuery::afterSeek()
bool TQSqlQuery::prepare( const TQString& query )
{
if ( !d->sqlResult || !d->sqlResult->extension() )
- return FALSE;
- d->sqlResult->setActive( FALSE );
+ return false;
+ d->sqlResult->setActive( false );
d->sqlResult->setLastError( TQSqlError() );
d->sqlResult->setAt( TQSql::BeforeFirst );
d->sqlResult->extension()->clear();
@@ -939,7 +939,7 @@ bool TQSqlQuery::prepare( const TQString& query )
#ifdef QT_CHECK_RANGE
tqWarning("TQSqlQuery::prepare: no driver" );
#endif
- return FALSE;
+ return false;
}
if ( d->count > 1 )
*this = driver()->createQuery();
@@ -948,13 +948,13 @@ bool TQSqlQuery::prepare( const TQString& query )
#ifdef QT_CHECK_RANGE
tqWarning("TQSqlQuery::prepare: database not open" );
#endif
- return FALSE;
+ return false;
}
if ( query.isNull() || query.length() == 0 ) {
#ifdef QT_CHECK_RANGE
tqWarning("TQSqlQuery::prepare: empty query" );
#endif
- return FALSE;
+ return false;
}
#ifdef QT_DEBUG_SQL
tqDebug( "\n TQSqlQuery: " + query );
@@ -997,15 +997,15 @@ bool TQSqlQuery::prepare( const TQString& query )
d->sqlResult->extension()->holders.append( Holder( rx.cap(0), i ) );
i += rx.matchedLength();
}
- return TRUE; // fake prepares should always succeed
+ return true; // fake prepares should always succeed
}
}
/*!
\overload
- Executes a previously prepared SQL query. Returns TRUE if the
- query executed successfully; otherwise returns FALSE.
+ Executes a previously prepared SQL query. Returns true if the
+ query executed successfully; otherwise returns false.
\sa prepare(), bindValue(), addBindValue()
*/
@@ -1013,7 +1013,7 @@ bool TQSqlQuery::exec()
{
bool ret;
if ( !d->sqlResult || !d->sqlResult->extension() )
- return FALSE;
+ return false;
if ( driver()->hasFeature( TQSqlDriver::PreparedQueries ) ) {
ret = d->sqlResult->extension()->exec();
} else {
diff --git a/src/sql/tqsqlquery.h b/src/sql/tqsqlquery.h
index 5220fa27a..70c6f4b20 100644
--- a/src/sql/tqsqlquery.h
+++ b/src/sql/tqsqlquery.h
@@ -96,7 +96,7 @@ public:
virtual bool exec ( const TQString& query );
virtual TQVariant value( int i ) const;
- virtual bool seek( int i, bool relative = FALSE );
+ virtual bool seek( int i, bool relative = false );
virtual bool next();
virtual bool prev();
virtual bool first();
diff --git a/src/sql/tqsqlrecord.cpp b/src/sql/tqsqlrecord.cpp
index fba3d9e63..72b8e4867 100644
--- a/src/sql/tqsqlrecord.cpp
+++ b/src/sql/tqsqlrecord.cpp
@@ -52,7 +52,7 @@ class TQSqlRecordPrivate
public:
class info {
public:
- info() : nogen(FALSE){}
+ info() : nogen(false){}
~info() {}
info( const info& other )
: field( other.field ), nogen( other.nogen )
@@ -225,9 +225,9 @@ bool TQSqlRecord::checkDetach()
if ( sh->count > 1 ) {
sh->deref();
sh = new TQSqlRecordShared( new TQSqlRecordPrivate( *sh->d ) );
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/*!
@@ -414,8 +414,8 @@ void TQSqlRecord::clear()
}
/*!
- Returns TRUE if there are no fields in the record; otherwise
- returns FALSE.
+ Returns true if there are no fields in the record; otherwise
+ returns false.
*/
bool TQSqlRecord::isEmpty() const
@@ -425,22 +425,22 @@ bool TQSqlRecord::isEmpty() const
/*!
- Returns TRUE if there is a field in the record called \a name;
- otherwise returns FALSE.
+ Returns true if there is a field in the record called \a name;
+ otherwise returns false.
*/
bool TQSqlRecord::contains( const TQString& name ) const
{
for ( uint i = 0; i < count(); ++i ) {
if ( fieldName(i).upper() == name.upper() )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/*!
Clears the value of all fields in the record. If \a nullify is
- TRUE, (the default is FALSE), each field is set to NULL.
+ true, (the default is false), each field is set to NULL.
*/
void TQSqlRecord::clearValues( bool nullify )
@@ -456,7 +456,7 @@ void TQSqlRecord::clearValues( bool nullify )
/*!
Sets the generated flag for the field called \a name to \a
generated. If the field does not exist, nothing happens. Only
- fields that have \a generated set to TRUE are included in the SQL
+ fields that have \a generated set to true are included in the SQL
that is generated, e.g. by TQSqlCursor.
\sa isGenerated()
@@ -494,7 +494,7 @@ bool TQSqlRecord::isNull( int i )
if ( f ) {
return f->isNull();
}
- return TRUE;
+ return true;
}
/*!
@@ -509,8 +509,8 @@ bool TQSqlRecord::isNull( const TQString& name )
/*!
\overload
- Returns TRUE if the field \a i is NULL or if there is no field at
- position \a i; otherwise returns FALSE.
+ Returns true if the field \a i is NULL or if there is no field at
+ position \a i; otherwise returns false.
\sa fieldName()
*/
@@ -520,12 +520,12 @@ bool TQSqlRecord::isNull( int i ) const
if ( f ) {
return f->isNull();
}
- return TRUE;
+ return true;
}
/*!
- Returns TRUE if the field called \a name is NULL or if there is no
- field called \a name; otherwise returns FALSE.
+ Returns true if the field called \a name is NULL or if there is no
+ field called \a name; otherwise returns false.
\sa position()
*/
@@ -560,8 +560,8 @@ void TQSqlRecord::setNull( const TQString& name )
/*!
- Returns TRUE if the record has a field called \a name and this
- field is to be generated (the default); otherwise returns FALSE.
+ Returns true if the record has a field called \a name and this
+ field is to be generated (the default); otherwise returns false.
\sa setGenerated()
*/
@@ -573,15 +573,15 @@ bool TQSqlRecord::isGenerated( const TQString& name ) const
/*!
\overload
- Returns TRUE if the record has a field at position \a i and this
- field is to be generated (the default); otherwise returns FALSE.
+ Returns true if the record has a field at position \a i and this
+ field is to be generated (the default); otherwise returns false.
\sa setGenerated()
*/
bool TQSqlRecord::isGenerated( int i ) const
{
if ( !field( i ) )
- return FALSE;
+ return false;
return !sh->d->fieldInfo( i )->nogen;
}
@@ -601,13 +601,13 @@ bool TQSqlRecord::isGenerated( int i ) const
TQString TQSqlRecord::toString( const TQString& prefix, const TQString& sep ) const
{
TQString pflist;
- bool comma = FALSE;
+ bool comma = false;
for ( uint i = 0; i < count(); ++i ){
if ( isGenerated( field(i)->name() ) ) {
if( comma )
pflist += sep + " ";
pflist += createField( i, prefix );
- comma = TRUE;
+ comma = true;
}
}
return pflist;
@@ -617,7 +617,7 @@ TQString TQSqlRecord::toString( const TQString& prefix, const TQString& sep ) co
Returns a list of all the record's field names, each having the
prefix \a prefix.
- Note that fields which have generated set to FALSE are \e not
+ Note that fields which have generated set to false are \e not
included. (See \l{isGenerated()}). If \a prefix is supplied, e.g.
a table name, all fields are prefixed in the form:
diff --git a/src/sql/tqsqlrecord.h b/src/sql/tqsqlrecord.h
index bf0d981d8..cc77dcb78 100644
--- a/src/sql/tqsqlrecord.h
+++ b/src/sql/tqsqlrecord.h
@@ -98,7 +98,7 @@ public:
bool isEmpty() const;
bool contains( const TQString& name ) const;
virtual void clear();
- virtual void clearValues( bool nullify = FALSE );
+ virtual void clearValues( bool nullify = false );
uint count() const;
virtual TQString toString( const TQString& prefix = TQString::null,
const TQString& sep = "," ) const;
diff --git a/src/sql/tqsqlresult.cpp b/src/sql/tqsqlresult.cpp
index 05559290e..fc32b46d3 100644
--- a/src/sql/tqsqlresult.cpp
+++ b/src/sql/tqsqlresult.cpp
@@ -76,13 +76,13 @@ public:
db. The object is initialized to an inactive state.
*/
-TQSqlResult::TQSqlResult( const TQSqlDriver * db ): forwardOnly( FALSE )
+TQSqlResult::TQSqlResult( const TQSqlDriver * db ): forwardOnly( false )
{
d = new TQSqlResultPrivate();
d->sqldriver = db;
d->idx = TQSql::BeforeFirst;
- d->isSel = FALSE;
- d->active = FALSE;
+ d->isSel = false;
+ d->active = false;
d->ext = new TQSqlExtension();
}
@@ -127,28 +127,27 @@ int TQSqlResult::at() const
/*!
- Returns TRUE if the result is positioned on a valid record (that
+ Returns true if the result is positioned on a valid record (that
is, the result is not positioned before the first or after the
- last record); otherwise returns FALSE.
+ last record); otherwise returns false.
*/
bool TQSqlResult::isValid() const
{
- return ( d->idx != TQSql::BeforeFirst && \
- d->idx != TQSql::AfterLast ) ? TRUE : FALSE;
+ return (d->idx != TQSql::BeforeFirst && d->idx != TQSql::AfterLast);
}
/*!
\fn bool TQSqlResult::isNull( int i )
- Returns TRUE if the field at position \a i is NULL; otherwise
- returns FALSE.
+ Returns true if the field at position \a i is NULL; otherwise
+ returns false.
*/
/*!
- Returns TRUE if the result has records to be retrieved; otherwise
- returns FALSE.
+ Returns true if the result has records to be retrieved; otherwise
+ returns false.
*/
bool TQSqlResult::isActive() const
@@ -172,8 +171,8 @@ void TQSqlResult::setAt( int at )
/*!
Protected function provided for derived classes to indicate
whether or not the current statement is a SQL SELECT statement.
- The \a s parameter should be TRUE if the statement is a SELECT
- statement, or FALSE otherwise.
+ The \a s parameter should be true if the statement is a SELECT
+ statement, or false otherwise.
*/
void TQSqlResult::setSelect( bool s )
@@ -182,8 +181,8 @@ void TQSqlResult::setSelect( bool s )
}
/*!
- Returns TRUE if the current result is from a SELECT statement;
- otherwise returns FALSE.
+ Returns true if the current result is from a SELECT statement;
+ otherwise returns false.
*/
bool TQSqlResult::isSelect() const
@@ -265,8 +264,8 @@ TQSqlError TQSqlResult::lastError() const
apply the \a query to the database. This function is called only
after the result is set to an inactive state and is positioned
before the first record of the new result. Derived classes should
- return TRUE if the query was successful and ready to be used,
- or FALSE otherwise.
+ return true if the query was successful and ready to be used,
+ or false otherwise.
*/
/*!
@@ -275,8 +274,8 @@ TQSqlError TQSqlResult::lastError() const
Positions the result to an arbitrary (zero-based) index \a i. This
function is only called if the result is in an active state. Derived
classes must reimplement this function and position the result to the
- index \a i, and call setAt() with an appropriate value. Return TRUE
- to indicate success, or FALSE to signify failure.
+ index \a i, and call setAt() with an appropriate value. Return true
+ to indicate success, or false to signify failure.
*/
/*!
@@ -286,7 +285,7 @@ TQSqlError TQSqlResult::lastError() const
function is only called if the result is in an active state.
Derived classes must reimplement this function and position the result
to the first record, and call setAt() with an appropriate value.
- Return TRUE to indicate success, or FALSE to signify failure.
+ Return true to indicate success, or false to signify failure.
*/
/*!
@@ -296,7 +295,7 @@ TQSqlError TQSqlResult::lastError() const
function is only called if the result is in an active state.
Derived classes must reimplement this function and position the result
to the last record, and call setAt() with an appropriate value.
- Return TRUE to indicate success, or FALSE to signify failure.
+ Return true to indicate success, or false to signify failure.
*/
/*!
@@ -305,7 +304,7 @@ TQSqlError TQSqlResult::lastError() const
The default implementation calls fetch() with the next index.
Derived classes can reimplement this function and position the result
to the next record in some other way, and call setAt() with an
- appropriate value. Return TRUE to indicate success, or FALSE to
+ appropriate value. Return true to indicate success, or false to
signify failure.
*/
@@ -320,7 +319,7 @@ bool TQSqlResult::fetchNext()
state. The default implementation calls fetch() with the previous
index. Derived classes can reimplement this function and position the
result to the next record in some other way, and call setAt() with
- an appropriate value. Return TRUE to indicate success, or FALSE to
+ an appropriate value. Return true to indicate success, or false to
signify failure.
*/
@@ -330,8 +329,8 @@ bool TQSqlResult::fetchPrev()
}
/*!
- Returns TRUE if you can only scroll forward through a result set;
- otherwise returns FALSE.
+ Returns true if you can only scroll forward through a result set;
+ otherwise returns false.
*/
bool TQSqlResult::isForwardOnly() const
{
@@ -339,7 +338,7 @@ bool TQSqlResult::isForwardOnly() const
}
/*!
- Sets forward only mode to \a forward. If forward is TRUE only
+ Sets forward only mode to \a forward. If forward is true only
fetchNext() is allowed for navigating the results. Forward only
mode needs far less memory since results do not have to be cached.
forward only mode is off by default.
diff --git a/src/sql/tqsqlselectcursor.cpp b/src/sql/tqsqlselectcursor.cpp
index 77d0548ce..57a4a43ab 100644
--- a/src/sql/tqsqlselectcursor.cpp
+++ b/src/sql/tqsqlselectcursor.cpp
@@ -46,7 +46,7 @@
class TQSqlSelectCursorPrivate
{
public:
- TQSqlSelectCursorPrivate() : populated( FALSE ) {}
+ TQSqlSelectCursorPrivate() : populated( false ) {}
TQString query;
bool populated : 1;
};
@@ -72,7 +72,7 @@ public:
...
TQSqlSelectCursor* cur = new TQSqlSelectCursor( "SELECT id, firstname, lastname FROM author" );
TQDataTable* table = new TQDataTable( this );
- table->setSqlCursor( cur, TRUE, TRUE );
+ table->setSqlCursor( cur, true, true );
table->refresh();
...
cur->exec( "SELECT * FROM books" );
@@ -85,7 +85,7 @@ public:
Constructs a read only cursor on database \a db using the query \a query.
*/
TQSqlSelectCursor::TQSqlSelectCursor( const TQString& query, TQSqlDatabase* db )
- : TQSqlCursor( TQString::null, FALSE, db )
+ : TQSqlCursor( TQString::null, false, db )
{
d = new TQSqlSelectCursorPrivate;
d->query = query;
@@ -140,7 +140,7 @@ void TQSqlSelectCursor::populateCursor()
TQSqlRecordInfo inf = driver()->recordInfo( *(TQSqlQuery*)this );
for ( TQSqlRecordInfo::const_iterator it = inf.begin(); it != inf.end(); ++it )
TQSqlCursor::append( *it );
- d->populated = TRUE;
+ d->populated = true;
}
/*! \fn TQSqlIndex TQSqlSelectCursor::primaryIndex( bool ) const
diff --git a/src/sql/tqsqlselectcursor.h b/src/sql/tqsqlselectcursor.h
index 13069ee6a..37a3b9190 100644
--- a/src/sql/tqsqlselectcursor.h
+++ b/src/sql/tqsqlselectcursor.h
@@ -65,7 +65,7 @@ public:
bool select() { return TQSqlCursor::select(); }
protected:
- TQSqlIndex primaryIndex( bool = TRUE ) const { return TQSqlIndex(); }
+ TQSqlIndex primaryIndex( bool = true ) const { return TQSqlIndex(); }
TQSqlIndex index( const TQStringList& ) const { return TQSqlIndex(); }
TQSqlIndex index( const TQString& ) const { return TQSqlIndex(); }
TQSqlIndex index( const char* ) const { return TQSqlIndex(); }
@@ -76,20 +76,20 @@ protected:
void clear() {}
void setGenerated( const TQString&, bool ) {}
void setGenerated( int, bool ) {}
- TQSqlRecord* editBuffer( bool = FALSE ) { return 0; }
+ TQSqlRecord* editBuffer( bool = false ) { return 0; }
TQSqlRecord* primeInsert() { return 0; }
TQSqlRecord* primeUpdate() { return 0; }
TQSqlRecord* primeDelete() { return 0; }
- int insert( bool = TRUE ) { return 0; }
- int update( bool = TRUE ) { return 0; }
- int del( bool = TRUE ) { return 0; }
+ int insert( bool = true ) { return 0; }
+ int update( bool = true ) { return 0; }
+ int del( bool = true ) { return 0; }
void setMode( int ) {}
void setSort( const TQSqlIndex& ) {}
TQSqlIndex sort() const { return TQSqlIndex(); }
void setFilter( const TQString& ) {}
TQString filter() const { return TQString::null; }
- void setName( const TQString&, bool = TRUE ) {}
+ void setName( const TQString&, bool = true ) {}
TQString name() const { return TQString::null; }
TQString toString( const TQString& = TQString::null, const TQString& = "," ) const { return TQString::null; }
bool select( const TQString &, const TQSqlIndex& = TQSqlIndex() );
diff --git a/src/styles/tqcdestyle.cpp b/src/styles/tqcdestyle.cpp
index 2c3b103da..61b39ed4f 100644
--- a/src/styles/tqcdestyle.cpp
+++ b/src/styles/tqcdestyle.cpp
@@ -68,7 +68,7 @@
/*!
Constructs a TQCDEStyle.
- If \a useHighlightCols is FALSE (the default), then the style will
+ If \a useHighlightCols is false (the default), then the style will
polish the application's color palette to emulate the Motif way of
highlighting, which is a simple inversion between the base and the
text color.
@@ -125,7 +125,7 @@ void TQCDEStyle::drawControl( ControlElement element,
case CE_MenuBarItem:
{
if ( how & Style_Active ) // active item
- qDrawShadePanel( p, r, cg, TRUE, 1,
+ qDrawShadePanel( p, r, cg, true, 1,
&cg.brush( TQColorGroup::Button ) );
else // other item
p->fillRect( r, cg.brush( TQColorGroup::Button ) );
@@ -341,7 +341,7 @@ void TQCDEStyle::drawPrimitive( PrimitiveElement pe,
p->setPen( pen );
p->setBrush( brush );
- p->setWorldMatrix( matrix, TRUE ); // set transformation matrix
+ p->setWorldMatrix( matrix, true ); // set transformation matrix
p->drawPolygon( bFill ); // fill arrow
p->setBrush( NoBrush ); // don't fill
diff --git a/src/styles/tqcdestyle.h b/src/styles/tqcdestyle.h
index 200360bd5..c31559ea7 100644
--- a/src/styles/tqcdestyle.h
+++ b/src/styles/tqcdestyle.h
@@ -59,7 +59,7 @@ class TQ_EXPORT_STYLE_CDE TQCDEStyle : public TQMotifStyle
TQ_OBJECT
public:
- TQCDEStyle( bool useHighlightCols = FALSE );
+ TQCDEStyle( bool useHighlightCols = false );
virtual ~TQCDEStyle();
int pixelMetric( PixelMetric metric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget = 0 ) const;
diff --git a/src/styles/tqcommonstyle.cpp b/src/styles/tqcommonstyle.cpp
index a18604f48..bf1001a7d 100644
--- a/src/styles/tqcommonstyle.cpp
+++ b/src/styles/tqcommonstyle.cpp
@@ -963,7 +963,7 @@ void TQCommonStyle::drawPrimitive( PrimitiveElement pe,
break;
case PE_StatusBarSection:
- qDrawShadeRect( p, r, cg, TRUE, 1, 0, 0 );
+ qDrawShadeRect( p, r, cg, true, 1, 0, 0 );
break;
case PE_ButtonCommand:
@@ -1162,14 +1162,14 @@ void TQCommonStyle::drawPrimitive( PrimitiveElement pe,
int lw = opt.isDefault() ? pixelMetric(PM_DockWindowFrameWidth, ceData, elementFlags)
: opt.lineWidth();
- qDrawShadePanel(p, r, cg, FALSE, lw);
+ qDrawShadePanel(p, r, cg, false, lw);
break; }
case PE_PanelMenuBar: {
int lw = opt.isDefault() ? pixelMetric(PM_MenuBarFrameWidth, ceData, elementFlags)
: opt.lineWidth();
- qDrawShadePanel(p, r, cg, FALSE, lw, &cg.brush(TQColorGroup::Button));
+ qDrawShadePanel(p, r, cg, false, lw, &cg.brush(TQColorGroup::Button));
break; }
case PE_SizeGrip: {
@@ -1555,7 +1555,7 @@ void TQCommonStyle::drawControl( ControlElement element,
}
#endif // TQT_NO_TOOLBOX
case CE_ProgressBarGroove:
- qDrawShadePanel(p, r, cg, TRUE, 1, &cg.brush(TQColorGroup::Background));
+ qDrawShadePanel(p, r, cg, true, 1, &cg.brush(TQColorGroup::Background));
break;
#ifndef TQT_NO_PROGRESSBAR
@@ -1726,14 +1726,14 @@ void TQCommonStyle::drawControl( ControlElement element,
pr.addCoords( 0, 1, 0, -fh-3 );
tr.addCoords( 0, pr.bottom(), 0, -3 );
pr.moveBy(shiftX, shiftY);
- drawItem( p, pr, AlignCenter, cg, TRUE, &pm, TQString::null );
+ drawItem( p, pr, AlignCenter, cg, true, &pm, TQString::null );
alignment |= AlignCenter;
} else {
pr.setWidth( pm.width() + 8 );
tr.addCoords( pr.right(), 0, 0, 0 );
pr.moveBy(shiftX, shiftY);
- drawItem( p, pr, AlignCenter, cg, TRUE, &pm, TQString::null );
+ drawItem( p, pr, AlignCenter, cg, true, &pm, TQString::null );
alignment |= AlignLeft | AlignVCenter;
}
@@ -1743,7 +1743,7 @@ void TQCommonStyle::drawControl( ControlElement element,
ceData.textLabel.length(), &btext);
} else {
rect.moveBy(shiftX, shiftY);
- drawItem( p, rect, AlignCenter, cg, TRUE, &pm, TQString::null );
+ drawItem( p, rect, AlignCenter, cg, true, &pm, TQString::null );
}
}
}
@@ -2330,7 +2330,7 @@ void TQCommonStyle::drawComplexControl( ComplexControl control,
}
TQRect ir;
- bool down = FALSE;
+ bool down = false;
TQPixmap pm;
if ( controls & SC_TitleBarCloseButton ) {
@@ -2351,7 +2351,7 @@ void TQCommonStyle::drawComplexControl( ComplexControl control,
if( down )
p->translate( pixelMetric(PM_ButtonShiftHorizontal, ceData, elementFlags, widget),
pixelMetric(PM_ButtonShiftVertical, ceData, elementFlags, widget) );
- drawItem( p, ir, AlignCenter, ceData.colorGroup, TRUE, &pm, TQString::null );
+ drawItem( p, ir, AlignCenter, ceData.colorGroup, true, &pm, TQString::null );
p->restore();
}
@@ -2368,7 +2368,7 @@ void TQCommonStyle::drawComplexControl( ComplexControl control,
if( down )
p->translate( pixelMetric(PM_ButtonShiftHorizontal, ceData, elementFlags, widget),
pixelMetric(PM_ButtonShiftVertical, ceData, elementFlags, widget) );
- drawItem( p, ir, AlignCenter, ceData.colorGroup, TRUE, &pm, TQString::null );
+ drawItem( p, ir, AlignCenter, ceData.colorGroup, true, &pm, TQString::null );
p->restore();
}
@@ -2389,7 +2389,7 @@ void TQCommonStyle::drawComplexControl( ComplexControl control,
if( down )
p->translate( pixelMetric(PM_ButtonShiftHorizontal, ceData, elementFlags, widget),
pixelMetric(PM_ButtonShiftVertical, ceData, elementFlags, widget) );
- drawItem( p, ir, AlignCenter, ceData.colorGroup, TRUE, &pm, TQString::null );
+ drawItem( p, ir, AlignCenter, ceData.colorGroup, true, &pm, TQString::null );
p->restore();
}
@@ -2404,7 +2404,7 @@ void TQCommonStyle::drawComplexControl( ComplexControl control,
if( down )
p->translate( pixelMetric(PM_ButtonShiftHorizontal, ceData, elementFlags, widget),
pixelMetric(PM_ButtonShiftVertical, ceData, elementFlags, widget) );
- drawItem( p, ir, AlignCenter, ceData.colorGroup, TRUE, &pm, TQString::null );
+ drawItem( p, ir, AlignCenter, ceData.colorGroup, true, &pm, TQString::null );
p->restore();
}
@@ -2419,7 +2419,7 @@ void TQCommonStyle::drawComplexControl( ComplexControl control,
if( down )
p->translate( pixelMetric(PM_ButtonShiftHorizontal, ceData, elementFlags, widget),
pixelMetric(PM_ButtonShiftVertical, ceData, elementFlags, widget) );
- drawItem( p, ir, AlignCenter, ceData.colorGroup, TRUE, &pm, TQString::null );
+ drawItem( p, ir, AlignCenter, ceData.colorGroup, true, &pm, TQString::null );
p->restore();
}
}
@@ -2427,7 +2427,7 @@ void TQCommonStyle::drawComplexControl( ComplexControl control,
if ( controls & SC_TitleBarSysMenu ) {
if ( !ceData.icon.isNull() ) {
ir = visualRect( querySubControlMetrics( CC_TitleBar, ceData, elementFlags, SC_TitleBarSysMenu, TQStyleOption::Default, widget ), ceData, elementFlags );
- drawItem( p, ir, AlignCenter, ceData.colorGroup, TRUE, (ceData.icon.isNull())?NULL:&ceData.icon, TQString::null );
+ drawItem( p, ir, AlignCenter, ceData.colorGroup, true, (ceData.icon.isNull())?NULL:&ceData.icon, TQString::null );
}
}
#endif
@@ -2441,7 +2441,7 @@ void TQCommonStyle::drawComplexControl( ComplexControl control,
PrimitiveElement pe;
if ( controls & SC_SpinWidgetFrame )
- qDrawWinPanel( p, r, cg, TRUE ); //cstyle == Sunken );
+ qDrawWinPanel( p, r, cg, true ); //cstyle == Sunken );
if ( controls & SC_SpinWidgetUp ) {
flags = Style_Default | Style_Enabled;
diff --git a/src/styles/tqcompactstyle.cpp b/src/styles/tqcompactstyle.cpp
index 440c379e4..83a6c8656 100644
--- a/src/styles/tqcompactstyle.cpp
+++ b/src/styles/tqcompactstyle.cpp
@@ -331,9 +331,9 @@ void TQCompactStyle::drawPrimitive( PrimitiveElement pe,
int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, NULL, NULL);
if ( act && !dis ) {
- qDrawShadePanel( p, x, y, checkcol, h, cg, TRUE, 1, &cg.brush( TQColorGroup::Button ) );
+ qDrawShadePanel( p, x, y, checkcol, h, cg, true, 1, &cg.brush( TQColorGroup::Button ) );
} else {
- qDrawShadePanel( p, x, y, checkcol, h, cg, TRUE, 1, &cg.brush( TQColorGroup::Midlight ) );
+ qDrawShadePanel( p, x, y, checkcol, h, cg, true, 1, &cg.brush( TQColorGroup::Midlight ) );
}
}
break;
@@ -341,7 +341,7 @@ void TQCompactStyle::drawPrimitive( PrimitiveElement pe,
{
int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, NULL, NULL);
- qDrawShadePanel( p, x, y, checkcol, h, cg, FALSE, 1, &cg.brush( TQColorGroup::Button ) );
+ qDrawShadePanel( p, x, y, checkcol, h, cg, false, 1, &cg.brush( TQColorGroup::Button ) );
}
break;
case PE_MenuItemIndicatorCheck:
diff --git a/src/styles/tqinterlacestyle.cpp b/src/styles/tqinterlacestyle.cpp
index a0cd70c58..01e166a7a 100644
--- a/src/styles/tqinterlacestyle.cpp
+++ b/src/styles/tqinterlacestyle.cpp
@@ -74,7 +74,7 @@
*/
TQInterlaceStyle::TQInterlaceStyle() : TQMotifStyle()
{
- setUseHighlightColors( TRUE );
+ setUseHighlightColors( true );
}
/*! \reimp
@@ -133,7 +133,7 @@ void TQInterlaceStyle::polish( TQApplication *app)
dcg.setColor( TQColorGroup::ButtonText, low );
dcg.setColor( TQColorGroup::Text, low );
- app->setPalette( TQPalette( cg, dcg, cg ), TRUE );
+ app->setPalette( TQPalette( cg, dcg, cg ), true );
}
/*!
@@ -141,7 +141,7 @@ void TQInterlaceStyle::polish( TQApplication *app)
*/
void TQInterlaceStyle::unPolish( TQApplication *app)
{
- app->setPalette(oldPalette, TRUE);
+ app->setPalette(oldPalette, true);
}
/*!
@@ -162,7 +162,7 @@ void TQInterlaceStyle::polish( TQWidget* w)
if ( w->inherits("TQGroupBox")
|| w->inherits("TQTabWidget")
|| w->inherits("TQPushButton") ) {
- w->setAutoMask( TRUE );
+ w->setAutoMask( true );
return;
}
if (w->inherits("TQLabel")
@@ -220,7 +220,7 @@ void TQInterlaceStyle::unPolish( TQWidget* w)
if ( w->inherits("TQGroupBox")
|| w->inherits("TQTabWidget")
|| w->inherits("TQPushButton" ) ) {
- w->setAutoMask( FALSE );
+ w->setAutoMask( false );
return;
}
if (w->inherits("TQLabel")
@@ -313,7 +313,7 @@ void TQInterlaceStyle::drawButtonMask( TQPainter * p, int x, int y, int w, int h
TQBrush fill( color1 );
TQColorGroup cg;
cg.setBrush( TQColorGroup::Dark, color1 );
- drawButton( p, x, y, w, h, cg, FALSE, &fill );
+ drawButton( p, x, y, w, h, cg, false, &fill );
}
/*!
@@ -341,11 +341,11 @@ void TQInterlaceStyle::drawPushButton( TQPushButton* btn, TQPainter *p)
if ( btn->hasFocus() )
g.setBrush( TQColorGroup::Dark, black );
- drawButton( p, x1, y1, x2-x1+1, y2-y1+1, g, FALSE, &fill );
+ drawButton( p, x1, y1, x2-x1+1, y2-y1+1, g, false, &fill );
if ( btn->isMenuButton() ) {
int dx = (y1-y2-4)/3;
- drawArrow( p, DownArrow, FALSE,
+ drawArrow( p, DownArrow, false,
x2 - dx, dx, y1, y2 - y1,
g, btn->isEnabled() );
}
@@ -382,7 +382,7 @@ void TQInterlaceStyle::drawIndicator( TQPainter * p, int x, int y, int w, int h,
else
fill = g.brush( enabled ? TQColorGroup::Base : TQColorGroup::Background );
- drawButton( p, x, y, w, h, g, FALSE, &fill );
+ drawButton( p, x, y, w, h, g, false, &fill );
if ( s != TQButton::Off ) {
TQPointArray a( 7*2 );
@@ -522,9 +522,9 @@ void TQInterlaceStyle::drawComboButton( TQPainter *p, int x, int y, int w, int h
int awh, ax, ay, sh, sy, dh, ew;
get_combo_parameters( buttonRect(x,y,w,h), ew, awh, ax, ay, sh, dh, sy );
- drawButton( p, x, y, w, h, g, FALSE, &fill );
+ drawButton( p, x, y, w, h, g, false, &fill );
- qDrawArrow( p, DownArrow, MotifStyle, FALSE, ax, ay, awh, awh, g, TRUE );
+ qDrawArrow( p, DownArrow, MotifStyle, false, ax, ay, awh, awh, g, true );
p->setPen( g.dark() );
p->drawRect( ax+1, sy+1, awh-1, sh-1 );
@@ -626,7 +626,7 @@ void TQInterlaceStyle::drawScrollBarControls( TQPainter* p, const TQScrollBar* s
}
if ( controls == (AddLine | SubLine | AddPage | SubPage | Slider | First | Last ) )
- drawPanel( p, 0, 0, sb->width(), sb->height(), g, FALSE, 2, &fill );
+ drawPanel( p, 0, 0, sb->width(), sb->height(), g, false, 2, &fill );
if (sliderStart > sliderMax) { // sanity check
sliderStart = sliderMax;
@@ -673,11 +673,11 @@ void TQInterlaceStyle::drawScrollBarControls( TQPainter* p, const TQScrollBar* s
if ( controls & AddLine )
drawArrow( p, VERTICAL ? DownArrow : RightArrow,
ADD_LINE_ACTIVE, addB.x(), addB.y(),
- addB.width(), addB.height(), g, TRUE );
+ addB.width(), addB.height(), g, true );
if ( controls & SubLine )
drawArrow( p, VERTICAL ? UpArrow : LeftArrow,
SUB_LINE_ACTIVE, subB.x(), subB.y(),
- subB.width(), subB.height(), g, TRUE );
+ subB.width(), subB.height(), g, true );
if ( controls & SubPage )
p->fillRect( subPageR, fill );
@@ -691,7 +691,7 @@ void TQInterlaceStyle::drawScrollBarControls( TQPainter* p, const TQScrollBar* s
if ( sliderR.isValid() )
drawButton( p, sliderR.x(), sliderR.y(),
sliderR.width(), sliderR.height(), g,
- FALSE, &g.brush( TQColorGroup::Button ) );
+ false, &g.brush( TQColorGroup::Button ) );
p->setBrushOrigin(bo);
}
@@ -703,13 +703,13 @@ void TQInterlaceStyle::drawScrollBarControls( TQPainter* p, const TQScrollBar* s
void TQInterlaceStyle::drawSlider ( TQPainter * p, int x, int y, int w, int h, const TQColorGroup & g, Orientation orient, bool, bool)
{
p->fillRect( x, y, w, h, g.brush( TQColorGroup::Background ) );
- drawButton( p, x, y, w, h, g, FALSE, &g.brush( TQColorGroup::Button ) );
+ drawButton( p, x, y, w, h, g, false, &g.brush( TQColorGroup::Button ) );
if ( orient == Horizontal ) {
TQCOORD mid = x + w / 2;
- qDrawShadeLine( p, mid, y , mid, y + h - 2, g, TRUE, 1);
+ qDrawShadeLine( p, mid, y , mid, y + h - 2, g, true, 1);
} else {
TQCOORD mid = y +h / 2;
- qDrawShadeLine( p, x, mid, x + w - 2, mid, g, TRUE, 1);
+ qDrawShadeLine( p, x, mid, x + w - 2, mid, g, true, 1);
}
}
@@ -723,9 +723,9 @@ void TQInterlaceStyle::drawSliderGroove ( TQPainter * p, int x, int y, int w, in
p->setPen( NoPen );
if ( o == Horizontal )
- drawButton( p, x, y+h/2-3, w, 6, g, FALSE, &g.brush( TQColorGroup::Mid ) );
+ drawButton( p, x, y+h/2-3, w, 6, g, false, &g.brush( TQColorGroup::Mid ) );
else
- drawButton( p, x+w/2-3, y, 6, h, g, FALSE, &g.brush( TQColorGroup::Mid ) );
+ drawButton( p, x+w/2-3, y, 6, h, g, false, &g.brush( TQColorGroup::Mid ) );
}
@@ -753,7 +753,7 @@ void TQInterlaceStyle::drawSplitter( TQPainter *p, int x, int y, int w, int h,
qDrawShadeLine( p, xPos, kPos + kSize - 1 ,
xPos, h, g );
drawPanel( p, xPos-sw/2+2, kPos,
- kSize, kSize, g, FALSE, 2,
+ kSize, kSize, g, false, 2,
&g.brush( TQColorGroup::Button ));
qDrawShadeLine( p, xPos, 0, xPos, kPos, g );
} else {
@@ -763,7 +763,7 @@ void TQInterlaceStyle::drawSplitter( TQPainter *p, int x, int y, int w, int h,
qDrawShadeLine( p, 0, yPos, kPos, yPos, g );
drawPanel( p, kPos, yPos-sw/2+2,
- kSize, kSize, g, FALSE, 2,
+ kSize, kSize, g, false, 2,
&g.brush( TQColorGroup::Button ));
qDrawShadeLine( p, kPos + kSize -1, yPos,
w, yPos, g );
diff --git a/src/styles/tqinterlacestyle.h b/src/styles/tqinterlacestyle.h
index 8c1982712..115e0d2ec 100644
--- a/src/styles/tqinterlacestyle.h
+++ b/src/styles/tqinterlacestyle.h
@@ -62,21 +62,21 @@ public:
int defaultFrameWidth() const;
TQRect pushButtonContentsRect( TQPushButton *btn );
- void drawFocusRect ( TQPainter *, const TQRect &, const TQColorGroup &, const TQColor * bg = 0, bool = FALSE );
+ void drawFocusRect ( TQPainter *, const TQRect &, const TQColorGroup &, const TQColor * bg = 0, bool = false );
void drawButton( TQPainter *p, int x, int y, int w, int h,
- const TQColorGroup &g, bool sunken = FALSE,
+ const TQColorGroup &g, bool sunken = false,
const TQBrush *fill = 0 );
void drawButtonMask ( TQPainter * p, int x, int y, int w, int h );
void drawBevelButton( TQPainter *p, int x, int y, int w, int h,
- const TQColorGroup &g, bool sunken = FALSE,
+ const TQColorGroup &g, bool sunken = false,
const TQBrush *fill = 0 );
void drawPushButton( TQPushButton* btn, TQPainter *p);
TQSize indicatorSize () const;
- void drawIndicator ( TQPainter * p, int x, int y, int w, int h, const TQColorGroup & g, int state, bool down = FALSE, bool enabled = TRUE );
+ void drawIndicator ( TQPainter * p, int x, int y, int w, int h, const TQColorGroup & g, int state, bool down = false, bool enabled = true );
void drawIndicatorMask( TQPainter *p, int x, int y, int w, int h, int );
TQSize exclusiveIndicatorSize () const;
- void drawExclusiveIndicator( TQPainter * p, int x, int y, int w, int h, const TQColorGroup & g, bool on, bool down = FALSE, bool enabled = TRUE );
+ void drawExclusiveIndicator( TQPainter * p, int x, int y, int w, int h, const TQColorGroup & g, bool on, bool down = false, bool enabled = true );
void drawExclusiveIndicatorMask( TQPainter * p, int x, int y, int w, int h, bool );
TQRect comboButtonRect ( int x, int y, int w, int h );
void drawComboButton( TQPainter *p, int x, int y, int w, int h, const TQColorGroup &g, bool sunken, bool editable, bool enabled, const TQBrush *fb );
diff --git a/src/styles/tqmotifplusstyle.cpp b/src/styles/tqmotifplusstyle.cpp
index 6c9075495..8b13cb538 100644
--- a/src/styles/tqmotifplusstyle.cpp
+++ b/src/styles/tqmotifplusstyle.cpp
@@ -65,7 +65,7 @@
struct TQMotifPlusStylePrivate
{
TQMotifPlusStylePrivate()
- : hovering(FALSE), sliderActive(FALSE), mousePressed(FALSE),
+ : hovering(false), sliderActive(false), mousePressed(false),
scrollbarElement(0), lastElement(0), ref(1)
{ ; }
@@ -144,11 +144,11 @@ static void drawMotifPlusShade(TQPainter *p,
/*!
Constructs a TQMotifPlusStyle
- If \a hoveringHighlight is TRUE (the default), then the style will
+ If \a hoveringHighlight is true (the default), then the style will
not highlight push buttons, checkboxes, radiobuttons, comboboxes,
scrollbars or sliders.
*/
-TQMotifPlusStyle::TQMotifPlusStyle(bool hoveringHighlight) : TQMotifStyle(TRUE)
+TQMotifPlusStyle::TQMotifPlusStyle(bool hoveringHighlight) : TQMotifStyle(true)
{
if ( !singleton )
singleton = new TQMotifPlusStylePrivate;
@@ -650,7 +650,7 @@ void TQMotifPlusStyle::drawPrimitive( PrimitiveElement pe,
case PE_PanelScrollBar:
{
- drawMotifPlusShade(p, r, cg, TRUE, FALSE, &cg.brush(TQColorGroup::Mid));
+ drawMotifPlusShade(p, r, cg, true, false, &cg.brush(TQColorGroup::Mid));
break;
}
@@ -667,7 +667,7 @@ void TQMotifPlusStyle::drawPrimitive( PrimitiveElement pe,
TQRect vrect = visualRect( TQRect( x+2, y+2, checkcol, h-2 ), r );
- qDrawShadePanel( p, vrect.x(), y+2, checkcol, h-2*2, cg, TRUE, 1, &cg.brush( TQColorGroup::Midlight ) );
+ qDrawShadePanel( p, vrect.x(), y+2, checkcol, h-2*2, cg, true, 1, &cg.brush( TQColorGroup::Midlight ) );
break;
}
@@ -717,7 +717,7 @@ void TQMotifPlusStyle::drawControl( ControlElement element,
if ((elementFlags & CEF_IsDefault) || (elementFlags & CEF_AutoDefault)) {
if (elementFlags & CEF_IsDefault)
- drawMotifPlusShade(p, br, cg, TRUE, FALSE,
+ drawMotifPlusShade(p, br, cg, true, false,
&cg.brush(TQColorGroup::Background));
br.setCoords(br.left() + dbi,
@@ -745,7 +745,7 @@ void TQMotifPlusStyle::drawControl( ControlElement element,
r -= visualRect(subRect(SR_CheckBoxIndicator, ceData, elementFlags, widget), ceData, elementFlags);
p->setClipRegion(r);
p->fillRect(ceData.rect, cg.brush(TQColorGroup::Midlight));
- p->setClipping(FALSE);
+ p->setClipping(false);
}
int alignment = TQApplication::reverseLayout() ? AlignRight : AlignLeft;
@@ -768,7 +768,7 @@ void TQMotifPlusStyle::drawControl( ControlElement element,
r -= visualRect(subRect(SR_RadioButtonIndicator, ceData, elementFlags, widget), ceData, elementFlags);
p->setClipRegion(r);
p->fillRect(ceData.rect, cg.brush(TQColorGroup::Midlight));
- p->setClipping(FALSE);
+ p->setClipping(false);
}
int alignment = TQApplication::reverseLayout() ? AlignRight : AlignLeft;
@@ -791,7 +791,7 @@ void TQMotifPlusStyle::drawControl( ControlElement element,
TQMenuItem *mi = opt.menuItem();
if ((flags & Style_Enabled) && (flags & Style_Active))
- drawMotifPlusShade(p, r, cg, FALSE, TRUE);
+ drawMotifPlusShade(p, r, cg, false, true);
else
p->fillRect(r, cg.button());
@@ -836,7 +836,7 @@ void TQMotifPlusStyle::drawControl( ControlElement element,
}
if ( act && !dis )
- drawMotifPlusShade(p, TQRect(x, y, w, h), cg, FALSE, TRUE);
+ drawMotifPlusShade(p, TQRect(x, y, w, h), cg, false, true);
else
p->fillRect(x, y, w, h, cg.brush( TQColorGroup::Button ));
@@ -1161,7 +1161,7 @@ void TQMotifPlusStyle::drawComplexControl(ComplexControl control,
first = querySubControlMetrics(control, ceData, elementFlags, SC_ScrollBarFirst, opt, widget);
last = querySubControlMetrics(control, ceData, elementFlags, SC_ScrollBarLast, opt, widget);
- bool skipUpdate = FALSE;
+ bool skipUpdate = false;
if (singleton->hovering) {
if (addline.contains(singleton->mousePos)) {
skipUpdate =
@@ -1286,7 +1286,7 @@ void TQMotifPlusStyle::drawComplexControl(ComplexControl control,
editfield.addCoords(-3, -3, 3, 3);
if (elementFlags & CEF_HasFocus)
editfield.addCoords(1, 1, -1, -1);
- drawMotifPlusShade(p, editfield, cg, TRUE, FALSE,
+ drawMotifPlusShade(p, editfield, cg, true, false,
((elementFlags & CEF_IsEnabled) ?
&cg.brush(TQColorGroup::Base) :
&cg.brush(TQColorGroup::Background)));
@@ -1308,12 +1308,12 @@ void TQMotifPlusStyle::drawComplexControl(ComplexControl control,
editfield.addCoords(-3, -3, 3, 3);
if (elementFlags & CEF_HasFocus)
editfield.addCoords(1, 1, -1, -1);
- drawMotifPlusShade(p, editfield, cg, FALSE,
+ drawMotifPlusShade(p, editfield, cg, false,
(flags & Style_MouseOver));
}
if (controls & SC_ComboBoxArrow && arrow.isValid())
- drawMotifPlusShade(p, arrow, cg, FALSE, (flags & Style_MouseOver));
+ drawMotifPlusShade(p, arrow, cg, false, (flags & Style_MouseOver));
}
if ((elementFlags & CEF_HasFocus) ||
@@ -1331,7 +1331,7 @@ void TQMotifPlusStyle::drawComplexControl(ComplexControl control,
SFlags flags = Style_Default;
if (controls & SC_SpinWidgetFrame)
- drawMotifPlusShade(p, r, cg, TRUE, FALSE, &cg.brush(TQColorGroup::Base));
+ drawMotifPlusShade(p, r, cg, true, false, &cg.brush(TQColorGroup::Base));
if (controls & SC_SpinWidgetUp) {
flags = Style_Enabled;
@@ -1379,7 +1379,7 @@ void TQMotifPlusStyle::drawComplexControl(ComplexControl control,
opt, widget);
if ((controls & SC_SliderGroove) && groove.isValid()) {
- drawMotifPlusShade(p, groove, cg, TRUE, FALSE,
+ drawMotifPlusShade(p, groove, cg, true, false,
&cg.brush(TQColorGroup::Mid));
if ( flags & Style_HasFocus ) {
@@ -1400,12 +1400,12 @@ void TQMotifPlusStyle::drawComplexControl(ComplexControl control,
TQCOORD mid = handle.x() + handle.width() / 2;
qDrawShadeLine( p, mid, handle.y() + 1, mid ,
handle.y() + handle.height() - 3,
- cg, TRUE, 1);
+ cg, true, 1);
} else {
TQCOORD mid = handle.y() + handle.height() / 2;
qDrawShadeLine( p, handle.x() + 1, mid,
handle.x() + handle.width() - 3, mid,
- cg, TRUE, 1);
+ cg, true, 1);
}
}
@@ -1529,23 +1529,23 @@ bool TQMotifPlusStyle::objectEventHandler( const TQStyleControlElementData &ceDa
switch(event->type()) {
case TQEvent::MouseButtonPress:
{
- singleton->mousePressed = TRUE;
+ singleton->mousePressed = true;
if (!ceData.widgetObjectTypes.contains("TQSlider"))
break;
- singleton->sliderActive = TRUE;
+ singleton->sliderActive = true;
break;
}
case TQEvent::MouseButtonRelease:
{
- singleton->mousePressed = FALSE;
+ singleton->mousePressed = false;
if (!ceData.widgetObjectTypes.contains("TQSlider"))
break;
- singleton->sliderActive = FALSE;
+ singleton->sliderActive = false;
widgetActionRequest(ceData, elementFlags, source, WAR_Repaint);
break;
}
@@ -1578,9 +1578,9 @@ bool TQMotifPlusStyle::objectEventHandler( const TQStyleControlElementData &ceDa
singleton->mousePos = ((TQMouseEvent *) event)->pos();
if (! singleton->mousePressed) {
- singleton->hovering = TRUE;
+ singleton->hovering = true;
widgetActionRequest(ceData, elementFlags, source, WAR_Repaint);
- singleton->hovering = FALSE;
+ singleton->hovering = false;
}
break;
diff --git a/src/styles/tqmotifplusstyle.h b/src/styles/tqmotifplusstyle.h
index 3cfca0677..df2bce409 100644
--- a/src/styles/tqmotifplusstyle.h
+++ b/src/styles/tqmotifplusstyle.h
@@ -59,7 +59,7 @@ class TQ_EXPORT_STYLE_MOTIFPLUS TQMotifPlusStyle : public TQMotifStyle
TQ_OBJECT
public:
- TQMotifPlusStyle(bool hoveringHighlight = TRUE);
+ TQMotifPlusStyle(bool hoveringHighlight = true);
virtual ~TQMotifPlusStyle();
void polish(TQPalette &pal);
diff --git a/src/styles/tqmotifstyle.cpp b/src/styles/tqmotifstyle.cpp
index 5e71d6813..2b80b1e12 100644
--- a/src/styles/tqmotifstyle.cpp
+++ b/src/styles/tqmotifstyle.cpp
@@ -91,7 +91,7 @@ static const int motifCheckMarkSpace = 12;
/*!
Constructs a TQMotifStyle.
- If \a useHighlightCols is FALSE (the default), the style will
+ If \a useHighlightCols is false (the default), the style will
polish the application's color palette to emulate the Motif way of
highlighting, which is a simple inversion between the base and the
text color.
@@ -108,7 +108,7 @@ TQMotifStyle::~TQMotifStyle()
}
/*!
- If \a arg is FALSE, the style will polish the application's color
+ If \a arg is false, the style will polish the application's color
palette to emulate the Motif way of highlighting, which is a
simple inversion between the base and the text color.
@@ -124,10 +124,10 @@ void TQMotifStyle::setUseHighlightColors( bool arg )
}
/*!
- Returns TRUE if the style treats the highlight colors of the
+ Returns true if the style treats the highlight colors of the
palette in a Motif-like manner, which is a simple inversion
- between the base and the text color; otherwise returns FALSE. The
- default is FALSE.
+ between the base and the text color; otherwise returns false. The
+ default is false.
*/
bool TQMotifStyle::useHighlightColors() const
{
@@ -678,7 +678,7 @@ void TQMotifStyle::drawPrimitive( PrimitiveElement pe,
qDrawShadeLine( p, 0, yPos, kPos, yPos, cg );
qDrawShadePanel( p, kPos, yPos - sw / 2 + 1, kSize, kSize,
- cg, FALSE, 1, &cg.brush( TQColorGroup::Button ) );
+ cg, false, 1, &cg.brush( TQColorGroup::Button ) );
qDrawShadeLine( p, kPos + kSize - 1, yPos, r.width(), yPos, cg );
} else {
TQCOORD xPos = r.x() + r.width() / 2;
@@ -687,7 +687,7 @@ void TQMotifStyle::drawPrimitive( PrimitiveElement pe,
qDrawShadeLine( p, xPos, kPos + kSize - 1, xPos, r.height(), cg );
qDrawShadePanel( p, xPos - sw / 2 + 1, kPos, kSize, kSize, cg,
- FALSE, 1, &cg.brush( TQColorGroup::Button ) );
+ false, 1, &cg.brush( TQColorGroup::Button ) );
qDrawShadeLine( p, xPos, 0, xPos, kPos, cg );
}
break;
@@ -731,9 +731,9 @@ void TQMotifStyle::drawPrimitive( PrimitiveElement pe,
p->setPen( cg.text() );
p->drawLineSegments( a );
- qDrawShadePanel( p, posX-2, posY-2, markW+4, markH+6, cg, TRUE, dfw);
+ qDrawShadePanel( p, posX-2, posY-2, markW+4, markH+6, cg, true, dfw);
} else
- qDrawShadePanel( p, posX, posY, markW, markH, cg, TRUE, dfw,
+ qDrawShadePanel( p, posX, posY, markW, markH, cg, true, dfw,
&cg.brush( TQColorGroup::Mid ) );
break;
@@ -765,7 +765,7 @@ void TQMotifStyle::drawPrimitive( PrimitiveElement pe,
break;
case PE_PanelScrollBar:
- qDrawShadePanel(p, r, cg, TRUE,
+ qDrawShadePanel(p, r, cg, true,
pixelMetric(PM_DefaultFrameWidth, ceData, elementFlags),
&cg.brush(TQColorGroup::Mid));
break;
@@ -785,7 +785,7 @@ void TQMotifStyle::drawPrimitive( PrimitiveElement pe,
TQRect vrect = visualRect( TQRect( x+motifItemFrame, y+motifItemFrame, checkcol, h-2*motifItemFrame ), r );
int xvis = vrect.x();
- qDrawShadePanel( p, xvis, y+motifItemFrame, checkcol, h-2*motifItemFrame, cg, TRUE, 1, &cg.brush( TQColorGroup::Midlight ) );
+ qDrawShadePanel( p, xvis, y+motifItemFrame, checkcol, h-2*motifItemFrame, cg, true, 1, &cg.brush( TQColorGroup::Midlight ) );
break;
}
@@ -867,7 +867,7 @@ void TQMotifStyle::drawControl( ControlElement element,
x2 -= 2;
y2 -= 2;
} else {
- qDrawShadePanel( p, r, newCg, TRUE );
+ qDrawShadePanel( p, r, newCg, true );
}
}
if ( !( elementFlags & CEF_IsFlat ) || ( elementFlags & CEF_IsOn ) || ( elementFlags & CEF_IsDown ) ) {
@@ -902,13 +902,13 @@ void TQMotifStyle::drawControl( ControlElement element,
int dfw = pixelMetric( PM_DefaultFrameWidth, ceData, elementFlags, widget );
bool selected = flags & Style_Selected;
int o = dfw > 1 ? 1 : 0;
- bool lastTab = FALSE;
+ bool lastTab = false;
TQRect r2( r );
if ( ceData.tabBarData.shape == TQTabBar::RoundedAbove ) {
if ( styleHint( SH_TabBar_Alignment, ceData, elementFlags, TQStyleOption::Default, 0, widget ) == AlignRight &&
ceData.tabBarData.identIndexMap[t->identifier()] == ceData.tabBarData.tabCount-1 )
- lastTab = TRUE;
+ lastTab = true;
if ( o ) {
p->setPen( ceData.colorGroup.light() );
@@ -963,7 +963,7 @@ void TQMotifStyle::drawControl( ControlElement element,
} else if ( ceData.tabBarData.shape == TQTabBar::RoundedBelow ) {
if ( styleHint( SH_TabBar_Alignment, ceData, elementFlags, TQStyleOption::Default, 0, widget ) == AlignLeft &&
ceData.tabBarData.identIndexMap[t->identifier()] == ceData.tabBarData.tabCount-1 )
- lastTab = TRUE;
+ lastTab = true;
if ( selected ) {
p->fillRect( TQRect( r2.left()+1, r2.top(), r2.width()-3, 1),
ceData.palette.active().brush( TQColorGroup::Background ));
@@ -1010,7 +1010,7 @@ void TQMotifStyle::drawControl( ControlElement element,
}
case CE_ProgressBarGroove:
- qDrawShadePanel(p, r, cg, TRUE, 2);
+ qDrawShadePanel(p, r, cg, true, 2);
break;
case CE_ProgressBarLabel:
@@ -1083,10 +1083,10 @@ void TQMotifStyle::drawControl( ControlElement element,
if ( act && !dis ) { // active item frame
if (pixelMetric( PM_DefaultFrameWidth, ceData, elementFlags ) > 1)
- qDrawShadePanel( p, x, y, w, h, cg, FALSE, pw,
+ qDrawShadePanel( p, x, y, w, h, cg, false, pw,
&cg.brush( TQColorGroup::Button ) );
else
- qDrawShadePanel( p, x+1, y+1, w-2, h-2, cg, TRUE, 1,
+ qDrawShadePanel( p, x+1, y+1, w-2, h-2, cg, true, 1,
&cg.brush( TQColorGroup::Button ) );
}
else // incognito frame
@@ -1192,7 +1192,7 @@ void TQMotifStyle::drawControl( ControlElement element,
case CE_MenuBarItem:
{
if ( flags & Style_Active ) // active item
- qDrawShadePanel( p, r, cg, FALSE, motifItemFrame,
+ qDrawShadePanel( p, r, cg, false, motifItemFrame,
&cg.brush(TQColorGroup::Button) );
else // other item
p->fillRect( r, cg.brush(TQColorGroup::Button) );
@@ -1271,7 +1271,7 @@ void TQMotifStyle::drawComplexControl( ComplexControl control,
case CC_SpinWidget: {
SCFlags drawSub = SC_None;
if ( sub & SC_SpinWidgetFrame )
- qDrawShadePanel( p, r, cg, TRUE,
+ qDrawShadePanel( p, r, cg, true,
pixelMetric( PM_DefaultFrameWidth, ceData, elementFlags ) );
if ( sub & SC_SpinWidgetUp || sub & SC_SpinWidgetDown ) {
@@ -1294,7 +1294,7 @@ void TQMotifStyle::drawComplexControl( ComplexControl control,
opt, widget);
if ((sub & SC_SliderGroove) && groove.isValid()) {
- qDrawShadePanel( p, groove, cg, TRUE, 2,
+ qDrawShadePanel( p, groove, cg, true, 2,
&cg.brush( TQColorGroup::Mid ) );
@@ -1311,12 +1311,12 @@ void TQMotifStyle::drawComplexControl( ComplexControl control,
TQCOORD mid = handle.x() + handle.width() / 2;
qDrawShadeLine( p, mid, handle.y(), mid,
handle.y() + handle.height() - 2,
- cg, TRUE, 1);
+ cg, true, 1);
} else {
TQCOORD mid = handle.y() + handle.height() / 2;
qDrawShadeLine( p, handle.x(), mid,
handle.x() + handle.width() - 2, mid,
- cg, TRUE, 1);
+ cg, true, 1);
}
}
@@ -1364,7 +1364,7 @@ void TQMotifStyle::drawComplexControl( ComplexControl control,
TQRect er = TQStyle::visualRect( querySubControlMetrics( CC_ComboBox, ceData, elementFlags,
SC_ComboBoxEditField, cb ), ceData, elementFlags );
er.addCoords( -1, -1, 1, 1);
- qDrawShadePanel( p, er, cg, TRUE, 1,
+ qDrawShadePanel( p, er, cg, true, 1,
&cg.brush( TQColorGroup::Button ));
}
}
diff --git a/src/styles/tqmotifstyle.h b/src/styles/tqmotifstyle.h
index e840de446..eaca499a6 100644
--- a/src/styles/tqmotifstyle.h
+++ b/src/styles/tqmotifstyle.h
@@ -60,7 +60,7 @@ class TQ_EXPORT_STYLE_MOTIF TQMotifStyle : public TQCommonStyle
{
TQ_OBJECT
public:
- TQMotifStyle( bool useHighlightCols=FALSE );
+ TQMotifStyle( bool useHighlightCols=false );
virtual ~TQMotifStyle();
void setUseHighlightColors( bool );
diff --git a/src/styles/tqplatinumstyle.cpp b/src/styles/tqplatinumstyle.cpp
index 4050f075e..71e9ae3ae 100644
--- a/src/styles/tqplatinumstyle.cpp
+++ b/src/styles/tqplatinumstyle.cpp
@@ -796,9 +796,9 @@ void TQPlatinumStyle::drawControl( ControlElement element,
|| ( (!ceData.fgPixmap.isNull()) &&
(ceData.rect.width() * ceData.rect.height() < 1600 ||
TQABS( ceData.rect.width() - ceData.rect.height()) < 10 )) )
- useBevelButton = TRUE;
+ useBevelButton = true;
else
- useBevelButton = FALSE;
+ useBevelButton = false;
int diw = pixelMetric( PM_ButtonDefaultIndicator, ceData, elementFlags, widget );
if ( elementFlags & CEF_IsDefault ) {
@@ -1119,7 +1119,7 @@ void TQPlatinumStyle::drawComplexControl( ComplexControl control,
// end comboButtonRect...
ir.setRect( ir.left() - 1, ir.top() - 1, ir.width() + 2,
ir.height() + 2 );
- qDrawShadePanel( p, ir, cg, TRUE, 2, 0 );
+ qDrawShadePanel( p, ir, cg, true, 2, 0 );
}
}
#endif
@@ -1260,7 +1260,7 @@ void TQPlatinumStyle::drawComplexControl( ComplexControl control,
p->drawLine( x1 + 1, y2 - 1, x2 -my + 2, y2 - 1 );
drawRiffles( p, handle.x(), handle.y() + 2, handle.width() - 3,
- handle.height() - 4, cg, TRUE );
+ handle.height() - 4, cg, true );
} else { // Horizontal
TQBrush oldBrush = p->brush();
p->setBrush( cg.brush( TQColorGroup::Button ) );
@@ -1297,7 +1297,7 @@ void TQPlatinumStyle::drawComplexControl( ComplexControl control,
p->drawLine( x1 + mx - 2, y2 - 1, x1 + mx + 2, y2 - 1 );
drawRiffles( p, handle.x() + 2, handle.y(), handle.width() - 4,
- handle.height() - 5, cg, FALSE );
+ handle.height() - 5, cg, false );
}
}
diff --git a/src/styles/tqsgistyle.cpp b/src/styles/tqsgistyle.cpp
index 3574dc0d0..0a78be86f 100644
--- a/src/styles/tqsgistyle.cpp
+++ b/src/styles/tqsgistyle.cpp
@@ -109,7 +109,7 @@ public:
/*!
Constructs a TQSGIStyle.
- If \a useHighlightCols is FALSE (default value), the style will
+ If \a useHighlightCols is false (default value), the style will
polish the application's color palette to emulate the Motif way of
highlighting, which is a simple inversion between the base and the
text color.
@@ -156,7 +156,7 @@ TQSGIStyle::applicationPolish( const TQStyleControlElementData &ceData, ControlE
pal.setColor( TQPalette::Disabled, TQColorGroup::Highlight, pal.disabled().text() );
pal.setColor( TQPalette::Disabled, TQColorGroup::HighlightedText, pal.disabled().base() );
}
- TQApplication::setPalette( pal, TRUE );
+ TQApplication::setPalette( pal, true );
// different basecolor and highlighting in Q(Multi)LineEdit
pal.setColor( TQColorGroup::Base, TQColor(211,181,181) );
@@ -167,15 +167,15 @@ TQSGIStyle::applicationPolish( const TQStyleControlElementData &ceData, ControlE
pal.setColor( TQPalette::Disabled, TQColorGroup::Highlight, pal.disabled().midlight() );
pal.setColor( TQPalette::Disabled, TQColorGroup::HighlightedText, pal.disabled().text() );
- TQApplication::setPalette( pal, TRUE, "TQLineEdit" );
- TQApplication::setPalette( pal, TRUE, "TQTextEdit" );
- TQApplication::setPalette( pal, TRUE, "TQDateTimeEditBase" );
+ TQApplication::setPalette( pal, true, "TQLineEdit" );
+ TQApplication::setPalette( pal, true, "TQTextEdit" );
+ TQApplication::setPalette( pal, true, "TQDateTimeEditBase" );
pal = TQApplication::palette();
pal.setColor( TQColorGroup::Button, pal.active().background() );
- TQApplication::setPalette( pal, TRUE, "TQMenuBar" );
- TQApplication::setPalette( pal, TRUE, "TQToolBar" );
- TQApplication::setPalette( pal, TRUE, "TQPopupMenu" );
+ TQApplication::setPalette( pal, true, "TQMenuBar" );
+ TQApplication::setPalette( pal, true, "TQToolBar" );
+ TQApplication::setPalette( pal, true, "TQPopupMenu" );
}
/*! \reimp
@@ -184,7 +184,7 @@ void
TQSGIStyle::applicationUnPolish( const TQStyleControlElementData&, ControlElementFlags, void * )
{
TQFont f = TQApplication::font();
- TQApplication::setFont( f, TRUE ); // get rid of the special fonts for special widget classes
+ TQApplication::setFont( f, true ); // get rid of the special fonts for special widget classes
}
/*!
@@ -241,16 +241,16 @@ TQSGIStyle::polish( const TQStyleControlElementData &ceData, ControlElementFlags
#endif
} else if ( ceData.widgetObjectTypes.contains("TQComboBox") ) {
TQFont f = TQApplication::font();
- f.setBold( TRUE );
- f.setItalic( TRUE );
+ f.setBold( true );
+ f.setItalic( true );
widgetActionRequest(ceData, elementFlags, ptr, WAR_SetFont, TQStyleWidgetActionRequestData(f));
#ifndef TQT_NO_MENUBAR
} else if ( ceData.widgetObjectTypes.contains("TQMenuBar") ) {
widgetActionRequest(ceData, elementFlags, ptr, WAR_FrameSetStyle, TQStyleWidgetActionRequestData(TQFrame::StyledPanel | TQFrame::Raised));
widgetActionRequest(ceData, elementFlags, ptr, WAR_SetBackgroundMode, TQStyleWidgetActionRequestData(TQWidget::PaletteBackground));
TQFont f = TQApplication::font();
- f.setBold( TRUE );
- f.setItalic( TRUE );
+ f.setBold( true );
+ f.setItalic( true );
widgetActionRequest(ceData, elementFlags, ptr, WAR_SetFont, TQStyleWidgetActionRequestData(f));
#endif
#ifndef TQT_NO_POPUPMENU
@@ -258,8 +258,8 @@ TQSGIStyle::polish( const TQStyleControlElementData &ceData, ControlElementFlags
TQStyleWidgetActionRequestData requestData;
widgetActionRequest(ceData, elementFlags, ptr, WAR_FrameSetLineWidth, TQStyleWidgetActionRequestData(pixelMetric( PM_DefaultFrameWidth, TQStyleControlElementData(), CEF_None ) + 1));
TQFont f = TQApplication::font();
- f.setBold( TRUE );
- f.setItalic( TRUE );
+ f.setBold( true );
+ f.setItalic( true );
widgetActionRequest(ceData, elementFlags, ptr, WAR_SetFont, TQStyleWidgetActionRequestData(f));
#endif
} else if ( (ceData.widgetObjectTypes.contains("TQToolBar")) || (ceData.widgetObjectTypes.contains("TQToolBarSeparator")) ) {
@@ -494,7 +494,7 @@ static void drawSGIPrefix( TQPainter *p, int x, int y, TQString* miText )
{
if ( miText && (!!(*miText)) ) {
int amp = 0;
- bool nextAmp = FALSE;
+ bool nextAmp = false;
while ( ( amp = miText->find( '&', amp ) ) != -1 ) {
if ( (uint)amp == miText->length()-1 )
return;
@@ -826,7 +826,7 @@ void TQSGIStyle::drawPrimitive( PrimitiveElement pe,
if ( !r.contains( d->mousePos ) )
flags &= ~Style_MouseOver;
if ( r.isValid() )
- qDrawShadePanel( p, x, y, w, h, cg, FALSE, 1, hot ? &cg.brush( TQColorGroup::Midlight ) : &cg.brush( TQColorGroup::Button ) );
+ qDrawShadePanel( p, x, y, w, h, cg, false, 1, hot ? &cg.brush( TQColorGroup::Midlight ) : &cg.brush( TQColorGroup::Button ) );
break;
case PE_ScrollBarSlider:
@@ -912,7 +912,7 @@ void TQSGIStyle::drawPrimitive( PrimitiveElement pe,
r.rect(&x, &y, &w, &h);
int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, NULL, NULL);
- drawPanel( p, x+sgiItemFrame, y+sgiItemFrame, checkcol, h-2*sgiItemFrame, cg, TRUE, 1, &cg.brush( TQColorGroup::Light ) );
+ drawPanel( p, x+sgiItemFrame, y+sgiItemFrame, checkcol, h-2*sgiItemFrame, cg, true, 1, &cg.brush( TQColorGroup::Light ) );
}
break;
@@ -987,7 +987,7 @@ void TQSGIStyle::drawControl( ControlElement element,
x2 -= 2;
y2 -= 2;
} else {
- qDrawShadePanel( p, ceData.rect, cg, TRUE );
+ qDrawShadePanel( p, ceData.rect, cg, true );
}
}
@@ -1032,10 +1032,10 @@ void TQSGIStyle::drawControl( ControlElement element,
if ( act && !dis ) {
if ( pixelMetric( PM_DefaultFrameWidth, ceData, elementFlags ) > 1 )
- drawPanel( p, x, y, w, h, cg, FALSE, pw,
+ drawPanel( p, x, y, w, h, cg, false, pw,
&cg.brush( TQColorGroup::Light ) );
else
- drawPanel( p, x+1, y+1, w-2, h-2, cg, FALSE, 1,
+ drawPanel( p, x+1, y+1, w-2, h-2, cg, false, 1,
&cg.brush( TQColorGroup::Light ) );
} else {
p->fillRect( x, y, w, h, cg.brush( TQColorGroup::Button ) );
@@ -1149,7 +1149,7 @@ void TQSGIStyle::drawControl( ControlElement element,
if ( active ) {
p->setPen( TQPen( cg.shadow(), 1) );
p->drawRect( x, y, w, h );
- qDrawShadePanel( p, TQRect(x+1,y+1,w-2,h-2), cg, FALSE, 2,
+ qDrawShadePanel( p, TQRect(x+1,y+1,w-2,h-2), cg, false, 2,
&cg.brush( TQColorGroup::Light ));
} else {
p->fillRect( x, y, w, h, cg.brush( TQColorGroup::Button ));
@@ -1231,11 +1231,11 @@ void TQSGIStyle::drawComplexControl( ComplexControl control,
region = region.subtract( handle );
p->setClipRegion( region );
} else {
- p->setClipping( FALSE );
+ p->setClipping( false );
}
- qDrawShadePanel( p, d->lastSliderRect.rect, cg, TRUE, 1, &cg.brush( TQColorGroup::Dark ) );
+ qDrawShadePanel( p, d->lastSliderRect.rect, cg, true, 1, &cg.brush( TQColorGroup::Dark ) );
}
- p->setClipping( FALSE );
+ p->setClipping( false );
}
if (( sub & SC_SliderHandle ) && handle.isValid()) {
@@ -1247,12 +1247,12 @@ void TQSGIStyle::drawComplexControl( ComplexControl control,
TQCOORD mid = handle.x() + handle.width() / 2;
qDrawShadeLine( p, mid, handle.y(), mid,
handle.y() + handle.height() - 2,
- cg, TRUE, 1);
+ cg, true, 1);
} else {
TQCOORD mid = handle.y() + handle.height() / 2;
qDrawShadeLine( p, handle.x(), mid,
handle.x() + handle.width() - 2, mid,
- cg, TRUE, 1);
+ cg, true, 1);
}
}
@@ -1302,7 +1302,7 @@ void TQSGIStyle::drawComplexControl( ComplexControl control,
er.addCoords( -1, -1, 1, 1);
qDrawShadePanel( p, TQRect( er.x()-1, er.y()-1,
er.width()+2, er.height()+2 ),
- cg, TRUE, 1, &cg.brush( TQColorGroup::Button ) );
+ cg, true, 1, &cg.brush( TQColorGroup::Button ) );
}
}
#endif
@@ -1353,11 +1353,11 @@ void TQSGIStyle::drawComplexControl( ComplexControl control,
region.subtract( handle );
p->setClipRegion( region );
} else {
- p->setClipping( FALSE );
+ p->setClipping( false );
}
- qDrawShadePanel( p, d->lastScrollbarRect.rect, cg, TRUE, 1, &cg.brush( TQColorGroup::Dark ) );
+ qDrawShadePanel( p, d->lastScrollbarRect.rect, cg, true, 1, &cg.brush( TQColorGroup::Dark ) );
}
- p->setClipping( FALSE );
+ p->setClipping( false );
}
if ( sub & SC_ScrollBarSubPage ) {
TQRect er = TQStyle::visualRect( querySubControlMetrics( CC_ScrollBar, ceData, elementFlags, SC_ScrollBarSubPage, opt, widget ), ceData, elementFlags );
@@ -1381,14 +1381,14 @@ void TQSGIStyle::drawComplexControl( ComplexControl control,
region.subtract( handle );
p->setClipRegion( region );
} else {
- p->setClipping( FALSE );
+ p->setClipping( false );
}
- qDrawShadePanel( p, d->lastScrollbarRect.rect, cg, TRUE, 1, &cg.brush( TQColorGroup::Dark ) );
+ qDrawShadePanel( p, d->lastScrollbarRect.rect, cg, true, 1, &cg.brush( TQColorGroup::Dark ) );
}
- p->setClipping( FALSE );
+ p->setClipping( false );
}
if ( sub & SC_ScrollBarSlider ) {
- p->setClipping( FALSE );
+ p->setClipping( false );
if ( subActive == SC_ScrollBarSlider )
flags |= Style_Active;
diff --git a/src/styles/tqsgistyle.h b/src/styles/tqsgistyle.h
index bd129ac53..0b65f3681 100644
--- a/src/styles/tqsgistyle.h
+++ b/src/styles/tqsgistyle.h
@@ -61,7 +61,7 @@ class TQ_EXPORT_STYLE_SGI TQSGIStyle: public TQMotifStyle
{
TQ_OBJECT
public:
- TQSGIStyle( bool useHighlightCols = FALSE );
+ TQSGIStyle( bool useHighlightCols = false );
virtual ~TQSGIStyle();
#if !defined(Q_NO_USING_KEYWORD)
diff --git a/src/styles/tqstylefactory.cpp b/src/styles/tqstylefactory.cpp
index 05418b275..ed697dd8c 100644
--- a/src/styles/tqstylefactory.cpp
+++ b/src/styles/tqstylefactory.cpp
@@ -85,7 +85,7 @@ TQPluginManager<TQStyleFactoryInterface> *TQStyleFactoryPrivate::manager = 0;
TQStyleFactoryPrivate::TQStyleFactoryPrivate()
: TQObject( tqApp )
{
- manager = new TQPluginManager<TQStyleFactoryInterface>( IID_QStyleFactory, TQApplication::libraryPaths(), "/styles", FALSE );
+ manager = new TQPluginManager<TQStyleFactoryInterface>( IID_QStyleFactory, TQApplication::libraryPaths(), "/styles", false );
}
TQStyleFactoryPrivate::~TQStyleFactoryPrivate()
diff --git a/src/styles/tqstyleplugin.cpp b/src/styles/tqstyleplugin.cpp
index 50e0e684d..9edadfc24 100644
--- a/src/styles/tqstyleplugin.cpp
+++ b/src/styles/tqstyleplugin.cpp
@@ -147,7 +147,7 @@ TQStyle *TQStylePluginPrivate::create( const TQString &key )
bool TQStylePluginPrivate::init()
{
- return TRUE;
+ return true;
}
void TQStylePluginPrivate::cleanup()
diff --git a/src/styles/tqwindowsstyle.cpp b/src/styles/tqwindowsstyle.cpp
index 02bd43720..38c126349 100644
--- a/src/styles/tqwindowsstyle.cpp
+++ b/src/styles/tqwindowsstyle.cpp
@@ -79,7 +79,7 @@ static const int windowsCheckMarkHMargin = 2; // horiz. margins of check mark
static const int windowsRightBorder = 12; // right border on windows
static const int windowsCheckMarkWidth = 12; // checkmarks width on windows
-static bool use2000style = TRUE;
+static bool use2000style = true;
enum TQSliderDirection { SlUp, SlDown, SlLeft, SlRight };
@@ -110,7 +110,7 @@ TQWindowsStyle::Private::Private(TQWindowsStyle *parent)
bool TQWindowsStyle::Private::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags, void* source, TQEvent *e )
{
if (!(ceData.widgetObjectTypes.contains("TQWidget"))) {
- return TRUE;
+ return true;
}
TQWidget *widget = reinterpret_cast<TQWidget*>(source);
@@ -135,8 +135,8 @@ bool TQWindowsStyle::Private::objectEventHandler( const TQStyleControlElementDat
if (menuBar && te->timerId() == menuBarTimer) {
menuBar->killTimer(te->timerId());
menuBarTimer = 0;
- menuBar->repaint(FALSE);
- return TRUE;
+ menuBar->repaint(false);
+ return true;
}
}
break;
@@ -144,7 +144,7 @@ bool TQWindowsStyle::Private::objectEventHandler( const TQStyleControlElementDat
break;
}
- return TRUE;
+ return true;
}
/*!
@@ -177,7 +177,7 @@ bool TQWindowsStyle::objectEventHandler( const TQStyleControlElementData &ceData
if (d) {
return d->objectEventHandler(ceData, elementFlags, source, e);
}
- return TRUE;
+ return true;
}
/*! \reimp */
@@ -276,13 +276,13 @@ void TQWindowsStyle::drawPrimitive( PrimitiveElement pe,
case PE_ButtonTool:
{
TQBrush fill;
- bool stippled = FALSE;
+ bool stippled = false;
if (! (flags & (Style_Down | Style_MouseOver)) &&
(flags & Style_On) &&
use2000style) {
fill = TQBrush(cg.light(), Dense4Pattern);
- stippled = TRUE;
+ stippled = true;
} else
fill = cg.brush(TQColorGroup::Button);
@@ -329,7 +329,7 @@ void TQWindowsStyle::drawPrimitive( PrimitiveElement pe,
else
fill = cg.brush( TQColorGroup::Background );
- qDrawWinPanel( p, r, cg, TRUE, &fill );
+ qDrawWinPanel( p, r, cg, true, &fill );
if (flags & Style_NoChange )
p->setPen( cg.dark() );
@@ -581,7 +581,7 @@ void TQWindowsStyle::drawPrimitive( PrimitiveElement pe,
int xvis = vrect.x();
if ( act && !dis ) {
- qDrawShadePanel( p, xvis, y, checkcol, h, cg, TRUE, 1, &cg.brush( TQColorGroup::Button ) );
+ qDrawShadePanel( p, xvis, y, checkcol, h, cg, true, 1, &cg.brush( TQColorGroup::Button ) );
}
else {
TQBrush fill( cg.light(), Dense4Pattern );
@@ -590,7 +590,7 @@ void TQWindowsStyle::drawPrimitive( PrimitiveElement pe,
// a consistent look
TQPoint origin = p->brushOrigin();
p->setBrushOrigin( xvis, y );
- qDrawShadePanel( p, xvis, y, checkcol, h, cg, TRUE, 1, &fill );
+ qDrawShadePanel( p, xvis, y, checkcol, h, cg, true, 1, &fill );
// restore the previous brush origin
p->setBrushOrigin( origin );
}
@@ -606,7 +606,7 @@ void TQWindowsStyle::drawPrimitive( PrimitiveElement pe,
TQRect vrect = visualRect( TQRect( x, y, checkcol, h ), r );
int xvis = vrect.x();
- qDrawShadePanel( p, xvis, y, w, h, cg, FALSE, 1, &cg.brush( TQColorGroup::Button ) );
+ qDrawShadePanel( p, xvis, y, w, h, cg, false, 1, &cg.brush( TQColorGroup::Button ) );
}
break;
@@ -705,8 +705,7 @@ void TQWindowsStyle::drawControl( ControlElement element,
const TQTab * t = opt.tab();
bool selected = flags & Style_Selected;
- bool lastTab = (ceData.tabBarData.identIndexMap[t->identifier()] == ceData.tabBarData.tabCount-1) ?
- TRUE : FALSE;
+ bool lastTab = (ceData.tabBarData.identIndexMap[t->identifier()] == ceData.tabBarData.tabCount-1);
TQRect r2( r );
if ( ceData.tabBarData.shape == TQTabBar::RoundedAbove ) {
p->setPen( cg.midlight() );
@@ -1634,8 +1633,8 @@ void TQWindowsStyle::drawComplexControl( ComplexControl ctrl, TQPainter *p,
if ( !verticalLine ) {
// make 128*1 and 1*128 bitmaps that can be used for
// drawing the right sort of lines.
- verticalLine = new TQBitmap( 1, 129, TRUE );
- horizontalLine = new TQBitmap( 128, 1, TRUE );
+ verticalLine = new TQBitmap( 1, 129, true );
+ horizontalLine = new TQBitmap( 128, 1, true );
TQPointArray a( 64 );
TQPainter p;
p.begin( verticalLine );
@@ -1705,7 +1704,7 @@ void TQWindowsStyle::drawComplexControl( ComplexControl ctrl, TQPainter *p,
if ( sub & SC_ComboBoxArrow ) {
SFlags flags = Style_Default;
- qDrawWinPanel( p, r, cg, TRUE, ( elementFlags & CEF_IsEnabled ) ?
+ qDrawWinPanel( p, r, cg, true, ( elementFlags & CEF_IsEnabled ) ?
&cg.brush( TQColorGroup::Base ):
&cg.brush( TQColorGroup::Background ) );
@@ -1717,7 +1716,7 @@ void TQWindowsStyle::drawComplexControl( ComplexControl ctrl, TQPainter *p,
p->setBrush( cg.brush( TQColorGroup::Button ) );
p->drawRect( ar );
} else
- qDrawWinPanel( p, ar, cg, FALSE,
+ qDrawWinPanel( p, ar, cg, false,
&cg.brush( TQColorGroup::Button ) );
ar.addCoords( 2, 2, -2, -2 );
@@ -1780,12 +1779,12 @@ void TQWindowsStyle::drawComplexControl( ComplexControl ctrl, TQPainter *p,
p->setPen( cg.shadow() );
if ( ceData.orientation == Horizontal ) {
qDrawWinPanel( p, groove.x(), groove.y() + mid - 2,
- groove.width(), 4, cg, TRUE );
+ groove.width(), 4, cg, true );
p->drawLine( groove.x() + 1, groove.y() + mid - 1,
groove.x() + groove.width() - 3, groove.y() + mid - 1 );
} else {
qDrawWinPanel( p, groove.x() + mid - 2, groove.y(),
- 4, groove.height(), cg, TRUE );
+ 4, groove.height(), cg, true );
p->drawLine( groove.x() + mid - 1, groove.y() + 1,
groove.x() + mid - 1,
groove.y() + groove.height() - 3 );
@@ -1833,7 +1832,7 @@ void TQWindowsStyle::drawComplexControl( ComplexControl ctrl, TQPainter *p,
}
if ( (tickAbove && tickBelow) || (!tickAbove && !tickBelow) ) {
- qDrawWinButton( p, TQRect(x,y,wi,he), cg, FALSE,
+ qDrawWinButton( p, TQRect(x,y,wi,he), cg, false,
&cg.brush( TQColorGroup::Button ) );
return;
}
diff --git a/src/table/tqtable.cpp b/src/table/tqtable.cpp
index b990a854a..28fe17cf2 100644
--- a/src/table/tqtable.cpp
+++ b/src/table/tqtable.cpp
@@ -62,8 +62,8 @@
#include <stdlib.h>
#include <limits.h>
-static bool qt_update_cell_widget = TRUE;
-static bool qt_table_clipper_enabled = TRUE;
+static bool qt_update_cell_widget = true;
+static bool qt_table_clipper_enabled = true;
#ifndef QT_INTERNAL_TABLE
TQ_EXPORT
#endif
@@ -131,7 +131,7 @@ private:
void updateSelections();
void saveStates();
void setCaching( bool b );
- void swapSections( int oldIdx, int newIdx, bool swapTable = TRUE );
+ void swapSections( int oldIdx, int newIdx, bool swapTable = true );
bool doSelection( TQMouseEvent *e );
void sectionLabelChanged( int section );
void resizeArrays( int n );
@@ -157,11 +157,11 @@ private:
struct TQTablePrivate
{
- TQTablePrivate() : hasRowSpan( FALSE ), hasColSpan( FALSE ),
- inMenuMode( FALSE ), redirectMouseEvent( FALSE )
+ TQTablePrivate() : hasRowSpan( false ), hasColSpan( false ),
+ inMenuMode( false ), redirectMouseEvent( false )
{
- hiddenRows.setAutoDelete( TRUE );
- hiddenCols.setAutoDelete( TRUE );
+ hiddenRows.setAutoDelete( true );
+ hiddenCols.setAutoDelete( true );
}
uint hasRowSpan : 1;
uint hasColSpan : 1;
@@ -209,7 +209,7 @@ static bool isRowSelection( TQTable::SelectionMode selMode )
rectangle's four edges. All four are part of the selection.
A newly created TQTableSelection is inactive -- isActive() returns
- FALSE. You must use init() and expandTo() to activate it.
+ false. You must use init() and expandTo() to activate it.
\sa TQTable TQTable::addSelection() TQTable::selection()
TQTable::selectCells() TQTable::selectRow() TQTable::selectColumn()
@@ -221,7 +221,7 @@ static bool isRowSelection( TQTable::SelectionMode selMode )
*/
TQTableSelection::TQTableSelection()
- : active( FALSE ), inited( FALSE ), tRow( -1 ), lCol( -1 ),
+ : active( false ), inited( false ), tRow( -1 ), lCol( -1 ),
bRow( -1 ), rCol( -1 ), aRow( -1 ), aCol( -1 )
{
}
@@ -232,7 +232,7 @@ TQTableSelection::TQTableSelection()
*/
TQTableSelection::TQTableSelection( int start_row, int start_col, int end_row, int end_col )
- : active( FALSE ), inited( FALSE ), tRow( -1 ), lCol( -1 ),
+ : active( false ), inited( false ), tRow( -1 ), lCol( -1 ),
bRow( -1 ), rCol( -1 ), aRow( -1 ), aCol( -1 )
{
init( start_row, start_col );
@@ -254,8 +254,8 @@ void TQTableSelection::init( int row, int col )
{
aCol = lCol = rCol = col;
aRow = tRow = bRow = row;
- active = FALSE;
- inited = TRUE;
+ active = false;
+ inited = true;
}
/*!
@@ -273,7 +273,7 @@ void TQTableSelection::expandTo( int row, int col )
{
if ( !inited )
return;
- active = TRUE;
+ active = true;
if ( row < aRow ) {
tRow = row;
@@ -293,8 +293,8 @@ void TQTableSelection::expandTo( int row, int col )
}
/*!
- Returns TRUE if \a s includes the same cells as the selection;
- otherwise returns FALSE.
+ Returns true if \a s includes the same cells as the selection;
+ otherwise returns false.
*/
bool TQTableSelection::operator==( const TQTableSelection &s ) const
@@ -307,8 +307,8 @@ bool TQTableSelection::operator==( const TQTableSelection &s ) const
/*!
\fn bool TQTableSelection::operator!=( const TQTableSelection &s ) const
- Returns TRUE if \a s does not include the same cells as the
- selection; otherwise returns FALSE.
+ Returns true if \a s does not include the same cells as the
+ selection; otherwise returns false.
*/
@@ -480,7 +480,7 @@ int TQTableSelection::numCols() const
By default, table items may be replaced by new TQTableItems
during the lifetime of a TQTable. Therefore, if you create your
own subclass of TQTableItem, and you want to ensure that
- this does not happen, you must call setReplaceable(FALSE)
+ this does not happen, you must call setReplaceable(false)
in the constructor of your subclass.
\img tqtableitems.png Table Items
@@ -533,8 +533,8 @@ int TQTableSelection::numCols() const
\value Never The cell is not editable.
The cell is actually editable only if TQTable::isRowReadOnly() is
- FALSE for its row, TQTable::isColumnReadOnly() is FALSE for its
- column, and TQTable::isReadOnly() is FALSE.
+ false for its row, TQTable::isColumnReadOnly() is false for its
+ column, and TQTable::isReadOnly() is false.
TQComboTableItems have an isEditable() property. This property is
used to indicate whether the user may enter their own text or are
@@ -557,10 +557,10 @@ int TQTableSelection::numCols() const
*/
TQTableItem::TQTableItem( TQTable *table, EditType et )
- : txt(), pix(), t( table ), edType( et ), wordwrap( FALSE ),
- tcha( TRUE ), rw( -1 ), cl( -1 ), rowspan( 1 ), colspan( 1 )
+ : txt(), pix(), t( table ), edType( et ), wordwrap( false ),
+ tcha( true ), rw( -1 ), cl( -1 ), rowspan( 1 ), colspan( 1 )
{
- enabled = TRUE;
+ enabled = true;
}
/*!
@@ -576,10 +576,10 @@ TQTableItem::TQTableItem( TQTable *table, EditType et )
*/
TQTableItem::TQTableItem( TQTable *table, EditType et, const TQString &text )
- : txt( text ), pix(), t( table ), edType( et ), wordwrap( FALSE ),
- tcha( TRUE ), rw( -1 ), cl( -1 ), rowspan( 1 ), colspan( 1 )
+ : txt( text ), pix(), t( table ), edType( et ), wordwrap( false ),
+ tcha( true ), rw( -1 ), cl( -1 ), rowspan( 1 ), colspan( 1 )
{
- enabled = TRUE;
+ enabled = true;
}
/*!
@@ -597,10 +597,10 @@ TQTableItem::TQTableItem( TQTable *table, EditType et, const TQString &text )
TQTableItem::TQTableItem( TQTable *table, EditType et,
const TQString &text, const TQPixmap &p )
- : txt( text ), pix( p ), t( table ), edType( et ), wordwrap( FALSE ),
- tcha( TRUE ), rw( -1 ), cl( -1 ), rowspan( 1 ), colspan( 1 )
+ : txt( text ), pix( p ), t( table ), edType( et ), wordwrap( false ),
+ tcha( true ), rw( -1 ), cl( -1 ), rowspan( 1 ), colspan( 1 )
{
- enabled = TRUE;
+ enabled = true;
}
/*!
@@ -719,7 +719,7 @@ void TQTableItem::setText( const TQString &str )
using the painter \a p in the rectangular area \a cr using the
color group \a cg.
- If \a selected is TRUE the cell is displayed in a way that
+ If \a selected is true the cell is displayed in a way that
indicates that it is highlighted.
You don't usually need to use this function but if you want to
@@ -734,7 +734,7 @@ void TQTableItem::setText( const TQString &str )
\code
p->setClipRect( table()->cellRect(row, col), TQPainter::ClipPainter );
//... your drawing code
- p->setClipping( FALSE );
+ p->setClipping( false );
\endcode
*/
@@ -787,7 +787,7 @@ sizeHint().
TQWidget *TQTableItem::createEditor() const
{
TQLineEdit *e = new TQLineEdit( table()->viewport(), "qt_tableeditor" );
- e->setFrame( FALSE );
+ e->setFrame( false );
e->setText( text() );
return e;
}
@@ -832,7 +832,7 @@ void TQTableItem::setContentFromEditor( TQWidget *w )
int TQTableItem::alignment() const
{
bool num;
- bool ok1 = FALSE, ok2 = FALSE;
+ bool ok1 = false, ok2 = false;
(void)text().toInt( &ok1 );
if ( !ok1 )
(void)text().toDouble( &ok2 ); // ### should be .-aligned
@@ -842,7 +842,7 @@ int TQTableItem::alignment() const
}
/*!
- If \a b is TRUE, the cell's text will be wrapped over multiple
+ If \a b is true, the cell's text will be wrapped over multiple
lines, when necessary, to fit the width of the cell; otherwise the
text will be written as a single line.
@@ -855,8 +855,8 @@ void TQTableItem::setWordWrap( bool b )
}
/*!
- Returns TRUE if word wrap is enabled for the cell; otherwise
- returns FALSE.
+ Returns true if word wrap is enabled for the cell; otherwise
+ returns false.
\sa setWordWrap()
*/
@@ -892,8 +892,8 @@ TQTableItem::EditType TQTableItem::editType() const
}
/*!
- If \a b is TRUE it is acceptable to replace the contents of the
- cell with the contents of another TQTableItem. If \a b is FALSE the
+ If \a b is true it is acceptable to replace the contents of the
+ cell with the contents of another TQTableItem. If \a b is false the
contents of the cell may not be replaced by the contents of
another table item. Table items that span more than one cell may
not have their contents replaced by another table item.
@@ -924,7 +924,7 @@ void TQTableItem::setReplaceable( bool b )
bool TQTableItem::isReplaceable() const
{
if ( rowspan > 1 || colspan > 1 )
- return FALSE;
+ return false;
return tcha;
}
@@ -1025,9 +1025,9 @@ void TQTableItem::setSpan( int rs, int cs )
for ( int c = 0; c < colspan; ++c ) {
if ( r == 0 && c == 0 )
continue;
- qt_update_cell_widget = FALSE;
+ qt_update_cell_widget = false;
table()->setItem( r + rw, c + cl, this );
- qt_update_cell_widget = TRUE;
+ qt_update_cell_widget = true;
rw = rrow;
cl = rcol;
}
@@ -1118,7 +1118,7 @@ int TQTableItem::col() const
}
/*!
- If \a b is TRUE, the table item is enabled; if \a b is FALSE the
+ If \a b is true, the table item is enabled; if \a b is false the
table item is disabled.
A disabled item doesn't respond to user interaction.
@@ -1135,7 +1135,7 @@ void TQTableItem::setEnabled( bool b )
}
/*!
- Returns TRUE if the table item is enabled; otherwise returns FALSE.
+ Returns true if the table item is enabled; otherwise returns false.
\sa setEnabled()
*/
@@ -1175,7 +1175,7 @@ bool TQTableItem::isEnabled() const
currentText(), and the text of a particular item can be retrieved
with text().
- If isEditable() is TRUE the TQComboTableItem will permit the user
+ If isEditable() is true the TQComboTableItem will permit the user
to either choose an existing list item, or create a new list item
by entering their own text; otherwise the user may only choose one
of the existing list items.
@@ -1201,11 +1201,11 @@ int TQComboTableItem::fakeRef = 0;
/*!
Creates a combo table item for the table \a table. The combobox's
list of items is passed in the \a list argument. If \a editable is
- TRUE the user may type in new list items; if \a editable is FALSE
+ true the user may type in new list items; if \a editable is false
the user may only select from the list of items provided.
By default TQComboTableItems cannot be replaced by other table
- items since isReplaceable() returns FALSE by default.
+ items since isReplaceable() returns false by default.
\sa TQTable::clearCell() EditType
*/
@@ -1213,10 +1213,10 @@ int TQComboTableItem::fakeRef = 0;
TQComboTableItem::TQComboTableItem( TQTable *table, const TQStringList &list, bool editable )
: TQTableItem( table, WhenCurrent, "" ), entries( list ), current( 0 ), edit( editable )
{
- setReplaceable( FALSE );
+ setReplaceable( false );
if ( !TQComboTableItem::fakeCombo ) {
TQComboTableItem::fakeComboWidget = new TQWidget( 0, 0 );
- TQComboTableItem::fakeCombo = new TQComboBox( FALSE, TQComboTableItem::fakeComboWidget, 0 );
+ TQComboTableItem::fakeCombo = new TQComboBox( false, TQComboTableItem::fakeComboWidget, 0 );
TQComboTableItem::fakeCombo->hide();
}
++TQComboTableItem::fakeRef;
@@ -1403,8 +1403,8 @@ TQString TQComboTableItem::text( int i ) const
}
/*!
- If \a b is TRUE the combo table item can be edited, i.e. the user
- may enter a new text item themselves. If \a b is FALSE the user may
+ If \a b is true the combo table item can be edited, i.e. the user
+ may enter a new text item themselves. If \a b is false the user may
may only choose one of the existing items.
\sa isEditable()
@@ -1416,8 +1416,8 @@ void TQComboTableItem::setEditable( bool b )
}
/*!
- Returns TRUE if the user can add their own list items to the
- combobox's list of items; otherwise returns FALSE.
+ Returns true if the user can add their own list items to the
+ combobox's list of items; otherwise returns false.
\sa setEditable()
*/
@@ -1503,7 +1503,7 @@ TQSize TQComboTableItem::sizeHint() const
*/
TQCheckTableItem::TQCheckTableItem( TQTable *table, const TQString &txt )
- : TQTableItem( table, WhenCurrent, txt ), checked( FALSE )
+ : TQTableItem( table, WhenCurrent, txt ), checked( false )
{
}
@@ -1578,7 +1578,7 @@ void TQCheckTableItem::paint( TQPainter *p, const TQColorGroup &cg,
}
/*!
- If \a b is TRUE the checkbox is checked; if \a b is FALSE the
+ If \a b is true the checkbox is checked; if \a b is false the
checkbox is unchecked.
\sa isChecked()
@@ -1595,8 +1595,8 @@ void TQCheckTableItem::setChecked( bool b )
}
/*!
- Returns TRUE if the checkbox table item is checked; otherwise
- returns FALSE.
+ Returns true if the checkbox table item is checked; otherwise
+ returns false.
\sa setChecked()
*/
@@ -1689,7 +1689,7 @@ TQSize TQCheckTableItem::sizeHint() const
the table showing column numbers. (The numbers displayed start at
1, although row and column numbers within TQTable begin at 0.)
- If you want to use mouse tracking call setMouseTracking( TRUE ) on
+ If you want to use mouse tracking call setMouseTracking( true ) on
the \e viewport; (see \link tqscrollview.html#allviews
TQScrollView\endlink).
@@ -1747,7 +1747,7 @@ TQSize TQCheckTableItem::sizeHint() const
independently of the user interface ordering.
The table can be sorted using sortColumn(). Users can sort a
- column by clicking its header if setSorting() is set to TRUE. Rows
+ column by clicking its header if setSorting() is set to true. Rows
can be swapped with swapRows(), columns with swapColumns() and
cells with swapCells().
@@ -2027,8 +2027,8 @@ TQSize TQCheckTableItem::sizeHint() const
TQTable::TQTable( TQWidget *parent, const char *name )
: TQScrollView( parent, name, WNoAutoErase | WStaticContents ),
leftHeader( 0 ), topHeader( 0 ),
- currentSel( 0 ), lastSortCol( -1 ), sGrid( TRUE ), mRows( FALSE ), mCols( FALSE ),
- asc( TRUE ), doSort( TRUE ), readOnly( FALSE )
+ currentSel( 0 ), lastSortCol( -1 ), sGrid( true ), mRows( false ), mCols( false ),
+ asc( true ), doSort( true ), readOnly( false )
{
init( 0, 0 );
}
@@ -2048,8 +2048,8 @@ TQTable::TQTable( TQWidget *parent, const char *name )
TQTable::TQTable( int numRows, int numCols, TQWidget *parent, const char *name )
: TQScrollView( parent, name, WNoAutoErase | WStaticContents ),
leftHeader( 0 ), topHeader( 0 ),
- currentSel( 0 ), lastSortCol( -1 ), sGrid( TRUE ), mRows( FALSE ), mCols( FALSE ),
- asc( TRUE ), doSort( TRUE ), readOnly( FALSE )
+ currentSel( 0 ), lastSortCol( -1 ), sGrid( true ), mRows( false ), mCols( false ),
+ asc( true ), doSort( true ), readOnly( false )
{
init( numRows, numCols );
}
@@ -2060,25 +2060,25 @@ TQTable::TQTable( int numRows, int numCols, TQWidget *parent, const char *name )
void TQTable::init( int rows, int cols )
{
#ifndef TQT_NO_DRAGANDDROP
- setDragAutoScroll( FALSE );
+ setDragAutoScroll( false );
#endif
d = new TQTablePrivate;
d->geomTimer = new TQTimer( this );
d->lastVisCol = 0;
d->lastVisRow = 0;
connect( d->geomTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( updateGeometriesSlot() ) );
- shouldClearSelection = FALSE;
- dEnabled = FALSE;
- roRows.setAutoDelete( TRUE );
- roCols.setAutoDelete( TRUE );
- setSorting( FALSE );
+ shouldClearSelection = false;
+ dEnabled = false;
+ roRows.setAutoDelete( true );
+ roCols.setAutoDelete( true );
+ setSorting( false );
- unused = TRUE; // It's unused, ain't it? :)
+ unused = true; // It's unused, ain't it? :)
selMode = Multi;
- contents.setAutoDelete( TRUE );
- widgets.setAutoDelete( TRUE );
+ contents.setAutoDelete( true );
+ widgets.setAutoDelete( true );
// Enable clipper and set background mode
enableClipper( qt_table_clipper_enabled );
@@ -2089,35 +2089,35 @@ void TQTable::init( int rows, int cols )
viewport()->setBackgroundMode( PaletteBase );
setBackgroundMode( PaletteBackground, PaletteBase );
setResizePolicy( Manual );
- selections.setAutoDelete( TRUE );
+ selections.setAutoDelete( true );
// Create headers
leftHeader = new TQTableHeader( rows, this, this, "left table header" );
leftHeader->setOrientation( Vertical );
- leftHeader->setTracking( TRUE );
- leftHeader->setMovingEnabled( TRUE );
+ leftHeader->setTracking( true );
+ leftHeader->setMovingEnabled( true );
topHeader = new TQTableHeader( cols, this, this, "right table header" );
topHeader->setOrientation( Horizontal );
- topHeader->setTracking( TRUE );
- topHeader->setMovingEnabled( TRUE );
+ topHeader->setTracking( true );
+ topHeader->setMovingEnabled( true );
if ( TQApplication::reverseLayout() )
setMargins( 0, fontMetrics().height() + 4, 30, 0 );
else
setMargins( 30, fontMetrics().height() + 4, 0, 0 );
- topHeader->setUpdatesEnabled( FALSE );
- leftHeader->setUpdatesEnabled( FALSE );
+ topHeader->setUpdatesEnabled( false );
+ leftHeader->setUpdatesEnabled( false );
// Initialize headers
int i = 0;
for ( i = 0; i < numCols(); ++i )
topHeader->resizeSection( i, TQMAX( 100, TQApplication::globalStrut().height() ) );
for ( i = 0; i < numRows(); ++i )
leftHeader->resizeSection( i, TQMAX( 20, TQApplication::globalStrut().width() ) );
- topHeader->setUpdatesEnabled( TRUE );
- leftHeader->setUpdatesEnabled( TRUE );
+ topHeader->setUpdatesEnabled( true );
+ leftHeader->setUpdatesEnabled( true );
// Prepare for contents
- contents.setAutoDelete( FALSE );
+ contents.setAutoDelete( false );
// Connect header, table and scrollbars
connect( horizontalScrollBar(), TQ_SIGNAL( valueChanged(int) ),
@@ -2145,13 +2145,13 @@ void TQTable::init( int rows, int cols )
edMode = NotEditing;
editRow = editCol = -1;
- drawActiveSelection = TRUE;
+ drawActiveSelection = true;
installEventFilter( this );
focusStl = SpreadSheet;
- was_visible = FALSE;
+ was_visible = false;
// initial size
resize( 640, 480 );
@@ -2164,8 +2164,8 @@ void TQTable::init( int rows, int cols )
TQTable::~TQTable()
{
- setUpdatesEnabled( FALSE );
- contents.setAutoDelete( TRUE );
+ setUpdatesEnabled( false );
+ contents.setAutoDelete( true );
contents.clear();
widgets.clear();
@@ -2178,7 +2178,7 @@ void TQTable::setReadOnly( bool b )
TQTableItem *i = item(curRow, curCol);
if (readOnly && isEditing()) {
- endEdit(editRow, editCol, TRUE, FALSE);
+ endEdit(editRow, editCol, true, false);
} else if (!readOnly && i && (i->editType() == TQTableItem::WhenCurrent
|| i->editType() == TQTableItem::Always)) {
editCell(curRow, curCol);
@@ -2186,7 +2186,7 @@ void TQTable::setReadOnly( bool b )
}
/*!
- If \a ro is TRUE, row \a row is set to be read-only; otherwise the
+ If \a ro is true, row \a row is set to be read-only; otherwise the
row is set to be editable.
Whether a cell in this row is editable or read-only depends on the
@@ -2206,7 +2206,7 @@ void TQTable::setRowReadOnly( int row, bool ro )
if (curRow == row) {
TQTableItem *i = item(curRow, curCol);
if (ro && isEditing()) {
- endEdit(editRow, editCol, TRUE, FALSE);
+ endEdit(editRow, editCol, true, false);
} else if (!ro && i && (i->editType() == TQTableItem::WhenCurrent
|| i->editType() == TQTableItem::Always)) {
editCell(curRow, curCol);
@@ -2215,7 +2215,7 @@ void TQTable::setRowReadOnly( int row, bool ro )
}
/*!
- If \a ro is TRUE, column \a col is set to be read-only; otherwise
+ If \a ro is true, column \a col is set to be read-only; otherwise
the column is set to be editable.
Whether a cell in this column is editable or read-only depends on
@@ -2236,7 +2236,7 @@ void TQTable::setColumnReadOnly( int col, bool ro )
if (curCol == col) {
TQTableItem *i = item(curRow, curCol);
if (ro && isEditing()) {
- endEdit(editRow, editCol, TRUE, FALSE);
+ endEdit(editRow, editCol, true, false);
} else if (!ro && i && (i->editType() == TQTableItem::WhenCurrent
|| i->editType() == TQTableItem::Always)) {
editCell(curRow, curCol);
@@ -2262,7 +2262,7 @@ bool TQTable::isReadOnly() const
}
/*!
- Returns TRUE if row \a row is read-only; otherwise returns FALSE.
+ Returns true if row \a row is read-only; otherwise returns false.
Whether a cell in this row is editable or read-only depends on the
cell's \link TQTableItem::EditType EditType\endlink, and this
@@ -2278,8 +2278,8 @@ bool TQTable::isRowReadOnly( int row ) const
}
/*!
- Returns TRUE if column \a col is read-only; otherwise returns
- FALSE.
+ Returns true if column \a col is read-only; otherwise returns
+ false.
Whether a cell in this column is editable or read-only depends on
the cell's EditType, and this setting: see \link
@@ -2352,8 +2352,8 @@ TQTable::FocusStyle TQTable::focusStyle() const
void TQTable::updateHeaderStates()
{
- horizontalHeader()->setUpdatesEnabled( FALSE );
- verticalHeader()->setUpdatesEnabled( FALSE );
+ horizontalHeader()->setUpdatesEnabled( false );
+ verticalHeader()->setUpdatesEnabled( false );
( (TQTableHeader*)verticalHeader() )->setSectionStateToAll( TQTableHeader::Normal );
( (TQTableHeader*)horizontalHeader() )->setSectionStateToAll( TQTableHeader::Normal );
@@ -2376,10 +2376,10 @@ void TQTable::updateHeaderStates()
}
}
- horizontalHeader()->setUpdatesEnabled( TRUE );
- verticalHeader()->setUpdatesEnabled( TRUE );
- horizontalHeader()->repaint( FALSE );
- verticalHeader()->repaint( FALSE );
+ horizontalHeader()->setUpdatesEnabled( true );
+ verticalHeader()->setUpdatesEnabled( true );
+ horizontalHeader()->repaint( false );
+ verticalHeader()->repaint( false );
}
/*!
@@ -2437,7 +2437,7 @@ bool TQTable::showGrid() const
\property TQTable::columnMovingEnabled
\brief whether columns can be moved by the user
- The default is FALSE. Columns are moved by dragging whilst holding
+ The default is false. Columns are moved by dragging whilst holding
down the Ctrl key.
\warning If TQTable is used to move header sections as a result of user
@@ -2463,7 +2463,7 @@ bool TQTable::columnMovingEnabled() const
\property TQTable::rowMovingEnabled
\brief whether rows can be moved by the user
- The default is FALSE. Rows are moved by dragging whilst holding
+ The default is false. Rows are moved by dragging whilst holding
down the Ctrl key.
\warning If TQTable is used to move header sections as a result of user
@@ -2511,7 +2511,7 @@ void TQTable::resizeData( int len )
swap rows, e.g. for sorting, you will need to reimplement this
function. (See the notes on large tables.)
- If \a swapHeader is TRUE, the rows' header contents is also
+ If \a swapHeader is true, the rows' header contents is also
swapped.
This function will not update the TQTable, you will have to do
@@ -2523,7 +2523,7 @@ void TQTable::resizeData( int len )
void TQTable::swapRows( int row1, int row2, bool swapHeader )
{
if ( swapHeader )
- leftHeader->swapSections( row1, row2, FALSE );
+ leftHeader->swapSections( row1, row2, false );
TQPtrVector<TQTableItem> tmpContents;
tmpContents.resize( numCols() );
@@ -2531,8 +2531,8 @@ void TQTable::swapRows( int row1, int row2, bool swapHeader )
tmpWidgets.resize( numCols() );
int i;
- contents.setAutoDelete( FALSE );
- widgets.setAutoDelete( FALSE );
+ contents.setAutoDelete( false );
+ widgets.setAutoDelete( false );
for ( i = 0; i < numCols(); ++i ) {
TQTableItem *i1, *i2;
i1 = item( row1, i );
@@ -2560,8 +2560,8 @@ void TQTable::swapRows( int row1, int row2, bool swapHeader )
widgets.insert( indexOf( row2, i ), tmpWidgets[ i ] );
}
}
- contents.setAutoDelete( FALSE );
- widgets.setAutoDelete( TRUE );
+ contents.setAutoDelete( false );
+ widgets.setAutoDelete( true );
updateRowWidgets( row1 );
updateRowWidgets( row2 );
@@ -2623,7 +2623,7 @@ void TQTable::setTopMargin( int m )
swap columns you will need to reimplement this function. (See the
notes on large tables.)
- If \a swapHeader is TRUE, the columns' header contents is also
+ If \a swapHeader is true, the columns' header contents is also
swapped.
\sa swapCells()
@@ -2632,7 +2632,7 @@ void TQTable::setTopMargin( int m )
void TQTable::swapColumns( int col1, int col2, bool swapHeader )
{
if ( swapHeader )
- topHeader->swapSections( col1, col2, FALSE );
+ topHeader->swapSections( col1, col2, false );
TQPtrVector<TQTableItem> tmpContents;
tmpContents.resize( numRows() );
@@ -2640,8 +2640,8 @@ void TQTable::swapColumns( int col1, int col2, bool swapHeader )
tmpWidgets.resize( numRows() );
int i;
- contents.setAutoDelete( FALSE );
- widgets.setAutoDelete( FALSE );
+ contents.setAutoDelete( false );
+ widgets.setAutoDelete( false );
for ( i = 0; i < numRows(); ++i ) {
TQTableItem *i1, *i2;
i1 = item( i, col1 );
@@ -2669,8 +2669,8 @@ void TQTable::swapColumns( int col1, int col2, bool swapHeader )
widgets.insert( indexOf( i, col2 ), tmpWidgets[ i ] );
}
}
- contents.setAutoDelete( FALSE );
- widgets.setAutoDelete( TRUE );
+ contents.setAutoDelete( false );
+ widgets.setAutoDelete( true );
columnWidthChanged( col1 );
columnWidthChanged( col2 );
@@ -2699,8 +2699,8 @@ void TQTable::swapColumns( int col1, int col2, bool swapHeader )
void TQTable::swapCells( int row1, int col1, int row2, int col2 )
{
- contents.setAutoDelete( FALSE );
- widgets.setAutoDelete( FALSE );
+ contents.setAutoDelete( false );
+ widgets.setAutoDelete( false );
TQTableItem *i1, *i2;
i1 = item( row1, col1 );
i2 = item( row2, col2 );
@@ -2735,18 +2735,18 @@ void TQTable::swapCells( int row1, int col1, int row2, int col2 )
updateRowWidgets( row2 );
updateColWidgets( col1 );
updateColWidgets( col2 );
- contents.setAutoDelete( FALSE );
- widgets.setAutoDelete( TRUE );
+ contents.setAutoDelete( false );
+ widgets.setAutoDelete( true );
}
static bool is_child_of( TQWidget *child, TQWidget *parent )
{
while ( child ) {
if ( child == parent )
- return TRUE;
+ return true;
child = child->parentWidget();
}
- return FALSE;
+ return false;
}
/*!
@@ -2778,7 +2778,7 @@ void TQTable::drawContents( TQPainter *p, int cx, int cy, int cw, int ch )
if ( collast == -1 )
collast = numCols() - 1;
- bool currentInSelection = FALSE;
+ bool currentInSelection = false;
TQPtrListIterator<TQTableSelection> it( selections );
TQTableSelection *s;
@@ -2835,7 +2835,7 @@ void TQTable::drawContents( TQPainter *p, int cx, int cy, int cw, int ch )
bool selected = isSelected( r, c );
if ( focusStl != FollowStyle && selected && !currentInSelection &&
r == curRow && c == curCol )
- selected = FALSE;
+ selected = false;
paintCell( p, r, c, TQRect( colp, rowp, colw, rowh ), selected );
p->translate( -colp, -rowp );
@@ -2862,7 +2862,7 @@ void TQTable::drawContents( TQPainter *p, int cx, int cy, int cw, int ch )
// Paint empty rects
paintEmptyArea( p, cx, cy, cw, ch );
- drawActiveSelection = TRUE;
+ drawActiveSelection = true;
}
/*!
@@ -2920,7 +2920,7 @@ void TQTable::paintCell( TQPainter* p, int row, int col,
has already been translated to the cell's origin. \a cr describes
the cell coordinates in the content coordinate system.
- If \a selected is TRUE the cell is highlighted.
+ If \a selected is true the cell is highlighted.
\a cg is the colorgroup which should be used to draw the cell
content.
@@ -2944,7 +2944,7 @@ void TQTable::paintCell( TQPainter* p, int row, int col,
\code
p->setClipRect( cellRect(row, col), TQPainter::CoordPainter );
//... your drawing code
- p->setClipping( FALSE );
+ p->setClipping( false );
\endcode
*/
@@ -2954,7 +2954,7 @@ void TQTable::paintCell( TQPainter *p, int row, int col,
if ( focusStl == SpreadSheet && selected &&
row == curRow &&
col == curCol && ( hasFocus() || viewport()->hasFocus() ) )
- selected = FALSE;
+ selected = false;
int w = cr.width();
int h = cr.height();
@@ -3011,10 +3011,10 @@ void TQTable::paintFocus( TQPainter *p, const TQRect &cr )
p->drawRect( focusRect.x(), focusRect.y(), focusRect.width() - 1, focusRect.height() - 1 );
p->drawRect( focusRect.x() - 1, focusRect.y() - 1, focusRect.width() + 1, focusRect.height() + 1 );
} else {
- TQColor c = isSelected( curRow, curCol, FALSE ) ?
+ TQColor c = isSelected( curRow, curCol, false ) ?
colorGroup().highlight() : colorGroup().base();
style().drawPrimitive( TQStyle::PE_FocusRect, p, focusRect, colorGroup(),
- ( isSelected( curRow, curCol, FALSE ) ?
+ ( isSelected( curRow, curCol, false ) ?
TQStyle::Style_FocusAtBorder :
TQStyle::Style_Default ),
TQStyleOption(c) );
@@ -3107,7 +3107,7 @@ void TQTable::setItem( int row, int col, TQTableItem *item )
item->updateEditor( orow, ocol );
if ( row == curRow && col == curCol && item->editType() == TQTableItem::WhenCurrent ) {
- if ( beginEdit( row, col, FALSE ) )
+ if ( beginEdit( row, col, false ) )
setEditMode( Editing, row, col );
}
}
@@ -3124,9 +3124,9 @@ void TQTable::clearCell( int row, int col )
if ( (int)contents.size() != numRows() * numCols() )
resizeData( numRows() * numCols() );
clearCellWidget( row, col );
- contents.setAutoDelete( TRUE );
+ contents.setAutoDelete( true );
contents.remove( indexOf( row, col ) );
- contents.setAutoDelete( FALSE );
+ contents.setAutoDelete( false );
}
/*!
@@ -3219,7 +3219,7 @@ TQPixmap TQTable::pixmap( int row, int col ) const
void TQTable::setCurrentCell( int row, int col )
{
- setCurrentCell( row, col, TRUE, TRUE );
+ setCurrentCell( row, col, true, true );
}
// need to use a define, as leftMargin() is protected
@@ -3247,7 +3247,7 @@ void TQTable::setCurrentCell( int row, int col, bool updateSelections, bool ensu
TQTableItem *itm = oldItem;
if ( itm && itm->editType() != TQTableItem::Always && itm->editType() != TQTableItem::Never )
- endEdit( itm->row(), itm->col(), TRUE, FALSE );
+ endEdit( itm->row(), itm->col(), true, false );
int oldRow = curRow;
int oldCol = curCol;
curRow = row;
@@ -3263,14 +3263,14 @@ void TQTable::setCurrentCell( int row, int col, bool updateSelections, bool ensu
topHeader->setSectionState( oldCol, TQTableHeader::Normal );
else if ( isRowSelection( selectionMode() ) )
topHeader->setSectionState( oldCol, TQTableHeader::Selected );
- topHeader->setSectionState( curCol, isColumnSelected( curCol, TRUE ) ?
+ topHeader->setSectionState( curCol, isColumnSelected( curCol, true ) ?
TQTableHeader::Selected : TQTableHeader::Bold );
}
if ( oldRow != curRow ) {
if ( !isRowSelected( oldRow ) )
leftHeader->setSectionState( oldRow, TQTableHeader::Normal );
- leftHeader->setSectionState( curRow, isRowSelected( curRow, TRUE ) ?
+ leftHeader->setSectionState( curRow, isRowSelected( curRow, true ) ?
TQTableHeader::Selected : TQTableHeader::Bold );
}
@@ -3286,7 +3286,7 @@ void TQTable::setCurrentCell( int row, int col, bool updateSelections, bool ensu
viewport()->setFocus();
if ( itm && itm->editType() == TQTableItem::WhenCurrent ) {
- if ( beginEdit( itm->row(), itm->col(), FALSE ) )
+ if ( beginEdit( itm->row(), itm->col(), false ) )
setEditMode( Editing, itm->row(), itm->col() );
} else if ( itm && itm->editType() == TQTableItem::Always ) {
if ( cellWidget( itm->row(), itm->col() ) )
@@ -3294,7 +3294,7 @@ void TQTable::setCurrentCell( int row, int col, bool updateSelections, bool ensu
}
if ( updateSelections && isRowSelection( selectionMode() ) &&
- !isSelected( curRow, curCol, FALSE ) ) {
+ !isSelected( curRow, curCol, false ) ) {
if ( selectionMode() == TQTable::SingleRow )
clearSelection();
currentSel = new TQTableSelection();
@@ -3323,15 +3323,15 @@ void TQTable::ensureCellVisible( int row, int col )
}
/*!
- Returns TRUE if the cell at \a row, \a col is selected; otherwise
- returns FALSE.
+ Returns true if the cell at \a row, \a col is selected; otherwise
+ returns false.
\sa isRowSelected() isColumnSelected()
*/
bool TQTable::isSelected( int row, int col ) const
{
- return isSelected( row, col, TRUE );
+ return isSelected( row, col, true );
}
/*! \internal */
@@ -3347,18 +3347,18 @@ bool TQTable::isSelected( int row, int col, bool includeCurrent ) const
row <= s->bottomRow() &&
col >= s->leftCol() &&
col <= s->rightCol() )
- return TRUE;
+ return true;
if ( includeCurrent && row == currentRow() && col == currentColumn() )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/*!
- Returns TRUE if row \a row is selected; otherwise returns FALSE.
+ Returns true if row \a row is selected; otherwise returns false.
- If \a full is FALSE (the default), 'row is selected' means that at
- least one cell in the row is selected. If \a full is TRUE, then 'row
+ If \a full is false (the default), 'row is selected' means that at
+ least one cell in the row is selected. If \a full is true, then 'row
is selected' means every cell in the row is selected.
\sa isColumnSelected() isSelected()
@@ -3374,9 +3374,9 @@ bool TQTable::isRowSelected( int row, bool full ) const
if ( s->isActive() &&
row >= s->topRow() &&
row <= s->bottomRow() )
- return TRUE;
+ return true;
if ( row == currentRow() )
- return TRUE;
+ return true;
}
} else {
TQPtrListIterator<TQTableSelection> it( selections );
@@ -3388,17 +3388,17 @@ bool TQTable::isRowSelected( int row, bool full ) const
row <= s->bottomRow() &&
s->leftCol() == 0 &&
s->rightCol() == numCols() - 1 )
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
/*!
- Returns TRUE if column \a col is selected; otherwise returns FALSE.
+ Returns true if column \a col is selected; otherwise returns false.
- If \a full is FALSE (the default), 'column is selected' means that
- at least one cell in the column is selected. If \a full is TRUE,
+ If \a full is false (the default), 'column is selected' means that
+ at least one cell in the column is selected. If \a full is true,
then 'column is selected' means every cell in the column is
selected.
@@ -3415,9 +3415,9 @@ bool TQTable::isColumnSelected( int col, bool full ) const
if ( s->isActive() &&
col >= s->leftCol() &&
col <= s->rightCol() )
- return TRUE;
+ return true;
if ( col == currentColumn() )
- return TRUE;
+ return true;
}
} else {
TQPtrListIterator<TQTableSelection> it( selections );
@@ -3429,10 +3429,10 @@ bool TQTable::isColumnSelected( int col, bool full ) const
col <= s->rightCol() &&
s->topRow() == 0 &&
s->bottomRow() == numRows() - 1 )
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
/*!
@@ -3485,7 +3485,7 @@ int TQTable::addSelection( const TQTableSelection &s )
selections.append( sel );
- repaintSelections( 0, sel, TRUE, TRUE );
+ repaintSelections( 0, sel, true, true );
emit selectionChanged();
@@ -3501,17 +3501,17 @@ int TQTable::addSelection( const TQTableSelection &s )
void TQTable::removeSelection( const TQTableSelection &s )
{
- selections.setAutoDelete( FALSE );
+ selections.setAutoDelete( false );
for ( TQTableSelection *sel = selections.first(); sel; sel = selections.next() ) {
if ( s == *sel ) {
selections.removeRef( sel );
- repaintSelections( sel, 0, TRUE, TRUE );
+ repaintSelections( sel, 0, true, true );
if ( sel == currentSel )
currentSel = 0;
delete sel;
}
}
- selections.setAutoDelete( TRUE );
+ selections.setAutoDelete( true );
emit selectionChanged();
}
@@ -3532,7 +3532,7 @@ void TQTable::removeSelection( int num )
if ( s == currentSel )
currentSel = 0;
selections.removeRef( s );
- repaintContents( FALSE );
+ repaintContents( false );
}
/*!
@@ -3579,7 +3579,7 @@ void TQTable::selectRow( int row )
row = TQMIN(numRows()-1, row);
if ( row < 0 )
return;
- bool isDataTable = FALSE;
+ bool isDataTable = false;
#ifndef TQT_NO_SQL
isDataTable = ::tqt_cast<TQDataTable*>(this) != 0;
#endif
@@ -3613,17 +3613,17 @@ void TQTable::contentsMousePressEvent( TQMouseEvent* e )
void TQTable::contentsMousePressEventEx( TQMouseEvent* e )
{
- shouldClearSelection = FALSE;
+ shouldClearSelection = false;
if ( isEditing() ) {
if ( !cellGeometry( editRow, editCol ).contains( e->pos() ) ) {
- endEdit( editRow, editCol, TRUE, edMode != Editing );
+ endEdit( editRow, editCol, true, edMode != Editing );
} else {
e->ignore();
return;
}
}
- d->redirectMouseEvent = FALSE;
+ d->redirectMouseEvent = false;
int tmpRow = rowAt( e->pos().y() );
int tmpCol = columnAt( e->pos().x() );
@@ -3649,7 +3649,7 @@ void TQTable::contentsMousePressEventEx( TQMouseEvent* e )
if ( ( e->state() & ShiftButton ) == ShiftButton ) {
int oldRow = curRow;
int oldCol = curCol;
- setCurrentCell( tmpRow, tmpCol, selMode == SingleRow, TRUE );
+ setCurrentCell( tmpRow, tmpCol, selMode == SingleRow, true );
if ( selMode != NoSelection && selMode != SingleRow ) {
if ( !currentSel ) {
currentSel = new TQTableSelection();
@@ -3668,11 +3668,11 @@ void TQTable::contentsMousePressEventEx( TQMouseEvent* e )
emit selectionChanged();
}
} else if ( ( e->state() & ControlButton ) == ControlButton ) {
- setCurrentCell( tmpRow, tmpCol, FALSE, TRUE );
+ setCurrentCell( tmpRow, tmpCol, false, true );
if ( selMode != NoSelection ) {
- if ( selMode == Single || ( selMode == SingleRow && !isSelected( tmpRow, tmpCol, FALSE ) ) )
+ if ( selMode == Single || ( selMode == SingleRow && !isSelected( tmpRow, tmpCol, false ) ) )
clearSelection();
- if ( !(selMode == SingleRow && isSelected( tmpRow, tmpCol, FALSE )) ) {
+ if ( !(selMode == SingleRow && isSelected( tmpRow, tmpCol, false )) ) {
currentSel = new TQTableSelection();
selections.append( currentSel );
if ( !isRowSelection( selectionMode() ) ) {
@@ -3687,7 +3687,7 @@ void TQTable::contentsMousePressEventEx( TQMouseEvent* e )
}
}
} else {
- setCurrentCell( tmpRow, tmpCol, FALSE, TRUE );
+ setCurrentCell( tmpRow, tmpCol, false, true );
TQTableItem *itm = item( tmpRow, tmpCol );
if ( itm && itm->editType() == TQTableItem::WhenCurrent ) {
TQWidget *w = cellWidget( tmpRow, tmpCol );
@@ -3696,15 +3696,15 @@ void TQTable::contentsMousePressEventEx( TQMouseEvent* e )
e->globalPos(), e->button(), e->state() );
TQApplication::sendPostedEvents( w, 0 );
TQApplication::sendEvent( w, &ev );
- d->redirectMouseEvent = TRUE;
+ d->redirectMouseEvent = true;
}
}
- if ( isSelected( tmpRow, tmpCol, FALSE ) ) {
- shouldClearSelection = TRUE;
+ if ( isSelected( tmpRow, tmpCol, false ) ) {
+ shouldClearSelection = true;
} else {
bool b = signalsBlocked();
if ( selMode != NoSelection )
- blockSignals( TRUE );
+ blockSignals( true );
clearSelection();
blockSignals( b );
if ( selMode != NoSelection ) {
@@ -3741,7 +3741,7 @@ void TQTable::contentsMouseDoubleClickEvent( TQMouseEvent *e )
if ( itm && !itm->isEnabled() )
return;
if ( tmpRow != -1 && tmpCol != -1 ) {
- if ( beginEdit( tmpRow, tmpCol, FALSE ) )
+ if ( beginEdit( tmpRow, tmpCol, false ) )
setEditMode( Editing, tmpRow, tmpCol );
}
@@ -3783,7 +3783,7 @@ void TQTable::contentsMouseMoveEvent( TQMouseEvent *e )
}
#endif
if ( selectionMode() == MultiRow && ( e->state() & ControlButton ) == ControlButton )
- shouldClearSelection = FALSE;
+ shouldClearSelection = false;
if ( shouldClearSelection ) {
clearSelection();
@@ -3796,7 +3796,7 @@ void TQTable::contentsMouseMoveEvent( TQMouseEvent *e )
currentSel->init( tmpRow, 0 );
emit selectionChanged();
}
- shouldClearSelection = FALSE;
+ shouldClearSelection = false;
}
TQPoint pos = mapFromGlobal( e->globalPos() );
@@ -3804,7 +3804,7 @@ void TQTable::contentsMouseMoveEvent( TQMouseEvent *e )
autoScrollTimer->stop();
doAutoScroll();
if ( pos.x() < 0 || pos.x() > visibleWidth() || pos.y() < 0 || pos.y() > visibleHeight() )
- autoScrollTimer->start( 100, TRUE );
+ autoScrollTimer->start( 100, true );
}
/*! \internal
@@ -3854,7 +3854,7 @@ void TQTable::doAutoScroll()
if ( currentSel && selMode != NoSelection ) {
TQTableSelection oldSelection = *currentSel;
- bool useOld = TRUE;
+ bool useOld = true;
if ( selMode != SingleRow ) {
if ( !isRowSelection( selectionMode() ) ) {
currentSel->expandTo( tmpRow, tmpCol );
@@ -3864,7 +3864,7 @@ void TQTable::doAutoScroll()
} else {
bool currentInSelection = tmpRow == curRow && isSelected( tmpRow, tmpCol );
if ( !currentInSelection ) {
- useOld = FALSE;
+ useOld = false;
clearSelection();
currentSel = new TQTableSelection();
selections.append( currentSel );
@@ -3875,16 +3875,16 @@ void TQTable::doAutoScroll()
currentSel->expandTo( tmpRow, numCols() - 1 );
}
}
- setCurrentCell( tmpRow, tmpCol, FALSE, TRUE );
+ setCurrentCell( tmpRow, tmpCol, false, true );
repaintSelections( useOld ? &oldSelection : 0, currentSel );
if ( currentSel && oldSelection != *currentSel )
emit selectionChanged();
} else {
- setCurrentCell( tmpRow, tmpCol, FALSE, TRUE );
+ setCurrentCell( tmpRow, tmpCol, false, true );
}
if ( pos.x() < 0 || pos.x() > visibleWidth() || pos.y() < 0 || pos.y() > visibleHeight() )
- autoScrollTimer->start( 100, TRUE );
+ autoScrollTimer->start( 100, true );
}
/*! \reimp
@@ -3915,7 +3915,7 @@ void TQTable::contentsMouseReleaseEvent( TQMouseEvent *e )
}
emit selectionChanged();
}
- shouldClearSelection = FALSE;
+ shouldClearSelection = false;
}
autoScrollTimer->stop();
@@ -3976,26 +3976,26 @@ bool TQTable::eventFilter( TQObject *o, TQEvent *e )
TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ke->key() == Key_Escape ) {
if ( !itm || itm->editType() == TQTableItem::OnTyping )
- endEdit( editRow, editCol, FALSE, edMode != Editing );
- return TRUE;
+ endEdit( editRow, editCol, false, edMode != Editing );
+ return true;
}
if ( ( ke->state() == NoButton || ke->state() == Keypad )
&& ( ke->key() == Key_Return || ke->key() == Key_Enter ) ) {
if ( !itm || itm->editType() == TQTableItem::OnTyping )
- endEdit( editRow, editCol, TRUE, edMode != Editing );
+ endEdit( editRow, editCol, true, edMode != Editing );
activateNextCell();
- return TRUE;
+ return true;
}
if ( ke->key() == Key_Tab || ke->key() == Key_BackTab ) {
if ( ke->state() & TQt::ControlButton )
- return FALSE;
+ return false;
if ( !itm || itm->editType() == TQTableItem::OnTyping )
- endEdit( editRow, editCol, TRUE, edMode != Editing );
+ endEdit( editRow, editCol, true, edMode != Editing );
if ( (ke->key() == Key_Tab) && !(ke->state() & ShiftButton) ) {
if ( currentColumn() >= numCols() - 1 )
- return TRUE;
+ return true;
int cc = TQMIN( numCols() - 1, currentColumn() + 1 );
while ( cc < numCols() ) {
TQTableItem *i = item( currentRow(), cc );
@@ -4006,7 +4006,7 @@ bool TQTable::eventFilter( TQObject *o, TQEvent *e )
setCurrentCell( currentRow(), cc );
} else { // Key_BackTab
if ( currentColumn() == 0 )
- return TRUE;
+ return true;
int cc = TQMAX( 0, currentColumn() - 1 );
while ( cc >= 0 ) {
TQTableItem *i = item( currentRow(), cc );
@@ -4017,9 +4017,9 @@ bool TQTable::eventFilter( TQObject *o, TQEvent *e )
setCurrentCell( currentRow(), cc );
}
itm = item( curRow, curCol );
- if ( beginEdit( curRow, curCol, FALSE ) )
+ if ( beginEdit( curRow, curCol, false ) )
setEditMode( Editing, curRow, curCol );
- return TRUE;
+ return true;
}
if ( ( edMode == Replacing ||
@@ -4029,10 +4029,10 @@ bool TQTable::eventFilter( TQObject *o, TQEvent *e )
ke->key() == Key_Next || ke->key() == Key_End ||
ke->key() == Key_Left || ke->key() == Key_Right ) ) {
if ( !itm || itm->editType() == TQTableItem::OnTyping ) {
- endEdit( editRow, editCol, TRUE, edMode != Editing );
+ endEdit( editRow, editCol, true, edMode != Editing );
}
keyPressEvent( ke );
- return TRUE;
+ return true;
}
} else {
TQObjectList *l = viewport()->queryList( "TQWidget" );
@@ -4044,9 +4044,9 @@ bool TQTable::eventFilter( TQObject *o, TQEvent *e )
ke->key() != Key_Up && ke->key() != Key_Down &&
ke->key() != Key_Prior && ke->key() != Key_Next &&
ke->key() != Key_Home && ke->key() != Key_End ) )
- return FALSE;
+ return false;
keyPressEvent( (TQKeyEvent*)e );
- return TRUE;
+ return true;
}
delete l;
}
@@ -4056,8 +4056,8 @@ bool TQTable::eventFilter( TQObject *o, TQEvent *e )
if ( isEditing() && editorWidget && o == editorWidget && ( (TQFocusEvent*)e )->reason() != TQFocusEvent::Popup ) {
TQTableItem *itm = item( editRow, editCol );
if ( !itm || itm->editType() == TQTableItem::OnTyping ) {
- endEdit( editRow, editCol, TRUE, edMode != Editing );
- return TRUE;
+ endEdit( editRow, editCol, true, edMode != Editing );
+ return true;
}
}
break;
@@ -4067,7 +4067,7 @@ bool TQTable::eventFilter( TQObject *o, TQEvent *e )
TQWheelEvent* we = (TQWheelEvent*)e;
scrollBy( 0, -we->delta() );
we->accept();
- return TRUE;
+ return true;
}
#endif
default:
@@ -4126,30 +4126,30 @@ void TQTable::keyPressEvent( TQKeyEvent* e )
int oldRow = tmpRow;
int oldCol = tmpCol;
- bool navigationKey = FALSE;
+ bool navigationKey = false;
int r;
switch ( e->key() ) {
case Key_Left:
tmpCol = TQMAX( 0, tmpCol - 1 );
- navigationKey = TRUE;
+ navigationKey = true;
break;
case Key_Right:
tmpCol = TQMIN( numCols() - 1, tmpCol + 1 );
- navigationKey = TRUE;
+ navigationKey = true;
break;
case Key_Up:
tmpRow = TQMAX( 0, tmpRow - 1 );
- navigationKey = TRUE;
+ navigationKey = true;
break;
case Key_Down:
tmpRow = TQMIN( numRows() - 1, tmpRow + 1 );
- navigationKey = TRUE;
+ navigationKey = true;
break;
case Key_Prior:
r = TQMAX( 0, rowAt( rowPos( tmpRow ) - visibleHeight() ) );
if ( r < tmpRow || tmpRow < 0 )
tmpRow = r;
- navigationKey = TRUE;
+ navigationKey = true;
break;
case Key_Next:
r = TQMIN( numRows() - 1, rowAt( rowPos( tmpRow ) + visibleHeight() ) );
@@ -4157,18 +4157,18 @@ void TQTable::keyPressEvent( TQKeyEvent* e )
tmpRow = r;
else
tmpRow = numRows() - 1;
- navigationKey = TRUE;
+ navigationKey = true;
break;
case Key_Home:
tmpRow = 0;
- navigationKey = TRUE;
+ navigationKey = true;
break;
case Key_End:
tmpRow = numRows() - 1;
- navigationKey = TRUE;
+ navigationKey = true;
break;
case Key_F2:
- if ( beginEdit( tmpRow, tmpCol, FALSE ) )
+ if ( beginEdit( tmpRow, tmpCol, false ) )
setEditMode( Editing, tmpRow, tmpCol );
break;
case Key_Enter: case Key_Return:
@@ -4207,7 +4207,7 @@ void TQTable::keyPressEvent( TQKeyEvent* e )
TQTableItem *itm = item( tmpRow, tmpCol );
if ( !itm || itm->editType() == TQTableItem::OnTyping ) {
TQWidget *w = beginEdit( tmpRow, tmpCol,
- itm ? itm->isReplaceable() : TRUE );
+ itm ? itm->isReplaceable() : true );
if ( w ) {
setEditMode( ( !itm || ( itm && itm->isReplaceable() )
? Replacing : Editing ), tmpRow, tmpCol );
@@ -4224,10 +4224,10 @@ void TQTable::keyPressEvent( TQKeyEvent* e )
fixCell( tmpRow, tmpCol, e->key() );
if ( ( e->state() & ShiftButton ) == ShiftButton &&
selMode != NoSelection && selMode != SingleRow ) {
- bool justCreated = FALSE;
- setCurrentCell( tmpRow, tmpCol, FALSE, TRUE );
+ bool justCreated = false;
+ setCurrentCell( tmpRow, tmpCol, false, true );
if ( !currentSel ) {
- justCreated = TRUE;
+ justCreated = true;
currentSel = new TQTableSelection();
selections.append( currentSel );
if ( !isRowSelection( selectionMode() ) )
@@ -4243,23 +4243,23 @@ void TQTable::keyPressEvent( TQKeyEvent* e )
repaintSelections( justCreated ? 0 : &oldSelection, currentSel );
emit selectionChanged();
} else {
- setCurrentCell( tmpRow, tmpCol, FALSE, TRUE );
+ setCurrentCell( tmpRow, tmpCol, false, true );
if ( !isRowSelection( selectionMode() ) ) {
clearSelection();
} else {
- bool currentInSelection = tmpRow == oldRow && isSelected( tmpRow, tmpCol, FALSE );
+ bool currentInSelection = tmpRow == oldRow && isSelected( tmpRow, tmpCol, false );
if ( !currentInSelection ) {
- bool hasOldSel = FALSE;
+ bool hasOldSel = false;
TQTableSelection oldSelection;
if ( selectionMode() == MultiRow ) {
bool b = signalsBlocked();
- blockSignals( TRUE );
+ blockSignals( true );
clearSelection();
blockSignals( b );
} else {
if ( currentSel ) {
oldSelection = *currentSel;
- hasOldSel = TRUE;
+ hasOldSel = true;
selections.removeRef( currentSel );
leftHeader->setSectionState( oldSelection.topRow(), TQTableHeader::Normal );
}
@@ -4274,7 +4274,7 @@ void TQTable::keyPressEvent( TQKeyEvent* e )
}
}
} else {
- setCurrentCell( tmpRow, tmpCol, FALSE, TRUE );
+ setCurrentCell( tmpRow, tmpCol, false, true );
}
}
@@ -4283,7 +4283,7 @@ void TQTable::keyPressEvent( TQKeyEvent* e )
void TQTable::focusInEvent( TQFocusEvent* )
{
- d->inMenuMode = FALSE;
+ d->inMenuMode = false;
TQWidget *editorWidget = cellWidget( editRow, editCol );
updateCell( curRow, curCol );
if ( style().styleHint( TQStyle::SH_ItemView_ChangeHighlightOnFocus, this ) )
@@ -4374,7 +4374,7 @@ void TQTable::paintEvent( TQPaintEvent *e )
#endif
}
-static bool inUpdateCell = FALSE;
+static bool inUpdateCell = false;
/*!
Repaints the cell at \a row, \a col.
@@ -4384,13 +4384,13 @@ void TQTable::updateCell( int row, int col )
{
if ( inUpdateCell || row < 0 || col < 0 )
return;
- inUpdateCell = TRUE;
+ inUpdateCell = true;
TQRect cg = cellGeometry( row, col );
TQRect r( contentsToViewport( TQPoint( cg.x() - 2, cg.y() - 2 ) ),
TQSize( cg.width() + 4, cg.height() + 4 ) );
if (viewport()->rect().intersects(r))
- TQApplication::postEvent( viewport(), new TQPaintEvent( r, FALSE ) );
- inUpdateCell = FALSE;
+ TQApplication::postEvent( viewport(), new TQPaintEvent( r, false ) );
+ inUpdateCell = false;
}
void TQTable::repaintCell( int row, int col )
@@ -4404,7 +4404,7 @@ void TQTable::repaintCell( int row, int col )
TQRect v = viewport()->rect();
v.moveBy(contentsX(), contentsY());
if (v.intersects(r))
- repaintContents( r, FALSE );
+ repaintContents( r, false );
}
void TQTable::contentsToViewport2( int x, int y, int& vx, int& vy )
@@ -4450,10 +4450,10 @@ void TQTable::columnWidthChanged( int col )
resizeContents( s.width(), s.height() );
if ( contentsWidth() < w )
repaintContents( s.width(), contentsY(),
- w - s.width() + 1, visibleHeight(), TRUE );
+ w - s.width() + 1, visibleHeight(), true );
else
repaintContents( w, contentsY(),
- s.width() - w + 1, visibleHeight(), FALSE );
+ s.width() - w + 1, visibleHeight(), false );
// update widgets that are affected by this change
if ( widgets.size() ) {
@@ -4481,10 +4481,10 @@ void TQTable::rowHeightChanged( int row )
resizeContents( s.width(), s.height() );
if ( contentsHeight() < h ) {
repaintContents( contentsX(), contentsHeight(),
- visibleWidth(), h - s.height() + 1, TRUE );
+ visibleWidth(), h - s.height() + 1, true );
} else {
repaintContents( contentsX(), h,
- visibleWidth(), s.height() - h + 1, FALSE );
+ visibleWidth(), s.height() - h + 1, false );
}
// update widgets that are affected by this change
@@ -4539,7 +4539,7 @@ void TQTable::columnIndexChanged( int, int fromIndex, int toIndex )
if ( doSort && lastSortCol == fromIndex && topHeader )
topHeader->setSortIndicator( toIndex, topHeader->sortIndicatorOrder() );
repaintContents( contentsX(), contentsY(),
- visibleWidth(), visibleHeight(), FALSE );
+ visibleWidth(), visibleHeight(), false );
}
/*!
@@ -4556,12 +4556,12 @@ void TQTable::columnIndexChanged( int, int fromIndex, int toIndex )
void TQTable::rowIndexChanged( int, int, int )
{
repaintContents( contentsX(), contentsY(),
- visibleWidth(), visibleHeight(), FALSE );
+ visibleWidth(), visibleHeight(), false );
}
/*!
This function is called when the column \a col has been clicked.
- The default implementation sorts this column if sorting() is TRUE.
+ The default implementation sorts this column if sorting() is true.
*/
void TQTable::columnClicked( int col )
@@ -4573,7 +4573,7 @@ void TQTable::columnClicked( int col )
asc = !asc;
} else {
lastSortCol = col;
- asc = TRUE;
+ asc = true;
}
sortColumn( lastSortCol, asc );
}
@@ -4597,11 +4597,11 @@ bool TQTable::sorting() const
return doSort;
}
-static bool inUpdateGeometries = FALSE;
+static bool inUpdateGeometries = false;
void TQTable::delayedUpdateGeometries()
{
- d->geomTimer->start( 0, TRUE );
+ d->geomTimer->start( 0, true );
}
void TQTable::updateGeometriesSlot()
@@ -4618,7 +4618,7 @@ void TQTable::updateGeometries()
{
if ( inUpdateGeometries )
return;
- inUpdateGeometries = TRUE;
+ inUpdateGeometries = true;
TQSize ts = tableSize();
if ( topHeader->offset() &&
ts.width() < topHeader->offset() + topHeader->width() )
@@ -4635,7 +4635,7 @@ void TQTable::updateGeometries()
verticalScrollBar()->raise();
topHeader->updateStretches();
leftHeader->updateStretches();
- inUpdateGeometries = FALSE;
+ inUpdateGeometries = false;
}
/*!
@@ -4779,7 +4779,7 @@ void TQTable::saveContents( TQPtrVector<TQTableItem> &tmp,
{
int nCols = numCols();
if ( editRow != -1 && editCol != -1 )
- endEdit( editRow, editCol, FALSE, edMode != Editing );
+ endEdit( editRow, editCol, false, edMode != Editing );
tmp.resize( contents.size() );
tmp2.resize( widgets.size() );
int i;
@@ -4808,12 +4808,12 @@ void TQTable::updateHeaderAndResizeContents( TQTableHeader *header,
header->TQHeader::resizeArrays( rowCol );
header->TQTableHeader::resizeArrays( rowCol );
int old = num;
- clearSelection( FALSE );
+ clearSelection( false );
int i = 0;
for ( i = old; i < rowCol; ++i )
header->addLabel( TQString::null, width );
} else {
- clearSelection( FALSE );
+ clearSelection( false );
if ( header == leftHeader ) {
while ( numRows() > rowCol )
header->removeLabel( numRows() - 1 );
@@ -4823,12 +4823,12 @@ void TQTable::updateHeaderAndResizeContents( TQTableHeader *header,
}
}
- contents.setAutoDelete( FALSE );
+ contents.setAutoDelete( false );
contents.clear();
- contents.setAutoDelete( TRUE );
- widgets.setAutoDelete( FALSE );
+ contents.setAutoDelete( true );
+ widgets.setAutoDelete( false );
widgets.clear();
- widgets.setAutoDelete( TRUE );
+ widgets.setAutoDelete( true );
resizeData( numRows() * numCols() );
// keep numStretches in sync
@@ -4888,10 +4888,10 @@ void TQTable::finishContentsResze( bool updateBefore )
updateGeometries();
if ( updateBefore )
repaintContents( contentsX(), contentsY(),
- visibleWidth(), visibleHeight(), TRUE );
+ visibleWidth(), visibleHeight(), true );
else
repaintContents( contentsX(), contentsY(),
- visibleWidth(), visibleHeight(), FALSE );
+ visibleWidth(), visibleHeight(), false );
if ( isRowSelection( selectionMode() ) ) {
int r = curRow;
@@ -4920,7 +4920,7 @@ void TQTable::setNumRows( int r )
saveContents( tmp, tmp2 );
bool isUpdatesEnabled = leftHeader->isUpdatesEnabled();
- leftHeader->setUpdatesEnabled( FALSE );
+ leftHeader->setUpdatesEnabled( false );
bool updateBefore;
updateHeaderAndResizeContents( leftHeader, numRows(), r, 20, updateBefore );
@@ -4969,7 +4969,7 @@ void TQTable::setNumCols( int c )
saveContents( tmp, tmp2 );
bool isUpdatesEnabled = topHeader->isUpdatesEnabled();
- topHeader->setUpdatesEnabled( FALSE );
+ topHeader->setUpdatesEnabled( false );
bool updateBefore;
updateHeaderAndResizeContents( topHeader, numCols(), c, 100, updateBefore );
@@ -5009,15 +5009,15 @@ void TQTable::setColumnLabels( const TQStringList &labels )
This function returns the widget which should be used as an editor
for the contents of the cell at \a row, \a col.
- If \a initFromCell is TRUE, the editor is used to edit the current
+ If \a initFromCell is true, the editor is used to edit the current
contents of the cell (so the editor widget should be initialized
- with this content). If \a initFromCell is FALSE, the content of
+ with this content). If \a initFromCell is false, the content of
the cell is replaced with the new content which the user entered
into the widget created by this function.
The default functionality is as follows: if \a initFromCell is
- TRUE or the cell has a TQTableItem and the table item's
- TQTableItem::isReplaceable() is FALSE then the cell is asked to
+ true or the cell has a TQTableItem and the table item's
+ TQTableItem::isReplaceable() is false then the cell is asked to
create an appropriate editor (using TQTableItem::createEditor()).
Otherwise a TQLineEdit is used as the editor.
@@ -5068,7 +5068,7 @@ TQWidget *TQTable::createEditor( int row, int col, bool initFromCell ) const
// no contents in the cell yet, so open the default editor
if ( !e ) {
e = new TQLineEdit( viewport(), "qt_lineeditor" );
- ( (TQLineEdit*)e )->setFrame( FALSE );
+ ( (TQLineEdit*)e )->setFrame( false );
}
return e;
@@ -5080,7 +5080,7 @@ TQWidget *TQTable::createEditor( int row, int col, bool initFromCell ) const
(createEditor() is called) and setting the cell's editor with
setCellWidget() to the newly created editor. (After editing is
complete endEdit() will be called to replace the cell's content
- with the editor's content.) If \a replace is TRUE the editor will
+ with the editor's content.) If \a replace is true the editor will
start empty; otherwise it will be initialized with the cell's
content (if any), i.e. the user will be modifying the original
cell content.
@@ -5115,11 +5115,11 @@ TQWidget *TQTable::beginEdit( int row, int col, bool replace )
This function is called when in-place editing of the cell at \a
row, \a col is requested to stop.
- If the cell is not being edited or \a accept is FALSE the function
+ If the cell is not being edited or \a accept is false the function
returns and the cell's contents are left unchanged.
- If \a accept is TRUE the content of the editor must be transferred
- to the relevant cell. If \a replace is TRUE the current content of
+ If \a accept is true the content of the editor must be transferred
+ to the relevant cell. If \a replace is true the current content of
this cell should be replaced by the content of the editor (this
means removing the current TQTableItem of the cell and creating a
new one for the cell). Otherwise (if possible) the content of the
@@ -5208,8 +5208,8 @@ void TQTable::setCellContentFromEditor( int row, int col )
}
/*!
- Returns TRUE if the \l EditMode is \c Editing or \c Replacing;
- otherwise (i.e. the \l EditMode is \c NotEditing) returns FALSE.
+ Returns true if the \l EditMode is \c Editing or \c Replacing;
+ otherwise (i.e. the \l EditMode is \c NotEditing) returns false.
\sa TQTable::EditMode
*/
@@ -5275,8 +5275,8 @@ void TQTable::repaintSelections( TQTableSelection *oldSelection,
if ( oldSelection && !oldSelection->isActive() )
oldSelection = 0;
- bool optimizeOld = FALSE;
- bool optimizeNew = FALSE;
+ bool optimizeOld = false;
+ bool optimizeNew = false;
TQRect old;
if ( oldSelection )
@@ -5303,7 +5303,7 @@ void TQTable::repaintSelections( TQTableSelection *oldSelection,
old.width() > SHRT_MAX || old.height() > SHRT_MAX ||
cur.width() > SHRT_MAX || cur.height() > SHRT_MAX ) {
TQRect rr = cur.unite( old );
- repaintContents( rr, FALSE );
+ repaintContents( rr, false );
} else {
old = TQRect( contentsToViewport2( old.topLeft() ), old.size() );
cur = TQRect( contentsToViewport2( cur.topLeft() ), cur.size() );
@@ -5315,12 +5315,12 @@ void TQTable::repaintSelections( TQTableSelection *oldSelection,
for ( i = 0; i < (int)r3.rects().count(); ++i ) {
TQRect r( r3.rects()[ i ] );
r = TQRect( viewportToContents2( r.topLeft() ), r.size() );
- repaintContents( r, FALSE );
+ repaintContents( r, false );
}
for ( i = 0; i < (int)r4.rects().count(); ++i ) {
TQRect r( r4.rects()[ i ] );
r = TQRect( viewportToContents2( r.topLeft() ), r.size() );
- repaintContents( r, FALSE );
+ repaintContents( r, false );
}
}
@@ -5354,13 +5354,13 @@ void TQTable::repaintSelections( TQTableSelection *oldSelection,
for ( i = left; i <= right; ++i ) {
if ( !isColumnSelected( i ) )
*s = TQTableHeader::Normal;
- else if ( isColumnSelected( i, TRUE ) )
+ else if ( isColumnSelected( i, true ) )
*s = TQTableHeader::Selected;
else
*s = TQTableHeader::Bold;
++s;
}
- topHeader->repaint( FALSE );
+ topHeader->repaint( false );
}
if ( updateVertical && numRows() > 0 && top >= 0 ) {
@@ -5368,13 +5368,13 @@ void TQTable::repaintSelections( TQTableSelection *oldSelection,
for ( i = top; i <= bottom; ++i ) {
if ( !isRowSelected( i ) )
*s = TQTableHeader::Normal;
- else if ( isRowSelected( i, TRUE ) )
+ else if ( isRowSelected( i, true ) )
*s = TQTableHeader::Selected;
else
*s = TQTableHeader::Bold;
++s;
}
- leftHeader->repaint( FALSE );
+ leftHeader->repaint( false );
}
}
@@ -5396,12 +5396,12 @@ void TQTable::repaintSelections()
s->rightCol(), b ) );
}
- repaintContents( r, FALSE );
+ repaintContents( r, false );
}
/*!
Clears all selections and repaints the appropriate regions if \a
- repaint is TRUE.
+ repaint is true.
\sa removeSelection()
*/
@@ -5425,13 +5425,13 @@ void TQTable::clearSelection( bool repaint )
selections.clear();
if ( needRepaint && repaint )
- repaintContents( r, FALSE );
+ repaintContents( r, false );
leftHeader->setSectionStateToAll( TQTableHeader::Normal );
- leftHeader->repaint( FALSE );
+ leftHeader->repaint( false );
if ( !isRowSelection( selectionMode() ) ) {
topHeader->setSectionStateToAll( TQTableHeader::Normal );
- topHeader->repaint( FALSE );
+ topHeader->repaint( false );
}
topHeader->setSectionState( curCol, TQTableHeader::Bold );
leftHeader->setSectionState( curRow, TQTableHeader::Bold );
@@ -5452,14 +5452,14 @@ TQRect TQTable::rangeGeometry( int topRow, int leftCol,
int ca = columnAt( contentsX() + visibleWidth() );
if ( ca != -1 )
rightCol = TQMIN( rightCol, ca );
- optimize = TRUE;
+ optimize = true;
TQRect rect;
for ( int r = topRow; r <= bottomRow; ++r ) {
for ( int c = leftCol; c <= rightCol; ++c ) {
rect = rect.unite( cellGeometry( r, c ) );
TQTableItem *i = item( r, c );
if ( i && ( i->rowSpan() > 1 || i->colSpan() > 1 ) )
- optimize = FALSE;
+ optimize = false;
}
}
return rect;
@@ -5563,10 +5563,10 @@ static int cmpTableItems( const void *n1, const void *n2 )
#endif
/*!
- Sorts column \a col. If \a ascending is TRUE the sort is in
+ Sorts column \a col. If \a ascending is true the sort is in
ascending order, otherwise the sort is in descending order.
- If \a wholeRows is TRUE, entire rows are sorted using swapRows();
+ If \a wholeRows is true, entire rows are sorted using swapRows();
otherwise only cells in the column are sorted using swapCells().
Note that if you are not using TQTableItems you will need to
@@ -5600,7 +5600,7 @@ void TQTable::sortColumn( int col, bool ascending, bool wholeRows )
qsort( items, filledRows, sizeof( SortableTableItem ), cmpTableItems );
bool updatesEnabled = isUpdatesEnabled();
- setUpdatesEnabled( FALSE );
+ setUpdatesEnabled( false );
for ( i = 0; i < numRows(); ++i ) {
if ( i < filledRows ) {
if ( ascending ) {
@@ -5627,10 +5627,10 @@ void TQTable::sortColumn( int col, bool ascending, bool wholeRows )
if ( !wholeRows )
repaintContents( columnPos( col ), contentsY(),
- columnWidth( col ), visibleHeight(), FALSE );
+ columnWidth( col ), visibleHeight(), false );
else
repaintContents( contentsX(), contentsY(),
- visibleWidth(), visibleHeight(), FALSE );
+ visibleWidth(), visibleHeight(), false );
delete [] items;
}
@@ -5647,7 +5647,7 @@ void TQTable::hideRow( int row )
return;
d->hiddenRows.replace( row, new int( leftHeader->sectionSize( row ) ) );
leftHeader->resizeSection( row, 0 );
- leftHeader->setResizeEnabled( FALSE, row );
+ leftHeader->setResizeEnabled( false, row );
if ( isRowStretchable(row) )
leftHeader->numStretches--;
rowHeightChanged( row );
@@ -5673,7 +5673,7 @@ void TQTable::hideColumn( int col )
return;
d->hiddenCols.replace( col, new int( topHeader->sectionSize( col ) ) );
topHeader->resizeSection( col, 0 );
- topHeader->setResizeEnabled( FALSE, col );
+ topHeader->setResizeEnabled( false, col );
if ( isColumnStretchable(col) )
topHeader->numStretches--;
columnWidthChanged( col );
@@ -5705,7 +5705,7 @@ void TQTable::showRow( int row )
} else if ( rowHeight( row ) == 0 ) {
setRowHeight( row, 20 );
}
- leftHeader->setResizeEnabled( TRUE, row );
+ leftHeader->setResizeEnabled( true, row );
}
/*!
@@ -5726,12 +5726,12 @@ void TQTable::showColumn( int col )
} else if ( columnWidth( col ) == 0 ) {
setColumnWidth( col, 20 );
}
- topHeader->setResizeEnabled( TRUE, col );
+ topHeader->setResizeEnabled( true, col );
}
/*!
- Returns TRUE if row \a row is hidden; otherwise returns
- FALSE.
+ Returns true if row \a row is hidden; otherwise returns
+ false.
\sa hideRow(), isColumnHidden()
*/
@@ -5741,8 +5741,8 @@ bool TQTable::isRowHidden( int row ) const
}
/*!
- Returns TRUE if column \a col is hidden; otherwise returns
- FALSE.
+ Returns true if column \a col is hidden; otherwise returns
+ false.
\sa hideColumn(), isRowHidden()
*/
@@ -5853,7 +5853,7 @@ void TQTable::adjustRow( int row )
}
/*!
- If \a stretch is TRUE, column \a col is set to be stretchable;
+ If \a stretch is true, column \a col is set to be stretchable;
otherwise column \a col is set to be unstretchable.
If the table widget's width decreases or increases stretchable
@@ -5873,7 +5873,7 @@ void TQTable::setColumnStretchable( int col, bool stretch )
}
/*!
- If \a stretch is TRUE, row \a row is set to be stretchable;
+ If \a stretch is true, row \a row is set to be stretchable;
otherwise row \a row is set to be unstretchable.
If the table widget's height decreases or increases stretchable
@@ -5893,8 +5893,8 @@ void TQTable::setRowStretchable( int row, bool stretch )
}
/*!
- Returns TRUE if column \a col is stretchable; otherwise returns
- FALSE.
+ Returns true if column \a col is stretchable; otherwise returns
+ false.
\sa setColumnStretchable() isRowStretchable()
*/
@@ -5905,8 +5905,8 @@ bool TQTable::isColumnStretchable( int col ) const
}
/*!
- Returns TRUE if row \a row is stretchable; otherwise returns
- FALSE.
+ Returns true if row \a row is stretchable; otherwise returns
+ false.
\sa setRowStretchable() isColumnStretchable()
*/
@@ -5934,7 +5934,7 @@ void TQTable::takeItem( TQTableItem *i )
if ( !i )
return;
TQRect rect = cellGeometry( i->row(), i->col() );
- contents.setAutoDelete( FALSE );
+ contents.setAutoDelete( false );
int bottom = i->row() + i->rowSpan();
if ( bottom > numRows() )
bottom = numRows();
@@ -5945,8 +5945,8 @@ void TQTable::takeItem( TQTableItem *i )
for ( int c = i->col(); c < right; ++c )
contents.remove( indexOf( r, c ) );
}
- contents.setAutoDelete( TRUE );
- repaintContents( rect, FALSE );
+ contents.setAutoDelete( true );
+ repaintContents( rect, false );
int orow = i->row();
int ocol = i->col();
i->setRow( -1 );
@@ -5981,7 +5981,7 @@ void TQTable::setCellWidget( int row, int col, TQWidget *e )
TQWidget *w = cellWidget( row, col );
if ( w && row == editRow && col == editCol )
- endEdit( editRow, editCol, FALSE, edMode != Editing );
+ endEdit( editRow, editCol, false, edMode != Editing );
e->installEventFilter( this );
clearCellWidget( row, col );
@@ -6067,9 +6067,9 @@ void TQTable::clearCellWidget( int row, int col )
w->removeEventFilter( this );
w->deleteLater();
}
- widgets.setAutoDelete( FALSE );
+ widgets.setAutoDelete( false );
widgets.remove( indexOf( row, col ) );
- widgets.setAutoDelete( TRUE );
+ widgets.setAutoDelete( true );
}
/*!
@@ -6081,7 +6081,7 @@ void TQTable::clearCellWidget( int row, int col )
*/
/*!
- If \a b is TRUE, the table starts a drag (see dragObject()) when
+ If \a b is true, the table starts a drag (see dragObject()) when
the user presses and moves the mouse on a selected cell.
*/
@@ -6091,7 +6091,7 @@ void TQTable::setDragEnabled( bool b )
}
/*!
- If this function returns TRUE, the table supports dragging.
+ If this function returns true, the table supports dragging.
\sa setDragEnabled();
*/
@@ -6124,9 +6124,9 @@ void TQTable::insertRows( int row, int count )
return;
bool updatesEnabled = isUpdatesEnabled();
- setUpdatesEnabled( FALSE );
+ setUpdatesEnabled( false );
bool leftHeaderUpdatesEnabled = leftHeader->isUpdatesEnabled();
- leftHeader->setUpdatesEnabled( FALSE );
+ leftHeader->setUpdatesEnabled( false );
int oldLeftMargin = leftMargin();
setNumRows( numRows() + count );
@@ -6141,7 +6141,7 @@ void TQTable::insertRows( int row, int count )
int cc = TQMAX( 0, currentColumn() );
if ( curRow > row )
curRow -= count; // this is where curRow was
- setCurrentCell( cr, cc, TRUE, FALSE ); // without ensureCellVisible
+ setCurrentCell( cr, cc, true, false ); // without ensureCellVisible
// Repaint the header
if ( leftHeaderUpdatesEnabled ) {
@@ -6182,9 +6182,9 @@ void TQTable::insertColumns( int col, int count )
return;
bool updatesEnabled = isUpdatesEnabled();
- setUpdatesEnabled( FALSE );
+ setUpdatesEnabled( false );
bool topHeaderUpdatesEnabled = topHeader->isUpdatesEnabled();
- topHeader->setUpdatesEnabled( FALSE );
+ topHeader->setUpdatesEnabled( false );
int oldTopMargin = topMargin();
setNumCols( numCols() + count );
@@ -6199,7 +6199,7 @@ void TQTable::insertColumns( int col, int count )
int cc = TQMAX( 0, currentColumn() );
if ( curCol > col )
curCol -= count; // this is where curCol was
- setCurrentCell( cr, cc, TRUE, FALSE ); // without ensureCellVisible
+ setCurrentCell( cr, cc, true, false ); // without ensureCellVisible
// Repaint the header
if ( topHeaderUpdatesEnabled ) {
@@ -6321,7 +6321,7 @@ void TQTable::removeColumns( const TQMemArray<int> &cols )
/*!
Starts editing the cell at \a row, \a col.
- If \a replace is TRUE the content of this cell will be replaced by
+ If \a replace is true the content of this cell will be replaced by
the content of the editor when editing is finished, i.e. the user
will be entering new data; otherwise the current content of the
cell (if any) will be modified in the editor.
@@ -6360,7 +6360,7 @@ void TQTable::contentsDragEnterEvent( TQDragEnterEvent *e )
fixRow( tmpRow, e->pos().y() );
fixCol( tmpCol, e->pos().x() );
if (e->source() != (TQObject*)cellWidget( currentRow(), currentColumn() ) )
- setCurrentCell( tmpRow, tmpCol, FALSE, TRUE );
+ setCurrentCell( tmpRow, tmpCol, false, true );
e->accept();
}
@@ -6379,7 +6379,7 @@ void TQTable::contentsDragMoveEvent( TQDragMoveEvent *e )
fixRow( tmpRow, e->pos().y() );
fixCol( tmpCol, e->pos().x() );
if (e->source() != (TQObject*)cellWidget( currentRow(), currentColumn() ) )
- setCurrentCell( tmpRow, tmpCol, FALSE, TRUE );
+ setCurrentCell( tmpRow, tmpCol, false, true );
e->accept();
}
@@ -6390,7 +6390,7 @@ void TQTable::contentsDragMoveEvent( TQDragMoveEvent *e )
void TQTable::contentsDragLeaveEvent( TQDragLeaveEvent * )
{
- setCurrentCell( oldCurrentRow, oldCurrentCol, FALSE, TRUE );
+ setCurrentCell( oldCurrentRow, oldCurrentCol, false, true );
}
/*!
@@ -6401,13 +6401,13 @@ void TQTable::contentsDragLeaveEvent( TQDragLeaveEvent * )
void TQTable::contentsDropEvent( TQDropEvent *e )
{
- setCurrentCell( oldCurrentRow, oldCurrentCol, FALSE, TRUE );
+ setCurrentCell( oldCurrentRow, oldCurrentCol, false, true );
emit dropped( e );
}
/*!
If the user presses the mouse on a selected cell, starts moving
- (i.e. dragging), and dragEnabled() is TRUE, this function is
+ (i.e. dragging), and dragEnabled() is true, this function is
called to obtain a drag object. A drag using this object begins
immediately unless dragObject() returns 0.
@@ -6465,7 +6465,7 @@ void TQTable::setEnabled( bool b )
if ( !b ) {
// editor will lose focus, causing a crash deep in setEnabled(),
// so we'll end the edit early.
- endEdit( editRow, editCol, TRUE, edMode != Editing );
+ endEdit( editRow, editCol, true, edMode != Editing );
}
TQScrollView::setEnabled(b);
}
@@ -6507,16 +6507,16 @@ void TQTable::setEnabled( bool b )
TQTableHeader::TQTableHeader( int i, TQTable *t,
TQWidget *parent, const char *name )
- : TQHeader( i, parent, name ), mousePressed(FALSE), startPos(-1),
- table( t ), caching( FALSE ), resizedSection(-1),
+ : TQHeader( i, parent, name ), mousePressed(false), startPos(-1),
+ table( t ), caching( false ), resizedSection(-1),
numStretches( 0 )
{
- setIsATableHeader( TRUE );
+ setIsATableHeader( true );
d = 0;
states.resize( i );
stretchable.resize( i );
states.fill( Normal, -1 );
- stretchable.fill( FALSE, -1 );
+ stretchable.fill( false, -1 );
autoScrollTimer = new TQTimer( this );
connect( autoScrollTimer, TQ_SIGNAL( timeout() ),
this, TQ_SLOT( doAutoScroll() ) );
@@ -6563,7 +6563,7 @@ void TQTableHeader::addLabel( const TQString &s , int size )
stretchable.resize( count() );
for ( ; s < count(); ++s ) {
states[ s ] = Normal;
- stretchable[ s ] = FALSE;
+ stretchable[ s ] = false;
}
}
}
@@ -6584,7 +6584,7 @@ void TQTableHeader::resizeArrays( int n )
stretchable.resize( n );
if ( n > old ) {
for ( int i = old; i < n; ++i ) {
- stretchable[ i ] = FALSE;
+ stretchable[ i ] = false;
states[ i ] = Normal;
}
}
@@ -6621,9 +6621,9 @@ void TQTableHeader::setSectionState( int s, SectionState astate )
states.data()[ s ] = astate;
if ( isUpdatesEnabled() ) {
if ( orientation() == Horizontal )
- repaint( sectionPos( s ) - offset(), 0, sectionSize( s ), height(), FALSE );
+ repaint( sectionPos( s ) - offset(), 0, sectionSize( s ), height(), false );
else
- repaint( 0, sectionPos( s ) - offset(), width(), sectionSize( s ), FALSE );
+ repaint( 0, sectionPos( s ) - offset(), width(), sectionSize( s ), false );
}
}
@@ -6692,7 +6692,7 @@ void TQTableHeader::paintEvent( TQPaintEvent *e )
if ( !( orientation() == Horizontal && isRowSelection( table->selectionMode() ) ) &&
( sectionState( i ) == Bold || sectionState( i ) == Selected ) ) {
TQFont f( font() );
- f.setBold( TRUE );
+ f.setBold( true );
p.setFont( f );
}
paintSection( &p, i, r );
@@ -6755,14 +6755,14 @@ void TQTableHeader::mousePressEvent( TQMouseEvent *e )
if ( e->button() != LeftButton )
return;
TQHeader::mousePressEvent( e );
- mousePressed = TRUE;
+ mousePressed = true;
pressPos = real_pos( e->pos(), orientation() );
if ( !table->currentSel || ( e->state() & ShiftButton ) != ShiftButton )
startPos = -1;
- setCaching( TRUE );
+ setCaching( true );
resizedSection = -1;
#ifdef TQT_NO_CURSOR
- isResizing = FALSE;
+ isResizing = false;
#else
isResizing = cursor().shape() != ArrowCursor;
if ( !isResizing && sectionAt( pressPos ) != -1 )
@@ -6796,13 +6796,13 @@ bool TQTableHeader::doSelection( TQMouseEvent *e )
if ( isRowSelection( table->selectionMode() ) ) {
if ( orientation() == Horizontal )
- return TRUE;
+ return true;
if ( table->selectionMode() == TQTable::SingleRow ) {
int secAt = sectionAt( p );
if ( secAt == -1 )
- return TRUE;
+ return true;
table->setCurrentCell( secAt, table->currentColumn() );
- return TRUE;
+ return true;
}
}
@@ -6814,7 +6814,7 @@ bool TQTableHeader::doSelection( TQMouseEvent *e )
table->selectionMode() == TQTable::SingleRow ) {
startPos = p;
bool b = table->signalsBlocked();
- table->blockSignals( TRUE );
+ table->blockSignals( true );
table->clearSelection();
table->blockSignals( b );
}
@@ -6825,7 +6825,7 @@ bool TQTableHeader::doSelection( TQMouseEvent *e )
TQTableSelection *oldSelection = table->currentSel;
if ( orientation() == Vertical ) {
- if ( !table->isRowSelected( secAt, TRUE ) ) {
+ if ( !table->isRowSelected( secAt, true ) ) {
table->currentSel = new TQTableSelection();
table->selections.append( table->currentSel );
table->currentSel->init( secAt, 0 );
@@ -6834,7 +6834,7 @@ bool TQTableHeader::doSelection( TQMouseEvent *e )
}
table->setCurrentCell( secAt, 0 );
} else { // orientation == Horizontal
- if ( !table->isColumnSelected( secAt, TRUE ) ) {
+ if ( !table->isColumnSelected( secAt, true ) ) {
table->currentSel = new TQTableSelection();
table->selections.append( table->currentSel );
table->currentSel->init( 0, secAt );
@@ -6855,7 +6855,7 @@ bool TQTableHeader::doSelection( TQMouseEvent *e )
if ( sectionAt( p ) != -1 )
endPos = p;
- return TRUE;
+ return true;
}
}
@@ -6866,12 +6866,12 @@ bool TQTableHeader::doSelection( TQMouseEvent *e )
p -= offset();
if ( orientation() == Horizontal && ( p < 0 || p > width() ) ) {
doAutoScroll();
- autoScrollTimer->start( 100, TRUE );
+ autoScrollTimer->start( 100, true );
} else if ( orientation() == Vertical && ( p < 0 || p > height() ) ) {
doAutoScroll();
- autoScrollTimer->start( 100, TRUE );
+ autoScrollTimer->start( 100, true );
}
- return TRUE;
+ return true;
}
return table->selectionMode() == TQTable::NoSelection;
}
@@ -6907,8 +6907,8 @@ void TQTableHeader::mouseReleaseEvent( TQMouseEvent *e )
if ( e->button() != LeftButton )
return;
autoScrollTimer->stop();
- mousePressed = FALSE;
- setCaching( FALSE );
+ mousePressed = false;
+ setCaching( false );
TQHeader::mouseReleaseEvent( e );
#ifndef NO_LINE_WIDGET
line1->hide();
@@ -6990,7 +6990,7 @@ void TQTableHeader::resizeEvent( TQResizeEvent *e )
TQHeader::resizeEvent( e );
if ( numStretches == 0 )
return;
- stretchTimer->start( 0, TRUE );
+ stretchTimer->start( 0, true );
}
void TQTableHeader::updateStretches()
@@ -7005,7 +7005,7 @@ void TQTableHeader::updateStretches()
int pd = dim - ( sectionPos(count() - 1)
+ sectionSize(count() - 1) );
bool block = signalsBlocked();
- blockSignals( TRUE );
+ blockSignals( true );
for ( i = 0; i < (int)stretchable.count(); ++i ) {
if ( !stretchable[i] ||
( stretchable[i] && table->d->hiddenCols[i] ) )
@@ -7023,8 +7023,8 @@ void TQTableHeader::updateStretches()
resizeSection( i, TQMAX( 20, pd ) );
}
blockSignals( block );
- table->repaintContents( FALSE );
- widgetStretchTimer->start( 100, TRUE );
+ table->repaintContents( false );
+ widgetStretchTimer->start( 100, true );
}
void TQTableHeader::updateWidgetStretches()
@@ -7052,7 +7052,7 @@ void TQTableHeader::updateSelections()
*s = Selected;
++s;
}
- repaint( FALSE );
+ repaint( false );
if (table->currentSel) {
TQTableSelection oldSelection = *table->currentSel;
@@ -7090,7 +7090,7 @@ void TQTableHeader::doAutoScroll()
else
table->ensureVisible( table->contentsX(), endPos );
updateSelections();
- autoScrollTimer->start( 100, TRUE );
+ autoScrollTimer->start( 100, true );
}
void TQTableHeader::sectionWidthChanged( int col, int, int )
@@ -7250,7 +7250,7 @@ void TQTableHeader::setCaching( bool b )
}
/*!
- If \a b is TRUE, section \a s is stretchable; otherwise the
+ If \a b is true, section \a s is stretchable; otherwise the
section is not stretchable.
\sa isSectionStretchable()
@@ -7268,8 +7268,8 @@ void TQTableHeader::setSectionStretchable( int s, bool b )
}
/*!
- Returns TRUE if section \a s is stretcheable; otherwise returns
- FALSE.
+ Returns true if section \a s is stretcheable; otherwise returns
+ false.
\sa setSectionStretchable()
*/
@@ -7282,7 +7282,7 @@ bool TQTableHeader::isSectionStretchable( int s ) const
void TQTableHeader::swapSections( int oldIdx, int newIdx, bool swapTable )
{
extern bool tqt_qheader_label_return_null_strings; // tqheader.cpp
- tqt_qheader_label_return_null_strings = TRUE;
+ tqt_qheader_label_return_null_strings = true;
TQIconSet oldIconSet, newIconSet;
if ( iconSet( oldIdx ) )
@@ -7298,7 +7298,7 @@ void TQTableHeader::swapSections( int oldIdx, int newIdx, bool swapTable )
setLabel( newIdx, oldIconSet, oldLabel );
}
- tqt_qheader_label_return_null_strings = FALSE;
+ tqt_qheader_label_return_null_strings = false;
int w1 = sectionSize( oldIdx );
int w2 = sectionSize( newIdx );
@@ -7344,7 +7344,7 @@ void TQTableHeader::setLabels(const TQStringList & labels)
int i = 0;
bool updates = isUpdatesEnabled();
const int c = TQMIN(count(), (int)labels.count());
- setUpdatesEnabled(FALSE);
+ setUpdatesEnabled(false);
for ( TQStringList::ConstIterator it = labels.begin(); i < c; ++i, ++it ) {
if (i == c - 1) {
setUpdatesEnabled(updates);
diff --git a/src/table/tqtable.h b/src/table/tqtable.h
index 9f2535ec7..d26c06642 100644
--- a/src/table/tqtable.h
+++ b/src/table/tqtable.h
@@ -183,7 +183,7 @@ private:
class TQM_EXPORT_TABLE TQComboTableItem : public TQTableItem
{
public:
- TQComboTableItem( TQTable *table, const TQStringList &list, bool editable = FALSE );
+ TQComboTableItem( TQTable *table, const TQStringList &list, bool editable = false );
~TQComboTableItem();
virtual TQWidget *createEditor() const;
virtual void setContentFromEditor( TQWidget *w );
@@ -302,8 +302,8 @@ public:
void ensureCellVisible( int row, int col );
bool isSelected( int row, int col ) const;
- bool isRowSelected( int row, bool full = FALSE ) const;
- bool isColumnSelected( int col, bool full = FALSE ) const;
+ bool isRowSelected( int row, bool full = false ) const;
+ bool isColumnSelected( int col, bool full = false ) const;
int numSelections() const;
TQTableSelection selection( int num ) const;
virtual int addSelection( const TQTableSelection &s );
@@ -320,8 +320,8 @@ public:
bool columnMovingEnabled() const;
bool rowMovingEnabled() const;
- virtual void sortColumn( int col, bool ascending = TRUE,
- bool wholeRows = FALSE );
+ virtual void sortColumn( int col, bool ascending = true,
+ bool wholeRows = false );
bool sorting() const;
virtual void takeItem( TQTableItem *i );
@@ -375,14 +375,14 @@ public slots:
bool isColumnStretchable( int col ) const;
bool isRowStretchable( int row ) const;
virtual void setSorting( bool b );
- virtual void swapRows( int row1, int row2, bool swapHeader = FALSE );
- virtual void swapColumns( int col1, int col2, bool swapHeader = FALSE );
+ virtual void swapRows( int row1, int row2, bool swapHeader = false );
+ virtual void swapColumns( int col1, int col2, bool swapHeader = false );
virtual void swapCells( int row1, int col1, int row2, int col2 );
virtual void setLeftMargin( int m );
virtual void setTopMargin( int m );
virtual void setCurrentCell( int row, int col );
- void clearSelection( bool repaint = TRUE );
+ void clearSelection( bool repaint = true );
virtual void setColumnMovingEnabled( bool b );
virtual void setRowMovingEnabled( bool b );
@@ -400,7 +400,7 @@ public slots:
virtual void removeColumn( int col );
virtual void removeColumns( const TQMemArray<int> &cols );
- virtual void editCell( int row, int col, bool replace = FALSE );
+ virtual void editCell( int row, int col, bool replace = false );
void setRowLabels( const TQStringList &labels );
void setColumnLabels( const TQStringList &labels );
@@ -476,8 +476,8 @@ private:
void updateGeometries();
void repaintSelections( TQTableSelection *oldSelection,
TQTableSelection *newSelection,
- bool updateVertical = TRUE,
- bool updateHorizontal = TRUE );
+ bool updateVertical = true,
+ bool updateHorizontal = true );
TQRect rangeGeometry( int topRow, int leftCol,
int bottomRow, int rightCol, bool &optimize );
void fixRow( int &row, int y );
@@ -494,7 +494,7 @@ private:
void updateRowWidgets( int row );
void updateColWidgets( int col );
bool isSelected( int row, int col, bool includeCurrent ) const;
- void setCurrentCell( int row, int col, bool updateSelections, bool ensureVisible = FALSE );
+ void setCurrentCell( int row, int col, bool updateSelections, bool ensureVisible = false );
void fixCell( int &row, int &col, int key );
void delayedUpdateGeometries();
struct TableWidget
diff --git a/src/widgets/tqlistbox.cpp b/src/widgets/tqlistbox.cpp
index e209240e6..c5032d1d4 100644
--- a/src/widgets/tqlistbox.cpp
+++ b/src/widgets/tqlistbox.cpp
@@ -4573,7 +4573,7 @@ void TQListBox::handleItemChange( TQListBoxItem *old, bool shift, bool control )
} else if ( d->selectionMode == Extended ) {
if ( shift ) {
selectRange( d->selectAnchor ? d->selectAnchor : old,
- d->current, FALSE, TRUE, (d->selectAnchor && !control) ? TRUE : FALSE );
+ d->current, FALSE, TRUE, d->selectAnchor && !control );
} else if ( !control ) {
bool block = signalsBlocked();
blockSignals( TRUE );
diff --git a/src/widgets/tqlistview.cpp b/src/widgets/tqlistview.cpp
index 6d8f3771f..6d8cc3b37 100644
--- a/src/widgets/tqlistview.cpp
+++ b/src/widgets/tqlistview.cpp
@@ -5745,7 +5745,7 @@ TQt::SortOrder TQListView::sortOrder() const
*/
void TQListView::setSortOrder( SortOrder order )
{
- setSorting( d->sortcolumn, order == Ascending ? TRUE : FALSE );
+ setSorting( d->sortcolumn, order == Ascending );
}
/*!
@@ -7901,7 +7901,7 @@ void TQListView::handleItemChange( TQListViewItem *old, bool shift, bool control
} else if ( d->selectionMode == Extended ) {
if ( shift ) {
selectRange( d->selectAnchor ? d->selectAnchor : old,
- d->focusItem, FALSE, TRUE, (d->selectAnchor && !control) ? TRUE : FALSE );
+ d->focusItem, FALSE, TRUE, d->selectAnchor && !control );
} else if ( !control ) {
bool block = signalsBlocked();
blockSignals( TRUE );
diff --git a/src/workspace/tqworkspace.cpp b/src/workspace/tqworkspace.cpp
index ab0f67896..91e171f38 100644
--- a/src/workspace/tqworkspace.cpp
+++ b/src/workspace/tqworkspace.cpp
@@ -125,7 +125,7 @@
If you want your users to be able to work with document windows
larger than the actual workspace, set the scrollBarsEnabled
- property to TRUE.
+ property to true.
If the top-level window contains a menu bar and a document window
is maximised, TQWorkspace moves the document window's minimize,
@@ -134,7 +134,7 @@
menu at the far left of the menu bar.
*/
-static bool inCaptionChange = FALSE;
+static bool inCaptionChange = false;
class TQWorkspaceChild : public TQFrame
{
@@ -251,7 +251,7 @@ public:
static bool isChildOf( TQWidget * child, TQWidget * parent )
{
if ( !parent || !child )
- return FALSE;
+ return false;
TQWidget * w = child;
while( w && w != parent )
w = w->parentWidget();
@@ -333,8 +333,8 @@ TQWorkspace::init()
d->toolPopup->insertItem(tr("&Move"), 2);
d->toolPopup->insertItem(tr("&Size"), 3);
d->toolPopup->insertItem(tr("Stay on &Top"), 7);
- d->toolPopup->setItemChecked( 7, TRUE );
- d->toolPopup->setCheckable( TRUE );
+ d->toolPopup->setItemChecked( 7, true );
+ d->toolPopup->setCheckable( true );
d->toolPopup->insertSeparator();
d->toolPopup->insertItem(TQIconSet(style().stylePixmap(TQStyle::SP_TitleBarShadeButton)), tr("Sh&ade"), 6);
d->toolPopup->insertItem(TQIconSet(style().stylePixmap(TQStyle::SP_TitleBarCloseButton)),
@@ -504,7 +504,7 @@ void TQWorkspace::activateWindow( TQWidget* w, bool change_focus )
if ( d->active && d->active->windowWidget() == w ) {
if ( !isChildOf( focusWidget(), w ) ) // child window does not have focus
- d->active->setActive( TRUE );
+ d->active->setActive( true );
return;
}
@@ -520,14 +520,14 @@ void TQWorkspace::activateWindow( TQWidget* w, bool change_focus )
if (c->windowWidget() == w)
d->active = c;
else
- c->setActive( FALSE );
+ c->setActive( false );
}
if (!d->active)
return;
// Then activate the new one, so the focus is stored correctly
- d->active->setActive( TRUE );
+ d->active->setActive( true );
if (!d->active)
return;
@@ -607,7 +607,7 @@ void TQWorkspace::place( TQWidget* w)
int x = maxRect.left(), y = maxRect.top();
TQPoint wpos(maxRect.left(), maxRect.top());
- bool firstPass = TRUE;
+ bool firstPass = true;
do {
if ( y + w->height() > maxRect.bottom() ) {
@@ -649,7 +649,7 @@ void TQWorkspace::place( TQWidget* w)
}
if (firstPass) {
- firstPass = FALSE;
+ firstPass = false;
minOverlap = overlap;
} else if ( overlap >= 0 && overlap < minOverlap) {
minOverlap = overlap;
@@ -730,7 +730,7 @@ void TQWorkspace::insertIcon( TQWidget* w )
return;
d->icons.append( w );
if (w->parentWidget() != this )
- w->reparent( this, 0, TQPoint(0,0), FALSE);
+ w->reparent( this, 0, TQPoint(0,0), false);
TQRect cr = updateWorkspace();
int x = 0;
int y = cr.height() - w->height();
@@ -989,9 +989,9 @@ void TQWorkspace::showEvent( TQShowEvent *e )
w->parentWidget(),
TQString("TQMagicDock_") + w->name());
dw->installEventFilter(this);
- dw->setResizeEnabled(TRUE);
+ dw->setResizeEnabled(true);
dw->setCloseMode( TQDockWindow::Always );
- dw->setResizeEnabled(FALSE);
+ dw->setResizeEnabled(false);
#ifndef TQT_NO_WIDGET_TOPEXTRA
dw->setCaption(o->caption());
#endif
@@ -1007,7 +1007,7 @@ void TQWorkspace::showEvent( TQShowEvent *e )
dw->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum));
dw->setGeometry(0, 0, os.width(), os.height() + dw->sizeHint().height());
d->newdocks.prepend(dw);
- ((TQDockArea*)w)->setAcceptDockWindow(dw, FALSE);
+ ((TQDockArea*)w)->setAcceptDockWindow(dw, false);
w->show();
}
}
@@ -1030,7 +1030,7 @@ void TQWorkspace::showEvent( TQShowEvent *e )
// TQObject::connect(tqApp, TQ_SIGNAL(lastWindowClosed()), tqApp, TQ_SLOT(quit()));
TQDesktopWidget *dw = TQApplication::desktop();
w->setGeometry(dw->availableGeometry(dw->screenNumber(o)));
- o->reparent(w, TQPoint(0, 0), TRUE);
+ o->reparent(w, TQPoint(0, 0), true);
{
TQMenuBar *mb = 0;
if(::tqt_cast<TQMainWindow*>(o))
@@ -1070,7 +1070,7 @@ void TQWorkspace::showEvent( TQShowEvent *e )
// a windows bug as well though.
for (TQPtrListIterator<TQWorkspaceChild> it( d->windows ); it.current(); ++it ) {
TQWorkspaceChild* c = it.current();
- TQApplication::postEvent(c, new TQPaintEvent(c->rect(), TRUE));
+ TQApplication::postEvent(c, new TQPaintEvent(c->rect(), true));
}
updateWorkspace();
@@ -1093,24 +1093,24 @@ void TQWorkspace::minimizeWindow( TQWidget* w)
if ( c ) {
TQWorkspace *fake = (TQWorkspace*)w;
- setUpdatesEnabled( FALSE );
- bool wasMax = FALSE;
+ setUpdatesEnabled( false );
+ bool wasMax = false;
if ( c == d->maxWindow ) {
- wasMax = TRUE;
+ wasMax = true;
d->maxWindow = 0;
- inCaptionChange = TRUE;
+ inCaptionChange = true;
#ifndef TQT_NO_WIDGET_TOPEXTRA
if ( !!d->topCaption )
topLevelWidget()->setCaption( d->topCaption );
#endif
- inCaptionChange = FALSE;
+ inCaptionChange = false;
if ( !style().styleHint(TQStyle::SH_Workspace_FillSpaceOnMaximize, this) )
hideMaximizeControls();
for (TQPtrListIterator<TQWorkspaceChild> it( d->windows ); it.current(); ++it ) {
TQWorkspaceChild* c = it.current();
if ( c->titlebar )
- c->titlebar->setMovable( TRUE );
- c->widgetResizeHandler->setActive( TRUE );
+ c->titlebar->setMovable( true );
+ c->widgetResizeHandler->setActive( true );
}
}
@@ -1122,7 +1122,7 @@ void TQWorkspace::minimizeWindow( TQWidget* w)
activateWindow(w);
- setUpdatesEnabled( TRUE );
+ setUpdatesEnabled( true );
updateWorkspace();
fake->clearWState( WState_Maximized );
@@ -1144,9 +1144,9 @@ void TQWorkspace::normalizeWindow( TQWidget* w)
hideMaximizeControls();
} else {
if ( w->minimumSize() != w->maximumSize() )
- c->widgetResizeHandler->setActive( TRUE );
+ c->widgetResizeHandler->setActive( true );
if ( c->titlebar )
- c->titlebar->setMovable(TRUE);
+ c->titlebar->setMovable(true);
}
fake->clearWState( WState_Minimized | WState_Maximized );
c->clearWState( WState_Minimized | WState_Maximized );
@@ -1155,10 +1155,10 @@ void TQWorkspace::normalizeWindow( TQWidget* w)
c->setGeometry( d->maxRestore );
d->maxWindow = 0;
#ifndef TQT_NO_WIDGET_TOPEXTRA
- inCaptionChange = TRUE;
+ inCaptionChange = true;
if ( !!d->topCaption )
topLevelWidget()->setCaption( d->topCaption );
- inCaptionChange = FALSE;
+ inCaptionChange = false;
#endif
} else {
if ( c->iconw )
@@ -1171,11 +1171,11 @@ void TQWorkspace::normalizeWindow( TQWidget* w)
for (TQPtrListIterator<TQWorkspaceChild> it( d->windows ); it.current(); ++it ) {
TQWorkspaceChild* c = it.current();
if ( c->titlebar )
- c->titlebar->setMovable( TRUE );
+ c->titlebar->setMovable( true );
if ( c->childWidget && c->childWidget->minimumSize() != c->childWidget->maximumSize() )
- c->widgetResizeHandler->setActive( TRUE );
+ c->widgetResizeHandler->setActive( true );
}
- activateWindow( w, TRUE );
+ activateWindow( w, true );
updateWorkspace();
}
}
@@ -1188,7 +1188,7 @@ void TQWorkspace::maximizeWindow( TQWidget* w)
return;
if ( c ) {
- setUpdatesEnabled( FALSE );
+ setUpdatesEnabled( false );
if (c->iconw && d->icons.contains( c->iconw->parentWidget() ) )
normalizeWindow( w );
TQWorkspace *fake = (TQWorkspace*)w;
@@ -1211,18 +1211,18 @@ void TQWorkspace::maximizeWindow( TQWidget* w)
if(!style().styleHint(TQStyle::SH_Workspace_FillSpaceOnMaximize, this)) {
showMaximizeControls();
} else {
- c->widgetResizeHandler->setActive( FALSE );
+ c->widgetResizeHandler->setActive( false );
if ( c->titlebar )
- c->titlebar->setMovable( FALSE );
+ c->titlebar->setMovable( false );
}
#ifndef TQT_NO_WIDGET_TOPEXTRA
- inCaptionChange = TRUE;
+ inCaptionChange = true;
if ( !!d->topCaption )
topLevelWidget()->setCaption( tr("%1 - [%2]")
.arg(d->topCaption).arg(c->caption()) );
- inCaptionChange = FALSE;
+ inCaptionChange = false;
#endif
- setUpdatesEnabled( TRUE );
+ setUpdatesEnabled( true );
updateWorkspace();
@@ -1317,7 +1317,7 @@ bool TQWorkspace::eventFilter( TQObject *o, TQEvent * e)
TQChildEvent *ce = (TQChildEvent*)e;
if(!::tqt_cast<TQDockWindow*>(ce->child())) {
tqDebug("No idea what to do..");
- return FALSE;
+ return false;
}
TQDockWindow *w = (TQDockWindow*)ce->child();
if(d->newdocks.find(w) == -1 && d->dockwindows.find(w) == -1) {
@@ -1358,7 +1358,7 @@ bool TQWorkspace::eventFilter( TQObject *o, TQEvent * e)
tc = 0;
closeActiveWindow();
}
- return TRUE;
+ return true;
}
default:
break;
@@ -1384,7 +1384,7 @@ bool TQWorkspace::eventFilter( TQObject *o, TQEvent * e)
break;
}
if ( c->isShown() ) {
- activateWindow( c->windowWidget(), FALSE );
+ activateWindow( c->windowWidget(), false );
break;
}
}
@@ -1400,17 +1400,17 @@ bool TQWorkspace::eventFilter( TQObject *o, TQEvent * e)
if ( style().styleHint(TQStyle::SH_Workspace_FillSpaceOnMaximize, this)) {
TQWorkspaceChild *wc = (TQWorkspaceChild *)o;
- wc->widgetResizeHandler->setActive( TRUE );
+ wc->widgetResizeHandler->setActive( true );
if ( wc->titlebar )
- wc->titlebar->setMovable( TRUE );
+ wc->titlebar->setMovable( true );
} else {
hideMaximizeControls();
}
#ifndef TQT_NO_WIDGET_TOPEXTRA
- inCaptionChange = TRUE;
+ inCaptionChange = true;
if ( !!d->topCaption )
topLevelWidget()->setCaption( d->topCaption );
- inCaptionChange = FALSE;
+ inCaptionChange = false;
#endif
}
}
@@ -1426,7 +1426,7 @@ bool TQWorkspace::eventFilter( TQObject *o, TQEvent * e)
break;
#ifndef TQT_NO_WIDGET_TOPEXTRA
- inCaptionChange = TRUE;
+ inCaptionChange = true;
if ( o == topLevelWidget() ) {
TQWidget *tlw = (TQWidget*)o;
if ( !d->maxWindow
@@ -1437,7 +1437,7 @@ bool TQWorkspace::eventFilter( TQObject *o, TQEvent * e)
if ( d->maxWindow && !!d->topCaption )
topLevelWidget()->setCaption( tr("%1 - [%2]")
.arg(d->topCaption).arg(d->maxWindow->caption()));
- inCaptionChange = FALSE;
+ inCaptionChange = false;
#endif
break;
@@ -1472,7 +1472,7 @@ void TQWorkspace::showMaximizeControls()
TQWidget* w = parentWidget();
TQObjectList * l = 0;
while ( !l && w ) {
- l = w->queryList( "TQMenuBar", 0, FALSE, FALSE );
+ l = w->queryList( "TQMenuBar", 0, false, false );
w = w->parentWidget();
if ( l && !l->count() ) {
delete l;
@@ -1484,7 +1484,7 @@ void TQWorkspace::showMaximizeControls()
if ( !l || !l->count() ) {
if ( l )
delete l;
- l = topLevelWidget()->queryList( "TQMenuBar", 0, 0, TRUE );
+ l = topLevelWidget()->queryList( "TQMenuBar", 0, 0, true );
}
if ( l && l->count() )
b = (TQMenuBar *)l->first();
@@ -1544,7 +1544,7 @@ void TQWorkspace::showMaximizeControls()
}
if ( !d->active && d->becomeActive ) {
d->active = (TQWorkspaceChild*)d->becomeActive->parentWidget();
- d->active->setActive( TRUE );
+ d->active->setActive( true );
d->becomeActive = 0;
emit windowActivated( d->active->windowWidget() );
}
@@ -1604,12 +1604,12 @@ void TQWorkspace::hideMaximizeControls()
*/
void TQWorkspace::closeActiveWindow()
{
- setUpdatesEnabled( FALSE );
+ setUpdatesEnabled( false );
if ( d->maxWindow && d->maxWindow->windowWidget() )
d->maxWindow->windowWidget()->close();
else if ( d->active && d->active->windowWidget() )
d->active->windowWidget()->close();
- setUpdatesEnabled( TRUE );
+ setUpdatesEnabled( true );
updateWorkspace();
}
@@ -1623,7 +1623,7 @@ void TQWorkspace::closeActiveWindow()
*/
void TQWorkspace::closeAllWindows()
{
- bool did_close = TRUE;
+ bool did_close = true;
TQPtrListIterator<TQWorkspaceChild> it( d->windows );
TQWorkspaceChild *c = 0;
while ( ( c = it.current() ) && did_close ) {
@@ -1696,15 +1696,15 @@ void TQWorkspace::operationMenuAboutToShow()
d->popup->setItemEnabled( 5, windowWidget->testWFlags( WStyle_Maximize ) && canResize );
if ( d->active == d->maxWindow ) {
- d->popup->setItemEnabled( 2, FALSE );
- d->popup->setItemEnabled( 3, FALSE );
- d->popup->setItemEnabled( 5, FALSE );
+ d->popup->setItemEnabled( 2, false );
+ d->popup->setItemEnabled( 3, false );
+ d->popup->setItemEnabled( 5, false );
} else if ( d->active->isVisible() ){
- d->popup->setItemEnabled( 1, FALSE );
+ d->popup->setItemEnabled( 1, false );
} else {
- d->popup->setItemEnabled( 2, FALSE );
- d->popup->setItemEnabled( 3, FALSE );
- d->popup->setItemEnabled( 4, FALSE );
+ d->popup->setItemEnabled( 2, false );
+ d->popup->setItemEnabled( 3, false );
+ d->popup->setItemEnabled( 4, false );
}
}
@@ -1780,7 +1780,7 @@ void TQWorkspace::activateNextWindow()
return;
if ( !d->active ) {
if ( d->focus.first() )
- activateWindow( d->focus.first()->windowWidget(), FALSE );
+ activateWindow( d->focus.first()->windowWidget(), false );
return;
}
@@ -1789,7 +1789,7 @@ void TQWorkspace::activateNextWindow()
a = a % d->focus.count();
if ( d->focus.at( a ) )
- activateWindow( d->focus.at( a )->windowWidget(), FALSE );
+ activateWindow( d->focus.at( a )->windowWidget(), false );
else
activateWindow(0);
}
@@ -1810,7 +1810,7 @@ void TQWorkspace::activatePrevWindow()
return;
if ( !d->active ) {
if ( d->focus.last() )
- activateWindow( d->focus.first()->windowWidget(), FALSE );
+ activateWindow( d->focus.first()->windowWidget(), false );
else
activateWindow( 0 );
@@ -1822,7 +1822,7 @@ void TQWorkspace::activatePrevWindow()
a = d->focus.count()-1;
if ( d->focus.at( a ) )
- activateWindow( d->focus.at( a )->windowWidget(), FALSE );
+ activateWindow( d->focus.at( a )->windowWidget(), false );
else
activateWindow( 0 );
}
@@ -1847,17 +1847,17 @@ void TQWorkspace::activatePrevWindow()
*/
void TQWorkspace::cascade()
{
- blockSignals(TRUE);
+ blockSignals(true);
if ( d->maxWindow )
d->maxWindow->showNormal();
if ( d->vbar ) {
- d->vbar->blockSignals( TRUE );
+ d->vbar->blockSignals( true );
d->vbar->setValue( 0 );
- d->vbar->blockSignals( FALSE );
- d->hbar->blockSignals( TRUE );
+ d->vbar->blockSignals( false );
+ d->hbar->blockSignals( true );
d->hbar->setValue( 0 );
- d->hbar->blockSignals( FALSE );
+ d->hbar->blockSignals( false );
scrollBarChanged();
}
@@ -1874,12 +1874,12 @@ void TQWorkspace::cascade()
int x = 0;
int y = 0;
- setUpdatesEnabled( FALSE );
+ setUpdatesEnabled( false );
TQPtrListIterator<TQWorkspaceChild> it( widgets );
while ( it.current () ) {
TQWorkspaceChild *child = it.current();
++it;
- child->setUpdatesEnabled( FALSE );
+ child->setUpdatesEnabled( false );
TQSize prefSize = child->windowWidget()->sizeHint().expandedTo( child->windowWidget()->minimumSizeHint() );
if ( !prefSize.isValid() )
@@ -1901,11 +1901,11 @@ void TQWorkspace::cascade()
x += xoffset;
y += yoffset;
child->internalRaise();
- child->setUpdatesEnabled( TRUE );
+ child->setUpdatesEnabled( true );
}
- setUpdatesEnabled( TRUE );
+ setUpdatesEnabled( true );
updateWorkspace();
- blockSignals(FALSE);
+ blockSignals(false);
}
/*!
@@ -1915,18 +1915,18 @@ void TQWorkspace::cascade()
*/
void TQWorkspace::tile()
{
- blockSignals(TRUE);
+ blockSignals(true);
TQWidget *oldActive = d->active ? d->active->windowWidget() : 0;
if ( d->maxWindow )
d->maxWindow->showNormal();
if ( d->vbar ) {
- d->vbar->blockSignals( TRUE );
+ d->vbar->blockSignals( true );
d->vbar->setValue( 0 );
- d->vbar->blockSignals( FALSE );
- d->hbar->blockSignals( TRUE );
+ d->vbar->blockSignals( false );
+ d->hbar->blockSignals( true );
d->hbar->setValue( 0 );
- d->hbar->blockSignals( FALSE );
+ d->hbar->blockSignals( false );
scrollBarChanged();
}
@@ -1955,7 +1955,7 @@ void TQWorkspace::tile()
int add = cols * rows - n;
bool* used = new bool[ cols*rows ];
for ( int i = 0; i < rows*cols; i++ )
- used[i] = FALSE;
+ used[i] = false;
int row = 0;
int col = 0;
@@ -1988,7 +1988,7 @@ void TQWorkspace::tile()
} else {
c->showNormal();
tqApp->sendPostedEvents( 0, TQEvent::ShowNormal );
- used[row*cols+col] = TRUE;
+ used[row*cols+col] = true;
TQSize sz(w, h);
TQSize bsize(c->baseSize());
sz = sz.expandedTo(c->windowWidget()->minimumSize()).boundedTo(c->windowWidget()->maximumSize());
@@ -1998,7 +1998,7 @@ void TQWorkspace::tile()
if (sz.height() == h + bsize.height()) // no relevant constrains
sz.rheight() *= 2;
c->setGeometry(col*w + col*bsize.width(), row*h + row*bsize.height(), sz.width(), sz.height());
- used[(row+1)*cols+col] = TRUE;
+ used[(row+1)*cols+col] = true;
add--;
} else {
c->setGeometry(col*w + col*bsize.width(), row*h + row*bsize.height(), sz.width(), sz.height());
@@ -2016,7 +2016,7 @@ void TQWorkspace::tile()
activateWindow( oldActive );
updateWorkspace();
- blockSignals(FALSE);
+ blockSignals(false);
}
TQWorkspaceChild::TQWorkspaceChild( TQWidget* window, TQWorkspace *parent,
@@ -2026,14 +2026,14 @@ TQWorkspaceChild::TQWorkspaceChild( TQWidget* window, TQWorkspace *parent,
WStyle_NoBorder ) | WStyle_Customize | WDestructiveClose | WNoMousePropagation | WSubWindow )
{
statusbar = 0;
- setMouseTracking( TRUE );
- act = FALSE;
+ setMouseTracking( true );
+ act = false;
iconw = 0;
lastfocusw = 0;
- shademode = FALSE;
+ shademode = false;
titlebar = 0;
- snappedRight = FALSE;
- snappedDown = FALSE;
+ snappedRight = false;
+ snappedDown = false;
if (window) {
switch (window->focusPolicy()) {
@@ -2137,10 +2137,10 @@ TQWorkspaceChild::TQWorkspaceChild( TQWidget* window, TQWorkspace *parent,
widgetResizeHandler->setExtraHeight( th + contentsRect().y() - frameWidth() );
if(parent->windowMode() == TQWorkspace::TopLevel && isTopLevel()) {
move(0, 0);
- widgetResizeHandler->setActive( FALSE );
+ widgetResizeHandler->setActive( false );
}
if ( childWidget->minimumSize() == childWidget->maximumSize() )
- widgetResizeHandler->setActive( TQWidgetResizeHandler::Resize, FALSE );
+ widgetResizeHandler->setActive( TQWidgetResizeHandler::Resize, false );
setBaseSize( baseSize() );
}
@@ -2173,7 +2173,7 @@ bool TQWorkspaceChild::event( TQEvent *e )
if(!windowWidget()->close()) {
if(((TQWorkspace*) parentWidget() )->d->active == this)
((TQWorkspace*) parentWidget() )->activatePrevWindow();
- return TRUE;
+ return true;
}
}
break;
@@ -2210,7 +2210,7 @@ void TQWorkspaceChild::setStatusBar( TQStatusBar *sb )
if(sb) {
sb->show();
if(sb != statusbar) {
- sb->reparent(this, TQPoint(0, height()), TRUE);
+ sb->reparent(this, TQPoint(0, height()), true);
newsize = TQSize(width(), height() + sb->height());
}
}
@@ -2317,7 +2317,7 @@ bool TQWorkspaceChild::eventFilter( TQObject * o, TQEvent * e)
// for all widgets except the window, that's the only thing we
// process, and if we have no childWidget we skip totally
if ( o != childWidget || childWidget == 0 )
- return FALSE;
+ return false;
switch ( e->type() ) {
case TQEvent::Show:
@@ -2342,7 +2342,7 @@ bool TQWorkspaceChild::eventFilter( TQObject * o, TQEvent * e)
windowWidget()->resize( windowWidget()->maximumSize() );
((TQWorkspace*)windowWidget())->clearWState(WState_Maximized);
if (titlebar)
- titlebar->repaint(FALSE);
+ titlebar->repaint(false);
break;
}
if ( windowWidget()->testWFlags( WStyle_Maximize ) && !windowWidget()->testWFlags( WStyle_Tool ) )
@@ -2422,14 +2422,14 @@ bool TQWorkspaceChild::eventFilter( TQObject * o, TQEvent * e)
case TQEvent::WindowDeactivate:
if ( titlebar )
- titlebar->setActive( FALSE );
- repaint( FALSE );
+ titlebar->setActive( false );
+ repaint( false );
break;
case TQEvent::WindowActivate:
if ( titlebar )
titlebar->setActive( act );
- repaint( FALSE );
+ repaint( false );
break;
default:
@@ -2480,10 +2480,10 @@ bool TQWorkspaceChild::focusNextPrevChild( bool next )
}
if ( !candidate )
- return FALSE;
+ return false;
candidate->setFocus();
- return TRUE;
+ return true;
}
void TQWorkspaceChild::childEvent( TQChildEvent* e)
@@ -2562,7 +2562,7 @@ void TQWorkspaceChild::setActive( bool b )
titlebar->setActive( act );
if ( iconw )
iconw->setActive( act );
- repaint( FALSE );
+ repaint( false );
TQObjectList* ol = childWidget->queryList( "TQWidget" );
if ( act ) {
@@ -2690,7 +2690,7 @@ void TQWorkspaceChild::showShaded()
fake->clearWState( WState_Minimized );
clearWState( WState_Minimized );
- shademode = FALSE;
+ shademode = false;
resize( shadeRestore );
setMinimumSize( shadeRestoreMin );
style().polish(this);
@@ -2698,7 +2698,7 @@ void TQWorkspaceChild::showShaded()
shadeRestore = size();
shadeRestoreMin = minimumSize();
setMinimumHeight(0);
- shademode = TRUE;
+ shademode = true;
TQWorkspaceChild* fake = (TQWorkspaceChild*)windowWidget();
fake->setWState( WState_Minimized );
setWState( WState_Minimized );
@@ -2758,13 +2758,13 @@ void TQWorkspaceChild::setCaption( const TQString& cap )
void TQWorkspaceChild::internalRaise()
{
- setUpdatesEnabled( FALSE );
+ setUpdatesEnabled( false );
if ( iconw )
iconw->parentWidget()->raise();
raise();
if ( !windowWidget() || windowWidget()->testWFlags( WStyle_StaysOnTop ) ) {
- setUpdatesEnabled( TRUE );
+ setUpdatesEnabled( true );
return;
}
@@ -2777,7 +2777,7 @@ void TQWorkspaceChild::internalRaise()
c->windowWidget()->testWFlags( WStyle_StaysOnTop ) )
c->raise();
}
- setUpdatesEnabled( TRUE );
+ setUpdatesEnabled( true );
}
void TQWorkspaceChild::move( int x, int y )
@@ -2795,15 +2795,15 @@ void TQWorkspaceChild::move( int x, int y )
ny = 0;
if ( TQABS( x + width() - parentWidget()->width() ) < dx ) {
nx = parentWidget()->width() - width();
- snappedRight = TRUE;
+ snappedRight = true;
} else
- snappedRight = FALSE;
+ snappedRight = false;
if ( TQABS( y + height() - parentWidget()->height() ) < dy ) {
ny = parentWidget()->height() - height();
- snappedDown = TRUE;
+ snappedDown = true;
} else
- snappedDown = FALSE;
+ snappedDown = false;
}
TQFrame::move( nx, ny );
}
@@ -2817,11 +2817,11 @@ bool TQWorkspace::scrollBarsEnabled() const
\property TQWorkspace::scrollBarsEnabled
\brief whether the workspace provides scrollbars
- If this property is set to TRUE, it is possible to resize child
+ If this property is set to true, it is possible to resize child
windows over the right or the bottom edge out of the visible area
of the workspace. The workspace shows scrollbars to make it
possible for the user to access those windows. If this property is
- set to FALSE (the default), resizing windows out of the visible
+ set to false (the default), resizing windows out of the visible
area of the workspace is not permitted.
*/
void TQWorkspace::setScrollBarsEnabled( bool enable )
@@ -2875,8 +2875,8 @@ TQRect TQWorkspace::updateWorkspace()
if ( !child->isHidden() )
r = r.unite( child->geometry() );
}
- d->vbar->blockSignals( TRUE );
- d->hbar->blockSignals( TRUE );
+ d->vbar->blockSignals( true );
+ d->hbar->blockSignals( true );
int hsbExt = d->hbar->sizeHint().height();
int vsbExt = d->vbar->sizeHint().width();
@@ -2922,8 +2922,8 @@ TQRect TQWorkspace::updateWorkspace()
d->corner->hide();
}
- d->vbar->blockSignals( FALSE );
- d->hbar->blockSignals( FALSE );
+ d->vbar->blockSignals( false );
+ d->hbar->blockSignals( false );
cr.setRect( 0, 0, width() - vsbExt, height() - hsbExt );
}
@@ -2934,14 +2934,14 @@ TQRect TQWorkspace::updateWorkspace()
++ii;
int x = w->x();
int y = w->y();
- bool m = FALSE;
+ bool m = false;
if ( x+w->width() > cr.width() ) {
- m = TRUE;
+ m = true;
x = cr.width() - w->width();
}
if ( y+w->height() > cr.height() ) {
y = cr.height() - w->height();
- m = TRUE;
+ m = true;
}
if ( m )
w->move( x, y );
diff --git a/src/workspace/tqworkspace.h b/src/workspace/tqworkspace.h
index 71227476e..2349fe553 100644
--- a/src/workspace/tqworkspace.h
+++ b/src/workspace/tqworkspace.h
@@ -142,7 +142,7 @@ private:
TQWorkspaceChild* findChild( TQWidget* w);
void showMaximizeControls();
void hideMaximizeControls();
- void activateWindow( TQWidget* w, bool change_focus = TRUE );
+ void activateWindow( TQWidget* w, bool change_focus = true );
void showWindow( TQWidget* w);
void maximizeWindow( TQWidget* w);
void minimizeWindow( TQWidget* w);
diff --git a/src/xml/tqdom.cpp b/src/xml/tqdom.cpp
index 2d8e684c8..ed67c2ce2 100644
--- a/src/xml/tqdom.cpp
+++ b/src/xml/tqdom.cpp
@@ -131,7 +131,7 @@ public:
void setOwnerDocument( TQDomDocumentPrivate* doc );
virtual TQDomNamedNodeMapPrivate* attributes();
- virtual bool hasAttributes() { return FALSE; }
+ virtual bool hasAttributes() { return false; }
virtual TQDomNodePrivate* insertBefore( TQDomNodePrivate* newChild, TQDomNodePrivate* refChild );
virtual TQDomNodePrivate* insertAfter( TQDomNodePrivate* newChild, TQDomNodePrivate* refChild );
virtual TQDomNodePrivate* replaceChild( TQDomNodePrivate* newChild, TQDomNodePrivate* oldChild );
@@ -140,31 +140,31 @@ public:
TQDomNodePrivate* namedItem( const TQString& name );
- virtual TQDomNodePrivate* cloneNode( bool deep = TRUE );
+ virtual TQDomNodePrivate* cloneNode( bool deep = true );
virtual void normalize();
virtual void clear();
TQDomNodePrivate* parent() { return hasParent ? ownerNode : 0; }
- void setParent( TQDomNodePrivate *p ) { ownerNode = p; hasParent = TRUE; }
+ void setParent( TQDomNodePrivate *p ) { ownerNode = p; hasParent = true; }
void setNoParent() {
ownerNode = hasParent ? (TQDomNodePrivate*)ownerDocument() : 0;
- hasParent = FALSE;
+ hasParent = false;
}
// Dynamic cast
- virtual bool isAttr() { return FALSE; }
- virtual bool isCDATASection() { return FALSE; }
- virtual bool isDocumentFragment() { return FALSE; }
- virtual bool isDocument() { return FALSE; }
- virtual bool isDocumentType() { return FALSE; }
- virtual bool isElement() { return FALSE; }
- virtual bool isEntityReference() { return FALSE; }
- virtual bool isText() { return FALSE; }
- virtual bool isEntity() { return FALSE; }
- virtual bool isNotation() { return FALSE; }
- virtual bool isProcessingInstruction() { return FALSE; }
- virtual bool isCharacterData() { return FALSE; }
- virtual bool isComment() { return FALSE; }
+ virtual bool isAttr() { return false; }
+ virtual bool isCDATASection() { return false; }
+ virtual bool isDocumentFragment() { return false; }
+ virtual bool isDocument() { return false; }
+ virtual bool isDocumentType() { return false; }
+ virtual bool isElement() { return false; }
+ virtual bool isEntityReference() { return false; }
+ virtual bool isText() { return false; }
+ virtual bool isEntity() { return false; }
+ virtual bool isNotation() { return false; }
+ virtual bool isProcessingInstruction() { return false; }
+ virtual bool isCharacterData() { return false; }
+ virtual bool isComment() { return false; }
virtual TQDomNode::NodeType nodeType() const { return TQDomNode::BaseNode; }
virtual void save( TQTextStream&, int, int ) const;
@@ -230,12 +230,12 @@ public:
void setReadOnly( bool r ) { readonly = r; }
bool isAppendToParent() { return appendToParent; }
/**
- * If TRUE, then the node will redirect insert/remove calls
+ * If true, then the node will redirect insert/remove calls
* to its parent by calling TQDomNodePrivate::appendChild or removeChild.
* In addition the map wont increase or decrease the reference count
* of the nodes it contains.
*
- * By default this value is FALSE and the map will handle reference counting
+ * By default this value is false and the map will handle reference counting
* by itself.
*/
void setAppendToParent( bool b ) { appendToParent = b; }
@@ -262,14 +262,14 @@ public:
void init();
// Reimplemented from TQDomNodePrivate
- TQDomNodePrivate* cloneNode( bool deep = TRUE );
+ TQDomNodePrivate* cloneNode( bool deep = true );
TQDomNodePrivate* insertBefore( TQDomNodePrivate* newChild, TQDomNodePrivate* refChild );
TQDomNodePrivate* insertAfter( TQDomNodePrivate* newChild, TQDomNodePrivate* refChild );
TQDomNodePrivate* replaceChild( TQDomNodePrivate* newChild, TQDomNodePrivate* oldChild );
TQDomNodePrivate* removeChild( TQDomNodePrivate* oldChild );
TQDomNodePrivate* appendChild( TQDomNodePrivate* newChild );
- bool isDocumentType() { return TRUE; }
+ bool isDocumentType() { return true; }
TQDomNode::NodeType nodeType() const { return TQDomNode::DocumentTypeNode; }
void save( TQTextStream& s, int, int ) const;
@@ -290,8 +290,8 @@ public:
~TQDomDocumentFragmentPrivate();
// Reimplemented from TQDomNodePrivate
- TQDomNodePrivate* cloneNode( bool deep = TRUE );
- bool isDocumentFragment() { return TRUE; }
+ TQDomNodePrivate* cloneNode( bool deep = true );
+ bool isDocumentFragment() { return true; }
TQDomNode::NodeType nodeType() const { return TQDomNode::DocumentFragmentNode; }
};
@@ -310,9 +310,9 @@ public:
void replaceData( unsigned long offset, unsigned long count, const TQString& arg );
// Reimplemented from TQDomNodePrivate
- bool isCharacterData() { return TRUE; }
+ bool isCharacterData() { return true; }
TQDomNode::NodeType nodeType() const { return TQDomNode::CharacterDataNode; }
- TQDomNodePrivate* cloneNode( bool deep = TRUE );
+ TQDomNodePrivate* cloneNode( bool deep = true );
};
@@ -326,8 +326,8 @@ public:
TQDomTextPrivate* splitText( int offset );
// Reimplemented from TQDomNodePrivate
- TQDomNodePrivate* cloneNode( bool deep = TRUE );
- bool isText() { return TRUE; }
+ TQDomNodePrivate* cloneNode( bool deep = true );
+ bool isText() { return true; }
TQDomNode::NodeType nodeType() const { return TQDomNode::TextNode; }
void save( TQTextStream& s, int, int ) const;
@@ -345,8 +345,8 @@ public:
// Reimplemented from TQDomNodePrivate
void setNodeValue( const TQString& v );
- TQDomNodePrivate* cloneNode( bool deep = TRUE );
- bool isAttr() { return TRUE; }
+ TQDomNodePrivate* cloneNode( bool deep = true );
+ bool isAttr() { return true; }
TQDomNode::NodeType nodeType() const { return TQDomNode::AttributeNode; }
void save( TQTextStream& s, int, int ) const;
@@ -380,9 +380,9 @@ public:
// Reimplemented from TQDomNodePrivate
TQDomNamedNodeMapPrivate* attributes() { return m_attr; }
bool hasAttributes() { return ( m_attr->length() > 0 ); }
- bool isElement() { return TRUE; }
+ bool isElement() { return true; }
TQDomNode::NodeType nodeType() const { return TQDomNode::ElementNode; }
- TQDomNodePrivate* cloneNode( bool deep = TRUE );
+ TQDomNodePrivate* cloneNode( bool deep = true );
void save( TQTextStream& s, int, int ) const;
// Variables
@@ -398,8 +398,8 @@ public:
~TQDomCommentPrivate();
// Reimplemented from TQDomNodePrivate
- TQDomNodePrivate* cloneNode( bool deep = TRUE );
- bool isComment() { return TRUE; }
+ TQDomNodePrivate* cloneNode( bool deep = true );
+ bool isComment() { return true; }
TQDomNode::NodeType nodeType() const { return TQDomNode::CommentNode; }
void save( TQTextStream& s, int, int ) const;
@@ -413,8 +413,8 @@ public:
~TQDomCDATASectionPrivate();
// Reimplemented from TQDomNodePrivate
- TQDomNodePrivate* cloneNode( bool deep = TRUE );
- bool isCDATASection() { return TRUE; }
+ TQDomNodePrivate* cloneNode( bool deep = true );
+ bool isCDATASection() { return true; }
TQDomNode::NodeType nodeType() const { return TQDomNode::CDATASectionNode; }
void save( TQTextStream& s, int, int ) const;
@@ -429,8 +429,8 @@ public:
~TQDomNotationPrivate();
// Reimplemented from TQDomNodePrivate
- TQDomNodePrivate* cloneNode( bool deep = TRUE );
- bool isNotation() { return TRUE; }
+ TQDomNodePrivate* cloneNode( bool deep = true );
+ bool isNotation() { return true; }
TQDomNode::NodeType nodeType() const { return TQDomNode::NotationNode; }
void save( TQTextStream& s, int, int ) const;
@@ -448,8 +448,8 @@ public:
~TQDomEntityPrivate();
// Reimplemented from TQDomNodePrivate
- TQDomNodePrivate* cloneNode( bool deep = TRUE );
- bool isEntity() { return TRUE; }
+ TQDomNodePrivate* cloneNode( bool deep = true );
+ bool isEntity() { return true; }
TQDomNode::NodeType nodeType() const { return TQDomNode::EntityNode; }
void save( TQTextStream& s, int, int ) const;
@@ -467,8 +467,8 @@ public:
~TQDomEntityReferencePrivate();
// Reimplemented from TQDomNodePrivate
- TQDomNodePrivate* cloneNode( bool deep = TRUE );
- bool isEntityReference() { return TRUE; }
+ TQDomNodePrivate* cloneNode( bool deep = true );
+ bool isEntityReference() { return true; }
TQDomNode::NodeType nodeType() const { return TQDomNode::EntityReferenceNode; }
void save( TQTextStream& s, int, int ) const;
};
@@ -482,8 +482,8 @@ public:
~TQDomProcessingInstructionPrivate();
// Reimplemented from TQDomNodePrivate
- TQDomNodePrivate* cloneNode( bool deep = TRUE );
- bool isProcessingInstruction() { return TRUE; }
+ TQDomNodePrivate* cloneNode( bool deep = true );
+ bool isProcessingInstruction() { return true; }
TQDomNode::NodeType nodeType() const { return TQDomNode::ProcessingInstructionNode; }
void save( TQTextStream& s, int, int ) const;
};
@@ -520,8 +520,8 @@ public:
TQDomNodePrivate* importNode( const TQDomNodePrivate* importedNode, bool deep );
// Reimplemented from TQDomNodePrivate
- TQDomNodePrivate* cloneNode( bool deep = TRUE );
- bool isDocument() { return TRUE; }
+ TQDomNodePrivate* cloneNode( bool deep = true );
+ bool isDocument() { return true; }
TQDomNode::NodeType nodeType() const { return TQDomNode::DocumentNode; }
void clear();
void save( TQTextStream&, int, int ) const;
@@ -681,8 +681,8 @@ TQDomImplementation& TQDomImplementation::operator= ( const TQDomImplementation&
}
/*!
- Returns TRUE if \a x and this DOM implementation object were
- created from the same TQDomDocument; otherwise returns FALSE.
+ Returns true if \a x and this DOM implementation object were
+ created from the same TQDomDocument; otherwise returns false.
*/
bool TQDomImplementation::operator==( const TQDomImplementation& x ) const
{
@@ -690,8 +690,8 @@ bool TQDomImplementation::operator==( const TQDomImplementation& x ) const
}
/*!
- Returns TRUE if \a x and this DOM implementation object were
- created from different TQDomDocuments; otherwise returns FALSE.
+ Returns true if \a x and this DOM implementation object were
+ created from different TQDomDocuments; otherwise returns false.
*/
bool TQDomImplementation::operator!=( const TQDomImplementation& x ) const
{
@@ -708,8 +708,8 @@ TQDomImplementation::~TQDomImplementation()
}
/*!
- The function returns TRUE if TQDom implements the requested \a
- version of a \a feature; otherwise returns FALSE.
+ The function returns true if TQDom implements the requested \a
+ version of a \a feature; otherwise returns false.
The currently supported features and their versions:
\table
@@ -721,11 +721,11 @@ bool TQDomImplementation::hasFeature( const TQString& feature, const TQString& v
{
if ( feature == "XML" ) {
if ( version.isEmpty() || version == "1.0" ) {
- return TRUE;
+ return true;
}
}
// ### add DOM level 2 features
- return FALSE;
+ return false;
}
/*!
@@ -780,8 +780,8 @@ TQDomDocument TQDomImplementation::createDocument( const TQString& nsURI, const
}
/*!
- Returns FALSE if the object was created by
- TQDomDocument::implementation(); otherwise returns TRUE.
+ Returns false if the object was created by
+ TQDomDocument::implementation(); otherwise returns true.
*/
bool TQDomImplementation::isNull()
{
@@ -980,21 +980,21 @@ TQDomNodeList& TQDomNodeList::operator= ( const TQDomNodeList& n )
}
/*!
- Returns TRUE if the node list \a n and this node list are equal;
- otherwise returns FALSE.
+ Returns true if the node list \a n and this node list are equal;
+ otherwise returns false.
*/
bool TQDomNodeList::operator== ( const TQDomNodeList& n ) const
{
if ( impl == n.impl )
- return TRUE;
+ return true;
if ( !impl || !n.impl )
- return FALSE;
+ return false;
return (*impl == *n.impl);
}
/*!
- Returns TRUE the node list \a n and this node list are not equal;
- otherwise returns FALSE.
+ Returns true the node list \a n and this node list are not equal;
+ otherwise returns false.
*/
bool TQDomNodeList::operator!= ( const TQDomNodeList& n ) const
{
@@ -1015,7 +1015,7 @@ TQDomNodeList::~TQDomNodeList()
If \a index is negative or if \a index >= length() then a null
node is returned (i.e. a node for which TQDomNode::isNull() returns
- TRUE).
+ true).
\sa count()
*/
@@ -1057,7 +1057,7 @@ uint TQDomNodeList::length() const
inline void TQDomNodePrivate::setOwnerDocument( TQDomDocumentPrivate* doc )
{
ownerNode = doc;
- hasParent = FALSE;
+ hasParent = false;
}
TQDomNodePrivate::TQDomNodePrivate( TQDomDocumentPrivate* doc, TQDomNodePrivate *par )
@@ -1070,7 +1070,7 @@ TQDomNodePrivate::TQDomNodePrivate( TQDomDocumentPrivate* doc, TQDomNodePrivate
next = 0;
first = 0;
last = 0;
- createdWithDom1Interface = TRUE;
+ createdWithDom1Interface = true;
}
TQDomNodePrivate::TQDomNodePrivate( TQDomNodePrivate* n, bool deep )
@@ -1091,7 +1091,7 @@ TQDomNodePrivate::TQDomNodePrivate( TQDomNodePrivate* n, bool deep )
return;
for ( TQDomNodePrivate* x = n->first; x; x = x->next )
- appendChild( x->cloneNode( TRUE ) );
+ appendChild( x->cloneNode( true ) );
}
TQDomNodePrivate::~TQDomNodePrivate()
@@ -1664,8 +1664,8 @@ TQDomNode& TQDomNode::operator= ( const TQDomNode& n )
}
/*!
- Returns TRUE if \a n and this DOM node are equal; otherwise
- returns FALSE.
+ Returns true if \a n and this DOM node are equal; otherwise
+ returns false.
*/
bool TQDomNode::operator== ( const TQDomNode& n ) const
{
@@ -1673,8 +1673,8 @@ bool TQDomNode::operator== ( const TQDomNode& n ) const
}
/*!
- Returns TRUE if \a n and this DOM node are not equal; otherwise
- returns FALSE.
+ Returns true if \a n and this DOM node are not equal; otherwise
+ returns false.
*/
bool TQDomNode::operator!= ( const TQDomNode& n ) const
{
@@ -1795,7 +1795,7 @@ TQDomNode::NodeType TQDomNode::nodeType() const
/*!
Returns the parent node. If this node has no parent, a null node
- is returned (i.e. a node for which isNull() returns TRUE).
+ is returned (i.e. a node for which isNull() returns true).
*/
TQDomNode TQDomNode::parentNode() const
{
@@ -1932,9 +1932,9 @@ TQDomDocument TQDomNode::ownerDocument() const
/*!
Creates a deep (not shallow) copy of the TQDomNode.
- If \a deep is TRUE, then the cloning is done recursively which
+ If \a deep is true, then the cloning is done recursively which
means that all the node's children are deep copied too. If \a deep
- is FALSE only the node itself is copied and the copy will have no
+ is false only the node itself is copied and the copy will have no
child nodes.
*/
TQDomNode TQDomNode::cloneNode( bool deep ) const
@@ -1958,9 +1958,9 @@ void TQDomNode::normalize()
}
/*!
- Returns TRUE if the DOM implementation implements the feature \a
+ Returns true if the DOM implementation implements the feature \a
feature and this feature is supported by this node in the version
- \a version; otherwise returns FALSE.
+ \a version; otherwise returns false.
\sa TQDomImplementation::hasFeature()
*/
@@ -2058,14 +2058,14 @@ TQString TQDomNode::localName() const
}
/*!
- Returns TRUE if the node has attributes; otherwise returns FALSE.
+ Returns true if the node has attributes; otherwise returns false.
\sa attributes()
*/
bool TQDomNode::hasAttributes() const
{
if ( !impl )
- return FALSE;
+ return false;
return IMPL->hasAttributes();
}
@@ -2202,19 +2202,19 @@ TQDomNode TQDomNode::appendChild( const TQDomNode& newChild )
}
/*!
- Returns TRUE if the node has one or more children; otherwise
- returns FALSE.
+ Returns true if the node has one or more children; otherwise
+ returns false.
*/
bool TQDomNode::hasChildNodes() const
{
if ( !impl )
- return FALSE;
+ return false;
return IMPL->first != 0;
}
/*!
- Returns TRUE if this node is null (i.e. if it has no type or
- contents); otherwise returns FALSE.
+ Returns true if this node is null (i.e. if it has no type or
+ contents); otherwise returns false.
*/
bool TQDomNode::isNull() const
{
@@ -2274,9 +2274,9 @@ TQTextStream& operator<<( TQTextStream& str, const TQDomNode& node )
}
/*!
- Returns TRUE if the node is an attribute; otherwise returns FALSE.
+ Returns true if the node is an attribute; otherwise returns false.
- If this function returns TRUE, it does not imply that this object
+ If this function returns true, it does not imply that this object
is a TQDomAttribute; you can get the TQDomAttribute with
toAttribute().
@@ -2286,14 +2286,14 @@ bool TQDomNode::isAttr() const
{
if(impl)
return impl->isAttr();
- return FALSE;
+ return false;
}
/*!
- Returns TRUE if the node is a CDATA section; otherwise returns
- FALSE.
+ Returns true if the node is a CDATA section; otherwise returns
+ false.
- If this function returns TRUE, it does not imply that this object
+ If this function returns true, it does not imply that this object
is a TQDomCDATASection; you can get the TQDomCDATASection with
toCDATASection().
@@ -2303,14 +2303,14 @@ bool TQDomNode::isCDATASection() const
{
if(impl)
return impl->isCDATASection();
- return FALSE;
+ return false;
}
/*!
- Returns TRUE if the node is a document fragment; otherwise returns
- FALSE.
+ Returns true if the node is a document fragment; otherwise returns
+ false.
- If this function returns TRUE, it does not imply that this object
+ If this function returns true, it does not imply that this object
is a TQDomDocumentFragment; you can get the TQDomDocumentFragment
with toDocumentFragment().
@@ -2320,13 +2320,13 @@ bool TQDomNode::isDocumentFragment() const
{
if(impl)
return impl->isDocumentFragment();
- return FALSE;
+ return false;
}
/*!
- Returns TRUE if the node is a document; otherwise returns FALSE.
+ Returns true if the node is a document; otherwise returns false.
- If this function returns TRUE, it does not imply that this object
+ If this function returns true, it does not imply that this object
is a TQDomDocument; you can get the TQDomDocument with toDocument().
\sa toDocument()
@@ -2335,14 +2335,14 @@ bool TQDomNode::isDocument() const
{
if(impl)
return impl->isDocument();
- return FALSE;
+ return false;
}
/*!
- Returns TRUE if the node is a document type; otherwise returns
- FALSE.
+ Returns true if the node is a document type; otherwise returns
+ false.
- If this function returns TRUE, it does not imply that this object
+ If this function returns true, it does not imply that this object
is a TQDomDocumentType; you can get the TQDomDocumentType with
toDocumentType().
@@ -2352,13 +2352,13 @@ bool TQDomNode::isDocumentType() const
{
if(impl)
return impl->isDocumentType();
- return FALSE;
+ return false;
}
/*!
- Returns TRUE if the node is an element; otherwise returns FALSE.
+ Returns true if the node is an element; otherwise returns false.
- If this function returns TRUE, it does not imply that this object
+ If this function returns true, it does not imply that this object
is a TQDomElement; you can get the TQDomElement with toElement().
\sa toElement()
@@ -2367,14 +2367,14 @@ bool TQDomNode::isElement() const
{
if(impl)
return impl->isElement();
- return FALSE;
+ return false;
}
/*!
- Returns TRUE if the node is an entity reference; otherwise returns
- FALSE.
+ Returns true if the node is an entity reference; otherwise returns
+ false.
- If this function returns TRUE, it does not imply that this object
+ If this function returns true, it does not imply that this object
is a TQDomEntityReference; you can get the TQDomEntityReference with
toEntityReference().
@@ -2384,13 +2384,13 @@ bool TQDomNode::isEntityReference() const
{
if(impl)
return impl->isEntityReference();
- return FALSE;
+ return false;
}
/*!
- Returns TRUE if the node is a text node; otherwise returns FALSE.
+ Returns true if the node is a text node; otherwise returns false.
- If this function returns TRUE, it does not imply that this object
+ If this function returns true, it does not imply that this object
is a TQDomText; you can get the TQDomText with toText().
\sa toText()
@@ -2399,13 +2399,13 @@ bool TQDomNode::isText() const
{
if(impl)
return impl->isText();
- return FALSE;
+ return false;
}
/*!
- Returns TRUE if the node is an entity; otherwise returns FALSE.
+ Returns true if the node is an entity; otherwise returns false.
- If this function returns TRUE, it does not imply that this object
+ If this function returns true, it does not imply that this object
is a TQDomEntity; you can get the TQDomEntity with toEntity().
\sa toEntity()
@@ -2414,13 +2414,13 @@ bool TQDomNode::isEntity() const
{
if(impl)
return impl->isEntity();
- return FALSE;
+ return false;
}
/*!
- Returns TRUE if the node is a notation; otherwise returns FALSE.
+ Returns true if the node is a notation; otherwise returns false.
- If this function returns TRUE, it does not imply that this object
+ If this function returns true, it does not imply that this object
is a TQDomNotation; you can get the TQDomNotation with toNotation().
\sa toNotation()
@@ -2429,14 +2429,14 @@ bool TQDomNode::isNotation() const
{
if(impl)
return impl->isNotation();
- return FALSE;
+ return false;
}
/*!
- Returns TRUE if the node is a processing instruction; otherwise
- returns FALSE.
+ Returns true if the node is a processing instruction; otherwise
+ returns false.
- If this function returns TRUE, it does not imply that this object
+ If this function returns true, it does not imply that this object
is a TQDomProcessingInstruction; you can get the
TQProcessingInstruction with toProcessingInstruction().
@@ -2446,14 +2446,14 @@ bool TQDomNode::isProcessingInstruction() const
{
if(impl)
return impl->isProcessingInstruction();
- return FALSE;
+ return false;
}
/*!
- Returns TRUE if the node is a character data node; otherwise
- returns FALSE.
+ Returns true if the node is a character data node; otherwise
+ returns false.
- If this function returns TRUE, it does not imply that this object
+ If this function returns true, it does not imply that this object
is a TQDomCharacterData; you can get the TQDomCharacterData with
toCharacterData().
@@ -2463,13 +2463,13 @@ bool TQDomNode::isCharacterData() const
{
if(impl)
return impl->isCharacterData();
- return FALSE;
+ return false;
}
/*!
- Returns TRUE if the node is a comment; otherwise returns FALSE.
+ Returns true if the node is a comment; otherwise returns false.
- If this function returns TRUE, it does not imply that this object
+ If this function returns true, it does not imply that this object
is a TQDomComment; you can get the TQDomComment with toComment().
\sa toComment()
@@ -2478,7 +2478,7 @@ bool TQDomNode::isComment() const
{
if(impl)
return impl->isComment();
- return FALSE;
+ return false;
}
#undef IMPL
@@ -2491,9 +2491,9 @@ bool TQDomNode::isComment() const
TQDomNamedNodeMapPrivate::TQDomNamedNodeMapPrivate( TQDomNodePrivate* n )
{
- readonly = FALSE;
+ readonly = false;
parent = n;
- appendToParent = FALSE;
+ appendToParent = false;
}
TQDomNamedNodeMapPrivate::~TQDomNamedNodeMapPrivate()
@@ -2720,8 +2720,8 @@ TQDomNamedNodeMap& TQDomNamedNodeMap::operator= ( const TQDomNamedNodeMap& n )
}
/*!
- Returns TRUE if \a n and this named node map are equal; otherwise
- returns FALSE.
+ Returns true if \a n and this named node map are equal; otherwise
+ returns false.
*/
bool TQDomNamedNodeMap::operator== ( const TQDomNamedNodeMap& n ) const
{
@@ -2729,8 +2729,8 @@ bool TQDomNamedNodeMap::operator== ( const TQDomNamedNodeMap& n ) const
}
/*!
- Returns TRUE if \a n and this named node map are not equal;
- otherwise returns FALSE.
+ Returns true if \a n and this named node map are not equal;
+ otherwise returns false.
*/
bool TQDomNamedNodeMap::operator!= ( const TQDomNamedNodeMap& n ) const
{
@@ -2883,13 +2883,13 @@ uint TQDomNamedNodeMap::length() const
*/
/*!
- Returns TRUE if the map contains a node called \a name; otherwise
- returns FALSE.
+ Returns true if the map contains a node called \a name; otherwise
+ returns false.
*/
bool TQDomNamedNodeMap::contains( const TQString& name ) const
{
if ( !impl )
- return FALSE;
+ return false;
return IMPL->contains( name );
}
@@ -2939,8 +2939,8 @@ void TQDomDocumentTypePrivate::init()
systemId = TQString::null;
internalSubset = TQString::null;
- entities->setAppendToParent( TRUE );
- notations->setAppendToParent( TRUE );
+ entities->setAppendToParent( true );
+ notations->setAppendToParent( true );
}
TQDomNodePrivate* TQDomDocumentTypePrivate::cloneNode( bool deep)
@@ -3210,7 +3210,7 @@ TQDomNode::NodeType TQDomDocumentType::nodeType() const
*/
bool TQDomDocumentType::isDocumentType() const
{
- return TRUE;
+ return true;
}
#undef IMPL
@@ -3340,7 +3340,7 @@ TQDomNode::NodeType TQDomDocumentFragment::nodeType() const
*/
bool TQDomDocumentFragment::isDocumentFragment() const
{
- return TRUE;
+ return true;
}
#undef IMPL
@@ -3579,11 +3579,11 @@ TQDomNode::NodeType TQDomCharacterData::nodeType() const
}
/*!
- Returns TRUE.
+ Returns true.
*/
bool TQDomCharacterData::isCharacterData() const
{
- return TRUE;
+ return true;
}
#undef IMPL
@@ -3598,7 +3598,7 @@ TQDomAttrPrivate::TQDomAttrPrivate( TQDomDocumentPrivate* d, TQDomNodePrivate* p
: TQDomNodePrivate( d, parent )
{
name = name_;
- m_specified = FALSE;
+ m_specified = false;
}
TQDomAttrPrivate::TQDomAttrPrivate( TQDomDocumentPrivate* d, TQDomNodePrivate* p, const TQString& nsURI, const TQString& qName )
@@ -3606,8 +3606,8 @@ TQDomAttrPrivate::TQDomAttrPrivate( TQDomDocumentPrivate* d, TQDomNodePrivate* p
{
qt_split_namespace( prefix, name, qName, !nsURI.isNull() );
namespaceURI = nsURI;
- createdWithDom1Interface = FALSE;
- m_specified = FALSE;
+ createdWithDom1Interface = false;
+ m_specified = false;
}
TQDomAttrPrivate::TQDomAttrPrivate( TQDomAttrPrivate* n, bool deep )
@@ -3754,7 +3754,7 @@ void TQDomAttrPrivate::save( TQTextStream& s, int, int ) const
TQDomAttr can return the name() and value() of an attribute. An
attribute's value is set with setValue(). If specified() returns
- TRUE the value was either set in the document or set with
+ true the value was either set in the document or set with
setValue(); otherwise the value hasn't been set. The node this
attribute is attached to (if any) is returned by ownerElement().
@@ -3820,16 +3820,16 @@ TQString TQDomAttr::name() const
}
/*!
- Returns TRUE if the attribute has either been expicitly specified
+ Returns true if the attribute has either been expicitly specified
in the XML document or was set by the user with setValue().
- Returns FALSE if the value hasn't been specified or set.
+ Returns false if the value hasn't been specified or set.
\sa setValue()
*/
bool TQDomAttr::specified() const
{
if ( !impl )
- return FALSE;
+ return false;
return IMPL->specified();
}
@@ -3868,7 +3868,7 @@ void TQDomAttr::setValue( const TQString& v )
if ( !impl )
return;
impl->setNodeValue( v );
- IMPL->m_specified = TRUE;
+ IMPL->m_specified = true;
}
/*!
@@ -3880,11 +3880,11 @@ TQDomNode::NodeType TQDomAttr::nodeType() const
}
/*!
- Returns TRUE.
+ Returns true.
*/
bool TQDomAttr::isAttr() const
{
- return TRUE;
+ return true;
}
#undef IMPL
@@ -3909,7 +3909,7 @@ TQDomElementPrivate::TQDomElementPrivate( TQDomDocumentPrivate* d, TQDomNodePriv
{
qt_split_namespace( prefix, name, qName, !nsURI.isNull() );
namespaceURI = nsURI;
- createdWithDom1Interface = FALSE;
+ createdWithDom1Interface = false;
m_attr = new TQDomNamedNodeMapPrivate( this );
}
@@ -3972,7 +3972,7 @@ void TQDomElementPrivate::setAttribute( const TQString& aname, const TQString& n
void TQDomElementPrivate::setAttributeNS( const TQString& nsURI, const TQString& qName, const TQString& newValue )
{
TQString prefix, localName;
- qt_split_namespace( prefix, localName, qName, TRUE );
+ qt_split_namespace( prefix, localName, qName, true );
TQDomNodePrivate* n = m_attr->namedItemNS( nsURI, localName );
if ( !n ) {
n = new TQDomAttrPrivate( ownerDocument(), this, nsURI, qName );
@@ -4406,11 +4406,11 @@ TQDomNodeList TQDomElement::elementsByTagName( const TQString& tagname ) const
}
/*!
- Returns TRUE.
+ Returns true.
*/
bool TQDomElement::isElement() const
{
- return TRUE;
+ return true;
}
/*!
@@ -4426,13 +4426,13 @@ TQDomNamedNodeMap TQDomElement::attributes() const
}
/*!
- Returns TRUE if this element has an attribute called \a name;
- otherwise returns FALSE.
+ Returns true if this element has an attribute called \a name;
+ otherwise returns false.
*/
bool TQDomElement::hasAttribute( const TQString& name ) const
{
if ( !impl )
- return FALSE;
+ return false;
return IMPL->hasAttribute( name );
}
@@ -4585,14 +4585,14 @@ TQDomNodeList TQDomElement::elementsByTagNameNS( const TQString& nsURI, const TQ
}
/*!
- Returns TRUE if this element has an attribute with the local name
+ Returns true if this element has an attribute with the local name
\a localName and the namespace URI \a nsURI; otherwise returns
- FALSE.
+ false.
*/
bool TQDomElement::hasAttributeNS( const TQString& nsURI, const TQString& localName ) const
{
if ( !impl )
- return FALSE;
+ return false;
return IMPL->hasAttributeNS( nsURI, localName );
}
@@ -4769,11 +4769,11 @@ TQDomText TQDomText::splitText( int offset )
}
/*!
- Returns TRUE.
+ Returns true.
*/
bool TQDomText::isText() const
{
- return TRUE;
+ return true;
}
#undef IMPL
@@ -4898,11 +4898,11 @@ TQDomNode::NodeType TQDomComment::nodeType() const
}
/*!
- Returns TRUE.
+ Returns true.
*/
bool TQDomComment::isComment() const
{
- return TRUE;
+ return true;
}
#undef IMPL
@@ -5034,11 +5034,11 @@ TQDomNode::NodeType TQDomCDATASection::nodeType() const
}
/*!
- Returns TRUE.
+ Returns true.
*/
bool TQDomCDATASection::isCDATASection() const
{
- return TRUE;
+ return true;
}
#undef IMPL
@@ -5204,11 +5204,11 @@ TQString TQDomNotation::systemId() const
}
/*!
- Returns TRUE.
+ Returns true.
*/
bool TQDomNotation::isNotation() const
{
- return TRUE;
+ return true;
}
#undef IMPL
@@ -5435,11 +5435,11 @@ TQString TQDomEntity::notationName() const
}
/*!
- Returns TRUE.
+ Returns true.
*/
bool TQDomEntity::isEntity() const
{
- return TRUE;
+ return true;
}
#undef IMPL
@@ -5579,11 +5579,11 @@ TQDomNode::NodeType TQDomEntityReference::nodeType() const
}
/*!
- Returns TRUE.
+ Returns true.
*/
bool TQDomEntityReference::isEntityReference() const
{
- return TRUE;
+ return true;
}
#undef IMPL
@@ -5749,11 +5749,11 @@ void TQDomProcessingInstruction::setData( const TQString& d )
}
/*!
- Returns TRUE.
+ Returns true.
*/
bool TQDomProcessingInstruction::isProcessingInstruction() const
{
- return TRUE;
+ return true;
}
#undef IMPL
@@ -5828,14 +5828,14 @@ bool TQDomDocumentPrivate::setContent( TQXmlInputSource *source, bool namespaceP
{
TQXmlSimpleReader reader;
if ( namespaceProcessing ) {
- reader.setFeature( "http://xml.org/sax/features/namespaces", TRUE );
- reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", FALSE );
+ reader.setFeature( "http://xml.org/sax/features/namespaces", true );
+ reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", false );
} else {
- reader.setFeature( "http://xml.org/sax/features/namespaces", FALSE );
- reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", TRUE );
+ reader.setFeature( "http://xml.org/sax/features/namespaces", false );
+ reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", true );
}
- reader.setFeature( "http://trolltech.com/xml/features/report-whitespace-only-CharData", FALSE );
- reader.setUndefEntityInAttrHack( TRUE );
+ reader.setFeature( "http://trolltech.com/xml/features/report-whitespace-only-CharData", false );
+ reader.setUndefEntityInAttrHack( true );
return setContent( source, &reader, errorMsg, errorLine, errorColumn );
}
@@ -5863,10 +5863,10 @@ bool TQDomDocumentPrivate::setContent( TQXmlInputSource *source, TQXmlReader *re
*errorLine = hnd.errorLine;
if ( errorColumn )
*errorColumn = hnd.errorColumn;
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
TQDomNodePrivate* TQDomDocumentPrivate::cloneNode( bool deep)
@@ -5961,7 +5961,7 @@ TQDomNodePrivate* TQDomDocumentPrivate::importNode( const TQDomNodePrivate* impo
TQDomNodePrivate *node = 0;
switch ( importedNode->nodeType() ) {
case TQDomNode::AttributeNode:
- node = new TQDomAttrPrivate( (TQDomAttrPrivate*)importedNode, TRUE );
+ node = new TQDomAttrPrivate( (TQDomAttrPrivate*)importedNode, true );
break;
case TQDomNode::DocumentFragmentNode:
node = new TQDomDocumentFragmentPrivate( (TQDomDocumentFragmentPrivate*)importedNode, deep );
@@ -5973,7 +5973,7 @@ TQDomNodePrivate* TQDomDocumentPrivate::importNode( const TQDomNodePrivate* impo
node = new TQDomEntityPrivate( (TQDomEntityPrivate*)importedNode, deep );
break;
case TQDomNode::EntityReferenceNode:
- node = new TQDomEntityReferencePrivate( (TQDomEntityReferencePrivate*)importedNode, FALSE );
+ node = new TQDomEntityReferencePrivate( (TQDomEntityReferencePrivate*)importedNode, false );
break;
case TQDomNode::NotationNode:
node = new TQDomNotationPrivate( (TQDomNotationPrivate*)importedNode, deep );
@@ -6004,7 +6004,7 @@ TQDomNodePrivate* TQDomDocumentPrivate::importNode( const TQDomNodePrivate* impo
void TQDomDocumentPrivate::save( TQTextStream& s, int, int indent ) const
{
- bool doc = FALSE;
+ bool doc = false;
TQDomNodePrivate* n = first;
if ( n && n->isProcessingInstruction() && n->nodeName()=="xml" ) {
@@ -6028,7 +6028,7 @@ void TQDomDocumentPrivate::save( TQTextStream& s, int, int indent ) const
if ( !doc && !(n->isProcessingInstruction()&&n->nodeName()=="xml") ) {
// save doctype after XML declaration
type->save( s, 0, indent );
- doc = TRUE;
+ doc = true;
}
n->save( s, 0, indent );
n = n->next;
@@ -6242,23 +6242,23 @@ bool TQDomDocument::setContent( const TQString& text, bool namespaceProcessing,
detect the encoding of the document as required by the XML
specification.
- If \a namespaceProcessing is TRUE, the parser recognizes
+ If \a namespaceProcessing is true, the parser recognizes
namespaces in the XML file and sets the prefix name, local name
and namespace URI to appropriate values. If \a namespaceProcessing
- is FALSE, the parser does no namespace processing when it reads
+ is false, the parser does no namespace processing when it reads
the XML file.
- If a parse error occurs, the function returns FALSE; otherwise it
- returns TRUE. If a parse error occurs and \a errorMsg, \a
+ If a parse error occurs, the function returns false; otherwise it
+ returns true. If a parse error occurs and \a errorMsg, \a
errorLine and \a errorColumn are not 0, the error message is
placed in \a *errorMsg, the line number \a *errorLine and the
column number in \a *errorColumn.
- If \a namespaceProcessing is TRUE, the function TQDomNode::prefix()
+ If \a namespaceProcessing is true, the function TQDomNode::prefix()
returns a string for all elements and attributes. It returns an
empty string if the element or attribute has no prefix.
- If \a namespaceProcessing is FALSE, the functions
+ If \a namespaceProcessing is false, the functions
TQDomNode::prefix(), TQDomNode::localName() and
TQDomNode::namespaceURI() return TQString::null.
@@ -6311,7 +6311,7 @@ bool TQDomDocument::setContent( TQIODevice* dev, bool namespaceProcessing, TQStr
*/
bool TQDomDocument::setContent( const TQString& text, TQString *errorMsg, int *errorLine, int *errorColumn )
{
- return setContent( text, FALSE, errorMsg, errorLine, errorColumn );
+ return setContent( text, false, errorMsg, errorLine, errorColumn );
}
/*!
@@ -6324,7 +6324,7 @@ bool TQDomDocument::setContent( const TQString& text, TQString *errorMsg, int *e
*/
bool TQDomDocument::setContent( const TQByteArray& buffer, TQString *errorMsg, int *errorLine, int *errorColumn )
{
- return setContent( buffer, FALSE, errorMsg, errorLine, errorColumn );
+ return setContent( buffer, false, errorMsg, errorLine, errorColumn );
}
/*!
@@ -6339,7 +6339,7 @@ bool TQDomDocument::setContent( const TQByteArray& buffer, TQString *errorMsg, i
*/
bool TQDomDocument::setContent( const TQCString& buffer, TQString *errorMsg, int *errorLine, int *errorColumn )
{
- return setContent( buffer, FALSE, errorMsg, errorLine, errorColumn );
+ return setContent( buffer, false, errorMsg, errorLine, errorColumn );
}
/*!
@@ -6351,7 +6351,7 @@ bool TQDomDocument::setContent( const TQCString& buffer, TQString *errorMsg, int
*/
bool TQDomDocument::setContent( TQIODevice* dev, TQString *errorMsg, int *errorLine, int *errorColumn )
{
- return setContent( dev, FALSE, errorMsg, errorLine, errorColumn );
+ return setContent( dev, false, errorMsg, errorLine, errorColumn );
}
/*!
@@ -6602,8 +6602,8 @@ TQDomNodeList TQDomDocument::elementsByTagName( const TQString& tagname ) const
import TQDomDocument and TQDomDocumentType nodes. In those cases
this function returns a \link TQDomNode::isNull() null node\endlink.
- If \a deep is TRUE, this function imports not only the node \a
- importedNode but its whole subtree; if it is FALSE, only the \a
+ If \a deep is true, this function imports not only the node \a
+ importedNode but its whole subtree; if it is false, only the \a
importedNode is imported. The argument \a deep has no effect on
TQDomAttr and TQDomEntityReference nodes, since the descendents of
TQDomAttr nodes are always imported and those of
@@ -6615,21 +6615,21 @@ TQDomNodeList TQDomDocument::elementsByTagName( const TQString& tagname ) const
\header \i Node Type \i Behaviour
\row \i TQDomAttr
\i The owner element is set to 0 and the specified flag is
- set to TRUE in the generated attribute. The whole subtree
+ set to true in the generated attribute. The whole subtree
of \a importedNode is always imported for attribute nodes:
\a deep has no effect.
\row \i TQDomDocument
\i Document nodes cannot be imported.
\row \i TQDomDocumentFragment
- \i If \a deep is TRUE, this function imports the whole
+ \i If \a deep is true, this function imports the whole
document fragment; otherwise it only generates an empty
document fragment.
\row \i TQDomDocumentType
\i Document type nodes cannot be imported.
\row \i TQDomElement
- \i Attributes for which TQDomAttr::specified() is TRUE are
+ \i Attributes for which TQDomAttr::specified() is true are
also imported, other attributes are not imported. If \a
- deep is TRUE, this function also imports the subtree of \a
+ deep is true, this function also imports the subtree of \a
importedNode; otherwise it imports only the element node
(and some attributes, see above).
\row \i TQDomEntity
@@ -6733,11 +6733,11 @@ TQDomNode::NodeType TQDomDocument::nodeType() const
}
/*!
- Returns TRUE.
+ Returns true.
*/
bool TQDomDocument::isDocument() const
{
- return TRUE;
+ return true;
}
@@ -6940,7 +6940,7 @@ TQDomHandler::TQDomHandler( TQDomDocumentPrivate* adoc, bool namespaceProcessing
{
doc = adoc;
node = doc;
- cdata = FALSE;
+ cdata = false;
nsProcessing = namespaceProcessing;
}
@@ -6952,8 +6952,8 @@ bool TQDomHandler::endDocument()
{
// ### is this really necessary? (rms)
if ( node != doc )
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
bool TQDomHandler::startDTD( const TQString& name, const TQString& publicId, const TQString& systemId )
@@ -6961,7 +6961,7 @@ bool TQDomHandler::startDTD( const TQString& name, const TQString& publicId, con
doc->doctype()->name = name;
doc->doctype()->publicId = publicId;
doc->doctype()->systemId = systemId;
- return TRUE;
+ return true;
}
bool TQDomHandler::startElement( const TQString& nsURI, const TQString&, const TQString& qName, const TQXmlAttributes& atts )
@@ -6986,23 +6986,23 @@ bool TQDomHandler::startElement( const TQString& nsURI, const TQString&, const T
}
}
- return TRUE;
+ return true;
}
bool TQDomHandler::endElement( const TQString&, const TQString&, const TQString& )
{
if ( node == doc )
- return FALSE;
+ return false;
node = node->parent();
- return TRUE;
+ return true;
}
bool TQDomHandler::characters( const TQString& ch )
{
// No text as child of some document
if ( node == doc )
- return FALSE;
+ return false;
if ( cdata ) {
node->appendChild( doc->createCDATASection( ch ) );
@@ -7016,19 +7016,19 @@ bool TQDomHandler::characters( const TQString& ch )
node->appendChild( doc->createTextNode( ch ) );
}
- return TRUE;
+ return true;
}
bool TQDomHandler::processingInstruction( const TQString& target, const TQString& data )
{
node->appendChild( doc->createProcessingInstruction( target, data ) );
- return TRUE;
+ return true;
}
bool TQDomHandler::skippedEntity( const TQString& name )
{
node->appendChild( doc->createEntityReference( name ) );
- return TRUE;
+ return true;
}
bool TQDomHandler::fatalError( const TQXmlParseException& exception )
@@ -7041,32 +7041,32 @@ bool TQDomHandler::fatalError( const TQXmlParseException& exception )
bool TQDomHandler::startCDATA()
{
- cdata = TRUE;
- return TRUE;
+ cdata = true;
+ return true;
}
bool TQDomHandler::endCDATA()
{
- cdata = FALSE;
- return TRUE;
+ cdata = false;
+ return true;
}
bool TQDomHandler::startEntity( const TQString &name )
{
entityName = name;
- return TRUE;
+ return true;
}
bool TQDomHandler::endEntity( const TQString & )
{
entityName = TQString::null;
- return TRUE;
+ return true;
}
bool TQDomHandler::comment( const TQString& ch )
{
node->appendChild( doc->createComment( ch ) );
- return TRUE;
+ return true;
}
bool TQDomHandler::unparsedEntityDecl( const TQString &name, const TQString &publicId, const TQString &systemId, const TQString &notationName )
@@ -7074,7 +7074,7 @@ bool TQDomHandler::unparsedEntityDecl( const TQString &name, const TQString &pub
TQDomEntityPrivate* e = new TQDomEntityPrivate( doc, 0, name,
publicId, systemId, notationName );
doc->doctype()->appendChild( e );
- return TRUE;
+ return true;
}
bool TQDomHandler::externalEntityDecl( const TQString &name, const TQString &publicId, const TQString &systemId )
@@ -7086,7 +7086,7 @@ bool TQDomHandler::notationDecl( const TQString & name, const TQString & publicI
{
TQDomNotationPrivate* n = new TQDomNotationPrivate( doc, 0, name, publicId, systemId );
doc->doctype()->appendChild( n );
- return TRUE;
+ return true;
}
#endif //TQT_NO_DOM
diff --git a/src/xml/tqdom.h b/src/xml/tqdom.h
index 2bc76eb99..865da3ad3 100644
--- a/src/xml/tqdom.h
+++ b/src/xml/tqdom.h
@@ -156,7 +156,7 @@ public:
virtual TQDomNode removeChild( const TQDomNode& oldChild );
virtual TQDomNode appendChild( const TQDomNode& newChild );
virtual bool hasChildNodes() const;
- virtual TQDomNode cloneNode( bool deep = TRUE ) const;
+ virtual TQDomNode cloneNode( bool deep = true ) const;
virtual void normalize();
virtual bool isSupported( const TQString& feature, const TQString& version ) const;
diff --git a/src/xml/tqsvgdevice.cpp b/src/xml/tqsvgdevice.cpp
index 1b92d8d6e..51c48179c 100644
--- a/src/xml/tqsvgdevice.cpp
+++ b/src/xml/tqsvgdevice.cpp
@@ -145,7 +145,7 @@ TQSvgDevice::TQSvgDevice()
{
d = new TQSvgDevicePrivate;
d->currentClip = 0;
- d->justRestored = FALSE;
+ d->justRestored = false;
}
/*!
@@ -160,9 +160,9 @@ TQSvgDevice::~TQSvgDevice()
}
/*!
- Loads and parses a SVG from \a dev into the device. Returns TRUE
+ Loads and parses a SVG from \a dev into the device. Returns true
on success (i.e. loaded and parsed without error); otherwise
- returns FALSE.
+ returns false.
*/
bool TQSvgDevice::load( TQIODevice *dev )
@@ -171,8 +171,8 @@ bool TQSvgDevice::load( TQIODevice *dev )
}
/*!
- Renders (replays) the SVG on the \a painter and returns TRUE if
- successful (i.e. it is a valid SVG); otherwise returns FALSE.
+ Renders (replays) the SVG on the \a painter and returns true if
+ successful (i.e. it is a valid SVG); otherwise returns false.
*/
bool TQSvgDevice::play( TQPainter *painter )
@@ -181,25 +181,25 @@ bool TQSvgDevice::play( TQPainter *painter )
#if defined(QT_CHECK_RANGE)
Q_ASSERT( painter );
#endif
- return FALSE;
+ return false;
}
pt = painter;
pt->setPen( TQt::NoPen ); // SVG default pen and brush
pt->setBrush( TQt::black );
if ( doc.isNull() ) {
tqWarning( "TQSvgDevice::play: No SVG data set." );
- return FALSE;
+ return false;
}
TQDomNode svg = doc.namedItem( "svg" );
if ( svg.isNull() || !svg.isElement() ) {
tqWarning( "TQSvgDevice::play: Couldn't find any svg element." );
- return FALSE;
+ return false;
}
// force transform to be activated in case our sequences
// are replayed later with a transformed painter
- painter->setWorldXForm( TRUE );
+ painter->setWorldXForm( true );
TQDomNamedNodeMap attr = svg.attributes();
int x = lenToInt( attr, "x" );
@@ -210,8 +210,8 @@ bool TQSvgDevice::play( TQPainter *painter )
? attr.namedItem( "width" ).nodeValue() : TQString( "100%" );
TQString hstr = attr.contains( "height" )
? attr.namedItem( "height" ).nodeValue() : TQString( "100%" );
- double width = parseLen( wstr, 0, TRUE );
- double height = parseLen( hstr, 0, FALSE );
+ double width = parseLen( wstr, 0, true );
+ double height = parseLen( hstr, 0, false );
// SVG doesn't respect x and y. But we want a proper bounding rect.
brect.setWidth( int(width) - x );
brect.setHeight( int(height) - y );
@@ -222,7 +222,7 @@ bool TQSvgDevice::play( TQPainter *painter )
"\\s*(\\S+)\\s*,?\\s*(\\S+)\\s*") );
if ( re.search( attr.namedItem( "viewBox" ).nodeValue() ) < 0 ) {
tqWarning( "TQSvgDevice::play: Invalid viewBox attribute.");
- return FALSE;
+ return false;
} else {
double x = re.cap( 1 ).toDouble();
double y = re.cap( 2 ).toDouble();
@@ -230,9 +230,9 @@ bool TQSvgDevice::play( TQPainter *painter )
double h = re.cap( 4 ).toDouble();
if ( w < 0 || h < 0 ) {
tqWarning( "TQSvgDevice::play: Invalid viewBox dimension.");
- return FALSE;
+ return false;
} else if ( w == 0 || h == 0 ) {
- return TRUE;
+ return true;
}
painter->scale( width/w, height/h );
painter->translate( -x, -y );
@@ -335,12 +335,12 @@ bool TQSvgDevice::save( const TQString &fileName )
TQFile f( fileName );
if ( !f.open ( IO_WriteOnly ) )
- return FALSE;
+ return false;
TQTextStream s( &f );
s.setEncoding( TQTextStream::UnicodeUTF8 );
s << doc;
- return TRUE;
+ return true;
}
/*!
@@ -360,7 +360,7 @@ bool TQSvgDevice::save( TQIODevice *dev )
s.setEncoding( TQTextStream::UnicodeUTF8 );
s << doc;
- return TRUE;
+ return true;
}
/*!
@@ -447,10 +447,10 @@ bool TQSvgDevice::cmd ( int c, TQPainter *painter, TQPDevCmdParam *p )
current = doc.documentElement();
d->images.clear();
d->pixmaps.clear();
- dirtyTransform = dirtyStyle = FALSE; // ###
- return TRUE;
+ dirtyTransform = dirtyStyle = false; // ###
+ return true;
} else if ( c == PdcEnd ) {
- return TRUE;
+ return true;
}
TQDomElement e;
@@ -656,7 +656,7 @@ bool TQSvgDevice::cmd ( int c, TQPainter *painter, TQPDevCmdParam *p )
case PdcRestore:
current = current.parentNode();
dirtyTransform = !pt->worldMatrix().isIdentity();
- d->justRestored = TRUE;
+ d->justRestored = true;
// ### reset dirty flags
break;
case PdcSetBkColor:
@@ -666,7 +666,7 @@ bool TQSvgDevice::cmd ( int c, TQPainter *painter, TQPDevCmdParam *p )
case PdcSetFont:
case PdcSetPen:
case PdcSetBrush:
- dirtyStyle = TRUE;
+ dirtyStyle = true;
break;
case PdcSetTabStops:
// ###
@@ -681,7 +681,7 @@ bool TQSvgDevice::cmd ( int c, TQPainter *painter, TQPDevCmdParam *p )
case PdcSetWMatrix:
case PdcSaveWMatrix:
case PdcRestoreWMatrix:
- dirtyTransform = TRUE;
+ dirtyTransform = true;
break;
case PdcSetClip:
// ###
@@ -692,13 +692,13 @@ bool TQSvgDevice::cmd ( int c, TQPainter *painter, TQPDevCmdParam *p )
// the viewer as part of the tree structure. It doesn't hurt to write the region
// out, but it doubles the number of clipregions defined in the final svg.
if (d->justRestored) {
- d->justRestored = FALSE;
- return TRUE;
+ d->justRestored = false;
+ return true;
}
TQMemArray<TQRect> rects = p[0].rgn->rects();
if (rects.count() == 0)
- return TRUE;
+ return true;
d->currentClip++;
e = doc.createElement( "clipPath" );
e.setAttribute( "id", TQString("clip%1").arg(d->currentClip) );
@@ -721,7 +721,7 @@ bool TQSvgDevice::cmd ( int c, TQPainter *painter, TQPDevCmdParam *p )
appendChild( e, c );
- return TRUE;
+ return true;
}
/*!
@@ -751,7 +751,7 @@ void TQSvgDevice::appendChild( TQDomElement &e, int c )
// same as above but not for <g> tags
applyTransform( &e );
if ( c == PdcSave )
- dirtyTransform = FALSE;
+ dirtyTransform = false;
}
}
}
@@ -1034,7 +1034,7 @@ bool TQSvgDevice::play( const TQDomNode &node )
restoreAttributes();
- return TRUE;
+ return true;
}
/*!
@@ -1116,7 +1116,7 @@ double TQSvgDevice::parseLen( const TQString &str, bool *ok, bool horiz ) const
if ( reg.search( str ) == -1 ) {
tqWarning( "TQSvgDevice::parseLen: couldn't parse %s ", str.latin1() );
if ( ok )
- *ok = FALSE;
+ *ok = false;
return 0.0;
}
@@ -1146,7 +1146,7 @@ double TQSvgDevice::parseLen( const TQString &str, bool *ok, bool horiz ) const
tqWarning( "TQSvgDevice::parseLen: Unknown unit %s", u.latin1() );
}
if ( ok )
- *ok = TRUE;
+ *ok = true;
return dbl;
}
@@ -1237,9 +1237,9 @@ void TQSvgDevice::setStyleProperty( const TQString &prop, const TQString &val,
font->setFamily( val );
} else if ( prop == "font-style" ) {
if ( val == "normal" )
- font->setItalic( FALSE );
+ font->setItalic( false );
else if ( val == "italic" )
- font->setItalic( TRUE );
+ font->setItalic( true );
else
tqWarning( "TQSvgDevice::setStyleProperty: unhandled "
"font-style: %s", val.latin1() );
@@ -1328,7 +1328,7 @@ void TQSvgDevice::setTransform( const TQString &tr )
m[ i ] = plist[ i ].toDouble();
TQWMatrix wm( m[ 0 ], m[ 1 ], m[ 2 ],
m[ 3 ], m[ 4 ], m[ 5 ] );
- pt->setWorldMatrix( wm, TRUE );
+ pt->setWorldMatrix( wm, true );
} else if ( command == "skewX" ) {
pt->shear( 0.0, tan( plist[0].toDouble() * deg2rad ) );
} else if ( command == "skewY" ) {
@@ -1351,7 +1351,7 @@ void TQSvgDevice::drawPath( const TQString &data )
int pcount = 0; // current point array index
uint idx = 0; // current data position
int mode = 0, lastMode = 0; // parser state
- bool relative = FALSE; // e.g. 'h' vs. 'H'
+ bool relative = false; // e.g. 'h' vs. 'H'
TQString commands( "MZLHVCSTQTA" ); // recognized commands
int cmdArgs[] = { 2, 0, 2, 1, 1, 6, 4, 4, 2, 7 }; // no of arguments
TQRegExp reg( TQString::fromLatin1("\\s*,?\\s*([+-]?\\d*\\.?\\d*)") ); // floating point
@@ -1488,7 +1488,7 @@ void TQSvgDevice::drawPath( const TQString &data )
path.setPoint( pcount++, int(x0), int(y0) );
TQPen pen = pt->pen();
pt->setPen( TQt::NoPen );
- pt->drawPolygon( path, FALSE, 0, pcount );
+ pt->drawPolygon( path, false, 0, pcount );
pt->setPen( pen );
}
// draw each subpath stroke seperately
diff --git a/src/xml/tqsvgdevice_p.h b/src/xml/tqsvgdevice_p.h
index ffdec75fd..84d9cf214 100644
--- a/src/xml/tqsvgdevice_p.h
+++ b/src/xml/tqsvgdevice_p.h
@@ -100,7 +100,7 @@ private:
void saveAttributes();
void restoreAttributes();
TQColor parseColor( const TQString &col );
- double parseLen( const TQString &str, bool *ok=0, bool horiz=TRUE ) const;
+ double parseLen( const TQString &str, bool *ok=0, bool horiz=true ) const;
int lenToInt( const TQDomNamedNodeMap &map, const TQString &attr,
int def=0 ) const;
double lenToDouble( const TQDomNamedNodeMap &map, const TQString &attr,
diff --git a/src/xml/tqxml.cpp b/src/xml/tqxml.cpp
index d6fe43026..591890976 100644
--- a/src/xml/tqxml.cpp
+++ b/src/xml/tqxml.cpp
@@ -174,7 +174,7 @@ static const signed char charLookupTable[256]={
/*
This function strips the TextDecl [77] ("<?xml ...?>") from the string \a
str. The stripped version is stored in \a str. If this function finds an
- invalid TextDecl, it returns FALSE, otherwise TRUE.
+ invalid TextDecl, it returns false, otherwise true.
This function is used for external entities since those can include an
TextDecl that must be stripped before inserting the entity.
@@ -192,10 +192,10 @@ static bool stripTextDecl( TQString& str )
));
TQString strTmp = str.replace( textDecl, "" );
if ( strTmp.length() != str.length() )
- return FALSE; // external entity has wrong TextDecl
+ return false; // external entity has wrong TextDecl
str = strTmp;
}
- return TRUE;
+ return true;
}
@@ -490,7 +490,7 @@ void TQXmlNamespaceSupport::splitName( const TQString& qname,
declared.
\a qname is the raw XML 1.0 name to be processed. \a isAttribute
- is TRUE if the name is an attribute name.
+ is true if the name is an attribute name.
This function stores the namespace URI in \a nsuri (which will be
set to TQString::null if the raw name has an undeclared prefix),
@@ -1021,14 +1021,14 @@ TQChar TQXmlInputSource::next()
{
if ( pos >= length ) {
if ( nextReturnedEndOfData ) {
- nextReturnedEndOfData = FALSE;
+ nextReturnedEndOfData = false;
fetchData();
if ( pos >= length ) {
return EndOfDocument;
}
return next();
}
- nextReturnedEndOfData = TRUE;
+ nextReturnedEndOfData = true;
return EndOfData;
}
return unicode[pos++];
@@ -1043,7 +1043,7 @@ TQChar TQXmlInputSource::next()
*/
void TQXmlInputSource::reset()
{
- nextReturnedEndOfData = FALSE;
+ nextReturnedEndOfData = false;
pos = 0;
}
@@ -1072,7 +1072,7 @@ void TQXmlInputSource::setData( const TQString& dat )
unicode = str.unicode();
pos = 0;
length = str.length();
- nextReturnedEndOfData = FALSE;
+ nextReturnedEndOfData = false;
}
/*!
@@ -1133,9 +1133,9 @@ void TQXmlInputSource::fetchData()
TQString and returns it. It tries its best to get the correct
encoding for the XML file.
- If \a beginning is TRUE, this function assumes that the data
+ If \a beginning is true, this function assumes that the data
starts at the beginning of a new XML document and looks for an
- encoding declaration. If \a beginning is FALSE, it converts the
+ encoding declaration. If \a beginning is false, it converts the
raw data using the encoding determined from prior calls.
*/
TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning )
@@ -1274,7 +1274,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
to setDocumentLocator(), and before any other functions in this
class or in the TQXmlDTDHandler class are called.
- If this function returns FALSE the reader stops parsing and
+ If this function returns false the reader stops parsing and
reports an error. The reader uses the function errorString() to
get the error message.
@@ -1289,7 +1289,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
is called after the reader has read all input or has abandoned
parsing because of a fatal error.
- If this function returns FALSE the reader stops parsing and
+ If this function returns false the reader stops parsing and
reports an error. The reader uses the function errorString() to
get the error message.
@@ -1314,7 +1314,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
The argument \a prefix is the namespace prefix being declared and
the argument \a uri is the namespace URI the prefix is mapped to.
- If this function returns FALSE the reader stops parsing and
+ If this function returns false the reader stops parsing and
reports an error. The reader uses the function errorString() to
get the error message.
@@ -1329,7 +1329,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
The reader calls this function to signal the end of a prefix
mapping for the prefix \a prefix.
- If this function returns FALSE the reader stops parsing and
+ If this function returns false the reader stops parsing and
reports an error. The reader uses the function errorString() to
get the error message.
@@ -1353,7 +1353,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
The attribute list provided only contains attributes with explicit
values. The attribute list contains attributes used for namespace
declaration (i.e. attributes starting with xmlns) only if the
- namespace-prefix property of the reader is TRUE.
+ namespace-prefix property of the reader is true.
The argument \a namespaceURI is the namespace URI, or
TQString::null if the element has no namespace URI or if no
@@ -1363,7 +1363,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
the attributes attached to the element. If there are no
attributes, \a atts is an empty attributes object.
- If this function returns FALSE the reader stops parsing and
+ If this function returns false the reader stops parsing and
reports an error. The reader uses the function errorString() to
get the error message.
@@ -1379,7 +1379,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
tag with the qualified name \a qName, the local name \a localName
and the namespace URI \a namespaceURI.
- If this function returns FALSE the reader stops parsing and
+ If this function returns false the reader stops parsing and
reports an error. The reader uses the function errorString() to
get the error message.
@@ -1405,7 +1405,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
one chunk; e.g. a reader might want to report "a\<b" in three
characters() events ("a ", "\<" and " b").
- If this function returns FALSE the reader stops parsing and
+ If this function returns false the reader stops parsing and
reports an error. The reader uses the function errorString() to
get the error message.
*/
@@ -1416,7 +1416,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
Some readers may use this function to report each chunk of
whitespace in element content. The whitespace is reported in \a ch.
- If this function returns FALSE the reader stops parsing and
+ If this function returns false the reader stops parsing and
reports an error. The reader uses the function errorString() to
get the error message.
*/
@@ -1430,7 +1430,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
\a target is the target name of the processing instruction and \a
data is the data in the processing instruction.
- If this function returns FALSE the reader stops parsing and
+ If this function returns false the reader stops parsing and
reports an error. The reader uses the function errorString() to
get the error message.
*/
@@ -1443,7 +1443,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
do so they report that they skipped the entity called \a name by
calling this function.
- If this function returns FALSE the reader stops parsing and
+ If this function returns false the reader stops parsing and
reports an error. The reader uses the function errorString() to
get the error message.
*/
@@ -1452,7 +1452,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
\fn TQString TQXmlContentHandler::errorString()
The reader calls this function to get an error string, e.g. if any
- of the handler functions returns FALSE.
+ of the handler functions returns false.
*/
@@ -1490,7 +1490,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
XML 1.0 specification. Details of the warning are stored in \a
exception.
- If this function returns FALSE the reader stops parsing and
+ If this function returns false the reader stops parsing and
reports an error. The reader uses the function errorString() to
get the error message.
*/
@@ -1506,7 +1506,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
The reader must continue to provide normal parsing events after
invoking this function.
- If this function returns FALSE the reader stops parsing and
+ If this function returns false the reader stops parsing and
reports an error. The reader uses the function errorString() to
get the error message.
*/
@@ -1517,7 +1517,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
A reader must use this function to report a non-recoverable error.
Details of the error are stored in \a exception.
- If this function returns TRUE the reader might try to go on
+ If this function returns true the reader might try to go on
parsing and reporting further errors; but no regular parsing
events are reported.
*/
@@ -1526,7 +1526,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
\fn TQString TQXmlErrorHandler::errorString()
The reader calls this function to get an error string if any of
- the handler functions returns FALSE.
+ the handler functions returns false.
*/
@@ -1567,7 +1567,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
notation's public identifier and \a systemId is the notation's
system identifier.
- If this function returns FALSE the reader stops parsing and
+ If this function returns false the reader stops parsing and
reports an error. The reader uses the function errorString() to
get the error message.
*/
@@ -1583,7 +1583,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
identifier and \a notationName is the name of the associated
notation.
- If this function returns FALSE the reader stops parsing and
+ If this function returns false the reader stops parsing and
reports an error. The reader uses the function errorString() to
get the error message.
*/
@@ -1592,7 +1592,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
\fn TQString TQXmlDTDHandler::errorString()
The reader calls this function to get an error string if any of
- the handler functions returns FALSE.
+ the handler functions returns false.
*/
@@ -1638,7 +1638,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
non-zero it must point to an input source which the reader uses
instead.
- If this function returns FALSE the reader stops parsing and
+ If this function returns false the reader stops parsing and
reports an error. The reader uses the function errorString() to
get the error message.
*/
@@ -1647,7 +1647,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
\fn TQString TQXmlEntityResolver::errorString()
The reader calls this function to get an error string if any of
- the handler functions returns FALSE.
+ the handler functions returns false.
*/
@@ -1700,7 +1700,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
All declarations reported through TQXmlDTDHandler or
TQXmlDeclHandler appear between the startDTD() and endDTD() calls.
- If this function returns FALSE the reader stops parsing and
+ If this function returns false the reader stops parsing and
reports an error. The reader uses the function errorString() to
get the error message.
@@ -1713,7 +1713,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
The reader calls this function to report the end of a DTD
declaration, if any.
- If this function returns FALSE the reader stops parsing and
+ If this function returns false the reader stops parsing and
reports an error. The reader uses the function errorString() to
get the error message.
@@ -1730,7 +1730,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
TQXmlContentHandler::skippedEntity() and not through this
function.
- If this function returns FALSE the reader stops parsing and
+ If this function returns false the reader stops parsing and
reports an error. The reader uses the function errorString() to
get the error message.
@@ -1747,7 +1747,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
call. The calls to startEntity() and endEntity() are properly
nested.
- If this function returns FALSE the reader stops parsing and
+ If this function returns false the reader stops parsing and
reports an error. The reader uses the function errorString() to
get the error message.
@@ -1762,7 +1762,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
TQXmlContentHandler::characters() function. This function is
intended only to report the boundary.
- If this function returns FALSE the reader stops parsing and
+ If this function returns false the reader stops parsing and
reports an error. The reader uses the function errorString() to
get the error message.
@@ -1775,7 +1775,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
The reader calls this function to report the end of a CDATA
section.
- If this function returns FALSE the reader stops parsing and reports
+ If this function returns false the reader stops parsing and reports
an error. The reader uses the function errorString() to get the error
message.
@@ -1788,7 +1788,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
The reader calls this function to report an XML comment anywhere
in the document. It reports the text of the comment in \a ch.
- If this function returns FALSE the reader stops parsing and
+ If this function returns false the reader stops parsing and
reports an error. The reader uses the function errorString() to
get the error message.
*/
@@ -1797,7 +1797,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
\fn TQString TQXmlLexicalHandler::errorString()
The reader calls this function to get an error string if any of
- the handler functions returns FALSE.
+ the handler functions returns false.
*/
@@ -1843,7 +1843,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
default value in \a value. If no default value is specified in the
XML file, \a value is TQString::null.
- If this function returns FALSE the reader stops parsing and
+ If this function returns false the reader stops parsing and
reports an error. The reader uses the function errorString() to
get the error message.
*/
@@ -1857,7 +1857,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
The reader passes the name of the entity in \a name and the value
of the entity in \a value.
- If this function returns FALSE the reader stops parsing and
+ If this function returns false the reader stops parsing and
reports an error. The reader uses the function errorString() to
get the error message.
*/
@@ -1874,7 +1874,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
systemId. If there is no public identifier specified, it passes
TQString::null in \a publicId.
- If this function returns FALSE the reader stops parsing and
+ If this function returns false the reader stops parsing and
reports an error. The reader uses the function errorString() to
get the error message.
*/
@@ -1883,7 +1883,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
\fn TQString TQXmlDeclHandler::errorString()
The reader calls this function to get an error string if any of
- the handler functions returns FALSE.
+ the handler functions returns false.
*/
@@ -1938,7 +1938,7 @@ void TQXmlDefaultHandler::setDocumentLocator( TQXmlLocator* )
*/
bool TQXmlDefaultHandler::startDocument()
{
- return TRUE;
+ return true;
}
/*!
@@ -1948,7 +1948,7 @@ bool TQXmlDefaultHandler::startDocument()
*/
bool TQXmlDefaultHandler::endDocument()
{
- return TRUE;
+ return true;
}
/*!
@@ -1958,7 +1958,7 @@ bool TQXmlDefaultHandler::endDocument()
*/
bool TQXmlDefaultHandler::startPrefixMapping( const TQString&, const TQString& )
{
- return TRUE;
+ return true;
}
/*!
@@ -1968,7 +1968,7 @@ bool TQXmlDefaultHandler::startPrefixMapping( const TQString&, const TQString& )
*/
bool TQXmlDefaultHandler::endPrefixMapping( const TQString& )
{
- return TRUE;
+ return true;
}
/*!
@@ -1979,7 +1979,7 @@ bool TQXmlDefaultHandler::endPrefixMapping( const TQString& )
bool TQXmlDefaultHandler::startElement( const TQString&, const TQString&,
const TQString&, const TQXmlAttributes& )
{
- return TRUE;
+ return true;
}
/*!
@@ -1990,7 +1990,7 @@ bool TQXmlDefaultHandler::startElement( const TQString&, const TQString&,
bool TQXmlDefaultHandler::endElement( const TQString&, const TQString&,
const TQString& )
{
- return TRUE;
+ return true;
}
/*!
@@ -2000,7 +2000,7 @@ bool TQXmlDefaultHandler::endElement( const TQString&, const TQString&,
*/
bool TQXmlDefaultHandler::characters( const TQString& )
{
- return TRUE;
+ return true;
}
/*!
@@ -2010,7 +2010,7 @@ bool TQXmlDefaultHandler::characters( const TQString& )
*/
bool TQXmlDefaultHandler::ignorableWhitespace( const TQString& )
{
- return TRUE;
+ return true;
}
/*!
@@ -2021,7 +2021,7 @@ bool TQXmlDefaultHandler::ignorableWhitespace( const TQString& )
bool TQXmlDefaultHandler::processingInstruction( const TQString&,
const TQString& )
{
- return TRUE;
+ return true;
}
/*!
@@ -2031,7 +2031,7 @@ bool TQXmlDefaultHandler::processingInstruction( const TQString&,
*/
bool TQXmlDefaultHandler::skippedEntity( const TQString& )
{
- return TRUE;
+ return true;
}
/*!
@@ -2041,7 +2041,7 @@ bool TQXmlDefaultHandler::skippedEntity( const TQString& )
*/
bool TQXmlDefaultHandler::warning( const TQXmlParseException& )
{
- return TRUE;
+ return true;
}
/*!
@@ -2051,7 +2051,7 @@ bool TQXmlDefaultHandler::warning( const TQXmlParseException& )
*/
bool TQXmlDefaultHandler::error( const TQXmlParseException& )
{
- return TRUE;
+ return true;
}
/*!
@@ -2061,7 +2061,7 @@ bool TQXmlDefaultHandler::error( const TQXmlParseException& )
*/
bool TQXmlDefaultHandler::fatalError( const TQXmlParseException& )
{
- return TRUE;
+ return true;
}
/*!
@@ -2072,7 +2072,7 @@ bool TQXmlDefaultHandler::fatalError( const TQXmlParseException& )
bool TQXmlDefaultHandler::notationDecl( const TQString&, const TQString&,
const TQString& )
{
- return TRUE;
+ return true;
}
/*!
@@ -2083,7 +2083,7 @@ bool TQXmlDefaultHandler::notationDecl( const TQString&, const TQString&,
bool TQXmlDefaultHandler::unparsedEntityDecl( const TQString&, const TQString&,
const TQString&, const TQString& )
{
- return TRUE;
+ return true;
}
/*!
@@ -2096,7 +2096,7 @@ bool TQXmlDefaultHandler::resolveEntity( const TQString&, const TQString&,
TQXmlInputSource*& ret )
{
ret = 0;
- return TRUE;
+ return true;
}
/*!
@@ -2116,7 +2116,7 @@ TQString TQXmlDefaultHandler::errorString()
*/
bool TQXmlDefaultHandler::startDTD( const TQString&, const TQString&, const TQString& )
{
- return TRUE;
+ return true;
}
/*!
@@ -2126,7 +2126,7 @@ bool TQXmlDefaultHandler::startDTD( const TQString&, const TQString&, const TQSt
*/
bool TQXmlDefaultHandler::endDTD()
{
- return TRUE;
+ return true;
}
/*!
@@ -2136,7 +2136,7 @@ bool TQXmlDefaultHandler::endDTD()
*/
bool TQXmlDefaultHandler::startEntity( const TQString& )
{
- return TRUE;
+ return true;
}
/*!
@@ -2146,7 +2146,7 @@ bool TQXmlDefaultHandler::startEntity( const TQString& )
*/
bool TQXmlDefaultHandler::endEntity( const TQString& )
{
- return TRUE;
+ return true;
}
/*!
@@ -2156,7 +2156,7 @@ bool TQXmlDefaultHandler::endEntity( const TQString& )
*/
bool TQXmlDefaultHandler::startCDATA()
{
- return TRUE;
+ return true;
}
/*!
@@ -2166,7 +2166,7 @@ bool TQXmlDefaultHandler::startCDATA()
*/
bool TQXmlDefaultHandler::endCDATA()
{
- return TRUE;
+ return true;
}
/*!
@@ -2176,7 +2176,7 @@ bool TQXmlDefaultHandler::endCDATA()
*/
bool TQXmlDefaultHandler::comment( const TQString& )
{
- return TRUE;
+ return true;
}
/*!
@@ -2186,7 +2186,7 @@ bool TQXmlDefaultHandler::comment( const TQString& )
*/
bool TQXmlDefaultHandler::attributeDecl( const TQString&, const TQString&, const TQString&, const TQString&, const TQString& )
{
- return TRUE;
+ return true;
}
/*!
@@ -2196,7 +2196,7 @@ bool TQXmlDefaultHandler::attributeDecl( const TQString&, const TQString&, const
*/
bool TQXmlDefaultHandler::internalEntityDecl( const TQString&, const TQString& )
{
- return TRUE;
+ return true;
}
/*!
@@ -2206,7 +2206,7 @@ bool TQXmlDefaultHandler::internalEntityDecl( const TQString&, const TQString& )
*/
bool TQXmlDefaultHandler::externalEntityDecl( const TQString&, const TQString&, const TQString& )
{
- return TRUE;
+ return true;
}
@@ -2223,7 +2223,7 @@ private:
inline TQXmlSimpleReaderPrivate()
{
parseStack = 0;
- undefEntityInAttrHack = FALSE;
+ undefEntityInAttrHack = false;
}
inline ~TQXmlSimpleReaderPrivate()
@@ -2403,8 +2403,8 @@ private:
is returned. If no such feature exists the return value is
undefined.
- If \a ok is not 0: \a *ok is set to TRUE if the reader has the
- feature called \a name; otherwise \a *ok is set to FALSE.
+ If \a ok is not 0: \a *ok is set to true if the reader has the
+ feature called \a name; otherwise \a *ok is set to false.
\sa setFeature() hasFeature()
*/
@@ -2421,8 +2421,8 @@ private:
/*!
\fn bool TQXmlReader::hasFeature( const TQString& name ) const
- Returns \c TRUE if the reader has the feature called \a name;
- otherwise returns FALSE.
+ Returns \c true if the reader has the feature called \a name;
+ otherwise returns false.
\sa feature() setFeature()
*/
@@ -2434,7 +2434,7 @@ private:
value of the property; otherwise the return value is undefined.
If \a ok is not 0: if the reader has the \a name property \a *ok
- is set to TRUE; otherwise \a *ok is set to FALSE.
+ is set to true; otherwise \a *ok is set to false.
\sa setProperty() hasProperty()
*/
@@ -2451,8 +2451,8 @@ private:
/*!
\fn bool TQXmlReader::hasProperty( const TQString& name ) const
- Returns TRUE if the reader has the property \a name; otherwise
- returns FALSE.
+ Returns true if the reader has the property \a name; otherwise
+ returns false.
\sa property() setProperty()
*/
@@ -2563,8 +2563,8 @@ private:
/*!
\fn bool TQXmlReader::parse( const TQXmlInputSource* input )
- Reads an XML document from \a input and parses it. Returns TRUE if
- the parsing was successful; otherwise returns FALSE.
+ Reads an XML document from \a input and parses it. Returns true if
+ the parsing was successful; otherwise returns false.
*/
@@ -2668,11 +2668,11 @@ inline void TQXmlSimpleReader::refClear()
Constructs a simple XML reader with the following feature settings:
\table
\header \i Feature \i Setting
- \row \i \e http://xml.org/sax/features/namespaces \i TRUE
- \row \i \e http://xml.org/sax/features/namespace-prefixes \i FALSE
+ \row \i \e http://xml.org/sax/features/namespaces \i true
+ \row \i \e http://xml.org/sax/features/namespace-prefixes \i false
\row \i \e http://trolltech.com/xml/features/report-whitespace-only-CharData
- \i TRUE
- \row \i \e http://trolltech.com/xml/features/report-start-end-entity \i FALSE
+ \i true
+ \row \i \e http://trolltech.com/xml/features/report-start-end-entity \i false
\endtable
More information about features can be found in the \link
@@ -2694,10 +2694,10 @@ TQXmlSimpleReader::TQXmlSimpleReader()
declHnd = 0;
// default feature settings
- d->useNamespaces = TRUE;
- d->useNamespacePrefixes = FALSE;
- d->reportWhitespaceCharData = TRUE;
- d->reportEntities = FALSE;
+ d->useNamespaces = true;
+ d->useNamespacePrefixes = false;
+ d->reportWhitespaceCharData = true;
+ d->reportEntities = false;
}
/*!
@@ -2715,7 +2715,7 @@ TQXmlSimpleReader::~TQXmlSimpleReader()
bool TQXmlSimpleReader::feature( const TQString& name, bool *ok ) const
{
if ( ok != 0 )
- *ok = TRUE;
+ *ok = true;
if ( name == "http://xml.org/sax/features/namespaces" ) {
return d->useNamespaces;
} else if ( name == "http://xml.org/sax/features/namespace-prefixes" ) {
@@ -2727,9 +2727,9 @@ bool TQXmlSimpleReader::feature( const TQString& name, bool *ok ) const
} else {
tqWarning( "Unknown feature %s", name.latin1() );
if ( ok != 0 )
- *ok = FALSE;
+ *ok = false;
}
- return FALSE;
+ return false;
}
/*!
@@ -2741,21 +2741,21 @@ bool TQXmlSimpleReader::feature( const TQString& name, bool *ok ) const
\table
\header \i Feature \i Notes
\row \i \e http://xml.org/sax/features/namespaces
- \i If this feature is TRUE, namespace processing is
+ \i If this feature is true, namespace processing is
performed.
\row \i \e http://xml.org/sax/features/namespace-prefixes
- \i If this feature is TRUE, the the original prefixed names
+ \i If this feature is true, the the original prefixed names
and attributes used for namespace declarations are
reported.
\row \i \e http://trolltech.com/xml/features/report-whitespace-only-CharData
- \i If this feature is TRUE, CharData that only contain
+ \i If this feature is true, CharData that only contain
whitespace are not ignored, but are reported via
TQXmlContentHandler::characters().
\row \i \e http://trolltech.com/xml/features/report-start-end-entity
- \i If this feature is TRUE, the parser reports
+ \i If this feature is true, the parser reports
TQXmlContentHandler::startEntity() and
TQXmlContentHandler::endEntity() events. So character data
- might be reported in chunks. If this feature is FALSE, the
+ might be reported in chunks. If this feature is false, the
parser does not report those events, but rather silently
substitutes the entities and reports the character data in
one chunk.
@@ -2766,7 +2766,7 @@ bool TQXmlSimpleReader::feature( const TQString& name, bool *ok ) const
\printline reader
\skipto setFeature
\printline setFeature
- \printline TRUE
+ \printline true
(Code taken from xml/tagreader-with-features/tagreader.cpp)
@@ -2795,9 +2795,9 @@ bool TQXmlSimpleReader::hasFeature( const TQString& name ) const
|| name == "http://xml.org/sax/features/namespace-prefixes"
|| name == "http://trolltech.com/xml/features/report-whitespace-only-CharData"
|| name == "http://trolltech.com/xml/features/report-start-end-entity" ) {
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
}
@@ -2806,7 +2806,7 @@ bool TQXmlSimpleReader::hasFeature( const TQString& name ) const
void* TQXmlSimpleReader::property( const TQString&, bool *ok ) const
{
if ( ok != 0 )
- *ok = FALSE;
+ *ok = false;
return 0;
}
@@ -2821,7 +2821,7 @@ void TQXmlSimpleReader::setProperty( const TQString&, void* )
*/
bool TQXmlSimpleReader::hasProperty( const TQString& ) const
{
- return FALSE;
+ return false;
}
/*!
@@ -2903,7 +2903,7 @@ TQXmlDeclHandler* TQXmlSimpleReader::declHandler() const
*/
bool TQXmlSimpleReader::parse( const TQXmlInputSource& input )
{
- return parse( &input, FALSE );
+ return parse( &input, false );
}
/*!
@@ -2911,14 +2911,14 @@ bool TQXmlSimpleReader::parse( const TQXmlInputSource& input )
*/
bool TQXmlSimpleReader::parse( const TQXmlInputSource* input )
{
- return parse( input, FALSE );
+ return parse( input, false );
}
/*!
- Reads an XML document from \a input and parses it. Returns FALSE
- if the parsing detects an error; otherwise returns TRUE.
+ Reads an XML document from \a input and parses it. Returns false
+ if the parsing detects an error; otherwise returns true.
- If \a incremental is TRUE, the parser does not return FALSE when
+ If \a incremental is true, the parser does not return false when
it reaches the end of the \a input without reaching the end of the
XML file. Instead it stores the state of the parser so that
parsing can be continued at a later stage when more data is
@@ -2928,11 +2928,11 @@ bool TQXmlSimpleReader::parse( const TQXmlInputSource* input )
input souce. This means that you should not delete the input
source \a input until you've finished your calls to
parseContinue(). If you call this function with \a incremental
- TRUE whilst an incremental parse is in progress a new parsing
+ true whilst an incremental parse is in progress a new parsing
session will be started and the previous session lost.
- If \a incremental is FALSE, this function behaves like the normal
- parse function, i.e. it returns FALSE when the end of input is
+ If \a incremental is false, this function behaves like the normal
+ parse function, i.e. it returns false when the end of input is
reached without reaching the end of the XML file and the parsing
cannot be continued.
@@ -2953,7 +2953,7 @@ bool TQXmlSimpleReader::parse( const TQXmlInputSource *input, bool incremental )
if ( !contentHnd->startDocument() ) {
reportParseError( contentHnd->errorString() );
d->tags.clear();
- return FALSE;
+ return false;
}
}
return parseBeginOrContinue( 0, incremental );
@@ -2963,9 +2963,9 @@ bool TQXmlSimpleReader::parse( const TQXmlInputSource *input, bool incremental )
Continues incremental parsing; this function reads the input from
the TQXmlInputSource that was specified with the last parse()
command. To use this function, you \e must have called parse()
- with the incremental argument set to TRUE.
+ with the incremental argument set to true.
- Returns FALSE if a parsing error occurs; otherwise returns TRUE.
+ Returns false if a parsing error occurs; otherwise returns true.
If the input source returns an empty string for the function
TQXmlInputSource::data(), then this means that the end of the XML
@@ -2980,7 +2980,7 @@ bool TQXmlSimpleReader::parse( const TQXmlInputSource *input, bool incremental )
This function assumes that the end of the XML document is reached
if the TQXmlInputSource::next() function returns
TQXmlInputSource::EndOfDocument. If the parser has not finished
- parsing when it encounters this symbol, it is an error and FALSE
+ parsing when it encounters this symbol, it is an error and false
is returned.
\sa parse() TQXmlInputSource::next()
@@ -2988,10 +2988,10 @@ bool TQXmlSimpleReader::parse( const TQXmlInputSource *input, bool incremental )
bool TQXmlSimpleReader::parseContinue()
{
if ( d->parseStack == 0 || d->parseStack->isEmpty() )
- return FALSE;
+ return false;
initData();
int state = d->parseStack->pop().state;
- return parseBeginOrContinue( state, TRUE );
+ return parseBeginOrContinue( state, true );
}
/*
@@ -3005,10 +3005,10 @@ bool TQXmlSimpleReader::parseBeginOrContinue( int state, bool incremental )
if ( !parseProlog() ) {
if ( incremental && d->error.isNull() ) {
pushParseState( 0, 0 );
- return TRUE;
+ return true;
} else {
d->tags.clear();
- return FALSE;
+ return false;
}
}
state = 1;
@@ -3017,10 +3017,10 @@ bool TQXmlSimpleReader::parseBeginOrContinue( int state, bool incremental )
if ( !parseElement() ) {
if ( incremental && d->error.isNull() ) {
pushParseState( 0, 1 );
- return TRUE;
+ return true;
} else {
d->tags.clear();
- return FALSE;
+ return false;
}
}
state = 2;
@@ -3030,23 +3030,23 @@ bool TQXmlSimpleReader::parseBeginOrContinue( int state, bool incremental )
if ( !parseMisc() ) {
if ( incremental && d->error.isNull() ) {
pushParseState( 0, 2 );
- return TRUE;
+ return true;
} else {
d->tags.clear();
- return FALSE;
+ return false;
}
}
}
if ( !atEndOrig && incremental ) {
// we parsed something at all, so be prepared to come back later
pushParseState( 0, 2 );
- return TRUE;
+ return true;
}
// is stack empty?
if ( !d->tags.isEmpty() && !d->error.isNull() ) {
reportParseError( XMLERR_UNEXPECTEDEOF );
d->tags.clear();
- return FALSE;
+ return false;
}
// call the handler
if ( contentHnd ) {
@@ -3054,17 +3054,17 @@ bool TQXmlSimpleReader::parseBeginOrContinue( int state, bool incremental )
d->parseStack = 0;
if ( !contentHnd->endDocument() ) {
reportParseError( contentHnd->errorString() );
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//
// The following private parse functions have another semantics for the return
-// value: They return TRUE iff parsing has finished successfully (i.e. the end
-// of the XML file must be reached!). If one of these functions return FALSE,
-// there is only an error when d->error.isNULL() is also FALSE.
+// value: They return true iff parsing has finished successfully (i.e. the end
+// of the XML file must be reached!). If one of these functions return false,
+// there is only an error when d->error.isNULL() is also false.
//
/*
@@ -3100,7 +3100,7 @@ bool TQXmlSimpleReader::parseBeginOrContinue( int state, bool incremental )
(6)
(6a) if ( atEnd() ) {
unexpectedEof( &TQXmlSimpleReader::parseNmtoken, state );
- return FALSE;
+ return false;
}
(6b) if (determineNameChar(c) != NotName) {
...
@@ -3176,8 +3176,8 @@ bool TQXmlSimpleReader::parseProlog()
signed char input;
if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
- d->xmldecl_possible = TRUE;
- d->doctype_read = FALSE;
+ d->xmldecl_possible = true;
+ d->doctype_read = false;
state = Init;
} else {
state = d->parseStack->pop().state;
@@ -3194,7 +3194,7 @@ bool TQXmlSimpleReader::parseProlog()
}
if ( !(this->*function)() ) {
parseFailed( &TQXmlSimpleReader::parseProlog, state );
- return FALSE;
+ return false;
}
}
}
@@ -3204,16 +3204,16 @@ bool TQXmlSimpleReader::parseProlog()
case DocType:
if ( d->doctype_read ) {
reportParseError( XMLERR_MORETHANONEDOCTYPE );
- return FALSE;
+ return false;
} else {
- d->doctype_read = FALSE;
+ d->doctype_read = false;
}
break;
case Comment:
if ( lexicalHnd ) {
if ( !lexicalHnd->comment( string() ) ) {
reportParseError( lexicalHnd->errorString() );
- return FALSE;
+ return false;
}
}
state = CommentR;
@@ -3237,29 +3237,29 @@ bool TQXmlSimpleReader::parseProlog()
}
if ( !contentHnd->processingInstruction( "xml", value ) ) {
reportParseError( contentHnd->errorString() );
- return FALSE;
+ return false;
}
} else {
if ( !contentHnd->processingInstruction( name(), string() ) ) {
reportParseError( contentHnd->errorString() );
- return FALSE;
+ return false;
}
}
}
// XML declaration only on first position possible
- d->xmldecl_possible = FALSE;
+ d->xmldecl_possible = false;
state = PInstrR;
break;
case Done:
- return TRUE;
+ return true;
case -1:
reportParseError( XMLERR_ERRORPARSINGELEMENT );
- return FALSE;
+ return false;
}
if ( atEnd() ) {
unexpectedEof( &TQXmlSimpleReader::parseProlog, state );
- return FALSE;
+ return false;
}
if ( is_S(c) ) {
input = InpWs;
@@ -3281,10 +3281,10 @@ bool TQXmlSimpleReader::parseProlog()
switch ( state ) {
case EatWS:
// XML declaration only on first position possible
- d->xmldecl_possible = FALSE;
+ d->xmldecl_possible = false;
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseProlog, state );
- return FALSE;
+ return false;
}
break;
case Lt:
@@ -3292,20 +3292,20 @@ bool TQXmlSimpleReader::parseProlog()
break;
case Em:
// XML declaration only on first position possible
- d->xmldecl_possible = FALSE;
+ d->xmldecl_possible = false;
next();
break;
case DocType:
if ( !parseDoctype() ) {
parseFailed( &TQXmlSimpleReader::parseProlog, state );
- return FALSE;
+ return false;
}
break;
case Comment:
case CommentR:
if ( !parseComment() ) {
parseFailed( &TQXmlSimpleReader::parseProlog, state );
- return FALSE;
+ return false;
}
break;
case PInstr:
@@ -3313,7 +3313,7 @@ bool TQXmlSimpleReader::parseProlog()
d->parsePI_xmldecl = d->xmldecl_possible;
if ( !parsePI() ) {
parseFailed( &TQXmlSimpleReader::parseProlog, state );
- return FALSE;
+ return false;
}
break;
}
@@ -3382,7 +3382,7 @@ bool TQXmlSimpleReader::parseElement()
}
if ( !(this->*function)() ) {
parseFailed( &TQXmlSimpleReader::parseElement, state );
- return FALSE;
+ return false;
}
}
}
@@ -3399,23 +3399,23 @@ bool TQXmlSimpleReader::parseElement()
break;
case ETagBegin2:
if ( !processElementETagBegin2() )
- return FALSE;
+ return false;
break;
case Attrib:
if ( !processElementAttribute() )
- return FALSE;
+ return false;
state = AttribPro;
break;
case Done:
- return TRUE;
+ return true;
case -1:
reportParseError( XMLERR_ERRORPARSINGELEMENT );
- return FALSE;
+ return false;
}
if ( atEnd() ) {
unexpectedEof( &TQXmlSimpleReader::parseElement, state );
- return FALSE;
+ return false;
}
if (fastDetermineNameChar(c) == NameBeginning) {
@@ -3433,10 +3433,10 @@ bool TQXmlSimpleReader::parseElement()
switch ( state ) {
case ReadName:
- d->parseName_useRef = FALSE;
+ d->parseName_useRef = false;
if ( !parseName() ) {
parseFailed( &TQXmlSimpleReader::parseElement, state );
- return FALSE;
+ return false;
}
break;
case Ws1:
@@ -3444,7 +3444,7 @@ bool TQXmlSimpleReader::parseElement()
case Ws3:
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseElement, state );
- return FALSE;
+ return false;
}
break;
case STagEnd:
@@ -3453,15 +3453,15 @@ bool TQXmlSimpleReader::parseElement()
const TQString &tagsTop = d->tags.top();
if ( d->useNamespaces ) {
TQString uri, lname;
- d->namespaceSupport.processName(tagsTop, FALSE, uri, lname);
+ d->namespaceSupport.processName(tagsTop, false, uri, lname);
if (!contentHnd->startElement(uri, lname, tagsTop, d->attList)) {
reportParseError( contentHnd->errorString() );
- return FALSE;
+ return false;
}
} else {
if (!contentHnd->startElement(TQString::null, TQString::null, tagsTop, d->attList)) {
reportParseError( contentHnd->errorString() );
- return FALSE;
+ return false;
}
}
}
@@ -3470,7 +3470,7 @@ bool TQXmlSimpleReader::parseElement()
case STagEnd2:
if ( !parseContent() ) {
parseFailed( &TQXmlSimpleReader::parseElement, state );
- return FALSE;
+ return false;
}
break;
case ETagBegin:
@@ -3478,19 +3478,19 @@ bool TQXmlSimpleReader::parseElement()
break;
case ETagBegin2:
// get the name of the tag
- d->parseName_useRef = FALSE;
+ d->parseName_useRef = false;
if ( !parseName() ) {
parseFailed( &TQXmlSimpleReader::parseElement, state );
- return FALSE;
+ return false;
}
break;
case EmptyTag:
if ( d->tags.isEmpty() ) {
reportParseError( XMLERR_TAGMISMATCH );
- return FALSE;
+ return false;
}
if ( !processElementEmptyTag() )
- return FALSE;
+ return false;
next();
break;
case Attrib:
@@ -3498,7 +3498,7 @@ bool TQXmlSimpleReader::parseElement()
// get name and value of attribute
if ( !parseAttribute() ) {
parseFailed( &TQXmlSimpleReader::parseElement, state );
- return FALSE;
+ return false;
}
break;
case Done:
@@ -3509,7 +3509,7 @@ bool TQXmlSimpleReader::parseElement()
}
/*
Helper to break down the size of the code in the case statement.
- Return FALSE on error, otherwise TRUE.
+ Return false on error, otherwise true.
*/
bool TQXmlSimpleReader::processElementEmptyTag()
{
@@ -3518,15 +3518,15 @@ bool TQXmlSimpleReader::processElementEmptyTag()
if ( contentHnd ) {
if ( d->useNamespaces ) {
// report startElement first...
- d->namespaceSupport.processName( d->tags.top(), FALSE, uri, lname );
+ d->namespaceSupport.processName( d->tags.top(), false, uri, lname );
if ( !contentHnd->startElement( uri, lname, d->tags.top(), d->attList ) ) {
reportParseError( contentHnd->errorString() );
- return FALSE;
+ return false;
}
// ... followed by endElement...
if ( !contentHnd->endElement( uri, lname, d->tags.pop() ) ) {
reportParseError( contentHnd->errorString() );
- return FALSE;
+ return false;
}
// ... followed by endPrefixMapping
TQStringList prefixesBefore, prefixesAfter;
@@ -3540,7 +3540,7 @@ bool TQXmlSimpleReader::processElementEmptyTag()
if ( prefixesAfter.contains(*it) == 0 ) {
if ( !contentHnd->endPrefixMapping( *it ) ) {
reportParseError( contentHnd->errorString() );
- return FALSE;
+ return false;
}
}
}
@@ -3548,23 +3548,23 @@ bool TQXmlSimpleReader::processElementEmptyTag()
// report startElement first...
if ( !contentHnd->startElement( TQString::null, TQString::null, d->tags.top(), d->attList ) ) {
reportParseError( contentHnd->errorString() );
- return FALSE;
+ return false;
}
// ... followed by endElement
if ( !contentHnd->endElement( TQString::null, TQString::null, d->tags.pop() ) ) {
reportParseError( contentHnd->errorString() );
- return FALSE;
+ return false;
}
}
} else {
d->tags.pop_back();
d->namespaceSupport.popContext();
}
- return TRUE;
+ return true;
}
/*
Helper to break down the size of the code in the case statement.
- Return FALSE on error, otherwise TRUE.
+ Return false on error, otherwise true.
*/
bool TQXmlSimpleReader::processElementETagBegin2()
{
@@ -3573,17 +3573,17 @@ bool TQXmlSimpleReader::processElementETagBegin2()
// pop the stack and compare it with the name
if ( d->tags.pop() != name ) {
reportParseError( XMLERR_TAGMISMATCH );
- return FALSE;
+ return false;
}
// call the handler
if ( contentHnd ) {
TQString uri, lname;
if (d->useNamespaces)
- d->namespaceSupport.processName(name, FALSE, uri, lname);
+ d->namespaceSupport.processName(name, false, uri, lname);
if (!contentHnd->endElement(uri, lname, name)) {
reportParseError(contentHnd->errorString());
- return FALSE;
+ return false;
}
}
if ( d->useNamespaces ) {
@@ -3600,18 +3600,18 @@ bool TQXmlSimpleReader::processElementETagBegin2()
if (!it.key().isEmpty() && !prefixesAfter.contains(it.key())) {
if (!contentHnd->endPrefixMapping(it.key())) {
reportParseError(contentHnd->errorString());
- return FALSE;
+ return false;
}
}
}
}
}
}
- return TRUE;
+ return true;
}
/*
Helper to break down the size of the code in the case statement.
- Return FALSE on error, otherwise TRUE.
+ Return false on error, otherwise true.
*/
bool TQXmlSimpleReader::processElementAttribute()
{
@@ -3636,19 +3636,19 @@ bool TQXmlSimpleReader::processElementAttribute()
if ( contentHnd ) {
if ( !contentHnd->startPrefixMapping( lname, string ) ) {
reportParseError( contentHnd->errorString() );
- return FALSE;
+ return false;
}
}
} else {
// no namespace delcaration
- d->namespaceSupport.processName( name, TRUE, uri, lname );
+ d->namespaceSupport.processName( name, true, uri, lname );
d->attList.append( name, uri, lname, string );
}
} else {
// no namespace support
d->attList.append( name, TQString::null, TQString::null, string );
}
- return TRUE;
+ return true;
}
/*
@@ -3729,7 +3729,7 @@ bool TQXmlSimpleReader::parseContent()
signed char input;
if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
- d->contentCharDataRead = FALSE;
+ d->contentCharDataRead = false;
state = Init;
} else {
state = d->parseStack->pop().state;
@@ -3746,7 +3746,7 @@ bool TQXmlSimpleReader::parseContent()
}
if ( !(this->*function)() ) {
parseFailed( &TQXmlSimpleReader::parseContent, state );
- return FALSE;
+ return false;
}
}
}
@@ -3761,7 +3761,7 @@ bool TQXmlSimpleReader::parseContent()
if ( contentHnd ) {
if ( !contentHnd->processingInstruction(name(),string()) ) {
reportParseError( contentHnd->errorString() );
- return FALSE;
+ return false;
}
}
state = PInstrR;
@@ -3770,7 +3770,7 @@ bool TQXmlSimpleReader::parseContent()
if ( lexicalHnd ) {
if ( !lexicalHnd->comment( string() ) ) {
reportParseError( lexicalHnd->errorString() );
- return FALSE;
+ return false;
}
}
state = ComR;
@@ -3790,19 +3790,19 @@ bool TQXmlSimpleReader::parseContent()
if ( lexicalHnd ) {
if ( !lexicalHnd->startCDATA() ) {
reportParseError( lexicalHnd->errorString() );
- return FALSE;
+ return false;
}
}
if ( contentHnd ) {
if ( !contentHnd->characters( string() ) ) {
reportParseError( contentHnd->errorString() );
- return FALSE;
+ return false;
}
}
if ( lexicalHnd ) {
if ( !lexicalHnd->endCDATA() ) {
reportParseError( lexicalHnd->errorString() );
- return FALSE;
+ return false;
}
}
} else if (c.unicode() == ']') {
@@ -3822,24 +3822,24 @@ bool TQXmlSimpleReader::parseContent()
if ( d->reportWhitespaceCharData || !string().simplifyWhiteSpace().isEmpty() ) {
if ( !contentHnd->characters( string() ) ) {
reportParseError( contentHnd->errorString() );
- return FALSE;
+ return false;
}
}
}
}
// Done
- return TRUE;
+ return true;
case -1:
// Error
reportParseError( XMLERR_ERRORPARSINGCONTENT );
- return FALSE;
+ return false;
}
// get input (use lookup-table instead of nested ifs for performance
// reasons)
if ( atEnd() ) {
unexpectedEof( &TQXmlSimpleReader::parseContent, state );
- return FALSE;
+ return false;
}
if ( c.row() ) {
input = InpUnknown;
@@ -3856,26 +3856,26 @@ bool TQXmlSimpleReader::parseContent()
case ChD:
// on first call: clear string
if ( !d->contentCharDataRead ) {
- d->contentCharDataRead = TRUE;
+ d->contentCharDataRead = true;
stringClear();
}
stringAddC();
if ( d->reportEntities ) {
if ( !reportEndEntities() )
- return FALSE;
+ return false;
}
next();
break;
case ChD1:
// on first call: clear string
if ( !d->contentCharDataRead ) {
- d->contentCharDataRead = TRUE;
+ d->contentCharDataRead = true;
stringClear();
}
stringAddC();
if ( d->reportEntities ) {
if ( !reportEndEntities() )
- return FALSE;
+ return false;
}
next();
break;
@@ -3883,7 +3883,7 @@ bool TQXmlSimpleReader::parseContent()
stringAddC();
if ( d->reportEntities ) {
if ( !reportEndEntities() )
- return FALSE;
+ return false;
}
next();
break;
@@ -3894,7 +3894,7 @@ bool TQXmlSimpleReader::parseContent()
d->parseReference_context = InContent;
if ( !parseReference() ) {
parseFailed( &TQXmlSimpleReader::parseContent, state );
- return FALSE;
+ return false;
}
} else {
if ( d->reportEntities ) {
@@ -3903,7 +3903,7 @@ bool TQXmlSimpleReader::parseContent()
if ( d->reportWhitespaceCharData || !string().simplifyWhiteSpace().isEmpty() ) {
if ( !contentHnd->characters( string() ) ) {
reportParseError( contentHnd->errorString() );
- return FALSE;
+ return false;
}
}
}
@@ -3912,7 +3912,7 @@ bool TQXmlSimpleReader::parseContent()
d->parseReference_context = InContent;
if ( !parseReference() ) {
parseFailed( &TQXmlSimpleReader::parseContent, state );
- return FALSE;
+ return false;
}
}
break;
@@ -3923,26 +3923,26 @@ bool TQXmlSimpleReader::parseContent()
if ( d->reportWhitespaceCharData || !string().simplifyWhiteSpace().isEmpty() ) {
if ( !contentHnd->characters( string() ) ) {
reportParseError( contentHnd->errorString() );
- return FALSE;
+ return false;
}
}
}
}
- d->contentCharDataRead = FALSE;
+ d->contentCharDataRead = false;
next();
break;
case PInstr:
case PInstrR:
- d->parsePI_xmldecl = FALSE;
+ d->parsePI_xmldecl = false;
if ( !parsePI() ) {
parseFailed( &TQXmlSimpleReader::parseContent, state );
- return FALSE;
+ return false;
}
break;
case Elem:
if ( !parseElement() ) {
parseFailed( &TQXmlSimpleReader::parseContent, state );
- return FALSE;
+ return false;
}
break;
case Em:
@@ -3952,14 +3952,14 @@ bool TQXmlSimpleReader::parseContent()
case ComR:
if ( !parseComment() ) {
parseFailed( &TQXmlSimpleReader::parseContent, state );
- return FALSE;
+ return false;
}
break;
case CDS:
d->parseString_s = "[CDATA[";
if ( !parseString() ) {
parseFailed( &TQXmlSimpleReader::parseContent, state );
- return FALSE;
+ return false;
}
break;
case CDS1:
@@ -3985,7 +3985,7 @@ bool TQXmlSimpleReader::reportEndEntities()
if ( d->reportWhitespaceCharData || !string().simplifyWhiteSpace().isEmpty() ) {
if ( !contentHnd->characters( string() ) ) {
reportParseError( contentHnd->errorString() );
- return FALSE;
+ return false;
}
}
}
@@ -3993,14 +3993,14 @@ bool TQXmlSimpleReader::reportEndEntities()
if ( lexicalHnd ) {
if ( !lexicalHnd->endEntity(d->xmlRefName.top()) ) {
reportParseError( lexicalHnd->errorString() );
- return FALSE;
+ return false;
}
}
d->xmlRef.pop_back();
d->xmlRefName.pop_back();
count--;
}
- return TRUE;
+ return true;
}
/*
@@ -4047,7 +4047,7 @@ bool TQXmlSimpleReader::parseMisc()
}
if ( !(this->*function)() ) {
parseFailed( &TQXmlSimpleReader::parseMisc, state );
- return FALSE;
+ return false;
}
}
}
@@ -4055,32 +4055,32 @@ bool TQXmlSimpleReader::parseMisc()
for (;;) {
switch ( state ) {
case eatWS:
- return TRUE;
+ return true;
case PInstr:
if ( contentHnd ) {
if ( !contentHnd->processingInstruction(name(),string()) ) {
reportParseError( contentHnd->errorString() );
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
case Comment2:
if ( lexicalHnd ) {
if ( !lexicalHnd->comment( string() ) ) {
reportParseError( lexicalHnd->errorString() );
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
case -1:
// Error
reportParseError( XMLERR_UNEXPECTEDCHARACTER );
- return FALSE;
+ return false;
}
if ( atEnd() ) {
unexpectedEof( &TQXmlSimpleReader::parseMisc, state );
- return FALSE;
+ return false;
}
if ( is_S(c) ) {
input = InpWs;
@@ -4099,17 +4099,17 @@ bool TQXmlSimpleReader::parseMisc()
case eatWS:
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseMisc, state );
- return FALSE;
+ return false;
}
break;
case Lt:
next();
break;
case PInstr:
- d->parsePI_xmldecl = FALSE;
+ d->parsePI_xmldecl = false;
if ( !parsePI() ) {
parseFailed( &TQXmlSimpleReader::parseMisc, state );
- return FALSE;
+ return false;
}
break;
case Comment:
@@ -4118,7 +4118,7 @@ bool TQXmlSimpleReader::parseMisc()
case Comment2:
if ( !parseComment() ) {
parseFailed( &TQXmlSimpleReader::parseMisc, state );
- return FALSE;
+ return false;
}
break;
}
@@ -4128,7 +4128,7 @@ bool TQXmlSimpleReader::parseMisc()
/*
Parse a processing instruction [16].
- If xmldec is TRUE, it tries to parse a PI or a XML declaration [23].
+ If xmldec is true, it tries to parse a PI or a XML declaration [23].
Precondition: the beginning '<' of the PI is already read and the head stand
on the '?' of '<?'.
@@ -4201,7 +4201,7 @@ bool TQXmlSimpleReader::parsePI()
}
if ( !(this->*function)() ) {
parseFailed( &TQXmlSimpleReader::parsePI, state );
- return FALSE;
+ return false;
}
}
}
@@ -4216,7 +4216,7 @@ bool TQXmlSimpleReader::parsePI()
state = XMLDecl;
} else {
reportParseError( XMLERR_INVALIDNAMEFORPI );
- return FALSE;
+ return false;
}
} else {
state = PInstr;
@@ -4227,7 +4227,7 @@ bool TQXmlSimpleReader::parsePI()
// get version (syntax like an attribute)
if ( name() != "version" ) {
reportParseError( XMLERR_VERSIONEXPECTED );
- return FALSE;
+ return false;
}
d->xmlVersion = string();
break;
@@ -4240,19 +4240,19 @@ bool TQXmlSimpleReader::parsePI()
d->standalone = TQXmlSimpleReaderPrivate::No;
} else {
reportParseError( XMLERR_WRONGVALUEFORSDECL );
- return FALSE;
+ return false;
}
} else if ( name() == "encoding" ) {
d->encoding = string();
} else {
reportParseError( XMLERR_EDECLORSDDECLEXPECTED );
- return FALSE;
+ return false;
}
break;
case SD:
if ( name() != "standalone" ) {
reportParseError( XMLERR_SDDECLEXPECTED );
- return FALSE;
+ return false;
}
if ( string()=="yes" ) {
d->standalone = TQXmlSimpleReaderPrivate::Yes;
@@ -4260,7 +4260,7 @@ bool TQXmlSimpleReader::parsePI()
d->standalone = TQXmlSimpleReaderPrivate::No;
} else {
reportParseError( XMLERR_WRONGVALUEFORSDECL );
- return FALSE;
+ return false;
}
break;
case Qm:
@@ -4269,16 +4269,16 @@ bool TQXmlSimpleReader::parsePI()
stringAddC( '?' );
break;
case Done:
- return TRUE;
+ return true;
case -1:
// Error
reportParseError( XMLERR_UNEXPECTEDCHARACTER );
- return FALSE;
+ return false;
}
if ( atEnd() ) {
unexpectedEof( &TQXmlSimpleReader::parsePI, state );
- return FALSE;
+ return false;
}
if ( is_S(c) ) {
input = InpWs;
@@ -4298,10 +4298,10 @@ bool TQXmlSimpleReader::parsePI()
next();
break;
case Name:
- d->parseName_useRef = FALSE;
+ d->parseName_useRef = false;
if ( !parseName() ) {
parseFailed( &TQXmlSimpleReader::parsePI, state );
- return FALSE;
+ return false;
}
break;
case Ws1:
@@ -4311,19 +4311,19 @@ bool TQXmlSimpleReader::parsePI()
case Ws5:
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parsePI, state );
- return FALSE;
+ return false;
}
break;
case Version:
if ( !parseAttribute() ) {
parseFailed( &TQXmlSimpleReader::parsePI, state );
- return FALSE;
+ return false;
}
break;
case EorSD:
if ( !parseAttribute() ) {
parseFailed( &TQXmlSimpleReader::parsePI, state );
- return FALSE;
+ return false;
}
break;
case SD:
@@ -4331,11 +4331,11 @@ bool TQXmlSimpleReader::parsePI()
if ( d->standalone != TQXmlSimpleReaderPrivate::Unknown ) {
// already parsed the standalone declaration
reportParseError( XMLERR_UNEXPECTEDCHARACTER );
- return FALSE;
+ return false;
}
if ( !parseAttribute() ) {
parseFailed( &TQXmlSimpleReader::parsePI, state );
- return FALSE;
+ return false;
}
break;
case ADone:
@@ -4411,7 +4411,7 @@ bool TQXmlSimpleReader::parseDoctype()
signed char input;
if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
- d->startDTDwasReported = FALSE;
+ d->startDTDwasReported = false;
d->systemId = TQString::null;
d->publicId = TQString::null;
state = Init;
@@ -4430,7 +4430,7 @@ bool TQXmlSimpleReader::parseDoctype()
}
if ( !(this->*function)() ) {
parseFailed( &TQXmlSimpleReader::parseDoctype, state );
- return FALSE;
+ return false;
}
}
}
@@ -4442,25 +4442,25 @@ bool TQXmlSimpleReader::parseDoctype()
break;
case MP:
if ( !d->startDTDwasReported && lexicalHnd ) {
- d->startDTDwasReported = TRUE;
+ d->startDTDwasReported = true;
if ( !lexicalHnd->startDTD( d->doctype, d->publicId, d->systemId ) ) {
reportParseError( lexicalHnd->errorString() );
- return FALSE;
+ return false;
}
}
state = MPR;
break;
case Done:
- return TRUE;
+ return true;
case -1:
// Error
reportParseError( XMLERR_ERRORPARSINGDOCTYPE );
- return FALSE;
+ return false;
}
if ( atEnd() ) {
unexpectedEof( &TQXmlSimpleReader::parseDoctype, state );
- return FALSE;
+ return false;
}
if ( is_S(c) ) {
input = InpWs;
@@ -4488,7 +4488,7 @@ bool TQXmlSimpleReader::parseDoctype()
d->parseString_s = "DOCTYPE";
if ( !parseString() ) {
parseFailed( &TQXmlSimpleReader::parseDoctype, state );
- return FALSE;
+ return false;
}
break;
case Ws1:
@@ -4497,66 +4497,66 @@ bool TQXmlSimpleReader::parseDoctype()
case Ws4:
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseDoctype, state );
- return FALSE;
+ return false;
}
break;
case Doctype2:
- d->parseName_useRef = FALSE;
+ d->parseName_useRef = false;
if ( !parseName() ) {
parseFailed( &TQXmlSimpleReader::parseDoctype, state );
- return FALSE;
+ return false;
}
break;
case Sys:
- d->parseExternalID_allowPublicID = FALSE;
+ d->parseExternalID_allowPublicID = false;
if ( !parseExternalID() ) {
parseFailed( &TQXmlSimpleReader::parseDoctype, state );
- return FALSE;
+ return false;
}
break;
case MP:
case MPR:
if ( !next_eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseDoctype, state );
- return FALSE;
+ return false;
}
break;
case PER:
d->parsePEReference_context = InDTD;
if ( !parsePEReference() ) {
parseFailed( &TQXmlSimpleReader::parseDoctype, state );
- return FALSE;
+ return false;
}
break;
case Mup:
if (dtdRecursionLimit > 0U && d->parameterEntities.size() > dtdRecursionLimit) {
reportParseError(TQString::fromLatin1(
"DTD parsing exceeded recursion limit of %1.").arg(dtdRecursionLimit));
- return FALSE;
+ return false;
}
if ( !parseMarkupdecl() ) {
parseFailed( &TQXmlSimpleReader::parseDoctype, state );
- return FALSE;
+ return false;
}
break;
case MPE:
if ( !next_eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseDoctype, state );
- return FALSE;
+ return false;
}
break;
case Done:
if ( lexicalHnd ) {
if ( !d->startDTDwasReported ) {
- d->startDTDwasReported = TRUE;
+ d->startDTDwasReported = true;
if ( !lexicalHnd->startDTD( d->doctype, d->publicId, d->systemId ) ) {
reportParseError( lexicalHnd->errorString() );
- return FALSE;
+ return false;
}
}
if ( !lexicalHnd->endDTD() ) {
reportParseError( lexicalHnd->errorString() );
- return FALSE;
+ return false;
}
}
next();
@@ -4568,7 +4568,7 @@ bool TQXmlSimpleReader::parseDoctype()
/*
Parse a ExternalID [75].
- If allowPublicID is TRUE parse ExternalID [75] or PublicID [83].
+ If allowPublicID is true parse ExternalID [75] or PublicID [83].
*/
bool TQXmlSimpleReader::parseExternalID()
{
@@ -4587,7 +4587,7 @@ bool TQXmlSimpleReader::parseExternalID()
const signed char PubDQ2 = 12; // parse PubidLiteral with "
const signed char PubE = 13; // finished parsing the PubidLiteral
const signed char PubWS2 = 14; // parse the whitespace after the PubidLiteral
- const signed char PDone = 15; // done if allowPublicID is TRUE
+ const signed char PDone = 15; // done if allowPublicID is true
const signed char Done = 16;
const signed char InpSQ = 0; // '
@@ -4637,7 +4637,7 @@ bool TQXmlSimpleReader::parseExternalID()
}
if ( !(this->*function)() ) {
parseFailed( &TQXmlSimpleReader::parseExternalID, state );
- return FALSE;
+ return false;
}
}
}
@@ -4647,22 +4647,22 @@ bool TQXmlSimpleReader::parseExternalID()
case PDone:
if ( d->parseExternalID_allowPublicID ) {
d->publicId = string();
- return TRUE;
+ return true;
} else {
reportParseError( XMLERR_UNEXPECTEDCHARACTER );
- return FALSE;
+ return false;
}
case Done:
- return TRUE;
+ return true;
case -1:
// Error
reportParseError( XMLERR_UNEXPECTEDCHARACTER );
- return FALSE;
+ return false;
}
if ( atEnd() ) {
unexpectedEof( &TQXmlSimpleReader::parseExternalID, state );
- return FALSE;
+ return false;
}
if ( is_S(c) ) {
input = InpWs;
@@ -4684,13 +4684,13 @@ bool TQXmlSimpleReader::parseExternalID()
d->parseString_s = "SYSTEM";
if ( !parseString() ) {
parseFailed( &TQXmlSimpleReader::parseExternalID, state );
- return FALSE;
+ return false;
}
break;
case SysWS:
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseExternalID, state );
- return FALSE;
+ return false;
}
break;
case SysSQ:
@@ -4707,13 +4707,13 @@ bool TQXmlSimpleReader::parseExternalID()
d->parseString_s = "PUBLIC";
if ( !parseString() ) {
parseFailed( &TQXmlSimpleReader::parseExternalID, state );
- return FALSE;
+ return false;
}
break;
case PubWS:
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseExternalID, state );
- return FALSE;
+ return false;
}
break;
case PubSQ:
@@ -4733,7 +4733,7 @@ bool TQXmlSimpleReader::parseExternalID()
d->publicId = string();
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseExternalID, state );
- return FALSE;
+ return false;
}
break;
case Done:
@@ -4798,7 +4798,7 @@ bool TQXmlSimpleReader::parseMarkupdecl()
}
if ( !(this->*function)() ) {
parseFailed( &TQXmlSimpleReader::parseMarkupdecl, state );
- return FALSE;
+ return false;
}
}
}
@@ -4809,37 +4809,37 @@ bool TQXmlSimpleReader::parseMarkupdecl()
if ( contentHnd ) {
if ( !contentHnd->processingInstruction(name(),string()) ) {
reportParseError( contentHnd->errorString() );
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
case Dash:
if ( lexicalHnd ) {
if ( !lexicalHnd->comment( string() ) ) {
reportParseError( lexicalHnd->errorString() );
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
case CA:
- return TRUE;
+ return true;
case CEL:
- return TRUE;
+ return true;
case CEN:
- return TRUE;
+ return true;
case CN:
- return TRUE;
+ return true;
case Done:
- return TRUE;
+ return true;
case -1:
// Error
reportParseError( XMLERR_LETTEREXPECTED );
- return FALSE;
+ return false;
}
if ( atEnd() ) {
unexpectedEof( &TQXmlSimpleReader::parseMarkupdecl, state );
- return FALSE;
+ return false;
}
if ( c.unicode() == '<' ) {
input = InpLt;
@@ -4873,40 +4873,40 @@ bool TQXmlSimpleReader::parseMarkupdecl()
next();
break;
case Qm:
- d->parsePI_xmldecl = FALSE;
+ d->parsePI_xmldecl = false;
if ( !parsePI() ) {
parseFailed( &TQXmlSimpleReader::parseMarkupdecl, state );
- return FALSE;
+ return false;
}
break;
case Dash:
if ( !parseComment() ) {
parseFailed( &TQXmlSimpleReader::parseMarkupdecl, state );
- return FALSE;
+ return false;
}
break;
case CA:
if ( !parseAttlistDecl() ) {
parseFailed( &TQXmlSimpleReader::parseMarkupdecl, state );
- return FALSE;
+ return false;
}
break;
case CEL:
if ( !parseElementDecl() ) {
parseFailed( &TQXmlSimpleReader::parseMarkupdecl, state );
- return FALSE;
+ return false;
}
break;
case CEN:
if ( !parseEntityDecl() ) {
parseFailed( &TQXmlSimpleReader::parseMarkupdecl, state );
- return FALSE;
+ return false;
}
break;
case CN:
if ( !parseNotationDecl() ) {
parseFailed( &TQXmlSimpleReader::parseMarkupdecl, state );
- return FALSE;
+ return false;
}
break;
}
@@ -4955,7 +4955,7 @@ bool TQXmlSimpleReader::parsePEReference()
}
if ( !(this->*function)() ) {
parseFailed( &TQXmlSimpleReader::parsePEReference, state );
- return FALSE;
+ return false;
}
}
}
@@ -4964,13 +4964,13 @@ bool TQXmlSimpleReader::parsePEReference()
switch ( state ) {
case Name:
{
- bool skipIt = TRUE;
+ bool skipIt = true;
TQString xmlRefString;
TQMap<TQString,TQString>::Iterator it;
it = d->parameterEntities.find( ref() );
if ( it != d->parameterEntities.end() ) {
- skipIt = FALSE;
+ skipIt = false;
xmlRefString = it.data();
} else if ( entityRes ) {
TQMap<TQString,TQXmlSimpleReaderPrivate::ExternParameterEntity>::Iterator it2;
@@ -4980,16 +4980,16 @@ bool TQXmlSimpleReader::parsePEReference()
if ( !entityRes->resolveEntity( it2.data().publicId, it2.data().systemId, ret ) ) {
delete ret;
reportParseError( entityRes->errorString() );
- return FALSE;
+ return false;
}
if ( ret ) {
xmlRefString = ret->data();
delete ret;
if ( !stripTextDecl( xmlRefString ) ) {
reportParseError( XMLERR_ERRORINTEXTDECL );
- return FALSE;
+ return false;
}
- skipIt = FALSE;
+ skipIt = false;
}
}
}
@@ -4998,34 +4998,34 @@ bool TQXmlSimpleReader::parsePEReference()
if ( contentHnd ) {
if ( !contentHnd->skippedEntity( TQString("%") + ref() ) ) {
reportParseError( contentHnd->errorString() );
- return FALSE;
+ return false;
}
}
} else {
if ( d->parsePEReference_context == InEntityValue ) {
// Included in literal
- if ( !insertXmlRef( xmlRefString, ref(), TRUE ) )
- return FALSE;
+ if ( !insertXmlRef( xmlRefString, ref(), true ) )
+ return false;
} else if ( d->parsePEReference_context == InDTD ) {
// Included as PE
- if ( !insertXmlRef( TQString(" ")+xmlRefString+TQString(" "), ref(), FALSE ) )
- return FALSE;
+ if ( !insertXmlRef( TQString(" ")+xmlRefString+TQString(" "), ref(), false ) )
+ return false;
}
}
}
state = NameR;
break;
case Done:
- return TRUE;
+ return true;
case -1:
// Error
reportParseError( XMLERR_LETTEREXPECTED );
- return FALSE;
+ return false;
}
if ( atEnd() ) {
unexpectedEof( &TQXmlSimpleReader::parsePEReference, state );
- return FALSE;
+ return false;
}
if ( c.unicode() == ';' ) {
input = InpSemi;
@@ -5042,10 +5042,10 @@ bool TQXmlSimpleReader::parsePEReference()
break;
case Name:
case NameR:
- d->parseName_useRef = TRUE;
+ d->parseName_useRef = true;
if ( !parseName() ) {
parseFailed( &TQXmlSimpleReader::parsePEReference, state );
- return FALSE;
+ return false;
}
break;
case Done:
@@ -5127,7 +5127,7 @@ bool TQXmlSimpleReader::parseAttlistDecl()
}
if ( !(this->*function)() ) {
parseFailed( &TQXmlSimpleReader::parseAttlistDecl, state );
- return FALSE;
+ return false;
}
}
}
@@ -5141,16 +5141,16 @@ bool TQXmlSimpleReader::parseAttlistDecl()
d->attDeclAName = name();
break;
case Done:
- return TRUE;
+ return true;
case -1:
// Error
reportParseError( XMLERR_LETTEREXPECTED );
- return FALSE;
+ return false;
}
if ( atEnd() ) {
unexpectedEof( &TQXmlSimpleReader::parseAttlistDecl, state );
- return FALSE;
+ return false;
}
if ( is_S(c) ) {
input = InpWs;
@@ -5176,7 +5176,7 @@ bool TQXmlSimpleReader::parseAttlistDecl()
d->parseString_s = "ATTLIST";
if ( !parseString() ) {
parseFailed( &TQXmlSimpleReader::parseAttlistDecl, state );
- return FALSE;
+ return false;
}
break;
case Ws:
@@ -5185,27 +5185,27 @@ bool TQXmlSimpleReader::parseAttlistDecl()
case Ws3:
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseAttlistDecl, state );
- return FALSE;
+ return false;
}
break;
case Name:
- d->parseName_useRef = FALSE;
+ d->parseName_useRef = false;
if ( !parseName() ) {
parseFailed( &TQXmlSimpleReader::parseAttlistDecl, state );
- return FALSE;
+ return false;
}
break;
case Attdef:
- d->parseName_useRef = FALSE;
+ d->parseName_useRef = false;
if ( !parseName() ) {
parseFailed( &TQXmlSimpleReader::parseAttlistDecl, state );
- return FALSE;
+ return false;
}
break;
case Atttype:
if ( !parseAttType() ) {
parseFailed( &TQXmlSimpleReader::parseAttlistDecl, state );
- return FALSE;
+ return false;
}
break;
case DDecH:
@@ -5215,27 +5215,27 @@ bool TQXmlSimpleReader::parseAttlistDecl()
d->parseString_s = "REQUIRED";
if ( !parseString() ) {
parseFailed( &TQXmlSimpleReader::parseAttlistDecl, state );
- return FALSE;
+ return false;
}
break;
case DefImp:
d->parseString_s = "IMPLIED";
if ( !parseString() ) {
parseFailed( &TQXmlSimpleReader::parseAttlistDecl, state );
- return FALSE;
+ return false;
}
break;
case DefFix:
d->parseString_s = "FIXED";
if ( !parseString() ) {
parseFailed( &TQXmlSimpleReader::parseAttlistDecl, state );
- return FALSE;
+ return false;
}
break;
case Attval:
if ( !parseAttValue() ) {
parseFailed( &TQXmlSimpleReader::parseAttlistDecl, state );
- return FALSE;
+ return false;
}
break;
case Ws4:
@@ -5243,12 +5243,12 @@ bool TQXmlSimpleReader::parseAttlistDecl()
// ### not all values are computed yet...
if ( !declHnd->attributeDecl( d->attDeclEName, d->attDeclAName, "", "", "" ) ) {
reportParseError( declHnd->errorString() );
- return FALSE;
+ return false;
}
}
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseAttlistDecl, state );
- return FALSE;
+ return false;
}
break;
case Done:
@@ -5342,7 +5342,7 @@ bool TQXmlSimpleReader::parseAttType()
}
if ( !(this->*function)() ) {
parseFailed( &TQXmlSimpleReader::parseAttType, state );
- return FALSE;
+ return false;
}
}
}
@@ -5350,18 +5350,18 @@ bool TQXmlSimpleReader::parseAttType()
for (;;) {
switch ( state ) {
case ADone:
- return TRUE;
+ return true;
case Done:
- return TRUE;
+ return true;
case -1:
// Error
reportParseError( XMLERR_LETTEREXPECTED );
- return FALSE;
+ return false;
}
if ( atEnd() ) {
unexpectedEof( &TQXmlSimpleReader::parseAttType, state );
- return FALSE;
+ return false;
}
if ( is_S(c) ) {
input = InpWs;
@@ -5399,21 +5399,21 @@ bool TQXmlSimpleReader::parseAttType()
d->parseString_s = "CDATA";
if ( !parseString() ) {
parseFailed( &TQXmlSimpleReader::parseAttType, state );
- return FALSE;
+ return false;
}
break;
case TTI:
d->parseString_s = "ID";
if ( !parseString() ) {
parseFailed( &TQXmlSimpleReader::parseAttType, state );
- return FALSE;
+ return false;
}
break;
case TTI2:
d->parseString_s = "REF";
if ( !parseString() ) {
parseFailed( &TQXmlSimpleReader::parseAttType, state );
- return FALSE;
+ return false;
}
break;
case TTI3:
@@ -5423,7 +5423,7 @@ bool TQXmlSimpleReader::parseAttType()
d->parseString_s = "ENTIT";
if ( !parseString() ) {
parseFailed( &TQXmlSimpleReader::parseAttType, state );
- return FALSE;
+ return false;
}
break;
case TTEY:
@@ -5433,7 +5433,7 @@ bool TQXmlSimpleReader::parseAttType()
d->parseString_s = "IES";
if ( !parseString() ) {
parseFailed( &TQXmlSimpleReader::parseAttType, state );
- return FALSE;
+ return false;
}
break;
case N:
@@ -5443,7 +5443,7 @@ bool TQXmlSimpleReader::parseAttType()
d->parseString_s = "MTOKEN";
if ( !parseString() ) {
parseFailed( &TQXmlSimpleReader::parseAttType, state );
- return FALSE;
+ return false;
}
break;
case TTNM2:
@@ -5453,50 +5453,50 @@ bool TQXmlSimpleReader::parseAttType()
d->parseString_s = "OTATION";
if ( !parseString() ) {
parseFailed( &TQXmlSimpleReader::parseAttType, state );
- return FALSE;
+ return false;
}
break;
case NO2:
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseAttType, state );
- return FALSE;
+ return false;
}
break;
case NO3:
if ( !next_eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseAttType, state );
- return FALSE;
+ return false;
}
break;
case NOName:
- d->parseName_useRef = FALSE;
+ d->parseName_useRef = false;
if ( !parseName() ) {
parseFailed( &TQXmlSimpleReader::parseAttType, state );
- return FALSE;
+ return false;
}
break;
case NO4:
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseAttType, state );
- return FALSE;
+ return false;
}
break;
case EN:
if ( !next_eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseAttType, state );
- return FALSE;
+ return false;
}
break;
case ENNmt:
if ( !parseNmtoken() ) {
parseFailed( &TQXmlSimpleReader::parseAttType, state );
- return FALSE;
+ return false;
}
break;
case EN2:
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseAttType, state );
- return FALSE;
+ return false;
}
break;
case ADone:
@@ -5562,7 +5562,7 @@ bool TQXmlSimpleReader::parseAttValue()
}
if ( !(this->*function)() ) {
parseFailed( &TQXmlSimpleReader::parseAttValue, state );
- return FALSE;
+ return false;
}
}
}
@@ -5570,16 +5570,16 @@ bool TQXmlSimpleReader::parseAttValue()
for (;;) {
switch ( state ) {
case Done:
- return TRUE;
+ return true;
case -1:
// Error
reportParseError( XMLERR_UNEXPECTEDCHARACTER );
- return FALSE;
+ return false;
}
if ( atEnd() ) {
unexpectedEof( &TQXmlSimpleReader::parseAttValue, state );
- return FALSE;
+ return false;
}
if ( c.unicode() == '"' ) {
input = InpDq;
@@ -5605,7 +5605,7 @@ bool TQXmlSimpleReader::parseAttValue()
d->parseReference_context = InAttributeValue;
if ( !parseReference() ) {
parseFailed( &TQXmlSimpleReader::parseAttValue, state );
- return FALSE;
+ return false;
}
break;
case DqC:
@@ -5703,7 +5703,7 @@ bool TQXmlSimpleReader::parseElementDecl()
}
if ( !(this->*function)() ) {
parseFailed( &TQXmlSimpleReader::parseElementDecl, state );
- return FALSE;
+ return false;
}
}
}
@@ -5711,15 +5711,15 @@ bool TQXmlSimpleReader::parseElementDecl()
for (;;) {
switch ( state ) {
case Done:
- return TRUE;
+ return true;
case -1:
reportParseError( XMLERR_UNEXPECTEDCHARACTER );
- return FALSE;
+ return false;
}
if ( atEnd() ) {
unexpectedEof( &TQXmlSimpleReader::parseElementDecl, state );
- return FALSE;
+ return false;
}
if ( is_S(c) ) {
input = InpWs;
@@ -5755,59 +5755,59 @@ bool TQXmlSimpleReader::parseElementDecl()
d->parseString_s = "LEMENT";
if ( !parseString() ) {
parseFailed( &TQXmlSimpleReader::parseElementDecl, state );
- return FALSE;
+ return false;
}
break;
case Ws1:
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseElementDecl, state );
- return FALSE;
+ return false;
}
break;
case Nam:
- d->parseName_useRef = FALSE;
+ d->parseName_useRef = false;
if ( !parseName() ) {
parseFailed( &TQXmlSimpleReader::parseElementDecl, state );
- return FALSE;
+ return false;
}
break;
case Ws2:
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseElementDecl, state );
- return FALSE;
+ return false;
}
break;
case Empty:
d->parseString_s = "EMPTY";
if ( !parseString() ) {
parseFailed( &TQXmlSimpleReader::parseElementDecl, state );
- return FALSE;
+ return false;
}
break;
case Any:
d->parseString_s = "ANY";
if ( !parseString() ) {
parseFailed( &TQXmlSimpleReader::parseElementDecl, state );
- return FALSE;
+ return false;
}
break;
case Cont:
if ( !next_eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseElementDecl, state );
- return FALSE;
+ return false;
}
break;
case Mix:
d->parseString_s = "#PCDATA";
if ( !parseString() ) {
parseFailed( &TQXmlSimpleReader::parseElementDecl, state );
- return FALSE;
+ return false;
}
break;
case Mix2:
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseElementDecl, state );
- return FALSE;
+ return false;
}
break;
case Mix3:
@@ -5816,20 +5816,20 @@ bool TQXmlSimpleReader::parseElementDecl()
case MixN1:
if ( !next_eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseElementDecl, state );
- return FALSE;
+ return false;
}
break;
case MixN2:
- d->parseName_useRef = FALSE;
+ d->parseName_useRef = false;
if ( !parseName() ) {
parseFailed( &TQXmlSimpleReader::parseElementDecl, state );
- return FALSE;
+ return false;
}
break;
case MixN3:
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseElementDecl, state );
- return FALSE;
+ return false;
}
break;
case MixN4:
@@ -5838,7 +5838,7 @@ bool TQXmlSimpleReader::parseElementDecl()
case Cp:
if ( !parseChoiceSeq() ) {
parseFailed( &TQXmlSimpleReader::parseElementDecl, state );
- return FALSE;
+ return false;
}
break;
case Cp2:
@@ -5847,7 +5847,7 @@ bool TQXmlSimpleReader::parseElementDecl()
case WsD:
if ( !next_eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseElementDecl, state );
- return FALSE;
+ return false;
}
break;
case Done:
@@ -5911,7 +5911,7 @@ bool TQXmlSimpleReader::parseNotationDecl()
}
if ( !(this->*function)() ) {
parseFailed( &TQXmlSimpleReader::parseNotationDecl, state );
- return FALSE;
+ return false;
}
}
}
@@ -5923,22 +5923,22 @@ bool TQXmlSimpleReader::parseNotationDecl()
if ( dtdHnd ) {
if ( !dtdHnd->notationDecl( name(), d->publicId, d->systemId ) ) {
reportParseError( dtdHnd->errorString() );
- return FALSE;
+ return false;
}
}
state = ExtIDR;
break;
case Done:
- return TRUE;
+ return true;
case -1:
// Error
reportParseError( XMLERR_UNEXPECTEDCHARACTER );
- return FALSE;
+ return false;
}
if ( atEnd() ) {
unexpectedEof( &TQXmlSimpleReader::parseNotationDecl, state );
- return FALSE;
+ return false;
}
if ( is_S(c) ) {
input = InpWs;
@@ -5956,40 +5956,40 @@ bool TQXmlSimpleReader::parseNotationDecl()
d->parseString_s = "NOTATION";
if ( !parseString() ) {
parseFailed( &TQXmlSimpleReader::parseNotationDecl, state );
- return FALSE;
+ return false;
}
break;
case Ws1:
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseNotationDecl, state );
- return FALSE;
+ return false;
}
break;
case Nam:
- d->parseName_useRef = FALSE;
+ d->parseName_useRef = false;
if ( !parseName() ) {
parseFailed( &TQXmlSimpleReader::parseNotationDecl, state );
- return FALSE;
+ return false;
}
break;
case Ws2:
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseNotationDecl, state );
- return FALSE;
+ return false;
}
break;
case ExtID:
case ExtIDR:
- d->parseExternalID_allowPublicID = TRUE;
+ d->parseExternalID_allowPublicID = true;
if ( !parseExternalID() ) {
parseFailed( &TQXmlSimpleReader::parseNotationDecl, state );
- return FALSE;
+ return false;
}
break;
case Ws3:
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseNotationDecl, state );
- return FALSE;
+ return false;
}
break;
case Done:
@@ -6054,7 +6054,7 @@ bool TQXmlSimpleReader::parseChoiceSeq()
}
if ( !(this->*function)() ) {
parseFailed( &TQXmlSimpleReader::parseChoiceSeq, state );
- return FALSE;
+ return false;
}
}
}
@@ -6062,16 +6062,16 @@ bool TQXmlSimpleReader::parseChoiceSeq()
for (;;) {
switch ( state ) {
case Done:
- return TRUE;
+ return true;
case -1:
// Error
reportParseError( XMLERR_UNEXPECTEDCHARACTER );
- return FALSE;
+ return false;
}
if ( atEnd() ) {
unexpectedEof( &TQXmlSimpleReader::parseChoiceSeq, state );
- return FALSE;
+ return false;
}
if ( is_S(c) ) {
input = InpWs;
@@ -6098,32 +6098,32 @@ bool TQXmlSimpleReader::parseChoiceSeq()
case Ws1:
if ( !next_eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseChoiceSeq, state );
- return FALSE;
+ return false;
}
break;
case CorS:
if ( !parseChoiceSeq() ) {
parseFailed( &TQXmlSimpleReader::parseChoiceSeq, state );
- return FALSE;
+ return false;
}
break;
case Ws2:
if ( !next_eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseChoiceSeq, state );
- return FALSE;
+ return false;
}
break;
case More:
if ( !next_eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseChoiceSeq, state );
- return FALSE;
+ return false;
}
break;
case Name:
- d->parseName_useRef = FALSE;
+ d->parseName_useRef = false;
if ( !parseName() ) {
parseFailed( &TQXmlSimpleReader::parseChoiceSeq, state );
- return FALSE;
+ return false;
}
break;
case Done:
@@ -6179,10 +6179,10 @@ bool TQXmlSimpleReader::isExpandedEntityValueTooLarge(TQString *errorMessage)
*errorMessage = TQString::fromLatin1("The XML entity \"%1\" expands to a string that is too large to process (%2 characters > %3).");
*errorMessage = (*errorMessage).arg(entity).arg(expandedSizes[entity]).arg(entityCharacterLimit);
}
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
/*
@@ -6270,7 +6270,7 @@ bool TQXmlSimpleReader::parseEntityDecl()
}
if ( !(this->*function)() ) {
parseFailed( &TQXmlSimpleReader::parseEntityDecl, state );
- return FALSE;
+ return false;
}
}
}
@@ -6282,14 +6282,14 @@ bool TQXmlSimpleReader::parseEntityDecl()
TQString errorMessage;
if (isExpandedEntityValueTooLarge(&errorMessage)) {
reportParseError(errorMessage);
- return FALSE;
+ return false;
}
d->entities.insert( name(), string() );
if ( declHnd ) {
if ( !declHnd->internalEntityDecl( name(), string() ) ) {
reportParseError( declHnd->errorString() );
- return FALSE;
+ return false;
}
}
}
@@ -6301,7 +6301,7 @@ bool TQXmlSimpleReader::parseEntityDecl()
if ( dtdHnd ) {
if ( !dtdHnd->unparsedEntityDecl( name(), d->publicId, d->systemId, ref() ) ) {
reportParseError( declHnd->errorString() );
- return FALSE;
+ return false;
}
}
}
@@ -6313,7 +6313,7 @@ bool TQXmlSimpleReader::parseEntityDecl()
if ( declHnd ) {
if ( !declHnd->internalEntityDecl( TQString("%")+name(), string() ) ) {
reportParseError( declHnd->errorString() );
- return FALSE;
+ return false;
}
}
}
@@ -6325,7 +6325,7 @@ bool TQXmlSimpleReader::parseEntityDecl()
if ( declHnd ) {
if ( !declHnd->externalEntityDecl( TQString("%")+name(), d->publicId, d->systemId ) ) {
reportParseError( declHnd->errorString() );
- return FALSE;
+ return false;
}
}
}
@@ -6337,22 +6337,22 @@ bool TQXmlSimpleReader::parseEntityDecl()
if ( declHnd ) {
if ( !declHnd->externalEntityDecl( name(), d->publicId, d->systemId ) ) {
reportParseError( declHnd->errorString() );
- return FALSE;
+ return false;
}
}
}
- return TRUE;
+ return true;
case Done:
- return TRUE;
+ return true;
case -1:
// Error
reportParseError( XMLERR_LETTEREXPECTED );
- return FALSE;
+ return false;
}
if ( atEnd() ) {
unexpectedEof( &TQXmlSimpleReader::parseEntityDecl, state );
- return FALSE;
+ return false;
}
if ( is_S(c) ) {
input = InpWs;
@@ -6374,67 +6374,67 @@ bool TQXmlSimpleReader::parseEntityDecl()
d->parseString_s = "NTITY";
if ( !parseString() ) {
parseFailed( &TQXmlSimpleReader::parseEntityDecl, state );
- return FALSE;
+ return false;
}
break;
case Ws1:
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseEntityDecl, state );
- return FALSE;
+ return false;
}
break;
case Name:
- d->parseName_useRef = FALSE;
+ d->parseName_useRef = false;
if ( !parseName() ) {
parseFailed( &TQXmlSimpleReader::parseEntityDecl, state );
- return FALSE;
+ return false;
}
break;
case Ws2:
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseEntityDecl, state );
- return FALSE;
+ return false;
}
break;
case EValue:
case EValueR:
if ( !parseEntityValue() ) {
parseFailed( &TQXmlSimpleReader::parseEntityDecl, state );
- return FALSE;
+ return false;
}
break;
case ExtID:
- d->parseExternalID_allowPublicID = FALSE;
+ d->parseExternalID_allowPublicID = false;
if ( !parseExternalID() ) {
parseFailed( &TQXmlSimpleReader::parseEntityDecl, state );
- return FALSE;
+ return false;
}
break;
case Ws3:
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseEntityDecl, state );
- return FALSE;
+ return false;
}
break;
case Ndata:
d->parseString_s = "NDATA";
if ( !parseString() ) {
parseFailed( &TQXmlSimpleReader::parseEntityDecl, state );
- return FALSE;
+ return false;
}
break;
case Ws4:
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseEntityDecl, state );
- return FALSE;
+ return false;
}
break;
case NNam:
case NNamR:
- d->parseName_useRef = TRUE;
+ d->parseName_useRef = true;
if ( !parseName() ) {
parseFailed( &TQXmlSimpleReader::parseEntityDecl, state );
- return FALSE;
+ return false;
}
break;
case PEDec:
@@ -6443,41 +6443,41 @@ bool TQXmlSimpleReader::parseEntityDecl()
case Ws6:
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseEntityDecl, state );
- return FALSE;
+ return false;
}
break;
case PENam:
- d->parseName_useRef = FALSE;
+ d->parseName_useRef = false;
if ( !parseName() ) {
parseFailed( &TQXmlSimpleReader::parseEntityDecl, state );
- return FALSE;
+ return false;
}
break;
case Ws7:
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseEntityDecl, state );
- return FALSE;
+ return false;
}
break;
case PEVal:
case PEValR:
if ( !parseEntityValue() ) {
parseFailed( &TQXmlSimpleReader::parseEntityDecl, state );
- return FALSE;
+ return false;
}
break;
case PEEID:
case PEEIDR:
- d->parseExternalID_allowPublicID = FALSE;
+ d->parseExternalID_allowPublicID = false;
if ( !parseExternalID() ) {
parseFailed( &TQXmlSimpleReader::parseEntityDecl, state );
- return FALSE;
+ return false;
}
break;
case WsE:
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseEntityDecl, state );
- return FALSE;
+ return false;
}
break;
case EDDone:
@@ -6544,7 +6544,7 @@ bool TQXmlSimpleReader::parseEntityValue()
}
if ( !(this->*function)() ) {
parseFailed( &TQXmlSimpleReader::parseEntityValue, state );
- return FALSE;
+ return false;
}
}
}
@@ -6552,16 +6552,16 @@ bool TQXmlSimpleReader::parseEntityValue()
for (;;) {
switch ( state ) {
case Done:
- return TRUE;
+ return true;
case -1:
// Error
reportParseError( XMLERR_LETTEREXPECTED );
- return FALSE;
+ return false;
}
if ( atEnd() ) {
unexpectedEof( &TQXmlSimpleReader::parseEntityValue, state );
- return FALSE;
+ return false;
}
if ( c.unicode() == '"' ) {
input = InpDq;
@@ -6592,7 +6592,7 @@ bool TQXmlSimpleReader::parseEntityValue()
d->parsePEReference_context = InEntityValue;
if ( !parsePEReference() ) {
parseFailed( &TQXmlSimpleReader::parseEntityValue, state );
- return FALSE;
+ return false;
}
break;
case DqRef:
@@ -6600,7 +6600,7 @@ bool TQXmlSimpleReader::parseEntityValue()
d->parseReference_context = InEntityValue;
if ( !parseReference() ) {
parseFailed( &TQXmlSimpleReader::parseEntityValue, state );
- return FALSE;
+ return false;
}
break;
case Done:
@@ -6662,7 +6662,7 @@ bool TQXmlSimpleReader::parseComment()
}
if ( !(this->*function)() ) {
parseFailed( &TQXmlSimpleReader::parseComment, state );
- return FALSE;
+ return false;
}
}
}
@@ -6678,16 +6678,16 @@ bool TQXmlSimpleReader::parseComment()
stringAddC( '-' );
break;
case Done:
- return TRUE;
+ return true;
case -1:
// Error
reportParseError( XMLERR_ERRORPARSINGCOMMENT );
- return FALSE;
+ return false;
}
if ( atEnd() ) {
unexpectedEof( &TQXmlSimpleReader::parseComment, state );
- return FALSE;
+ return false;
}
if ( c.unicode() == '-' ) {
input = InpDash;
@@ -6773,7 +6773,7 @@ bool TQXmlSimpleReader::parseAttribute()
}
if ( !(this->*function)() ) {
parseFailed( &TQXmlSimpleReader::parseAttribute, state );
- return FALSE;
+ return false;
}
}
}
@@ -6782,16 +6782,16 @@ bool TQXmlSimpleReader::parseAttribute()
switch ( state ) {
case Quotes:
// Done
- return TRUE;
+ return true;
case -1:
// Error
reportParseError( XMLERR_UNEXPECTEDCHARACTER );
- return FALSE;
+ return false;
}
if ( atEnd() ) {
unexpectedEof( &TQXmlSimpleReader::parseAttribute, state );
- return FALSE;
+ return false;
}
if ( determineNameChar(c) == NameBeginning ) {
input = InpNameBe;
@@ -6808,28 +6808,28 @@ bool TQXmlSimpleReader::parseAttribute()
switch ( state ) {
case PName:
- d->parseName_useRef = FALSE;
+ d->parseName_useRef = false;
if ( !parseName() ) {
parseFailed( &TQXmlSimpleReader::parseAttribute, state );
- return FALSE;
+ return false;
}
break;
case Ws:
if ( !eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseAttribute, state );
- return FALSE;
+ return false;
}
break;
case Eq:
if ( !next_eat_ws() ) {
parseFailed( &TQXmlSimpleReader::parseAttribute, state );
- return FALSE;
+ return false;
}
break;
case Quotes:
if ( !parseAttValue() ) {
parseFailed( &TQXmlSimpleReader::parseAttribute, state );
- return FALSE;
+ return false;
}
break;
}
@@ -6837,7 +6837,7 @@ bool TQXmlSimpleReader::parseAttribute()
}
/*
- Parse a Name [5] and store the name in name or ref (if useRef is TRUE).
+ Parse a Name [5] and store the name in name or ref (if useRef is true).
*/
bool TQXmlSimpleReader::parseName()
{
@@ -6879,7 +6879,7 @@ bool TQXmlSimpleReader::parseName()
}
if ( !(this->*function)() ) {
parseFailed( &TQXmlSimpleReader::parseName, state );
- return FALSE;
+ return false;
}
}
}
@@ -6887,16 +6887,16 @@ bool TQXmlSimpleReader::parseName()
for (;;) {
switch ( state ) {
case Done:
- return TRUE;
+ return true;
case -1:
// Error
reportParseError( XMLERR_LETTEREXPECTED );
- return FALSE;
+ return false;
}
if ( atEnd() ) {
unexpectedEof( &TQXmlSimpleReader::parseName, state );
- return FALSE;
+ return false;
}
// we can safely do the (int) cast thanks to the Q_ASSERTs earlier in this function
@@ -6964,7 +6964,7 @@ bool TQXmlSimpleReader::parseNmtoken()
}
if ( !(this->*function)() ) {
parseFailed( &TQXmlSimpleReader::parseNmtoken, state );
- return FALSE;
+ return false;
}
}
}
@@ -6972,16 +6972,16 @@ bool TQXmlSimpleReader::parseNmtoken()
for (;;) {
switch ( state ) {
case Done:
- return TRUE;
+ return true;
case -1:
// Error
reportParseError( XMLERR_LETTEREXPECTED );
- return FALSE;
+ return false;
}
if ( atEnd() ) {
unexpectedEof( &TQXmlSimpleReader::parseNmtoken, state );
- return FALSE;
+ return false;
}
if (determineNameChar(c) == NotName) {
input = InpUnknown;
@@ -7007,11 +7007,11 @@ bool TQXmlSimpleReader::parseNmtoken()
/*
Parse a Reference [67].
- parseReference_charDataRead is set to TRUE if the reference must not be
+ parseReference_charDataRead is set to true if the reference must not be
parsed. The character(s) which the reference mapped to are appended to
string. The head stands on the first character after the reference.
- parseReference_charDataRead is set to FALSE if the reference must be parsed.
+ parseReference_charDataRead is set to false if the reference must be parsed.
The charachter(s) which the reference mapped to are inserted at the reference
position. The head stands on the first character of the replacement).
*/
@@ -7055,7 +7055,7 @@ bool TQXmlSimpleReader::parseReference()
signed char input;
if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
- d->parseReference_charDataRead = FALSE;
+ d->parseReference_charDataRead = false;
state = Init;
} else {
state = d->parseStack->pop().state;
@@ -7072,7 +7072,7 @@ bool TQXmlSimpleReader::parseReference()
}
if ( !(this->*function)() ) {
parseFailed( &TQXmlSimpleReader::parseReference, state );
- return FALSE;
+ return false;
}
}
}
@@ -7080,20 +7080,20 @@ bool TQXmlSimpleReader::parseReference()
for (;;) {
switch ( state ) {
case DoneD:
- return TRUE;
+ return true;
case DoneH:
- return TRUE;
+ return true;
case DoneN:
- return TRUE;
+ return true;
case -1:
// Error
reportParseError( XMLERR_ERRORPARSINGREFERENCE );
- return FALSE;
+ return false;
}
if ( atEnd() ) {
unexpectedEof( &TQXmlSimpleReader::parseReference, state );
- return FALSE;
+ return false;
}
if ( c.row() ) {
input = InpUnknown;
@@ -7137,10 +7137,10 @@ bool TQXmlSimpleReader::parseReference()
break;
case Name:
// read the name into the ref
- d->parseName_useRef = TRUE;
+ d->parseName_useRef = true;
if ( !parseName() ) {
parseFailed( &TQXmlSimpleReader::parseReference, state );
- return FALSE;
+ return false;
}
break;
case DoneD:
@@ -7149,9 +7149,9 @@ bool TQXmlSimpleReader::parseReference()
stringAddC( TQChar(tmp) );
} else {
reportParseError( XMLERR_ERRORPARSINGREFERENCE );
- return FALSE;
+ return false;
}
- d->parseReference_charDataRead = TRUE;
+ d->parseReference_charDataRead = true;
next();
break;
case DoneH:
@@ -7160,14 +7160,14 @@ bool TQXmlSimpleReader::parseReference()
stringAddC( TQChar(tmp) );
} else {
reportParseError( XMLERR_ERRORPARSINGREFERENCE );
- return FALSE;
+ return false;
}
- d->parseReference_charDataRead = TRUE;
+ d->parseReference_charDataRead = true;
next();
break;
case DoneN:
if ( !processReference() )
- return FALSE;
+ return false;
next();
break;
}
@@ -7202,7 +7202,7 @@ bool TQXmlSimpleReader::processReference()
// Included or Included in literal
stringAddC( '&' );
}
- d->parseReference_charDataRead = TRUE;
+ d->parseReference_charDataRead = true;
} else if ( reference == "lt" ) {
if ( d->parseReference_context == InEntityValue ) {
// Bypassed
@@ -7211,7 +7211,7 @@ bool TQXmlSimpleReader::processReference()
// Included or Included in literal
stringAddC( '<' );
}
- d->parseReference_charDataRead = TRUE;
+ d->parseReference_charDataRead = true;
} else if ( reference == "gt" ) {
if ( d->parseReference_context == InEntityValue ) {
// Bypassed
@@ -7220,7 +7220,7 @@ bool TQXmlSimpleReader::processReference()
// Included or Included in literal
stringAddC( '>' );
}
- d->parseReference_charDataRead = TRUE;
+ d->parseReference_charDataRead = true;
} else if ( reference == "apos" ) {
if ( d->parseReference_context == InEntityValue ) {
// Bypassed
@@ -7229,7 +7229,7 @@ bool TQXmlSimpleReader::processReference()
// Included or Included in literal
stringAddC( '\'' );
}
- d->parseReference_charDataRead = TRUE;
+ d->parseReference_charDataRead = true;
} else if ( reference == "quot" ) {
if ( d->parseReference_context == InEntityValue ) {
// Bypassed
@@ -7238,7 +7238,7 @@ bool TQXmlSimpleReader::processReference()
// Included or Included in literal
stringAddC( '"' );
}
- d->parseReference_charDataRead = TRUE;
+ d->parseReference_charDataRead = true;
} else {
TQMap<TQString,TQString>::Iterator it;
it = d->entities.find( reference );
@@ -7247,15 +7247,15 @@ bool TQXmlSimpleReader::processReference()
switch ( d->parseReference_context ) {
case InContent:
// Included
- if ( !insertXmlRef( it.data(), reference, FALSE ) )
- return FALSE;
- d->parseReference_charDataRead = FALSE;
+ if ( !insertXmlRef( it.data(), reference, false ) )
+ return false;
+ d->parseReference_charDataRead = false;
break;
case InAttributeValue:
// Included in literal
- if ( !insertXmlRef( it.data(), reference, TRUE ) )
- return FALSE;
- d->parseReference_charDataRead = FALSE;
+ if ( !insertXmlRef( it.data(), reference, true ) )
+ return false;
+ d->parseReference_charDataRead = false;
break;
case InEntityValue:
{
@@ -7265,14 +7265,14 @@ bool TQXmlSimpleReader::processReference()
stringAddC( reference[i] );
}
stringAddC( ';');
- d->parseReference_charDataRead = TRUE;
+ d->parseReference_charDataRead = true;
}
break;
case InDTD:
// Forbidden
- d->parseReference_charDataRead = FALSE;
+ d->parseReference_charDataRead = false;
reportParseError( XMLERR_INTERNALGENERALENTITYINDTD );
- return FALSE;
+ return false;
}
} else {
TQMap<TQString,TQXmlSimpleReaderPrivate::ExternEntity>::Iterator itExtern;
@@ -7287,13 +7287,13 @@ bool TQXmlSimpleReader::processReference()
stringAddC( reference[i] );
}
stringAddC( ';');
- d->parseReference_charDataRead = TRUE;
+ d->parseReference_charDataRead = true;
} else {
if ( contentHnd && !(d->parseReference_context == InAttributeValue
&& d->undefEntityInAttrHack)) {
if ( !contentHnd->skippedEntity( reference ) ) {
reportParseError( contentHnd->errorString() );
- return FALSE; // error
+ return false; // error
}
}
}
@@ -7303,39 +7303,39 @@ bool TQXmlSimpleReader::processReference()
case InContent:
{
// Included if validating
- bool skipIt = TRUE;
+ bool skipIt = true;
if ( entityRes ) {
TQXmlInputSource *ret = 0;
if ( !entityRes->resolveEntity( itExtern.data().publicId, itExtern.data().systemId, ret ) ) {
delete ret;
reportParseError( entityRes->errorString() );
- return FALSE;
+ return false;
}
if ( ret ) {
TQString xmlRefString = ret->data();
delete ret;
if ( !stripTextDecl( xmlRefString ) ) {
reportParseError( XMLERR_ERRORINTEXTDECL );
- return FALSE;
+ return false;
}
- if ( !insertXmlRef( xmlRefString, reference, FALSE ) )
- return FALSE;
- skipIt = FALSE;
+ if ( !insertXmlRef( xmlRefString, reference, false ) )
+ return false;
+ skipIt = false;
}
}
if ( skipIt && contentHnd ) {
if ( !contentHnd->skippedEntity( reference ) ) {
reportParseError( contentHnd->errorString() );
- return FALSE; // error
+ return false; // error
}
}
- d->parseReference_charDataRead = FALSE;
+ d->parseReference_charDataRead = false;
} break;
case InAttributeValue:
// Forbidden
- d->parseReference_charDataRead = FALSE;
+ d->parseReference_charDataRead = false;
reportParseError( XMLERR_EXTERNALGENERALENTITYINAV );
- return FALSE;
+ return false;
case InEntityValue:
{
// Bypassed
@@ -7344,26 +7344,26 @@ bool TQXmlSimpleReader::processReference()
stringAddC( reference[i] );
}
stringAddC( ';');
- d->parseReference_charDataRead = TRUE;
+ d->parseReference_charDataRead = true;
}
break;
case InDTD:
// Forbidden
- d->parseReference_charDataRead = FALSE;
+ d->parseReference_charDataRead = false;
reportParseError( XMLERR_EXTERNALGENERALENTITYINDTD );
- return FALSE;
+ return false;
}
} else {
// "Unparsed"
// ### notify for "Occurs as Attribute Value" missing (but this is no refence, anyway)
// Forbidden
- d->parseReference_charDataRead = FALSE;
+ d->parseReference_charDataRead = false;
reportParseError( XMLERR_UNPARSEDENTITYREFERENCE );
- return FALSE; // error
+ return false; // error
}
}
}
- return TRUE; // no error
+ return true; // no error
}
@@ -7399,19 +7399,19 @@ bool TQXmlSimpleReader::parseString()
}
if ( !(this->*function)() ) {
parseFailed( &TQXmlSimpleReader::parseString, state );
- return FALSE;
+ return false;
}
}
}
for (;;) {
if ( state == d->Done ) {
- return TRUE;
+ return true;
}
if ( atEnd() ) {
unexpectedEof( &TQXmlSimpleReader::parseString, state );
- return FALSE;
+ return false;
}
if ( c == d->parseString_s[(int)state] ) {
input = InpCharExpected;
@@ -7423,7 +7423,7 @@ bool TQXmlSimpleReader::parseString()
} else {
// Error
reportParseError( XMLERR_UNEXPECTEDCHARACTER );
- return FALSE;
+ return false;
}
next();
@@ -7433,10 +7433,10 @@ bool TQXmlSimpleReader::parseString()
/*
This private function inserts and reports an entity substitution. The
substituted string is \a data and the name of the entity reference is \a
- name. If \a inLiteral is TRUE, the entity is IncludedInLiteral (i.e., " and '
+ name. If \a inLiteral is true, the entity is IncludedInLiteral (i.e., " and '
must be quoted. Otherwise they are not quoted.
- This function returns FALSE on error.
+ This function returns false on error.
*/
bool TQXmlSimpleReader::insertXmlRef( const TQString &data, const TQString &name, bool inLiteral )
{
@@ -7451,15 +7451,15 @@ bool TQXmlSimpleReader::insertXmlRef( const TQString &data, const TQString &name
if ( d->xmlRefName.count() > n+1 ) {
// recursive entities
reportParseError( XMLERR_RECURSIVEENTITIES );
- return FALSE;
+ return false;
}
if ( d->reportEntities && lexicalHnd ) {
if ( !lexicalHnd->startEntity( name ) ) {
reportParseError( lexicalHnd->errorString() );
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
/*
@@ -7503,24 +7503,24 @@ void TQXmlSimpleReader::next()
This function does not move the cursor if the actual cursor position is a
non-whitespace charcter.
- Returns FALSE when you use incremental parsing and this function reaches EOF
+ Returns false when you use incremental parsing and this function reaches EOF
with reading only whitespace characters. In this case it also poplulates the
parseStack with useful information. In all other cases, this function returns
- TRUE.
+ true.
*/
bool TQXmlSimpleReader::eat_ws()
{
while ( !atEnd() ) {
if ( !is_S(c) ) {
- return TRUE;
+ return true;
}
next();
}
if ( d->parseStack != 0 ) {
unexpectedEof( &TQXmlSimpleReader::eat_ws, 0 );
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
bool TQXmlSimpleReader::next_eat_ws()
@@ -7567,8 +7567,8 @@ void TQXmlSimpleReader::initData()
}
/*
- Returns TRUE if a entity with the name \a e exists,
- otherwise returns FALSE.
+ Returns true if a entity with the name \a e exists,
+ otherwise returns false.
*/
bool TQXmlSimpleReader::entityExist( const TQString& e ) const
{
@@ -7576,9 +7576,9 @@ bool TQXmlSimpleReader::entityExist( const TQString& e ) const
d->externParameterEntities.find(e) == d->externParameterEntities.end() &&
d->externEntities.find(e) == d->externEntities.end() &&
d->entities.find(e) == d->entities.end() ) {
- return FALSE;
+ return false;
} else {
- return TRUE;
+ return true;
}
}
@@ -7614,7 +7614,7 @@ void TQXmlSimpleReader::unexpectedEof( ParseFunction where, int state )
}
/*
- This private function is called when a parse...() function returned FALSE. It
+ This private function is called when a parse...() function returned false. It
determines if there was an error or if incremental parsing simply went out of
data and does the right thing for the case. \a where is a pointer to the
function where the error occurred and \a state is the parsing state in this
diff --git a/src/xml/tqxml.h b/src/xml/tqxml.h
index a7fb1d3c1..0dae44a8f 100644
--- a/src/xml/tqxml.h
+++ b/src/xml/tqxml.h
@@ -173,7 +173,7 @@ public:
static const TQChar EndOfDocument;
protected:
- virtual TQString fromRawData( const TQByteArray &data, bool beginning = FALSE );
+ virtual TQString fromRawData( const TQByteArray &data, bool beginning = false );
private:
void init();