diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-01-14 23:34:13 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-01-14 23:34:13 +0200 |
commit | 4c71c8571ceb10b29e6550cd0d8eb928049e6851 (patch) | |
tree | 2130c586e6be37185ca382e68ff645710d6c5e63 /lib/bookmarks/formats | |
parent | Fix if statements in PKGBUILD (diff) | |
download | smolbote-4c71c8571ceb10b29e6550cd0d8eb928049e6851.tar.xz |
Move/rename files for readability
- add BookmarkFormat <<|>> BookmarkModel operators
Diffstat (limited to 'lib/bookmarks/formats')
-rw-r--r-- | lib/bookmarks/formats/format.cpp | 26 | ||||
-rw-r--r-- | lib/bookmarks/formats/format.h | 36 | ||||
-rw-r--r-- | lib/bookmarks/formats/xbel.cpp | 2 |
3 files changed, 1 insertions, 63 deletions
diff --git a/lib/bookmarks/formats/format.cpp b/lib/bookmarks/formats/format.cpp deleted file mode 100644 index 551151c..0000000 --- a/lib/bookmarks/formats/format.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/* - * This file is part of smolbote. It's copyrighted by the contributors recorded - * in the version control history of the file, available from its original - * location: https://neueland.iserlohn-fortress.net/gitea/aqua/smolbote - * - * SPDX-License-Identifier: GPL-3.0 - */ - -#include "format.h" -#include "xbel.h" -#include <QIODevice> - -template<> -void BookmarksFormat<BookmarksFormats::XbelFormat>::read(BookmarkItem *root) -{ - Q_CHECK_PTR(m_device); - Xbel::read(m_device, root); -} - -template<> -void BookmarksFormat<BookmarksFormats::XbelFormat>::write(BookmarkItem *root) -{ - Q_CHECK_PTR(m_device); - Xbel::write(m_device, root); -} - diff --git a/lib/bookmarks/formats/format.h b/lib/bookmarks/formats/format.h deleted file mode 100644 index e96dfcc..0000000 --- a/lib/bookmarks/formats/format.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This file is part of smolbote. It's copyrighted by the contributors recorded - * in the version control history of the file, available from its original - * location: https://neueland.iserlohn-fortress.net/gitea/aqua/smolbote - * - * SPDX-License-Identifier: GPL-3.0 - */ - -#ifndef BOOKMARKSFORMAT_H -#define BOOKMARKSFORMAT_H - -class QIODevice; -class BookmarkItem; - -enum BookmarksFormats { - XbelFormat -}; - -template<BookmarksFormats format> -class BookmarksFormat -{ -public: - explicit BookmarksFormat(QIODevice *device) - { - m_device = device; - } - - void read(BookmarkItem *root); - void write(BookmarkItem *root); - -protected: - QIODevice *m_device; -}; - -#endif // BOOKMARKSFORMAT_H - diff --git a/lib/bookmarks/formats/xbel.cpp b/lib/bookmarks/formats/xbel.cpp index 1cb5756..174995d 100644 --- a/lib/bookmarks/formats/xbel.cpp +++ b/lib/bookmarks/formats/xbel.cpp @@ -7,7 +7,7 @@ */ #include "xbel.h" -#include "model/bookmarkitem.h" +#include "bookmarkitem.h" #include <QXmlStreamReader> #include <QXmlStreamWriter> |