Commit b688c38d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Clean up

parent 8d4a4680
......@@ -145,9 +145,7 @@ void ArticleViewerWidget::disconnectFromNode(TreeNode *node)
void ArticleViewerWidget::renderContent(const QString &text)
{
m_currentText = text;
beginWriting();
m_articleHtmlWriter->queue(text);
endWriting();
reload();
}
void ArticleViewerWidget::beginWriting()
......@@ -362,11 +360,6 @@ void ArticleViewerWidget::keyPressEvent(QKeyEvent *e)
e->ignore();
}
void ArticleViewerWidget::slotPaletteOrFontChanged()
{
reload();
}
void ArticleViewerWidget::reload()
{
beginWriting();
......
......@@ -100,8 +100,6 @@ public Q_SLOTS:
void slotShowSummary(Akregator::TreeNode *node);
void slotPaletteOrFontChanged();
void slotPrintPreview();
void slotCopy();
......
......@@ -145,7 +145,7 @@ MainWidget::MainWidget(Part *part, QWidget *parent, ActionManagerImpl *actionMan
m_actionManager->initTabWidget(m_tabWidget);
connect(m_part, &Part::signalSettingsChanged,
m_tabWidget, &TabWidget::slotSettingsChanged);
this, &MainWidget::slotSettingsChanged);
connect(m_tabWidget, &TabWidget::signalCurrentFrameChanged,
this, &MainWidget::slotCurrentFrameChanged);
......@@ -238,8 +238,6 @@ MainWidget::MainWidget(Part *part, QWidget *parent, ActionManagerImpl *actionMan
connect(m_articleViewer, &ArticleViewerWidget::showStatusBarMessage, this, &MainWidget::slotShowStatusBarMessage);
connect(m_articleViewer, SIGNAL(signalOpenUrlRequest(Akregator::OpenUrlRequest&)),
Kernel::self()->frameManager(), SLOT(slotOpenUrlRequest(Akregator::OpenUrlRequest&)));
connect(m_part, &Part::signalSettingsChanged,
m_articleViewer, &ArticleViewerWidget::slotPaletteOrFontChanged);
connect(m_searchBar, &SearchBar::signalSearch,
m_articleViewer, &ArticleViewerWidget::setFilters);
mainTabLayout->addWidget(m_articleSplitter);
......@@ -311,6 +309,12 @@ MainWidget::MainWidget(Part *part, QWidget *parent, ActionManagerImpl *actionMan
}
}
void MainWidget::slotSettingsChanged()
{
m_tabWidget->slotSettingsChanged();
m_articleViewer->reload();
}
void MainWidget::slotOnShutdown()
{
disconnect(m_tabWidget, &TabWidget::signalCurrentFrameChanged,
......
......@@ -252,6 +252,8 @@ private Q_SLOTS:
void slotShowStatusBarMessage(const QString &msg);
void slotCurrentFrameChanged(int frameId);
void slotArticleAction(Akregator::ArticleViewerWebEngine::ArticleAction type, const QString &articleId, const QString &feed);
void slotSettingsChanged();
private:
void sendArticle(const QByteArray &text, const QString &title, bool attach);
void deleteExpiredArticles(const QSharedPointer<FeedList> &feedList);
......
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