https://bugs.kde.org/show_bug.cgi?id=516792
Bug ID: 516792
Summary: kcolorschemeeditor: cannot load scheme using name
displayed in KCM, crash if save attempted
Classification: Applications
Product: systemsettings
Version First master
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: kcm_colors
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
Target Milestone: ---
This KCM module also provides the 'kcolorschemeeditor' CLI tool to edit colour
schemes, to which this bug applies.
SUMMARY
The help output for the command says that the argument to specify the colour
scheme should be:
Arguments:
theme Scheme to edit or to use as a base.
However, if the scheme name contains spaces then there is a discrepancy between
the name that this command expects and the name that is displayed in the KCM.
For example, if the user creates and saves a scheme in the KCM with the name
"Foo Bar", it is displayed in the KCM with that name but stored in a file named
with the spaces removed and the full name recorded internally:
$ ll /home/jjm6/.local/share/color-schemes/Foo*
-rw------- 1 jjm6 users 3.4K Feb 27 09:24
/home/jjm6/.local/share/color-schemes/FooBar.colors
$ grep Name= /home/jjm6/.local/share/color-schemes/FooBar.colors
Name=Foo Bar
$
But then, when trying to edit the scheme from the CLI using the displayed name,
the existing scheme is not found or loaded and a default is displayed. Worse,
when trying to save the scheme after editing, the applicaton crashes:
STEPS TO REPRODUCE
$ kcolorschemeeditor --overwrite 'Foo Bar'
kcolorschemeeditor KIconTheme::KIconTheme: Icon theme "" not found.
kcolorschemeeditor KConfigGroupPrivate::KConfigGroupPrivate: Created a
KConfigGroup on an inaccessible config location "((NullDevice))" "General"
(the above message repeated many times)
(make a change, click "Save")
kcolorschemeeditor unknown: ASSERT: "n <= d.size - pos" in file
/usr/include/qt6/QtCore/qstring.h, line 1190
Aborted (core dumped) kcolorschemeeditor --overwrite 'Foo
Bar'
$
OBSERVED RESULT
The named scheme is not loaded, and saving gives the assert message as above.
The crash happens in SchemeEditorDialog::saveScheme() because m_schemeName is
an empty string.
EXPECTED RESULT
The scheme should be able to be edited using the user visible name as displayed
in the KCM.
SOFTWARE/OS VERSIONS
Operating System: Gentoo 2.18
KDE Plasma Version: 6.5.80
KDE Frameworks Version: 6.23.0
Qt Version: 6.10.2
Kernel Version: 6.6.47-gentoo-x86_64 (64-bit)
Graphics Platform: X11
Processors: 3 × AMD Phenom(tm) II X3 705e Processor
Memory: 16 GiB of RAM (15.6 GiB usable)
Graphics Processor: NVIDIA GeForce GT 730
ADDITIONAL INFORMATION
Running the command as
$ kcolorschemeeditor --overwrite 'FooBar'
loads the intended scheme file and saves it correctly again. However, the user
has no way of knowing what the internal name of their colour scheme should be,
from the KCM at least.
--
You are receiving this mail because:
You are watching all bug changes.