Commit 8db9a8fe authored by Jan Möbius's avatar Jan Möbius
Browse files

Search for all Help files in the helpdir (no collection required anymore), indentations

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@9305 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 3ee679f3
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
#include <iostream> #include <iostream>
#include <QTextStream> #include <QTextStream>
#include <QDir>
HelpWidget::HelpWidget(QWidget* parent, const QString& _homeSite) HelpWidget::HelpWidget(QWidget* parent, const QString& _homeSite)
: QMainWindow(parent), : QMainWindow(parent),
...@@ -68,10 +69,13 @@ HelpWidget::HelpWidget(QWidget* parent, const QString& _homeSite) ...@@ -68,10 +69,13 @@ HelpWidget::HelpWidget(QWidget* parent, const QString& _homeSite)
homeSite_ = _homeSite; homeSite_ = _homeSite;
QString filename = QString(OpenFlipper::Options::helpDirStr()); QString filename = QString( OpenFlipper::Options::configDirStr() );
filename += OpenFlipper::Options::dirSeparator(); filename += OpenFlipper::Options::dirSeparator();
filename += "Help.qhc"; filename += "Help.qhc";
QDir helpDir = QDir(OpenFlipper::Options::helpDirStr());
QStringList helpFiles = helpDir.entryList(QStringList("*.qch"),QDir::Files);
QString iconPath = QString(OpenFlipper::Options::iconDirStr()); QString iconPath = QString(OpenFlipper::Options::iconDirStr());
#ifdef WIN32 #ifdef WIN32
iconPath += "\\"; iconPath += "\\";
...@@ -91,6 +95,10 @@ HelpWidget::HelpWidget(QWidget* parent, const QString& _homeSite) ...@@ -91,6 +95,10 @@ HelpWidget::HelpWidget(QWidget* parent, const QString& _homeSite)
helpEngine_->setupData(); helpEngine_->setupData();
for ( int i = 0 ; i < helpFiles.size() ; ++i )
if ( !helpEngine_->registerDocumentation( helpDir.path()+ QDir::separator() + helpFiles[i]) )
std::cerr << helpEngine_->error().toStdString() << std::endl;
searchEngine_ = new QHelpSearchEngine(helpEngine_, this); searchEngine_ = new QHelpSearchEngine(helpEngine_, this);
textWindow_ = new HelpBrowser(helpEngine_, this); textWindow_ = new HelpBrowser(helpEngine_, this);
......
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