Fixes: Copy from help sidebar doesn't work

This commit is contained in:
con
2009-03-13 12:10:28 +01:00
parent fcc271b616
commit e8161ebd02
3 changed files with 40 additions and 4 deletions

View File

@@ -374,6 +374,17 @@ void HelpPlugin::createRightPaneSideBar()
m_helpViewerForSideBar = new HelpViewer(m_helpEngine, 0);
rightPaneLayout->addWidget(m_helpViewerForSideBar);
m_core->addContextObject(new Core::BaseContext(m_helpViewerForSideBar, QList<int>()
<< m_core->uniqueIDManager()->uniqueIdentifier(Constants::C_HELP_SIDEBAR),
this));
QAction *copyActionSideBar = new QAction(this);
Core::Command *cmd = m_core->actionManager()->registerAction(copyActionSideBar,
Core::Constants::COPY, QList<int>()
<< m_core->uniqueIDManager()->uniqueIdentifier(Constants::C_HELP_SIDEBAR));
connect(copyActionSideBar, SIGNAL(triggered()), this, SLOT(copyFromSideBar()));
copyActionSideBar->setText(cmd->action()->text());
copyActionSideBar->setIcon(cmd->action()->icon());
m_rightPaneSideBar = new QWidget;
m_rightPaneSideBar->setLayout(rightPaneLayout);
@@ -381,6 +392,11 @@ void HelpPlugin::createRightPaneSideBar()
addAutoReleasedObject(new Core::BaseRightPaneWidget(m_rightPaneSideBar));
}
void HelpPlugin::copyFromSideBar()
{
m_helpViewerForSideBar->copy();
}
void HelpPlugin::rightPaneBackward()
{
m_helpViewerForSideBar->backward();