Changeset View
Changeset View
Standalone View
Standalone View
src/trash/dolphintrash.cpp
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | 33 | { | |||
---|---|---|---|---|---|
43 | connect(m_trashDirLister, static_cast<void(KDirLister::*)()>(&KDirLister::completed), this, trashDirContentChanged); | 43 | connect(m_trashDirLister, static_cast<void(KDirLister::*)()>(&KDirLister::completed), this, trashDirContentChanged); | ||
44 | connect(m_trashDirLister, &KDirLister::itemsDeleted, this, trashDirContentChanged); | 44 | connect(m_trashDirLister, &KDirLister::itemsDeleted, this, trashDirContentChanged); | ||
45 | m_trashDirLister->openUrl(QUrl(QStringLiteral("trash:/"))); | 45 | m_trashDirLister->openUrl(QUrl(QStringLiteral("trash:/"))); | ||
46 | } | 46 | } | ||
47 | 47 | | |||
48 | Trash::~Trash() | 48 | Trash::~Trash() | ||
49 | { | 49 | { | ||
50 | delete m_trashDirLister; | 50 | delete m_trashDirLister; | ||
51 | m_trashDirLister = nullptr; | ||||
51 | } | 52 | } | ||
52 | 53 | | |||
53 | Trash &Trash::instance() | 54 | Trash &Trash::instance() | ||
54 | { | 55 | { | ||
55 | static Trash result; | 56 | static Trash result; | ||
56 | return result; | 57 | return result; | ||
57 | } | 58 | } | ||
58 | 59 | | |||
Show All 15 Lines | 61 | { | |||
74 | return nullptr; | 75 | return nullptr; | ||
75 | } | 76 | } | ||
76 | 77 | | |||
77 | bool Trash::isEmpty() | 78 | bool Trash::isEmpty() | ||
78 | { | 79 | { | ||
79 | KConfig trashConfig(QStringLiteral("trashrc"), KConfig::SimpleConfig); | 80 | KConfig trashConfig(QStringLiteral("trashrc"), KConfig::SimpleConfig); | ||
80 | return (trashConfig.group("Status").readEntry("Empty", true)); | 81 | return (trashConfig.group("Status").readEntry("Empty", true)); | ||
81 | } | 82 | } | ||
82 | |