Mercurial > octave
diff libgui/src/documentation.cc @ 26064:673b1af42143
Don't complain about missing Qt help files when configure with --disable-docs (bug #53006).
* documentation.cc (documentation::documentation):: Use "#ifdef ENABLE_DOCS"
around QMessageBox which warns about documentation files not being available.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 12 Nov 2018 16:54:55 -0800 |
parents | ecd86b8b8979 |
children | 20b87596b99a |
line wrap: on
line diff
--- a/libgui/src/documentation.cc Mon Nov 12 01:52:15 2018 +0100 +++ b/libgui/src/documentation.cc Mon Nov 12 16:54:55 2018 -0800 @@ -81,20 +81,28 @@ if (m_help_engine->copyCollectionFile (m_collection)) m_help_engine->setCollectionFile (m_collection); else +#ifdef ENABLE_DOCS + // FIXME: Perhaps a better way to do this would be to keep a count + // in the GUI preferences file. After issuing this warning 3 times + // it would be disabled. The count would need to be reset when a new + // version of Octave is installed. QMessageBox::warning (this, tr ("Octave Documentation"), tr ("Could not copy help collection to temporary\n" "file. Search capabilities may be affected.\n" "%1").arg (m_help_engine->error ())); +#endif connect(m_help_engine, SIGNAL(setupFinished()), m_help_engine->searchEngine(), SLOT(indexDocumentation())); if (! m_help_engine->setupData()) { +#ifdef ENABLE_DOCS QMessageBox::warning (this, tr ("Octave Documentation"), tr ("Could not setup the data required for the\n" "documentation viewer. Only help texts in\n" "the Command Window will be available.")); +#endif if (m_help_engine) delete m_help_engine; m_help_engine = 0; @@ -697,4 +705,4 @@ QTextEdit::wheelEvent (we); } -} \ No newline at end of file +}