Commit 52de7348 authored by Matthias Möller's avatar Matthias Möller
Browse files

- 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 534b7691
/** @mainpage OpenFlipper General User Documentation /**\mainpage OpenFlipper General User Documentation
* @image html splash.png * \image html splash.png
* @section intro_sec Introduction * \section intro_sec Introduction
* *
* This is the user documentation for the OpenFlipper project. * This is the user documentation for the OpenFlipper project.
* OpenFlipper is a flexible geometry modeling and processing system. * OpenFlipper is a flexible geometry modeling and processing system.
* *
* This manual is divided into the following pages: * This manual is divided into the following pages:
* - \subpage gui "User interface concepts" * \li \subpage gui "User interface concepts"
* - \subpage shortcuts "Keyboard shortcuts" * \li \subpage shortcuts "Keyboard shortcuts"
* - \subpage coreplugins "Core plugins" * \li \subpage coreplugins "Core plugins"
* - \subpage scripting "Scripting" * \li \subpage scripting "Scripting"
* - \subpage view "View functions" * \li \subpage view "View functions"
* - \subpage tools "Tools" * \li \subpage tools "Tools"
* *
* *
*/ */
...@@ -55,7 +55,11 @@ ...@@ -55,7 +55,11 @@
#include <OpenFlipper/common/GlobalOptions.hh> #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"; const QString CoreWidget::homePage_ = "qthelp://org.openflipper.user/user/index.html";
#endif
//== IMPLEMENTATION ========================================================== //== IMPLEMENTATION ==========================================================
......
...@@ -78,12 +78,7 @@ HelpWidget::HelpWidget(QWidget* parent, const QString& _homeSite /*=""*/, const ...@@ -78,12 +78,7 @@ HelpWidget::HelpWidget(QWidget* parent, const QString& _homeSite /*=""*/, const
QDir helpDir = QDir(OpenFlipper::Options::helpDirStr()); QDir helpDir = QDir(OpenFlipper::Options::helpDirStr());
QStringList helpFiles = helpDir.entryList(QStringList("*.qch"),QDir::Files); QStringList helpFiles = helpDir.entryList(QStringList("*.qch"),QDir::Files);
QString iconPath = QString(OpenFlipper::Options::iconDirStr()); QString iconPath = QString(OpenFlipper::Options::iconDirStr())+QString(OpenFlipper::Options::dirSeparator());
#ifdef WIN32
iconPath += "\\";
#else
iconPath += "/";
#endif
// Set Buttons // Set Buttons
backButton_->setIcon(QIcon(iconPath+"arrow-left.png")); backButton_->setIcon(QIcon(iconPath+"arrow-left.png"));
...@@ -102,12 +97,11 @@ HelpWidget::HelpWidget(QWidget* parent, const QString& _homeSite /*=""*/, const ...@@ -102,12 +97,11 @@ HelpWidget::HelpWidget(QWidget* parent, const QString& _homeSite /*=""*/, const
// Get all currently registered nameSpaces // Get all currently registered nameSpaces
QStringList registeredNamespaces =helpEngine_->registeredDocumentations(); QStringList registeredNamespaces =helpEngine_->registeredDocumentations();
QStringList documentationFiles; QStringList documentationFiles;
// Get a list of all loaded documentation files from the namespaces // Get a list of all loaded documentation files from the namespaces
for ( int i = 0; i < registeredNamespaces.size() ; ++i) for ( int i = 0; i < registeredNamespaces.size() ; ++i)
documentationFiles.push_back( helpEngine_->documentationFileName(registeredNamespaces[i]) ); documentationFiles.push_back( helpEngine_->documentationFileName(registeredNamespaces[i]) );
for ( int i = 0 ; i < helpFiles.size() ; ++i ) { for ( int i = 0 ; i < helpFiles.size() ; ++i ) {
...@@ -117,6 +111,12 @@ HelpWidget::HelpWidget(QWidget* parent, const QString& _homeSite /*=""*/, const ...@@ -117,6 +111,12 @@ HelpWidget::HelpWidget(QWidget* parent, const QString& _homeSite /*=""*/, const
if (documentationFiles.contains(filename)) if (documentationFiles.contains(filename))
continue; 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 // Try to register the file
if ( !helpEngine_->registerDocumentation( filename ) ) { if ( !helpEngine_->registerDocumentation( filename ) ) {
std::cerr << "Error when trying to register file " << filename.toStdString() << std::endl; 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