Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Workspace
Commits
7fca49ef
Commit
7fca49ef
authored
Oct 09, 2020
by
Ahmad Samir
Browse files
Fix lookandfeel unit test
parent
d6319d28
Changes
1
Hide whitespace changes
Inline
Side-by-side
kcms/lookandfeel/autotests/kcmtest.cpp
View file @
7fca49ef
...
...
@@ -94,11 +94,13 @@ void KcmTest::cleanupTestCase()
void
KcmTest
::
testWidgetStyle
()
{
m_KCMLookandFeel
->
setWidgetStyle
(
QStringLiteral
(
"
c
us
tomTestValue
"
));
m_KCMLookandFeel
->
setWidgetStyle
(
QStringLiteral
(
"
F
us
ion
"
));
KConfig
config
(
QStringLiteral
(
"kdeglobals"
));
KConfigGroup
cg
(
&
config
,
"KDE"
);
QCOMPARE
(
cg
.
readEntry
(
"widgetStyle"
,
QString
()),
QString
(
"customTestValue"
));
// We have to use an actual theme name here because setWidgetStyle checks
// if the theme can actually be used before it changes the config
QCOMPARE
(
cg
.
readEntry
(
"widgetStyle"
,
QString
()),
QString
(
"Fusion"
));
}
void
KcmTest
::
testColors
()
...
...
@@ -182,7 +184,8 @@ void KcmTest::testKCMSave()
KConfig
config
(
QStringLiteral
(
"kdeglobals"
));
KConfigGroup
cg
(
&
config
,
"KDE"
);
QCOMPARE
(
cg
.
readEntry
(
"widgetStyle"
,
QString
()),
QString
(
"testValue"
));
// See comment in testWidgetStyle
QCOMPARE
(
cg
.
readEntry
(
"widgetStyle"
,
QString
()),
QString
(
"Fusion"
));
cg
=
KConfigGroup
(
&
config
,
"General"
);
//save() capitalizes the ColorScheme
...
...
@@ -201,7 +204,7 @@ void KcmTest::testKCMSave()
KConfig
splashConfig
(
QStringLiteral
(
"ksplashrc"
));
cg
=
KConfigGroup
(
&
splashConfig
,
"KSplash"
);
QCOMPARE
(
cg
.
readEntry
(
"Theme"
,
QString
()),
QString
(
"
org.kde.test
"
));
QCOMPARE
(
cg
.
readEntry
(
"Theme"
,
QString
()),
QString
(
"
customTestValue
"
));
QCOMPARE
(
cg
.
readEntry
(
"Engine"
,
QString
()),
QString
(
"KSplashQML"
));
KConfig
lockerConfig
(
QStringLiteral
(
"kscreenlockerrc"
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment