Commit d509ce2b authored by Jan Möbius's avatar Jan Möbius

Get rid of warnings when loading documentation files

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@14006 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 34ca0650
......@@ -97,11 +97,31 @@ HelpWidget::HelpWidget(QWidget* parent, const QString& _homeSite)
helpEngine_->setupData();
for ( int i = 0 ; i < helpFiles.size() ; ++i )
if ( !helpEngine_->registerDocumentation( helpDir.path()+ QDir::separator() + helpFiles[i]) )
// 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]) );
for ( int i = 0 ; i < helpFiles.size() ; ++i ) {
const QString filename = helpDir.path()+ QDir::separator() + helpFiles[i];
// Don't register files twice (stored between multiple OpenFlipper executions)
if (documentationFiles.contains(filename))
continue;
// Try to register the file
if ( !helpEngine_->registerDocumentation( filename ) ) {
std::cerr << "Error when trying to register file " << filename.toStdString() << std::endl;
std::cerr << helpFiles[i].toStdString() << " :" << helpEngine_->error().toStdString() << std::endl;
else
std::cerr << "Loaded Help file : " << helpFiles[i].toStdString() << std::endl;
}
}
searchEngine_ = new QHelpSearchEngine(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