aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2020-01-17 10:25:27 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2020-01-17 11:18:34 +0200
commit5f708d4618d739d14442b85c466fdbac84a74cc8 (patch)
treee253289a1686f302df62d0f0865b9dcd6bfa6412 /src
parentAdd Firefox bookmarks.json format to libbookmarks (diff)
downloadsmolbote-5f708d4618d739d14442b85c466fdbac84a74cc8.tar.xz
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
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks/editbookmarkdialog.cpp4
1 files changed, 4 insertions, 0 deletions
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 <QDateTime>
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);
}