Commit graph

213 commits

Author SHA1 Message Date
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
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
ee0d50c901 generic: purge most manual tests
long overdue, have no use for them

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-03 07:03:28 +03:00
Ivailo Monev
5290bf44e0 kdecore: deal with KMimeType TODO
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-29 19:51:10 +03:00
Ivailo Monev
37d9ca4f71 kdecore: rename KUrl test for consistency
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-26 07:47:18 +03:00
Ivailo Monev
f1bd676623 kdecore: test relative vs relative local file URLs
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-26 07:44:41 +03:00
Ivailo Monev
5bf76a5f3a kdecore: compare the clean paths of local file URLs
things are getting complicated for local files but that is how it should be

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-26 07:36:59 +03:00
Ivailo Monev
181e119ecc kdecore: KUrl::equals() rework to use KUrl::url() for the comparison
same thing (all URL components are compared) except the trailing slash
option can be re-used for it essentially adding one more option (to add
trailing slash when comparing)

also fixed and tested KUrl::upUrl() for some cases

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-26 01:30:23 +03:00
Ivailo Monev
180f34d2e3 kdecore: fix null/empty KUrl comparison and test it
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-26 00:34:45 +03:00
Ivailo Monev
b1c7c3b392 kdecore: move KUrl code where it belongs
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-26 00:10:11 +03:00
Ivailo Monev
db7fb2a8ee kdecore: add comment about the re-construction of the URL in KUrlTest::testHash()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-25 23:59:40 +03:00
Ivailo Monev
47d0b5a297 kdecore: remove unused KUrl metadata
was used to pass the referrer and while it is still possible to
reimplement it realisticly speaking it is impossible to preserve the
referrer (and other HTTP(S) header metadata) because it will be lost in
transition in some cicumstances such as when drag-n-drop is done to
application unaware of application/x-kio-metadata

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-25 21:13:59 +03:00
Ivailo Monev
1c25006049 kdecore: typo in KUrl tests comment
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-25 18:51:44 +03:00
Ivailo Monev
40da298881 kdecore: never output file:// for local files
there is a fix for that legacy thing

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-25 18:15:06 +03:00
Ivailo Monev
5b90bcb8ea kdecore: test hashing of KUrl with different port
now that it is taken into account, see:
7e056ee4a1

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-25 17:22:48 +03:00
Ivailo Monev
54ee8ee1cd kdecore: clarfication on the note in KUrl test
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-25 16:50:36 +03:00
Ivailo Monev
f1df519d20 kdecore: test qHash() for KUrl
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-25 06:31:53 +03:00
Ivailo Monev
a7fe953ca9 kdecore: ensure KUrl::url() handles only full paths to local files specially
it's dirty, it's magic, it's a fix

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-25 03:15:21 +03:00
Ivailo Monev
ef02376c35 kdecore: add KUrl query and fragment test
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-24 21:25:20 +03:00
Ivailo Monev
67d6fa8588 generic: adjust expected tests data
QUrl::StripTrailingSlash removes all trailing slashes and KUrl does not
convert to percentage encoding - local file URLs remain the same when
passed around.

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-24 20:57:21 +03:00
Ivailo Monev
30cd526513 kdecore: set the scheme to file when it KUrl is constructor from string and it is empty
the test case for it is "local file 3" case of KUrl::cleanPath() test and
the KUrlNavigator test

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-23 17:53:20 +03:00
Ivailo Monev
ed4ae48705 kdecore: KUrl test-anew
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-23 14:44:33 +03:00
Ivailo Monev
34b75e4f7f kdecore: different take on KUrl::upUrl()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-23 13:08:49 +03:00
Ivailo Monev
c44c545b1a kdecore: add FIXME for KUrl::isRelativeUrl()
I do not know where the logic behind that was

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-23 08:15:33 +03:00
Ivailo Monev
9e301c4a49 kdecore: disable KUrl test
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-23 04:09:56 +03:00
Ivailo Monev
a424284337 kdecore: remove unused and redundant KUrl methods
plus some disabled bits

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-22 13:42:25 +03:00
Ivailo Monev
dc208c52fd generic: update references to shared data directory
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-18 00:20:22 +03:00
Ivailo Monev
5613e5483c generic: remove redundant build varibles
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-17 20:25:52 +03:00
Ivailo Monev
f965a1edb8 kdecore: testing build fix
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-16 20:31:44 +03:00
Ivailo Monev
add0b2cad3 kdecore: drop KProcess channel forward feature
was used only by klipper, also a program writing something ment for
stderr to stdout (and vice versa) is doing something wrong already

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-14 23:44:38 +03:00
Ivailo Monev
6ba957038d kdecore: KLockFile optimization
also not storing the host name because it serves no real purpose other than
being a possible source of problem (hostname change?), copyrighting it to
me because there is nothing relevant left of the original implementation

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-14 03:34:48 +03:00
Ivailo Monev
8609952af1 generic: replace use of QTime as timer with QElapsedTimer
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-07 12:21:32 +03:00
Ivailo Monev
4966846ed7 generic: drop sub-URL support
was used by the archive KIO slave for example (which is no longer
maintained)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-06 08:34:19 +03:00
Ivailo Monev
636f533297 kdecore: discard leap second adjustments, standard/wall and UTC/local time indicators timezone data
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-01 00:49:15 +03:00
Ivailo Monev
6d9779739e kdecore: implement Foot (ft) unit conversion
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-05-21 02:55:49 +03:00
Ivailo Monev
dcdc02baf2 kdecore: remove archive KIO slaves leftovers
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-01-02 07:54:18 +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
8f2bb9d7fb kdecore: shrink the size of globs stored by KMimeTypeRepository
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-20 12:46:50 +02:00
Ivailo Monev
e3ca186a3f kdecore: do not assume translations are installed in KLocale test case
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-19 20:22:27 +02:00
Ivailo Monev
74bdfa85d8 kdecore: build fix for the case when tests are enabled
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-19 20:17:18 +02:00
Ivailo Monev
aa6b5ea4f0 kinit: klauncher and KCrash rewrite
much simpler and easier to maintain, also it will be proper D-Bus
service now with no sockets, process title hack and whatnot. KCrash
and startkde script (in kde-workspace repo) have to be adjusted for
it tho

