forked from qt-creator/qt-creator
Lua: Add FilePathAspect.defaultPath
Change-Id: Idb53db75f12960425a8ebec3fd047137b7a8207e Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -299,6 +299,11 @@ void addSettingsModule()
|
||||
|
||||
auto filePathAspectType = addTypedAspect<FilePathAspect>(settings, "FilePathAspect");
|
||||
filePathAspectType.set("expandedValue", sol::property(&FilePathAspect::expandedValue));
|
||||
filePathAspectType.set(
|
||||
"defaultPath",
|
||||
sol::property(
|
||||
[](FilePathAspect &self) { return FilePath::fromUserInput(self.defaultValue()); },
|
||||
&FilePathAspect::setDefaultPathValue));
|
||||
|
||||
addTypedAspect<IntegerAspect>(settings, "IntegerAspect");
|
||||
addTypedAspect<DoubleAspect>(settings, "DoubleAspect");
|
||||
|
||||
@@ -137,6 +137,7 @@ FilePathAspectCreate = {}
|
||||
|
||||
---@class FilePathAspect
|
||||
---@field expandedValue FilePath The expanded value of the aspect
|
||||
---@field defaultPath FilePath The default path of the aspect
|
||||
settings.FilePathAspect = {}
|
||||
|
||||
---Create a new FilePathAspect
|
||||
|
||||
Reference in New Issue
Block a user