diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-12-05 09:16:19 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-12-05 09:16:19 +0900 |
| commit | d9f24c630d3a86190017de303bc5750e532cdb61 (patch) | |
| tree | 50ef1ae6ea0187fbbe258f0d73388fc93508eeec | |
| parent | 4d495175043c399fdca6e1bb4c74ef176fc76fb4 (diff) | |
| download | tqt-d9f24c630d3a86190017de303bc5750e532cdb61.tar.gz tqt-d9f24c630d3a86190017de303bc5750e532cdb61.zip | |
Replace TRUE/FALSE with boolean values true/false - part 5
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
| -rw-r--r-- | src/canvas/tqcanvas.cpp | 186 | ||||
| -rw-r--r-- | src/canvas/tqcanvas.h | 6 | ||||
| -rw-r--r-- | src/codecs/tqbig5codec.cpp | 12 | ||||
| -rw-r--r-- | src/codecs/tqeucjpcodec.cpp | 6 | ||||
| -rw-r--r-- | src/codecs/tqeuckrcodec.cpp | 6 | ||||
| -rw-r--r-- | src/codecs/tqfontcncodec.cpp | 2 | ||||
| -rw-r--r-- | src/codecs/tqgb18030codec.cpp | 12 | ||||
| -rw-r--r-- | src/codecs/tqhebrewcodec.cpp | 22 | ||||
| -rw-r--r-- | src/codecs/tqisciicodec.cpp | 4 | ||||
| -rw-r--r-- | src/codecs/tqjiscodec.cpp | 18 | ||||
| -rw-r--r-- | src/codecs/tqsjiscodec.cpp | 6 | ||||
| -rw-r--r-- | src/codecs/tqtextcodec.cpp | 18 | ||||
| -rw-r--r-- | src/codecs/tqtextcodecfactory.cpp | 2 | ||||
| -rw-r--r-- | src/codecs/tqutfcodec.cpp | 20 | ||||
| -rw-r--r-- | src/workspace/tqworkspace.cpp | 234 | ||||
| -rw-r--r-- | src/workspace/tqworkspace.h | 2 | ||||
| -rw-r--r-- | src/xml/tqdom.cpp | 450 | ||||
| -rw-r--r-- | src/xml/tqdom.h | 2 | ||||
| -rw-r--r-- | src/xml/tqsvgdevice.cpp | 72 | ||||
| -rw-r--r-- | src/xml/tqsvgdevice_p.h | 2 | ||||
| -rw-r--r-- | src/xml/tqxml.cpp | 1048 | ||||
| -rw-r--r-- | src/xml/tqxml.h | 2 |
22 files changed, 1066 insertions, 1066 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/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 ¬ationName ) @@ -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(); |
