aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2020-01-28 18:55:02 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2020-01-28 18:55:02 +0200
commit241f6e04dc9b5cbfc7503a544b16d7b5452f1acb (patch)
treeea87c413506aff0794250bb861b1005db5a8c2a6 /src
parentAdd bookmarks toolbar (diff)
downloadsmolbote-241f6e04dc9b5cbfc7503a544b16d7b5452f1acb.tar.xz
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
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks/builtins.cpp12
1 files changed, 9 insertions, 3 deletions
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<std::string>::c
if(f.open(QIODevice::ReadOnly | QIODevice::Text)) {
BookmarkFormat<XbelFormat>(&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<std::string>::c
if(f.open(QIODevice::ReadOnly | QIODevice::Text)) {
BookmarkFormat<FirefoxJsonFormat>(&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<std::string>::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<XbelFormat> format(output);