diff options
| author | Felix Ernst <[email protected]> | 2020-11-05 23:30:07 +0100 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2020-11-09 23:49:07 +0100 |
| commit | 2d4d2ce9a14902ee5a2b236f8510596fc2f86b99 (patch) | |
| tree | 07607a2561e3f6e268e4e883f422582bdc908013 /src/dolphinurlnavigator.h | |
| parent | 42023831374496c62708ce7ad2cdd69104a1c820 (diff) | |
Adress most of the second round of Angelaccio's review comments
This commit applies most suggestions which were made on the MR.
Most notably the DolphinUrlNavigator class is split up which leads to
the creation of a DolphinUrlNavigatorsController class.
Additionally some minor coding style and const correctness changes are
included.
The error value of cached integers is changed from -1 to INT_MIN
because situations could come up in which -1 would be a valid value.
Diffstat (limited to 'src/dolphinurlnavigator.h')
| -rw-r--r-- | src/dolphinurlnavigator.h | 44 |
1 files changed, 3 insertions, 41 deletions
diff --git a/src/dolphinurlnavigator.h b/src/dolphinurlnavigator.h index 8f8d270ae..a15428799 100644 --- a/src/dolphinurlnavigator.h +++ b/src/dolphinurlnavigator.h @@ -8,17 +8,12 @@ #ifndef DOLPHINURLNAVIGATOR_H #define DOLPHINURLNAVIGATOR_H -#include <KCompletion> #include <KUrlNavigator> -#include <forward_list> - -class KToggleAction; - /** - * @brief Extends KUrlNavigator in a Dolphin-specific way + * @brief Extends KUrlNavigator in a Dolphin-specific way. * - * Makes sure that Dolphin preferences, settings and settings changes are + * Makes sure that Dolphin preferences and settings are * applied to all constructed DolphinUrlNavigators. * * @see KUrlNavigator @@ -42,12 +37,7 @@ public: virtual ~DolphinUrlNavigator(); - /** - * This method is needed so the DolphinNavigatorWidgetAction knows when there is not enough - * space to neatly align the UrlNavigator with the ViewContainers. Unfortunately KUrlNavigator - * does not have a useful sizeHint() currently. It would make more sense to change - * KUrlNavigator instead. - */ + // TODO: Fix KUrlNavigator::sizeHint() instead. QSize sizeHint() const override; /** @@ -74,38 +64,10 @@ public: public slots: /** - * Refreshes all DolphinUrlNavigators to get synchronized with the - * Dolphin settings if they were changed. - */ - static void slotReadSettings(); - - /** * Switches to "breadcrumb" mode if the editable mode is not set to be * preferred in the Dolphin settings. */ void slotReturnPressed(); - - static void slotPlacesPanelVisibilityChanged(bool visible); - -protected: - /** - * Constructor-helper function - */ - void init(); - -protected slots: - /** - * Sets the completion mode for all DolphinUrlNavigators - * and saves it in settings. - */ - static void setCompletionMode(const KCompletion::CompletionMode completionMode); - -protected: - /** Contains all currently constructed DolphinUrlNavigators */ - static std::forward_list<DolphinUrlNavigator *> s_instances; - - /** Caches the (negated) places panel visibility */ - static bool s_placesSelectorVisible; }; #endif // DOLPHINURLNAVIGATOR_H |
