History

fix formating issue in performance stats

ZappoMan committed 11 years ago

Commit ea33c661 parent 9aa9dac1 file · +5 −4Browse files

Showing the changes to interface/src/ui/Stats.cpp (1 of 1 file). Show all

Unified · Split

interface/src/ui/Stats.cpp+5−4
@@ -271,7 +271,7 @@ void Stats::display( · 270 unmodified lines
271271 // TODO: the display of these timing details should all be moved to JavaScript
272272 if (_expanded && Menu::getInstance()->isOptionChecked(MenuOption::DisplayTimingDetails)) {
273273 // Timing details...
274− verticalOffset += STATS_PELS_PER_LINE * 4; // skip 4 lines to be under the other columns
274+ verticalOffset += STATS_PELS_PER_LINE * 6; // skip 6 lines to be under the other columns
275275 drawText(columnOneHorizontalOffset, verticalOffset, scale, rotation, font,
276276 "-------------------------------------------------------- Function "
277277 "------------------------------------------------------- --msecs- -calls--", color);
@@ -294,13 +294,14 @@ void Stats::display( · 16 unmodified lines
294294 j.toBack();
295295 while (j.hasPrevious()) {
296296 j.previous();
297+ QChar noBreakingSpace = QChar::Nbsp;
297298 QString functionName = j.value();
298299 const PerformanceTimerRecord& record = allRecords.value(functionName);
299300
300301 QString perfLine = QString("%1: %2 [%3]").
301− arg(QString(qPrintable(functionName)), 120).
302− arg((float)record.getMovingAverage() / (float)USECS_PER_MSEC, 8, 'f', 3).
303− arg(record.getCount(), 6);
302+ arg(QString(qPrintable(functionName)), 120, noBreakingSpace).
303+ arg((float)record.getMovingAverage() / (float)USECS_PER_MSEC, 8, 'f', 3, noBreakingSpace).
304+ arg((int)record.getCount(), 6, 10, noBreakingSpace);
304305
305306 verticalOffset += STATS_PELS_PER_LINE;
306307 drawText(columnOneHorizontalOffset, verticalOffset, scale, rotation, font, perfLine.toUtf8().constData(), color);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t