1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-14 02:52:12 +01:00

LocationCompleterView: No need to use QPointer for SearchEnginesDialog

This commit is contained in:
David Rosca 2018-01-25 11:42:20 +01:00
parent b618323a5e
commit fe8eb7f122
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
2 changed files with 2 additions and 10 deletions

View File

@ -347,11 +347,6 @@ void LocationCompleterView::close()
void LocationCompleterView::openSearchEnginesDialog() void LocationCompleterView::openSearchEnginesDialog()
{ {
if (!m_searchDialog) { SearchEnginesDialog *dialog = new SearchEnginesDialog(focusProxy());
m_searchDialog = new SearchEnginesDialog(this); dialog->open();
}
m_searchDialog->open();
m_searchDialog->raise();
m_searchDialog->activateWindow();
} }

View File

@ -18,12 +18,10 @@
#ifndef LOCATIONCOMPLETERVIEW_H #ifndef LOCATIONCOMPLETERVIEW_H
#define LOCATIONCOMPLETERVIEW_H #define LOCATIONCOMPLETERVIEW_H
#include <QPointer>
#include <QListView> #include <QListView>
#include "qzcommon.h" #include "qzcommon.h"
class SearchEnginesDialog;
class LocationCompleterDelegate; class LocationCompleterDelegate;
class FALKON_EXPORT LocationCompleterView : public QWidget class FALKON_EXPORT LocationCompleterView : public QWidget
@ -64,7 +62,6 @@ private:
QListView *m_view; QListView *m_view;
LocationCompleterDelegate *m_delegate; LocationCompleterDelegate *m_delegate;
QPointer<SearchEnginesDialog> m_searchDialog;
}; };
#endif // LOCATIONCOMPLETERVIEW_H #endif // LOCATIONCOMPLETERVIEW_H