1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

QzCommon: Move bookmarksVersion to Bookmarks

This commit is contained in:
David Rosca 2018-02-16 14:32:06 +01:00
parent cf7d077e3a
commit 0706cd1997
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
3 changed files with 3 additions and 5 deletions

View File

@ -21,7 +21,6 @@
namespace Qz
{
const int sessionVersion = 0x0004;
const int bookmarksVersion = 1;
FALKON_EXPORT const char *APPNAME = "Falkon";
FALKON_EXPORT const char *VERSION = FALKON_VERSION;

View File

@ -52,9 +52,6 @@ namespace Qz
// Version of session.dat file
extern const int sessionVersion;
// Version of bookmarks.json file
extern const int bookmarksVersion;
FALKON_EXPORT extern const char *APPNAME;
FALKON_EXPORT extern const char *VERSION;
FALKON_EXPORT extern const char *AUTHOR;

View File

@ -27,6 +27,8 @@
#include <QSaveFile>
#include <QJsonDocument>
static const int bookmarksVersion = 1;
Bookmarks::Bookmarks(QObject* parent)
: QObject(parent)
, m_autoSaver(0)
@ -282,7 +284,7 @@ void Bookmarks::saveBookmarks()
#undef WRITE_FOLDER
QVariantMap map;
map.insert("version", Qz::bookmarksVersion);
map.insert("version", bookmarksVersion);
map.insert("roots", bookmarksMap);
const QJsonDocument json = QJsonDocument::fromVariant(map);