heikobecker created this revision. Herald added a project: Plasma. Herald added a subscriber: plasma-devel. heikobecker requested review of this revision.
REVISION SUMMARY After a9f3a3d <https://phabricator.kde.org/R99:a9f3a3ddcb0b197f96b750323201da438f15c4ad> 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. I'm not sure how likely the absence of the config file is, but it's easy to recover from by creating an empty file first. We're trying to save our settings afterwards anyway. 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 - REPOSITORY R99 KDE Gtk Configuration Tool BRANCH Plasma/5.17 REVISION DETAIL https://phabricator.kde.org/D24087 AFFECTED FILES src/appearancegtk2.cpp To: heikobecker Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, ZrenBot, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
