Share code between "central" and other help viewers.

This removes a lot of duplication of actions and interaction.
It's also a preparation step into making the external help
window behave more like the full-fledged help mode.

Change-Id: I318d831f229b0a75bb8702a5f163c96cce6a668c
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Eike Ziller
2014-09-25 16:29:56 +02:00
parent 85ac965116
commit a56432b3b1
11 changed files with 391 additions and 649 deletions

View File

@@ -110,7 +110,7 @@ QWidget *GeneralSettingsPage::widget()
connect(m_ui->blankPageButton, SIGNAL(clicked()), this, SLOT(setBlankPage()));
connect(m_ui->defaultPageButton, SIGNAL(clicked()), this, SLOT(setDefaultPage()));
HelpViewer *viewer = CentralWidget::instance()->currentHelpViewer();
HelpViewer *viewer = CentralWidget::instance()->currentViewer();
if (!viewer)
m_ui->currentPageButton->setEnabled(false);
@@ -197,7 +197,7 @@ void GeneralSettingsPage::apply()
void GeneralSettingsPage::setCurrentPage()
{
HelpViewer *viewer = CentralWidget::instance()->currentHelpViewer();
HelpViewer *viewer = CentralWidget::instance()->currentViewer();
if (viewer)
m_ui->homePageLineEdit->setText(viewer->source().toString());
}