]> cloud.milkyroute.net Git - dolphin.git/commit
ViewProperties: Return nullptr if viewPropertiesString is empty
authorAkseli Lahtinen <akselmo@akselmo.dev>
Mon, 16 Dec 2024 19:00:03 +0000 (19:00 +0000)
committerMéven Car <meven@kde.org>
Mon, 16 Dec 2024 19:00:03 +0000 (19:00 +0000)
commit8d155558e980197b4dc2180660ea9bc61a23f3d3
tree4b166b514e51a1da1dbc51ec2a9485f2ee1edd1d
parent37b081331e19b8b10bc80b8aecc4ff43de2474c0
ViewProperties: Return nullptr if viewPropertiesString is empty

If viewPropertiesString is empty, return a nullptr.
This will later used in the stack by the defaultProperties call.

In defaultProperties, if we can't find the global directory,
create new one with a tempfile. If tempfiles can't be created,
use default instead.

This will ensure that view settings are saved and loaded correctly
if user has separate view properties per folder.

This will also add an unit test, where we create a global directory,
modify it and make sure the changes are reflected in the unmodified
folder.

BUG:495878
src/tests/viewpropertiestest.cpp
src/views/viewproperties.cpp