Use proper helper functions to activate help links - avoids warnings when there is no MainWindow.

This commit is contained in:
Matthias Koefferlein 2018-06-03 12:23:24 +02:00
parent 0ed898e3c2
commit d903c9f224
2 changed files with 7 additions and 5 deletions

View File

@ -23,6 +23,7 @@
#include "layMacroPropertiesDialog.h"
#include "layMainWindow.h"
#include "layQtTools.h"
#include "lymMacroInterpreter.h"
#include "tlString.h"
@ -37,7 +38,7 @@ MacroPropertiesDialog::MacroPropertiesDialog (QWidget *parent)
setupUi (this);
connect (shortcut, SIGNAL (editingFinished ()), this, SLOT (shortcut_edited ()));
connect (helpLabel, SIGNAL (linkActivated (const QString &)), lay::MainWindow::instance (), SLOT (show_help (const QString &)));
activate_help_links (helpLabel);
}
int

View File

@ -25,6 +25,7 @@
#include "laySearchReplacePropertiesWidgets.h"
#include "laySearchReplaceConfigPage.h"
#include "layConfigurationDialog.h"
#include "layQtTools.h"
#include "layMainWindow.h"
#include "tlExceptions.h"
@ -728,10 +729,10 @@ SearchReplaceDialog::SearchReplaceDialog (lay::PluginRoot *root, lay::LayoutView
connect (delete_selected_button, SIGNAL (clicked ()), this, SLOT (execute_selected_button_clicked ()));
connect (replace_selected_button, SIGNAL (clicked ()), this, SLOT (execute_selected_button_clicked ()));
connect (hint_label1, SIGNAL (linkActivated (const QString &)), lay::MainWindow::instance (), SLOT (show_help (const QString &)));
connect (hint_label2, SIGNAL (linkActivated (const QString &)), lay::MainWindow::instance (), SLOT (show_help (const QString &)));
connect (hint_label3, SIGNAL (linkActivated (const QString &)), lay::MainWindow::instance (), SLOT (show_help (const QString &)));
connect (hint_label4, SIGNAL (linkActivated (const QString &)), lay::MainWindow::instance (), SLOT (show_help (const QString &)));
activate_help_links (hint_label1);
activate_help_links (hint_label2);
activate_help_links (hint_label3);
activate_help_links (hint_label4);
fill_ctx_cbx (find_context);
fill_ctx_cbx (delete_context);