forked from qt-creator/qt-creator
Lua: Add test scripts
Change-Id: I03cb69289151f44db6836ad0be6d2091d9c853bc Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -426,10 +426,17 @@ public:
|
||||
|
||||
void scanForScripts()
|
||||
{
|
||||
const FilePath scriptsPath = Core::ICore::userResourcePath("scripts");
|
||||
if (!scriptsPath.exists())
|
||||
return;
|
||||
const FilePath userScriptsPath = Core::ICore::userResourcePath("scripts");
|
||||
if (userScriptsPath.exists())
|
||||
scanForScriptsIn(userScriptsPath);
|
||||
|
||||
const FilePath scriptsPath = Core::ICore::resourcePath("lua/scripts");
|
||||
if (scriptsPath.exists())
|
||||
scanForScriptsIn(scriptsPath);
|
||||
}
|
||||
|
||||
void scanForScriptsIn(const FilePath &scriptsPath)
|
||||
{
|
||||
ActionContainer *scriptContainer = ActionManager::actionContainer(M_SCRIPT);
|
||||
|
||||
const FilePaths scripts = scriptsPath.dirEntries(FileFilter({"*.lua"}, QDir::Files));
|
||||
|
Reference in New Issue
Block a user