summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/panels/navigationtoolbar.cpp2
-rw-r--r--src/panels/navigationtoolbar.hpp1
-rw-r--r--src/rekonqwindow_class.cpp2
-rw-r--r--src/urlbar/urlbar.cpp18
-rw-r--r--src/urlbar/urlbar.hpp2
5 files changed, 5 insertions, 20 deletions
diff --git a/src/panels/navigationtoolbar.cpp b/src/panels/navigationtoolbar.cpp
index ae55ac02..950efaad 100644
--- a/src/panels/navigationtoolbar.cpp
+++ b/src/panels/navigationtoolbar.cpp
@@ -20,6 +20,8 @@ NavigationToolBar::NavigationToolBar(QWidget *parent) : QToolBar(parent), urlBar
// TODO homeAction->setObjectName("actionHome");
addWidget(urlBar);
+ connect(urlBar, &QLineEdit::returnPressed, this,
+ [this]() { emit loadRequestedUrl(QUrl::fromUserInput(urlBar->text()), rekonq::CurrentTab); });
auto *actionFocusUrlBar = new QAction(parent);
actionFocusUrlBar->setShortcut({"F6"});
diff --git a/src/panels/navigationtoolbar.hpp b/src/panels/navigationtoolbar.hpp
index eaf5b145..bdd2d245 100644
--- a/src/panels/navigationtoolbar.hpp
+++ b/src/panels/navigationtoolbar.hpp
@@ -21,6 +21,7 @@ public:
signals:
void loadUrl(rekonq::DefaultUrl url, rekonq::OpenType type = rekonq::CurrentTab);
+ void loadRequestedUrl(const QUrl &url, rekonq::OpenType type = rekonq::CurrentTab);
public slots:
void setCurrentView(RekonqView *view);
diff --git a/src/rekonqwindow_class.cpp b/src/rekonqwindow_class.cpp
index 996e1b6f..66da5ff5 100644
--- a/src/rekonqwindow_class.cpp
+++ b/src/rekonqwindow_class.cpp
@@ -36,6 +36,8 @@ RekonqWindow::RekonqWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::Re
#endif
connect(ui->navigationToolBar, &NavigationToolBar::loadUrl, this,
qOverload<rekonq::DefaultUrl, rekonq::OpenType>(&RekonqWindow::loadUrl));
+ connect(ui->navigationToolBar, &NavigationToolBar::loadRequestedUrl, this,
+ qOverload<const QUrl &, rekonq::OpenType>(&RekonqWindow::loadUrl));
connect(ui->bookmarksPanel, &BookmarksPanel::loadUrl, this,
qOverload<const QUrl &, rekonq::OpenType>(&RekonqWindow::loadUrl));
connect(ui->bookmarksToolBar, &BookmarkToolBar::loadUrl, this,
diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp
index 4489765c..36f58c85 100644
--- a/src/urlbar/urlbar.cpp
+++ b/src/urlbar/urlbar.cpp
@@ -66,18 +66,9 @@ UrlBar::UrlBar(QWidget *parent)
// connect(_tab, SIGNAL(loadProgressing()), this, SLOT(update()));
// connect(_tab, SIGNAL(urlChanged(QUrl)), this, SLOT(setUrl(QUrl)));
- connect(this, &QLineEdit::returnPressed, this, [this]() { loadRequestedUrl(QUrl::fromUserInput(text())); });
// bookmark icon
// connect(BookmarkManager::self(), SIGNAL(bookmarksUpdated()), this, SLOT(updateRightIcons()));
-
- // suggestions
- // connect(_box.data(), SIGNAL(chosenUrl(QUrl,Rekonq::OpenType)), this,
- // SLOT(loadRequestedUrl(QUrl,Rekonq::OpenType))); connect(this, SIGNAL(textEdited(QString)), this,
- // SLOT(detectTypedString(QString)));
-
- //_suggestionTimer->setSingleShot(true);
- // connect(_suggestionTimer, SIGNAL(timeout()), this, SLOT(suggest()));
}
// -----------------------------------------------------------------------------------------------------------
@@ -105,15 +96,6 @@ void UrlBar::setUrl(const QUrl &url)
setCursorPosition(0);
}
-void UrlBar::loadRequestedUrl(const QUrl &url, rekonq::OpenType)
-{
- clearFocus();
- setText(url.toString());
-
- Q_CHECK_PTR(m_currentView);
- m_currentView->load(url);
-}
-
void UrlBar::loadStarted()
{
Q_ASSERT(sender() == m_currentView);
diff --git a/src/urlbar/urlbar.hpp b/src/urlbar/urlbar.hpp
index 7b6cc975..366509ba 100644
--- a/src/urlbar/urlbar.hpp
+++ b/src/urlbar/urlbar.hpp
@@ -57,8 +57,6 @@ public slots:
*/
// void manageBookmarks();
- [[deprecated]] void loadRequestedUrl(const QUrl &url, rekonq::OpenType = rekonq::CurrentTab);
-
void loadStarted();
void loadProgress(int);
void loadFinished();