Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
3ef43f56
Commit
3ef43f56
authored
Jul 13, 2010
by
dt
Browse files
Move qmltaskmanager from qmlproject plugin to qmljseditor
parent
185bc0ee
Changes
11
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmljseditor/qmljseditor.pro
View file @
3ef43f56
...
...
@@ -25,7 +25,8 @@ HEADERS += \
qmljsrefactoringchanges
.
h
\
qmljscomponentfromobjectdef
.
h
\
qmljsoutline
.
h
\
qmloutlinemodel
.
h
qmloutlinemodel
.
h
\
qmltaskmanager
.
h
SOURCES
+=
\
qmljscodecompletion
.
cpp
\
...
...
@@ -43,7 +44,8 @@ SOURCES += \
qmljsrefactoringchanges
.
cpp
\
qmljscomponentfromobjectdef
.
cpp
\
qmljsoutline
.
cpp
\
qmloutlinemodel
.
cpp
qmloutlinemodel
.
cpp
\
qmltaskmanager
.
cpp
RESOURCES
+=
qmljseditor
.
qrc
OTHER_FILES
+=
QmlJSEditor
.
pluginspec
QmlJSEditor
.
mimetypes
.
xml
src/plugins/qmljseditor/qmljseditorconstants.h
View file @
3ef43f56
...
...
@@ -49,7 +49,7 @@ const char * const FOLLOW_SYMBOL_UNDER_CURSOR = "QmlJSEditor.FollowSymbolUnderCu
const
char
*
const
QML_MIMETYPE
=
"application/x-qml"
;
const
char
*
const
JS_MIMETYPE
=
"application/javascript"
;
const
char
*
const
TASK_CATEGORY_QML
=
"Task.Category.Qml"
;
}
// namespace Constants
}
// namespace QmlJSEditor
...
...
src/plugins/qmljseditor/qmljseditorplugin.cpp
View file @
3ef43f56
...
...
@@ -40,6 +40,7 @@
#include
"qmljspreviewrunner.h"
#include
"qmljsquickfix.h"
#include
"qmljs/qmljsicons.h"
#include
"qmltaskmanager.h"
#include
<qmldesigner/qmldesignerconstants.h>
...
...
@@ -52,6 +53,7 @@
#include
<coreplugin/actionmanager/actioncontainer.h>
#include
<coreplugin/actionmanager/command.h>
#include
<coreplugin/editormanager/editormanager.h>
#include
<projectexplorer/taskhub.h>
#include
<extensionsystem/pluginmanager.h>
#include
<texteditor/fontsettings.h>
#include
<texteditor/storagesettings.h>
...
...
@@ -180,11 +182,22 @@ bool QmlJSEditorPlugin::initialize(const QStringList & /*arguments*/, QString *e
addAutoReleasedObject
(
new
QmlJSOutlineWidgetFactory
);
m_qmlTaskManager
=
new
QmlTaskManager
;
addAutoReleasedObject
(
m_qmlTaskManager
);
connect
(
m_modelManager
,
SIGNAL
(
documentChangedOnDisk
(
QmlJS
::
Document
::
Ptr
)),
m_qmlTaskManager
,
SLOT
(
documentChangedOnDisk
(
QmlJS
::
Document
::
Ptr
)));
connect
(
m_modelManager
,
SIGNAL
(
aboutToRemoveFiles
(
QStringList
)),
m_qmlTaskManager
,
SLOT
(
documentsRemoved
(
QStringList
)));
return
true
;
}
void
QmlJSEditorPlugin
::
extensionsInitialized
()
{
ProjectExplorer
::
TaskHub
*
taskHub
=
ExtensionSystem
::
PluginManager
::
instance
()
->
getObject
<
ProjectExplorer
::
TaskHub
>
();
taskHub
->
addCategory
(
Constants
::
TASK_CATEGORY_QML
,
tr
(
"QML"
));
}
ExtensionSystem
::
IPlugin
::
ShutdownFlag
QmlJSEditorPlugin
::
aboutToShutdown
()
...
...
src/plugins/qmljseditor/qmljseditorplugin.h
View file @
3ef43f56
...
...
@@ -65,6 +65,7 @@ class QmlJSEditorFactory;
class
QmlJSTextEditor
;
class
QmlJSPreviewRunner
;
class
QmlJSQuickFixCollector
;
class
QmlTaskManager
;
class
QmlJSEditorPlugin
:
public
ExtensionSystem
::
IPlugin
{
...
...
@@ -112,6 +113,7 @@ private:
QTimer
*
m_quickFixTimer
;
QPointer
<
TextEditor
::
ITextEditable
>
m_currentTextEditable
;
QmlTaskManager
*
m_qmlTaskManager
;
};
}
// namespace Internal
...
...
src/plugins/qml
projectmanage
r/qmltaskmanager.cpp
→
src/plugins/qml
jsedito
r/qmltaskmanager.cpp
View file @
3ef43f56
...
...
@@ -28,14 +28,15 @@
**************************************************************************/
#include
"qmltaskmanager.h"
#include
"qml
project
constants.h"
#include
"qml
jseditor
constants.h"
#include
<extensionsystem/pluginmanager.h>
#include
<projectexplorer/taskhub.h>
#include
<qmljs/qmljsmodelmanagerinterface.h>
#include
<QDebug>
namespace
Qml
ProjectManage
r
{
namespace
Qml
JSEdito
r
{
namespace
Internal
{
QmlTaskManager
::
QmlTaskManager
(
QObject
*
parent
)
:
...
...
@@ -45,12 +46,6 @@ QmlTaskManager::QmlTaskManager(QObject *parent) :
m_taskHub
=
ExtensionSystem
::
PluginManager
::
instance
()
->
getObject
<
ProjectExplorer
::
TaskHub
>
();
}
QmlTaskManager
*
QmlTaskManager
::
instance
()
{
ExtensionSystem
::
PluginManager
*
pluginManager
=
ExtensionSystem
::
PluginManager
::
instance
();
return
pluginManager
->
getObject
<
QmlTaskManager
>
();
}
void
QmlTaskManager
::
documentChangedOnDisk
(
QmlJS
::
Document
::
Ptr
doc
)
{
const
QString
fileName
=
doc
->
fileName
();
...
...
src/plugins/qml
projectmanage
r/qmltaskmanager.h
→
src/plugins/qml
jsedito
r/qmltaskmanager.h
View file @
3ef43f56
...
...
@@ -42,7 +42,7 @@ namespace ProjectExplorer {
class
TaskHub
;
}
// namespace ProjectExplorer
namespace
Qml
ProjectManage
r
{
namespace
Qml
JSEdito
r
{
namespace
Internal
{
class
QmlTaskManager
:
public
QObject
...
...
@@ -51,7 +51,7 @@ class QmlTaskManager : public QObject
public:
QmlTaskManager
(
QObject
*
parent
=
0
);
static
QmlTaskManager
*
instance
();
void
extensionsInitialized
();
public
slots
:
void
documentChangedOnDisk
(
QmlJS
::
Document
::
Ptr
doc
);
...
...
@@ -67,6 +67,6 @@ private:
};
}
// Internal
}
// Qml
ProjectManage
r
}
// Qml
JSEdito
r
#endif // QMLTASKMANAGER_H
src/plugins/qmlprojectmanager/qmlprojectconstants.h
View file @
3ef43f56
...
...
@@ -47,8 +47,6 @@ const char *const FILES_EDITOR_ID = "Qt4.QmlProjectEditor";
const
char
*
const
FILES_EDITOR_DISPLAY_NAME
=
QT_TRANSLATE_NOOP
(
"OpenWith::Editors"
,
".qmlproject Editor"
);
const
char
*
const
FILES_MIMETYPE
=
QMLMIMETYPE
;
const
char
*
const
TASK_CATEGORY_QML
=
"Task.Category.Qml"
;
// Wizard category
const
char
*
const
QML_WIZARD_CATEGORY
=
"F.Projects"
;
// (after Qt)
const
char
*
const
QML_WIZARD_TR_SCOPE
=
"QmlProjectManager"
;
...
...
src/plugins/qmlprojectmanager/qmlprojectmanager.cpp
View file @
3ef43f56
...
...
@@ -30,7 +30,6 @@
#include
"qmlprojectmanager.h"
#include
"qmlprojectconstants.h"
#include
"qmlproject.h"
#include
"qmltaskmanager.h"
#include
<coreplugin/icore.h>
#include
<coreplugin/ifile.h>
...
...
src/plugins/qmlprojectmanager/qmlprojectmanager.pro
View file @
3ef43f56
...
...
@@ -19,7 +19,6 @@ HEADERS += qmlproject.h \
qmlprojectrunconfiguration
.
h
\
qmlprojectrunconfigurationfactory
.
h
\
qmlprojectapplicationwizard
.
h
\
qmltaskmanager
.
h
\
qmlprojectmanager_global
.
h
\
qmlprojectmanagerconstants
.
h
\
qmlprojecttarget
.
h
...
...
@@ -33,7 +32,6 @@ SOURCES += qmlproject.cpp \
qmlprojectrunconfiguration
.
cpp
\
qmlprojectrunconfigurationfactory
.
cpp
\
qmlprojectapplicationwizard
.
cpp
\
qmltaskmanager
.
cpp
\
qmlprojecttarget
.
cpp
RESOURCES
+=
qmlproject
.
qrc
...
...
src/plugins/qmlprojectmanager/qmlprojectplugin.cpp
View file @
3ef43f56
...
...
@@ -35,7 +35,6 @@
#include
"qmlproject.h"
#include
"qmlprojectrunconfigurationfactory.h"
#include
"qmlprojectruncontrol.h"
#include
"qmltaskmanager.h"
#include
"fileformat/qmlprojectfileformat.h"
#include
<extensionsystem/pluginmanager.h>
...
...
@@ -47,15 +46,13 @@
#include
<texteditor/texteditoractionhandler.h>
#include
<projectexplorer/taskhub.h>
#include
<qmljs/qmljsmodelmanagerinterface.h>
#include
<QtCore/QtPlugin>
namespace
QmlProjectManager
{
namespace
Internal
{
QmlProjectPlugin
::
QmlProjectPlugin
()
:
m_qmlTaskManager
(
0
)
QmlProjectPlugin
::
QmlProjectPlugin
()
{
}
QmlProjectPlugin
::~
QmlProjectPlugin
()
...
...
@@ -76,9 +73,6 @@ bool QmlProjectPlugin::initialize(const QStringList &, QString *errorMessage)
Manager
*
manager
=
new
Manager
;
m_qmlTaskManager
=
new
QmlTaskManager
(
this
);
addAutoReleasedObject
(
m_qmlTaskManager
);
addAutoReleasedObject
(
manager
);
addAutoReleasedObject
(
new
Internal
::
QmlProjectRunConfigurationFactory
);
addAutoReleasedObject
(
new
Internal
::
QmlRunControlFactory
);
...
...
@@ -94,16 +88,6 @@ bool QmlProjectPlugin::initialize(const QStringList &, QString *errorMessage)
void
QmlProjectPlugin
::
extensionsInitialized
()
{
ExtensionSystem
::
PluginManager
*
pluginManager
=
ExtensionSystem
::
PluginManager
::
instance
();
ProjectExplorer
::
TaskHub
*
taskHub
=
pluginManager
->
getObject
<
ProjectExplorer
::
TaskHub
>
();
taskHub
->
addCategory
(
Constants
::
TASK_CATEGORY_QML
,
tr
(
"QML"
));
QmlJS
::
ModelManagerInterface
*
modelManager
=
pluginManager
->
getObject
<
QmlJS
::
ModelManagerInterface
>
();
Q_ASSERT
(
modelManager
);
connect
(
modelManager
,
SIGNAL
(
documentChangedOnDisk
(
QmlJS
::
Document
::
Ptr
)),
m_qmlTaskManager
,
SLOT
(
documentChangedOnDisk
(
QmlJS
::
Document
::
Ptr
)));
connect
(
modelManager
,
SIGNAL
(
aboutToRemoveFiles
(
QStringList
)),
m_qmlTaskManager
,
SLOT
(
documentsRemoved
(
QStringList
)));
}
}
// namespace Internal
...
...
src/plugins/qmlprojectmanager/qmlprojectplugin.h
View file @
3ef43f56
...
...
@@ -38,7 +38,6 @@ namespace QmlProjectManager {
namespace
Internal
{
class
ProjectFilesFactory
;
class
QmlTaskManager
;
class
QmlProjectPlugin
:
public
ExtensionSystem
::
IPlugin
{
...
...
@@ -50,9 +49,6 @@ public:
virtual
bool
initialize
(
const
QStringList
&
arguments
,
QString
*
errorString
);
virtual
void
extensionsInitialized
();
private:
QmlTaskManager
*
m_qmlTaskManager
;
};
}
// namespace Internal
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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