summaryrefslogtreecommitdiffstats
path: root/src/kernel/qtextlayout.cpp
diff options
context:
space:
mode:
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 3bda5d2..5f677a0 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];
}
-// tqDebug("cursorToX: pos=%d, gpos=%d x=%d", pos, glyph_pos, x );
+// qDebug("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];
- // tqDebug("cluster boundary: lastCluster=%d, newCluster=%d, x_before=%d, x_after=%d",
+ // qDebug("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) );
-// tqDebug("got cursor position for %d: %d/%d, x_ba=%d/%d using %d",
+// qDebug("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;
-// tqDebug("trying to add item %d with width %d, remaining %d", d->currentItem, current.width, d->lineWidth-d->widthUsed );
+// qDebug("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;
-// tqDebug("endLine x=%d, y=%d, first=%d, current=%d lw=%d wu=%d", x, y, d->firstItemInLine, d->currentItem, d->lineWidth, d->widthUsed );
+// qDebug("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;
-// tqDebug("looking for break in item %d, isSpace=%d", i, si->isSpace );
+// qDebug("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++ ) {
-// tqDebug("advance=%d, w=%d, tmpWidth=%d, softbreak=%d, whitespace=%d",
+// qDebug("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 ) {
-// tqDebug("found break at w=%d, tmpWidth=%d, tmpItemWidth=%d", w, tmpWidth, tmpItemWidth);
+// qDebug("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;
-// 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);
+// 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);
w += tmpWidth + tmpItemWidth;
itemWidth += tmpItemWidth;
tmpWidth = 0;
@@ -482,12 +482,12 @@ QTextLayout::Result QTextLayout::endLine( int x, int y, int alignment,
goto nobreak;
}
-// tqDebug("linebreak at item %d, position %d, wu=%d", breakItem, breakPosition, d->widthUsed );
+// qDebug("linebreak at item %d, position %d, wu=%d", breakItem, breakPosition, d->widthUsed );
// split the line
if ( breakPosition > 0 ) {
// int length = d->length( breakItem );
-// tqDebug("splitting item, itemWidth=%d", itemWidth);
+// qDebug("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];
}
-// tqDebug("reordering %d runs, numSpaceItems=%d", numRuns, numSpaceItems );
+// qDebug("reordering %d runs, numSpaceItems=%d", numRuns, numSpaceItems );
for ( i = 0; i < numRuns; i++ ) {
levels[i] = d->items[i+d->firstItemInLine].analysis.bidiLevel;
-// tqDebug(" level = %d", d->items[i+d->firstItemInLine].analysis.bidiLevel );
+// qDebug(" 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]];
-// tqDebug("positioning item %d with width %d (from=%d/length=%d) at %d", d->firstItemInLine+visual[i], si.width, si.position,
+// qDebug("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
{
-// tqDebug("looking for next cursor pos for %d", oldPos );
+// qDebug("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++;
}
-// tqDebug(" -> %d", oldPos );
+// qDebug(" -> %d", oldPos );
return oldPos;
}
int QTextLayout::previousCursorPosition( int oldPos, CursorMode mode ) const
{
-// tqDebug("looking for previous cursor pos for %d", oldPos );
+// qDebug("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--;
}
-// tqDebug(" -> %d", oldPos );
+// qDebug(" -> %d", oldPos );
return oldPos;
}