Commit 3266dc3a authored by Matthias Möller's avatar Matthias Möller

- unregister old doc files in help engine

- fixed startpage for windows
- fixed homepage subpage enum view

refs #994

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@15753 383ad7c9-94d9-4d36-a494-682f7c89f535
parent cf0c2d9d
/** @mainpage OpenFlipper General User Documentation
* @image html splash.png
* @section intro_sec Introduction
/**\mainpage OpenFlipper General User Documentation
* \image html splash.png
* \section intro_sec Introduction
*
* This is the user documentation for the OpenFlipper project.
* OpenFlipper is a flexible geometry modeling and processing system.
*
* This manual is divided into the following pages:
* - \subpage gui "User interface concepts"
* - \subpage shortcuts "Keyboard shortcuts"
* - \subpage coreplugins "Core plugins"
* - \subpage scripting "Scripting"
* - \subpage view "View functions"
* - \subpage tools "Tools"
* \li \subpage gui "User interface concepts"
* \li \subpage shortcuts "Keyboard shortcuts"
* \li \subpage coreplugins "Core plugins"
* \li \subpage scripting "Scripting"
* \li \subpage view "View functions"
* \li \subpage tools "Tools"
*
*
*/
......@@ -55,7 +55,11 @@
#include <OpenFlipper/common/GlobalOptions.hh>
#ifdef WIN32
const QString CoreWidget::homePage_ = "qthelp://org.openflipper.user/user/main.html";
#else
const QString CoreWidget::homePage_ = "qthelp://org.openflipper.user/user/index.html";
#endif
//== IMPLEMENTATION ==========================================================
......
......@@ -78,12 +78,7 @@ HelpWidget::HelpWidget(QWidget* parent, const QString& _homeSite /*=""*/, const
QDir helpDir = QDir(OpenFlipper::Options::helpDirStr());
QStringList helpFiles = helpDir.entryList(QStringList("*.qch"),QDir::Files);
QString iconPath = QString(OpenFlipper::Options::iconDirStr());
#ifdef WIN32
iconPath += "\\";
#else
iconPath += "/";
#endif
QString iconPath = QString(OpenFlipper::Options::iconDirStr())+QString(OpenFlipper::Options::dirSeparator());
// Set Buttons
backButton_->setIcon(QIcon(iconPath+"arrow-left.png"));
......@@ -102,12 +97,11 @@ HelpWidget::HelpWidget(QWidget* parent, const QString& _homeSite /*=""*/, const
// Get all currently registered nameSpaces
QStringList registeredNamespaces =helpEngine_->registeredDocumentations();
QStringList documentationFiles;
// Get a list of all loaded documentation files from the namespaces
for ( int i = 0; i < registeredNamespaces.size() ; ++i)
documentationFiles.push_back( helpEngine_->documentationFileName(registeredNamespaces[i]) );
// Get a list of all loaded documentation files from the namespaces
for ( int i = 0; i < registeredNamespaces.size() ; ++i)
documentationFiles.push_back( helpEngine_->documentationFileName(registeredNamespaces[i]) );
for ( int i = 0 ; i < helpFiles.size() ; ++i ) {
......@@ -117,6 +111,12 @@ HelpWidget::HelpWidget(QWidget* parent, const QString& _homeSite /*=""*/, const
if (documentationFiles.contains(filename))
continue;
// re-register documentation if location changed
int index = registeredNamespaces.indexOf(helpEngine_->namespaceName(filename));
if (index != -1)
helpEngine_->unregisterDocumentation(registeredNamespaces[i]);
// Try to register the file
if ( !helpEngine_->registerDocumentation( filename ) ) {
std::cerr << "Error when trying to register file " << filename.toStdString() << std::endl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment