Commit b848b771 authored by Harald Sitter's avatar Harald Sitter 🦄

port away from m_widget = centralWidget compat

parent 2f9926b6
......@@ -65,13 +65,12 @@ MainWindow::MainWindow()
, m_summary(nullptr)
, m_map(nullptr)
, m_started(false)
, m_widget(nullptr)
{
Config::read();
QScrollArea *scrollArea = new QScrollArea(this);
scrollArea->setWidgetResizable(true);
setWidget(scrollArea);
setCentralWidget(scrollArea);
QWidget *partWidget = new QWidget(scrollArea);
scrollArea->setWidget(partWidget);
......@@ -113,7 +112,6 @@ MainWindow::MainWindow()
setStandardToolBarMenuEnabled(true);
setupActions();
createGUI(QStringLiteral("filelightui.rc"));
setCentralWidget(widget());
stateChanged(QStringLiteral("scan_failed")); //bah! doesn't affect the parts' actions, should I add them to the actionCollection here?
......@@ -444,16 +442,6 @@ void MainWindow::setUrl(const QUrl &url)
m_url = url;
}
void MainWindow::setWidget(QWidget *widget)
{
m_widget = widget;
}
QWidget *MainWindow::widget() const
{
return m_widget;
}
void MainWindow::configFilelight()
{
SettingsDialog *dialog = new SettingsDialog(widget());
......
......@@ -120,11 +120,8 @@ private:
// KPart Compat helper
public:
QUrl url() const;
QWidget *widget() const; // Should get ported to centralWidget() I think
private:
void setUrl(const QUrl &url);
void setWidget(QWidget *widget);
QWidget *m_widget = nullptr;
QUrl m_url;
};
......
Markdown is supported
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