Review Request 116019: Fix Bug 330605 - Dropbox plugin prevents git plugin from working

Frank Reininghaus frank78ac at googlemail.com
Mon Feb 24 20:04:22 GMT 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/116019/#review50755
-----------------------------------------------------------


Thanks for working on this! The approach looks good.

I'm just wondering if we really need the QMultiMap - actually, we only need to remember the plugin with the best score, right?

Maybe we could replace the QMultiMap definition by

KVersionControlPlugin* bestPlugin = 0;
int bestScore = INT_MAX;

and then instead of "pluginScoring.insert(upUrlCounter, plugin);",

if (upUrlCounter < bestScore) {
    bestPlugin = plugin;
    bestScore = upUrlCounter;
}

Behind the foreach loop, one could just "return bestPlugin" then.

- Frank Reininghaus


On Feb. 24, 2014, 2:06 p.m., Emmanuel Pescosta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/116019/
> -----------------------------------------------------------
> 
> (Updated Feb. 24, 2014, 2:06 p.m.)
> 
> 
> Review request for Dolphin.
> 
> 
> Bugs: 330605
>     http://bugs.kde.org/show_bug.cgi?id=330605
> 
> 
> Repository: kde-baseapps
> 
> 
> Description
> -------
> 
> Fix Bug 330605 - Dropbox plugin prevents git plugin from working
> 
> Use scoring to find the best matching plugin for the given directory.
> 
> Instead of just returning the first matching plugin (upUrl case),
> add it to the map and find the best matching plugin afterwards.
> 
> 
> Diffs
> -----
> 
>   dolphin/src/views/versioncontrol/versioncontrolobserver.cpp 36345d9 
> 
> Diff: https://git.reviewboard.kde.org/r/116019/diff/
> 
> 
> Testing
> -------
> 
> I can't reproduce the bug, so I can't test if it really works.
> 
> 
> Thanks,
> 
> Emmanuel Pescosta
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20140224/d78f7313/attachment.htm>


More information about the kfm-devel mailing list