mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 06:15:26 +00:00
Desktop: Derive UserManual from QDialog
In commit d21d42b691
helpView was made
a child-object of MainWindow, which is Qt's idiomatic way of having
helpView deleted with MainWindow.
As an unintended consequence, the helpView didn't show. The reason
is that UserManual derives directly from QObject. In contrast, UserSurvey
derives from QDialog and is correctly shown. Therefore also derive
UserManual from QDialog.
Reported-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
294c3bcfd1
commit
9611e92cf0
4 changed files with 7 additions and 2 deletions
|
@ -100,7 +100,9 @@ extern "C" void showErrorFromC(char *buf)
|
|||
MainWindow::MainWindow() : QMainWindow(),
|
||||
actionNextDive(0),
|
||||
actionPreviousDive(0),
|
||||
#ifndef NO_USERMANUAL
|
||||
helpView(0),
|
||||
#endif
|
||||
state(VIEWALL),
|
||||
survey(0)
|
||||
{
|
||||
|
|
|
@ -191,7 +191,9 @@ private:
|
|||
Ui::MainWindow ui;
|
||||
QAction *actionNextDive;
|
||||
QAction *actionPreviousDive;
|
||||
#ifndef NO_USERMANUAL
|
||||
UserManual *helpView;
|
||||
#endif
|
||||
CurrentState state;
|
||||
CurrentState stateBeforeEdit;
|
||||
QString filter_open();
|
||||
|
|
|
@ -56,7 +56,7 @@ MyQWebEngineView::MyQWebEngineView(QWidget* parent)
|
|||
}
|
||||
#endif
|
||||
|
||||
UserManual::UserManual(QWidget *parent) : QWidget(parent)
|
||||
UserManual::UserManual(QWidget *parent) : QDialog(parent)
|
||||
{
|
||||
QShortcut *closeKey = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this);
|
||||
connect(closeKey, SIGNAL(activated()), this, SLOT(close()));
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#else
|
||||
#include <QWebView>
|
||||
#endif
|
||||
#include <QDialog>
|
||||
#include "ui_searchbar.h"
|
||||
|
||||
class SearchBar : public QWidget{
|
||||
|
@ -47,7 +48,7 @@ public:
|
|||
#endif
|
||||
|
||||
|
||||
class UserManual : public QWidget {
|
||||
class UserManual : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
|
Loading…
Add table
Reference in a new issue