@@ -36,7 +36,9 @@ namespace MantidQt::MantidWidgets {
36
36
using std::string;
37
37
using namespace MantidQt ::API;
38
38
39
+ #ifdef DOCS_QTHELP
39
40
REGISTER_HELPWINDOW (MantidHelpWindow)
41
+ #endif
40
42
41
43
namespace {
42
44
// / static logger
@@ -63,6 +65,8 @@ const QString HTML_BASE_PATH("/");
63
65
// / Page to display if nothing provided
64
66
const QString DEFAULT_PAGENAME (" index" );
65
67
68
+ bool MantidHelpWindow::helpWindowExists () { return !g_helpWindow.isNull (); }
69
+
66
70
/* *
67
71
* Default constructor shows the base index page.
68
72
*/
@@ -298,7 +302,7 @@ void MantidHelpWindow::shutdown() {
298
302
*
299
303
* @param binDir The location of the mantid executable.
300
304
*/
301
- void MantidHelpWindow::findCollectionFile (std::string &binDir) {
305
+ void MantidHelpWindow::findCollectionFile (const std::string &binDir) {
302
306
// this being empty notes the feature being disabled
303
307
m_collectionFile = " " ;
304
308
@@ -315,9 +319,9 @@ void MantidHelpWindow::findCollectionFile(std::string &binDir) {
315
319
}
316
320
317
321
// try where the builds will put it for a single configuration build
318
- searchDir.cdUp ();
322
+ UNUSED_ARG ( searchDir.cdUp () );
319
323
if (searchDir.cd (" docs" )) {
320
- searchDir.cd (" qthelp" );
324
+ UNUSED_ARG ( searchDir.cd (" qthelp" ) );
321
325
path = searchDir.absoluteFilePath (COLLECTION_FILE);
322
326
g_log.debug () << " Trying \" " << path.toStdString () << " \"\n " ;
323
327
if (searchDir.exists (COLLECTION_FILE)) {
@@ -326,9 +330,9 @@ void MantidHelpWindow::findCollectionFile(std::string &binDir) {
326
330
}
327
331
}
328
332
// try where the builds will put it for a multi-configuration build
329
- searchDir.cdUp ();
333
+ UNUSED_ARG ( searchDir.cdUp () );
330
334
if (searchDir.cd (" docs" )) {
331
- searchDir.cd (" qthelp" );
335
+ UNUSED_ARG ( searchDir.cd (" qthelp" ) );
332
336
path = searchDir.absoluteFilePath (COLLECTION_FILE);
333
337
g_log.debug () << " Trying \" " << path.toStdString () << " \"\n " ;
334
338
if (searchDir.exists (COLLECTION_FILE)) {
@@ -339,9 +343,9 @@ void MantidHelpWindow::findCollectionFile(std::string &binDir) {
339
343
340
344
// try in windows/linux install location
341
345
searchDir = QDir (QString::fromStdString (binDir));
342
- searchDir.cdUp ();
343
- searchDir.cd (" share" );
344
- searchDir.cd (" doc" );
346
+ UNUSED_ARG ( searchDir.cdUp () );
347
+ UNUSED_ARG ( searchDir.cd (" share" ) );
348
+ UNUSED_ARG ( searchDir.cd (" doc" ) );
345
349
path = searchDir.absoluteFilePath (COLLECTION_FILE);
346
350
g_log.debug () << " Trying \" " << path.toStdString () << " \"\n " ;
347
351
if (searchDir.exists (COLLECTION_FILE)) {
@@ -351,10 +355,10 @@ void MantidHelpWindow::findCollectionFile(std::string &binDir) {
351
355
352
356
// try a special place for mac/osx
353
357
searchDir = QDir (QString::fromStdString (binDir));
354
- searchDir.cdUp ();
355
- searchDir.cdUp ();
356
- searchDir.cd (" share" );
357
- searchDir.cd (" doc" );
358
+ UNUSED_ARG ( searchDir.cdUp () );
359
+ UNUSED_ARG ( searchDir.cdUp () );
360
+ UNUSED_ARG ( searchDir.cd (" share" ) );
361
+ UNUSED_ARG ( searchDir.cd (" doc" ) );
358
362
path = searchDir.absoluteFilePath (COLLECTION_FILE);
359
363
g_log.debug () << " Trying \" " << path.toStdString () << " \"\n " ;
360
364
if (searchDir.exists (COLLECTION_FILE)) {
0 commit comments