Skip to content
Commit d3060530 authored by Heiko Becker's avatar Heiko Becker 🏃
Browse files

Create an empty config (.e.g ~/.gtkrc-2.0) if none exists

Summary:
After a9f3a3dd saveSettingsPrivate() errors out if the config file
doesn't exist. This is because QFile::open(QIODevice::ReadOnly... )
doesn't create a new file for non-existant filenames, like the
same invocation with the previously used QIODevice::WriteOnly does.

A place there this problem occurred is the configsave unit test. The
filenames passed in ConfigSaveTest::testGtk2 don't exist when running
the test, causing it to fail without this patch.

Test Plan:
- Moved ~/.gtkrc-2.0 out of the way, ran kcmshell5 kde-gtk-config,
  saving didn't error out
- "make test" passes again

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D24087
parent 5d5979ee
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment