Skip to content

Commit

Permalink
Don't remove mnemonics and parentheses under non-Mac system.
Browse files Browse the repository at this point in the history
SHA: 8e3aacf is a mac only patch, but
some code introduced by which is not wrapped with Q_OS_MAC. So add
the missing Q_OS_MAC here.

Change-Id: I748d46b977740e6116dab5659ad1e47d23262a0f
Reviewed-by: Friedemann Kleint <[email protected]>
  • Loading branch information
dbzhang800 committed Mar 26, 2015
1 parent 2829591 commit b798b53
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gui/painting/qpainter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7462,6 +7462,7 @@ void qt_format_text(const QFont &fnt, const QRectF &_r,
range.format.setFontUnderline(true);
underlineFormats.append(range);
}
#ifdef Q_OS_MAC
} else if (hidemnmemonic && *cin == QLatin1Char('(') && l >= 4 &&
cin[1] == QLatin1Char('&') && cin[2] != QLatin1Char('&') &&
cin[3] == QLatin1Char(')')) {
Expand All @@ -7473,6 +7474,7 @@ void qt_format_text(const QFont &fnt, const QRectF &_r,
length -= n + 4;
l -= 4;
continue;
#endif //Q_OS_MAC
}
*cout = *cin;
++cout;
Expand Down

0 comments on commit b798b53

Please sign in to comment.