Review Request 120164: CMake: Make JSON import threaded

Milian Wolff mail at milianw.de
Sun Sep 14 13:10:29 UTC 2014



> On Sept. 13, 2014, 3:11 p.m., Milian Wolff wrote:
> > projectmanagers/cmake/cmakeimportjsonjob.cpp, line 75
> > <https://git.reviewboard.kde.org/r/120164/diff/1/?file=311778#file311778line75>
> >
> >     here and below: this should be cleaned up, do not copy the data into QVariant's, use the QJson API instead.
> >     
> >         QJsonDocument document = QJsonDocument::fromJson(f.readAll(), &error);
> >         if (error.error || !document.isObject()) {
> >             data.isValid = false;
> >             qCDebug(...) << "Failed to parse CMake JSON data:" << error.errorString;
> >             return data;
> >         }
> >         
> >         foreach (const QJsonValue& v, document.object()) {
> >             QJsonObject entry = v.object();
> >             data.files[Path(entry["file"].toString())] = dataFromJson(entry);
> >         }
> >     
> >     I'd appreciate if you could do a follow-up commit to clean this code up.
> 
> Kevin Funk wrote:
>     Note: This was just copied over code.
>     
>     I can have a look at it as soon as we have working unit tests for the CMake manager. I guess Aleix is going to work on that.

I've fixed this now, btw.


- Milian


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


On Sept. 12, 2014, 3:48 p.m., Kevin Funk wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120164/
> -----------------------------------------------------------
> 
> (Updated Sept. 12, 2014, 3:48 p.m.)
> 
> 
> Review request for KDevelop and Aleix Pol Gonzalez.
> 
> 
> Repository: kdevelop
> 
> 
> Description
> -------
> 
> CMake: Make JSON import threaded
> 
> Before this patch parsing the compile_commands.json file blocked the
> main thread. Make the parsing async instead.
> 
> The tests are quite broken right now (due to the refactoring), I cannot really test using them.
> 
> 
> Diffs
> -----
> 
>   projectmanagers/cmake/CMakeLists.txt 148d9f3743af1b2f9a74ee897d8eaef5809ef5d2 
>   projectmanagers/cmake/cmakeimportjsonjob.h PRE-CREATION 
>   projectmanagers/cmake/cmakeimportjsonjob.cpp PRE-CREATION 
>   projectmanagers/cmake/cmakemanager.h cc5ea0b205bebaab9e244bee80533aebe276a37d 
>   projectmanagers/cmake/cmakemanager.cpp ba8746cb0b04a98056cb77b4258fb6de921cbc8e 
>   projectmanagers/cmake/cmakeprojectdata.h fbe33122be81bb1a5e6eda7273e6ed4c397b841a 
> 
> Diff: https://git.reviewboard.kde.org/r/120164/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Kevin Funk
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140914/b022bdf9/attachment.html>


More information about the KDevelop-devel mailing list