Commit 601471be authored by con's avatar con

Fixes: - ScriptManager --> ScriptManagerPrivate

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