Commit graph

129 commits

Author SHA1 Message Date
Friedrich W. H. Kossebau ed2d352c42 Add explicit moc includes to sources for moc-covered headers
* speeds up incremental builds as changes to a header will not always
  need the full mocs_compilation.cpp for all the target's headers rebuild,
  while having a moc file sourced into a source file only adds minor
  extra costs, due to small own code and the used headers usually
  already covered by the source file, being for the same class/struct
* seems to not slow down clean builds, due to empty mocs_compilation.cpp
  resulting in those quickly processed, while the minor extra cost of the
  sourced moc files does not outweigh that in summary.
  Measured times actually improved by some percent points.
  (ideally CMake would just skip empty mocs_compilation.cpp & its object
  file one day)
* enables compiler to see all methods of a class in same compilation unit
  to do some sanity checks
* potentially more inlining in general, due to more in the compilation unit
* allows to keep using more forward declarations in the header, as with the
  moc code being sourced into the cpp file there definitions can be ensured
  and often are already for the needs of the normal class methods
2023-07-05 07:59:18 +00:00
Tem PQD 4d930992c4 Use ellipsis everywhere instead of three dots
Better for screen readers etc.
2023-06-29 22:42:34 +00:00
Méven Car a1c5c5cf81 KDirectoryContentsCounter: show intermediate dir size counting results, improve stopping, improve data caching
Two user visible changes:
 * we can see the dir size changing as it is updated.
 * This makes the file counting a lot more reactive, when changing directories for instance.

`KDirectoryContentsCounterWorker::walkDir` is not recursive anymore.

The cache is now shared and only a single thread is used to count size recursively.
2023-05-26 15:10:09 +00:00
Serg Podtynnyi 38c34eeca3 Add clang-format and format code as in Frameworks 2023-02-05 12:45:38 +07:00
Ahmad Samir 197a7f6905 Port away from deprecated KIO API 2022-10-16 13:13:55 +02:00
Kai Uwe Broulik a44830c3a9 Don't show error message on ERR_USER_CANCELED
There's no point telling the user what they just did.

After f192c133eb
this error has a text associated with it, so it might
show up in the UI.
2022-08-24 17:00:01 +02:00
Harald Sitter 8d7e600f63 portalize drag urls
this enables sandboxed application to receive drop events
2022-07-11 09:04:14 +00:00
Alessio Bonfiglio 65b18bf935 Enable Ctrl/Shift-Click to open folder in a new tab/window
and more
2021-12-17 14:11:46 +00:00
Jan Paul Batrina 1d125057cb FoldersPanel: Fix inline renaming
Commit 5a0da4a9c8 changed the value
for emitRoleEditingFinished() to a struct containing
the new name, but folderspanel was not updated.

BUG: 441124
2021-08-27 07:29:29 +00:00
Nicolas Fella f65b0899c3 Build with QT_NO_KEYWORDS 2021-02-09 20:39:50 +00:00
Méven Car ffe01ee840 FolderPanel: prevents scanning directory tree recursively
KFileItemListView contents are periodically scanned by KFileItemModelRolesUpdater.
It uses then KDirectoryContentsCounter to scan directories to determine their size possibly recursively.

Introduce a scanDirectories setting to disable directory scanning by KFileItemModelRolesUpdater.

BUG: 426617
FIXED-IN: 20.08.3
2020-11-03 02:21:43 +00:00
Alexander Lohnau 97415729c3 Compile with QT_NO_KEYWORDS 2020-10-23 18:23:06 +00:00
Alexander Lohnau a24327cd50 Compile without foreach 2020-10-23 18:23:06 +00:00
Elvis Angelaccio 954e8c4790 Output of licensedigger + manual cleanup afterwards.
Unfortunately licensedigger does not strip the trailing * characters.
While at it, use a common style for all source files.
2020-08-25 17:07:38 +00:00
Nate Graham 09e215be46 "Use newly-upstreamed rename dialog from KIO""
This reverts commit 41105103b0.

KIO's version was just bumped to 5.67, so this can land now without
breaking the CI.
2020-01-11 13:21:52 -07:00
Nate Graham 41105103b0 Revert "Use newly-upstreamed rename dialog from KIO"
This reverts commit bae6620f22.

Frameworks 5.67 doesn't exist yet; this needs to wait another month.
2020-01-06 14:34:36 -07:00
Nate Graham bae6620f22 Use newly-upstreamed rename dialog from KIO
Summary:
With the rename dialog upstreamed in D17595, we can use it from there.

