Index: /trunk/Config.kmk
===================================================================
--- /trunk/Config.kmk	(revision 86580)
+++ /trunk/Config.kmk	(revision 86581)
@@ -6927,5 +6927,5 @@
   VBOX_QT_MOD = QtCore QtGui QtWidgets QtPrintSupport QtMacExtras $(if $(VBOX_GUI_USE_QGL),QtOpenGL,)
  else if1of ($(KBUILD_TARGET), linux freebsd netbsd openbsd solaris win)
-  VBOX_QT_MOD += Qt5Core Qt5Gui Qt5Widgets Qt5PrintSupport Qt5Help Qt5Network Qt5CLucene Qt5Sql $(if $(VBOX_GUI_USE_QGL),Qt5OpenGL,)
+  VBOX_QT_MOD += Qt5Core Qt5Gui Qt5Widgets Qt5PrintSupport $(if $(VBOX_GUI_USE_QGL),Qt5OpenGL,)
   if1of ($(KBUILD_TARGET), linux freebsd netbsd openbsd solaris)
    VBOX_QT_MOD += Qt5DBus Qt5XcbQpa Qt5X11Extras
@@ -6940,4 +6940,10 @@
  endif # linux freebsd netbsd openbsd solaris win
 
+ ifeq ($(KBUILD_TARGET), linux)
+   #VBOX_QT_PLUGINS += \
+    # plugins/sqldrivers/libqsqlite.so
+   VBOX_QT_MOD += Qt5Help Qt5Network Qt5CLucene Qt5Sql
+ endif # linux
+ 
  VBOX_QT_MOD_NAMES = $(foreach qtmod,$(VBOX_QT_MOD),$(qtmod)$(VBOX_QT_INFIX))
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp	(revision 86580)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp	(revision 86581)
@@ -1372,11 +1372,11 @@
     const QString strSuffix = "pdf";
 #elif defined(VBOX_WS_X11)
-# if defined(VBOX_OSE) || !defined(VBOX_WITH_KCHMVIEWER)
+    //# if defined(VBOX_OSE) || !defined(VBOX_WITH_KCHMVIEWER)
     const QString strName = "UserManual";
-    const QString strSuffix = "pdf";
-# else
-    const QString strName = "VirtualBox";
-    const QString strSuffix = "chm";
-# endif
+    const QString strSuffix = "qhc";
+    //# else
+    // const QString strName = "VirtualBox";
+    // const QString strSuffix = "chm";
+    //# endif
 #endif
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp	(revision 86580)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp	(revision 86581)
@@ -3203,4 +3203,5 @@
     QProcess::startDetached(QString(szViewerPath) + "/kchmviewer", QStringList(strLocation));
 # else /* #if !defined(VBOX_OSE) && defined(VBOX_WITH_KCHMVIEWER) */
+    /* instead of viewing the pdf manual show qtHelp one. This is soon to be default in all platforms. */
     showHelpBrowser(strLocation);
 # endif /* #if defined(VBOX_OSE) || !defined(VBOX_WITH_KCHMVIEWER) */
@@ -3393,7 +3394,6 @@
 }
 
