From 8f715a350b97f6f19ce2b158cb7afb5026af36e9 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Thu, 13 Jun 2024 06:59:00 +0200 Subject: [PATCH] Lua: Fix comment line endings Change-Id: I00a5ece580b69a65c8fa60eae8458526d1df257e Reviewed-by: Leena Miettinen --- src/plugins/lua/meta/action.lua | 30 ++++++------- src/plugins/lua/meta/async.lua | 4 +- src/plugins/lua/meta/core.lua | 4 +- src/plugins/lua/meta/fetch.lua | 18 ++++---- src/plugins/lua/meta/gui.lua | 50 +++++++++------------ src/plugins/lua/meta/install.lua | 20 ++++----- src/plugins/lua/meta/lsp.lua | 28 ++++++------ src/plugins/lua/meta/messagemanager.lua | 6 +-- src/plugins/lua/meta/process.lua | 8 ++-- src/plugins/lua/meta/settings.lua | 58 ++++++++++++------------ src/plugins/lua/meta/simpletypes.lua | 32 ++++++------- src/plugins/lua/meta/utils.lua | 60 ++++++++++++------------- 12 files changed, 156 insertions(+), 162 deletions(-) diff --git a/src/plugins/lua/meta/action.lua b/src/plugins/lua/meta/action.lua index 713dbcddb3a..48a1f49594b 100644 --- a/src/plugins/lua/meta/action.lua +++ b/src/plugins/lua/meta/action.lua @@ -4,30 +4,30 @@ local action = {} ---@enum CommandAttributes action.CommandAttribute = { - ---Hide the command from the menu + ---Hide the command from the menu. CA_Hide = 1, - ---Update the text of the command + ---Update the text of the command. CA_UpdateText = 2, - ---Update the icon of the command + ---Update the icon of the command. CA_UpdateIcon = 4, - ---The command cannot be configured + ---The command cannot be configured. CA_NonConfigurable = 8, } ---@class ActionOptions ----@field context? string The context in which the action is available ----@field text? string The text to display for the action ----@field iconText? string The icon text to display for the action ----@field toolTip? string The tooltip to display for the action ----@field onTrigger? function The callback to call when the action is triggered ----@field commandAttributes? CommandAttributes The attributes of the action ----@field commandDescription? string The description of the command ----@field defaultKeySequence? string The default key sequence for the action ----@field defaultKeySequences? string[] The default key sequences for the action +---@field context? string The context in which the action is available. +---@field text? string The text to display for the action. +---@field iconText? string The icon text to display for the action. +---@field toolTip? string The tooltip to display for the action. +---@field onTrigger? function The callback to call when the action is triggered. +---@field commandAttributes? CommandAttributes The attributes of the action. +---@field commandDescription? string The description of the command. +---@field defaultKeySequence? string The default key sequence for the action. +---@field defaultKeySequences? string[] The default key sequences for the action. local ActionOptions = {} ----Creates a new Action ----@param id string The id of the action +---Creates a new Action. +---@param id string The id of the action. ---@param options ActionOptions function action.create(id, options) end diff --git a/src/plugins/lua/meta/async.lua b/src/plugins/lua/meta/async.lua index 8f7232a001a..fee1f1a48f7 100644 --- a/src/plugins/lua/meta/async.lua +++ b/src/plugins/lua/meta/async.lua @@ -20,7 +20,7 @@ local async = {} function async.sync(func) end ---@async ----Calls an async function and waits for it to finish. **Must** be called from async.sync() +---Calls an async function and waits for it to finish. **Must** be called from async.sync(). --- --- Example: --- ```lua @@ -39,7 +39,7 @@ function async.sync(func) end function async.wait(func) end ---@async ----Calls multiple async functions and waits for all of them to finish. **Must** be called from async.sync() +---Calls multiple async functions and waits for all of them to finish. **Must** be called from async.sync(). --- --- Example: --- ```lua diff --git a/src/plugins/lua/meta/core.lua b/src/plugins/lua/meta/core.lua index e30e55e73db..3ad61a2d1dd 100644 --- a/src/plugins/lua/meta/core.lua +++ b/src/plugins/lua/meta/core.lua @@ -16,10 +16,10 @@ Core.GeneratedFile.Attribute = { ---@field filePath FilePath ---@field contents string ---@field isBinary boolean ----@field attributes Attribute A combination of Attribute +---@field attributes Attribute A combination of Attribute. Core.GeneratedFile = {} ----Create a new GeneratedFile +---Create a new GeneratedFile. ---@return GeneratedFile function Core.GeneratedFile.new() end diff --git a/src/plugins/lua/meta/fetch.lua b/src/plugins/lua/meta/fetch.lua index 877f6c99f66..ada2b07d4ae 100644 --- a/src/plugins/lua/meta/fetch.lua +++ b/src/plugins/lua/meta/fetch.lua @@ -1,12 +1,12 @@ ---@meta Fetch local Fetch = {} ----A network reply from fetch +---A network reply from fetch. ---@class QNetworkReply ----@field error integer The error code of the reply or 0 if no error +---@field error integer The error code of the reply or 0 if no error. local QNetworkReply = {} ----Returns the data of the reply +---Returns the data of the reply. ---@return string function QNetworkReply:readAll() end @@ -16,15 +16,15 @@ function QNetworkReply:readAll() end function Fetch.fetch(options) end --@param options FetchOptions ---@param callback function The callback to call when the fetch is done +--@param callback function The callback to call when the fetch is done. function Fetch.fetch_cb(options, callback) end ---@class FetchOptions ----@field url string The url to fetch ----@field method? string The method to use (GET, POST, ...), default is GET ----@field headers? table The headers to send ----@field body? string The body to send ----@field convertToTable? boolean If true, the resulting data will expect JSON and converted it to a table +---@field url string The url to fetch. +---@field method? string The method to use (GET, POST, ...), default is GET. +---@field headers? table The headers to send. +---@field body? string The body to send. +---@field convertToTable? boolean If true, the resulting data will expect JSON and converted it to a table. local FetchOptions = {} return Fetch diff --git a/src/plugins/lua/meta/gui.lua b/src/plugins/lua/meta/gui.lua index 6913e5f1eb1..71f9f20cf65 100644 --- a/src/plugins/lua/meta/gui.lua +++ b/src/plugins/lua/meta/gui.lua @@ -2,11 +2,11 @@ local gui = {} ----The base class of all ui related classes +---The base class of all ui related classes. ---@class Object gui.Object = {} ----The base class of all gui layout classes +---The base class of all gui layout classes. ---@class Layout : Object gui.Layout = {} @@ -26,14 +26,14 @@ local column = {} ---@return Column function gui.Column(children) end ----A group box with a title +---A group box with a title. ---@class Group : Widget local group = {} ---@return Group function gui.Group(children) end ----Row layout +---Row layout. ---@class Row : Layout local row = {} @@ -41,7 +41,7 @@ local row = {} ---@return Row function gui.Row(children) end ----Flow layout +---Flow layout. ---@class Flow : Layout local flow = {} @@ -49,7 +49,7 @@ local flow = {} ---@return Flow function gui.Flow(children) end ----Grid layout +---Grid layout. ---@class Grid : Layout local grid = {} @@ -57,7 +57,7 @@ local grid = {} ---@return Grid function gui.Grid(children) end ----Form layout +---Form layout. ---@class Form : Layout local form = {} @@ -66,7 +66,7 @@ local form = {} function gui.Form(children) end ----A stack of multiple widgets +---A stack of multiple widgets. ---@class Stack : Widget local stack = {} @@ -74,7 +74,7 @@ local stack = {} ---@return Stack function gui.Stack(children) end ----A Tab widget +---A Tab widget. ---@class Tab : Widget local tab = {} @@ -82,7 +82,7 @@ local tab = {} ---@return Tab function gui.Tab(children) end ----A Multiline text edit +---A Multiline text edit. ---@class TextEdit : Widget local textEdit = {} @@ -90,7 +90,6 @@ local textEdit = {} ---@return TextEdit function gui.TextEdit(children) end ----A PushButton ---@class PushButton : Widget local pushButton = {} @@ -98,7 +97,6 @@ local pushButton = {} ---@return PushButton function gui.PushButton(children) end ----A Label ---@class Label : LayoutItem local label = {} @@ -106,7 +104,6 @@ local label = {} ---@return Label function gui.Label(children) end ----A SpinBox ---@class SpinBox : Widget local spinBox = {} @@ -114,7 +111,6 @@ local spinBox = {} ---@return SpinBox function gui.SpinBox(children) end ----A Splitter ---@class Splitter : Widget local splitter = {} @@ -122,7 +118,6 @@ local splitter = {} ---@return Splitter function gui.Splitter(children) end ----A Toolbar ---@class ToolBar : Widget local toolBar = {} @@ -130,7 +125,6 @@ local toolBar = {} ---@return ToolBar function gui.ToolBar(children) end ----A TabWidget ---@class TabWidget : Widget local tabWidget = {} @@ -142,40 +136,40 @@ function gui.TabWidget(children) end ---@param child Layout|string|BaseAspect|function ---@return TabWidget function gui.TabWidget(name, child) end ----A "Line break" in the gui +---A "Line break" in the gui. function gui.br() end ----A "Stretch" in the layout +---A "Stretch" in the layout. function gui.st() end ----An empty grid cell in a grid layout +---An empty grid cell in a grid layout. function gui.empty() end ----A horizontal line in the layout +---A horizontal line in the layout. function gui.hr() end ----Clears the margin of the layout +---Clears the margin of the layout. function gui.noMargin() end ----Sets the margin of the layout to the default value +---Sets the margin of the layout to the default value. function gui.normalMargin() end ----Sets the alignment of a Grid layout according to the Form layout rules +---Sets the alignment of a Grid layout according to the Form layout rules. function gui.withFormAlignment() end ----Sets the size of the parent object if possible +---Sets the size of the parent object if possible. function gui.resize(width, height) end ----Sets the spacing of the gui +---Sets the spacing of the gui. function gui.spacing(spacing) end ----Sets the field growth policy of the gui +---Sets the field growth policy of the gui. function gui.fieldGrowthPolicy(policy) end ----Sets the onClicked handler of the parent object if possible +---Sets the onClicked handler of the parent object if possible. function gui.onClicked(f) end ----Sets the onTextChanged handler of the parent object if possible +---Sets the onTextChanged handler of the parent object if possible. function gui.onTextChanged(f) end return gui diff --git a/src/plugins/lua/meta/install.lua b/src/plugins/lua/meta/install.lua index 17752063740..427c0d51765 100644 --- a/src/plugins/lua/meta/install.lua +++ b/src/plugins/lua/meta/install.lua @@ -3,26 +3,26 @@ local Install = {} ---@class PackageInfo ----@field name string The name of the package ----@field version string The version of the package ----@field path FilePath The path to the package +---@field name string The name of the package. +---@field version string The version of the package. +---@field path FilePath The path to the package. local PackageInfo = {} ---@class InstallOptions ----@field name string The name of the package to install ----@field url string The url to fetch the package from ----@field version string The version of the package to install +---@field name string The name of the package to install. +---@field url string The url to fetch the package from. +---@field version string The version of the package to install. local InstallOptions = {} ---Install something ----@param msg string The message to display to the user asking for permission to install ----@param options InstallOptions|[InstallOptions] The options to install ----@return boolean Result Whether the installation was successful +---@param msg string The message to display to the user asking for permission to install. +---@param options InstallOptions|[InstallOptions] The options to install. +---@return boolean Result Whether the installation was successful. ---@return string Error The error message if the installation failed. function Install.install(msg, options) end ---Get the package info ----@param name any The name of the package +---@param name any The name of the package. ---@return PackageInfo function Install.packageInfo(name) end diff --git a/src/plugins/lua/meta/lsp.lua b/src/plugins/lua/meta/lsp.lua index 1c404c167f6..b0a34e7cd7e 100644 --- a/src/plugins/lua/meta/lsp.lua +++ b/src/plugins/lua/meta/lsp.lua @@ -1,38 +1,38 @@ ----@meta LSP +---@meta LSP. local lsp = {} ---@class ClientOptions ---@field name string The name under which to register the language server. ---@field cmd function|string[] The command to start the language server, or a function returning a string[]. ----@field transport? "stdio"|"localsocket" Defaults to stdio ----@field serverName? string The socket path when transport == "localsocket" ----@field languageFilter LanguageFilter The language filter deciding which files to open with the language server +---@field transport? "stdio"|"localsocket" Defaults to stdio. +---@field serverName? string The socket path when transport == "localsocket". +---@field languageFilter LanguageFilter The language filter deciding which files to open with the language server. ---@field startBehavior? "AlwaysOn"|"RequiresFile"|"RequiresProject" ----@field initializationOptions? table|string The initialization options to pass to the language server, either a json string, or a table +---@field initializationOptions? table|string The initialization options to pass to the language server, either a JSON string, or a table. ---@field settings? AspectContainer ---@field onStartFailed? function This callback is called when client failed to start. local ClientOptions = {} ---@class LanguageFilter ----@field patterns? string[] The file patterns supported by the language server ----@field mimeTypes? string[] The mime types supported by the language server +---@field patterns? string[] The file patterns supported by the language server. +---@field mimeTypes? string[] The mime types supported by the language server. local LanguageFilter = {} ---@class Client ----@field on_instance_start function The callback to call when a language client starts +---@field on_instance_start function The callback to call when a language client starts. lsp.Client = {} ----@param msg string The name of the message to handle ----@param callback function The callback to call when the message is received ----Registers a message handler for the message named 'msg' +---@param msg string The name of the message to handle. +---@param callback function The callback to call when the message is received. +---Registers a message handler for the message named 'msg'. function lsp.Client:registerMessage(msg, callback) end ----@param msg table the message to send ----Sends a message to the language server +---@param msg table the message to send. +---Sends a message to the language server. function lsp.Client:sendMessage(msg, callback) end ----Creates a new Language Client +---Creates a new Language Client. ---@param options ClientOptions ---@return Client function lsp.Client.create(options) end diff --git a/src/plugins/lua/meta/messagemanager.lua b/src/plugins/lua/meta/messagemanager.lua index 61419ee4b71..5bd6d92ed5e 100644 --- a/src/plugins/lua/meta/messagemanager.lua +++ b/src/plugins/lua/meta/messagemanager.lua @@ -2,15 +2,15 @@ local messagemanager = {} ----Writes a message to the Output pane +---Writes a message to the Output pane. ---@param ... any function messagemanager.writeSilently(...) end ----Writes a message to the Output pane and flashes the pane if its not open +---Writes a message to the Output pane and flashes the pane if its not open. ---@param ... any function messagemanager.writeFlashing(...) end ----Writes a message to the Output pane and opens the pane if its not open +---Writes a message to the Output pane and opens the pane if its not open. ---@param ... any function messagemanager.writeDisrupting(...) end diff --git a/src/plugins/lua/meta/process.lua b/src/plugins/lua/meta/process.lua index 53b4f35b7d0..e15d71996ae 100644 --- a/src/plugins/lua/meta/process.lua +++ b/src/plugins/lua/meta/process.lua @@ -4,14 +4,14 @@ local process = {} ---@async ---Runs a command in a terminal, has to be called from a coroutine! ----@param cmd string The command to run ----@return number The exit code of the command +---@param cmd string The command to run. +---@return number exitCode The exit code of the command. function process.runInTerminal(cmd) end ---@async ---Runs a command and returns the output! ----@param cmd string The command to run ----@return string The output of the command +---@param cmd string The command to run. +---@return string output The output of the command. function process.commandOutput(cmd) end return process diff --git a/src/plugins/lua/meta/settings.lua b/src/plugins/lua/meta/settings.lua index 09af050d924..6cf32d8ef2b 100644 --- a/src/plugins/lua/meta/settings.lua +++ b/src/plugins/lua/meta/settings.lua @@ -8,48 +8,48 @@ local settings = {} ---@class BaseAspect settings.BaseAspect = {} ----Applies the changes from its volatileValue to its value +---Applies the changes from its volatileValue to its value. function settings.BaseAspect:apply() end ---@class AspectCreate ----@field settingsKey? string The settings key of the aspect ----@field displayName? string The display name of the aspect ----@field labelText? string The label text of the aspect ----@field toolTip? string The tool tip of the aspect ----@field enabler? BoolAspect Enable / Disable this aspect based on the state of the `enabler` ----@field onValueChanged? function () Called when the value of the aspect changes ----@field onVolatileValueChanged? function () Called when the volatile value of the aspect changes +---@field settingsKey? string The settings key of the aspect. +---@field displayName? string The display name of the aspect. +---@field labelText? string The label text of the aspect. +---@field toolTip? string The tool tip of the aspect. +---@field enabler? BoolAspect Enable / Disable this aspect based on the state of the `enabler`. +---@field onValueChanged? function () Called when the value of the aspect changes. +---@field onVolatileValueChanged? function () Called when the volatile value of the aspect changes. local AspectCreate = {} ----The base class of most typed aspects +---The base class of most typed aspects. ---@generic T ---@class TypedAspect : BaseAspect ----@field value `T` The value of the aspect ----@field volatileValue `T` The temporary value of the aspect ----@field defaultValue `T` The default value of the aspect +---@field value `T` The value of the aspect. +---@field volatileValue `T` The temporary value of the aspect. +---@field defaultValue `T` The default value of the aspect. local TypedAspect = {} ---@generic T ---@class TypedAspectCreate : AspectCreate ----@field defaultValue `T` The default value of the aspect +---@field defaultValue `T` The default value of the aspect. local TypedAspectCreate = {} ----A container for aspects +---A container for aspects. ---@class AspectContainer : BaseAspect settings.AspectContainer = {} ----Options for creating an AspectContainer +---Options for creating an AspectContainer. ---@class AspectContainerCreate ----@field autoApply? boolean Whether the aspects should be applied automatically or not +---@field autoApply? boolean Whether the aspects should be applied automatically or not. AspectContainerCreate = {} ----Create a new AspectContainer +---Create a new AspectContainer. ---@param options AspectContainerCreate ---@return AspectContainer function settings.AspectContainer.create(options) end ----A aspect containing a boolean value +---A aspect containing a boolean value. ---@class BoolAspect : TypedAspect settings.BoolAspect = {} @@ -63,7 +63,7 @@ settings.LabelPlacement = { ---@field labelPlacement? LabelPlacement: BoolAspectCreate = {} ----Create a new BoolAspect +---Create a new BoolAspect. ---@param options BoolAspectCreate ---@return BoolAspect function settings.BoolAspect.create(options) end @@ -86,15 +86,15 @@ settings.StringDisplayStyle = { }; ---@class StringAspectCreate : TypedAspectCreate ----@field displayStyle? StringDisplayStyle The display type of the aspect ----@field historyId? string The history id of the aspect +---@field displayStyle? StringDisplayStyle The display type of the aspect. +---@field historyId? string The history id of the aspect. ---@field valueAcceptor? function string (oldvalue: string, newValue: string) ---@field showToolTipOnLabel? boolean ---@field displayFilter? function string (value: string) ---@field placeHolderText? string ---@field acceptRichText? boolean ---@field autoApplyOnEditingFinished? boolean ----@field elideMode? Qt.TextElideMode The elide mode of the aspect +---@field elideMode? Qt.TextElideMode The elide mode of the aspect. StringAspectCreate = {} ---@class StringAspect : TypedAspect @@ -116,9 +116,9 @@ settings.Kind = { }; ---@class FilePathAspectCreate ----@field expectedKind? Kind The kind of path we want to select ----@field historyId? string The history id of the aspect ----@field defaultPath? FilePath The default path of the aspect +---@field expectedKind? Kind The kind of path we want to select. +---@field historyId? string The history id of the aspect. +---@field defaultPath? FilePath The default path of the aspect. ---@field promptDialogFilter? string ---@field promptDialogTitle? string ---@field commandVersionArguments? string[] @@ -136,8 +136,8 @@ settings.Kind = { FilePathAspectCreate = {} ---@class FilePathAspect ----@field expandedValue FilePath The expanded value of the aspect ----@field defaultPath FilePath The default path of the aspect +---@field expandedValue FilePath The expanded value of the aspect. +---@field defaultPath FilePath The default path of the aspect. settings.FilePathAspect = {} ---Create a new FilePathAspect @@ -146,7 +146,7 @@ settings.FilePathAspect = {} function settings.FilePathAspect.create(options) end ---Set the value of the aspect ----@param value string|FilePath The value to set +---@param value string|FilePath The value to set. function settings.FilePathAspect:setValue(value) end settings.IntegerAspect = {} @@ -179,7 +179,7 @@ settings.OptionsPage = {} ---@field aspectContainer AspectContainer OptionsPageCreate = {} ----Creates a new OptionsPage +---Creates a new OptionsPage. ---@param options OptionsPageCreate ---@return OptionsPage function settings.OptionsPage.create(options) end diff --git a/src/plugins/lua/meta/simpletypes.lua b/src/plugins/lua/meta/simpletypes.lua index fdb65cf0984..5071efa9119 100644 --- a/src/plugins/lua/meta/simpletypes.lua +++ b/src/plugins/lua/meta/simpletypes.lua @@ -1,36 +1,36 @@ ---@meta ---@class QRect ----@field x integer The x position of the rectangle ----@field y integer The y position of the rectangle ----@field width integer The width of the rectangle ----@field height integer The height of the rectangle +---@field x integer The x position of the rectangle. +---@field y integer The y position of the rectangle. +---@field width integer The width of the rectangle. +---@field height integer The height of the rectangle. QRect = {} ---@class QSize ----@field width integer The width of the size ----@field height integer The height of the size +---@field width integer The width of the size. +---@field height integer The height of the size. QSize = {} ---@class QPoint ----@field x integer The x position of the point ----@field y integer The y position of the point +---@field x integer The x position of the point. +---@field y integer The y position of the point. QPoint = {} ---@class QPointF ----@field x number The x position of the floating point ----@field y number The y position of the floating point +---@field x number The x position of the floating point. +---@field y number The y position of the floating point. QPointF = {} ---@class QSizeF ----@field width number The width of the floating point size ----@field height number The height of the floating point size +---@field width number The width of the floating point size. +---@field height number The height of the floating point size. QSizeF = {} ---@class QRectF ----@field x number The x position of the floating point rectangle ----@field y number The y position of the floating point rectangle ----@field width number The width of the floating point rectangle ----@field height number The height of the floating point rectangle +---@field x number The x position of the floating point rectangle. +---@field y number The y position of the floating point rectangle. +---@field width number The width of the floating point rectangle. +---@field height number The height of the floating point rectangle. QRectF = {} diff --git a/src/plugins/lua/meta/utils.lua b/src/plugins/lua/meta/utils.lua index 409946b711c..51e74ea1033 100644 --- a/src/plugins/lua/meta/utils.lua +++ b/src/plugins/lua/meta/utils.lua @@ -3,99 +3,99 @@ local utils = {} ---Suspends the current coroutine for the given amount of milliseconds. Call `a.wait` on the returned value to get the result. ----@param ms number The amount of milliseconds to wait +---@param ms number The amount of milliseconds to wait. function utils.waitms(ms) end ----Calls the callback after the given amount of milliseconds ----@param ms number The amount of milliseconds to wait ----@param callback function The callback to call +---Calls the callback after the given amount of milliseconds. +---@param ms number The amount of milliseconds to wait. +---@param callback function The callback to call. function utils.waitms_cb(ms, callback) end ---@class FilePath utils.FilePath = {} ----@param path string The path to convert ----@return FilePath The converted path ----Convert and clean a path, returning a FilePath object +---@param path string The path to convert. +---@return FilePath The converted path. +---Convert and clean a path, returning a FilePath object. function utils.FilePath.fromUserInput(path) end ----@return FilePath The new absolute path +---@return FilePath The new absolute path. ---Searches for the path inside the PATH environment variable. Call `a.wait` on the returned value to get the result. function utils.FilePath:searchInPath() end ---@class (exact) DirEntriesOptions ----@field nameFilters? string[] The name filters to use (e.g. "*.lua"), defaults to all files ----@field fileFilters? integer The filters to use (combination of QDir.Filters.*), defaults to QDir.Filters.NoFilter ----@field flags? integer The iterator flags (combination of QDirIterator.Flags.*), defaults to QDirIterator.Flags.NoIteratorFlags +---@field nameFilters? string[] The name filters to use (e.g. "*.lua"), defaults to all files. +---@field fileFilters? integer The filters to use (combination of QDir.Filters.*), defaults to QDir.Filters.NoFilter. +---@field flags? integer The iterator flags (combination of QDirIterator.Flags.*), defaults to QDirIterator.Flags.NoIteratorFlags. ---Returns all entries in the directory. Call `a.wait` on the returned value to get the result. ---@param options DirEntriesOptions ---@return FilePath[] function utils.FilePath:dirEntries(options) end ----Returns the FilePath as it should be displayed to the user +---Returns the FilePath as it should be displayed to the user. ---@return string function utils.FilePath:toUserOutput() end ----Returns whether the target exists +---Returns whether the target exists. ---@return boolean function utils.FilePath:exists() end ----Returns whether the target is a file and executable +---Returns whether the target is a file and executable. ---@return boolean function utils.FilePath:isExecutableFile() end ----Returns the path portion of FilePath as a string in the hosts native format +---Returns the path portion of FilePath as a string in the hosts native format. ---@return string function utils.FilePath:nativePath() end ----Returns the last part of the path +---Returns the last part of the path. ---@return string function utils.FilePath:fileName() end ----Returns the current working path of Qt Creator +---Returns the current working path of Qt Creator. ---@return FilePath function utils.FilePath.currentWorkingPath() end ----Returns a new FilePath with the given tail appended ----@param tail string|FilePath The tail to append +---Returns a new FilePath with the given tail appended. +---@param tail string|FilePath The tail to append. ---@return FilePath function utils.FilePath:resolvePath(tail) end ----Returns the parent directory of the path +---Returns the parent directory of the path. ---@return FilePath function utils.FilePath:parentDir() end ----If the path targets a symlink, this function returns the target of the symlink ----@return FilePath The resolved path +---If the path targets a symlink, this function returns the target of the symlink. +---@return FilePath resolvedPath The resolved path. function utils.FilePath:resolveSymlinks() end ----Returns the suffix of the path (e.g. "test.ui.qml" -> ".qml") +---Returns the suffix of the paths (e.g. "test.ui.qml" -> ".qml"). ---@return string function utils.FilePath:suffix() end ----Returns the complete suffix of the path (e.g. "test.ui.qml" -> "ui.qml") +---Returns the complete suffix of the paths (e.g. "test.ui.qml" -> "ui.qml"). ---@return string function utils.FilePath:completeSuffix() end ----Returns whether the path is absolute +---Returns whether the path is absolute. ---@return boolean function utils.FilePath:isAbsolutePath() end ---@class HostOsInfo ----@field os "mac"|"windows"|"linux" The current host operating system ----@field architecture "unknown"|"x86"|"x86_64"|"itanium"|"arm"|"arm64" The current host architecture +---@field os "mac"|"windows"|"linux" The current host operating system. +---@field architecture "unknown"|"x86"|"x86_64"|"itanium"|"arm"|"arm64" The current host architecture. utils.HostOsInfo = {} ----Returns whether the host operating system is windows +---Returns whether the host operating system is windows. ---@return boolean function utils.HostOsInfo.isWindowsHost() end ----Returns whether the host operating system is mac +---Returns whether the host operating system is mac. ---@return boolean function utils.HostOsInfo.isMacHost() end ----Returns whether the host operating system is linux +---Returns whether the host operating system is linux. ---@return boolean function utils.HostOsInfo.isLinuxHost() end