52North / IlwisCore

Integrated Land and Water Information System (ILWIS) is a remote sensing and GIS software. ILWIS Core is the functional center of ilwis4..
http://52north.org/communities/ilwis/
34 stars 13 forks source link

FeatureParser does not parse big XML documents completly #56

Closed ridoo closed 10 years ago

ridoo commented 10 years ago

Note: This issue has been moved from IlwisConnectors as the associated files (xmlstreamparser) has been moved to the core.

The current approach parsing from XML uses the QIODevice to abstract from where the data comes from physically (file, remote, etc.).

However, when parsing bigger documents from a remote QT emits several signals (e.g. readyRead()) to indicate when new data arrives. A reader would have to add that new data then so the XML can be processed further.

Proposed Solution: Introduce an event loop which waits when QXmlStreamReader::PrematureEndOfDocumentError occurs and resumes data parsing once new data becomes available. Handle it via QT signals and slots seems to be the most elegant solution.