Commit 601471be authored by con's avatar con
Browse files

Fixes: - ScriptManager --> ScriptManagerPrivate

parent 39f1ce05
...@@ -133,7 +133,7 @@ HEADERS += mainwindow.h \ ...@@ -133,7 +133,7 @@ HEADERS += mainwindow.h \
scriptmanager/metatypedeclarations.h \ scriptmanager/metatypedeclarations.h \
scriptmanager/qworkbench_wrapper.h \ scriptmanager/qworkbench_wrapper.h \
scriptmanager/scriptmanagerinterface.h \ scriptmanager/scriptmanagerinterface.h \
scriptmanager/scriptmanager.h \ scriptmanager/scriptmanager_p.h \
core_global.h \ core_global.h \
basemode.h \ basemode.h \
baseview.h \ baseview.h \
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
#include "shortcutsettings.h" #include "shortcutsettings.h"
#include "vcsmanager.h" #include "vcsmanager.h"
#include "scriptmanager.h" #include "scriptmanager_p.h"
#include "settingsdialog.h" #include "settingsdialog.h"
#include "stylehelper.h" #include "stylehelper.h"
#include "variablemanager.h" #include "variablemanager.h"
...@@ -119,7 +119,7 @@ MainWindow::MainWindow() : ...@@ -119,7 +119,7 @@ MainWindow::MainWindow() :
m_editorManager(0), m_editorManager(0),
m_fileManager(new FileManager(m_coreImpl, this)), m_fileManager(new FileManager(m_coreImpl, this)),
m_progressManager(new ProgressManagerPrivate()), m_progressManager(new ProgressManagerPrivate()),
m_scriptManager(new ScriptManager(this, m_coreImpl)), m_scriptManager(new ScriptManagerPrivate(this, m_coreImpl)),
m_variableManager(new VariableManager(this)), m_variableManager(new VariableManager(this)),
m_vcsManager(new VCSManager()), m_vcsManager(new VCSManager()),
m_viewManager(0), m_viewManager(0),
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
** **
***************************************************************************/ ***************************************************************************/
#include "scriptmanager.h" #include "scriptmanager_p.h"
#include "qworkbench_wrapper.h" #include "qworkbench_wrapper.h"
#include "metatypedeclarations.h" #include "metatypedeclarations.h"
...@@ -177,19 +177,19 @@ static QScriptValue fileBox(QScriptContext *context, QScriptEngine *engine) ...@@ -177,19 +177,19 @@ static QScriptValue fileBox(QScriptContext *context, QScriptEngine *engine)
engine->toScriptValue(rc) : engine->toScriptValue(rc.front()); engine->toScriptValue(rc) : engine->toScriptValue(rc.front());
} }
// ------ ScriptManager // ------ ScriptManagerPrivate
namespace Core { namespace Core {
namespace Internal { namespace Internal {
ScriptManager::ScriptManager(QObject *parent, ICore *core) : ScriptManagerPrivate::ScriptManagerPrivate(QObject *parent, ICore *core) :
ScriptManagerInterface(parent), ScriptManagerInterface(parent),
m_core(core), m_core(core),
m_initialized(false) m_initialized(false)
{ {
} }
QScriptEngine &ScriptManager::scriptEngine() QScriptEngine &ScriptManagerPrivate::scriptEngine()
{ {
ensureEngineInitialized(); ensureEngineInitialized();
return m_engine; return m_engine;
...@@ -200,7 +200,7 @@ QScriptEngine &ScriptManager::scriptEngine() ...@@ -200,7 +200,7 @@ QScriptEngine &ScriptManager::scriptEngine()
// demoProjectExplorer()@:237 // demoProjectExplorer()@:237
// <anonymous>()@:276 // <anonymous>()@:276
// <global>()@:0" // <global>()@:0"
static void parseBackTrace(const QStringList &backTrace, ScriptManager::Stack &stack) static void parseBackTrace(const QStringList &backTrace, ScriptManagerPrivate::Stack &stack)
{ {
const QChar at = QLatin1Char('@'); const QChar at = QLatin1Char('@');
const QChar colon = QLatin1Char(':'); const QChar colon = QLatin1Char(':');
...@@ -213,7 +213,7 @@ static void parseBackTrace(const QStringList &backTrace, ScriptManager::Stack &s ...@@ -213,7 +213,7 @@ static void parseBackTrace(const QStringList &backTrace, ScriptManager::Stack &s
if (colonPos == -1) if (colonPos == -1)
continue; continue;
ScriptManager::StackFrame frame; ScriptManagerPrivate::StackFrame frame;
frame.function = line.left(atPos); frame.function = line.left(atPos);
frame.fileName = line.mid(atPos + 1, colonPos - atPos - 1); frame.fileName = line.mid(atPos + 1, colonPos - atPos - 1);
frame.lineNumber = line.right(line.size() - colonPos - 1).toInt(); frame.lineNumber = line.right(line.size() - colonPos - 1).toInt();
...@@ -221,13 +221,13 @@ static void parseBackTrace(const QStringList &backTrace, ScriptManager::Stack &s ...@@ -221,13 +221,13 @@ static void parseBackTrace(const QStringList &backTrace, ScriptManager::Stack &s
} }
} }
bool ScriptManager::runScript(const QString &script, QString *errorMessage) bool ScriptManagerPrivate::runScript(const QString &script, QString *errorMessage)
{ {
Stack stack; Stack stack;
return runScript(script, errorMessage, &stack); return runScript(script, errorMessage, &stack);
} }
bool ScriptManager::runScript(const QString &script, QString *errorMessage, Stack *stack) bool ScriptManagerPrivate::runScript(const QString &script, QString *errorMessage, Stack *stack)
{ {
ensureEngineInitialized(); ensureEngineInitialized();
stack->clear(); stack->clear();
...@@ -247,7 +247,7 @@ bool ScriptManager::runScript(const QString &script, QString *errorMessage, Stac ...@@ -247,7 +247,7 @@ bool ScriptManager::runScript(const QString &script, QString *errorMessage, Stac
return !failed; return !failed;
} }
void ScriptManager::ensureEngineInitialized() void ScriptManagerPrivate::ensureEngineInitialized()
{ {
if (m_initialized) if (m_initialized)
return; return;
...@@ -304,7 +304,7 @@ void ScriptManager::ensureEngineInitialized() ...@@ -304,7 +304,7 @@ void ScriptManager::ensureEngineInitialized()
m_initialized = true; m_initialized = true;
} }
QString ScriptManager::engineError(QScriptEngine &scriptEngine) QString ScriptManagerPrivate::engineError(QScriptEngine &scriptEngine)
{ {
QScriptValue error = scriptEngine.evaluate(QLatin1String("Error")); QScriptValue error = scriptEngine.evaluate(QLatin1String("Error"));
if (error.isValid()) if (error.isValid())
......
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
** **
***************************************************************************/ ***************************************************************************/
#ifndef SCRIPTMANAGER_H #ifndef SCRIPTMANAGER_P_H
#define SCRIPTMANAGER_H #define SCRIPTMANAGER_P_H
#include <coreplugin/scriptmanager/scriptmanagerinterface.h> #include <coreplugin/scriptmanager/scriptmanagerinterface.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
...@@ -44,12 +44,12 @@ ...@@ -44,12 +44,12 @@
namespace Core { namespace Core {
namespace Internal { namespace Internal {
class ScriptManager : public Core::ScriptManagerInterface class ScriptManagerPrivate : public Core::ScriptManagerInterface
{ {
Q_OBJECT Q_OBJECT
public: public:
ScriptManager(QObject *parent, ICore *core); ScriptManagerPrivate(QObject *parent, ICore *core);
virtual QScriptEngine &scriptEngine(); virtual QScriptEngine &scriptEngine();
...@@ -69,4 +69,4 @@ private: ...@@ -69,4 +69,4 @@ private:
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Core
#endif // SCRIPTMANAGER_H #endif // SCRIPTMANAGER_P_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment