Ivailo Monev
4c861f57e4
kdecore: remove compat bits
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-11-05 00:21:56 +02:00
Ivailo Monev
ac69de425c
kdecore: create the global KDirWatch instance on demand
...
Q_GLOBAL_STATIC() no longer creates instance on demand
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-28 20:59:11 +03:00
Ivailo Monev
cc6903476e
kdecore: new KDirWatch methods to get and set the poll interval
...
requires the following commit from the Katie repo:
4795a577bff4f9db89c77195df763575a602bcc3
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-28 20:58:06 +03:00
Ivailo Monev
5409d7035e
kdecore: do not append trailing slash to the path if the path is / from KDirWatch::addDir()
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-02 09:22:39 +03:00
Ivailo Monev
e921df61cf
kdecore: implement option to recurse into sub-directories from KDirWatch::addDir()
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-21 11:47:56 +02:00
Ivailo Monev
6160da3e6a
kdecore: remove the paths from the internal KDirWatch list
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-21 11:18:24 +02:00
Ivailo Monev
03aba012a0
kdecore: KDirWatch rewrite
...
I rewrote QFileSystemWatcher some time ago for it to be able to watch
non-existing directories, did rewrite KDirWatch too to not use FAM
and inotify making the created() and deleted() signals non-operational
(with the plan to maybe implement them in QFileSystemWatcher but that
will be hack-ish for directories with stat()-based implementation)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-21 00:24:49 +02:00
Ivailo Monev
3a6ed6d1e1
kdecore: KDirWatch::addDir() optimization
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-04 11:12:13 +02:00
Ivailo Monev
567dd1a64a
kdecore: check if directory is already watched in KDirWatch::addDir()
...
fixes possible infinite recursion and high CPU usage by kded4 on FreeBSD
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-11-14 04:05:32 +02:00
Ivailo Monev
1185408637
kdecore: use cheaper KDE::stat() instead of QFile::exists() in KDirWatch::setDirty()
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-07-07 01:58:06 +03:00
Ivailo Monev
5221a763dd
kdecore: check if file exists before attempting to add it back to the watched files
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-06-20 14:22:31 +03:00
Ivailo Monev
55b5c16319
kdecore: attempt to add file back to the watch on remove events
...
fixes Plasma theme changing
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-06-14 03:29:13 +03:00
Ivailo Monev
8a3b902686
kdecore: use public KDirWatch slot to emit signal
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-03-19 10:28:57 +02:00
Ivailo Monev
3cf1801b68
kdecore: check if file is already beeing watched to avoid stat and warning
...
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2019-07-12 14:52:57 +00:00
Ivailo Monev
10c9fce9d0
generic: adjust to Katie changes
...
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2019-06-20 20:41:24 +00:00
Ivailo Monev
ff8d9980c5
kdecore: make use of QFile::absoluteFilePath() in KDirWatch
...
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2019-06-12 00:18:59 +00:00
Ivailo Monev
ea969551e1
kdecore: check if path is not dir in KDirWatch::addFile()
...
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2019-06-11 15:39:08 +00:00
Ivailo Monev
0e0a254223
kdecore: KDirWatch compatibility
...
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2019-06-10 23:29:39 +00:00
Ivailo Monev
d7cbf60356
kdecore: make KDirWatch::addDir() behave as before reimplementation
...
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2019-05-29 16:48:33 +00:00
Ivailo Monev
dc81ebbaa5
kdecore: remove unnecessary connect()/disconnect calls from KDirWatch
...
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2019-05-29 16:11:54 +00:00
Ivailo Monev
aede58befc
generic: reimplement KDirWatch
...
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2019-05-29 12:18:09 +00:00
Ivailo Monev
6cdb77afd3
generic: various cleanups
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2018-07-17 15:35:02 +00:00
Ivailo Monev
6908880a09
generic: misc cleanups
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2017-06-24 08:06:43 +00:00
Ivailo Monev
2616a89000
kdecore: fix a compiler warning
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2016-10-05 22:29:55 +00:00
Ivailo Monev
3d12c6d2e8
generic: use QFilesystemWatcher instead of inotify directly
...
this allows for less complexity and more abstraction offloaded to
Qt itself which supports dnotify, inotify, kqueue and fsevents.
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2016-04-29 15:28:27 +00:00
Ivailo Monev
69f2daf774
generic: code shrinks
2015-09-28 15:50:22 +00:00
Ivailo Monev
eeba19d4c4
generic: misc cleanups
2015-09-04 13:06:11 +00:00
Ivailo Monev
b34ddb1593
kdecore: remove unused DNotify enumerator from kdirwatch
2015-07-11 20:26:33 +03:00
Ivailo Monev
82fc15f54b
generic: use CMake moc instead of automoc4 by default
...
for compatibilty reasons automoc4 support is not removed but it
shall be in the future. automoc4 has not been maintained for a
while (last commit is from 2011) and the stable release is from
2009.
CMake version >= 2.8.6 provides the functionality for mocking so
I see no reason to not make use of it.
2015-02-27 07:40:26 +00:00
Ivailo Monev
bc935637f8
Don't exclude /dev/shm from the possible directories to watch
...
BUG: 314982
REVIEW: 121248
2015-01-03 22:45:46 +00:00
Ivailo Monev
b99fa1400b
more windows code remove
2014-11-19 15:19:19 +00:00
Ivailo Monev
c3f3bcb965
windows code remove
2014-11-19 15:17:14 +00:00
Ivailo Monev
814163a8dc
initial import
2014-11-13 01:04:59 +02:00