Commit graph

4366 commits

Author SHA1 Message Date
Ivailo Monev
d3674c0e45 kutils: check the status upon constructing KNetworkManager
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-08 08:05:16 +03:00
Ivailo Monev
355bca1289 kutils: new knetworkmanager library
to replace the status notifier (in the kde-workspace repo) and
eventually manage network connections aswell as move network status
notifier out of solid

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-08 07:48:38 +03:00
Ivailo Monev
3521d07234 kutils: don't even bother mapping internal (vendor) keys from KExiv2::metadata()
those are usually binary data blobs, some quite large at that

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-07 23:38:39 +03:00
Ivailo Monev
f83e176dcf plasma: remove bogus tooltip widget style sheet override
I don't know what that was supposed to style ("p" is the class name, is
supposed to be something like "QLabel")

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-07 21:24:57 +03:00
Ivailo Monev
c1456e739a kdeui: update internal KTitleWidget widgets on font change event
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-07 20:12:24 +03:00
Ivailo Monev
937f116b5f kdeui: change the palette of internal KTitleWidget widgets
mixing style sheet and palette changes is documented to be quircky, note
that the style sheet of the comment label was not reset back to normal
when the message type was changed to KTitleWidget::PlainMessage.

on a side note QPalette::Foreground (or the color style sheet property) and
QPalette::WindowText are the same

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-07 20:09:17 +03:00
Ivailo Monev
3e8f4e9424 plasma: remove unused test engine and containment
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-07 19:19:49 +03:00
Ivailo Monev
0aea7c273e interfaces: remove terminal example
there is example in the TerminalInterface class documentation and in the
konsole tests

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-07 19:13:06 +03:00
Ivailo Monev
16f575c7e9 kio: do not emit refresh for the root item on KDirLister update
dolphin for example assumes that signals are emitted only for the filtered
items, not for the root too

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-07 18:15:41 +03:00
Ivailo Monev
6e033933c7 kdeui: do not animate the KMessageWidget show/hide
without the slow snapshot-based rendering 500ms animation does not even
make a difference..

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-07 17:56:40 +03:00
Ivailo Monev
99a57832a1 kdeui: correct placeholder in KMessageWidget::setMessageType()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-07 08:12:33 +03:00
Ivailo Monev
c32db57584 kdeui: animate the height of KMessageWidget from KMessageWidget::animatedHide()
can animate the opacity too but size change animation suits better a
message widget that is not dialog, still it happens in 500ms and renders
much faster than the previous snapshot-based approach so..

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-07 08:03:42 +03:00
Ivailo Monev
8bf6e8bd73 kdeui: do not specify margin for the label of KMessageWidget
there is no inner frame now

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-07 07:51:47 +03:00
Ivailo Monev
0ba71250e0 kdeui: essentially KMessageWidget rewrite
the fixed size policy causes all sort of trouble, no more tho. also the
buttons will be centered now when word wrapping is on

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-07 05:57:48 +03:00
Ivailo Monev
55a923205a kfile: fix KDirSortFilterProxyModel sorting by permissions for non-local files
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-06 20:00:20 +03:00
Ivailo Monev
cf207aaa67 kio: remove redundant KDirNotify signals
see 693febf429, and since mount points are
local directories (or rather not a KIO thing) KDirWatch will notify
about the changes when the mount point directory no longer contains
entries

