From 241f6e04dc9b5cbfc7503a544b16d7b5452f1acb Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Tue, 28 Jan 2020 18:55:02 +0200 Subject: Remove non-const BookmarkItem::icon Default BookmarkItem icons will be created when creating the item, if a QApplication (and subsequently, qApp->style()) is present. - added a poi-bookmarks test --- src/bookmarks/builtins.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/bookmarks') diff --git a/src/bookmarks/builtins.cpp b/src/bookmarks/builtins.cpp index 2e97e1a..f7b6f3f 100644 --- a/src/bookmarks/builtins.cpp +++ b/src/bookmarks/builtins.cpp @@ -54,8 +54,10 @@ int builtins::bookmarks(const std::string &progname, std::vector::c if(f.open(QIODevice::ReadOnly | QIODevice::Text)) { BookmarkFormat(&f) >> model; f.close(); - } else + } else { spdlog::error("Could not open %s", i); + return -1; + } } for(const auto &i : args::get(import_json)) { @@ -63,8 +65,10 @@ int builtins::bookmarks(const std::string &progname, std::vector::c if(f.open(QIODevice::ReadOnly | QIODevice::Text)) { BookmarkFormat(&f) >> model; f.close(); - } else + } else { spdlog::error("Could not open %s", i); + return -1; + } } QIODevice *output = nullptr; @@ -85,8 +89,10 @@ int builtins::bookmarks(const std::string &progname, std::vector::c } if(!output->isOpen()) { - if(!output->open(QIODevice::ReadWrite | QIODevice::Text)) + if(!output->open(QIODevice::ReadWrite | QIODevice::Text)) { spdlog::error("Could not open output"); + return -1; + } } BookmarkFormat format(output); -- cgit v1.2.1