forked from qt-creator/qt-creator
Lua: Add Utils.pid
Change-Id: I2f598639b0ebc77216e0286b59445e91967fabe0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -81,6 +81,8 @@ void addUtilsModule()
|
||||
|
||||
utils["waitms"] = wrap(utils["waitms_cb"]);
|
||||
|
||||
utils["pid"] = QCoreApplication::applicationPid();
|
||||
|
||||
auto hostOsInfoType = utils.new_usertype<HostOsInfo>("HostOsInfo");
|
||||
hostOsInfoType["isWindowsHost"] = &HostOsInfo::isWindowsHost;
|
||||
hostOsInfoType["isMacHost"] = &HostOsInfo::isMacHost;
|
||||
|
@@ -2,6 +2,9 @@
|
||||
|
||||
local utils = {}
|
||||
|
||||
---The Process ID of Qt Creator.
|
||||
utils.pid = 0
|
||||
|
||||
---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.
|
||||
function utils.waitms(ms) end
|
||||
|
Reference in New Issue
Block a user