execute the update scripts, if any

This commit is contained in:
Marco Martin 2013-03-13 13:30:37 +01:00
parent 0223f929dd
commit 8a8a9554e9
3 changed files with 14 additions and 0 deletions

View File

@ -73,6 +73,14 @@ void DesktopCorona::loadDefaultLayout()
}
}
void DesktopCorona::processUpdateScripts()
{
foreach (const QString &script, WorkspaceScripting::ScriptEngine::pendingUpdateScripts()) {
WorkspaceScripting::DesktopScriptEngine scriptEngine(this, false);
scriptEngine.evaluateScript(script);
}
}
void DesktopCorona::checkScreens(bool signalWhenExists)
{
// quick sanity check to ensure we have containments for each screen

View File

@ -46,6 +46,11 @@ public:
**/
void loadDefaultLayout();
/**
* Execute any update script
*/
void processUpdateScripts();
/**
* Ensures we have the necessary containments for every screen
*/

View File

@ -56,6 +56,7 @@ int main(int argc, char** argv)
if (corona->containments().isEmpty()) {
corona->loadDefaultLayout();
}
corona->processUpdateScripts();
corona->checkScreens();
return app.exec();