1. 09 May, 2021 1 commit
  2. 08 May, 2021 1 commit
  3. 07 May, 2021 1 commit
  4. 25 Apr, 2021 2 commits
  5. 14 Apr, 2021 1 commit
  6. 29 Mar, 2021 2 commits
  7. 28 Mar, 2021 6 commits
  8. 26 Mar, 2021 1 commit
    • Michael Pyne's avatar
      tag_scan: Fix painful rescan of music metadata on startup. · d6b28a9b
      Michael Pyne authored
      For the longest time, JuK has suffered from a problem where its intended
      behavior to load music metadata from a cached database, instead of
      re-scanning every individual track on startup, was not working right.
      There has been debugging lines in JuK since all the way back to 2013
      trying to trace what area of startup sequence was taking up all the
      time, but to no avail in helping me fix the bug.
      The Problem
      Recently I took a different approach, of adding a debug-only crash
      whenever we would load a music track tag the "slow" way, and long story
      short there were two bugs that each would cause slowdown:
      1. Playlists aside from the CollectionList would cause every music track
         in that playlist to be re-scanned. What this means is that every
         though the music in the CollectionList would be loaded quickly, if
         you had that same music track in a separate Playlist, that music
         track would reload the same tags from disk rather than cop...
  9. 24 Mar, 2021 3 commits
    • Michael Pyne's avatar
      dynamicplaylist: Ensure subclasses handle virtual calls in dtor. · 36581b2b
      Michael Pyne authored
      LGTM points out that DynamicPlaylist's destructor calls a function which
      indirectly leads to a virtual call (updateItems) in a potential subclass
      (SearchPlaylist). By C++ rules, SearchPlaylist has ceased to be a
      SearchPlaylist by the time DynamicPlaylist::~DynamicPlaylist() begins,
      so the virtual call would never actually be dispatched to
      Fix by having SearchPlaylist do its own updating on destruction.
    • Michael Pyne's avatar
      playlist: Ensure playing track is visible when it changes. · cbfe92c3
      Michael Pyne authored
      I tried to ensure this only causes the playlist to jump when the user
      isn't directly interacting with the track (e.g. double click to play).
    • Michael Pyne's avatar
      nowplaying: Improve clickable link search in Now Playing bar. · a9f85d8d
      Michael Pyne authored
      * The "album" link now searches for any matching tracks of the same album,
        even with different artists.
      * The search applies to the playlist that is selected, even if you're
        playing from a different playlist.
      * The playing item is reset to the Collection List when the "return to
        playlist" link is selected rather than pulling from the internal
        search playlist (which is likely to be destroyed by a subsequent
  10. 23 Mar, 2021 5 commits
  11. 21 Mar, 2021 8 commits
  12. 20 Mar, 2021 5 commits
    • Michael Pyne's avatar
    • Michael Pyne's avatar
      playlistbox: Use QVector instead of QList for list of playlists. · 16b7811c
      Michael Pyne authored
      Along with more assorted modernization and cleanup.
    • Michael Pyne's avatar
      playlistbox: Modernize code a bit. · 18b1b6c4
      Michael Pyne authored
    • Michael Pyne's avatar
      playlistcollection: Minor cleanups, rename object(). · 9971b7b3
      Michael Pyne authored
      So the PlaylistBox stuff exists in a sort of unusual class structure:
        * PlaylistCollection, a plain class just holding playlist info
        * PlaylistCollection::ActionHandler, used for non-GUI stuff that still
          needs signals/slots (i.e. action handling)
        * PlaylistBox, the actual GUI class with full-blown QWidgets and the
      This sort of makes sense (it's an early instance of the approach Qt
      would take with Model/View in Qt4) but it was even confusing me again.
      So I've tried to rename to make the roles more clear, removed "using
      namespace" stuff that muddies the picture up more and did some minor
      other cleanups while I was here.
    • Michael Pyne's avatar
      ui: Focus the playlist search line edit on startup. · 2995715e
      Michael Pyne authored
      This helps avoid the new QToolButton in the status bar from being
      highlighted for no reason and is more convenient for playing music when
      you first start JuK up.
      In the process, use the standard Qt focus proxy feature rather than
      manually emulating the effect, though this needs me to enable C++14 to
      use the nicer qOverload<> instead of QOverload.
  13. 18 Mar, 2021 4 commits
    • Michael Pyne's avatar
      history: Enforce specific date format that sorts right. · d4bf5912
      Michael Pyne authored
      The QTreeWidget we're using sorts by display text by default. This makes
      the date column in the history playlist a bit useless to sort by in the
      normal format.
      The ISO date format is a bit too ugly though, so I manually implement
      something more akin to RFC 3339. To properly fix this we should
      implement a specific role in each item that can be sorted by the
      underlying model. If the underlying model is a QStandardItemModel this
      might already be easy but I don't have time now to investigate further.
    • Michael Pyne's avatar
      Address undefined behavior during shutdown. · fce79085
      Michael Pyne authored
      Event filters strike again, along with our old friend, sibling ordering
      dependencies not captured by the Qt memory hierarchy. Again, noted by
    • Michael Pyne's avatar
      playlist: Avoid resizing columns until after we've generated weights. · 66ddbb3b
      Michael Pyne authored
      This avoids warnings about undefined use of NaN and similar, when we try
      to resize the columns too early (before there are any tracks to use to
      inform average column widths).
    • Michael Pyne's avatar
      Fix undefined behavior in PlaylistItem. · b67785f9
      Michael Pyne authored
      The PlaylistItem ctor meant to be called from its subclass's constructor
      (CollectionListItem) copied the this pointer too early. When
      PlaylistItem is being constructed, by C++ rules the PlaylistItem is not
      a CollectionListItem yet. This was appropriately flagged by ubsan.
      I fixed this by ensuring the only user of this subclass fixes up the
      pointer as soon as it can, and making it a private constructor so it's
      not used elsewhere by mistake.