[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdegraphics/gwenview
From: Matthias Fuchs <mat69 () gmx ! net>
Date: 2011-01-27 17:00:01
Message-ID: 20110127170001.5CDFDAC8BA () svn ! kde ! org
[Download RAW message or body]
SVN commit 1217503 by mfuchs:
Show error message if imlementation is not supported.
CCBUG:263164
M +7 -0 app/gvcore.cpp
M +2 -0 lib/document/document.cpp
--- trunk/KDE/kdegraphics/gwenview/app/gvcore.cpp #1217502:1217503
@@ -217,8 +217,15 @@
// Start save
Document::Ptr doc = DocumentFactory::instance()->load(url);
KJob* job = doc->save(saveAsUrl, format.data());
+ if (!job) {
+ const QString name = saveAsUrl.fileName().isEmpty() ? saveAsUrl.pathOrUrl() : saveAsUrl.fileName();
+ const QString msg = i18nc("@info", "<b>Saving <filename>%1</filename> failed:</b><br>%2",
+ name, doc->errorString());
+ KMessageBox::sorry(QApplication::activeWindow(), msg);
+ } else {
connect(job, SIGNAL(result(KJob*)), SLOT(slotSaveResult(KJob*)));
}
+}
static void applyTransform(const KUrl& url, Orientation orientation) {
--- trunk/KDE/kdegraphics/gwenview/lib/document/document.cpp #1217502:1217503
@@ -28,6 +28,7 @@
// KDE
#include <kdebug.h>
#include <kfileitem.h>
+#include <klocale.h>
#include <kurl.h>
// Local
@@ -226,6 +227,7 @@
DocumentJob* job = d->mImpl->save(url, format);
if (!job) {
kWarning() << "Implementation does not support saving!";
+ setErrorString(i18nc("@info", "Gwenview cannot save this kind of documents."));
return false;
}
job->setProperty("oldUrl", d->mUrl);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic