┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/viewproperties.cpp
AgeCommit message (Collapse)Author
2025-06-09viewproperties: Fix leaking file descriptorsAkseli Lahtinen
File descriptors would keep leaking here since tempFile never gets deleted. This would be especially noticeable when browsing /tmp/ folder. This patch makes the QTemporaryFile an unique_ptr, so it gets deleted when it's out of scope. This also causes the files to be handled accordingly. BUG: 505215
2025-05-28dolphinview: Add a dynamic view optionVictor Blanchard
Added a 'dynamic view' option, which allows to switch from a 'compact' or 'details' view to an 'icons' view if most of the files in the directory are images or videos. It reverts to the previous view mode when we switch to a directory which doesn't meet that criteria. The view mode is only changed once so users don't have to undo that for specific folders when they don't want icon view. A setting is added in the "Display style" section of the general view setting page. BUG: 491139
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
2024-09-15ViewProperties: sort by accesstime for recentlyusedMéven Car
By default. Since recentlyused:/ fills only access time based on the DB data. timeline:/ is also included. CCBUG: 437382
2024-04-11viewproperties: remove now obsolete recentdocument referenceMéven Car
2024-03-12Enable custom view properties for special folders even if "remember for each ↵Jin Liu
folder" is off Special folders include: search, trash, recents, timeline Not including Downloads, although we have a custom view when "remember for each folder" is on. Rational: These folders really need the custom view. So even if the user selects a global view for all "normal" folders, s/he probably still want a custom view for special folders.
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2022-03-28[ViewProperties] Apply better default roles for special viewsKai Uwe Broulik
This adds the following additional special view modes (some of them were already there but broken because they weren't applied, or were changed to have better defaults now that they are actually used): * Recent Files and Recent Documents, timeline: Details view with grouped sorting enabled and Name, Path, Modified * Search For Images: Icon view with Name, Dimensions, Date Time of the Picture * Search For Audio: Details view with Name, Artist, Album, Duration * Search For Videos: Icon view with just Name * Search For everything else, including Documents: Details view with Name, Path, Modified * Trash: Details view with Name, (Original) Path, Deletion Time BUG: 400969 BUG: 340393 BUG: 186376 FIXED-IN: 22.04.0
2022-03-28[ViewProperties] Consider existing roles in convertAdditionalInfoKai Uwe Broulik
Otherwise all default overrides for roles we perform in this class are moot.
2021-10-30Add support for recentlyused: kio to view properties.David Murray
Add "recentlyused" to the URL schemes recognised by ViewProperties as needing special handling. User-set view properties for the recentlyused: kio are then saved under view_properties/recentlyused in dolphin's app data directory. (Previously, the recentlyused: kio was treated, by default, as if it was a remote location for the purposes of view properties. Since it displays somewhat specialised results (files/directories from various locations), users might find it useful to set particular view properties and have them remembered.)
2021-08-29Revert "Revert "Configurable Show hidden files and folders last toggle""Elvis Angelaccio
This reverts commit bb67def173f31819bb9a696627f9af71c7037dcd.
2021-08-06Revert "Configurable Show hidden files and folders last toggle"Heiko Becker
This reverts commit 50149d6abb8a0a978db3c6afb5238bc42a4a89c8. It breaks the string freeze and I don't think it can count as a bug fix, so it breaks the feature freeze, too. CCMAIL: [email protected]
2021-08-05Configurable Show hidden files and folders last toggleGaston Haro
CCBUG: 241227 Revision: https://phabricator.kde.org/D29115
2020-10-31Port from QStandardPaths::DataLocation to QStandardPaths::AppDataLocationDavid Faure
They are the same on Linux (but DataLocation is deprecated). On Windows this enables the use of the roaming path. NO_CHANGELOG
2020-10-23Compile without foreachAlexander Lohnau
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-09-08GIT_SILENT: minor qstring optimizationLaurent Montel
2019-08-28Don't store view properties on network sharesKai Uwe Broulik
Entering a folder will have Dolphin determine whether it can store the view properties in a .directory file within the folder or in a generic config location. It does so by checking for permissions on the file and parent dir causing various stat calls that potentially block on a slow mount. Also, the config reading thereafter can be very slow. Moreover, network shares are typically shared between users, so one user's view properties shouldn't affect or be overwritten by this Dolphin instance. It doesn't resolve symlinks but is surely an improvement over the status quo. Differential Revision: https://phabricator.kde.org/D23458
2019-02-04Use more suitable default view mode for recent documents and Downloads folderKai Uwe Broulik
Sort them descending by date as well as: * for Recent Documents: switch to details view * for Downloads enable grouping and disable sorting folders first Differential Revision: https://phabricator.kde.org/D18697
2018-10-25Fix minor typosYuri Chornoivan
2018-09-17[ViewProperties] Check part of home first before doing file system stuffKai Uwe Broulik
There's no point in creating a QFileInfo instance and checking for file properties if we're not going to do anything with it when not inside home. Differential Revision: https://phabricator.kde.org/D15237
2018-03-04Remove unused #includeRoman Inflianskas
Summary: I used CLion inspection to hunt all unused #include Reviewers: #dolphin, elvisangelaccio, markg Reviewed By: #dolphin, elvisangelaccio, markg Subscribers: bcooksley, markg, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10985
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
2017-01-21Change "Date" to "Modified" and allow access to new "Accessed" time fieldDon Nguyen
This is merge of #128964 and #128942. This will impelement changing the "Date" field to "Modified" and allow a new "Accessed" time field to be available. This also includes changes to update configuration files. REVIEW: 129077
2016-03-16[CLAZY] Fixed all level 1 and level 2 warnings with small exceptionsArtur Puzio
REVIEW: 126771
2015-02-24Replace kDebug/kWarning by categorized logging (org.kde.dolphin)Emmanuel Pescosta
2015-02-06Clean up includesMontel Laurent
2014-12-14use save() instead of writeConfig()Emmanuel Pescosta
2014-11-10make use of initializer listsEmmanuel Pescosta
2014-10-26don't save view_properties in ~/.local/share/dolphindolphinLukáš Tinkl
looks like writableLocation() already includes the app name
2014-10-21port Dolphin from KUrl to QUrlLukáš Tinkl
REVIEW: 120688
2014-10-18Fix includesMontel Laurent
2014-10-18Fix includesMontel Laurent
2014-10-01Ported Dolphin away from KStandardDirsEmmanuel Pescosta
removed unused mirroredDirectory method REVIEW: 120194
2014-09-26Make constants const, avoids unnecessary symbols in the .data section.Volker Krause
2014-05-05Allow compiling Dolphin with KF5Alex Richardson
This does not work properly yet, there are probably quite a few bad signal/ slot connections due to KUrl -> QUrl. However dolphin starts without crashing. Accessibility is not ported since that changed quite a lot from Qt4 -> Qt5 and I have no idea how it is supposed to be used. This is the first commit for review 117395
2013-06-23Prevent possible infinite recursion in ViewPropertiesFrank Reininghaus
If each directory can have its own view properties, and loadting the .directory file fails in a directory, we have to load the global view properties. However, if we try to do this by changing the "global view properties setting" and loading the view properties for the same directory again, we might get an infinite recursion if changing the setting fails. We now force a loading of the global view properties by constructing a new ViewProperties object with an empty URL. Thanks to Kurt Hindenburg for helping to debug this issue (which was only reproducible on MacOS). BUG: 316209 FIXED-IN: 4.10.5 REVIEW: 111182
2012-11-25Fix Bug 310465 - Can't switch view mode for non-writable pathsEmmanuel Pescosta
BUG: 310465 FIXED-IN: 4.9.4 REVIEW: 107458
2012-06-08Krazy fixesPeter Penz
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
2012-05-16Provide default view properties for system-placesPeter Penz
For the "Recently Accessed"-places and "Search For"-places like documents, images, audio-files and videos proper default properties are created now (e.g. previews and images-sizes are shown when searching for "images" etc).
2012-05-09Assure backward compatibility for the sort-rolePeter Penz
Dolphin 2.1 uses "text" instead of "name" as default-role. Provide backward compatibility with older .directory files and assure that they get updated.
2012-05-06Allow to remember view-properties for search-resultsPeter Penz
Until now it was only possible to adjust the view-properties for searching in general. Now the view-properties can be adjusted dependent on the query (e.g. images, documents, ...).
2012-04-21Prepare view-engine for non-KFileItem usecasePeter Penz
Up to now the view-engine only provided a model-implementation that supports file-items. The view-engine always had been designed to be able to work with any kind of model, so now a KStandardItemModel is available. The plan is to convert the places panel to the new view-engine. It should be no problem to fix this until the feature freeze - in the worst case the places-panel code could be reverted while still keeping the KStandardItemModel changes.
2012-03-23Details view: Optionally remember user changed column-widthsPeter Penz
If the user changed a column-width in the details-view, up to now the width got reset when changing a directory or when restarting Dolphin. Now the column-widths automatically get remembered for each directory in case if the user has modified the width. The automatic resizing is still turn on per default. The storing of the custom column-width can easily be reset by right clicking on the header and selecting "Automatic Column Widths" from the context-menu. Some finetuning is still necessary (e.g. the "Adjust View Properties" dialog currently is not aware about this setting) but this will be fixed during the next weeks. BUG: 264434 FIXED-IN: 4.9.0
2012-03-18remove the : on windows to have a valid path namePatrick Spendrin
BUG:287360 (cherry picked from commit 0bf2e7c29aced29450a2ecb87a94e2d31b35f320)
2012-03-13Remove RolesInfoAccessorPeter Penz
Now KFileItemModel provides a way to access the available roles including their translations. Note that the 3 roles "comments", "rating" and "tags" have not been implemented yet in KFileItemModel and turning them on does not work currently.