[Qt-creator] Analyzer refactoring patches

Nicolas Arnaud-Cormos nicolas.arnaud-cormos at kdab.com
Wed Dec 28 11:29:01 CET 2011


Hi all,

I've got 3 patches for the Analyzer plugin, and would like to explain the 
motivation behind them here (not the best time to do that on IRC):
http://codereview.qt-project.org/#change,11786
http://codereview.qt-project.org/#change,11813
http://codereview.qt-project.org/#change,11814

We have a new tool plugin at KDAB for GammaRay, and I found some issue with 
the actual code:
 * the project settings were duplicated with 2 tools (will be tripled with 3 
tools)
 * the per-project settings were not really readable with multiple tools 
(everything in one details widget)
 * no way to have only global settings for a tool
 * global and project settings need the creation of a factory method, and 
passing a pointer to them to the analyzer global settings (it's working, but I 
don't really like it)

The first patch is really straight-forward, just some API cleanup

The second patch addresses the first 2 points. All new tools needed a new 
factory, which in turn created a new analyzer block in the project run tab 
(with all tool config widgets for each block).
I also found that the runcontrolfactory was mostly the same between the tools, 
so instead of creating one runcontrolfactory per tool I've created one 
runcontrolfactory for the analyzer plugin, and the tools use it.

The last patch addresses the last 2 points. I've removed the factory method 
needs, and created 2 new virtual methods in the IAnalyzerTool, to create the 
global and project settings. I've also test if any of those methods return 0, 
so it's now possible to have global settings without per-project settings.

Thanks,
Nicolas

PS: you can ping me (nikikko) on IRC

-- 
Nicolas Arnaud-Cormos | nicolas.arnaud-cormos at kdab.com | Senior Software 
Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions



More information about the Qt-creator mailing list