Review Request 124313: Port to KF5

Alex Richardson arichardson.kde at gmail.com
Sun Jul 12 23:10:29 UTC 2015



> On July 11, 2015, 12:06 a.m., Alex Richardson wrote:
> > krazy2plugin.h, line 54
> > <https://git.reviewboard.kde.org/r/124313/diff/1/?file=383961#file383961line54>
> >
> >     You also need to override `int configPages()` to return 1, then the page should show up.
> 
> Laszlo Kis-Adam wrote:
>     Great, thanks!
>     Now it instantiates the config page, however that crashes right away, because the generated configpage wants to use a KDevelop::IProject, from KDevelop::ProjectConfigOptions. Sadly the IProject is passed as NULL.
> 
> Laszlo Kis-Adam wrote:
>     Oh but I can see why.
>     return new Krazy2Preferences(this, KDevelop::ProjectConfigOptions(), parent);
> 
> Milian Wolff wrote:
>     so can you solve your issue, or do you need help? In general, whenever you hit a crash or assert, always post a backtrace as well, otherwise it's hard for us to help you.
> 
> Laszlo Kis-Adam wrote:
>     I don't know yet.
>     The problem is simple. There are 2 settings page methods, one for the per project settings pages, and another one for just a simple settings page.
>     The problem is I mixed the two. I've overriden the simple settings page method, and returned a per project settings page, that requires this ProjectConfigOptions struct to be passed.
>     So I have to figure out how to use the simple settings page.
>     Up until now I've used the Ninja builder plugin as an example to follow (for the settings page), now I either have to find another example, or I have to figure out how to use this settings page myself.
>     So like I've said, I don't know yet. We'll see.
>     
>     Also I didn't post a bt, simply because I didn't think it would help. I also explained the reason for the crash. That + the diff should have been more than enough to see what I am talking about ;)

Inherit from KDevelop::ConfigPage instead if it is a global settings page (I think it is) and then you don't need the ProjectConfigOptions.
A simple example would be kdevplatform/shell/settings/uisettings.cpp. Although you need to pass and instance of the Krazy2Plugin to the ConfigPage constructor instead of nullptr. If you pass null it will still be added to the dialog even after the plugin is unloaded -> crash.


- Alex


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


On July 10, 2015, 2:05 a.m., Laszlo Kis-Adam wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124313/
> -----------------------------------------------------------
> 
> (Updated July 10, 2015, 2:05 a.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdev-krazy2
> 
> 
> Description
> -------
> 
> Ported the plugin to KF5
> 
> 
> Diffs
> -----
> 
>   CMakeLists.txt 0d26b03 
>   analysisjob.cpp 13d47a4 
>   analysisresultsparser.cpp 41a6499 
>   checkerlistjob.cpp 3de323d 
>   issue.cpp d7525ee 
>   issuewidget.cpp cb78200 
>   kdevkrazy2.desktop f92e3ee 
>   kdevkrazy2.json PRE-CREATION 
>   krazy2dialog.h PRE-CREATION 
>   krazy2dialog.cpp PRE-CREATION 
>   krazy2plugin.h d362aff 
>   krazy2plugin.cpp 7c203d6 
>   krazy2view.h 16be779 
>   krazy2view.cpp 92b36ff 
>   krazy2view.ui c1d248c 
>   selectcheckerswidget.ui 2d4d0ec 
>   selectpathswidget.cpp 04bf270 
>   selectpathswidget.ui 252c9dd 
>   settings/CMakeLists.txt 874cb54 
>   settings/kcm_kdev_krazy2settings.desktop fe59f4a 
>   settings/krazy2config.kcfg 001f799 
>   settings/krazy2config.kcfgc c5bc909 
>   settings/krazy2preferences.h 96e80af 
>   settings/krazy2preferences.cpp b43d820 
>   tests/CMakeLists.txt 573c2c1 
>   tests/analysisjobtest.cpp bc672a0 
>   tests/analysisparameterstest.cpp 4c80683 
>   tests/analysisprogressparsertest.cpp d2cf9f6 
>   tests/analysisresultsparsertest.cpp c08ec35 
>   tests/analysisresultstest.cpp cbb0365 
>   tests/checkerlistjobtest.cpp aa46399 
>   tests/checkerlistparsertest.cpp 8fec279 
>   tests/checkermodeltest.cpp 124a5a5 
>   tests/checkertest.cpp d399af5 
>   tests/issuemodeltest.cpp cdf4de7 
>   tests/issuetest.cpp 25436a3 
>   tests/issuewidgettest.cpp a20bedf 
>   tests/krazy2viewtest.cpp beabcf9 
>   tests/selectcheckerswidgettest.cpp c27ea28 
>   tests/selectpathswidgettest.cpp 7dbbdfe 
>   tests/sortedissuesproxymodeltest.cpp 6d92b28 
> 
> Diff: https://git.reviewboard.kde.org/r/124313/diff/
> 
> 
> Testing
> -------
> 
> * It builds
> * It seems to work. See video https://www.youtube.com/watch?v=xx1aqh2lJr0
> * Doesn't seem to crash during work
> 
> 
> Thanks,
> 
> Laszlo Kis-Adam
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20150712/5abcd01b/attachment-0001.html>


More information about the KDevelop-devel mailing list