forked from qt-creator/qt-creator
Lua: Add binding for FilePathAspect::setValue
Change-Id: Ia0c40f35c1504b72f56cb2d2b6dcdc721b1c9d7b Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -300,6 +300,13 @@ void addSettingsModule()
|
||||
addTypedAspect<StringAspect>(settings, "StringAspect");
|
||||
|
||||
auto filePathAspectType = addTypedAspect<FilePathAspect>(settings, "FilePathAspect");
|
||||
filePathAspectType.set(
|
||||
"setValue",
|
||||
sol::overload(
|
||||
[](FilePathAspect &self, const QString &value) {
|
||||
self.setValue(FilePath::fromUserInput(value));
|
||||
},
|
||||
[](FilePathAspect &self, const FilePath &value) { self.setValue(value); }));
|
||||
filePathAspectType.set("expandedValue", sol::property(&FilePathAspect::expandedValue));
|
||||
filePathAspectType.set(
|
||||
"defaultPath",
|
||||
|
@@ -145,6 +145,10 @@ settings.FilePathAspect = {}
|
||||
---@return FilePathAspect
|
||||
function settings.FilePathAspect.create(options) end
|
||||
|
||||
---Set the value of the aspect
|
||||
---@param value string|FilePath The value to set
|
||||
function settings.FilePathAspect:setValue(value) end
|
||||
|
||||
settings.IntegerAspect = {}
|
||||
function settings.IntegerAspect.create(options) end
|
||||
|
||||
|
Reference in New Issue
Block a user