Don't remove mnemonics and parentheses under non-Mac system.

SHA: 8e3aacf61b 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 <Friedemann.Kleint@theqtcompany.com>
This commit is contained in:
Debao Zhang 2015-03-23 23:32:23 +08:00
parent 28295915bc
commit b798b53db7

View File

@ -7462,6 +7462,7 @@ start_lengthVariant:
range.format.setFontUnderline(true); range.format.setFontUnderline(true);
underlineFormats.append(range); underlineFormats.append(range);
} }
#ifdef Q_OS_MAC
} else if (hidemnmemonic && *cin == QLatin1Char('(') && l >= 4 && } else if (hidemnmemonic && *cin == QLatin1Char('(') && l >= 4 &&
cin[1] == QLatin1Char('&') && cin[2] != QLatin1Char('&') && cin[1] == QLatin1Char('&') && cin[2] != QLatin1Char('&') &&
cin[3] == QLatin1Char(')')) { cin[3] == QLatin1Char(')')) {
@ -7473,6 +7474,7 @@ start_lengthVariant:
length -= n + 4; length -= n + 4;
l -= 4; l -= 4;
continue; continue;
#endif //Q_OS_MAC
} }
*cout = *cin; *cout = *cin;
++cout; ++cout;