[Differential] [Requested Changes To] D4541: Fix loading/unloading of GDB plugin

Milian Wolff noreply at phabricator.kde.org
Sun Feb 12 11:47:58 UTC 2017


mwolff requested changes to this revision.
mwolff added a comment.
This revision now requires changes to proceed.


  two more style nitpicks, and one suggestion. otherwise lgtm

INLINE COMMENTS

> debuggerplugin.cpp:58
>  
> -    QList<IPlugin*> plugins = KDevelop::ICore::self()->pluginController()->allPluginsForExtension("org.kdevelop.IExecutePlugin");
> -    foreach(IPlugin* plugin, plugins) {
> -        IExecutePlugin* iface = plugin->extension<IExecutePlugin>();
> -        Q_ASSERT(iface);
> -        KDevelop::LaunchConfigurationType* type = core()->runController()->launchConfigurationTypeForId( iface->nativeAppConfigTypeId() );
> -        Q_ASSERT(type);
> -        type->addLauncher( new GdbLauncher( this, iface ) );
> +    for(auto plugin : core()->pluginController()->allPluginsForExtension(QStringLiteral("org.kdevelop.IExecutePlugin"))) {
> +        setupExecutePlugin(plugin, true);

if you create a local

  auto pluginController = core()->pluginController();

you can use it here and below, somehwat reducing the line lengths

do it at your own will

> debuggerplugin.cpp:79
> +
> +    Q_ASSERT(m_launchers.isEmpty());
> +    qDeleteAll(m_launchers);

it's empty, so why qDeleteAll? it won't have any effect

> debuggerplugin.cpp:101
> +        type->addLauncher(launcher);
> +        return;
> +    }

remove

> debuggerplugin.cpp:102
> +        return;
> +    }
> +

instead for readbility wrap the code below into `else` here

REPOSITORY
  R32 KDevelop

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: antonanikin, #kdevelop, mwolff
Cc: mwolff, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170212/2cfbd19a/attachment-0001.html>


More information about the KDevelop-devel mailing list