Age | Commit message (Collapse) | Author |
|
KConfigIniBackend relies on QLockFile which changes the content Uri and
this is bound to fail because we don't have permission. So, for these
Uris we use Android's Internal cache directory to save the .lock files.
|
|
GIT_SILENT
|
|
We were calling open(), then fopen(), then QFile::open(). This patch
removes the fopen() call that does not seem to do anything.
|
|
Otherwise we force consumers to use the config location for state data,
which is what we are trying to avoid.
Task: https://phabricator.kde.org/T12549
|
|
BUG: 441537
FIXED-IN: 5.86
|
|
Now generate Q_ENUM(<enum-name>)
|
|
|
|
|
|
Now that KF requires Qt 5.15.2; this basically reverts commit 2e8742e64fc0
with some trivial changes.
NO_CHANGELOG
|
|
clang-tidy checks:
readability-isolate-declaration and readability-braces-around-statements
KF task: https://phabricator.kde.org/T14729
GIT_SILENT
|
|
The code was using a QSet (hash-based), use a std::set instead
for unicity, it gives us sorting for free.
We probably want to do the same in groupList(), but that's separate.
|
|
This is the case where we expected to see Key[$d] in the config file,
and it was somehow broken. When saving, the key was omitted, so when
reloading the kdeglobals key was present again.
Detected when trying to write a unittest for a different patch...
I had to reshuffle the unittest a bit because testThreads calls
testSimple which didn't expect that the "[AAA]" group would actually
be deleted now.
|
|
GIT_SILENT
|
|
|
|
|
|
We are only interested in whether the file doesn't exist when it fails
to open. This saves a stat on every successful config file parse.
|
|
At the moment we are taking a bit of a detour by converting to char*.
Not a bit deal but reads better and ends up being less calls.
|
|
Whenever we read a config file, we are first parsing kdeglobalsrc. This
caches the parsed entries so that they can be reused as long as it
hasn't changed.
This reduces the parseConfig calls (which is mostly prominent at
early process startup) from 18 to 12 (33%) ksmserver-logout-greeter.
This also means there's better cache locality as well as less memory
allocated as a lot of objects are shared but I have not measured this.
|
|
NO_CHANGELOG
|
|
This reverts commit b3dc879e8b108c26c929bfbe551bcdf77f140e94.
This change breaks plasmashell startup and possible other apps as well.
Reverting so the root cause can be investigated without time pressure.
|
|
calling deleteGroup only deletes all entries but the group does still
exists in listGroups
this is somewhat irritating since calling exists on that group will
return false
with this patch the group does no longer exists in listGroup
|
|
NO_CHANGELOG
|
|
QStringView has some bits of API that were only added in 5.15.2, whereas KF
requires 5.15.0.
This reverts commit 1780fb2a237af80ddc1f9cfb70cb892b53b91990.
|
|
The symbol export/visibility attribute is not standardized so far and
needs to be set by language extension attribute declaration at least
with clang & MSVC, who both support that when it appears before the
standard attribute declaration.
NO_CHANGELOG
|
|
A window that is maximized does not really have a position on screen
other then the fact that it's maximized, and writing out position data
in this case anyway will only serve to mis-position the window once
da-maximized, should KWin ever stop remembering de-maximized window
positions internally.
CCBUG: 434116
|
|
NO_CHANGELOG
|
|
Some methods in ConfigLoaderHandler always returned true, change them to return
void instead. Also port them to take a QStringView instead of QStringRef, this
doesn't require a lot of changes because a QStringView can be constructed from
a QStringRef.
QXmlStreamAttribute methods like value() and name() return QStringRef in Qt5
and QStringView in Qt6, "fix" the issue by using auto keyword, which works
in both cases.
QStringView::toInt() isn't efficient in Qt5 so make the build conditional.
NO_CHANGELOG
|
|
This matches the method actually does, and makes it clearer that you don't
need to do config->sync() followed by config()->reparseConfiguration(), the
latter should suffice.
|
|
|
|
Since the FSDevice .desktop template hasn't been installed for a long time,
this method in KDesktopFile hasn't been useful. The whole FSDesktop concept
seems to be redundant nowadays, since CDRom and Floppy drives have been replaced
by USB sticks.
See this KF6 taks for more details:
https://phabricator.kde.org/T14295#253759
|
|
It's internal, the symbols are not exported, the header is not installed.
The _p.h naming makes this more obvious, when grepping for stuff in
public API.
|
|
All named authors from copyright statements confirmed this change
(confirmations at sysadmins' longterm archive). From the git history
check, relicensecheck tells:
- lgplv2+: mdawson pandom79@gmail.com
mdawson ( 6 LOC): 0005ba7
pandom79@gmail.com ( 4 LOC): eeb2bbe
Whereas pandom79 does not posses a KDE contributor account but also
confirmed via private mail (confirmation mail also in sysadmins'
archive).
Change 0005ba7 is a syntactical replacement of QT_TRANSLATE_NOOP with
QT_TRANSLATE_NOOP3 and thus can be assumed to not by copyrightable.
|
|
All named authors from copyright statements confirmed this change
(confirmations at sysadmins' longterm archive). From the git history
check, relicensecheck tells:
- lgplv2+: pandom79@gmail.com
pandom79@gmail.com ( 7 LOC): eeb2bbe
Whereas pandom79 does not posses a KDE contributor account but also
confirmed via private mail (confirmation mail also in sysadmins'
archive).
|
|
This fixes the clang warning
globalsettings_kmail.h:58:5: warning: '~GlobalSettingsBase' overrides a destructor but is not marked 'override' [-Wsuggest-destructor-override]
|
|
In Qt6 QDomDocument does not open the file itself any more
|
|
|
|
NO_CHANGELOG
|
|
Now it creates C++ code that uses QString::arg(Args...) instead of
arg().arg().
AFAICS, the type of the "Args" is QString, so this should work.
|
|
- Use more range-for loops where appropriate
- Use auto instead of the usually-long iterator type names
- Use cbegin/cend(), to match the std:: containers, less confusion
- Use qDeleteAll instead of a for loop
- Make a QRE with a long-ish pattern static
NO_CHANGELOG
|
|
- Use QString::arg(Args...) instead of .arg().arg()
- Use QLatin1String for string comparisons, should be faster
- Use QLatin1String::arg() for better readability
- Add the comment dfaure suggested in the MR, to explain why it's '2%'
then '%1' in a QString().arg().arg()
NO_CHANGELOG
|
|
This was missed in https://invent.kde.org/frameworks/kconfig/-/merge_requests/41
|
|
The implicit conversion fails in Qt6
|
|
NO_CHANGELOG
|
|
- This has the same logic as QMap::constFind(); less detaching and now we
can use auto keyword when creating iterators and always get a const_iterator
even when calling constFindEntry() on a non-const map.
- Use QCOMPARE() where appropriate in the unit tests.
|
|
NO_CHANGELOG
|
|
NO_CHANGELOG
|
|
GIT_SILENT
|
|
We have a fallback string that gets searched for in the KCM, but that
fallback itself should not have a fallback, or else we always use that
second fallback and the window gets positioned incorrectly the first
time it's opened. So let's replace the second fallback with -1.
BUG: 432661
FIXED-IN: 5.79
|
|
- Use a global var for a QString that's used many times
- Break up long-all-cap variable names, it makes it harder to read (and
I've fixed one typo in one of those ALLCAPS)
- Fix some clazy warnings, make global QString objects in unit tests
static (so that the compiler doesn't create symbols for them, it doesn't
matter in a unit test but KF code acts as a reference sometimes that
others copy from, tip from dfaure)
- Add TODO note about changing kconfig_compiler to generate C++ code that
uses multi-arg QString::arg(QString, QString, QString) instead of
QString::arg().arg()
- More const; more QString::at() instead of operator[] where appropriate
- Use a ternary where it makes the code more readable (and uses less lines :))
NO_CHANGELOG
|
|
NO_CHANGELOG
|