LUA: Add settings.OptionPage:show() in the Settings bidings

Change-Id: Id97c7793bf06ff49e63b5dcec7845c82c8061cbf
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
Lukasz Papierkowski
2024-08-22 17:29:20 +02:00
committed by lie
parent f3b67568cd
commit 2ee382046e
2 changed files with 10 additions and 3 deletions

View File

@@ -8,6 +8,7 @@
#include <utils/layoutbuilder.h>
#include <coreplugin/dialogs/ioptionspage.h>
#include <coreplugin/icore.h>
using namespace Utils;
@@ -565,9 +566,12 @@ void setupSettingsModule()
}
};
settings.new_usertype<OptionsPage>("OptionsPage", "create", [](const sol::table &options) {
return std::make_unique<OptionsPage>(options);
});
settings.new_usertype<OptionsPage>(
"OptionsPage",
"create",
[](const sol::table &options) { return std::make_unique<OptionsPage>(options); },
"show",
[](OptionsPage *page) { Core::ICore::showOptionsDialog(page->id()); });
// clang-format off
settings["StringDisplayStyle"] = l.create_table_with(

View File

@@ -213,4 +213,7 @@ OptionsPageCreate = {}
---@return OptionsPage
function settings.OptionsPage.create(options) end
---Shows options page.
function settings.OptionsPage:show() end
return settings