D15140: Fix random order in "Analyze Current File/Project With" menus

Pino Toscano noreply at phabricator.kde.org
Mon Sep 17 07:01:26 BST 2018


pino added inline comments.

INLINE COMMENTS

> mainwindow_p.cpp:96-97
> +    std::sort(actions.begin(), actions.end(), [](const QAction* left, const QAction* right) {
> +        const auto leftPlainText = left->text().remove(QLatin1Char('&'));
> +        const auto rightPlainText = right->text().remove(QLatin1Char('&'));
> +

please use `KLocalizedString::removeAcceleratorMarker()` instead of removing `&` (see its API doc to understand why it is important)

> mainwindow_p.cpp:127
> +    const auto info = Core::self()->pluginController()->pluginInfo(plugin);
> +    if (info.category() == QStringLiteral("Analyzers")) {
> +        auto fileMenu = static_cast<QMenu*>(

this sounds better as `QLatin1String`, since a real QString is not needed

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D15140

To: antonanikin, #kdevelop
Cc: pino, kossebau, kdevelop-devel, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180917/611e2643/attachment.html>


More information about the KDevelop-devel mailing list