-void UIMessageCenter::showHelpBrowser(const QString strHelpFileLocation, QWidget *pParent /* = 0 */)
-{
-    Q_UNUSED(strHelpFileLocation);
+void UIMessageCenter::showHelpBrowser(const QString strHelpFilePath, QWidget *pParent /* = 0 */)
+{
     QWidget *pDialogParent = windowManager().realParentWindow(pParent ? pParent : windowManager().mainWindowShown());
     AssertReturnVoid(pDialogParent);
@@ -3401,5 +3401,5 @@
 
     QIManagerDialog *pHelpBrowserDialog;
-    UIHelpBrowserDialogFactory dialogFactory;
+    UIHelpBrowserDialogFactory dialogFactory(strHelpFilePath);
 
     dialogFactory.prepare(pHelpBrowserDialog);
Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h	(revision 86580)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h	(revision 86581)
@@ -598,5 +598,5 @@
                        const QString &strAutoConfirmId) const;
 
-    void showHelpBrowser(const QString strHelpFileLocation, QWidget *pParent = 0);
+    void showHelpBrowser(const QString strHelpFilePath, QWidget *pParent = 0);
 
     /** Holds the list of shown warnings. */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserDialog.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserDialog.cpp	(revision 86580)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserDialog.cpp	(revision 86581)
@@ -44,5 +44,6 @@
 *********************************************************************************************************************************/
 
-UIHelpBrowserDialogFactory::UIHelpBrowserDialogFactory()
+UIHelpBrowserDialogFactory::UIHelpBrowserDialogFactory(const QString &strHelpFilePath /*  = QString() */)
+    :m_strHelpFilePath(strHelpFilePath)
 {
 }
@@ -50,5 +51,5 @@
 void UIHelpBrowserDialogFactory::create(QIManagerDialog *&pDialog, QWidget *pCenterWidget)
 {
-    pDialog = new UIHelpBrowserDialog(pCenterWidget);
+    pDialog = new UIHelpBrowserDialog(pCenterWidget, m_strHelpFilePath);
 }
 
@@ -58,6 +59,7 @@
 *********************************************************************************************************************************/
 
-UIHelpBrowserDialog::UIHelpBrowserDialog(QWidget *pCenterWidget)
+UIHelpBrowserDialog::UIHelpBrowserDialog(QWidget *pCenterWidget, const QString &strHelpFilePath)
     : QIWithRetranslateUI<QIManagerDialog>(pCenterWidget)
+    , m_strHelpFilePath(strHelpFilePath)
 {
 }
@@ -80,5 +82,10 @@
 {
     /* Create widget: */
-    UIHelpBrowserWidget *pWidget = new UIHelpBrowserWidget(EmbedTo_Dialog, true /* show toolbar */, this);
+    UIHelpBrowserWidget *pWidget = 0;
+
+#ifdef VBOX_WS_X11
+    pWidget = new UIHelpBrowserWidget(EmbedTo_Dialog, m_strHelpFilePath, true /* show toolbar */, this);
+#endif
+
     if (pWidget)
     {
@@ -105,32 +112,8 @@
 void UIHelpBrowserDialog::loadSettings()
 {
-    /* Invent default window geometry: */
-    const QRect availableGeo = gpDesktop->availableGeometry(this);
-    int iDefaultWidth = availableGeo.width() / 2;
-    int iDefaultHeight = availableGeo.height() * 3 / 4;
-    /* Try obtain the default width of the current logviewer: */
-    const UIHelpBrowserWidget *pWidget = qobject_cast<const UIHelpBrowserWidget*>(widget());
-    if (pWidget)
-    {
-        const int iWidth = pWidget->defaultLogPageWidth();
-        if (iWidth != 0)
-            iDefaultWidth = iWidth;
-    }
-    QRect defaultGeo(0, 0, iDefaultWidth, iDefaultHeight);
-
-    /* Load geometry from extradata: */
-    const QRect geo = gEDataManager->logWindowGeometry(this, centerWidget(), defaultGeo);
-    LogRel2(("GUI: UIHelpBrowserDialog: Restoring geometry to: Origin=%dx%d, Size=%dx%d\n",
-             geo.x(), geo.y(), geo.width(), geo.height()));
-    restoreGeometry(geo);
 }
 
 void UIHelpBrowserDialog::saveSettings()
 {
-    /* Save geometry to extradata: */
-    const QRect geo = currentGeometry();
-    LogRel2(("GUI: UIHelpBrowserDialog: Saving geometry as: Origin=%dx%d, Size=%dx%d\n",
-             geo.x(), geo.y(), geo.width(), geo.height()));
-    gEDataManager->setLogWindowGeometry(geo, isCurrentlyMaximized());
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserDialog.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserDialog.h	(revision 86580)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserDialog.h	(revision 86581)
@@ -45,5 +45,5 @@
 public:
 
-    UIHelpBrowserDialogFactory();
+    UIHelpBrowserDialogFactory(const QString &strHelpFilePath = QString());
 
 protected:
@@ -53,4 +53,7 @@
     virtual void create(QIManagerDialog *&pDialog, QWidget *pCenterWidget) /* override */;
 
+private:
+
+    QString m_strHelpFilePath;
 };
 
@@ -63,5 +66,5 @@
 public:
 
-    UIHelpBrowserDialog(QWidget *pCenterWidget);
+    UIHelpBrowserDialog(QWidget *pCenterWidget, const QString &strHelpFilePath);
 
 protected:
@@ -101,4 +104,5 @@
 private:
 
+    QString m_strHelpFilePath;
 };
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp	(revision 86580)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp	(revision 86581)
@@ -20,11 +20,13 @@
 #include <QDir>
 #include <QFont>
+#ifdef VBOX_WS_X11
+ #include <QtHelp/QHelpEngine>
+ #include <QtHelp/QHelpContentWidget>
+#endif
 #include <QMenu>
-#include <QPainter>
-#include <QPlainTextEdit>
 #include <QScrollBar>
 #include <QStyle>
-#include <QTextBlock>
-#include <QVBoxLayout>
+#include <QTextBrowser>
+#include <QHBoxLayout>
 #ifdef RT_OS_SOLARIS
 # include <QFontDatabase>
@@ -50,5 +52,43 @@
 #include "CSystemProperties.h"
 
+class UIHelpBrowserViewer : public QTextBrowser
+{
+    Q_OBJECT;
+
+public:
+
+    UIHelpBrowserViewer(const QHelpEngine *pHelpEngine, QWidget *pParent = 0);
+    virtual QVariant loadResource(int type, const QUrl &name) /* override */;
+
+private:
+
+#ifdef VBOX_WS_X11
+    const QHelpEngine* m_pHelpEngine;
+#endif
+};
+
+UIHelpBrowserViewer::UIHelpBrowserViewer(const QHelpEngine *pHelpEngine, QWidget *pParent /* = 0 */)
+    :QTextBrowser(pParent)
+#ifdef VBOX_WS_X11
+    , m_pHelpEngine(pHelpEngine)
+#endif
+{
+}
+
+QVariant UIHelpBrowserViewer::loadResource(int type, const QUrl &name)
+{
+#ifdef VBOX_WS_X11
+    if (name.scheme() == "qthelp" && m_pHelpEngine)
+        return QVariant(m_pHelpEngine->fileData(name));
+    else
+        return QTextBrowser::loadResource(type, name);
+#else
+    return QTextBrowser::loadResource(type, name);
+#endif
+}
+
+
 UIHelpBrowserWidget::UIHelpBrowserWidget(EmbedTo enmEmbedding,
+                                         const QString &strHelpFilePath,
                                          bool fShowToolbar /* = true */,
                                          QWidget *pParent /* = 0 */)
@@ -57,18 +97,15 @@
     , m_fShowToolbar(fShowToolbar)
     , m_fIsPolished(false)
+    , m_pMainLayout(0)
     , m_pTabWidget(0)
-    , m_pSearchPanel(0)
-    , m_pFilterPanel(0)
-    , m_pBookmarksPanel(0)
-    , m_pOptionsPanel(0)
-    , m_pMainLayout(0)
     , m_pToolBar(0)
-    , m_bShowLineNumbers(true)
-    , m_bWrapLines(false)
-    , m_font(QFontDatabase::systemFont(QFontDatabase::FixedFont))
+    , m_strHelpFilePath(strHelpFilePath)
+#ifdef VBOX_WS_X11
+    , m_pHelpEngine(0)
+#endif
+    , m_pTextBrowser(0)
 {
     /* Prepare VM Log-Viewer: */
     prepare();
-    restorePanelVisibility();
 }
 
@@ -79,24 +116,4 @@
 }
 
-int UIHelpBrowserWidget::defaultLogPageWidth() const
-{
-    if (!m_pTabWidget)
-        return 0;
-
-    QWidget *pContainer = m_pTabWidget->currentWidget();
-    if (!pContainer)
-        return 0;
-
-    QPlainTextEdit *pBrowser = pContainer->findChild<QPlainTextEdit*>();
-    if (!pBrowser)
-        return 0;
-    /* Compute a width for 132 characters plus scrollbar and frame width: */
-    int iDefaultWidth = pBrowser->fontMetrics().width(QChar('x')) * 132 +
-                        pBrowser->verticalScrollBar()->width() +
-                        pBrowser->frameWidth() * 2;
-
-    return iDefaultWidth;
-}
-
 QMenu *UIHelpBrowserWidget::menu() const
 {
@@ -104,11 +121,4 @@
 }
 
-QFont UIHelpBrowserWidget::currentFont() const
-{
-    const UIVMLogPage* logPage = currentLogPage();
-    if (!logPage)
-        return QFont();
-    return logPage->currentFont();
-}
 
 bool UIHelpBrowserWidget::shouldBeMaximized() const
@@ -117,204 +127,43 @@
 }
 
