diff options
Diffstat (limited to 'src/search')
| -rw-r--r-- | src/search/dolphinfacetswidget.h | 2 | ||||
| -rw-r--r-- | src/search/dolphinsearchbox.cpp | 34 | ||||
| -rw-r--r-- | src/search/dolphinsearchbox.h | 14 |
3 files changed, 24 insertions, 26 deletions
diff --git a/src/search/dolphinfacetswidget.h b/src/search/dolphinfacetswidget.h index 996829ee3..1e8ab6cea 100644 --- a/src/search/dolphinfacetswidget.h +++ b/src/search/dolphinfacetswidget.h @@ -48,7 +48,7 @@ class DolphinFacetsWidget : public QWidget public: explicit DolphinFacetsWidget(QWidget* parent = nullptr); - virtual ~DolphinFacetsWidget(); + ~DolphinFacetsWidget() override; QString ratingTerm() const; QString facetType() const; diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp index 345692008..44de97aa0 100644 --- a/src/search/dolphinsearchbox.cpp +++ b/src/search/dolphinsearchbox.cpp @@ -53,20 +53,20 @@ DolphinSearchBox::DolphinSearchBox(QWidget* parent) : QWidget(parent), m_startedSearching(false), m_active(true), - m_topLayout(0), - m_searchLabel(0), - m_searchInput(0), - m_saveSearchAction(0), - m_optionsScrollArea(0), - m_fileNameButton(0), - m_contentButton(0), - m_separator(0), - m_fromHereButton(0), - m_everywhereButton(0), - m_facetsToggleButton(0), - m_facetsWidget(0), + m_topLayout(nullptr), + m_searchLabel(nullptr), + m_searchInput(nullptr), + m_saveSearchAction(nullptr), + m_optionsScrollArea(nullptr), + m_fileNameButton(nullptr), + m_contentButton(nullptr), + m_separator(nullptr), + m_fromHereButton(nullptr), + m_everywhereButton(nullptr), + m_facetsToggleButton(nullptr), + m_facetsWidget(nullptr), m_searchPath(), - m_startSearchTimer(0) + m_startSearchTimer(nullptr) { } @@ -310,11 +310,9 @@ void DolphinSearchBox::slotSearchSaved() if (searchURL.isValid()) { PlacesItemModel model; const QString label = i18n("Search for %1 in %2", text(), searchPath().fileName()); - PlacesItem* item = model.createPlacesItem(label, - searchURL, - QStringLiteral("folder-saved-search-symbolic")); - model.appendItemToGroup(item); - model.saveBookmarks(); + model.createPlacesItem(label, + searchURL, + QStringLiteral("folder-saved-search-symbolic")); } } diff --git a/src/search/dolphinsearchbox.h b/src/search/dolphinsearchbox.h index f1ea49091..c138cfe7f 100644 --- a/src/search/dolphinsearchbox.h +++ b/src/search/dolphinsearchbox.h @@ -46,8 +46,8 @@ class DolphinSearchBox : public QWidget { Q_OBJECT public: - explicit DolphinSearchBox(QWidget* parent = 0); - virtual ~DolphinSearchBox(); + explicit DolphinSearchBox(QWidget* parent = nullptr); + ~DolphinSearchBox() override; /** * Sets the text that should be used as input for @@ -99,11 +99,11 @@ public: bool isActive() const; protected: - virtual bool event(QEvent* event) Q_DECL_OVERRIDE; - virtual void showEvent(QShowEvent* event) Q_DECL_OVERRIDE; - virtual void hideEvent(QHideEvent* event) Q_DECL_OVERRIDE; - virtual void keyReleaseEvent(QKeyEvent* event) Q_DECL_OVERRIDE; - virtual bool eventFilter(QObject* obj, QEvent* event) Q_DECL_OVERRIDE; + bool event(QEvent* event) override; + void showEvent(QShowEvent* event) override; + void hideEvent(QHideEvent* event) override; + void keyReleaseEvent(QKeyEvent* event) override; + bool eventFilter(QObject* obj, QEvent* event) override; signals: /** |
