diff options
| author | Jesper K. Pedersen <jesper.pedersen@kdab.com> | 2013-05-28 19:46:15 +0000 |
|---|---|---|
| committer | Jesper K. Pedersen <jesper.pedersen@kdab.com> | 2013-06-03 10:31:58 +0200 |
| commit | c4d821c6e232f4037a4d4057bd47e5e96e0a95d6 (patch) | |
| tree | 2af329976cb0fe84064fa32de96501ca68f6451a /scriptingplugin.cpp | |
| parent | d8c1bb5a0eb1cf1c149b85577f4f35ffe303e5bc (diff) | |
load init script on start up
Change-Id: I8f37dc3d50558917cf2a39b4a407e815afd9e40c
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Diffstat (limited to 'scriptingplugin.cpp')
| -rw-r--r-- | scriptingplugin.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scriptingplugin.cpp b/scriptingplugin.cpp index 9fa44e3..0f247cb 100644 --- a/scriptingplugin.cpp +++ b/scriptingplugin.cpp @@ -71,6 +71,12 @@ void ScriptingPlugin::extensionsInitialized() bool ScriptingPlugin::delayedInitialize() { + // Load init script + const QString initScript = m_scriptManager->defaultDirectory() + QLatin1String("/init.qs"); + if ( QFile::exists(initScript) ) + m_scriptManager->runFile(initScript); + + // If a startup script is specified, load that. if ( m_startUpScript.isNull() ) return false; if (!QFileInfo(m_startUpScript).exists()) |
