summaryrefslogtreecommitdiff
path: root/editor/editor_help.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2021-11-15 10:39:00 +0100
committerRémi Verschelde <rverschelde@gmail.com>2021-11-15 13:02:21 +0100
commit5341e6010e80b1c625d9c0a7ebc87b0f1178db23 (patch)
treed7d1b0d9b80c7b722d497e7541e6a7c56cfe7c60 /editor/editor_help.cpp
parent9e1c190ce16cd3b6174fc7c31119ab59ebc141d9 (diff)
Allow dehardcoding documentation branch and URL in docs links
This makes it possible to change the branch of the documentation that URLs are pointing to without having to modify all class reference files. In the XML class reference, the `$DOCS_URL` placeholder should be used, and will be replaced automatically in the editor and when generating the RST class reference. The documentation branch string is set in `version.py`. Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
Diffstat (limited to 'editor/editor_help.cpp')
-rw-r--r--editor/editor_help.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index 192f7fc598..05f4e385c6 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -33,13 +33,14 @@
#include "core/core_constants.h"
#include "core/input/input.h"
#include "core/os/keyboard.h"
+#include "core/version_generated.gen.h"
#include "doc_data_compressed.gen.h"
#include "editor/plugins/script_editor_plugin.h"
#include "editor_node.h"
#include "editor_scale.h"
#include "editor_settings.h"
-#define CONTRIBUTE_URL "https://docs.godotengine.org/en/latest/community/contributing/updating_the_class_reference.html"
+#define CONTRIBUTE_URL vformat("%s/community/contributing/updating_the_class_reference.html", VERSION_DOCS_URL)
DocTools *EditorHelp::doc = nullptr;