Commit d01adc13 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

Help: Use Qt5-style connects

The heavy lifting was done by clazy.

Change-Id: Ied9c7fcc031e530c41b342de950e2f0ac730bbb1
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent 700239c6
......@@ -50,14 +50,12 @@ public:
void apply();
void finish();
private slots:
private:
void addDocumentation();
private:
bool eventFilter(QObject *object, QEvent *event);
void removeDocumentation(const QList<QModelIndex> &items);
private:
QList<QModelIndex> currentSelection() const;
Ui::DocSettingsPage m_ui;
......
......@@ -63,8 +63,8 @@ QWidget *FilterSettingsPage::widget()
this, &FilterSettingsPage::addFilter);
connect(m_ui.filterRemoveButton, &QPushButton::clicked,
this, &FilterSettingsPage::removeFilter);
connect(HelpManager::instance(), SIGNAL(documentationChanged()),
this, SLOT(updateFilterPage()));
connect(HelpManager::instance(), &HelpManager::documentationChanged,
this, &FilterSettingsPage::updateFilterPage);
}
return m_widget;
}
......@@ -221,8 +221,8 @@ void FilterSettingsPage::apply()
void FilterSettingsPage::finish()
{
disconnect(HelpManager::instance(), SIGNAL(documentationChanged()),
this, SLOT(updateFilterPage()));
disconnect(HelpManager::instance(), &HelpManager::documentationChanged,
this, &FilterSettingsPage::updateFilterPage);
delete m_widget;
}
......
......@@ -47,18 +47,15 @@ public:
signals:
void filtersChanged();
private slots:
private:
void updateAttributes(QListWidgetItem *item);
void updateFilterMap();
void updateFilterPage();
void addFilter();
void removeFilter();
private:
void updateFilterDescription(const QString &filter);
private:
QString msgFilterLabel(const QString &filter) const;
Ui::FilterSettingsPage m_ui;
QPointer<QWidget> m_widget;
......
......@@ -49,20 +49,18 @@ public:
signals:
void fontChanged();
private slots:
private:
void setCurrentPage();
void setBlankPage();
void setDefaultPage();
void importBookmarks();
void exportBookmarks();
private:
void updateFontSize();
void updateFontStyle();
void updateFontFamily();
int closestPointSizeIndex(int desiredPointSize) const;
private:
QFont m_font;
QFontDatabase m_fontDatabase;
......
......@@ -151,24 +151,24 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
addAutoReleasedObject(m_searchTaskHandler = new SearchTaskHandler);
m_centralWidget = new CentralWidget(Context("Help.CentralHelpWidget"));
connect(m_centralWidget, SIGNAL(sourceChanged(QUrl)), this,
SLOT(updateSideBarSource(QUrl)));
connect(m_centralWidget, &HelpWidget::sourceChanged, this,
&HelpPlugin::updateSideBarSource);
connect(m_centralWidget, &CentralWidget::closeButtonClicked,
&OpenPagesManager::instance(), &OpenPagesManager::closeCurrentPage);
connect(LocalHelpManager::instance(), &LocalHelpManager::returnOnCloseChanged,
m_centralWidget, &CentralWidget::updateCloseButton);
connect(HelpManager::instance(), SIGNAL(helpRequested(QUrl,Core::HelpManager::HelpViewerLocation)),
this, SLOT(handleHelpRequest(QUrl,Core::HelpManager::HelpViewerLocation)));
connect(m_searchTaskHandler, SIGNAL(search(QUrl)), this,
SLOT(showLinkInHelpMode(QUrl)));
connect(m_filterSettingsPage, SIGNAL(filtersChanged()), this,
SLOT(setupHelpEngineIfNeeded()));
connect(HelpManager::instance(), SIGNAL(documentationChanged()), this,
SLOT(setupHelpEngineIfNeeded()));
connect(HelpManager::instance(), SIGNAL(collectionFileChanged()), this,
SLOT(setupHelpEngineIfNeeded()));
connect(HelpManager::instance(), &HelpManager::helpRequested,
this, &HelpPlugin::handleHelpRequest);
connect(m_searchTaskHandler, &SearchTaskHandler::search, this,
&HelpPlugin::showLinkInHelpMode);
connect(m_filterSettingsPage, &FilterSettingsPage::filtersChanged, this,
&HelpPlugin::setupHelpEngineIfNeeded);
connect(HelpManager::instance(), &HelpManager::documentationChanged, this,
&HelpPlugin::setupHelpEngineIfNeeded);
connect(HelpManager::instance(), &HelpManager::collectionFileChanged, this,
&HelpPlugin::setupHelpEngineIfNeeded);
connect(ToolTip::instance(), &ToolTip::shown, ICore::instance(), []() {
ICore::addAdditionalContext(Context(kToolTipHelpContext), ICore::ContextPriority::High);
......@@ -185,29 +185,29 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
tr(Constants::SB_CONTENTS), this);
cmd = ActionManager::registerAction(action, "Help.ContentsMenu");
ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
connect(action, SIGNAL(triggered()), this, SLOT(activateContents()));
connect(action, &QAction::triggered, this, &HelpPlugin::activateContents);
action = new QAction(tr(Constants::SB_INDEX), this);
cmd = ActionManager::registerAction(action, "Help.IndexMenu");
ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
connect(action, SIGNAL(triggered()), this, SLOT(activateIndex()));
connect(action, &QAction::triggered, this, &HelpPlugin::activateIndex);
action = new QAction(tr("Context Help"), this);
cmd = ActionManager::registerAction(action, Help::Constants::CONTEXT_HELP,
Context(kToolTipHelpContext, Core::Constants::C_GLOBAL));
ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP);
cmd->setDefaultKeySequence(QKeySequence(Qt::Key_F1));
connect(action, SIGNAL(triggered()), this, SLOT(showContextHelp()));
connect(action, &QAction::triggered, this, &HelpPlugin::showContextHelp);
action = new QAction(tr("Technical Support"), this);
cmd = ActionManager::registerAction(action, "Help.TechSupport");
ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_SUPPORT);
connect(action, SIGNAL(triggered()), this, SLOT(slotOpenSupportPage()));
connect(action, &QAction::triggered, this, &HelpPlugin::slotOpenSupportPage);
action = new QAction(tr("Report Bug..."), this);
cmd = ActionManager::registerAction(action, "Help.ReportBug");
ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_SUPPORT);
connect(action, SIGNAL(triggered()), this, SLOT(slotReportBug()));
connect(action, &QAction::triggered, this, &HelpPlugin::slotReportBug);
if (ActionContainer *windowMenu = ActionManager::actionContainer(Core::Constants::M_WINDOW)) {
// reuse EditorManager constants to avoid a second pair of menu actions
......@@ -216,16 +216,16 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
Command *ctrlTab = ActionManager::registerAction(action, Core::Constants::GOTOPREVINHISTORY,
modecontext);
windowMenu->addAction(ctrlTab, Core::Constants::G_WINDOW_NAVIGATE);
connect(action, SIGNAL(triggered()), &OpenPagesManager::instance(),
SLOT(gotoPreviousPage()));
connect(action, &QAction::triggered, &OpenPagesManager::instance(),
&OpenPagesManager::gotoPreviousPage);
// Goto Next In History Action
action = new QAction(this);
Command *ctrlShiftTab = ActionManager::registerAction(action, Core::Constants::GOTONEXTINHISTORY,
modecontext);
windowMenu->addAction(ctrlShiftTab, Core::Constants::G_WINDOW_NAVIGATE);
connect(action, SIGNAL(triggered()), &OpenPagesManager::instance(),
SLOT(gotoNextPage()));
connect(action, &QAction::triggered, &OpenPagesManager::instance(),
&OpenPagesManager::gotoNextPage);
}
auto helpIndexFilter = new HelpIndexFilter();
......@@ -237,8 +237,8 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
RemoteHelpFilter *remoteHelpFilter = new RemoteHelpFilter();
addAutoReleasedObject(remoteHelpFilter);
connect(remoteHelpFilter, SIGNAL(linkActivated(QUrl)), this,
SLOT(showLinkInHelpMode(QUrl)));
connect(remoteHelpFilter, &RemoteHelpFilter::linkActivated, this,
&HelpPlugin::showLinkInHelpMode);
QDesktopServices::setUrlHandler(QLatin1String("qthelp"), HelpManager::instance(), "handleHelpRequest");
connect(ModeManager::instance(), &ModeManager::currentModeChanged,
......@@ -318,14 +318,14 @@ HelpWidget *HelpPlugin::createHelpWidget(const Context &context, HelpWidget::Wid
{
HelpWidget *widget = new HelpWidget(context, style);
connect(widget->currentViewer(), SIGNAL(loadFinished()),
this, SLOT(highlightSearchTermsInContextHelp()));
connect(widget, SIGNAL(openHelpMode(QUrl)),
this, SLOT(showLinkInHelpMode(QUrl)));
connect(widget, SIGNAL(closeButtonClicked()),
this, SLOT(slotHideRightPane()));
connect(widget, SIGNAL(aboutToClose()),
this, SLOT(saveExternalWindowSettings()));
connect(widget->currentViewer(), &HelpViewer::loadFinished,
this, &HelpPlugin::highlightSearchTermsInContextHelp);
connect(widget, &HelpWidget::openHelpMode,
this, &HelpPlugin::showLinkInHelpMode);
connect(widget, &HelpWidget::closeButtonClicked,
this, &HelpPlugin::slotHideRightPane);
connect(widget, &HelpWidget::aboutToClose,
this, &HelpPlugin::saveExternalWindowSettings);
// force setup, as we might have never switched to full help mode
// thus the help engine might still run without collection file setup
......@@ -455,15 +455,6 @@ void HelpPlugin::modeChanged(Core::Id mode, Core::Id old)
}
}
void HelpPlugin::updateSideBarSource()
{
if (HelpViewer *viewer = m_centralWidget->currentViewer()) {
const QUrl &url = viewer->source();
if (url.isValid())
updateSideBarSource(url);
}
}
void HelpPlugin::updateSideBarSource(const QUrl &newUrl)
{
if (m_rightPaneSideBarWidget) {
......
......@@ -77,7 +77,7 @@ public:
static HelpViewer *createHelpViewer(qreal zoom);
private slots:
private:
void modeChanged(Core::Id mode, Core::Id old);
void showContextHelp();
......@@ -89,7 +89,6 @@ private slots:
void showLinksInHelpMode(const QMap<QString, QUrl> &links, const QString &key);
void slotHideRightPane();
void updateSideBarSource();
void updateSideBarSource(const QUrl &newUrl);
void setupHelpEngineIfNeeded();
......@@ -100,7 +99,6 @@ private slots:
void slotOpenSupportPage();
void slotReportBug();
private:
void resetFilter();
void activateHelpMode();
bool canShowHelpSideBySide() const;
......@@ -112,7 +110,6 @@ private:
void doSetupIfNeeded();
private:
HelpMode *m_mode;
CentralWidget *m_centralWidget;
HelpWidget *m_rightPaneSideBarWidget;
......
......@@ -77,7 +77,6 @@ public:
static QString mimeFromUrl(const QUrl &url);
static bool launchWithExternalApp(const QUrl &url);
public slots:
void home();
virtual void scaleUp() = 0;
......@@ -97,7 +96,7 @@ signals:
void backwardAvailable(bool);
void loadFinished();
protected slots:
protected:
void slotLoadStarted();
void slotLoadFinished();
};
......
......@@ -246,7 +246,7 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget
if (style != ExternalWindow) {
m_closeAction = new QAction(Core::Icons::CLOSE_TOOLBAR.icon(), QString(), toolBar);
connect(m_closeAction, SIGNAL(triggered()), this, SIGNAL(closeButtonClicked()));
connect(m_closeAction, &QAction::triggered, this, &HelpWidget::closeButtonClicked);
button = new QToolButton;
button->setDefaultAction(m_closeAction);
layout->addWidget(button);
......
......@@ -78,7 +78,7 @@ public:
bool newPage = false);
void activateSideBarItem(const QString &id);
public slots:
public:
void setSource(const QUrl &url);
void updateCloseButton();
......@@ -92,13 +92,12 @@ signals:
void sourceChanged(const QUrl &url);
void filterActivated(const QString &name);
private slots:
private:
void updateBackMenu();
void updateForwardMenu();
void updateWindowTitle();
void helpModeButtonClicked();
private:
void goHome();
void addBookmark();
void copy();
......
......@@ -47,7 +47,7 @@ class MacResponderHack : public QObject
public:
MacResponderHack(QObject *parent);
private slots:
private:
void responderHack(QWidget *old, QWidget *now);
};
......@@ -109,7 +109,7 @@ public:
MacWebKitHelpWidget *widget() const { return m_widget; }
public slots:
public:
void scaleUp();
void scaleDown();
void resetScale();
......@@ -119,14 +119,12 @@ public slots:
void backward();
void print(QPrinter *printer);
public slots:
void slotLoadStarted();
void slotLoadFinished();
private slots:
private:
void goToHistoryItem();
private:
DOMRange *findText(NSString *text, bool forward, bool caseSensitive, DOMNode *startNode,
int startOffset);
MacWebKitHelpWidget *m_widget;
......
......@@ -657,7 +657,7 @@ void MacWebKitHelpViewer::addBackHistoryItems(QMenu *backMenu)
QAction *action = new QAction(backMenu);
action->setText(QString::fromNSString([list itemAtIndex:historyIndex].title));
action->setData(historyIndex);
connect(action, SIGNAL(triggered()), this, SLOT(goToHistoryItem()));
connect(action, &QAction::triggered, this, &MacWebKitHelpViewer::goToHistoryItem);
backMenu->addAction(action);
}
}
......@@ -673,7 +673,7 @@ void MacWebKitHelpViewer::addForwardHistoryItems(QMenu *forwardMenu)
QAction *action = new QAction(forwardMenu);
action->setText(QString::fromNSString([list itemAtIndex:historyIndex].title));
action->setData(historyIndex);
connect(action, SIGNAL(triggered()), this, SLOT(goToHistoryItem()));
connect(action, &QAction::triggered, this, &MacWebKitHelpViewer::goToHistoryItem);
forwardMenu->addAction(action);
}
}
......@@ -878,8 +878,8 @@ void MacWebKitHelpViewer::goToHistoryItem()
MacResponderHack::MacResponderHack(QObject *parent)
: QObject(parent)
{
connect(qApp, SIGNAL(focusChanged(QWidget*,QWidget*)),
this, SLOT(responderHack(QWidget*,QWidget*)));
connect(qApp, &QApplication::focusChanged,
this, &MacResponderHack::responderHack);
}
void MacResponderHack::responderHack(QWidget *old, QWidget *now)
......
......@@ -65,15 +65,16 @@ OpenPagesManager::OpenPagesManager(QObject *parent)
m_comboBox = new QComboBox;
m_comboBox->setModel(m_model);
m_comboBox->setContextMenuPolicy(Qt::CustomContextMenu);
connect(m_comboBox, SIGNAL(activated(int)), this, SLOT(setCurrentPage(int)));
connect(m_comboBox, SIGNAL(customContextMenuRequested(QPoint)), this,
SLOT(openPagesContextMenu(QPoint)));
connect(m_comboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated),
this, &OpenPagesManager::setCurrentPageByRow);
connect(m_comboBox, &QWidget::customContextMenuRequested, this,
&OpenPagesManager::openPagesContextMenu);
m_openPagesSwitcher = new OpenPagesSwitcher(m_model);
connect(m_openPagesSwitcher, SIGNAL(closePage(QModelIndex)), this,
SLOT(closePage(QModelIndex)));
connect(m_openPagesSwitcher, SIGNAL(setCurrentPage(QModelIndex)), this,
SLOT(setCurrentPage(QModelIndex)));
connect(m_openPagesSwitcher, &OpenPagesSwitcher::closePage, this,
&OpenPagesManager::closePage);
connect(m_openPagesSwitcher, &OpenPagesSwitcher::setCurrentPage,
this, &OpenPagesManager::setCurrentPage);
}
OpenPagesManager ::~OpenPagesManager()
......@@ -92,12 +93,12 @@ QWidget *OpenPagesManager::openPagesWidget() const
{
if (!m_openPagesWidget) {
m_openPagesWidget = new OpenPagesWidget(m_model);
connect(m_openPagesWidget, SIGNAL(setCurrentPage(QModelIndex)), this,
SLOT(setCurrentPage(QModelIndex)));
connect(m_openPagesWidget, SIGNAL(closePage(QModelIndex)), this,
SLOT(closePage(QModelIndex)));
connect(m_openPagesWidget, SIGNAL(closePagesExcept(QModelIndex)), this,
SLOT(closePagesExcept(QModelIndex)));
connect(m_openPagesWidget, &OpenPagesWidget::setCurrentPage,
this, &OpenPagesManager::setCurrentPage);
connect(m_openPagesWidget, &OpenPagesWidget::closePage,
this, &OpenPagesManager::closePage);
connect(m_openPagesWidget, &OpenPagesWidget::closePagesExcept,
this, &OpenPagesManager::closePagesExcept);
}
return m_openPagesWidget;
}
......@@ -166,13 +167,11 @@ void OpenPagesManager::setupInitialPages()
CentralWidget::instance()->addViewer(m_model->pageAt(i));
emit pagesChanged();
setCurrentPage((initialPage >= m_model->rowCount())
setCurrentPageByRow((initialPage >= m_model->rowCount())
? m_model->rowCount() - 1 : initialPage);
m_openPagesSwitcher->selectCurrentPage();
}
// -- public slots
HelpViewer *OpenPagesManager::createPage()
{
return createPage(QUrl(Help::Constants::AboutBlank));
......@@ -190,12 +189,12 @@ HelpViewer *OpenPagesManager::createPage(const QUrl &url)
CentralWidget::instance()->addViewer(page);
emit pagesChanged();
setCurrentPage(index);
setCurrentPageByRow(index);
return page;
}
void OpenPagesManager::setCurrentPage(int index)
void OpenPagesManager::setCurrentPageByRow(int index)
{
CentralWidget::instance()->setCurrentViewer(m_model->pageAt(index));
......@@ -207,7 +206,7 @@ void OpenPagesManager::setCurrentPage(int index)
void OpenPagesManager::setCurrentPage(const QModelIndex &index)
{
if (index.isValid())
setCurrentPage(index.row());
setCurrentPageByRow(index.row());
}
void OpenPagesManager::closeCurrentPage()
......@@ -299,8 +298,6 @@ void OpenPagesManager::showTwicherOrSelectPage() const
}
}
// -- private slots
void OpenPagesManager::openPagesContextMenu(const QPoint &point)
{
const QModelIndex &index = m_model->index(m_comboBox->currentIndex(), 0);
......
......@@ -58,11 +58,10 @@ public:
int pageCount() const;
void setupInitialPages();
public slots:
HelpViewer *createPage();
HelpViewer *createPage(const QUrl &url);
void setCurrentPage(int index);
void setCurrentPageByRow(int index);
void setCurrentPage(const QModelIndex &index);
void closeCurrentPage();
......@@ -78,11 +77,8 @@ signals:
private:
void removePage(int index);
void showTwicherOrSelectPage() const;
private slots:
void openPagesContextMenu(const QPoint &point);
private:
QComboBox *m_comboBox;
OpenPagesModel *m_model;
mutable OpenPagesWidget *m_openPagesWidget;
......
......@@ -50,10 +50,9 @@ public:
void removePage(int index);
HelpViewer *pageAt(int index) const;
private slots:
private:
void handleTitleChanged();
private:
QList<HelpViewer *> m_pages;
};
......
......@@ -53,10 +53,10 @@ OpenPagesWidget::OpenPagesWidget(OpenPagesModel *sourceModel, QWidget *parent)
this, &OpenPagesWidget::handleCloseActivated);
connect(this, &OpenDocumentsTreeView::customContextMenuRequested,
this, &OpenPagesWidget::contextMenuRequested);
connect(model(), SIGNAL(rowsInserted(QModelIndex,int,int)),
this, SLOT(updateCloseButtonVisibility()));
connect(model(), SIGNAL(rowsRemoved(QModelIndex,int,int)),
this, SLOT(updateCloseButtonVisibility()));
connect(model(), &QAbstractItemModel::rowsInserted,
this, &OpenPagesWidget::updateCloseButtonVisibility);
connect(model(), &QAbstractItemModel::rowsRemoved,
this, &OpenPagesWidget::updateCloseButtonVisibility);
}
OpenPagesWidget::~OpenPagesWidget()
......@@ -77,7 +77,7 @@ void OpenPagesWidget::allowContextMenu(bool ok)
m_allowContextMenu = ok;
}
// -- private slots
// -- private
void OpenPagesWidget::contextMenuRequested(QPoint pos)
{
......
......@@ -49,13 +49,12 @@ signals:
void closePage(const QModelIndex &index);
void closePagesExcept(const QModelIndex &index);
private slots:
private:
void contextMenuRequested(QPoint pos);
void handleActivated(const QModelIndex &index);
void handleCloseActivated(const QModelIndex &index);
void updateCloseButtonVisibility();
private:
bool m_allowContextMenu;
};
......
......@@ -94,9 +94,9 @@ HelpNetworkReply::HelpNetworkReply(const QNetworkRequest &request,
setHeader(QNetworkRequest::ContentTypeHeader, mimeType);
setHeader(QNetworkRequest::ContentLengthHeader, QByteArray::number(dataLength));
QTimer::singleShot(0, this, SIGNAL(metaDataChanged()));
QTimer::singleShot(0, this, SIGNAL(readyRead()));
QTimer::singleShot(0, this, SIGNAL(finished()));
QTimer::singleShot(0, this, &QNetworkReply::metaDataChanged);
QTimer::singleShot(0, this, &QIODevice::readyRead);
QTimer::singleShot(0, this, &QNetworkReply::finished);
}
qint64 HelpNetworkReply::readData(char *buffer, qint64 maxlen)
......@@ -145,8 +145,8 @@ QtWebKitHelpPage::QtWebKitHelpPage(QObject *parent)
, m_keyboardModifiers(Qt::NoModifier)
{
setForwardUnsupportedContent(true);
connect(this, SIGNAL(unsupportedContent(QNetworkReply*)), this,
SLOT(onHandleUnsupportedContent(QNetworkReply*)));
connect(this, &QWebPage::unsupportedContent, this,
&QtWebKitHelpPage::onHandleUnsupportedContent);
}
QWebPage *QtWebKitHelpPage::createWindow(QWebPage::WebWindowType)
......@@ -257,8 +257,8 @@ QtWebKitHelpWidget::QtWebKitHelpWidget(QtWebKitHelpViewer *parent)
setPage(new QtWebKitHelpPage(this));
HelpNetworkAccessManager *manager = new HelpNetworkAccessManager(this);
page()->setNetworkAccessManager(manager);
connect(manager, SIGNAL(finished(QNetworkReply*)), this,
SLOT(slotNetworkReplyFinished(QNetworkReply*)));
connect(manager, &QNetworkAccessManager::finished, this,
&QtWebKitHelpWidget::slotNetworkReplyFinished);
QAction* action = pageAction(QWebPage::OpenLinkInNewWindow);
action->setText(tr("Open Link as New Page"));
......@@ -267,12 +267,12 @@ QtWebKitHelpWidget::QtWebKitHelpWidget(QtWebKitHelpViewer *parent)
pageAction(QWebPage::DownloadImageToDisk)->setVisible(false);
pageAction(QWebPage::OpenImageInNewWindow)->setVisible(false);
connect(pageAction(QWebPage::Copy), SIGNAL(changed()), this,
SLOT(actionChanged()));
connect(pageAction(QWebPage::Back), SIGNAL(changed()), this,
SLOT(actionChanged()));
connect(pageAction(QWebPage::Forward), SIGNAL(changed()), this,
SLOT(actionChanged()));
connect(pageAction(QWebPage::Copy), &QAction::changed, this,
&QtWebKitHelpWidget::actionChanged);
connect(pageAction(QWebPage::Back), &QAction::changed, this,
&QtWebKitHelpWidget::actionChanged);
connect(pageAction(QWebPage::Forward), &QAction::changed, this,
&QtWebKitHelpWidget::actionChanged);
}
QtWebKitHelpWidget::~QtWebKitHelpWidget()
......@@ -289,8 +289,6 @@ void QtWebKitHelpWidget::scaleDown()
setZoomFactor(qMax(qreal(0.0), zoomFactor() - qreal(0.1)));
}
// -- public slots
void QtWebKitHelpWidget::copy()
{
triggerPageAction(QWebPage::Copy);
......@@ -348,7 +346,7 @@ void QtWebKitHelpWidget::contextMenuEvent(QContextMenuEvent *event)
delete menu;
}
// -- private slots
// -- private
void QtWebKitHelpWidget::actionChanged()
{
......@@ -395,13 +393,13 @@ QtWebKitHelpViewer::QtWebKitHelpViewer(QWidget *parent)