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
299f1395
Commit
299f1395
authored
Sep 27, 2010
by
dt
Browse files
Revert "Remove the QmlJSEditor dependency from Qt4ProjectManager."
This reverts commit
f8c50013
.
parent
699ff228
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/libs/extensionsystem/pluginmanager.h
View file @
299f1395
...
...
@@ -90,17 +90,6 @@ public:
return
result
;
}
QObject
*
getObjectByName
(
const
QString
&
name
)
const
{
QReadLocker
lock
(
&
m_lock
);
QList
<
QObject
*>
all
=
allObjects
();
foreach
(
QObject
*
obj
,
all
)
{
if
(
obj
->
objectName
()
==
name
)
return
obj
;
}
return
0
;
}
// Plugin operations
QList
<
PluginSpec
*>
loadQueue
();
void
loadPlugins
();
...
...
src/libs/qmljs/qmljsmodelmanagerinterface.cpp
View file @
299f1395
...
...
@@ -38,7 +38,6 @@ ModelManagerInterface::ModelManagerInterface(QObject *parent)
{
Q_ASSERT
(
!
g_instance
);
g_instance
=
this
;
setObjectName
(
MODELMANAGERINTERFACE_OBJECTNAME
);
}
ModelManagerInterface
::~
ModelManagerInterface
()
...
...
src/libs/qmljs/qmljsmodelmanagerinterface.h
View file @
299f1395
...
...
@@ -46,8 +46,6 @@ QT_QML_BEGIN_NAMESPACE
namespace
QmlJS
{
const
char
*
const
MODELMANAGERINTERFACE_OBJECTNAME
=
"QmlJS::ModelManagerInterface"
;
class
Snapshot
;
class
QMLJS_EXPORT
ModelManagerInterface
:
public
QObject
...
...
@@ -119,8 +117,8 @@ public:
virtual
void
removeFiles
(
const
QStringList
&
files
)
=
0
;
virtual
QList
<
ProjectInfo
>
projectInfos
()
const
=
0
;
Q_INVOKABLE
virtual
QmlJS
::
ModelManagerInterface
::
ProjectInfo
projectInfo
(
ProjectExplorer
::
Project
*
project
)
const
=
0
;
Q_INVOKABLE
virtual
void
updateProjectInfo
(
const
QmlJS
::
ModelManagerInterface
::
ProjectInfo
&
pinfo
)
=
0
;
virtual
ProjectInfo
projectInfo
(
ProjectExplorer
::
Project
*
project
)
const
=
0
;
virtual
void
updateProjectInfo
(
const
ProjectInfo
&
pinfo
)
=
0
;
virtual
QStringList
importPaths
()
const
=
0
;
...
...
src/plugins/plugins.pro
View file @
299f1395
...
...
@@ -126,6 +126,7 @@ plugin_qt4projectmanager.depends = plugin_texteditor
plugin_qt4projectmanager
.
depends
+=
plugin_projectexplorer
plugin_qt4projectmanager
.
depends
+=
plugin_cpptools
plugin_qt4projectmanager
.
depends
+=
plugin_cppeditor
plugin_qt4projectmanager
.
depends
+=
plugin_qmljseditor
plugin_qt4projectmanager
.
depends
+=
plugin_designer
plugin_qt4projectmanager
.
depends
+=
plugin_debugger
plugin_qt4projectmanager
.
depends
+=
plugin_qmljseditor
...
...
src/plugins/qmljseditor/qmljsmodelmanager.h
View file @
299f1395
...
...
@@ -62,7 +62,7 @@ public:
virtual
void
removeFiles
(
const
QStringList
&
files
);
virtual
QList
<
ProjectInfo
>
projectInfos
()
const
;
virtual
QmlJS
::
ModelManagerInterface
::
ProjectInfo
projectInfo
(
ProjectExplorer
::
Project
*
project
)
const
;
virtual
ProjectInfo
projectInfo
(
ProjectExplorer
::
Project
*
project
)
const
;
virtual
void
updateProjectInfo
(
const
ProjectInfo
&
pinfo
);
void
emitDocumentUpdated
(
QmlJS
::
Document
::
Ptr
doc
);
...
...
src/plugins/qt4projectmanager/Qt4ProjectManager.pluginspec
View file @
299f1395
...
...
@@ -18,6 +18,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<dependency name="ProjectExplorer" version="2.0.90"/>
<dependency name="CppTools" version="2.0.90"/>
<dependency name="CppEditor" version="2.0.90"/>
<dependency name="QmlJSEditor" version="2.0.90"/>
<dependency name="Designer" version="2.0.90"/>
<dependency name="Debugger" version="2.0.90"/>
</dependencyList>
...
...
src/plugins/qt4projectmanager/qt4project.cpp
View file @
299f1395
...
...
@@ -567,17 +567,11 @@ void Qt4Project::updateCppCodeModel()
void
Qt4Project
::
updateQmlJSCodeModel
()
{
QObject
*
modelManager
=
ExtensionSystem
::
PluginManager
::
instance
()
->
getObjectByName
(
QmlJS
::
MODELMANAGERINTERFACE_OBJECTNAME
);
QmlJS
::
ModelManagerInterface
*
modelManager
=
QmlJS
::
ModelManagerInterface
::
instance
();
if
(
!
modelManager
)
return
;
QmlJS
::
ModelManagerInterface
::
ProjectInfo
projectInfo
;
bool
success
=
QMetaObject
::
invokeMethod
(
modelManager
,
"projectInfo"
,
Qt
::
DirectConnection
,
Q_RETURN_ARG
(
QmlJS
::
ModelManagerInterface
::
ProjectInfo
,
projectInfo
),
Q_ARG
(
ProjectExplorer
::
Project
*
,
this
));
QTC_ASSERT
(
success
,
return
);
QmlJS
::
ModelManagerInterface
::
ProjectInfo
projectInfo
=
modelManager
->
projectInfo
(
this
);
// Not essential since the QmlJS engine parses required files on demand.
//projectInfo.sourceFiles = ...
...
...
@@ -590,10 +584,7 @@ void Qt4Project::updateQmlJSCodeModel()
}
projectInfo
.
importPaths
.
removeDuplicates
();
success
=
QMetaObject
::
invokeMethod
(
modelManager
,
"updateProjectInfo"
,
Qt
::
DirectConnection
,
Q_ARG
(
QmlJS
::
ModelManagerInterface
::
ProjectInfo
,
projectInfo
));
QTC_ASSERT
(
success
,
return
);
modelManager
->
updateProjectInfo
(
projectInfo
);
}
void
Qt4Project
::
qtVersionsChanged
()
...
...
src/plugins/qt4projectmanager/qt4projectmanager_dependencies.pri
View file @
299f1395
include(../../plugins/projectexplorer/projectexplorer.pri)
include(../../plugins/cpptools/cpptools.pri)
include(../../plugins/cppeditor/cppeditor.pri)
include(../../plugins/qmljseditor/qmljseditor.pri)
include(../../plugins/designer/designer.pri)
include(../../plugins/debugger/debugger.pri)
include(../../libs/symbianutils/symbianutils.pri)
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