diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2017-03-14 16:30:27 +0100 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2017-05-02 13:56:19 +0000 |
commit | 63bee398b5db72fdb40d039d8e01223992655403 (patch) | |
tree | d353a259514f35c95a793fb68e41f3c84268fca2 /src/assistant/assistant/helpviewer_p.h | |
parent | 07ebe565913f8cdc531c862fed62d0398c83ecc4 (diff) |
Refactor connect to use Qt5 style
Change-Id: I9fed1b82d5afd0458b772475d303d2c0179ac73e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/assistant/assistant/helpviewer_p.h')
-rw-r--r-- | src/assistant/assistant/helpviewer_p.h | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/assistant/assistant/helpviewer_p.h b/src/assistant/assistant/helpviewer_p.h index 1364ea6a3..23aab69e2 100644 --- a/src/assistant/assistant/helpviewer_p.h +++ b/src/assistant/assistant/helpviewer_p.h @@ -86,26 +86,15 @@ public: return true; } - void openLink(bool newPage) - { - if(lastAnchor.isEmpty()) - return; - if (newPage) - OpenPagesManager::instance()->createPage(lastAnchor); - else - CentralWidget::instance()->setSource(lastAnchor); - lastAnchor.clear(); - } - public slots: void openLink() { - openLink(false); + doOpenLink(false); } void openLinkInNewPage() { - openLink(true); + doOpenLink(true); } public: @@ -118,6 +107,20 @@ public: public: bool m_loadFinished; + +private: + + void doOpenLink(bool newPage) + { + if (lastAnchor.isEmpty()) + return; + if (newPage) + OpenPagesManager::instance()->createPage(lastAnchor); + else + CentralWidget::instance()->setSource(lastAnchor); + lastAnchor.clear(); + } + }; QT_END_NAMESPACE |