From b798b53db718d0eb0dad31a3b9bfe81d4ec76af6 Mon Sep 17 00:00:00 2001 From: Debao Zhang Date: Mon, 23 Mar 2015 23:32:23 +0800 Subject: [PATCH] Don't remove mnemonics and parentheses under non-Mac system. SHA: 8e3aacf61bcfe036acdba8fac4d07d68ff0f5ab3 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 --- src/gui/painting/qpainter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 6f00abfc5f9..973c9da96cd 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -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(')')) { @@ -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;