[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [plasmate/terietor/kconfigxt] editors/kconfigxt: Don't complain for parsing failure, when the file i
From: Giorgos Tsiapaliokas <terietor () gmail ! com>
Date: 2012-08-09 13:00:26
Message-ID: 20120809130026.EC80FA60D1 () git ! kde ! org
[Download RAW message or body]
Git commit 41c9f177b6e01c5204d4a2351e65abab932cce0b by Giorgos Tsiapaliokas.
Committed on 09/08/2012 at 14:59.
Pushed by tsiapaliwkas into branch 'terietor/kconfigxt'.
Don't complain for parsing failure, when the file is empty
M +7 -0 editors/kconfigxt/kconfigxtreader.cpp
http://commits.kde.org/plasmate/41c9f177b6e01c5204d4a2351e65abab932cce0b
diff --git a/editors/kconfigxt/kconfigxtreader.cpp b/editors/kconfigxt/kconfigxtreader.cpp
index c9db1d7..38bfbbd 100644
--- a/editors/kconfigxt/kconfigxtreader.cpp
+++ b/editors/kconfigxt/kconfigxtreader.cpp
@@ -160,6 +160,13 @@ bool KConfigXtReader::parse()
return false;
}
+ //It is possible to give an empty file,
+ //so retun and don't complain for failing to parse
+ //the xml
+ if (xmlFile.readAll().isEmpty()) {
+ return true;
+ }
+
QXmlStreamReader reader;
reader.setDevice(&xmlFile);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic