Instead of immediately saving, which leads to poor performance,
and possible hardware damage (see #6057), limit saves to once
per second (similar to how KDE does it). It also guarantees
that only one save is required per second, by sharing a QSettings
object, and establishes a signaling framework to put other
setting save events into (but only uses this for the two major
offenders: playlist tab switching and window resizing).
This is in contrast to 6a312e7, which simply deferred the save
until program exit, and caused problems for some people (see #6217
and #6209).
Signed-off-by: Antonio Russo <antonio.e.russo@gmail.com>
Qt 5.11 added a function allowing the first column in a list to be set
to be movable. Contingent on its availability, make the first column
of the playlist viewer draggable.
Async song loading can fail without user feedback. This change adds return codes
to these async load functions. It will now produce an error dialog in simple
scenarios (test case is user selecting a file that is not readable). Other cases,
such as directories and playlists, aren't yet covered.
* Allow ignoring prefixes when sorting playlist
This introduces new configuration options which allow you to ignore
prefixes while sorting the playlist on album, artist and titles.
Prefixes are configurable, default are "a" and "the".
* Change QStringLiteral to QString for compatbility with Qt 4.8
This introduces new configuration options which allow you to ignore
prefixes while sorting the playlist on album, artist and titles.
Prefixes are configurable, default are "a" and "the".
- Disabling playlist row glow by default
- Track slider popup visible by default, add hide()
to ensure not visible by default (no more repaints)
- Set kTrackSliderUpdateTimeMs to 500. IMO 40 is too low
This should partially fix issue #1079
Any access, read or write, via QSettings requires locking
`Clementine.conf`. On some devices, this can be slow. Moreover, it also
increases power use and wear on devices such as SSDs.
To improve the situation, defer QSettings updates until program close
for window resize, current playlist tab, and playlist geometry, i.e.
`PlaylistView::SaveGeometry`.
Also, limit `PlaylistView::LoadGeometry` to once per program run.
Signed-off-by: Antonio Russo <antonio.e.russo@gmail.com>
There was an issue where the song items were only being shown
from a fresh start up but not when the playlist was created. This fixes
that issue and refactors the AddPlaylist code
This allows power users who keep 100s of playlists to easily
find a playlist either by directory name, playlist name or by
searching for a song artist/title a playlist might contain