Ivailo Monev
eb7bb8ec72
kdecore: do not copy the QFileInfo object in checkExecutable() function
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-09 18:43:10 +03:00
Ivailo Monev
b282921233
kdecore: remove unused variable in KStandardDirs::findExe()
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-09 18:39:22 +03:00
Ivailo Monev
9b372b0d57
kdecore: include the class name when printing warning from KStandardDirs::realPath()
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-09 18:39:00 +03:00
Ivailo Monev
b317eeb690
kdecore: do not attempt to guess the exec prefix
...
for any program that is not in /usr/bin, /usr/sbin, /usr/local/bin, etc.
the prefix is wrong. for example it will be /usr/libexec for
/usr/libexec/kde4/drkonqi and probably worse for any program outside the
system PATH (scripts and programs in ~/bin anyone?)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-09 06:29:07 +03:00
Ivailo Monev
8cdefb0402
kdecore: replace qmap with QStringList header inclusion in kstandarddirs header
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-08 21:21:46 +03:00
Ivailo Monev
035c864ad2
kdecore: remove redundant KConfig forward-declaration in kstandarddirs header
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-08 21:21:21 +03:00
Ivailo Monev
d659ad0241
kdecore: expect KLockFile::getLockInfo() to fail if not called on the lock owner in the KLockFile test
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-08 17:49:43 +03:00
Ivailo Monev
82a503ebb3
kdecore: minor KLockFile optimization
...
it is cheaper to realloc() the QByteArray data
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-08 17:34:42 +03:00
Ivailo Monev
7607559fd2
kdecore: replace private KStandardDirs methods with their body
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-08 16:17:00 +03:00
Ivailo Monev
cc1b77d904
kdecore: convert KStandardDirs::exists() and KStandardDirs::realPath() to static methods
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-08 15:26:19 +03:00
Ivailo Monev
ae5646a52f
kdecore: deduplicate code in KLocalePrivate
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-08 15:00:53 +03:00
Ivailo Monev
0812a98d19
kdecore: block only when another process is holding the lock in KLockFile::lock()
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-08 14:12:41 +03:00
Ivailo Monev
2e9adc69c4
kdecore: kglobal header inclusion is no longer required in klockfile header
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-08 13:57:07 +03:00
Ivailo Monev
90cc0a794c
kdecore: mark KFolderMimeTypePrivate reimplementations as final
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-08 07:07:49 +03:00
Ivailo Monev
fce08e0ff9
kdecore: KLockFile documentation corrections
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-08 06:54:40 +03:00
Ivailo Monev
5d42434579
kdecore: KLockFile branches optimizations
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-08 03:41:29 +03:00
Ivailo Monev
cada9f78a4
kdecore: KLockFile rewrite
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-08 03:28:20 +03:00
Ivailo Monev
5a32a5865c
kdecore: drop support for locking NFS files on servers v3 or older
...
note that KLockFile is used only by KConfig (its INI backend), anything
not using KConfig to access files is not affected by the lock method
KLockFile uses
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-08 01:20:50 +03:00
Ivailo Monev
abc0f87ee4
kdecore: use uninitialized QByteArray instead of resizing it after creation
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-08 03:09:41 +03:00
Ivailo Monev
b8cda045bd
kdecore: do not assume the output exists in KDE::rename()
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-07 22:49:55 +03:00
Ivailo Monev
4ff227e336
kdecore: emulate cross-filesystem move in KDE::rename()
...
if the temporary directory is of tmpfs type (which is the case on
Debian) then moving temporary files will fail thus thumbnails will not be
cached for example because they are stored as temporary file first and
then moved to ~/.thumbnails
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-07 22:38:57 +03:00
Ivailo Monev
ce5ff1c1c8
kdecore: implement temporary filepath generator
...
using it means no disk I/O to generate temporary filepaths in some cases
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-07 05:17:49 +03:00
Ivailo Monev
c0d5ff224b
generic: using timezone related classes no longer requires org.kde.kded service
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-06 23:41:36 +03:00
Ivailo Monev
37878bd452
kdecore: move private KFilterBase members to the private data pointer class
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-06 22:36:06 +03:00
Ivailo Monev
3ab3f3b47f
kutils: new karchive library to replace KZip and KTar
...
it has to solve a few problems like:
1. blocking the current thread while listing, extracting or adding to
archive
2. lack of support for some archive formats such as 7-zip in the
previously available classes for dealing with archive
3. progress and error reporting
a KArchiveJob class may have to be implemented to solve the above
issues. the API is just as frustrating to use as KTar and KZip right now
tho and I am not happy with that but the class itself is a 3-rd rewrite
of what was once Python module, plugin for another project and now used
as base in library.
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-06 16:53:55 +03:00
Ivailo Monev
8bb2fec99a
generic: drop support for archive KIO slaves
...
KIO was designed around remote protocols and is very much not suitable for
archive browsing for example
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-06 14:41:24 +03:00
Ivailo Monev
045328e4b6
generic: regenerate parsers
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-04 08:52:24 +03:00
Ivailo Monev
25f748a009
kdecore: tune the buffer sizes in KSystemTimeZonesPrivate::update()
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-04 08:35:18 +03:00
Ivailo Monev
ec1a9d532f
kdecore: typo
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-04 08:31:24 +03:00
Ivailo Monev
8e7c91c20d
kdecore: process events for no more than 250ms while waiting for service to unregister in KAuthorization::execute()
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-04 03:29:20 +03:00
Ivailo Monev
df6025d743
kdecore: add code for printing the time it takes to update the zones cache
...
takes ~15ms when plasma-desktop is started for the first time here,
followup updates take 3-4ms
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-04 01:06:13 +03:00
Ivailo Monev
fb21ef07e8
kdecore: use sscanf() for parsing zone.tab
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-03 20:16:55 +03:00
Ivailo Monev
9b07290ada
kdeui: prefix HOME_URL, BUG_REPORT_URL and BUG_REPORT_EMAIL definitions with "KDE_"
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-03 16:25:13 +03:00
Ivailo Monev
9c52bc5674
kdecore: open the wiki when help is requested
...
help KIO slave is no longer maintained
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-03 16:03:50 +03:00
Ivailo Monev
e587e6ad28
kdecore: update comment and remove unused variable in KSaveFile::backupFile()
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-03 14:34:32 +03:00
Ivailo Monev
dbf9fba9a7
kdecore: remove redundant append operator for QStringList
...
QList<T> already provides it
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-03 04:56:03 +03:00
Ivailo Monev
35f5796e18
kdecore: scoop timezones
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-03 04:44:16 +03:00
Ivailo Monev
c9dfc0f13a
kdecore: avoid temporaries while parsing zone.tab
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-03 03:43:37 +03:00
Ivailo Monev
47dd5145e3
kdecore: minor zone.tab parsing optimizations
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-02 16:51:05 +03:00
Ivailo Monev
63decfbc2c
kdecore: remove redundant qobject header inclusion in ksystemtimezone header
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-02 11:53:45 +03:00
Ivailo Monev
c8da57185f
kdecore: optimize zoneinfoDir() function by using KDE::stat()
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-01 22:24:44 +03:00
Ivailo Monev
f2b5c374ed
kdecore: check for arc4random_uniform() and use it in KRandom::randomMax() if available
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-01 21:22:43 +00:00
Ivailo Monev
af34fced45
kdecore: mark QByteArray object as const in KSystemTimeZones::local()
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-01 19:54:39 +03:00
Ivailo Monev
bf9e83491f
kdecore: a bit more strict zone.tab line validation
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-01 19:53:43 +03:00
Ivailo Monev
86083f700b
kdecore: check if the watcher pointer is null before posting delete event for it
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-01 19:52:59 +03:00
Ivailo Monev
c00faabcb7
kdecore: use QFileSystemWatcher instead of KDirWatch in KSystemTimeZones
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-01 18:48:13 +03:00
Ivailo Monev
21089d5032
kdecore: minor KSystemTimeZones::local() optimization
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-01 16:34:55 +03:00
Ivailo Monev
6f0b3eda3b
kdecore: merge KTzfileTimeZone and other tzdata related classes into the base classes
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-01 16:08:05 +03:00
Ivailo Monev
049d05d3c2
kdecore: simplify zone.tab line splitting
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-01 13:17:20 +03:00
Ivailo Monev
33a4458cc3
kdecore: cache the timezone that is not from TZ environment variable
...
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-01 13:07:16 +03:00