diff options
author | Hannah von Reth <hannah.vonreth@owncloud.com> | 2021-07-02 11:21:01 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2021-07-13 11:14:00 +0300 |
commit | 3f5163a4f30cf5978ffd7ee363e0d81065eb29c0 (patch) | |
tree | 43be5adbc8934993f79df4fa931d07450dae7dfe /src/gui/protocolitem.cpp | |
parent | f1ee3e18e858cd2816dbf588e35cb7f1441f8511 (diff) |
Delay the deletion of Folder objects
This removes the need to check for the existance of the pointers
Fixes: #8690
Diffstat (limited to 'src/gui/protocolitem.cpp')
-rw-r--r-- | src/gui/protocolitem.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/protocolitem.cpp b/src/gui/protocolitem.cpp index 769236005..cc7ed5c40 100644 --- a/src/gui/protocolitem.cpp +++ b/src/gui/protocolitem.cpp @@ -13,6 +13,7 @@ */ #include "protocolitem.h" +#include "folderman.h" #include "progressdispatcher.h" #include <QApplication> @@ -20,11 +21,12 @@ #include <QMenu> #include <QPointer> + using namespace OCC; ProtocolItem::ProtocolItem(const QString &folder, const SyncFileItemPtr &item) : _path(item->destination()) - , _folderName(folder) + , _folder(FolderMan::instance()->folder(folder)) , _size(item->_size) , _status(item->_status) , _direction(item->_direction) @@ -46,9 +48,9 @@ QString ProtocolItem::path() const return _path; } -QString ProtocolItem::folderName() const +Folder *ProtocolItem::folder() const { - return _folderName; + return _folder; } QDateTime ProtocolItem::timestamp() const |