summaryrefslogtreecommitdiffstats
path: root/src/kernel/qtextlayout.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-03-01 13:24:30 -0600
committerTimothy Pearson <[email protected]>2012-03-01 13:24:30 -0600
commita830bf10b7d4ed2c83ffe68c0b22d7c4ba9860b0 (patch)
tree3910055c634e2ca44eacd2c892118634df9b3597 /src/kernel/qtextlayout.cpp
parentb0b53cc84f215df9b9bcce77253a6b7a9d300986 (diff)
downloadqt3-a830bf10b7d4ed2c83ffe68c0b22d7c4ba9860b0.tar.gz
qt3-a830bf10b7d4ed2c83ffe68c0b22d7c4ba9860b0.zip
Rename additional global TQt functions
Diffstat (limited to 'src/kernel/qtextlayout.cpp')
-rw-r--r--src/kernel/qtextlayout.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/kernel/qtextlayout.cpp b/src/kernel/qtextlayout.cpp
index 5f677a0..3bda5d2 100644
--- a/src/kernel/qtextlayout.cpp
+++ b/src/kernel/qtextlayout.cpp
@@ -134,7 +134,7 @@ int QTextItem::cursorToX( int *cPos, Edge edge ) const
for ( int i = 0; i < glyph_pos; i++ )
x += advances[i];
}
-// qDebug("cursorToX: pos=%d, gpos=%d x=%d", pos, glyph_pos, x );
+// tqDebug("cursorToX: pos=%d, gpos=%d x=%d", pos, glyph_pos, x );
*cPos = pos;
return x;
}
@@ -174,7 +174,7 @@ int QTextItem::xToCursor( int x, CursorPosition cpos ) const
cp_after = i;
for ( int j = lastCluster; j < newCluster; j++ )
x_after += advances[j];
- // qDebug("cluster boundary: lastCluster=%d, newCluster=%d, x_before=%d, x_after=%d",
+ // tqDebug("cluster boundary: lastCluster=%d, newCluster=%d, x_before=%d, x_after=%d",
// lastCluster, newCluster, x_before, x_after );
if ( x_after > x )
break;
@@ -184,7 +184,7 @@ int QTextItem::xToCursor( int x, CursorPosition cpos ) const
bool before = ( cpos == OnCharacters || (x - x_before) < (x_after - x) );
-// qDebug("got cursor position for %d: %d/%d, x_ba=%d/%d using %d",
+// tqDebug("got cursor position for %d: %d/%d, x_ba=%d/%d using %d",
// x, cp_before,cp_after, x_before, x_after, before ? cp_before : cp_after );
return before ? cp_before : cp_after;
@@ -355,7 +355,7 @@ QTextLayout::Result QTextLayout::addCurrentItem()
QScriptItem &current = d->items[d->currentItem];
d->shape( d->currentItem );
d->widthUsed += current.width;
-// qDebug("trying to add item %d with width %d, remaining %d", d->currentItem, current.width, d->lineWidth-d->widthUsed );
+// tqDebug("trying to add item %d with width %d, remaining %d", d->currentItem, current.width, d->lineWidth-d->widthUsed );
d->currentItem++;
@@ -376,7 +376,7 @@ QTextLayout::Result QTextLayout::endLine( int x, int y, int alignment,
int i;
QTextLayout::Result result = LineEmpty;
-// qDebug("endLine x=%d, y=%d, first=%d, current=%d lw=%d wu=%d", x, y, d->firstItemInLine, d->currentItem, d->lineWidth, d->widthUsed );
+// tqDebug("endLine x=%d, y=%d, first=%d, current=%d lw=%d wu=%d", x, y, d->firstItemInLine, d->currentItem, d->lineWidth, d->widthUsed );
int width_nobreak_found = d->widthUsed;
if ( d->firstItemInLine == -1 )
goto end;
@@ -428,21 +428,21 @@ QTextLayout::Result QTextLayout::endLine( int x, int y, int alignment,
int lastGlyph = 0;
int tmpItemWidth = 0;
-// qDebug("looking for break in item %d, isSpace=%d", i, si->isSpace );
+// tqDebug("looking for break in item %d, isSpace=%d", i, si->isSpace );
if(si->isSpace && !(alignment & (Qt::SingleLine|Qt::IncludeTrailingSpaces))) {
swidth += si->width;
} else {
tmpWidth += swidth;
swidth = 0;
for ( int pos = 0; pos < length; pos++ ) {
-// qDebug("advance=%d, w=%d, tmpWidth=%d, softbreak=%d, whitespace=%d",
+// tqDebug("advance=%d, w=%d, tmpWidth=%d, softbreak=%d, whitespace=%d",
// *advances, w, tmpWidth, itemAttrs->softBreak, itemAttrs->whiteSpace );
int glyph = logClusters[pos];
if ( lastGlyph != glyph ) {
while ( lastGlyph < glyph )
tmpItemWidth += advances[lastGlyph++];
if ( breakPosition != -1 && w + tmpWidth + tmpItemWidth > d->lineWidth ) {
-// qDebug("found break at w=%d, tmpWidth=%d, tmpItemWidth=%d", w, tmpWidth, tmpItemWidth);
+// tqDebug("found break at w=%d, tmpWidth=%d, tmpItemWidth=%d", w, tmpWidth, tmpItemWidth);
d->widthUsed = w;
goto found;
}
@@ -456,7 +456,7 @@ QTextLayout::Result QTextLayout::endLine( int x, int y, int alignment,
breakany = FALSE;
breakItem = i;
breakPosition = pos;
-// qDebug("found possible break at item %d, position %d (absolute=%d), w=%d, tmpWidth=%d, tmpItemWidth=%d", breakItem, breakPosition, d->items[breakItem].position+breakPosition, w, tmpWidth, tmpItemWidth);
+// tqDebug("found possible break at item %d, position %d (absolute=%d), w=%d, tmpWidth=%d, tmpItemWidth=%d", breakItem, breakPosition, d->items[breakItem].position+breakPosition, w, tmpWidth, tmpItemWidth);
w += tmpWidth + tmpItemWidth;
itemWidth += tmpItemWidth;
tmpWidth = 0;
@@ -482,12 +482,12 @@ QTextLayout::Result QTextLayout::endLine( int x, int y, int alignment,
goto nobreak;
}
-// qDebug("linebreak at item %d, position %d, wu=%d", breakItem, breakPosition, d->widthUsed );
+// tqDebug("linebreak at item %d, position %d, wu=%d", breakItem, breakPosition, d->widthUsed );
// split the line
if ( breakPosition > 0 ) {
// int length = d->length( breakItem );
-// qDebug("splitting item, itemWidth=%d", itemWidth);
+// tqDebug("splitting item, itemWidth=%d", itemWidth);
// not a full item, need to break
d->splitItem( breakItem, breakPosition );
d->currentItem = breakItem+1;
@@ -508,10 +508,10 @@ QTextLayout::Result QTextLayout::endLine( int x, int y, int alignment,
visual = new int[numRuns];
}
-// qDebug("reordering %d runs, numSpaceItems=%d", numRuns, numSpaceItems );
+// tqDebug("reordering %d runs, numSpaceItems=%d", numRuns, numSpaceItems );
for ( i = 0; i < numRuns; i++ ) {
levels[i] = d->items[i+d->firstItemInLine].analysis.bidiLevel;
-// qDebug(" level = %d", d->items[i+d->firstItemInLine].analysis.bidiLevel );
+// tqDebug(" level = %d", d->items[i+d->firstItemInLine].analysis.bidiLevel );
}
d->bidiReorder( numRuns, levels, visual );
@@ -541,7 +541,7 @@ QTextLayout::Result QTextLayout::endLine( int x, int y, int alignment,
int left = x;
for ( i = 0; i < numRuns; i++ ) {
QScriptItem &si = d->items[d->firstItemInLine+visual[i]];
-// qDebug("positioning item %d with width %d (from=%d/length=%d) at %d", d->firstItemInLine+visual[i], si.width, si.position,
+// tqDebug("positioning item %d with width %d (from=%d/length=%d) at %d", d->firstItemInLine+visual[i], si.width, si.position,
// d->length(d->firstItemInLine+visual[i]), x );
si.x = x;
si.y = y + asc;
@@ -593,7 +593,7 @@ void QTextLayout::endLayout()
int QTextLayout::nextCursorPosition( int oldPos, CursorMode mode ) const
{
-// qDebug("looking for next cursor pos for %d", oldPos );
+// tqDebug("looking for next cursor pos for %d", oldPos );
const QCharAttributes *attributes = d->attributes();
int len = d->string.length();
if ( oldPos >= len )
@@ -606,13 +606,13 @@ int QTextLayout::nextCursorPosition( int oldPos, CursorMode mode ) const
while ( oldPos < len && !attributes[oldPos].wordStop && !attributes[oldPos-1].whiteSpace )
oldPos++;
}
-// qDebug(" -> %d", oldPos );
+// tqDebug(" -> %d", oldPos );
return oldPos;
}
int QTextLayout::previousCursorPosition( int oldPos, CursorMode mode ) const
{
-// qDebug("looking for previous cursor pos for %d", oldPos );
+// tqDebug("looking for previous cursor pos for %d", oldPos );
const QCharAttributes *attributes = d->attributes();
if ( oldPos <= 0 )
return 0;
@@ -624,7 +624,7 @@ int QTextLayout::previousCursorPosition( int oldPos, CursorMode mode ) const
while ( oldPos && !attributes[oldPos].wordStop && !attributes[oldPos-1].whiteSpace )
oldPos--;
}
-// qDebug(" -> %d", oldPos );
+// tqDebug(" -> %d", oldPos );
return oldPos;
}