Review Request 120164: CMake: Make JSON import threaded
Milian Wolff
mail at milianw.de
Sat Sep 13 15:11:39 UTC 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120164/#review66408
-----------------------------------------------------------
I know this was submitted already, but see below. I'd appreciate if the code could be cleaned up.
projectmanagers/cmake/cmakeimportjsonjob.cpp
<https://git.reviewboard.kde.org/r/120164/#comment46317>
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.
- Milian Wolff
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/20140913/6154f6ee/attachment-0001.html>
More information about the KDevelop-devel
mailing list