Commit graph

1361 commits

Author SHA1 Message Date
Ivailo Monev
508ad0d2fd kdecore: implement MIME type name argument for KMimeType::iconNameForUrl()
because KMimeType::iconNameForUrl() really cannot determine the MIME type
reliably for non-local URLs (can only guess from the name), also the MIME
type is known by KFileItem for such meaning it will not have to be
determined again

on a side note the documentation of the method mentions overlays - that is
not a thing for KMimeType::iconNameForUrl()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-06-04 17:30:27 +03:00
Ivailo Monev
610ce35050 kdecore: log debug messages for KLockFile
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-31 20:14:41 +03:00
Ivailo Monev
3bbbe4f382 kdecore: PCI IDs database update
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-30 03:04:37 +03:00
Ivailo Monev
58627ac198 kdecore: update comment in KMimeType::iconNameForUrl()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-29 05:06:52 +03:00
Ivailo Monev
33e07a5bfd kio: move bits from KFileItem::iconName() to KMimeType::iconNameForUrl()
none of the bits actually belong there but KIO was designed in such a way
that it is not part of kdecore and as such KMimeType::iconNameForUrl() will
have to handle the cases for KIO (except overlays maybe)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-29 04:38:22 +03:00
Ivailo Monev
16f1dbd84e kdecore: do not cache icon names that are not made up in KMimeType::iconName()
KMimeType itself is shared data cached by KMimeTypeRepository

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-29 03:04:54 +03:00
Ivailo Monev
c045d9f57b kio: handle the special case of trash protocol and protocols in general in KFileItem::iconName()
more conditions are added into the mix but that is how it should be,
KMimeType::iconNameForUrl() barely covers some cases (no overlays?)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-29 02:00:49 +03:00
Ivailo Monev
825763d73f kio: drop the feature to delay MIME type determination
it shall be delayed without the feature (which it was anyway)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-27 17:10:04 +03:00
Ivailo Monev
d1733d8914 kdecore: keep reference to the QByteArray object in KStandardDirs::realFilePath()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-23 12:00:08 +03:00
Ivailo Monev
a2209be85f kdecore: return boolean from KJobTrackerInterface::registerJob()
so that classes that inherit from it and use D-Bus interfaces can return
true if the interface is not valid as may be the case for
KPlasmaJobTracker, that way KDynamicJobTracker will not have to create
QDBusInterface object to decide which tracker to use

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-22 17:48:49 +03:00
Ivailo Monev
c5e842cc7a kdecore: KMimeTypeRepository::findMimeTypeByName() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-21 15:02:09 +03:00
Ivailo Monev
4621f48a1c kdecore: rework KThreadPool::waitForDone() to not lock
also active and queued threads remain unchanged by the method, events
processing continues too (at a certain interval)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-19 10:22:28 +03:00
Ivailo Monev
969f3e428e kdecore: optimize KMimeType::findByContent()
read once, match until match is found or otherwise. that means less disk
I/O

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-18 05:02:20 +03:00
Ivailo Monev
198997f5e1 kdecore: interrupt lock attempts from KLockFile destructor
every while loop should have interrupt point, this one did not

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-17 14:39:15 +03:00
Ivailo Monev
922d02660b kdecore: cache KMimeType pointers
that means less parsing of the xml files overall, trading memory usage for
processing

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-17 08:33:57 +03:00
Ivailo Monev
8c8855d9a6 generic: drop temporary file option
any program launched with temporary file (as per the spec) argument
(because it does not support %u or %U) should not be responsible for
deleting the file, klauncher already handles that thus the option is
redundant. I don't know how other implemenatations (of program launchers)
do it but I cannot say I care either

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-16 01:37:20 +03:00
Ivailo Monev
7f261aca95 kdecore: new KTemporaryFile::urlPath() method
based on the bits in kparts/part.cpp

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-13 22:52:30 +03:00
Ivailo Monev
7c88e24338 kdecore: debug areas update
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 21:00:39 +03:00
Ivailo Monev
576547a069 kdecore: debug areas update
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 20:59:45 +03:00
Ivailo Monev
fdc8dc967b kdecore: KMimeType compat bits
from the following commit:
817b7a4aab

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 17:57:55 +03:00
Ivailo Monev
047234847d kdecore: remove now invalid debug area
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 09:00:03 +03:00
Ivailo Monev
1ac69ccc74 kdecore: drop unused startup condition feature
there are other conditions that are checked tho like the allowed
environment but this one is Katana specific and unused so

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 05:02:58 +03:00
Ivailo Monev
f444caa565 kdecore: adjust KMimeType test case
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 04:11:04 +03:00
Ivailo Monev
b90f90905b kio: move most of the KRun bits to KLauncher
two things doing the same thing - one has to go away. also KRun does not
fork and the launched service/application lifetime was bound to the
process launching it, that is not the case with klauncher - it is bound
to the session (in the usual case)