-void UIHelpBrowserWidget::sltDeleteBookmark(int index)
-{
-    UIVMLogPage* logPage = currentLogPage();
-    if (!logPage)
-        return;
-    logPage->deleteBookmark(index);
-    if (m_pBookmarksPanel)
-        m_pBookmarksPanel->updateBookmarkList(logPage->bookmarkVector());
-}
-
-void UIHelpBrowserWidget::sltDeleteAllBookmarks()
-{
-    UIVMLogPage* logPage = currentLogPage();
-    if (!logPage)
-        return;
-    logPage->deleteAllBookmarks();
-
-    if (m_pBookmarksPanel)
-        m_pBookmarksPanel->updateBookmarkList(logPage->bookmarkVector());
-}
-
-void UIHelpBrowserWidget::sltUpdateBookmarkPanel()
-{
-    if (!currentLogPage() || !m_pBookmarksPanel)
-        return;
-    m_pBookmarksPanel->updateBookmarkList(currentLogPage()->bookmarkVector());
-}
-
-void UIHelpBrowserWidget::gotoBookmark(int bookmarkIndex)
-{
-    if (!currentLogPage())
-        return;
-    currentLogPage()->scrollToBookmark(bookmarkIndex);
-}
-
-void UIHelpBrowserWidget::sltPanelActionToggled(bool fChecked)
-{
-    QAction *pSenderAction = qobject_cast<QAction*>(sender());
-    if (!pSenderAction)
-        return;
-    UIDialogPanel* pPanel = 0;
-    /* Look for the sender() within the m_panelActionMap's values: */
-    for (QMap<UIDialogPanel*, QAction*>::const_iterator iterator = m_panelActionMap.begin();
-        iterator != m_panelActionMap.end(); ++iterator)
+void UIHelpBrowserWidget::prepare()
+{
+    loadOptions();
+
+    prepareActions();
+    prepareWidgets();
+
+
+    retranslateUi();
+}
+
+void UIHelpBrowserWidget::prepareActions()
+{
+
+}
+
+void UIHelpBrowserWidget::prepareWidgets()
+{
+    /* Create main layout: */
+    m_pMainLayout = new QHBoxLayout(this);
+    AssertReturnVoid(m_pMainLayout);
+#ifdef VBOX_WS_X11
+    m_pHelpEngine = new QHelpEngine(m_strHelpFilePath, this);
+    connect(m_pHelpEngine, &QHelpEngine::setupFinished,
+            this, &UIHelpBrowserWidget::sltHandleHelpEngineSetupFinished);
+
+    // m_pTabWidget = new QITabWidget;
+    // m_pMainLayout->addWidget(m_pTabWidget);
+    m_pTextBrowser = new UIHelpBrowserViewer(m_pHelpEngine);
+    AssertReturnVoid(m_pTextBrowser);
+    m_pMainLayout->addWidget(m_pTextBrowser);
+
+    if (QFile(m_strHelpFilePath).exists() && m_pHelpEngine)
     {
-        if (iterator.value() == pSenderAction)
-            pPanel = iterator.key();
+        bool fSetupResult = m_pHelpEngine->setupData();
+        //m_pHelpEngine->registerDocumentation(m_strHelpFilePath));
+        printf("setup data %d %s\n", fSetupResult, qPrintable(m_strHelpFilePath));
     }
-    if (!pPanel)
-        return;
-    if (fChecked)
-        showPanel(pPanel);
-    else
-        hidePanel(pPanel);
-}
-
-void UIHelpBrowserWidget::sltSearchResultHighLigting()
-{
-    if (!m_pSearchPanel || !currentLogPage())
-        return;
-    currentLogPage()->setScrollBarMarkingsVector(m_pSearchPanel->matchLocationVector());
-}
-
-void UIHelpBrowserWidget::sltHandleSearchUpdated()
-{
-    if (!m_pSearchPanel || !currentLogPage())
-        return;
-}
-
-void UIHelpBrowserWidget::sltTabIndexChange(int tabIndex)
-{
-    Q_UNUSED(tabIndex);
-
-    /* Dont refresh the search here as it is refreshed by the filtering mechanism
-       which is updated as tab current index changes: */
-
-    /* We keep a separate QVector<LogBookmark> for each log page: */
-    if (m_pBookmarksPanel && currentLogPage())
-        m_pBookmarksPanel->updateBookmarkList(currentLogPage()->bookmarkVector());
-}
-
-void UIHelpBrowserWidget::sltFilterApplied(bool isOriginal)
-{
-    if (currentLogPage())
-        currentLogPage()->setFiltered(!isOriginal);
-    /* Reapply the search to get highlighting etc. correctly */
-    if (m_pSearchPanel && m_pSearchPanel->isVisible())
-        m_pSearchPanel->refresh();
-}
-
-void UIHelpBrowserWidget::sltLogPageFilteredChanged(bool isFiltered)
-{
-    /* Disable bookmark panel since bookmarks are stored as line numbers within
-       the original log text and does not mean much in a reduced/filtered one. */
-    if (m_pBookmarksPanel)
-        m_pBookmarksPanel->disableEnableBookmarking(!isFiltered);
-}
-
-void UIHelpBrowserWidget::sltHandleHidePanel(UIDialogPanel *pPanel)
-{
-    hidePanel(pPanel);
-}
-
-void UIHelpBrowserWidget::sltShowLineNumbers(bool bShowLineNumbers)
-{
-    if (m_bShowLineNumbers == bShowLineNumbers)
-        return;
-
-    m_bShowLineNumbers = bShowLineNumbers;
-    /* Set all log page instances. */
-    for (int i = 0; i < m_logPageList.size(); ++i)
-    {
-        UIVMLogPage* pLogPage = qobject_cast<UIVMLogPage*>(m_logPageList[i]);
-        if (pLogPage)
-            pLogPage->setShowLineNumbers(m_bShowLineNumbers);
-    }
-}
-
-void UIHelpBrowserWidget::sltWrapLines(bool bWrapLines)
-{
-    if (m_bWrapLines == bWrapLines)
-        return;
-
-    m_bWrapLines = bWrapLines;
-    /* Set all log page instances. */
-    for (int i = 0; i < m_logPageList.size(); ++i)
-    {
-        UIVMLogPage* pLogPage = qobject_cast<UIVMLogPage*>(m_logPageList[i]);
-        if (pLogPage)
-            pLogPage->setWrapLines(m_bWrapLines);
-    }
-}
-
-void UIHelpBrowserWidget::sltFontSizeChanged(int fontSize)
-{
-    if (m_font.pointSize() == fontSize)
-        return;
-    m_font.setPointSize(fontSize);
-    for (int i = 0; i < m_logPageList.size(); ++i)
-    {
-        UIVMLogPage* pLogPage = qobject_cast<UIVMLogPage*>(m_logPageList[i]);
-        if (pLogPage)
-            pLogPage->setCurrentFont(m_font);
-    }
-}
-
-void UIHelpBrowserWidget::sltChangeFont(QFont font)
-{
-    if (m_font == font)
-        return;
-    m_font = font;
-    for (int i = 0; i < m_logPageList.size(); ++i)
-    {
-        UIVMLogPage* pLogPage = qobject_cast<UIVMLogPage*>(m_logPageList[i]);
-        if (pLogPage)
-            pLogPage->setCurrentFont(m_font);
-    }
-}
-
-void UIHelpBrowserWidget::sltResetOptionsToDefault()
-{
-    sltShowLineNumbers(true);
-    sltWrapLines(false);
-    sltChangeFont(QFontDatabase::systemFont(QFontDatabase::FixedFont));
-
-    if (m_pOptionsPanel)
-    {
-        m_pOptionsPanel->setShowLineNumbers(true);
-        m_pOptionsPanel->setWrapLines(false);
-        m_pOptionsPanel->setFontSizeInPoints(m_font.pointSize());
-    }
-}
-
-void UIHelpBrowserWidget::prepare()
-{
-    /* Load options: */
-    loadOptions();
-
-    /* Prepare stuff: */
-    prepareActions();
-    /* Prepare widgets: */
-    prepareWidgets();
-
-    /* Apply language settings: */
-    retranslateUi();
-
-    /* Setup escape shortcut: */
-    manageEscapeShortCut();
-}
-
-void UIHelpBrowserWidget::prepareActions()
-{
-
-}
-
-void UIHelpBrowserWidget::prepareWidgets()
-{
-    /* Create main layout: */
-    m_pMainLayout = new QVBoxLayout(this);
-    AssertReturnVoid(m_pMainLayout);
+#endif
 }
 
@@ -347,45 +196,8 @@
 void UIHelpBrowserWidget::loadOptions()
 {
-    m_bWrapLines = gEDataManager->logViewerWrapLines();
-    m_bShowLineNumbers = gEDataManager->logViewerShowLineNumbers();
-    QFont loadedFont = gEDataManager->logViewerFont();
-    if (loadedFont != QFont())
-        m_font = loadedFont;
-}
-
-void UIHelpBrowserWidget::restorePanelVisibility()
-{
-    /** Reset the action states first: */
-    foreach(QAction* pAction, m_panelActionMap.values())
-    {
-        pAction->blockSignals(true);
-        pAction->setChecked(false);
-        pAction->blockSignals(false);
-    }
-
-    /* Load the visible panel list and show them: */
-    QStringList strNameList = gEDataManager->logViewerVisiblePanels();
-    foreach(const QString strName, strNameList)
-    {
-        foreach(UIDialogPanel* pPanel, m_panelActionMap.keys())
-        {
-            if (strName == pPanel->panelName())
-            {
-                showPanel(pPanel);
-                break;
-            }
-        }
-    }
 }
 
 void UIHelpBrowserWidget::saveOptions()
 {
-    /* Save a list of currently visible panels: */
-    QStringList strNameList;
-    foreach(UIDialogPanel* pPanel, m_visiblePanelsList)
-        strNameList.append(pPanel->panelName());
-    gEDataManager->setLogViewerVisiblePanels(strNameList);
-
-    gEDataManager->setLogViweverOptions(m_font, m_bWrapLines, m_bShowLineNumbers);
 }
 
@@ -428,161 +240,19 @@
 void UIHelpBrowserWidget::keyPressEvent(QKeyEvent *pEvent)
 {
-    /* Depending on key pressed: */
-    switch (pEvent->key())
-    {
-        /* Process Back key as switch to previous tab: */
-        case Qt::Key_Back:
-        {
-            if (m_pTabWidget->currentIndex() > 0)
-            {
-                m_pTabWidget->setCurrentIndex(m_pTabWidget->currentIndex() - 1);
-                return;
-            }
-            break;
-        }
-        /* Process Forward key as switch to next tab: */
-        case Qt::Key_Forward:
-        {
-            if (m_pTabWidget->currentIndex() < m_pTabWidget->count())
-            {
-                m_pTabWidget->setCurrentIndex(m_pTabWidget->currentIndex() + 1);
-                return;
-            }
-            break;
-        }
-        default:
-            break;
-    }
-    QWidget::keyPressEvent(pEvent);
-}
-
-QPlainTextEdit* UIHelpBrowserWidget::logPage(int pIndex) const
-{
-    if (!m_pTabWidget->isEnabled())
-        return 0;
-    QWidget* pContainer = m_pTabWidget->widget(pIndex);
-    if (!pContainer)
-        return 0;
-    QPlainTextEdit *pBrowser = pContainer->findChild<QPlainTextEdit*>();
-    return pBrowser;
-}
-
-void UIHelpBrowserWidget::createLogPage(const QString &strFileName, const QString &strLogContent, bool noLogsToShow /* = false */)
-{
-    if (!m_pTabWidget)
-        return;
-
-    /* Create page-container: */
-    UIVMLogPage* pLogPage = new UIVMLogPage();
-    if (pLogPage)
-    {
-        connect(pLogPage, &UIVMLogPage::sigBookmarksUpdated, this, &UIHelpBrowserWidget::sltUpdateBookmarkPanel);
-        connect(pLogPage, &UIVMLogPage::sigLogPageFilteredChanged, this, &UIHelpBrowserWidget::sltLogPageFilteredChanged);
-        /* Initialize setting for this log page */
-        pLogPage->setShowLineNumbers(m_bShowLineNumbers);
-        pLogPage->setWrapLines(m_bWrapLines);
-        pLogPage->setCurrentFont(m_font);
-
-        /* Set the file name only if we really have log file to read. */
-        if (!noLogsToShow)
-            pLogPage->setLogFileName(strFileName);
-
-        /* Add page-container to viewer-container: */
-        int tabIndex = m_pTabWidget->insertTab(m_pTabWidget->count(), pLogPage, QFileInfo(strFileName).fileName());
-
-        pLogPage->setTabIndex(tabIndex);
-        m_logPageList.resize(m_pTabWidget->count());
-        m_logPageList[tabIndex] = pLogPage;
-
-        /* Set text edit since we want to display this text: */
-        if (!noLogsToShow)
-        {
-            pLogPage->setTextEditText(strLogContent);
-            /* Set the log string of the UIVMLogPage: */
-            pLogPage->setLogString(strLogContent);
-        }
-        /* In case there are some errors append the error text as html: */
-        else
-        {
-            pLogPage->setTextEditTextAsHtml(strLogContent);
-            pLogPage->markForError();
-        }
-        pLogPage->setScrollBarMarkingsVector(m_pSearchPanel->matchLocationVector());
-    }
-}
-
-const UIVMLogPage *UIHelpBrowserWidget::currentLogPage() const
-{
-    int currentTabIndex = m_pTabWidget->currentIndex();
-    if (currentTabIndex >= m_logPageList.size())
-        return 0;
-    return qobject_cast<const UIVMLogPage*>(m_logPageList.at(currentTabIndex));
-}
-
-UIVMLogPage *UIHelpBrowserWidget::currentLogPage()
-{
-    int currentTabIndex = m_pTabWidget->currentIndex();
-    if (currentTabIndex >= m_logPageList.size() || currentTabIndex == -1)
-        return 0;
-
-    return qobject_cast<UIVMLogPage*>(m_logPageList.at(currentTabIndex));
-}
-
-void UIHelpBrowserWidget::resetHighlighthing()
-{
-    /* Undo the document changes to remove highlighting: */
-    UIVMLogPage* logPage = currentLogPage();
-    if (!logPage)
-        return;
-    logPage->documentUndo();
-    logPage->clearScrollBarMarkingsVector();
-}
-
-void UIHelpBrowserWidget::hidePanel(UIDialogPanel* panel)
-{
-    if (!panel)
-        return;
-    if (panel->isVisible())
-        panel->setVisible(false);
-    QMap<UIDialogPanel*, QAction*>::iterator iterator = m_panelActionMap.find(panel);
-    if (iterator != m_panelActionMap.end())
-    {
-        if (iterator.value() && iterator.value()->isChecked())
-            iterator.value()->setChecked(false);
-    }
-    m_visiblePanelsList.removeOne(panel);
-    manageEscapeShortCut();
-}
-
-void UIHelpBrowserWidget::showPanel(UIDialogPanel* panel)
-{
-    if (panel && panel->isHidden())
-        panel->setVisible(true);
-    QMap<UIDialogPanel*, QAction*>::iterator iterator = m_panelActionMap.find(panel);
-    if (iterator != m_panelActionMap.end())
-    {
-        if (!iterator.value()->isChecked())
-            iterator.value()->setChecked(true);
-    }
-    m_visiblePanelsList.push_back(panel);
-    manageEscapeShortCut();
-}
-
-void UIHelpBrowserWidget::manageEscapeShortCut()
-{
-    /* if there is no visible panels give the escape shortcut to parent dialog: */
-    if (m_visiblePanelsList.isEmpty())
-    {
-        emit sigSetCloseButtonShortCut(QKeySequence(Qt::Key_Escape));
-        return;
-    }
-    /* Take the escape shortcut from the dialog: */
-    emit sigSetCloseButtonShortCut(QKeySequence());
-    /* Just loop thru the visible panel list and set the esc key to the
-       panel which made visible latest */
-    for (int i = 0; i < m_visiblePanelsList.size() - 1; ++i)
-    {
-        m_visiblePanelsList[i]->setCloseButtonShortCut(QKeySequence());
-    }
-    m_visiblePanelsList.back()->setCloseButtonShortCut(QKeySequence(Qt::Key_Escape));
-}
+   QWidget::keyPressEvent(pEvent);
+}
+
+
+void UIHelpBrowserWidget::sltHandleHelpEngineSetupFinished()
+{
+#ifdef VBOX_WS_X11
+    AssertReturnVoid(m_pTextBrowser && m_pHelpEngine);
+
+    QList<QUrl> files = m_pHelpEngine->files(m_pHelpEngine->namespaceName(m_strHelpFilePath), QStringList());
+    if (!files.empty())
+        m_pTextBrowser->setSource(files[0]);
+    /*  @todo: show some kind of error maybe. */
+#endif
+}
+
+#include "UIHelpBrowserWidget.moc"
Index: /trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.h	(revision 86580)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.h	(revision 86581)
@@ -23,4 +23,5 @@
 
 /* Qt includes: */
