From 5f708d4618d739d14442b85c466fdbac84a74cc8 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Fri, 17 Jan 2020 10:25:27 +0200 Subject: BookmarkItem::DateAdded and LastModified fields - add read support in FFJson for DateAdded and LastModified fields - add read/write support in Xbel for DateAdded and LastModified fields - BookmarkModel: set DateAdded on appendBookmark and appendFolder - EditBookmarkDialog: set LastModified field when saving changes --- src/bookmarks/editbookmarkdialog.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/bookmarks') diff --git a/src/bookmarks/editbookmarkdialog.cpp b/src/bookmarks/editbookmarkdialog.cpp index 7df90b8..4461840 100644 --- a/src/bookmarks/editbookmarkdialog.cpp +++ b/src/bookmarks/editbookmarkdialog.cpp @@ -10,6 +10,7 @@ #include "bookmarkitem.h" #include "bookmarkmodel.h" #include "ui_editbookmarkdialog.h" +#include EditBookmarkDialog::EditBookmarkDialog(BookmarkModel *model, const QModelIndex &index, QWidget *parent) : QDialog(parent) @@ -67,4 +68,7 @@ void EditBookmarkDialog::saveChanges() if(descriptionChanged) { m_model->setData(m_index, ui->description->toPlainText(), BookmarkItem::Description, Qt::DisplayRole); } + + if(titleChanged || hrefChanged || tagsChanged || descriptionChanged) + m_model->setData(m_index, QDateTime::currentDateTime(), BookmarkItem::LastModified, Qt::DisplayRole); } -- cgit v1.2.1