Review Request: Remove inconsistency in BackgroundParser internal state

Dmitry Risenberg dmitry.risenberg at gmail.com
Sun Mar 6 16:28:21 UTC 2011



> On March 6, 2011, 2:28 a.m., Milian Wolff wrote:
> > language/backgroundparser/backgroundparser.cpp, line 337
> > <http://git.reviewboard.kde.org/r/100807/diff/1/?file=10608#file10608line337>
> >
> >     is this required or just done to prevent that bug you linked to?
> >     
> >     I wonder because afair urls passed to the background parser are not supposed to be relative! hence the description in that bug report you linked to does not apply?
> 
> Milian Wolff wrote:
>     re-reading your bug report I'd say QMap is even better as "a/b/../c/d" and "a/c/d" is the same after all...

Non-normalized URLs can go to parser from CMakeLists.txt. For example languages/cpp/tests/CMakeLists.txt has reference to "../cpputils.cpp", which results in "<path>/languages/cpp/tests/../cpputils.cpp", while languages/cpp/CMakeLists.txt refers to it as "<path>/languages/cpp/cpputils.cpp". While they refer to the same file, they might actually have different include paths/defines.

So the QHash/QMap change is required to get the same set of URLs in m_documents and m_documentsForPriority, because QSet and QHash have the same semantics of equality, that different from QMap (at least until it is fixed).


- Dmitry


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100807/#review1795
-----------------------------------------------------------


On March 6, 2011, 1:51 a.m., Dmitry Risenberg wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/100807/
> -----------------------------------------------------------
> 
> (Updated March 6, 2011, 1:51 a.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Summary
> -------
> 
> When a document was added for parsing with multiple priorities, a default DocumentParsePlan was retrieved from m_documents when creating jobs after the first one. This led to incorrect set of features for parsing job and might trigger unnecessary reparsing when a file was reloaded.
> 
> Changed m_documents from QMap to QHash to avoid hitting https://bugs.kde.org/show_bug.cgi?id=267732.
> 
> 
> Diffs
> -----
> 
>   language/backgroundparser/backgroundparser.cpp 540a453e74d4a518e54bc9b5fa0c982d76088ea1 
> 
> Diff: http://git.reviewboard.kde.org/r/100807/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Dmitry
> 
>

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


More information about the KDevelop-devel mailing list