note that the internal KIO scheduler already has the functionality to
put slaves on hold but now they will be started as detached process.
eventually they may become plugins (they are loaded as such by kioslave
program) without event loop dispatcher

fixes application startup notification (ASN) and cleanup issues

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-04 23:20:15 +02:00
Ivailo Monev
c5cf1cc960 kdecore: remove bogus kmimetype_nomimetypes test
the test is for the worse case scenario, i.e. what if /etc/passwd is
missing? in that case the system is borked and should be fixed, that's
not a problem Katana will (or should) solve nor workaround tho

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-01 05:55:34 +02:00
Ivailo Monev
3339338121 generic: prepare for Katie changes
note that kDebug(), kWarning(), etc. automatically add end of line

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-13 00:46:32 +02:00
Ivailo Monev
95a8d172be kdecore: search backwards for the template and stop at directory separator in KTemporaryFile::filePath()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-01 00:51:55 +02:00
Ivailo Monev
0ef6ec5e26 kdecore: verify that there are no multiple occurrences of X character in KTemporaryFile test case
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-24 16:43:37 +03:00
Ivailo Monev
b45b5344b2 kdecore: cache KDebug devices based on area and output type
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-24 00:59:46 +03:00
Ivailo Monev
a2ed707470 kdecore: oops, fix build of KTempDir test
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-23 20:09:23 +03:00
Ivailo Monev
b287467137 kdecore: do not prepend the temporary directory and main component name if template is absolute path from KTemporaryFile::filePath()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-23 18:05:15 +03:00
Ivailo Monev
d834ef9e19 kdecore: fix writing of warning messages to file and test case it
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-23 06:44:30 +03:00