Changeset View
Changeset View
Standalone View
Standalone View
src/trash/dolphintrash.cpp
Show All 35 Lines | 33 | { | |||
---|---|---|---|---|---|
36 | // watches for changes if the number of items has been changed. | 36 | // watches for changes if the number of items has been changed. | ||
37 | m_trashDirLister->setAutoErrorHandlingEnabled(false, nullptr); | 37 | m_trashDirLister->setAutoErrorHandlingEnabled(false, nullptr); | ||
38 | m_trashDirLister->setDelayedMimeTypes(true); | 38 | m_trashDirLister->setDelayedMimeTypes(true); | ||
39 | auto trashDirContentChanged = [this]() { | 39 | auto trashDirContentChanged = [this]() { | ||
40 | bool isTrashEmpty = m_trashDirLister->items().isEmpty(); | 40 | bool isTrashEmpty = m_trashDirLister->items().isEmpty(); | ||
41 | emit emptinessChanged(isTrashEmpty); | 41 | emit emptinessChanged(isTrashEmpty); | ||
42 | }; | 42 | }; | ||
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); | ||||
elvisangelaccio: Please add `this` as receiver argument (I already fixed the connect() above, forgot to mention… | |||||
44 | m_trashDirLister->openUrl(QStringLiteral("trash:/")); | 45 | m_trashDirLister->openUrl(QStringLiteral("trash:/")); | ||
45 | } | 46 | } | ||
46 | 47 | | |||
47 | Trash::~Trash() | 48 | Trash::~Trash() | ||
48 | { | 49 | { | ||
49 | delete m_trashDirLister; | 50 | delete m_trashDirLister; | ||
50 | } | 51 | } | ||
51 | 52 | | |||
Show All 30 Lines |
Please add this as receiver argument (I already fixed the connect() above, forgot to mention it in the previous review).