summaryrefslogtreecommitdiff
path: root/qt4
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2008-10-04 19:39:24 +0200
committerAlbert Astals Cid <aacid@kde.org>2008-10-04 19:39:24 +0200
commit108959432af7714cb8ffe42d98d40c97f936a2e6 (patch)
tree73fa43ba1a6da6c0f6eec55b7637bd4c5eaa7423 /qt4
parent4c6cb1c204d782e2ac2113b57f6d372b4716017d (diff)
Correctly return wheter it was saved or not
Diffstat (limited to 'qt4')
-rw-r--r--qt4/src/poppler-pdf-converter.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/qt4/src/poppler-pdf-converter.cc b/qt4/src/poppler-pdf-converter.cc
index 6e1868b7..7f904165 100644
--- a/qt4/src/poppler-pdf-converter.cc
+++ b/qt4/src/poppler-pdf-converter.cc
@@ -1,5 +1,6 @@
/* poppler-pdf-converter.cc: qt4 interface to poppler
* Copyright (C) 2008, Pino Toscano <pino@kde.org>
+ * Copyright (C) 2008, Albert Astals Cid <aacid@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -72,18 +73,19 @@ bool PDFConverter::convert()
if (!dev)
return false;
+ bool success;
QIODeviceOutStream stream(dev);
if (d->opts & WithChanges)
{
- d->document->doc->saveAs(&stream);
+ success = d->document->doc->saveAs(&stream);
}
else
{
- d->document->doc->saveWithoutChangesAs(&stream);
+ success = d->document->doc->saveWithoutChangesAs(&stream);
}
d->closeDevice();
- return true;
+ return success;
}
}