Lua: Add "printToOutputPane" plugin option

Allows a plugin to automatically forward the "print" command to
the output pane instead of only to qDebug()

Change-Id: I10fb8063bc1713eaaf77368ea7f760270df190b3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Marcus Tillmanns
2024-05-06 16:50:04 +02:00
parent 84e706b6da
commit 58f596e36a
5 changed files with 27 additions and 4 deletions

View File

@@ -138,4 +138,9 @@ ExtensionSystem::IPlugin::ShutdownFlag LuaPluginSpec::stop()
void LuaPluginSpec::kill() {}
bool LuaPluginSpec::printToOutputPane() const
{
return d->pluginTable.get_or("printToOutputPane", false);
}
} // namespace Lua