+
 #include <QKeySequence>
 #include <QPair>
@@ -36,16 +37,12 @@
 
 /* Forward declarations: */
+class QHelpEngine;
+class QPlainTextEdit;
+class UIHelpBrowserViewer;
+class QHBoxLayout;
 class QITabWidget;
-class QPlainTextEdit;
-class QVBoxLayout;
+class QIToolBar;
 class UIActionPool;
 class UIDialogPanel;
-class QIToolBar;
-class UIVMLogPage;
-class UIVMLogViewerBookmarksPanel;
-class UIVMLogViewerFilterPanel;
-class UIVMLogViewerPanel;
-class UIVMLogViewerSearchPanel;
-class UIVMLogViewerOptionsPanel;
 
 /** QWidget extension providing GUI for VirtualBox LogViewer. It
@@ -65,10 +62,8 @@
       * @param  enmEmbedding  Brings the type of widget embedding.
       * @param  fShowToolbar  Brings whether we should create/show toolbar.*/
-    UIHelpBrowserWidget(EmbedTo enmEmbedding,
+    UIHelpBrowserWidget(EmbedTo enmEmbedding, const QString &strHelpFilePath,
                         bool fShowToolbar = true, QWidget *pParent = 0);
     /** Destructs the VM Log-Viewer. */
     ~UIHelpBrowserWidget();
-    /** Returns the width of the current log page. return 0 if there is no current log page: */
-    int defaultLogPageWidth() const;
 
     /** Returns the menu. */
@@ -80,5 +75,4 @@
 #endif
 
-    QFont currentFont() const;
 
 protected:
@@ -89,61 +83,16 @@
 private slots:
 
-    /** @name Bookmark related slots
-     * @{ */
-    /** Deletes the bookmark with @p index from the current logs bookmark list. */
-        void sltDeleteBookmark(int index);
-        /** Receives delete all signal from the bookmark panel and notifies UIVMLogPage. */
-        void sltDeleteAllBookmarks();
-        /** Manages bookmark panel update when bookmark vector is updated. */
-        void sltUpdateBookmarkPanel();
-        /** Makes the current UIVMLogPage to goto (scroll) its bookmark with index @a index. */
-        void gotoBookmark(int bookmarkIndex);
-    /** @} */
-
-    void sltPanelActionToggled(bool fChecked);
-    /** Handles the search result highlight changes. */
-    void sltSearchResultHighLigting();
-    void sltHandleSearchUpdated();
-    /** Handles the tab change of the logviewer. */
-    void sltTabIndexChange(int tabIndex);
-    /* if @a isOriginal true than the result of the filtering is equal to
-       the original log file for some reason. */
-    void sltFilterApplied(bool isOriginal);
-    /* Handles the UIVMLogPage signal which is emitted when isFiltered property
-       of UIVMLogPage is changed. */
-    void sltLogPageFilteredChanged(bool isFiltered);
-    void sltHandleHidePanel(UIDialogPanel *pPanel);
-
-    /** @name Slots to handle signals from settings panel
-     * @{ */
-        void sltShowLineNumbers(bool bShowLineNumbers);
-        void sltWrapLines(bool bWrapLine);
-        void sltFontSizeChanged(int fontSize);
-        void sltChangeFont(QFont font);
-        void sltResetOptionsToDefault();
-    /** @} */
+    void sltHandleHelpEngineSetupFinished();
 
 private:
 
-    /** @name Prepare/Cleanup
-      * @{ */
-        /** Prepares VM Log-Viewer. */
-        void prepare();
-        /** Prepares actions. */
-        void prepareActions();
-        /** Prepares widgets. */
-        void prepareWidgets();
-        /** Prepares toolbar. */
-        void prepareToolBar();
-        /** Loads options.  */
-        void loadOptions();
-        /** Shows the panels that have been visible the last time logviewer is closed. */
-        void restorePanelVisibility();
+    void prepare();
+    void prepareActions();
+    void prepareWidgets();
+    void prepareToolBar();
+    void loadOptions();
 
-        /** Saves options.  */
-        void saveOptions();
-        /** Cleanups VM Log-Viewer. */
-        void cleanup();
-    /** @} */
+    void saveOptions();
+    void cleanup();
 
     /** @name Event handling stuff.
@@ -158,26 +107,4 @@
     /** @} */
 
-
-    /** Returns the log-page from the tab with index @a pIndex. */
-    QPlainTextEdit* logPage(int pIndex) const;
-    /** Returns the newly created log-page using @a strPage filename. */
-    void createLogPage(const QString &strFileName, const QString &strLogContent, bool noLogsToShow = false);
-
-    const UIVMLogPage *currentLogPage() const;
-    UIVMLogPage *currentLogPage();
-
-    /** Resets document (of the curent tab) and scrollbar highligthing */
-    void resetHighlighthing();
-
-    void hidePanel(UIDialogPanel* panel);
-    void showPanel(UIDialogPanel* panel);
-
-    /** Make sure escape key is assigned to only a single widget. This is done by checking
-        several things in the following order:
-        - when there are no more panels visible assign it to the parent dialog
-        - grab it from the dialog as soon as a panel becomes visible again
-        - assigned it to the most recently "unhidden" panel */
-    void manageEscapeShortCut();
-
     /** Holds the widget's embedding type. */
     const EmbedTo m_enmEmbedding;
@@ -191,20 +118,6 @@
 
     /** Holds container for log-pages. */
-    QITabWidget        *m_pTabWidget;
-    /** Stores the UIVMLogPage instances. This is modified as we add and remove new tabs
-     *  to the m_pTabWidget. Index is the index of the tab widget. */
-    QVector<QWidget*>  m_logPageList;
-
-    /** @name Panel instances and a QMap for mapping panel instances to related actions.
-      * @{ */
-        UIVMLogViewerSearchPanel    *m_pSearchPanel;
-        UIVMLogViewerFilterPanel    *m_pFilterPanel;
-        UIVMLogViewerBookmarksPanel *m_pBookmarksPanel;
-        UIVMLogViewerOptionsPanel   *m_pOptionsPanel;
-        QMap<UIDialogPanel*, QAction*> m_panelActionMap;
-        QList<UIDialogPanel*>          m_visiblePanelsList;
-    /** @} */
-    QVBoxLayout         *m_pMainLayout;
-
+    QHBoxLayout         *m_pMainLayout;
+    QITabWidget *m_pTabWidget;
     /** @name Toolbar and menu variables.
       * @{ */
@@ -212,12 +125,9 @@
     /** @} */
 
-    /** @name Toolbar and menu variables. Cache these to restore them after refresh.
-     * @{ */
-        /** Showing/hiding line numbers and line wraping options are set per
-            UIHelpBrowserWidget and applies to all log pages (all tabs) */
-        bool  m_bShowLineNumbers;
-        bool  m_bWrapLines;
-        QFont m_font;
-    /** @} */
+    QString       m_strHelpFilePath;
+#ifdef VBOX_WS_X11
+    QHelpEngine  *m_pHelpEngine;
+#endif
+    UIHelpBrowserViewer *m_pTextBrowser;
 };
 
