diff options
| author | Méven Car <[email protected]> | 2024-10-27 17:20:40 +0000 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2024-10-27 17:20:40 +0000 |
| commit | fdf854bd81d9e42df2d8672d49a0b7fcdb7443a5 (patch) | |
| tree | 63e52b962b465d1af5ff46fe2935125827ab2e0c /src/views/viewproperties.h | |
| parent | ad8a75cd9f5fa26710e3334a1aae34a88b0333c0 (diff) | |
ViewProperties: Store view properties in extended file attributes
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
Diffstat (limited to 'src/views/viewproperties.h')
| -rw-r--r-- | src/views/viewproperties.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/views/viewproperties.h b/src/views/viewproperties.h index 29827c38b..44c703482 100644 --- a/src/views/viewproperties.h +++ b/src/views/viewproperties.h @@ -109,21 +109,13 @@ public: void save(); /** - * @return True if properties for the given URL exist: - * As soon as the properties for an URL have been saved with - * ViewProperties::save(), true will be returned. If false is - * returned, the default view-properties are used. - */ - bool exist() const; - -private: - /** * Returns the destination directory path where the view * properties are stored. \a subDir specifies the used sub * directory. */ QString destinationDir(const QString &subDir) const; +private: /** * Returns the view-mode prefix when storing additional properties for * a view-mode. @@ -161,6 +153,11 @@ private: */ static QString directoryHashForUrl(const QUrl &url); + /** @returns a ViewPropertySettings object with properties loaded for the directory at @param filePath. Ownership is returned to the caller. */ + ViewPropertySettings *loadProperties(const QString &folderPath) const; + /** @returns a ViewPropertySettings object with the globally configured default values. Ownership is returned to the caller. */ + ViewPropertySettings *defaultProperties() const; + Q_DISABLE_COPY(ViewProperties) private: |
