[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [calligra] kexi/core: Kexi: Show proper error message when project file does not exist
From: Jaroslaw Staniek <staniek () kde ! org>
Date: 2015-11-01 23:23:56
Message-ID: E1Zt1ye-00057n-Qa () scm ! kde ! org
[Download RAW message or body]
Git commit 95342b2d94d6acb93fd29b5a59e2e8187a77f2bd by Jaroslaw Staniek.
Committed on 01/11/2015 at 23:20.
Pushed by staniek into branch 'master'.
Kexi: Show proper error message when project file does not exist
M +7 -0 kexi/core/kexiproject.cpp
http://commits.kde.org/calligra/95342b2d94d6acb93fd29b5a59e2e8187a77f2bd
diff --git a/kexi/core/kexiproject.cpp b/kexi/core/kexiproject.cpp
index 66838b3..7c18982 100644
--- a/kexi/core/kexiproject.cpp
+++ b/kexi/core/kexiproject.cpp
@@ -300,6 +300,13 @@ KexiProject::openInternal(bool *incompatibleWithKexi)
=
if (!d->data->connectionData()->databaseName().isEmpty()) {
QFileInfo finfo(d->data->connectionData()->databaseName());
+ if (!finfo.exists()) {
+ KMessageBox::sorry(0, xi18nc("@info", "Could not open project =
file. "
+ "The file <filename>%1</filename>=
does not exist.",
+ QDir::toNativeSeparators(finfo.ab=
soluteFilePath())),
+ xi18nc("@title:window", "Could No=
t Open File"));
+ return cancelled;
+ }
if (!d->data->isReadOnly() && !finfo.isWritable()) {
if (KexiProject::askForOpeningNonWritableFileAsReadOnly(0, fin=
fo)) {
d->data->setReadOnly(true);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic