D15140: Fix random order in "Analyze Current File/Project With" menus
Friedrich W. H. Kossebau
noreply at phabricator.kde.org
Mon Sep 10 12:04:40 BST 2018
kossebau added inline comments.
INLINE COMMENTS
> kossebau wrote in mainwindow_p.cpp:128
> Analyzer plugins are not required to add an action to the main menu, so if there is no plugin which added an action to the submenu, this assert will wrongly fail, no?
> So for what I understand no menu/action should be an expected condition and normally handled by skipping.
From my testing it seems that the kxmlgui item for the submenu is always created, even when there is no content added. Had not found this documented though, but perhaps we can run with the QASSERT for now.
In any case though let's use official KXmlGui API to get the submenu :)
auto fileMenu = static_cast<QMenu*>(m_mainWindow->guiFactory()->container(QStringLiteral("analyze_file"), m_mainWindow));
auto projectMenu = static_cast<QMenu*>(m_mainWindow->guiFactory()->container(QStringLiteral("analyze_project"), m_mainWindow));
REPOSITORY
R32 KDevelop
REVISION DETAIL
https://phabricator.kde.org/D15140
To: antonanikin, #kdevelop
Cc: 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/20180910/4f2a9063/attachment.html>
More information about the KDevelop-devel
mailing list