[frameworks/kcoreaddons] src/lib/io: kdirwatch: use certified KDE if style with {}
Harald Sitter <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 324bc7c72f6e1ba2136a05d45a82b0b49dd3515f by Harald Sitter.
Committed on 05/08/2026 at 23:09.
Pushed by sitter into branch 'master'.
kdirwatch: use certified KDE if style with {}
also don't else after return. it's pointless.
also why was half the stuff behind and else and the other not...
M +31 -17 src/lib/io/kdirwatch.cpp
https://invent.kde.org/frameworks/kcoreaddons/-/commit/324bc7c72f6e1ba2136a05d45a82b0b49dd3515f
diff --git a/src/lib/io/kdirwatch.cpp b/src/lib/io/kdirwatch.cpp
index f6e43227..113c4d35 100644
--- a/src/lib/io/kdirwatch.cpp
+++ b/src/lib/io/kdirwatch.cpp
@@ -1569,38 +1569,52 @@ void KDirWatchPrivate::unref(KDirWatch *watch)
#if HAVE_SYS_INOTIFY_H
QString KDirWatchPrivate::inotifyEventName(const inotify_event *event) const
{
- if (event->mask & IN_OPEN)
+ if (event->mask & IN_OPEN) {
return QStringLiteral("OPEN");
- else if (event->mask & IN_CLOSE_NOWRITE)
+ }
+ if (event->mask & IN_CLOSE_NOWRITE) {
return QStringLiteral("CLOSE_NOWRITE");
- else if (event->mask & IN_CLOSE_WRITE)
+ }
+ if (event->mask & IN_CLOSE_WRITE) {
return QStringLiteral("CLOSE_WRITE");
- else if (event->mask & IN_MOVED_TO)
+ }
+ if (event->mask & IN_MOVED_TO) {
return QStringLiteral("MOVED_TO");
- else if (event->mask & IN_MOVED_FROM)
+ }
+ if (event->mask & IN_MOVED_FROM) {
return QStringLiteral("MOVED_FROM");
- else if (event->mask & IN_MOVE)
+ }
+ if (event->mask & IN_MOVE) {
return QStringLiteral("MOVE");
- else if (event->mask & IN_CREATE)
+ }
+ if (event->mask & IN_CREATE) {
return QStringLiteral("CREATE");
- else if (event->mask & IN_DELETE)
+ }
+ if (event->mask & IN_DELETE) {
return QStringLiteral("DELETE");
- else if (event->mask & IN_DELETE_SELF)
+ }
+ if (event->mask & IN_DELETE_SELF) {
return QStringLiteral("DELETE_SELF");
- else if (event->mask & IN_MOVE_SELF)
+ }
+ if (event->mask & IN_MOVE_SELF) {
return QStringLiteral("MOVE_SELF");
- else if (event->mask & IN_ATTRIB)
+ }
+ if (event->mask & IN_ATTRIB) {
return QStringLiteral("ATTRIB");
- else if (event->mask & IN_MODIFY)
+ }
+ if (event->mask & IN_MODIFY) {
return QStringLiteral("MODIFY");
- if (event->mask & IN_ACCESS)
+ }
+ if (event->mask & IN_ACCESS) {
return QStringLiteral("ACCESS");
- if (event->mask & IN_IGNORED)
+ }
+ if (event->mask & IN_IGNORED) {
return QStringLiteral("IGNORED");
- if (event->mask & IN_UNMOUNT)
+ }
+ if (event->mask & IN_UNMOUNT) {
return QStringLiteral("IN_UNMOUNT");
- else
- return QStringLiteral("UNKWOWN");
+ }
+ return QStringLiteral("UNKWOWN");
}
#endif