diff --git a/src/plugins/platforms/cocoa/qcocoamenuitem.mm b/src/plugins/platforms/cocoa/qcocoamenuitem.mm index 150e94ab07..abaffd211a 100644 --- a/src/plugins/platforms/cocoa/qcocoamenuitem.mm +++ b/src/plugins/platforms/cocoa/qcocoamenuitem.mm @@ -211,24 +211,26 @@ NSMenuItem *QCocoaMenuItem::sync() break; case TextHeuristicRole: { QString aboutString = tr("About").toLower(); - - if (m_text.startsWith(aboutString) || m_text.endsWith(aboutString)) { + if (m_text.startsWith(aboutString, Qt::CaseInsensitive) + || m_text.endsWith(aboutString, Qt::CaseInsensitive)) + { if (m_text.indexOf(QRegExp(QString::fromLatin1("qt$"), Qt::CaseInsensitive)) == -1) mergeItem = [loader aboutMenuItem]; else mergeItem = [loader aboutQtMenuItem]; m_merged = true; - } else if (m_text.startsWith(tr("Config").toLower()) - || m_text.startsWith(tr("Preference").toLower()) - || m_text.startsWith(tr("Options").toLower()) - || m_text.startsWith(tr("Setting").toLower()) - || m_text.startsWith(tr("Setup").toLower())) { + } else if (m_text.startsWith(tr("Config"), Qt::CaseInsensitive) + || m_text.startsWith(tr("Preference"), Qt::CaseInsensitive) + || m_text.startsWith(tr("Options"), Qt::CaseInsensitive) + || m_text.startsWith(tr("Setting"), Qt::CaseInsensitive) + || m_text.startsWith(tr("Setup"), Qt::CaseInsensitive)) { mergeItem = [loader preferencesMenuItem]; - } else if (m_text.startsWith(tr("Quit").toLower()) - || m_text.startsWith(tr("Exit").toLower())) { + } else if (m_text.startsWith(tr("Quit"), Qt::CaseInsensitive) + || m_text.startsWith(tr("Exit"), Qt::CaseInsensitive)) { mergeItem = [loader quitMenuItem]; } + break; }