┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/tests/viewpropertiestest.cpp
AgeCommit message (Collapse)Author
2026-02-21viewproperties: don't use intermediate tmp file to save viewpropsMéven Car
2026-01-12viewproperties: remove temp file after loading defaultConfigSergey Katunin
It turns out that since f6c97d52220be9bd996b71309051e56ff7aa1834 a temp file is created here with each `save()` call for this default config, which is not deleted later. In another place where `defaultProperties()` is called for `m_node`, the file is deleted in the destructor of this class. But it is not deleted here. So, remove temp file after loading defaultConfig or it will create temp file on each save() operation in /tmp folder. Also keep the global/.directory file when xattr isn't supported. BUG: 510500
2025-09-03Fix several user-facing and non-user-facing typosKunda Ki
Found via `codespell -S "*.desktop,*.po,*.svg,*.xml,./po" -L aparent,childs,goup,lokal`
2025-02-08viewpropertiestest: simplify two testsMéven Car
2025-02-08Viewproperties: prevent loosing view settingsMéven Car
When they match the hardcoded internal settings, when they should be kept as long as they don't match the currently set default viewproperties. Is saved in metadata the diff with the hardcoded internal defaults still. A stable default reference allows to change defaults without changing existing saved viewproperties. CCBUG: 495878
2024-12-16ViewProperties: Return nullptr if viewPropertiesString is emptyAkseli Lahtinen
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
2024-10-27ViewProperties: Store view properties in extended file attributesMéven Car
Existing settings are converted. Works on most FS except FAT/exFAT which fallback to .directory files. If the extended file attributes (in ADS in Windows) can't be saved, they are saved to file as before. BUG: 322922 You can see file xattr using for instance for Unix filesystems: getfattr -d /home/meven
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2021-03-13Enable test mode in all testElvis Angelaccio
2021-02-09Build with QT_NO_KEYWORDSNicolas Fella
2020-08-25Output of licensedigger + manual cleanup afterwards.Elvis Angelaccio
Unfortunately licensedigger does not strip the trailing * characters. While at it, use a common style for all source files.
2019-11-09Remove unnecessary semicolons after Q_UNUSEDElvis Angelaccio
GIT_SILENT
2018-03-03Remove unused #includeRoman Inflianskas
Summary: I used CLion inspection to hunt all unused #include Reviewers: #dolphin, elvisangelaccio, markg Reviewed By: #dolphin, elvisangelaccio, markg Subscribers: markg, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10985
2017-11-21Modernize: Use nullptr everywhereKevin Funk
2016-12-03Fix viewpropertiestest when GlobalViewProps is trueElvis Angelaccio
The test was not saving its changes to the global settings, so it was passing on the CI only because the default value of GlobalViewProps is already false. If GlobalViewProps was set to true instead, testAutoSave() would fail because save() was not called and GlobalViewProps was not
2015-02-26Use QT_GUILESS_MAINHeiko Becker
REVIEW: 122730
2014-12-18Ported tests away from KRandomSequence, QTest::kWaitForSignal and KTempDir.Emmanuel Pescosta
All tests passed!
2014-10-18Fix includesMontel Laurent
2014-10-18Port test to qt5Montel Laurent
2012-05-18Don't create a .directory-file for each directoryPeter Penz
This regression has been introduced on master and has not been released yet: Due to the changed properties-format an update has been done which resulted in writing a .directory file into each newly entered directory. The patch updates the view-properties and version only in the constructor so that it is assured that reading properties never accidently will change the internal version. A unit-test has been added to catch regressions like this in future. BUG: 300240 FIXED-IN: 4.9.0