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");
|
auto filePathAspectType = addTypedAspect<FilePathAspect>(settings, "FilePathAspect");
|
||||||
filePathAspectType.set("expandedValue", sol::property(&FilePathAspect::expandedValue));
|
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<IntegerAspect>(settings, "IntegerAspect");
|
||||||
addTypedAspect<DoubleAspect>(settings, "DoubleAspect");
|
addTypedAspect<DoubleAspect>(settings, "DoubleAspect");
|
||||||
|
|||||||
@@ -137,6 +137,7 @@ FilePathAspectCreate = {}
|
|||||||
|
|
||||||
---@class FilePathAspect
|
---@class FilePathAspect
|
||||||
---@field expandedValue FilePath The expanded value of the aspect
|
---@field expandedValue FilePath The expanded value of the aspect
|
||||||
|
---@field defaultPath FilePath The default path of the aspect
|
||||||
settings.FilePathAspect = {}
|
settings.FilePathAspect = {}
|
||||||
|
|
||||||
---Create a new FilePathAspect
|
---Create a new FilePathAspect
|
||||||
|
|||||||
Reference in New Issue
Block a user