Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
601471be
Commit
601471be
authored
Jan 13, 2009
by
con
Browse files
Fixes: - ScriptManager --> ScriptManagerPrivate
parent
39f1ce05
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/coreplugin/coreplugin.pro
View file @
601471be
...
...
@@ -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
\
...
...
src/plugins/coreplugin/mainwindow.cpp
View file @
601471be
...
...
@@ -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
ScriptManager
Private
(
this
,
m_coreImpl
)),
m_variableManager
(
new
VariableManager
(
this
)),
m_vcsManager
(
new
VCSManager
()),
m_viewManager
(
0
),
...
...
src/plugins/coreplugin/scriptmanager/scriptmanager.cpp
View file @
601471be
...
...
@@ -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
// ------ ScriptManager
Private
namespace
Core
{
namespace
Internal
{
ScriptManager
::
ScriptManager
(
QObject
*
parent
,
ICore
*
core
)
:
ScriptManager
Private
::
ScriptManager
Private
(
QObject
*
parent
,
ICore
*
core
)
:
ScriptManagerInterface
(
parent
),
m_core
(
core
),
m_initialized
(
false
)
{
}
QScriptEngine
&
ScriptManager
::
scriptEngine
()
QScriptEngine
&
ScriptManager
Private
::
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
,
ScriptManager
Private
::
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
;
ScriptManager
Private
::
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
ScriptManager
Private
::
runScript
(
const
QString
&
script
,
QString
*
errorMessage
)
{
Stack
stack
;
return
runScript
(
script
,
errorMessage
,
&
stack
);
}
bool
ScriptManager
::
runScript
(
const
QString
&
script
,
QString
*
errorMessage
,
Stack
*
stack
)
bool
ScriptManager
Private
::
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
ScriptManager
Private
::
ensureEngineInitialized
()
{
if
(
m_initialized
)
return
;
...
...
@@ -304,7 +304,7 @@ void ScriptManager::ensureEngineInitialized()
m_initialized
=
true
;
}
QString
ScriptManager
::
engineError
(
QScriptEngine
&
scriptEngine
)
QString
ScriptManager
Private
::
engineError
(
QScriptEngine
&
scriptEngine
)
{
QScriptValue
error
=
scriptEngine
.
evaluate
(
QLatin1String
(
"Error"
));
if
(
error
.
isValid
())
...
...
src/plugins/coreplugin/scriptmanager/scriptmanager.h
→
src/plugins/coreplugin/scriptmanager/scriptmanager
_p
.h
View file @
601471be
...
...
@@ -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
ScriptManager
Private
:
public
Core
::
ScriptManagerInterface
{
Q_OBJECT
public:
ScriptManager
(
QObject
*
parent
,
ICore
*
core
);
ScriptManager
Private
(
QObject
*
parent
,
ICore
*
core
);
virtual
QScriptEngine
&
scriptEngine
();
...
...
@@ -69,4 +69,4 @@ private:
}
// namespace Internal
}
// namespace Core
#endif // SCRIPTMANAGER_H
#endif // SCRIPTMANAGER_
P_
H
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment