diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-10-04 12:12:46 -0300 |
---|---|---|
committer | Tomaz Canabrava <tcanabrava@kde.org> | 2013-10-04 12:12:46 -0300 |
commit | 7bd43bfaaf5fb444ea766aa90498de3f3b75aaaf (patch) | |
tree | 5d36580332b3364f9d9d2532ed8a97cfefcc6750 /qt-ui/mainwindow.cpp | |
parent | 6ae6c768f30d2d377292f0ea3ff050dfd7cb52ca (diff) | |
download | subsurface-7bd43bfaaf5fb444ea766aa90498de3f3b75aaaf.tar.gz |
Fix the first load of Subsurface - "File not found" error.
The first time the user loads subsurface, the default_filename
is not configured yet, but yet the software tries to load "",
sending an error message that this file doesn't exists.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Taiane Ramos <exhora.tat@gmail.com>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r-- | qt-ui/mainwindow.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 9a26404e2..eda19164d 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -748,6 +748,9 @@ void MainWindow::setTitle(enum MainWindowTitleFormat format) void MainWindow::importFiles(const QStringList fileNames) { + if (fileNames.isEmpty()) + return; + QByteArray fileNamePtr; char *error = NULL; for (int i = 0; i < fileNames.size(); ++i) { @@ -771,6 +774,9 @@ void MainWindow::importFiles(const QStringList fileNames) void MainWindow::loadFiles(const QStringList fileNames) { + if (fileNames.isEmpty()) + return; + char *error = NULL; QByteArray fileNamePtr; |