Ivailo Monev
625373ffa8
kdecore: drop KDateTime
...
with the rewrite (see f452e2e50b
),
KDateTime is just glue-code for compatibility now. the exception is
KDateTime::isNightTime() (written by me) which is used only in one place
(kde-workspace/plasma/dataengines/weather/ions/wetter.com/ion_wettercom.cpp)
and can be moved there
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-14 22:35:08 +03:00
Ivailo Monev
6bf6169caf
kdecore: return QByteArray from kBacktrace()
...
to avoid conversion from QString to QByteArray when possible, the trace is
handled as array of latin1-encoded strings anyway
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-04 08:14:53 +03:00
Ivailo Monev
f452e2e50b
kdecore: reimplement KDateTime via QDateTime
...
KDateTime shall be used only for storing date and time while KLocale
shall be used to display such, not even going to test what KDateTime
does because it is basically a few methods on top of QDateTime now.
and because QDateTime knows not much about calendar systems while
KLocale supports several it makes sense for KDateTime to not be used for
displaying date and time thus the TODOs for KLocale are simply removed
note that KLocale still uses its own parser and formatter which means
that the change affects only KDateTime and its uses, not KLocale
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-21 07:51:13 +03:00
Ivailo Monev
f90c94dae7
kdecore: strip the trailing slash when passing the URL path to kPathDirectory() from KUrl::upUrl()
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-10 06:52:30 +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
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
85205ccecf
kio: log KRecentDirs and KRecentDocument actions
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-03 11:28:00 +03:00
Ivailo Monev
5409d7035e
kdecore: do not append trailing slash to the path if the path is / from KDirWatch::addDir()
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-02 09:22:39 +03:00
Ivailo Monev
3e1a64459e
kdecore: check if debug messages are disabled globally from KDebugConfig::areaDevice()
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-26 23:55:46 +03:00
Ivailo Monev
43dc4568db
kdecore: remove unused QMimeData inclusion
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-26 23:17:47 +03:00
Ivailo Monev
bf62c2b69d
generic: consistent RFC references
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-26 23:02:40 +03:00
Ivailo Monev
bd990c2ae8
kdecore: return empty string if there is no slash in the input of kPathDirectory()
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-26 21:52:43 +03:00
Ivailo Monev
4f1050a5ac
kdecore: KUrl optimizations
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-26 21:24:18 +03:00
Ivailo Monev
eac8fd79cc
kdecore: re-use KUrl::AdjustPathOption for KUrl::fileName() and KUrl::directory()
...
so that it is clear that the options shall affect only the result, also for
local files the correct thing can be done regardless of the trailing slash
as is done in KUrl::upUrl()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-26 20:47:38 +03:00
Ivailo Monev
06ce034a80
kdecore: remove declaration of non-existing KUrl::join() method
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-26 17:00:27 +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
9f5081f9f8
kdecore: rename variables for consistency
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-26 06:12:01 +03:00
Ivailo Monev
b83771b4c2
kdecore: handle local file paths with and without trailing slash in KUrl::upUrl()
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-26 05:42:51 +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
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
e4a4798d60
kdecore: remove redundant KUrl::fromMimeDataByteArray() method
...
calls KUrl constructor with the unmodified str argument in both cases
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-25 19:54:51 +03:00
Ivailo Monev
2c6f00f690
kdecore: remove reference to non-existing KUrl::setExportAsText() and KUrl::List::setExportAsText() methods
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-25 19:48:15 +03:00
Ivailo Monev
03bd3652c3
kdecore: compiler warning fix
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-25 19:36:10 +03:00
Ivailo Monev
865711ae83
kdecore: KUrl::url() optimization
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-25 18:51:15 +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
cb8a624390
kdecore: fix recursion due to kCheckLocalFile()
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-25 17:47:18 +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
d63bb71869
kdecore: rename constant for consistency
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-25 16:36:45 +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
7e056ee4a1
kdecore: use KUrl::url() for the hash
...
otherwise different user, password, host or port will not result in
different hash, duh
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-25 05:11:39 +03:00
Ivailo Monev
0917277201
kdecore: remove unused KUrl::CompareWithoutFragment enum
...
doubles as optimization for KUrl comparisons
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-25 05:05:08 +03:00
Ivailo Monev
94a5a3f641
kdecore: remove redundant KUrl destructor
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-25 04:00:49 +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
728dc0838e
kdecore: remove unused headers inclusions in kurl source file
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-24 23:20:20 +03:00
Ivailo Monev
13fdc7b7cd
kdecore: do not prettify the URL in KUrl::pathOrUrl()
...
here is how to make browsers barf - check the tooltip and where the browser
thinks the URL points to:
https://ibb.co/cyhwppK
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-24 23:13:38 +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
0a5fadde75
kdecore: do not change the scheme from KUrl::cleanPath()
...
the fact that many KUrl methods change it (by calling KUrl::setPath()) is
just bonkers but that's how it was implemented - to convert to file scheme
from setters
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-24 20:44:03 +03:00
Ivailo Monev
78c109df85
kdecore: more compatible KUrl
...
abusing the QUrl path for local files
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-24 20:10:09 +03:00
Ivailo Monev
8f348b4c5b
kdecore: remove FIXME for KUrl
...
so far so good:
https://ibb.co/TYN4z3x
now on to the quircks..
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-24 03:00:21 +03:00
Ivailo Monev
ea02aa2c1a
kdecore: fix regression since 7b8ff71eba
...
oops
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-24 00:53:35 +03:00
Ivailo Monev
341e16d4c6
kdecore: update comment in KUrl::prettyUrl()
...
konqueror is no more
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-23 23:58:08 +03:00
Ivailo Monev
5e4732f809
kdecore: KUrl::List from QList<QUrl> optimization
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-23 23:55:19 +03:00
Ivailo Monev
c81c3bd71d
kdecore use the new QUrl::AddTrailingSlash enum
...
requires the following commit from Katie repo:
3369835da10412451d082713433321a72f25e0df
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-23 23:08:09 +03:00
Ivailo Monev
7b8ff71eba
kdecore: KUrl rewrite to output encoded strings
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-23 22:33:18 +03:00
Ivailo Monev
b4861f86d5
kdecore: rename variable in uriListData()
...
bad variable naming - clashes with the function name and inconsistent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-23 18:22:41 +03:00
Ivailo Monev
840f3a3b68
kdecore: assume strings passed to KUrl constructors are percentage-encoded
...
for compat, test case for it is KUrlMimeTest::testURLList()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-23 18:14:39 +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