From ff4f6569668a8e8f36796cc68f688bfd9f9967d0 Mon Sep 17 00:00:00 2001
From: Victor Poughon <victor.poughon@cnes.fr>
Date: Mon, 25 Mar 2019 19:02:39 +0100
Subject: [PATCH] REFAC: direct link to application in otbgui

---
 Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetMainWindow.cxx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetMainWindow.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetMainWindow.cxx
index 172b67e224..d09ee32bf8 100644
--- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetMainWindow.cxx
+++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetMainWindow.cxx
@@ -46,7 +46,8 @@ QtMainWindow::QtMainWindow(Application::Pointer app)
   helpAction      = new QAction(tr("&Documentation"), this);
   helpAction->setShortcuts(QKeySequence::HelpContents);
   helpMenu->addAction(helpAction);
-  QObject::connect(helpAction, &QAction::triggered, this, [] { QDesktopServices::openUrl(QUrl("https://www.orfeo-toolbox.org/CookBook/")); });
+  const std::string url = std::string("https://www.orfeo-toolbox.org/CookBook/Applications/app_") + app->GetName() + std::string(".html");
+  QObject::connect(helpAction, &QAction::triggered, this, [=] { QDesktopServices::openUrl(QUrl(QString::fromStdString(url))); });
 }
 
 void QtMainWindow::UnhandledException(QString message)
-- 
GitLab