This will require the KF5 dep to be bumped to 5.67, which should be feasible given that we're at the very beginning of a new Applications cycle.

Depends on D17595

Test Plan:
1. Dolphin Settings > uncheck "rename inline"
2. Rename one or more files. Observe that it still works

Tests still pass.

Reviewers: #dolphin, elvisangelaccio, meven

Reviewed By: elvisangelaccio, meven

Subscribers: meven, broulik, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D17597
2020-01-06 14:25:44 -07:00
Laurent Montel 31dd81bb0c Make it compile against last kf5 version without deprecated methods 2019-12-06 13:31:43 +01:00
Laurent Montel 81065795b7 GIT_SILENT: minor qstring optimization 2019-09-08 09:33:41 +02:00
Elvis Angelaccio 9f2bb143b5 [FoldersPanel] Stop ignoring positions from the controller
This fixes the position of Folder panel's context menus on multi-screens
on Wayland, because `QCursor::pos()` is not reliable on those setups.
2019-03-10 12:45:43 +01:00
Elvis Angelaccio 3c9efb362a [FoldersPanel] Don't show 'Limit to Home Directory' in the view context menu
The `viewContextMenuRequested` signal is emitted without a valid
KFileItem, so `m_fileItem` will always be null in `TreeViewContextMenu::open()`.
2019-03-10 12:37:25 +01:00
Laurent Montel 4315e5c938 remove deprecated methods 2019-02-27 08:59:18 +01:00
Elvis Angelaccio 9581a27328 Make RenameDialog modal again.
Summary:
The rename dialog used to be modal, but commit
828ba8902c changed the behavior without
really explaining why.

Test Plan: disable inline renaming and rename something.

Reviewers: #vdg, ngraham

Reviewed By: #vdg, ngraham

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D17621
2018-12-17 22:52:25 +01:00
Elvis Angelaccio e308985de4 Fix scrolling to renamed file when using the rename dialog
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
2018-06-05 22:07:45 +02:00
Roman Inflianskas 48b58f830a Remove unused #include
Summary: I used CLion inspection to hunt all unused #include

Reviewers: #dolphin, elvisangelaccio, markg

Reviewed By: #dolphin, elvisangelaccio, markg

Subscribers: bcooksley, markg, elvisangelaccio, #dolphin

Differential Revision: https://phabricator.kde.org/D10985
2018-03-04 21:00:47 +03:00
Roman Inflianskas 848abc5922 Remove unused #include
Summary: I used CLion inspection to hunt all unused #include

Reviewers: #dolphin, elvisangelaccio, markg

Reviewed By: #dolphin, elvisangelaccio, markg

Subscribers: markg, elvisangelaccio, #dolphin

Differential Revision: https://phabricator.kde.org/D10985
2018-03-03 17:08:01 +03:00
Luca Beltrame 1a6b3c0a2b Merge remote-tracking branch 'origin/Applications/17.12'
Conflicts:
	CMakeLists.txt [versions]
	src/panels/places/placesitemmodel.cpp
