Commit 181ef922 authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

store url bar pointer, don't rely on parent

we no longer have that parent at that point
parent 2c78f70a
Pipeline #139518 passed with stage
in 8 minutes and 53 seconds
......@@ -248,8 +248,9 @@ class BreadCrumbView : public QListView
{
Q_OBJECT
public:
BreadCrumbView(QWidget *parent = nullptr)
: QListView(parent)
BreadCrumbView(KateUrlBar *urlBar)
: QListView(urlBar)
, m_urlBar(urlBar)
{
setFlow(QListView::LeftToRight);
setModel(&m_model);
......@@ -339,8 +340,7 @@ public:
QDir d(path);
DirFilesList m(this);
auto par = static_cast<KateUrlBar *>(parentWidget());
connect(&m, &DirFilesList::openUrl, par, &KateUrlBar::openUrlRequested);
connect(&m, &DirFilesList::openUrl, m_urlBar, &KateUrlBar::openUrlRequested);
connect(&m, &DirFilesList::openUrl, this, &BreadCrumbView::unsetFocus);
connect(&m, &DirFilesList::navigateLeftRight, this, [this](int k) {
onNavigateLeftRight(k, true);
......@@ -423,6 +423,7 @@ private:
return dirsList;
}
KateUrlBar *const m_urlBar;
QStandardItemModel m_model;
Q_SIGNALS:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment