Changeset View
Changeset View
Standalone View
Standalone View
src/ioslaves/trash/trashimpl.cpp
Show All 29 Lines | |||||
30 | #include <qdebug.h> | 30 | #include <qdebug.h> | ||
31 | #include <QUrl> | 31 | #include <QUrl> | ||
32 | #include <kdirnotify.h> | 32 | #include <kdirnotify.h> | ||
33 | #include <KSharedConfig> | 33 | #include <KSharedConfig> | ||
34 | #include <kfileitem.h> | 34 | #include <kfileitem.h> | ||
35 | #include <kconfiggroup.h> | 35 | #include <kconfiggroup.h> | ||
36 | #include <kmountpoint.h> | 36 | #include <kmountpoint.h> | ||
37 | #include <kfileutils.h> | 37 | #include <kfileutils.h> | ||
38 | #include <kdirnotify.h> | ||||
38 | 39 | | |||
39 | #include <QCoreApplication> | 40 | #include <QCoreApplication> | ||
40 | #include <QEventLoop> | 41 | #include <QEventLoop> | ||
41 | #include <QFile> | 42 | #include <QFile> | ||
42 | #include <QDir> | 43 | #include <QDir> | ||
43 | #include <kjobuidelegate.h> | 44 | #include <kjobuidelegate.h> | ||
44 | 45 | | |||
45 | #include <sys/stat.h> | 46 | #include <sys/stat.h> | ||
▲ Show 20 Lines • Show All 859 Lines • ▼ Show 20 Line(s) | |||||
905 | 906 | | |||
906 | void TrashImpl::fileRemoved() | 907 | void TrashImpl::fileRemoved() | ||
907 | { | 908 | { | ||
908 | if (isEmpty()) { | 909 | if (isEmpty()) { | ||
909 | deleteEmptyTrashInfrastructure(); | 910 | deleteEmptyTrashInfrastructure(); | ||
910 | KConfigGroup group = m_config.group("Status"); | 911 | KConfigGroup group = m_config.group("Status"); | ||
911 | group.writeEntry("Empty", true); | 912 | group.writeEntry("Empty", true); | ||
912 | m_config.sync(); | 913 | m_config.sync(); | ||
914 | org::kde::KDirNotify::emitFilesChanged({QUrl::fromEncoded("trash:/")}); | ||||
913 | } | 915 | } | ||
914 | // The apps showing the trash (e.g. kdesktop) will be notified | 916 | // The apps showing the trash (e.g. kdesktop) will be notified | ||
915 | // of this change when KDirNotify::FilesRemoved(...) is emitted, | 917 | // of this change when KDirNotify::FilesRemoved(...) is emitted, | ||
916 | // which will be done by the job soon after this. | 918 | // which will be done by the job soon after this. | ||
917 | } | 919 | } | ||
918 | 920 | | |||
919 | #ifdef Q_OS_OSX | 921 | #ifdef Q_OS_OSX | ||
920 | #include <CoreFoundation/CoreFoundation.h> | 922 | #include <CoreFoundation/CoreFoundation.h> | ||
▲ Show 20 Lines • Show All 499 Lines • Show Last 20 Lines |