bonus points for reducung the D-Bus traffic

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-06 18:29:56 +03:00
Ivailo Monev
49e58e0380 kio: emit deleted before added items from KDirLister
fixes dolphin model inconsistency

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-06 18:00:56 +03:00
Ivailo Monev
7e035dbe90 kio: additional note about the refresh of .desktop files on KDirLister update
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-06 17:12:10 +03:00
Ivailo Monev
e512f4af70 kdecore: remove unused qtextstream header inclusion in qtest_kde header
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-06 09:06:18 +03:00
Ivailo Monev
2116909445 kio: KDirLister update optimization
one more thing to (possibly) optimize - KDirListerPrivate::_k_slotFileRenamed(),
after that its hammer (test) time and I already have something in mind

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-06 08:35:36 +03:00
Ivailo Monev
7ca48a2806 kio: check if the local watcher exists before attempting to remove entries from it in KDirListerPrivate::unwatchUrl()
for the rare case of currently listing remote protocol (such as
filenamesearch:/) and local file that is not watched being deleted (the
signal is emitted by KDirNotify)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-06 08:06:15 +03:00
Ivailo Monev
6deb136bad kio: remove unused constant in KDirListerPrivate::unwatchUrl()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-06 07:36:33 +03:00
Ivailo Monev
8e6b9e3b28 kio: do not set KFile::LocalOnly in KFileDialog::getExistingDirectoryUrl()
KFileDialog::getExistingDirectoryUrl() is used to get remote directories
too

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-06 05:57:11 +03:00
Ivailo Monev
3caf682ebb kio: watch/unwatch on KDirLister update
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-06 05:01:47 +03:00
Ivailo Monev
b5df13055c kio: correct desktop items pair in KDirListerPrivate::_k_slotUpdateResult()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-06 05:00:00 +03:00
Ivailo Monev
092de4a493 kio: note in the KDirLister documentation that some signals are emitted on update
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-06 04:24:27 +03:00
Ivailo Monev
b05beace42 kio: replace KDirLister::doNameFilter() and KDirLister::doMimeFilter() with their body
KDirLister::matchesFilter() and KDirLister::matchesMimeFilter() overloads
are virtual already

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-06 02:28:49 +03:00
Ivailo Monev
a1c2742223 kio: KDirLister overhaul to update via KIO::ListJob
passes practical, dolphin and gwenview tests. moveover KDirLister will
now emit partial updates

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-06 01:25:12 +03:00
Ivailo Monev
c73567cb65 kded: log the error string when module fails to load
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-05 09:50:52 +03:00
Ivailo Monev
5724c779d7 solid: export the Solid::errorString() function
fixes loading of soliduiserver module

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-05 09:50:22 +03:00
Ivailo Monev
d3aa5356fd kio: do not emit KDirLister::itemsDeleted() from KDirLister::openUrl()
if anything expected signals should be adjusted in tests,
KDirLister::clear() is emitted anyway

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-05 08:43:16 +03:00
Ivailo Monev
5cb62b9388 solid: use QString instead of QVariant for the Solid::StorageAccess signals arguments
to avoid needless conversion to and from QVariant

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-05 07:03:18 +03:00
Ivailo Monev
2e682648c9 kio: update comments about KFile::Mode enums
KFileWidget now handles directories properly - booyah!

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-05 06:24:48 +03:00
Ivailo Monev
b0d0a4ee18 kio: do not convert the element attribute to latin1 in KBookmark::url()
that will only convert it back to QString in the KUrl constructor but it
will not be from UTF-8 bytes - the attribute string is converted to latin1,
duh

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-05 05:47:03 +03:00
Ivailo Monev
74dc070da5 kfile: remove duplicate header inclusion
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-05 02:31:52 +03:00
Ivailo Monev
0c7ca11781 kfile: show message appropriate for the mode from KFileWidget::slotOk()
follow-up on 7f92b84e27

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-05 02:29:38 +03:00
Ivailo Monev
db4190995a kio: check if the currently set URL is valid before updating in KDirLister::updateDirectory()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-05 00:39:04 +03:00
Ivailo Monev
7762ec727b kio: KDirListerPrivate::_k_slotEntries() optiomization
only for the case when not automatically updating (not adding to the URL
list to save memory and computation)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-05 00:38:16 +03:00
Ivailo Monev
9767ce8fc4 kio: watch the sub-directories when listing recursively
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-05 00:00:14 +03:00
Ivailo Monev
5d60973ab4 kio: implement recursive listing for KDirLister
to be used by the gwenview recursive model, note that recursive listing via
KIO::listRecursive() does not follow links

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-04 21:17:30 +03:00
Ivailo Monev
6bfa490681 kutils: mark KEMail and KEMailDialog as stable
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-04 20:47:46 +03:00
Ivailo Monev
327aff2469 kutils: KArchive documentation correction
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-04 20:39:37 +03:00
Ivailo Monev
12ebcb3268 kdecore: remove redundant KUrl::List::size() calls
these are constructors, initial size is zero

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-04 19:30:35 +03:00
Ivailo Monev
5ab5a82907 kio: use KFileItem::isDesktopFile() method instead of KDesktopFile::isDesktopFile() in KDirLister
KDesktopFile::isDesktopFile() checks only the extension (if the file ends with .desktop) while
KFileItem::isDesktopFile() checks the MIME type which is a bit more
expensive but more correct too (the desktoppaths KCM copies links such that
the files do not end with .desktop for example)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-04 17:10:30 +03:00
Ivailo Monev
268eac6790 kio: fix KFileItem::isReadable()
this will make it call access() to do a permission check if S_IRUSR,
S_IRGRP and S_IROTH are not all set which is more reliable check (much like
the one done by KFileItem::isWritable())

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-04 16:06:26 +03:00
Ivailo Monev
bce72b0b24 kdecore: safety-net for KUrl::upUrl(), also append trailing slash from KUrl::directory()
relative paths are tricky

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-03 20:39:14 +03:00
Ivailo Monev
a051b1b284 kdecore: append trailing slash from kPathDirectory() function
while it does not matter for comparison, for KUrl::setFileName() to produce
correct results it has to be there after KUrl::upUrl()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-03 17:09:54 +03:00
Ivailo Monev
471df42df0 kio: remove now non-operational KDirLister::OpenUrlFlags
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-03 13:34:54 +03:00
Ivailo Monev
888926984f kio: const-ify KFileItem object in KDirListerPrivate::_k_slotEntries()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-03 13:16:16 +03:00
Ivailo Monev
3380664558 kded: Kded::updateDirWatch() optimization
KDirWatch already checks if the path is added and appends trailing slash
as neccessary

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-03 13:15:55 +03:00