┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/tooltips
AgeCommit message (Collapse)Author
2025-01-14ToolTipManager: double the size of the preview and use dprMéven Car
2023-12-25Fix issues if QT_NO_CAST_FROM_ASCII is definedMarius P
Fix issues e.g. "error: ‘QString::QString(const QByteArray&)’ is private within this context".
2023-07-05Add explicit moc includes to sources for moc-covered headersFriedrich W. H. Kossebau
* 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-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2022-09-26Remove unused includesLaurent Montel
2022-06-15Cleanup config-dolphin.h includesAhmad Samir
2022-06-15Use one config-dolphin.h.cmake configuration fileAhmad Samir
2022-06-02We depend against qt5.15Laurent Montel
2022-05-11Port to QStringViewLaurent Montel
2022-05-11Remove unused includeLaurent Montel
2022-03-31[ToolTipManager] Create DolphinFileMetaDataWidget on-demand againKai Uwe Broulik
This reverts b7fbd19a7660424e6839df37f12b33111408b1fc but creates the widget only once and then reuses it. However, ownership of a parent-less widget is transferred to the `KToolTipWidget` but since we first request metadata, then show the tooltip (or won't if the mouse moved on since), we cannot rely on the `KToolTipWidget` exclusively. Instead, when we still delete the widget ourself until we have shown the `KToolTipWidget` once at which point it will handle the life time for us. This fixes parenting the widget to `DolphinView` which would make it appear as a broken line in the top left of the window.
2022-03-25Reuse metadata widget when creating tooltipsNicolas Fella
Currently any time we hover the mouse over a file we create a new DolphinFileMetaDataWidget (even when we don't actually show a tooltip). That is quite wasteful Instead we can reuse the existing instance and only change the URL
2022-02-02Don't set ignoreMaximumSize on preview jobs for slow filesBharadwaj Raju
With this change (plus https://invent.kde.org/frameworks/kio/-/merge_requests/702), slow files will be treated as remote files for generating previews. This should make browsing local mounts of remote locations smoother.
2021-12-01Port deprecated QLayout::margin callAlexander Lohnau
As the method impl suggests, the left value is preferred if all the values are the same. This is the case for the given layout. ```cpp int QLayout::margin() const { int left, top, right, bottom; getContentsMargins(&left, &top, &right, &bottom); if (left == top && top == right && right == bottom) { return left; } else { return -1; } } ```
2021-02-19Use only enabled preview plugins in InformationPanelContent and ToolTipManager.David Lerch
2021-02-09Build with QT_NO_KEYWORDSNicolas Fella
2020-10-15Port to non-deprecated QLabel::pixmap()Elvis Angelaccio
Quoting from: https://github.com/qt/qtbase/commit/714409b23ce5ec33e56adce5ba1966aad67c3b34 ``` The QLabel changes to the pixmap/picture getters provide the following migration path: QPixmap *ppix = l->pixmap(); // up to 5.15, warns in 5.15 QPixmap pval = l->pixmap(Qt::ReturnByValue); // new in 5.15, works in 6 QPixmap pixmap = l->pixmap(); // from Qt 6 on ``` Since we can't require 5.15 yet in dolphin, the port is done only when building with Qt >= 5.15
2020-08-25Output of licensedigger + manual cleanup afterwards.Elvis Angelaccio
Unfortunately licensedigger does not strip the trailing * characters. While at it, use a common style for all source files.
2019-08-03[Dolphin] Hide tooltip instantly on key pressPiotr Henryk Dabrowski
Summary: Instantly hide tooltip shown over an element when a key is pressed. Currently, when pressing an alphanum key to select a different file, the tooltip continues to cover much of the window - often hiding that newly selected file from view. Reviewers: #dolphin, ngraham, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: broulik, elvisangelaccio, kfm-devel, pdabrowski Tags: #dolphin Differential Revision: https://phabricator.kde.org/D22512
2019-05-05Get rid of ugly static_cast usages in connect() callsElvis Angelaccio
2019-03-17Fix "Add Network Folder" tooltip icon does not show on Breeze, shows ↵David Hallas
correctly on Breeze Dark Summary: Fix "Add Network Folder" tooltip icon does not show on Breeze, shows correctly on Breeze Dark. The fix is taken from D19596. Test Plan: Open Dolphin with the Breeze theme Hover the mouse over the "Add Network Folder" The icon is black on black BUG: 404858 Reviewers: #dolphin, elvisangelaccio, ngraham Reviewed By: #dolphin, elvisangelaccio, ngraham Subscribers: broulik, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D19738
2019-03-17Fix crash at shutdown after showing a tooltipDavid Hallas
Summary: Fix crash at shutdown after showing a tooltip. The commit 94d7e1471e0a81b72285795ad91c4f6196157ae4 introduced a crash that occurs when closing Dolphin after Dolphin has showed a tooltip. This happens because the ToolTipManager::showToolTip function calls the KToopTipWidget::showBelow function passing in the pointer to the DolphinFileMetaDataWidget. But this also passes the ownership of the pointer to the KToopTipWidget as long as a new tooltip is not shown. The problem is that at shutdown, the KToopTipWidget instance will be destoyed first and therefore also destroy the DolphinFileMetaDataWidget instance (which the ToolTipManager still owns through the QScopedPointer) causing it to be deleted twice. The fix for this is simply to swap the order of these two members so that the DolphinFileMetaDataWidget is destroyed first by the QScopedPointer thereby removing it from the KToopTipWidget if it has been set as it's parent. Test Plan: Open Dolphin Show a Tool Tip Close Dolphin Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D19737
2019-03-10Fixes leak of DolphinFileMetaDataWidget in ToolTipManagerDavid Hallas
Summary: Fixes leak of DolphinFileMetaDataWidget in ToolTipManager. The destructor of ToolTipManager failed to delete the m_fileMetaDataWidget member. This is seen at shutdown but also when you close a tab that has displayed a tooltip. Test Plan: Compile Dolphin with address sanitizer Open Dolphin Show a tooltip Close Dolphin Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D19485
2018-08-29Consider all thumbnailers for the information panel and tooltipsFabian Vogt
Summary: The text thumbnail is really useful in tooltips, but disabled by default in KIO. Having just a larger version of the placeholder icon from the theme doesn't make a lot of sense, so try the best to get a proper preview. Same applies to the information panel, which would otherwise just show the same icon. Test Plan: Got textfile previews in tooltips and in the information panel even if disabled. Reviewers: #dolphin, elvisangelaccio, broulik, markg, ngraham Reviewed By: #dolphin, broulik, ngraham Subscribers: abetts, markg, kfm-devel, ngraham Tags: #dolphin Differential Revision: https://phabricator.kde.org/D15138
2018-08-21Port away from kdelibs4supportElvis Angelaccio
Summary: It was only used as fallback when baloo was not found, but `KFileMetaDataWidget` is useless without nepomuk. The result of this patch is that the information panel and the tooltips won't be available from platforms without baloo (instead of being available but broken). The baloo dependency remains optional. Closes T8720 Test Plan: Build dolphin with `cmake -DCMAKE_DISABLE_FIND_PACKAGE_KF5Baloo=ON ..` and make sure it doesn't show tooltips or the information panel. Reviewers: #dolphin, broulik, ngraham Subscribers: kfm-devel Tags: #dolphin Maniphest Tasks: T8720 Differential Revision: https://phabricator.kde.org/D14814
2018-03-04Remove unused #includeRoman Inflianskas
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-03Remove unused #includeRoman Inflianskas
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-02-04Fix all krazy #include warningsElvis Angelaccio
- "include own header first line" - "put config.h in angle brackets line" - "do not include QtModule/QtClass line" `QElapsedTimer` was implicitly included by kfileitemmodelsortalgorithm.h, now we need to explicitly include it in kfileitemmodel.cpp. We also need to explicitly link to `Qt5::Concurrent`, otherwise we cannot `#include <QtConcurrentRun>`.
2018-02-03Fix all 'explicit constructor' krazy warningsElvis Angelaccio
2017-11-21Modernize: Use nullptr everywhereKevin Funk
2017-11-20Modernize: Use override where possibleKevin Funk
Also use override instead of Q_DECL_OVERRIDE
2017-09-12Create KToolTipWidget on demandKai Uwe Broulik
Given tooltips are disabled by default anyway. Differential Revision: https://phabricator.kde.org/D7783
2017-05-08Don't ignore tag clicks in the tooltipsElvis Angelaccio
Summary: Now that we can use the metadata widgets in the tooltips, we can also open the tags:// url if the user clicks some tag in a tooltip. The behavior is now consistent with the metadata widget in the information panel. Test Plan: Click a tag when the metadata tooltip shows up. Reviewers: emmanuelp Subscribers: #konqueror, #dolphin Differential Revision: https://phabricator.kde.org/D5658
2017-02-09Rename FileMetaDataToolTip to DolphinFileMetaDataWidgetElvis Angelaccio
Since commit 230fe13d1f this class is not a "tooltip" anymore, but just a simple widget. Rename it to avoid future confusion. Reviewers: emmanuelp Differential Revision: https://phabricator.kde.org/D4451
2017-02-05Drop unused includeElvis Angelaccio
This is no longer needed since commit 230fe13d1f
2017-02-05Port tooltips to KToolTipWidgetElvis Angelaccio
Use the new KToolTipWidget class (introduced by kwidgetsaddons 5.30) as backend of ToolTipManager. FileMetaDataToolTip becomes a simple widget used as content of the tooltip. It is now possible to actually use the metadata widget shown inside the tooltips. Tooltips are now functional on Wayland as well. More information about KToolTipWidget in https://git.reviewboard.kde.org/r/129648/ BUG: 352276 BUG: 371223 FIXED-IN: 17.04.0 Closes T4980 Differential Revision: D4449
2017-01-18Port away from deprecated KIO::Job::ui()Elvis Angelaccio
It's equivalent to KJob::uiDelegate() from kcoreaddons.
2016-08-06Fix some low-hanging warning fruitsMartin T. H. Sandsmark
2016-03-16[CLAZY] Fixed all level 1 and level 2 warnings with small exceptionsArtur Puzio
REVIEW: 126771
2014-11-03Q_DECL_OVERRIDELukáš Tinkl
2014-10-18Fix includesMontel Laurent
2014-10-10Clean includes + port to QMenuMontel Laurent
2014-09-12Ported KIcon to QIconEmmanuel Pescosta
REVIEW: 120159
2014-06-29Remove the automoc noiseChristophe Giboudeaux
2014-06-27Revert "Fix build"Christophe Giboudeaux
This reverts commit 780e76f35bca0ced37a691a50367cf705388cc38. Update your kfilemetadata/baloo/baloo-widgets builds instead.
2014-06-27Fix buildRohan Garg
2014-06-27Fix build.Christophe Giboudeaux
2014-05-05Allow compiling with the frameworks branches of BalooAlex Richardson
2014-05-05dolphin: convert views/ to qt5 signal/slot syntaxAlex Richardson
Removed arguments from DolphinViewActionHandler::slotTrashActivated since they were unused and made the connection fail. Also fixed a bad connection in dolphinview.cpp, there is no signal KFileItemModel::loadingCompleted
2014-05-05Allow compiling Dolphin with KF5Alex Richardson
This does not work properly yet, there are probably quite a few bad signal/ slot connections due to KUrl -> QUrl. However dolphin starts without crashing. Accessibility is not ported since that changed quite a lot from Qt4 -> Qt5 and I have no idea how it is supposed to be used. This is the first commit for review 117395