From 35f5a0c5e13df3a0a41ef990b886a98ce2374a5c Mon Sep 17 00:00:00 2001 From: Arno Date: Mon, 3 Jun 2013 09:32:41 +0200 Subject: Remove nodes Implement remove nodes for ArchiveView. Only empty nodes without children can be removed. Everything else is too dangerous :) --- archivemodel.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'archivemodel.h') diff --git a/archivemodel.h b/archivemodel.h index 946bb3c..8055c31 100644 --- a/archivemodel.h +++ b/archivemodel.h @@ -30,6 +30,7 @@ class ArchiveModel : public SmTreeModel { ArchiveCollector *collector() { return mCollector; } virtual QVariant data(const QModelIndex &index, int role) const; virtual bool setData(const QModelIndex &idx, const QVariant &value, int role); + virtual bool removeNode(const QModelIndex &idx); QStringList indexToPath(const QModelIndex &idx) const; QModelIndexList pathToIndex(const QStringList &path) const; @@ -46,6 +47,7 @@ class ArchiveModel : public SmTreeModel { void collectorFinished(); private: + void emitDatabaseError(const QSqlError &e); QSqlDatabase mDb; QHash mAvailableOrders; ArchiveCollector *mCollector; -- cgit v1.2.3-70-g09d2