Index: trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp	(revision 86716)
+++ trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp	(revision 86718)
@@ -42,10 +42,5 @@
 #include "UIIconPool.h"
 #include "UIMessageCenter.h"
-#include "UIVMLogPage.h"
 #include "UIHelpBrowserWidget.h"
-#include "UIVMLogViewerBookmarksPanel.h"
-#include "UIVMLogViewerFilterPanel.h"
-#include "UIVMLogViewerSearchPanel.h"
-#include "UIVMLogViewerOptionsPanel.h"
 #include "QIToolBar.h"
 #include "UICommon.h"
@@ -256,9 +251,16 @@
 void UIHelpBrowserWidget::loadOptions()
 {
-    if (m_pContentViewer)
+    if (m_pContentViewer && m_pHelpEngine)
     {
         QUrl url(gEDataManager->helpBrowserLastUrl());
+        if (url.isEmpty())
+            return;
         if (url.isValid())
-            m_pContentViewer->setSource(url);
+        {
+            if (m_pHelpEngine->findFile(url).isValid())
+                m_pContentViewer->setSource(url);
+            else
+                show404Error(url);
+        }
     }
 }
@@ -297,5 +299,7 @@
     }
     if (m_pShowHideTabWidgetAction)
-        m_pShowHideTabWidgetAction->setText("Show/Hide Tabs Widget");
+        m_pShowHideTabWidgetAction->setText(tr("Show/Hide Tabs Widget"));
+
+    m_strPageNotFoundText = tr("<div><p><h3>404. Not found.</h3>The page <b>%1</b> could not be found.</p></div>");
 }
 
@@ -328,11 +332,8 @@
 }
 
-void UIHelpBrowserWidget::sltHandleHelpEngineSetupFinished()
-{
-#if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP)
-    AssertReturnVoid(m_pContentViewer && m_pHelpEngine);
+QUrl UIHelpBrowserWidget::findIndexHtml() const
+{
     QList<QUrl> files = m_pHelpEngine->files(m_pHelpEngine->namespaceName(m_strHelpFilePath), QStringList());
-    /* Search for the index of the index.htnl: */
-    int iIndex = 0;
+    int iIndex = -1;
     for (int i = 0; i < files.size(); ++i)
     {
@@ -343,7 +344,38 @@
         }
     }
-    if (files.size() > iIndex)
-        m_pContentViewer->setSource(files[iIndex]);
-    /** @todo show some kind of error maybe. */
+    if (iIndex == -1)
+    {
+        /* If index html/htm could not be found try to find a html file at least: */
+        for (int i = 0; i < files.size(); ++i)
+        {
+            if (files[i].toString().contains(".html", Qt::CaseInsensitive) ||
+                files[i].toString().contains(".htm", Qt::CaseInsensitive))
+            {
+                iIndex = i;
+                break;
+            }
+        }
+    }
+    if (iIndex != -1 && files.size() > iIndex)
+        return files[iIndex];
+    return QUrl();
+}
+
+void UIHelpBrowserWidget::show404Error(const QUrl &url)
+{
+    if (m_pContentWidget)
+        m_pContentViewer->setText(m_strPageNotFoundText.arg(url.toString()));
+}
+
+void UIHelpBrowserWidget::sltHandleHelpEngineSetupFinished()
+{
+#if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP)
+    AssertReturnVoid(m_pContentViewer && m_pHelpEngine);
+    /* Search for the index of the index.htnl: */
+    QUrl url = findIndexHtml();
+    if (url.isValid())
+        m_pContentViewer->setSource(url);
+    else
+        show404Error(url);
 #endif
 }
@@ -369,5 +401,5 @@
 void UIHelpBrowserWidget::sltHandleHelpBrowserViewerSourceChange(const QUrl &source)
 {
-    printf("%s\n", qPrintable(source.toString()));
+    Q_UNUSED(source);
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.h	(revision 86716)
+++ trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.h	(revision 86718)
@@ -93,4 +93,6 @@
     void saveOptions();
     void cleanup();
+    QUrl findIndexHtml() const;
+    void show404Error();
     /** @name Event handling stuff.
       * @{ */
@@ -133,4 +135,5 @@
     QWidget             *m_pBookmarksWidget;
     QAction             *m_pShowHideTabWidgetAction;
+    QString              m_strPageNotFoundText;
 };
 
