From af8eb8d825d7d1ea08b1a1ac36f52860bf4b7b84 Mon Sep 17 00:00:00 2001 From: "Jesper K. Pedersen" Date: Wed, 29 May 2013 07:16:50 +0000 Subject: make it possible to add extra paths with scripts Change-Id: I270dc67545d27cd3177414112f14684df63a70ad Reviewed-by: Nicolas Arnaud-Cormos --- utils/utils.cpp | 6 ++++++ utils/utils.h | 1 + 2 files changed, 7 insertions(+) (limited to 'utils') diff --git a/utils/utils.cpp b/utils/utils.cpp index 9208b45..091a958 100644 --- a/utils/utils.cpp +++ b/utils/utils.cpp @@ -31,6 +31,7 @@ #include #include "scriptrunner.h" #include +#include namespace Scripting { namespace Internal { @@ -82,6 +83,11 @@ void Utils::touchFile(const QString &fileName) file.close(); } +void Utils::addScriptPath(const QString &path) +{ + ScriptManager::instance()->addScriptPath(path); +} + } // namespace Internal } // namespace Scripting diff --git a/utils/utils.h b/utils/utils.h index d0f12f6..e4ebec1 100644 --- a/utils/utils.h +++ b/utils/utils.h @@ -47,6 +47,7 @@ public slots: QStringList backtrace() const; bool copyFile(const QString& from, const QString& to); void touchFile(const QString& fileName); + void addScriptPath(const QString& path); public: QString currentScripRoot() const; -- cgit v1.2.3