summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-10-09 14:00:33 (GMT)
committerDennis Nienhüser <nienhueser@kde.org>2016-10-20 17:00:28 (GMT)
commitc5ce456b24d2d6d825d897a383b0b40470dd3909 (patch)
tree98d09a4aab0b5eb6e88e459d75de5b17533cfb89
parent0646a5e26e2137944a51632639588ccd0298eeb8 (diff)
Return nullptr when file cannot be opened/parsed, not old state.
When using one ParsingRunnerManager instance to load several files, subsequent calls must either return the just opened file or a nullptr to indicate failure. (cherry picked from commit 7fa2035e4e0a94de45e1ed4521fe20c4a5590895)
-rw-r--r--src/lib/marble/ParsingRunnerManager.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/marble/ParsingRunnerManager.cpp b/src/lib/marble/ParsingRunnerManager.cpp
index 1ecc005..5878d90 100644
--- a/src/lib/marble/ParsingRunnerManager.cpp
+++ b/src/lib/marble/ParsingRunnerManager.cpp
@@ -108,7 +108,9 @@ void ParsingRunnerManager::parseFile( const QString &fileName, DocumentRole role
}
}
-GeoDataDocument *ParsingRunnerManager::openFile( const QString &fileName, DocumentRole role, int timeout ) {
+GeoDataDocument *ParsingRunnerManager::openFile( const QString &fileName, DocumentRole role, int timeout )
+{
+ d->m_fileResult = nullptr;
QEventLoop localEventLoop;
QTimer watchdog;
watchdog.setSingleShot(true);