From fe8eb7f122fb7e02c71468c54f7e439b08066412 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Thu, 25 Jan 2018 11:42:20 +0100 Subject: [PATCH] LocationCompleterView: No need to use QPointer for SearchEnginesDialog --- src/lib/navigation/completer/locationcompleterview.cpp | 9 ++------- src/lib/navigation/completer/locationcompleterview.h | 3 --- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/lib/navigation/completer/locationcompleterview.cpp b/src/lib/navigation/completer/locationcompleterview.cpp index 89ce2341c..c19f79c56 100644 --- a/src/lib/navigation/completer/locationcompleterview.cpp +++ b/src/lib/navigation/completer/locationcompleterview.cpp @@ -347,11 +347,6 @@ void LocationCompleterView::close() void LocationCompleterView::openSearchEnginesDialog() { - if (!m_searchDialog) { - m_searchDialog = new SearchEnginesDialog(this); - } - - m_searchDialog->open(); - m_searchDialog->raise(); - m_searchDialog->activateWindow(); + SearchEnginesDialog *dialog = new SearchEnginesDialog(focusProxy()); + dialog->open(); } diff --git a/src/lib/navigation/completer/locationcompleterview.h b/src/lib/navigation/completer/locationcompleterview.h index b5eb29329..abaa59b1b 100644 --- a/src/lib/navigation/completer/locationcompleterview.h +++ b/src/lib/navigation/completer/locationcompleterview.h @@ -18,12 +18,10 @@ #ifndef LOCATIONCOMPLETERVIEW_H #define LOCATIONCOMPLETERVIEW_H -#include #include #include "qzcommon.h" -class SearchEnginesDialog; class LocationCompleterDelegate; class FALKON_EXPORT LocationCompleterView : public QWidget @@ -64,7 +62,6 @@ private: QListView *m_view; LocationCompleterDelegate *m_delegate; - QPointer m_searchDialog; }; #endif // LOCATIONCOMPLETERVIEW_H