1. 18 Jul, 2018 4 commits
    • David Hallas's avatar
      Fixes small memory leak in DolphinContextMenu · f186124f
      David Hallas authored
      Summary: When DolphinContextMenu::baseFileItem is called a KFileItem is allocated and stored in DolphinContextMenu::m_baseFileItem, which is of type KFileItem*, but the destructor failed to delete this.
      
      Test Plan: This leak was found using Address Sanitizer
      
      Reviewers: broulik, elvisangelaccio
      
      Reviewed By: broulik, elvisangelaccio
      
      Subscribers: ngraham, kfm-devel
      
      Tags: #dolphin
      
      Differential Revision: https://phabricator.kde.org/D14178
      f186124f
    • Elvis Angelaccio's avatar
      Merge branch 'Applications/18.08' · e6bf7584
      Elvis Angelaccio authored
      e6bf7584
    • David Hallas's avatar
      Fixes memory leak in KItemListViewAccessible · 4536e25a
      David Hallas authored
      Summary: The KItemListViewAccessible class has a list of QAccessibleInterface pointers in a member variable m_cells. The problem is that when new entries are created, the newly allocated pointer is not stored in the list, only a nullptr is store, this renders the cleanup code in the destructor useless. This patch simply stores the pointer in the list, causing the destructor to correctly free the memory.
      
      Test Plan: I found this issue using address sanitizer. Simply building Dolphin with -fsanitize=address and opening a window caused the memory leak.
      
      Reviewers: #dolphin, jtamate, elvisangelaccio
      
      Reviewed By: #dolphin, jtamate, elvisangelaccio
      
      Subscribers: elvisangelaccio, kfm-devel
      
      Tags: #dolphin
      
      Differential Revision: https://phabricator.kde.org/D14168
      4536e25a
    • David Hallas's avatar
      Removes unused member variables · 43ab5bdc
      David Hallas authored
      Summary: The InformationPanel::m_pendingPreview and ApplyViewPropsJob::m_currentItem member variables are not used and can therefore be removed.
      
      Reviewers: broulik, elvisangelaccio
      
      Reviewed By: broulik, elvisangelaccio
      
      Subscribers: kfm-devel
      
      Tags: #dolphin
      
      Differential Revision: https://phabricator.kde.org/D14180
      43ab5bdc
  2. 16 Jul, 2018 2 commits
  3. 14 Jul, 2018 3 commits
    • Nate Graham's avatar
      Modernize View Properties window · 9d1a3abd
      Nate Graham authored
      Summary:
      Like D12571, but for the {nav View Properties} Window. Also did a little bit of re-organization. This allows us to use a `QFormLayout` as the top-level layout and simplify the code a lot, including no longer using the now-unnecessary paradigm of putting a layout inside a `QWidget`, and ending the use of `QGridLayout` to make a fake and more complicated form-style layout.
      
      Depends on D13749
      
      Test Plan:
      Window still resizes properly when the Additional Information content is shown or hidden.
      
      Global view properties, additional information hidden:
      {F6035943}
      
      Global view properties, additional information shown:
      {F6035945}
      
      Per-folder view properties, additional information hidden:
      {F6035869}
      
      Per-folder view properties, additional information shown:
      {F6035870}
      
      Reviewers: #dolphin, elvisangelaccio, broulik, #vdg
      
      Reviewed By: #dolphin, elvisangelaccio
      
      Subscribers: abetts, kfm-devel
      
      Tags: #dolphin
      
      Differential Revision: https://phabricator.kde.org/D13768
      9d1a3abd
    • Jaime Torres Amate's avatar
      Speedup sort · 23c5fce7
      Jaime Torres Amate authored
      Summary:
      Uses a reference to the collator instead of copying and reinitializing it again and again. This is the reason for the speedup.
      
      Changing the implementation from a Functor class to a Lambda removes some boilerplate code, but is not relevant for performance.
      
      This requires a workaround for https://bugreports.qt.io/browse/QTBUG-69361
      Just a single comparison to force the clean state of QCollator.
      
      Test Plan:
      Sorting in a directory with 82874 images:
      [TIME] Sorting: 19883  (before)
      [TIME] Sorting: 4198 (after)
      
      kfileitemmodelbenchmark before: ..............   Passed   29.36 sec
      kfileitemmodelbenchmark after:    ..............   Passed   20.39 sec
      
      Reviewers: #dolphin, #frameworks, markg, elvisangelaccio, bruns
      
      Reviewed By: #dolphin, markg, elvisangelaccio
      
      Subscribers: elvisangelaccio, apol, bruns, markg, kfm-devel
      
      Tags: #dolphin
      
      Differential Revision: https://phabricator.kde.org/D13814
      23c5fce7
    • Jaime Torres Amate's avatar
      Revert to change the commit message. · ec89af67
      Jaime Torres Amate authored
      Summary: This reverts commit 765cc968.
      
      Test Plan: revert-hammer
      
      Reviewers:
      
      Subscribers:
      ec89af67
  4. 13 Jul, 2018 1 commit
    • Jaime Torres Amate's avatar
      Speedup sort · 765cc968
      Jaime Torres Amate authored
      Summary:
      Use a lambda function to use only one QCollator initialized only once.
      
      This requires a workaround for https://bugreports.qt.io/browse/QTBUG-69361
      Just a single comparison to force the clean state of QCollator.
      
      Test Plan:
      Sorting in a directory with 82874 images:
      [TIME] Sorting: 19883  (before)
      [TIME] Sorting: 4198 (after)
      
      kfileitemmodelbenchmark before: ..............   Passed   29.36 sec
      kfileitemmodelbenchmark after:    ..............   Passed   20.39 sec
      
      Reviewers: #dolphin, #frameworks, markg, elvisangelaccio, bruns
      
      Reviewed By: #dolphin, markg, elvisangelaccio
      
      Subscribers: elvisangelaccio, apol, bruns, markg, kfm-devel
      
      Tags: #dolphin
      
      Differential Revision: https://phabricator.kde.org/D13814
      765cc968
  5. 11 Jul, 2018 2 commits
  6. 08 Jul, 2018 1 commit
  7. 07 Jul, 2018 1 commit
  8. 06 Jul, 2018 2 commits
    • Jaime Torres Amate's avatar
      Speedup sort · 63825de8
      Jaime Torres Amate authored
      Summary:
      Use a lambda function instead of a class.
      This way the member QCollator is not copied and initialized several times.
      
      Test Plan:
      Sorting in a directory with 82874 images:
      [TIME] Sorting: 19883  (before)
      [TIME] Sorting: 4198 (after)
      
      kfileitemmodelbenchmark before: ..............   Passed   29.36 sec
      kfileitemmodelbenchmark after:    ..............   Passed   20.39 sec
      
      Reviewers: #dolphin, #frameworks, markg, elvisangelaccio
      
      Reviewed By: #dolphin, markg, elvisangelaccio
      
      Subscribers: elvisangelaccio, apol, bruns, markg, kfm-devel
      
      Tags: #dolphin
      
      Differential Revision: https://phabricator.kde.org/D13814
      63825de8
    • Nate Graham's avatar
      Modernize Settings window · 02c94b22
      Nate Graham authored
      Summary: This patch modernizes the appearance of Dolphin's configuration window by following the KDE HIG as much as possible and following design cues from Plasma and System Settings.
      
      Test Plan:
      Tested all settings to make sure they still work; they do.
      
      Startup page, before:
      {F5825313}
      
      Startup page, after:
      {F5918574}
      
      View page (Icons), before:
      {F5825319}
      
      View page (Icons) after:
      {F5918575}
      
      View page (Compact), before:
      {F5825321}
      
      View page (Compact) after:
      {F5918700}
      
      View page (Detailed), before:
      {F5825323}
      
      View page: (Detailed), after:
      {F5918701}
      
      Navigation page: no change
      
      Trash page, before:
      {F5858748}
      
      Trash page, after:
      {F5866656}
      (Provided by {D12986})
      
      General page (behavior), before:
      {F5825316}
      
      General page (behavior) after:
      {F5918572}
      
      General page (confirmations), before:
      {F5866885}
      
      General page (confirmations), after:
      {F5918702}
      
      General page (status bar): no change
      
      Reviewers: #dolphin, #vdg, broulik, elvisangelaccio
      
      Reviewed By: #dolphin, elvisangelaccio
      
      Subscribers: fabianr, cfeck, medhefgo, zzag, rkflx, kfm-devel, elvisangelaccio, abetts
      
      Tags: #dolphin
      
      Differential Revision: https://phabricator.kde.org/D12571
      02c94b22
  9. 04 Jul, 2018 1 commit
  10. 29 Jun, 2018 1 commit
  11. 27 Jun, 2018 1 commit
    • Nate Graham's avatar
      Port from KComboBox to QComboBox · b488dc01
      Nate Graham authored
      Summary: None of Dolphin's current usages of `KComboBox` use any of its additional features beyond `QComboBox`, so let's use `QComboBox` instead.
      
      Test Plan: Tested all features that use comboboxes in Dolphin. No visual or functional changes or regressions.
      
      Reviewers: #dolphin, elvisangelaccio, broulik
      
      Reviewed By: #dolphin, elvisangelaccio
      
      Subscribers: broulik, kfm-devel
      
      Tags: #dolphin
      
      Differential Revision: https://phabricator.kde.org/D13749
      b488dc01
  12. 26 Jun, 2018 2 commits
    • Elvis Angelaccio's avatar
      Use collapsible box to configure visible roles · 280c9744
      Elvis Angelaccio authored
      Summary:
      A modal dialog that opens another modal dialog is bad UX and should be
      avoided whenever possible. These days we have `KCollapsibleGroupBox`
      that can be used to show advanced settings without cluttering the
      default layout.
      
      This change removes the `AdditionalInfoDialog` and uses a collapsible
      groupbox instead. The `Apply` buttons gets enabled whenever a role gets
      checked or unchecked, consistently with the existing checkboxes.
      
      Test Plan: Change visible roles in the view properties dialog.
      
      Reviewers: #dolphin, #vdg
      
      Reviewed By: #vdg
      
      Subscribers: ngraham, kfm-devel
      
      Tags: #dolphin
      
      Differential Revision: https://phabricator.kde.org/D13569
      280c9744
    • Tomaz  Canabrava's avatar
      don't use temporaries when uneeded · 9b7ceaa7
      Tomaz Canabrava authored
      Summary:
      Remove unused variable
      
      Compiled, Run. Trash still there.
      
      Use copy ellision
      
      Remove uneeded code
      
      Reviewers: #dolphin, elvisangelaccio
      
      Reviewed By: #dolphin, elvisangelaccio
      
      Subscribers: elvisangelaccio, kfm-devel
      
      Tags: #dolphin
      
      Differential Revision: https://phabricator.kde.org/D13680
      9b7ceaa7
  13. 22 Jun, 2018 5 commits
  14. 19 Jun, 2018 2 commits
    • Nate Graham's avatar
      Move General settings to the top · d7d40337
      Nate Graham authored
      Summary: KDE apps generally (ha ha) have their {nav General} page at the top of the list, so it's the first thing the user sees when they open the {nav Settings} window, but Dolphin is an exception. It puts the {nav General} page //last!// This patch makes Dolphin consistent with other KDE apps by moving the {nav General} page up to the top.
      
      Test Plan: {F5918590}
      
      Reviewers: #dolphin, #kde_applications, elvisangelaccio, ltoscano
      
      Reviewed By: elvisangelaccio, ltoscano
      
      Subscribers: kde-doc-english, ltoscano, elvisangelaccio, kfm-devel
      
      Tags: #dolphin, #documentation
      
      Differential Revision: https://phabricator.kde.org/D13595
      d7d40337
    • Laurent Montel's avatar
      26e629a7
  15. 13 Jun, 2018 3 commits
    • Elvis Angelaccio's avatar
      ViewPropertiesDialog: disable Apply button on startup · 32b8b19b
      Elvis Angelaccio authored
      We call `markAsDirty(false)` at the end of `loadSettings()` but that's
      not enough, because `m_isDirty` is initialized to false (as it should be).
      This means `isDirtyChanged` is not emitted and the button is not disabled.
      
      By disabling it explicitly, we make it consistent with the Apply button
      in the settings dialog (which is also initially disabled).
      32b8b19b
    • Elvis Angelaccio's avatar
      Merge branch 'Applications/18.04' · 61583808
      Elvis Angelaccio authored
      61583808
    • Elvis Angelaccio's avatar
      Fix loop of FocusIn events · 9616edbb
      Elvis Angelaccio authored
      Summary:
      Commit 43da84ee introduced the risk of entering an endless loop of
      `FocusIn`/`FocusOut` events sent to two DolphinSearchBox instances when
      opening a second tab (see D11871).
      
      This happens because we deactivate the first tab when we open a new one, but
      since the `setActive(true)` is delayed with a QTimer, both the old tab
      and the new one become active and receive their own `FocusIn` event
      (which starts the loop of focus in/out events).
      
      To prevent this issue, we schedule the searchbox activation only if the
      searchbox is not already active.
      
      Test Plan:
      - Search something in dolphin
      - Open a new tab after the search ends
      - Check that dolphin does not eat the CPU
      
      Reviewers: #dolphin, anthonyfieroni
      
      Subscribers: kfm-devel
      
      Tags: #dolphin
      
      Differential Revision: https://phabricator.kde.org/D13152
      9616edbb
  16. 06 Jun, 2018 2 commits
  17. 05 Jun, 2018 2 commits
    • Elvis Angelaccio's avatar
      Fix scrolling to renamed file when using the rename dialog · e308985d
      Elvis Angelaccio authored
      Summary:
      The `RenameDialog::slotResult()` slot is currently never called because
      the dialog is deleted first, due to the usage of the `WA_DeleteOnClose`
      attribute. This breaks the scroll-to-renamed-file feature when the
      inline renaming is disabled.
      
      Instead of deleting the dialog on close, we can use `deleteLater()` when
      we are sure the dialog has actually finished its job, which is when the
      KIO move job emits the `result` signal.
      
      Test Plan:
      - Disable inline renaming
      - Rename a file so that it goes out of the view
      - Check whether the view scrolls to the renamed file.
      
      Reviewers: #dolphin, emateli
      
      Subscribers: kfm-devel
      
      Tags: #dolphin
      
      Differential Revision: https://phabricator.kde.org/D13304
      e308985d
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · a8bd6f4b
      Script Kiddy authored
      In case of conflict in i18n, keep the version of the branch "ours"
      To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
      a8bd6f4b
  18. 03 Jun, 2018 4 commits
    • Elvis Angelaccio's avatar
      Merge branch 'Applications/18.04' · 3c6ecfa2
      Elvis Angelaccio authored
      3c6ecfa2
    • Elvis Angelaccio's avatar
      Fix crash in PlacesItem::setUrl() · 588abbf1
      Elvis Angelaccio authored
      Connections to lambda slots without context/receiver argument can lead
      to crashes, because if the receiver is deleted Qt won't delete the connection
      as it normally would when the receiver is specified.
      
      This patch moves the slot from the lambda in PlacesItem (which is not a QObject)
      to PlacesItemSignalHandler. This fixes the `dolphinmainwindowtest` crash
      we currently have on master, and should also fix bug #394507 which has
      the very same stacktrace.
      
      BUG: 394507
      FIXED-IN: 18.04.2
      588abbf1
    • Elvis Angelaccio's avatar
      Drop obsolete version checks · c1a594a8
      Elvis Angelaccio authored
      We already depend on KF5 >= 5.43
      c1a594a8
    • Elvis Angelaccio's avatar
      Enable test mode in dolphinmainwindowtest · 2e679808
      Elvis Angelaccio authored
      We don't want to use the user configuration files when creating a test
      instance of DolphinMainWindow.
      2e679808
  19. 02 Jun, 2018 1 commit
    • Nerdopolis Turfwalker's avatar
      Add 'Sort By' and 'View Mode' into Dolphin file context menus · 97801e2c
      Nerdopolis Turfwalker authored
      Summary: This adds the 'Sort By' and 'View Mode'  options into the context menu of Dolphin within the file browser. I keep looking for these option (especially sort by) in the Context Menu, and keep forgetting to go to the menu. It also makes the order of "View Mode" and "Sort By" options consistent in the control menu
      
      Test Plan: Made sure that the options appeared when right clicking on an empty space.
      
      Reviewers: #dolphin, ngraham, elvisangelaccio
      
      Reviewed By: #dolphin, ngraham, elvisangelaccio
      
      Subscribers: question, markg, elvisangelaccio, mmustac, rkflx, ngraham, kfm-devel, #dolphin
      
      Tags: #dolphin
      
      Differential Revision: https://phabricator.kde.org/D12911
      97801e2c