a few things on the TODO list but mostly for services/applications
lacking features

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 03:21:17 +03:00
Ivailo Monev
c95d7918e6 kdecore: adjust kdnssd debug area defaults
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-10 22:50:34 +03:00
Ivailo Monev
0e0db0b815 kdeui: move session management to KApplicaiton
every comment about X11 and session management in general claims it was
broken, not going to claim otherwise. everything that does not use
KApplication shall not be involved into session management now and gets
the middle finger (SIGTERM or SIGKILL) after 5 sec by klauncher when the
session is done

also session management has to be explicitly enabled by applications
now, disabled by default

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-09 08:29:51 +03:00
Ivailo Monev
9375b3ce72 Revert "kdecore: unexport KJobPrivate"
This reverts commit d797c27b77.
2024-05-05 04:44:29 +03:00
Ivailo Monev
d797c27b77 kdecore: unexport KJobPrivate
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-05 04:04:41 +03:00
Ivailo Monev
b8d4dc0dc4 generic: call static KStandardDirs methods as such
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-05 02:04:03 +03:00
Ivailo Monev
8b9fc25d48 kdecore: kFolderIconName() function optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-05 01:45:44 +03:00
Ivailo Monev
678417ea8d kdecore: require all KMimeTypeRepository::findMimeTypeByName() arguments
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-05 01:34:52 +03:00
Ivailo Monev
d6a21de5f9 kdecore: add comment about exceptions in KMimeTypeRepository::findFromContent()
I've checked, a few require twice as much

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-05 01:02:51 +03:00
Ivailo Monev
bac4abfd7a kdecore: MIME glob matching optimization
passes tests

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-05 00:41:13 +03:00
Ivailo Monev
5bb3125631 kdecore: consistent debug messages
some logging to the generic debug area, some to the services debug area and
some to the kbuildsycoca debug area..

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-04 21:43:41 +03:00
Ivailo Monev
1ff6f4d2ee kdecore: MIME glob matching optimization
by doing it with a single iteration over the globs a lot less processing
has to be done

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-05 00:11:11 +03:00
Ivailo Monev
d338e13b8d kdecore: update favicon link and add shared-mime-info spec one
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-04 22:41:06 +03:00
Ivailo Monev
9796436b43 kdecore: KMimeType documentation review
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-04 22:22:07 +03:00
Ivailo Monev
817b7a4aab kdecore: rework KMimeType
more accurate probing then before, notably by probing the file content
from the file slave (only the name was checked before because the
filepath was not a full path in some cases and the file could not be
open)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-04 20:14:53 +03:00
Ivailo Monev
59f92c0970 generic: compiler warning fixes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-03 20:21:35 +03:00
Ivailo Monev
bd9f76451d generic: remove redundant metatype registrations
builtin

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-03 02:17:57 +03:00
Ivailo Monev
2d61f31612 kdecore: PCI IDs database update
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-03 01:30:53 +03:00
Ivailo Monev
1c22bf126b kdecore: round duration to seconds in KLocale::formatDuration()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-02 22:02:07 +03:00
Ivailo Monev
d02a35de93 kdecore: remove redundant private member
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-02 10:28:02 +03:00
Ivailo Monev
a5d82b62dd kdecore: stabilize KConfig tests
not relying on the order groups appear in the list

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-30 04:29:47 +03:00
Ivailo Monev
7dc74bd2d9 kdecore: adjust to Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-27 03:06:20 +03:00
Ivailo Monev
ec7b5bd959 kdeui: new KDebugger class
I've had the idea about it in my head for years

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-26 07:43:17 +03:00
Ivailo Monev
9c78166b87 kdecore: debug areas update
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-22 00:38:11 +03:00
Ivailo Monev
c31499dd07 generic: drop messages handler support
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-20 20:17:56 +03:00
Ivailo Monev
713c9394d7 kdecore: drop message box feature of KDebug
tho it can be fixed (by not using queued up message boxes) I am not into
supporting such feature

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-20 19:40:13 +03:00
Ivailo Monev
9d2994fad0 kdecore: start as many threads as possible from the queue of KThreadPool
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-20 17:32:44 +03:00