Ivailo Monev
fbd7a02bd8
kdecore: do not add resources directories from .krcdirs file in the current directory
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-24 09:00:00 +03:00
Ivailo Monev
7d5ec84ab1
generic: compiler warnings fixes
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-23 17:19:33 +03:00
Ivailo Monev
29a8459798
generic: remove checks for system headers that should be present
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-23 15:42:09 +03:00
Ivailo Monev
7e8604a548
kdecore: '\b' is not valid path separator
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-23 12:59:38 +03:00
Ivailo Monev
c9a0aaf40b
generic: remove checks for limits and unistd system headers
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-23 07:37:22 +03:00
Ivailo Monev
096b62f757
generic: minor optimizations
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-20 13:41:05 +03:00
Ivailo Monev
67c09731b4
kdecore: do not deep-copy QString objects while iterating in KStandardDirs
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-06-05 15:22:02 +03:00
Ivailo Monev
b9186c0327
kdecore: drop standard directories KIOSK support
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-06-05 14:46:22 +03:00
Ivailo Monev
5275fdc8a4
kdecore: create the last directory of the special resource if it does not exist
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-26 14:16:35 +03:00
Ivailo Monev
3ab0e01817
kdecore: keep references to QByteArray objects in KStandardDirs
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-26 14:08:02 +03:00
Ivailo Monev
41db76b92c
kdecore: drop socket resource type and use QStandardPaths:writableLocation() for base resource directories
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-25 10:45:51 +03:00
Ivailo Monev
4f16fe642d
generic: simplify special resources directories creation
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-25 04:23:40 +03:00
Ivailo Monev
08eb4a8558
generic: drop support for emoticons
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-08 00:41:39 +02:00
Ivailo Monev
dd07d6844b
kdecore: remove perror() debug stream function [ci reset]
...
TODO: use qt_error_string() instead of strerror() for thread-safety
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-08-08 21:55:18 +03:00
Ivailo Monev
ebf69fb68e
generic: replace recursive QMutex-es with std::recursive_mutex-es [ci reset]
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-07-22 01:36:07 +03:00
Ivailo Monev
bb86fb96fe
kdecore: KStandardDirs::findExe() optimization
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-06-08 05:38:21 +03:00
Ivailo Monev
90ac09db86
generic: remove obsolete resource types support
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-02-28 15:01:11 +02:00
Ivailo Monev
502fefe674
kdecore: look for root executables in build prefix directory
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-02-23 05:40:24 +02:00
Ivailo Monev
1afeeb7503
generic: introduce KStandardDirs::findRootExe() and use it
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-02-16 22:09:23 +02:00
Ivailo Monev
2cd9559a3e
generic: Hurd build fixes
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-02-01 05:08:38 +02:00
Ivailo Monev
8505ede242
kdecore: avoid QString copy in KStandardDirs::findResource()
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-01-20 14:32:42 +02:00
Ivailo Monev
26644cda72
generic: remove unused definitions from config-prefix header
...
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-18 21:06:45 +00:00
Ivailo Monev
478ca250a2
generic: replace installation paths with KDE4_ prefixed
...
this is TODO from issue #9 . CPack and CTest configs will not be
supported. most of the changes done to other repisitories is automated
via:
find -type f -exec sed -i -e 's|${INSTALL_DIR}|${KDE4_INSTALL_DIR}|g' \
-e 's|${EXEC_INSTALL_PREFIX}|${KDE4_EXEC_INSTALL_PREFIX}|g' \
-e 's|${SHARE_INSTALL_PREFIX}|${KDE4_SHARE_INSTALL_PREFIX}|g' \
-e 's|${BIN_INSTALL_DIR}|${KDE4_BIN_INSTALL_DIR}|g' \
-e 's|${SBIN_INSTALL_DIR}|${KDE4_SBIN_INSTALL_DIR}|g' \
-e 's|${LIB_INSTALL_DIR}|${KDE4_LIB_INSTALL_DIR}|g' \
-e 's|${LIBEXEC_INSTALL_DIR}|${KDE4_LIBEXEC_INSTALL_DIR}|g' \
-e 's|${INCLUDE_INSTALL_DIR}|${KDE4_INCLUDE_INSTALL_DIR}|g' \
-e 's|${PLUGIN_INSTALL_DIR}|${KDE4_PLUGIN_INSTALL_DIR}|g' \
-e 's|${IMPORTS_INSTALL_DIR}|${KDE4_IMPORTS_INSTALL_DIR}|g' \
-e 's|${CONFIG_INSTALL_DIR}|${KDE4_CONFIG_INSTALL_DIR}|g' \
-e 's|${DATA_INSTALL_DIR}|${KDE4_DATA_INSTALL_DIR}|g' \
-e 's|${ICON_INSTALL_DIR}|${KDE4_ICON_INSTALL_DIR}|g' \
-e 's|${KCFG_INSTALL_DIR}|${KDE4_KCFG_INSTALL_DIR}|g' \
-e 's|${LOCALE_INSTALL_DIR}|${KDE4_LOCALE_INSTALL_DIR}|g' \
-e 's|${MIME_INSTALL_DIR}|${KDE4_MIME_INSTALL_DIR}|g' \
-e 's|${SERVICES_INSTALL_DIR}|${KDE4_SERVICES_INSTALL_DIR}|g' \
-e 's|${SERVICETYPES_INSTALL_DIR}|${KDE4_SERVICETYPES_INSTALL_DIR}|g' \
-e 's|${SOUND_INSTALL_DIR}|${KDE4_SOUND_INSTALL_DIR}|g' \
-e 's|${TEMPLATES_INSTALL_DIR}|${KDE4_TEMPLATES_INSTALL_DIR}|g' \
-e 's|${WALLPAPER_INSTALL_DIR}|${KDE4_WALLPAPER_INSTALL_DIR}|g' \
-e 's|${AUTOSTART_INSTALL_DIR}|${KDE4_AUTOSTART_INSTALL_DIR}|g' \
-e 's|${XDG_APPS_INSTALL_DIR}|${KDE4_XDG_APPS_INSTALL_DIR}|g' \
-e 's|${XDG_DIRECTORY_INSTALL_DIR}|${KDE4_XDG_DIRECTORY_INSTALL_DIR}|g' \
-e 's|${XDG_MIME_INSTALL_DIR}|${KDE4_XDG_MIME_INSTALL_DIR}|g' \
-e 's|${SYSCONF_INSTALL_DIR}|${KDE4_SYSCONF_INSTALL_DIR}|g' \
-e 's|${MAN_INSTALL_DIR}|${KDE4_MAN_INSTALL_DIR}|g' \
-e 's|${INFO_INSTALL_DIR}|${KDE4_INFO_INSTALL_DIR}|g' \
-e 's|${DBUS_INTERFACES_INSTALL_DIR}|${KDE4_DBUS_INTERFACES_INSTALL_DIR}|g' \
-e 's|${DBUS_SERVICES_INSTALL_DIR}|${KDE4_DBUS_SERVICES_INSTALL_DIR}|g' \
-e 's|${DBUS_SYSTEM_SERVICES_INSTALL_DIR}|${KDE4_DBUS_SYSTEM_SERVICES_INSTALL_DIR}|g' \
-e 's|${KAUTH_HELPER_PLUGIN_DIR}|${KDE4_KAUTH_HELPER_PLUGIN_DIR}|g' \
-e 's|${KAUTH_BACKEND_PLUGIN_DIR}|${KDE4_KAUTH_BACKEND_PLUGIN_DIR}|g' {} +
note that if you execute this command you may corrupt the git repository
files so move the .git directory out of the way. you can also verify
that there are no other reference to the compatibility installation
paths via:
git grep \
-e INSTALL_DIR \
-e EXEC_INSTALL_PREFIX \
-e SHARE_INSTALL_PREFIX \
-e BIN_INSTALL_DIR \
-e SBIN_INSTALL_DIR \
-e LIB_INSTALL_DIR \
-e LIBEXEC_INSTALL_DIR \
-e INCLUDE_INSTALL_DIR \
-e PLUGIN_INSTALL_DIR \
-e IMPORTS_INSTALL_DIR \
-e CONFIG_INSTALL_DIR \
-e DATA_INSTALL_DIR \
-e ICON_INSTALL_DIR \
-e KCFG_INSTALL_DIR \
-e LOCALE_INSTALL_DIR \
-e MIME_INSTALL_DIR \
-e SERVICES_INSTALL_DIR \
-e SERVICETYPES_INSTALL_DIR \
-e SOUND_INSTALL_DIR \
-e TEMPLATES_INSTALL_DIR \
-e WALLPAPER_INSTALL_DIR \
-e AUTOSTART_INSTALL_DIR \
-e XDG_APPS_INSTALL_DIR \
-e XDG_DIRECTORY_INSTALL_DIR \
-e XDG_MIME_INSTALL_DIR \
-e SYSCONF_INSTALL_DIR \
-e MAN_INSTALL_DIR \
-e INFO_INSTALL_DIR \
-e DBUS_INTERFACES_INSTALL_DIR \
-e DBUS_SERVICES_INSTALL_DIR \
-e DBUS_SYSTEM_SERVICES_INSTALL_DIR \
-e KAUTH_HELPER_PLUGIN_DIR \
-e KAUTH_BACKEND_PLUGIN_DIR | grep -v KDE4_
this change should make default installation Filesystem Hierarchy
Standard (FHS) compliant and packaging easier since library suffix (e.g.
64 for x86_64 hosts) will not have to be specified explicitly, it may
solve possible conflicts with installation path variables from other
projects which use custom installation paths aswell
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-08 20:46:43 +00:00
Ivailo Monev
8f0ce23410
kdecore: drop redundant QFileInfo cache
...
not only does it leak memory but private QFileInfo data is shared and the
object data will have to be refreshed to obtain correct information
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-01-12 16:29:33 +00:00
Ivailo Monev
7d0c2d0cb1
generic: adjust to Katie changes
...
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2019-12-23 16:36:22 +00:00
Ivailo Monev
3ed846617d
kdecore: avoid two cache lookups in KStandardDirsPrivate::exists()
...
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2019-07-26 11:20:32 +00:00
Ivailo Monev
55cc3a3f02
ldecore: avoid temporary in KStandardDirs::findResourceDir()
...
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2019-07-26 11:14:08 +00:00
Ivailo Monev
6c67e5adf8
generic: make use of QHostInfo::localHostName()
...
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2019-06-21 19:56:58 +00:00
Ivailo Monev
90797d9d60
kdecore: cleanup KStandardDirs
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2016-05-03 15:26:28 +00:00
Ivailo Monev
d8c17c0a7e
kdecore: do not define KStandardDirs defaults on the stack
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2016-03-04 20:51:02 +02:00
Ivailo Monev
fea84d5570
kdecore: use QCache for the standard directories cache
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2016-02-20 16:21:10 +02:00
Ivailo Monev
7bdb242ad8
kdecore: remove useless equalizePath()
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2016-01-01 16:09:19 +02:00
Ivailo Monev
0078793c98
kdecore: reserve memory for the KStandardDirs cache
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2015-11-05 09:33:34 +02:00
Ivailo Monev
f2e4e3f486
kdecore: limit standard directories cache to 10000 entries
...
this also fixes a strange bug that I originally tought that it's an RPATH
issues but it turns out that this is some kind of mutex-lock issue. to be
more interesting this bug does not occur when the NDEBUG conditionals are
removed or if they are unconditionalized, the first observation leads me to
think that this is compiler bug and the second that it's mutex-lock issue
that is resolved because some code in KDebug and/or QDebug (i've tried with
it too) locks/unlockes/detaches/does some voodoo that overcomes the bug.
in any case it's hard for me to pin-point the problem so if anyone can look
into it that would be great, for now this change will do
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2015-11-03 06:51:57 +02:00
Ivailo Monev
ccbae05905
kdecore: oops, fix variable reference
2015-10-17 18:59:04 +03:00
Ivailo Monev
636f904183
generic: optimize standard directories lookup
...
by caching results and storing them in a hash the results should
flow faster, a limit should probably be set on this but for now
there isn't. exists() and realPath() now cannot be called without
object!
2015-10-17 18:53:50 +03:00
Ivailo Monev
060ce58f09
kdecore: simplify KStandardDirs::exists()
...
also, added a debug message to tell when and on what this method
is called. I'm seeing many obscure check done repeatedly,
especially MIME paths check done over and over again when opening
a folder with dolphin so that should help identify places where
optimizations should be made.
2015-10-17 12:27:05 +03:00
Ivailo Monev
a4996f3d49
generic: misc cleanups
2015-10-01 07:46:47 +03:00
Ivailo Monev
4d683ae8b3
generic: cleanups remains of custom apps resources support
2015-09-06 14:42:29 +03:00
Ivailo Monev
7328e8abd1
generic: cleanup after the revert madness
2015-06-14 18:56:39 +03:00
Ivailo Monev
732148f49b
generic: partitially revert 22db5ad6
2015-06-14 18:49:20 +03:00
Ivailo Monev
ae860d22c2
kdecore: fixup kstandarddirs
2015-05-20 23:32:01 +00:00
Ivailo Monev
22db5ad66c
generic: change standard paths
2015-05-20 13:36:16 +00:00
Ivailo Monev
5333e9917d
generic: remove deprecated API
2015-02-28 03:27:54 +00:00
Ivailo Monev
c71cc93299
remove mac cruft
2014-12-31 16:44:53 +00:00
Ivailo Monev
3f0dd268de
remove win and mac cruft
2014-11-27 18:22:42 +00:00
Ivailo Monev
2d55a8d3dd
katana -> kde4
2014-11-20 09:05:46 +00:00
Ivailo Monev
4f94d74af8
mac cruft remove
2014-11-19 22:55:36 +00:00
Ivailo Monev
1162efa517
god, I hate hardcoded paths
2014-11-19 17:39:46 +00:00
Ivailo Monev
7cb8be0601
remove unnecessary includes
2014-11-19 15:49:46 +00:00