forked from qt-creator/qt-creator
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:
@@ -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(
|
||||
|
@@ -213,4 +213,7 @@ OptionsPageCreate = {}
|
||||
---@return OptionsPage
|
||||
function settings.OptionsPage.create(options) end
|
||||
|
||||
---Shows options page.
|
||||
function settings.OptionsPage:show() end
|
||||
|
||||
return settings
|
||||
|
Reference in New Issue
Block a user