Commit graph

621 commits

Author SHA1 Message Date
Ivailo Monev
9771b8b226 generic: adjust to Katie changes
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-04-22 00:04:56 +00:00
Ivailo Monev
bde28a2b96 kdecore: avoid temporaries and assignments in KJob setters
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-04-09 08:21:10 +00:00
Ivailo Monev
8ee8aca95f kdecore: correct reference to installation path variable
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-25 20:12:00 +00:00
Ivailo Monev
dcc373b2c8 kdecore: mark findLibraryInternal() function static
use single variable assignment while at it

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-25 17:39:50 +00:00
Ivailo Monev
5d2d39e853 generic: drop support for operating systems Katie does not support
replace internal definitions with Q_OS_<OS> alternatives checks while at it

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-25 04:48:18 +02:00
Ivailo Monev
b5303a651e generic: review configuration checks
despite the gettimeofday() check for an example, the function is used
unconditionally thus checks for errno header are removed aswell rather then
making them required from configuration checks and error-ing out if not
found.

other cases such as trunc() are used in kexiv2 unconditionally, not in
kdecore.

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-24 21:04:54 +00:00
Ivailo Monev
e29f7a0687 kdecore: replace use of deprecated Qt::DateFormat enums
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-24 18:40:53 +00:00
Ivailo Monev
cb045b2d9f kdecore: call kbuildsycoca via non-static QProcess::start()
since QProcess::execute() is static it is possible to call it with object
but it does not do what one expects (failure in API design). it creates a
new process but any other methods calls have no effect on that.

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-21 19:22:04 +00:00
Ivailo Monev
accedce2d6 kdecore: remove redundant breaks in KXzFilter
fixes compiler warning

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-21 19:18:34 +00:00
Ivailo Monev
220edf11d7 generic: replace use of MacroPushRequiredVars CMake module with CMakePushCheckState
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-19 17:32:31 +00:00
Ivailo Monev
ea8388aaa6 kdecore: remove unused ipv6blacklist file
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-18 22:16:41 +00:00
Ivailo Monev
359ff5b861 kdecore: remove unused configuration checks
netsupp was provided for KDE3 compatibility and the header is not even
installed. the only place where getnameinfo() is used is in KIO kpac DHCP helper
but it does not include the netsupp header.

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-18 22:09:53 +00: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
4d6fb007e7 generic: fix most of the overlinking issues
TODO from https://github.com/fluxer/katana/issues/7. I've decided to
keep KDE4 and Katie libraries as PUBLIC, all other libraries as PRIVATE
for that and not use INTERFACE at all since that will not require a lot
of changes to all other sub-projects (kde-baseapps, kde-workspace and
kde-extraapps) build systems.

MusicBrainz5 CMake module was also rewritten as the actual library that
should be linked to is libmusicbrainz5cc, libmusicbrainz5 is the C
version of it.

common checks for X11 extensions where move to main config header,
eventually to be moved to separate config-x11 header.

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-09 21:58:11 +00:00
Ivailo Monev
9dcca4fe37 kdecore: update bundled gettext header
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-09 02:27:50 +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
15c1305965 kdecore: remove redundant util check and kmemtest
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-03 18:54:37 +00:00
Ivailo Monev
38c049bb36 kdecore: use QDir::exists() to check for directory existence from tests
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-02 22:38:07 +00:00
Ivailo Monev
246fa5b377 kdecore: remove kde4- prefix from services lookup in KServiceTest
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-02 18:31:03 +00:00
Ivailo Monev
3ae8b33409 generic: regenerate parsers
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-02 17:22:10 +00:00
Ivailo Monev
a443414554 kdecore: fix regression since 9310423cca
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-02 14:43:45 +00:00
Ivailo Monev
c82efdb5d9 kdecore: adjust expected data of KLocaleTest::languages() test case
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-02 02:26:52 +00:00
Ivailo Monev
229e736f74 generic: adjust to KStandardDirs changes
the lookup, even with wildcard, is no longer recursive

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-02 02:22:48 +00:00
Ivailo Monev
597a84c0ef kdecore: rework KCharsetsTest test
the static initializer was removed since Katie does not require it

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-02 01:48:40 +00:00
Ivailo Monev
459f9d1b7a kdecore: fix process output capturing in KDebugTest::testNoMainComponentData()
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-02 01:25:17 +00:00
Ivailo Monev
49744946c6 kdecore: fix build against Qt4
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-01-29 13:04:53 +00:00
Ivailo Monev
b7a307d949 kdecore: use QFileInfo and QDir to check for existence instead of QFile where applicable
the paths checked in KMountPoint::Private::finalizePossibleMountPoint()
should be symlink to directory, not a file. the check in
KTempDir::removeDir() should obviously be for directory

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-01-13 02:54:32 +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
7c787fcae3 kdecore: check if filename argument of KSettings is absolute rather than existing
this ensures that if filename is to be created the fallback lookup is not
used and in case filename is existing directory instead of actual file, as
QFile::exists() may return true for directories, it does not end up as
relative path passed to QSetting which leads to QSettings object being
created with relative name rather than the fallback

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-01-09 00:10:22 +00:00
Ivailo Monev
2fa84d58be kdecore: remove redundant private KSettings pointer and add object argument
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-01-06 23:32:14 +00:00
Ivailo Monev
f2e0ae8099 kdecore: move sys/stat header inclusion from karchive header to source files
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-01-03 18:19:14 +00:00
Ivailo Monev
a1345d67d6 generic: require filename and mode to be passed to KSettings constructor
otherwise the constructor can be shadowed by the default QSettings
constructor which does not take any arguments at all

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-01-01 12:46:10 +00:00
Ivailo Monev
62fd359884 kdecore: remove explicit specifier from KSettings constructor
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2019-12-25 23:08:09 +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
cb6ddb2623 kdecore: improve encoders splitting and grouping of encoders by script
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2019-11-24 23:37:11 +00:00
Ivailo Monev
3f1f73ba4d kdecore: rework KCharset to get available codecs from QTextCodec
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2019-11-22 20:47:37 +00:00
Ivailo Monev
5cc29351d6 kdecore: fix KEntryMap value change
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2019-07-29 12:20:55 +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
5b41f81878 generic: make use of KSettings where possible
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2019-07-12 17:45:25 +00:00
Ivailo Monev
3da944f05b kdecore: review KSettings documentation
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2019-07-12 17:43:27 +00: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
c2f8387fa6 generic: implement KSettings class
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2019-07-12 14:09:24 +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
e5869fc88c generic: remove now redundant check for FAM
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2019-06-21 18:53:36 +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
2e8c499968 generic: set stream versions to 4.8
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2019-06-12 15:09:32 +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