2018-01-18 09:09:49 +01:00
Michael Heidelbach 64d2fd2981 Folderspanel's context-menu option "Limit to Home Directory" is always visible
Summary:
Applied suggested changes to [[ https://phabricator.kde.org/D9662 | D9662 ]]
  - Enum instead of bool
  - Use QStringLiteral

Test Plan: Visual inspection

Reviewers: ngraham, elvisangelaccio, #dolphin

Reviewed By: ngraham, #dolphin

Subscribers: #dolphin

Tags: #dolphin, #kde_applications

Differential Revision: https://phabricator.kde.org/D9911
2018-01-18 08:56:43 +01:00
Michael Heidelbach 3cb3d58fbf folderspanel context-menu option "Limit to Home Directory" should be always visible
Summary:
Only by chance I discovered that this option is visible but only when inside home. Before that I always edited dolphinrc to reenable it.
I think it's less confusing to always show it but toggle its enabled state

Test Plan:
compile and run
show folderspanel context-menu in different places

Reviewers: #dolphin, emmanuelp, ngraham

Reviewed By: #dolphin, ngraham

Subscribers: elvisangelaccio

Tags: #dolphin, #kde_applications

Differential Revision: https://phabricator.kde.org/D9662
2018-01-14 10:54:46 -07:00
Kevin Funk f024c3c01f Revert some hunks from previous commit
Changes in folderspanel.cpp in 464b13f382 were unintended.
2017-11-21 11:00:07 +01:00
Kevin Funk 464b13f382 Modernize: Use override where possible
Also use override instead of Q_DECL_OVERRIDE
2017-11-20 23:25:48 +01:00
Montel Laurent ff3f476ed8 Use nullptr + add explicit keyword
Test Plan: compile

Reviewers: #dolphin, broulik

Reviewed By: broulik

Subscribers: #dolphin

Differential Revision: https://phabricator.kde.org/D8637
2017-11-03 14:54:06 +01:00
Robert Hoffmann 94fab8c80e
Limit folder panel to home directory if inside home
Summary:
Added the option to limit the displayed folders in the folder panel (F7) to the tree below the user's home directory if the current URL is inside the home directory.
This can be configured in the preferences General/Behaviour tab by checking the corresponding check box.

Reviewers: #dolphin, elvisangelaccio, emmanuelp

Reviewed By: #dolphin, elvisangelaccio, emmanuelp

Subscribers: emmanuelp, elvisangelaccio, #konqueror, #dolphin

Differential Revision: https://phabricator.kde.org/D7477
2017-09-01 10:15:40 +02:00
Elvis Angelaccio 1be2704214 Port away from deprecated KIO::Job::ui()
It's equivalent to KJob::uiDelegate() from kcoreaddons.
2017-01-18 23:45:39 +01:00
David Faure f2772c4fe6 Fix DnD onto desktop:/ app desktop file.
We need to resolve from desktop:/ to file:/ so that DropJob
can handle application .desktop files.

CCBUG: 363991
2016-06-16 15:34:44 +02:00
Artur Puzio 5593c252e8 [CLAZY] Fixed all level 1 and level 2 warnings with small exceptions
REVIEW: 126771
2016-03-16 22:17:37 +01:00
Emmanuel Pescosta 832e157ecd Port away from KDELibs4Support (we only use KDELibs4Support when baloo isn't present, because KFileMetaDataWidget is in KDELibs4Support)
Reviewed-By: Vishesh Handa
2015-02-26 18:10:42 +01:00
Emmanuel Pescosta 169cca55b9 Replace kDebug/kWarning by categorized logging (org.kde.dolphin) 2015-02-24 13:07:35 +01:00
Emmanuel Pescosta 6d9f5b2131 Removed unused KGlobal includes and use KIO/Job instead of KIO/JobClasses 2015-02-24 12:51:24 +01:00
Emmanuel Pescosta 9221362cea QUrl porting bug: Added a missing QUrl::fromLocalFile in FoldersPanel::loadTree to make the FoldersPanel work again
REVIEW: 122631
BUG: 344204
FIXED-IN: 15.04
2015-02-19 12:08:07 +01:00
David Faure 7bd5bec219 Dolphin: port from KonqOperations::doDrop to the new KIO::DropJob
REVIEW: 121678
2015-01-05 09:07:10 +01:00
Emmanuel Pescosta d0f0f1f2e2 make use of initializer lists 2014-11-10 08:45:38 +01:00
Lukáš Tinkl 037d5db85b Q_DECL_OVERRIDE 2014-11-03 23:52:18 +01:00
Lukáš Tinkl 7a3310ce73 fix initializer list 2014-11-03 16:16:52 +01:00
David Faure 8b306b67bf Port from KonqOperations::doPaste to new job KIO::paste
Remove KonqOperations::doPaste.
2014-11-02 15:20:41 +01:00
David Faure 9bf03a3c48 Dolphin: port to KIO::pasteInfoText().
DolphinContextMenu::createPasteAction used to be precise about destination
("Paste To Folder"), while now it's precise about the source (what to paste).
It was decided that this was more useful and consistent anyway.

REVIEW: 120695
2014-10-21 21:59:05 +02:00
Lukáš Tinkl 1b4572dac9 port Dolphin from KUrl to QUrl
REVIEW: 120688
2014-10-21 21:19:14 +02:00
Montel Laurent 0a6257bce3 Fix includes 2014-10-18 15:00:17 +02:00
Montel Laurent 31a0c4fbd5 Fix includes 2014-10-18 14:42:41 +02:00
Montel Laurent 6f6b1bbb69 Clean includes + port to QMenu 2014-10-10 23:36:36 +02:00