1. 19 Apr, 2020 1 commit
    • Martin Tobias Holmedahl Sandsmark's avatar
      Fix segfault/call on invalid pointer · 6cc5a511
      Martin Tobias Holmedahl Sandsmark authored
      We didn't set the AbstractImageView in AbstractImageViewPrivate early
      enough, and createAlphaBackgroundTexture() tried to call stuff on q.
      
      Quote from asan:
      
      ==161679==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fa8cdcc193a bp 0x7ffe601e4a00 sp 0x7ffe601e48f0 T0)
      ==161679==The signal is caused by a READ memory access.
      ==161679==Hint: address points to the zero page.
          #0 0x7fa8cdcc1939 in Gwenview::AbstractImageViewPrivate::createAlphaBackgroundTexture() (gwenview/build/bin/libgwenviewlib.so.5+0x108a939)
          #1 0x7fa8cdcc28b8 in Gwenview::AbstractImageViewPrivate::AbstractImageViewPrivate() (gwenview/build/bin/libgwenviewlib.so.5+0x108b8b8)
          #2 0x7fa8cdca46a2 in Gwenview::AbstractImageView::AbstractImageView(QGraphicsItem*) ../lib/documentview/abstractimageview.cpp:145
          #3 0x7fa8cdd500a5 in Gwenview::RasterImageView::RasterImageView(QGraphicsItem*) ../lib/documentview/rasterimageview.cpp:194
      
      Reviewed By: ngraham
      
      Differential Revision: https://phabricator.kde.org/D28345
      6cc5a511
  2. 15 Apr, 2020 1 commit
  3. 06 Apr, 2020 2 commits
    • Martin Tobias Holmedahl Sandsmark's avatar
      Don't fill disk with thumbnails if thumbnail saving is turned off · a585df06
      Martin Tobias Holmedahl Sandsmark authored
      Even if "low resource usage mode" is turned on, which says it avoids
      storing thumbnails to disk to save space, it still stores thumbnails to
      disk. It just deletes _all_ thumbnails afterwards (even those not from
      gwenview itself).
      
      This was also kind of racy, because thumbnailwriter could still be
      running, but the folders would be deleted, so it spammed a ton of error
      messages.
      
      Test Plan:
      Doesn't store thumbnails when it shouldn't anymore, doesn't
      delete thumbnails from other applications nor the thumbnail folders,
      thumbnailwriter doesn't spaz out during exit, stores thumbnails when it
      should.
      
      Differential Revision: https://phabricator.kde.org/D28375
      a585df06
    • Martin Tobias Holmedahl Sandsmark's avatar
      Make it possible to shut up gwenview with e.g. kdebugdialog · 662c29b3
      Martin Tobias Holmedahl Sandsmark authored
      exiv2 lets us register a log handler, so it's fairly straight forward to
      put our own that maps it to qC{Warning,Debug,Info} with a proper
      category. This allows people who're not interested in exiv2 spam turn it
      off.
      
      It only shows "Critical" by default, so supress everything, the warning
      messages aren't really useful and the "real" error messages are already
      stored in Exiv2ImageLoader.
      
      Differential Revision: https://phabricator.kde.org/D28376
      662c29b3
  4. 31 Mar, 2020 1 commit
  5. 28 Mar, 2020 1 commit
  6. 27 Mar, 2020 1 commit
  7. 17 Mar, 2020 2 commits
    • Nate Graham's avatar
      Merge branch 'release/20.04' · 4fa4d1fc
      Nate Graham authored
      4fa4d1fc
    • Nate Graham's avatar
      Give Exit Full Screen and Configure buttons text and adjust wording · 435d2ad1
      Nate Graham authored
      Summary:
      Unlike Kate, Gwenview's {nav Exit Full Screen} button is icons-only, impeding
      discoverability. This patch shows its action's text, and adjusts that text to be more
      consistent with the typical wording.
      
      In the process, the button below it is also given visible text to avoid making it look
      odd in its layout.
      
      To accomplish this technically, the `FullScreenToolBar` class's `addAction()` function
      is given a new optional parameter for specifying if and where the button's text should
      appear, which is then used to give the aforementioned buttons visible text according to
      the user's toolbutton text display preferences. The actions are also no longer marked
      with the Low Priority status, which forces them to be always icons-only and was
      previously redundant since icons-only status was forced in a different way. Fixed now.
      
      BUG: 385314
      FIXED-IN: 20.04.0
      
      Test Plan: {F8176526}
      
      Reviewers: #gwenview, #vdg, broulik
      
      Reviewed By: broulik
      
      Tags: #gwenview
      
      Differential Revision: https://phabricator.kde.org/D28052
      435d2ad1
  8. 16 Mar, 2020 2 commits
  9. 15 Mar, 2020 2 commits
  10. 20 Feb, 2020 1 commit
  11. 19 Feb, 2020 2 commits
  12. 16 Feb, 2020 1 commit
  13. 03 Feb, 2020 2 commits
  14. 02 Feb, 2020 1 commit
  15. 09 Jan, 2020 4 commits
  16. 08 Jan, 2020 1 commit
    • Tasos Sahanidis's avatar
      Prevent drag & drop if left mouse button isn't pressed · f17fb1bd
      Tasos Sahanidis authored
      Summary:
      It is possible to begin a drag & drop sequence using the forward/backward mouse buttons while moving the cursor.
      For example:
      
      > QGraphicsSceneMouseEvent(GraphicsSceneMouseMove, buttons=ForwardButton|XButton2|ExtraButton2, pos=347,127, scenePos=347,127, screenPos=398,255)
      
      This patch only allows drag & drop if the left mouse button is pressed.
      Touch events should not be affected as they are handled separately.
      
      Reviewers: ngraham
      
      Reviewed By: ngraham
      
      Subscribers: ngraham
      
      Tags: #gwenview
      
      Differential Revision: https://phabricator.kde.org/D26507
      f17fb1bd
  17. 06 Jan, 2020 1 commit
  18. 05 Jan, 2020 1 commit
  19. 04 Jan, 2020 1 commit
  20. 03 Jan, 2020 1 commit
  21. 28 Dec, 2019 1 commit
  22. 26 Dec, 2019 1 commit
    • Madhav Kanbur's avatar
      Add button to toggle sidebar in fullscreen mode · db6ca614
      Madhav Kanbur authored
      Summary:
      Previously, there was no way to toggle the sidebar in
      fullscreen view mode except for the keyboard shortcut F4. This patch
      adds a button to toggle the sidebar from the fullscreen toolbar.
      BUG: 414694
      
      Test Plan:
      Tested the button in fullscreen (view) mode. Button works
      as expected, and preserves existing behavior of all other sidebar
      toggle mechanisms as well.
      
      Reviewers: #vdg, #gwenview, ngraham
      
      Subscribers: #gwenview
      
      Tags: #gwenview
      
      Differential Revision: https://phabricator.kde.org/D26230
      db6ca614
  23. 19 Dec, 2019 1 commit
  24. 07 Dec, 2019 1 commit
  25. 05 Dec, 2019 2 commits
  26. 03 Dec, 2019 5 commits
    • Nicolas Fella's avatar
      Port away from deprecated DesktopIcon · a6538c45
      Nicolas Fella authored
      Summary: Use QIcon::fromTheme
      
      Test Plan: Still get the stopwatch icon as thumbnail when thumbnail is loaded
      
      Reviewers: #gwenview, vkrause
      
      Reviewed By: vkrause
      
      Subscribers: vkrause
      
      Tags: #gwenview
      
      Maniphest Tasks: T11654
      
      Differential Revision: https://phabricator.kde.org/D25693
      a6538c45
    • Bart De Vries's avatar
      Importer: convert all file operations to allow remote URLs · 0905b073
      Bart De Vries authored
      Summary:
      All file operations are updated to allow remote URLs, both on the source
      and destination side.  This consists mainly of converting local file/dir
      operations to KIO calls.
      Remote source was already mostly covered.
      To support remote destinations, a few adaptations were needed:
       - If destination is remote or a remote server mounted locally, then do
         not create the temporary directory as a subdir of the destination,
         but create it locally using default QTemporaryDir().
       - When comparing file contents, if destination is remote, use
         KIO::storedGet to get the file contents in one go.  This is much
         simpler and more robust than using asynchronous KIO::open calls,
         but has the drawback that the file is read in one go instead of in
         chunks.
      
      Test Plan:
      Added unit tests for remote source and destination.
      Also tested manually by running gwenview_importer with a combination
      of remote and local destinations, covering smb and sftp protocols, as
      well as remote server mounted locally (e.g. cifs mount).
      Also tested on multiple files with the same name existing in source
      directory; both identical and different in content.
      
      Reviewers: #gwenview, ngraham
      
      Reviewed By: #gwenview, ngraham
      
      Subscribers: ngraham, #gwenview
      
      Tags: #gwenview
      
      Differential Revision: https://phabricator.kde.org/D24875
      0905b073
    • Bart De Vries's avatar
      Solve a bug which can happen with multiple files with the same name · d3acacad
      Bart De Vries authored
      Summary:
      In case there are two or more files with the same name in the source
      (e.g. in separate subfolders), and if an identical file with that
      name also exists in the destination, then a dialog will pop up asking
      for user intervention (overwrite, ignore, cancel).
      
      The reason is the following:
      - File1 will get copied into the temporary import folder.  In case
        an identical file with that name already exists in the destination,
        this file will be skipped.  I.e. the file will not be moved, and
        stays in the temporary folder.
      - File2 (with identical name) gets copied into the temporary folder.
        However, a file with that name will already exist, so a dialog
        box will pop up to ask for user input.
      
      Since this can only happen if file1 has been skipped (otherwise
      it would have been moved out of the temporary folder), file2 should
      always overwrite file1.  Otherwise, if file1 and file2 share the
      same name but are not identical, unexpected things might happen and
      data might be lost.
      
      Test Plan:
      Tested with the situation described above: multiple files with the
      same name in the source and destination folders, with or without
      identical contents.
      With this patch, no dialog box pops up, and the correct import
      action is done.
      
      Reviewers: #gwenview, ngraham
      
      Reviewed By: #gwenview, ngraham
      
      Subscribers: ngraham
      
      Tags: #gwenview
      
      Differential Revision: https://phabricator.kde.org/D25224
      d3acacad
    • Bart De Vries's avatar
      Implement KMessageWidget to report import errors. · d5bdae6c
      Bart De Vries authored
      Summary:
      Add a KMessageWidget to report any errors that have occured during
      the import:
      - Files that have failed to copy into the temporary directory.
      - Files that failed to rename/move to their final location.
      - Subfolders (as defined by FileRenameFormatter) that failed to
        create.
      
      Depending on the kind of failure(s), the KMessageWidget will contain
      one or two actions to show a detailed list of files and/or subfolder
      failures.
      
      Test Plan:
      Tested extensively with all kinds of errors:
      - set file permissions such that files cannot be copied into their
        final location;
      - set directory permissions such that subfolders cannot be created.
      For each case observed that errors were reported correctly.
      Tested that KMessageWidget stays hidden after import without errors.
      Tested that previous errors have been correctly cleared when doing
      a second import right after the first (without closing the program).
      
      Reviewers: #gwenview, #kde_applications, ngraham
      
      Reviewed By: #gwenview, #kde_applications, ngraham
      
      Subscribers: ngraham
      
      Tags: #gwenview
      
      Differential Revision: https://phabricator.kde.org/D25111
      d5bdae6c
    • Jonathan Riddell's avatar
      use appstream file newly added into kipi-plugins. kipi-plugins does not ship... · 09119995
      Jonathan Riddell authored
      use appstream file newly added into kipi-plugins.  kipi-plugins does not ship photolayouteditor any more
      09119995