summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-mobilephone/ksms/files/ksms-0.1.2.4-empty-store.patch')
-rw-r--r--app-mobilephone/ksms/files/ksms-0.1.2.4-empty-store.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/app-mobilephone/ksms/files/ksms-0.1.2.4-empty-store.patch b/app-mobilephone/ksms/files/ksms-0.1.2.4-empty-store.patch
new file mode 100644
index 000000000000..9b68e384fc80
--- /dev/null
+++ b/app-mobilephone/ksms/files/ksms-0.1.2.4-empty-store.patch
@@ -0,0 +1,40 @@
+--- ksms/messagestore.cpp.orig 2002-11-23 01:35:30.000000000 +0100
++++ ksms/messagestore.cpp 2003-08-17 21:10:36.000000000 +0200
+@@ -150,20 +150,25 @@
+ messages_.clear();
+
+ QFile xmlFile( messagesFile_ );
+- MessageStore::ReaderProgress progress( this );
+- XmlInputSourceWithProgress source( &xmlFile, &progress );
+- QXmlSimpleReader reader;
+- MessagesParser handler( this );
+- reader.setContentHandler( &handler );
+- reader.setDTDHandler( &handler );
+- source.reset();
+- reader.parse( source );
+-
+- reading_ = false;
++ if (xmlFile.exists()) {
++ MessageStore::ReaderProgress progress( this );
++ XmlInputSourceWithProgress source( &xmlFile, &progress );
++ QXmlSimpleReader reader;
++ MessagesParser handler( this );
++ reader.setContentHandler( &handler );
++ reader.setDTDHandler( &handler );
++ source.reset();
++ reader.parse( source );
++
++ reading_ = false;
+
+- emit storeChanged();
++ emit storeChanged();
+
+- modified_ = false;
++ modified_ = false;
++ } else {
++ reading_ = false;
++ modified_ = false;
++ }
+ }
+
+