Skip to content

Commit 400ea84

Browse files
Get the code to compile
1 parent 441a395 commit 400ea84

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

qt/widgets/common/inc/MantidQtWidgets/Common/MantidHelpWindow.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616
class QHelpEngine;
1717
class QString;
1818
class QWidget;
19-
#ifdef DOCS_QTHELP
2019
class pqHelpWindow;
21-
#endif
20+
2221
namespace MantidQt {
2322
namespace MantidWidgets {
2423

@@ -55,10 +54,8 @@ public slots:
5554

5655
/// The full path of the collection file.
5756
std::string m_collectionFile;
58-
#ifdef DOCS_QTHELP
5957
/// The window that renders the help information
6058
static QPointer<pqHelpWindow> g_helpWindow;
61-
#endif
6259
/// Whether this is the very first startup of the helpwindow.
6360
bool m_firstRun;
6461

qt/widgets/common/src/InterfaceManager.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,11 @@ void InterfaceManager::showCustomInterfaceHelp(const QString &name, const QStrin
281281
void InterfaceManager::showWebPage(const QString &url) { MantidDesktopServices::openUrl(url); }
282282

283283
void InterfaceManager::closeHelpWindow() {
284+
#ifdef DOCS_QTHELP
284285
if (MantidHelpWindow::helpWindowExists()) {
286+
#else
287+
if (true) {
288+
#endif
285289
auto window = createHelpWindow();
286290
if (window)
287291
window->shutdown();

qt/widgets/common/src/MantidHelpWindow.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,14 @@
3131
#include <memory>
3232
#include <stdexcept>
3333

34-
#ifdef DOCS_QTHELP
3534
namespace MantidQt::MantidWidgets {
3635

3736
using std::string;
3837
using namespace MantidQt::API;
3938

39+
#ifdef DOCS_QTHELP
4040
REGISTER_HELPWINDOW(MantidHelpWindow)
41+
#endif
4142

4243
namespace {
4344
/// static logger
@@ -64,6 +65,8 @@ const QString HTML_BASE_PATH("/");
6465
/// Page to display if nothing provided
6566
const QString DEFAULT_PAGENAME("index");
6667

68+
bool MantidHelpWindow::helpWindowExists() { return !g_helpWindow.isNull(); }
69+
6770
/**
6871
* Default constructor shows the base index page.
6972
*/
@@ -299,7 +302,7 @@ void MantidHelpWindow::shutdown() {
299302
*
300303
* @param binDir The location of the mantid executable.
301304
*/
302-
void MantidHelpWindow::findCollectionFile(std::string &binDir) {
305+
void MantidHelpWindow::findCollectionFile(const std::string &binDir) {
303306
// this being empty notes the feature being disabled
304307
m_collectionFile = "";
305308

@@ -381,4 +384,3 @@ void MantidHelpWindow::determineFileLocs() {
381384
void MantidHelpWindow::warning(const QString &msg) { g_log.warning(msg.toStdString()); }
382385

383386
} // namespace MantidQt::MantidWidgets
384-
#endif

qt/widgets/common/src/PythonHelpWindow.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#include "MantidQtWidgets/Common/PythonHelpWindow.h"
2+
#include "MantidKernel/RegistrationHelper.h"
3+
#include "MantidQtWidgets/Common/InterfaceManager.h"
24
#include "MantidQtWidgets/Common/PythonHelpBridge.h"
35
#include <QString>
46
#include <string>

0 commit comments

Comments
 (0)