From e6a5b186751b518d7be04d75c14d60775fd9fbc1 Mon Sep 17 00:00:00 2001 From: nowrep Date: Sat, 11 Aug 2012 17:45:56 +0200 Subject: [PATCH] Don't proceed to fetching icons if exported bookmarks list is empty --- src/lib/bookmarksimport/bookmarksimportdialog.cpp | 11 ++++++----- src/lib/preferences/preferences.ui | 6 +++++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/lib/bookmarksimport/bookmarksimportdialog.cpp b/src/lib/bookmarksimport/bookmarksimportdialog.cpp index fdae48daa..598c317af 100644 --- a/src/lib/bookmarksimport/bookmarksimportdialog.cpp +++ b/src/lib/bookmarksimport/bookmarksimportdialog.cpp @@ -192,7 +192,6 @@ bool BookmarksImportDialog::exportedOK() QMessageBox::critical(this, tr("Error!"), firefox.errorString()); return false; } - return true; } else if (m_browser == Chrome) { ChromeImporter chrome(this); @@ -205,7 +204,6 @@ bool BookmarksImportDialog::exportedOK() QMessageBox::critical(this, tr("Error!"), chrome.errorString()); return false; } - return true; } else if (m_browser == Opera) { OperaImporter opera(this); @@ -218,7 +216,6 @@ bool BookmarksImportDialog::exportedOK() QMessageBox::critical(this, tr("Error!"), opera.errorString()); return false; } - return true; } else if (m_browser == Html) { HtmlImporter html(this); @@ -231,10 +228,14 @@ bool BookmarksImportDialog::exportedOK() QMessageBox::critical(this, tr("Error!"), html.errorString()); return false; } - return true; } - return false; + if (m_exportedBookmarks.isEmpty()) { + QMessageBox::critical(this, tr("Error!"), tr("The file doesn't contain any bookmark.")); + return false; + } + + return true; } void BookmarksImportDialog::setFile() diff --git a/src/lib/preferences/preferences.ui b/src/lib/preferences/preferences.ui index 92b7e5042..cb7240766 100644 --- a/src/lib/preferences/preferences.ui +++ b/src/lib/preferences/preferences.ui @@ -1738,7 +1738,11 @@ - + + + Leave blank if unsure + +