1. 09 May, 2021 1 commit
  2. 08 May, 2021 1 commit
  3. 28 Mar, 2021 1 commit
  4. 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...
      d6b28a9b
  5. 24 Mar, 2021 1 commit
  6. 23 Mar, 2021 3 commits
  7. 21 Mar, 2021 2 commits
  8. 18 Mar, 2021 1 commit
  9. 23 Feb, 2021 1 commit
    • Michael Pyne's avatar
      clazy: Fix most remaining warnings. · 288c69eb
      Michael Pyne authored
      I'm not going to worry about non-POD statics in an application, and I
      can't fix the Q_PROPERTY warnings in Phonon. Other than that, all
      default clazy warnings should be gone now.
      
      Of note is the tagtransactionmanager.cpp setFile call, which is not just
      a warning but an actual bug (good job clazy!).
      288c69eb
  10. 22 Feb, 2021 1 commit
  11. 06 Feb, 2021 1 commit
  12. 10 May, 2020 1 commit
    • Michael Pyne's avatar
      playlist: Fix crasher with playlists using reserved columns. · e843f457
      Michael Pyne authored
      I introduced this bug in commit a800c1b3 trying to fix a different
      memory mis-using bug. Sigh.
      
      In this case playlists that reserve additional columns would get a valid
      memory assignment but would be copied into the memory block incorrectly.
      This needed a back_inserter as well.
      
      Thanks to Markus for pointing out the regression, then opening a bug,
      then leaving a comment to point out both of these, and then drafting a
      patch that fixes the bug.
      
      I can confirm it works in my testing, it also seems to address a bug
      relating to playback stopping abrupting at the end of a track instead of
      skipping to the next track, but who knows at this point.
      
      BUG:420718
      FIXED-IN:20.04.1
      e843f457
  13. 24 Feb, 2020 2 commits
  14. 23 Feb, 2020 4 commits
    • Michael Pyne's avatar
      playlist: Simplify dynamic playlist tracking of other playlists. · d8a5c948
      Michael Pyne authored
      We store pointers to other `Playlist` entries to ensure we can update
      their playing item state (which in the old JuK was a 'playback arrow'
      icon that would show up in the row for playing items). The idea being
      that there would be an entry in the Play Queue showing that an item was
      playing but also the same source item in the source playlist would also
      indicate that it was playing.
      
      This has been susceptible to all the normal frailties of storing
      pointers to objects whose lifetime is unpredictable. By using guarded
      pointers we can at least hopefully avoid crashing (especially on
      shutdown).
      d8a5c948
    • Michael Pyne's avatar
    • Michael Pyne's avatar
      playlist: Move M3U-based file loading to happen after ctor runs. · f4401608
      Michael Pyne authored
      This is another bug detected by LGTM
      https://lgtm.com/projects/g/KDE/juk?mode=list
      
      `loadFile()` itself calls at least four virtual methods. Rather than
      trying to de-virtualize them as I did in the last fix, I decided to just
      have the file load happen after the class is fully constructed, using
      the Qt event loop.
      f4401608
    • Michael Pyne's avatar
      playlist: Don't rely on overridden column count during construction. · a800c1b3
      Michael Pyne authored
      The LGTM code scanning site has coverage of JuK by virtue of its Github
      mirror, and reported [1] that `Playlist` was calling a function that was
      indirectly reliant on a virtual function (`columnOffset()`) that is
      overridden by subclasses like `HistoryPlaylist`.
      
      This is a bug since the C++ language specifies that a superclass
      constructor will be statically bound to call its own version of a
      virtual function (or an even higher superclass's), rather than whatever
      the subclass reimplementation might ultimately be.
      
      This is fixed by using the data we already have at the time of
      construction to set aside the right number of columns and then just
      holding onto the header labels generated rather than trying to
      introspect later.
      
      [1] https://lgtm.com/projects/g/KDE/juk?mode=list
      a800c1b3
  15. 18 Feb, 2020 2 commits
    • Michael Pyne's avatar
      ui: Fix bug in scrolling from playlist to search line. · 64b95b30
      Michael Pyne authored
      When the search filter was activated then the test for being the topmost
      item would be wrong (there would be a topmost item but it's probably
      filtered out!). Instead use the existing check for the *visible* item,
      which wasn't even reached by the buggy code.
      64b95b30
    • Michael Pyne's avatar
      ui: Fix return key failing to start playback. · b70139c9
      Michael Pyne authored
      The search bar was broken because a missing `returnPressed` signal
      declaration broke the signal/slot chain that was already present. An
      update to the existing key press filter was sufficient to make pressing
      return on a selected track in the Playlist work again, without the
      downsides of using `QListWidget::itemActivated`.
      b70139c9
  16. 13 Feb, 2020 1 commit
  17. 29 Jan, 2020 1 commit
  18. 21 Jan, 2020 1 commit
  19. 20 Sep, 2019 1 commit
  20. 22 Jul, 2019 1 commit
  21. 23 Jun, 2019 1 commit
  22. 18 May, 2019 2 commits
    • Michael Pyne's avatar
      Remove more compiler warnings for deprecated functions/uses. · 44d6bb2d
      Michael Pyne authored
      Still need to get rid of QSignalMapper using lambdas but that will need
      more thought.
      44d6bb2d
    • Michael Pyne's avatar
      Add 'override' decl to fix compiler warnings, fix drag-and-drop. · dc2d9c8e
      Michael Pyne authored
      This should shave off some 1,000+ warnings over the course of a build
      with GCC 9.1.
      
      This only addresses class declarations native to JuK, but Taglib and to
      a lesser extent Qt5 moc still have (or generate) code that can result in
      compiler warnings about suggested override declarations.
      
      In the process I noticed that an existing drag-and-drop support function
      (Playlist::decode) is no longer overriding Qt virtual functions, so it
      has been turned into an auxiliary function to fix existing drag-and-drop
      bugs from the KF5 port (tested by dropping files from Dolphin into a
      playlist view).
      
      Drag-and-drop from a playlist to another playlist (by dropping on the
      playlist name) still remains broken for now.
      
      CCBUG:392705
      FIXED-IN:19.04.2
      dc2d9c8e
  23. 19 Feb, 2019 1 commit
    • Michael Pyne's avatar
      Fix crash in filtering playlist to playing album/artist. · 5c1470d2
      Michael Pyne authored
      This was caused by infinite recursion in trying to grab the list of
      playlist items while trying to update the list of playlist items, which
      could be most easily caused by clicking on the artist or album link in
      the "now playing" bar while playing a song.
      
      BUG:402355
      FIXED-IN:18.12.3
      5c1470d2
  24. 18 Feb, 2019 1 commit
    • Michael Pyne's avatar
      Fix crash with threaded file loading. · 24b0edd1
      Michael Pyne authored
      Although Qt protects access to functions in the GUI thread (where I was
      seeing crashes in the new threaded file loading code in some
      situations), as long as you use signals/slots, Qt Concurrent doesn't do
      anything to keep your non-GUI threaded code from trampling on each
      other.
      
      Which is obvious enough, in retrospect, but that seems to have been the
      reason for the crashes I was sometimes seeing (TagLib and/or FileHandle
      not being thread-safe).
      
      The immediate bugfix is to serialize access into FileHandle/TagLib file
      reading code in DirectoryLoader, though I also did some cleanups in the
      process of debugging that I think are worth keeping.
      24b0edd1
  25. 21 Dec, 2018 3 commits
  26. 20 Dec, 2018 3 commits
    • Michael Pyne's avatar
      Disable tag updating from inline editor. · c6afa4c5
      Michael Pyne authored
      This mitigates a potential data-loss situation that might happen when
      adding new music items:
      
        Juk starts processing the new items in addFiles,
        Results in a new CollectionListItem being created,
        The resultant PlaylistItem superclass calls setFlags,
        This causes Qt to send a *data* changed signal from the QTreeWidget
          holding all the playlist items, saying that a *different*
          QTreeWidgetItem / PlaylistItem has been changed.
        This signal is normally only possible because of user interaction with
          the inline editor. As a result JuK assumes the signal is a user
          request to edit the track's tag, and does so. I have seen this
          cause existing files to take on the same tag values as one of the
          incoming new tracks.
      
      Although in theory a user could immediately select the "Undo" command to
      fix this, that's not a very good workaround. Since we have a separate
      tag editor already, we'll just use that instead until we can figure out
      a way to ensure that dataChanged signals are sent only when the data
      itself has changed (not just flags caused by unrelated items being
      created).
      
      CHANGELOG: Prevent opening new items from inadvertently editing track metadata on existing items.
      FIXED-IN:18.12.1
      c6afa4c5
    • Michael Pyne's avatar
    • Michael Pyne's avatar
      Prefer QVector to QList for most auxiliary lists. · 6e518da4
      Michael Pyne authored
      Includes template-template parameter usage in playlist.h's createItems
      until all usages of QList gone.
      6e518da4
  27. 19 Dec, 2018 1 commit