forked from qt-creator/qt-creator
Introduce and use Utils::stripAccelerator
Change-Id: I8c37728ca5de20e2b68e6d0ac7fc120baa696040 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
510a00ea35
commit
c841dc551c
@@ -238,4 +238,12 @@ QTCREATOR_UTILS_EXPORT QString expandMacros(const QString &str, AbstractMacroExp
|
||||
return ret;
|
||||
}
|
||||
|
||||
QTCREATOR_UTILS_EXPORT QString stripAccelerator(const QString &text)
|
||||
{
|
||||
QString res = text;
|
||||
for (int index = res.indexOf('&'); index != -1; index = res.indexOf('&', index + 1))
|
||||
res.remove(index, 1);
|
||||
return res;
|
||||
}
|
||||
|
||||
} // namespace Utils
|
||||
|
||||
Reference in New Issue
Block a user