Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flatpak-qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
fdd85b7f
Commit
fdd85b7f
authored
Feb 16, 2010
by
Kai Koehne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QmlProjectManager refactoring
Putting every class in it's own files + avoid "using namespace"
parent
45efd5b5
Changes
22
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
1079 additions
and
708 deletions
+1079
-708
src/plugins/qmlinspector/qmlinspectormode.cpp
src/plugins/qmlinspector/qmlinspectormode.cpp
+3
-3
src/plugins/qmlprojectmanager/qmlnewprojectwizard.cpp
src/plugins/qmlprojectmanager/qmlnewprojectwizard.cpp
+5
-5
src/plugins/qmlprojectmanager/qmlproject.cpp
src/plugins/qmlprojectmanager/qmlproject.cpp
+20
-490
src/plugins/qmlprojectmanager/qmlproject.h
src/plugins/qmlprojectmanager/qmlproject.h
+13
-138
src/plugins/qmlprojectmanager/qmlprojectfile.cpp
src/plugins/qmlprojectmanager/qmlprojectfile.cpp
+91
-0
src/plugins/qmlprojectmanager/qmlprojectfile.h
src/plugins/qmlprojectmanager/qmlprojectfile.h
+70
-0
src/plugins/qmlprojectmanager/qmlprojectmanager.cpp
src/plugins/qmlprojectmanager/qmlprojectmanager.cpp
+6
-2
src/plugins/qmlprojectmanager/qmlprojectmanager.pro
src/plugins/qmlprojectmanager/qmlprojectmanager.pro
+11
-2
src/plugins/qmlprojectmanager/qmlprojectmanagerconstants.h
src/plugins/qmlprojectmanager/qmlprojectmanagerconstants.h
+47
-0
src/plugins/qmlprojectmanager/qmlprojectnodes.cpp
src/plugins/qmlprojectmanager/qmlprojectnodes.cpp
+6
-2
src/plugins/qmlprojectmanager/qmlprojectnodes.h
src/plugins/qmlprojectmanager/qmlprojectnodes.h
+3
-3
src/plugins/qmlprojectmanager/qmlprojectplugin.cpp
src/plugins/qmlprojectmanager/qmlprojectplugin.cpp
+10
-5
src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
+238
-0
src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.h
src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.h
+87
-0
src/plugins/qmlprojectmanager/qmlprojectrunconfigurationfactory.cpp
...s/qmlprojectmanager/qmlprojectrunconfigurationfactory.cpp
+113
-0
src/plugins/qmlprojectmanager/qmlprojectrunconfigurationfactory.h
...ins/qmlprojectmanager/qmlprojectrunconfigurationfactory.h
+61
-0
src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp
src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp
+159
-0
src/plugins/qmlprojectmanager/qmlprojectruncontrol.h
src/plugins/qmlprojectmanager/qmlprojectruncontrol.h
+83
-0
src/plugins/qmlprojectmanager/qmlprojecttarget.cpp
src/plugins/qmlprojectmanager/qmlprojecttarget.cpp
+31
-38
src/plugins/qmlprojectmanager/qmlprojecttarget.h
src/plugins/qmlprojectmanager/qmlprojecttarget.h
+14
-17
src/plugins/qmlprojectmanager/qmlprojectwizard.cpp
src/plugins/qmlprojectmanager/qmlprojectwizard.cpp
+6
-1
src/plugins/qmlprojectmanager/qmltaskmanager.cpp
src/plugins/qmlprojectmanager/qmltaskmanager.cpp
+2
-2
No files found.
src/plugins/qmlinspector/qmlinspectormode.cpp
View file @
fdd85b7f
...
...
@@ -62,7 +62,7 @@
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
#include <qmlprojectmanager/qmlproject.h>
#include <qmlprojectmanager/qmlproject
runconfiguration
.h>
#include <QtCore/QStringList>
#include <QtCore/QtPlugin>
...
...
@@ -186,8 +186,8 @@ void QmlInspectorMode::connectToViewer()
return
;
}
QmlProjectManager
::
QmlRunConfiguration
*
config
=
qobject_cast
<
QmlProjectManager
::
QmlRunConfiguration
*>
(
project
->
activeTarget
()
->
activeRunConfiguration
());
QmlProjectManager
::
Qml
Project
RunConfiguration
*
config
=
qobject_cast
<
QmlProjectManager
::
Qml
Project
RunConfiguration
*>
(
project
->
activeTarget
()
->
activeRunConfiguration
());
if
(
!
config
)
{
emit
statusMessage
(
tr
(
"Cannot find project run configuration, debugging canceled."
));
return
;
...
...
src/plugins/qmlprojectmanager/qmlnewprojectwizard.cpp
View file @
fdd85b7f
...
...
@@ -37,11 +37,8 @@
#include <QtCore/QTextStream>
#include <QtCore/QCoreApplication>
using
namespace
QmlProjectManager
::
Internal
;
//////////////////////////////////////////////////////////////////////////////
// QmlNewProjectWizardDialog
//////////////////////////////////////////////////////////////////////////////
namespace
QmlProjectManager
{
namespace
Internal
{
QmlNewProjectWizardDialog
::
QmlNewProjectWizardDialog
(
QWidget
*
parent
)
:
ProjectExplorer
::
BaseProjectWizardDialog
(
parent
)
...
...
@@ -168,3 +165,6 @@ bool QmlNewProjectWizard::postGenerateFiles(const Core::GeneratedFiles &l, QStri
return
true
;
}
}
// namespace Internal
}
// namespace QmlProjectManager
src/plugins/qmlprojectmanager/qmlproject.cpp
View file @
fdd85b7f
This diff is collapsed.
Click to expand it.
src/plugins/qmlprojectmanager/qmlproject.h
View file @
fdd85b7f
...
...
@@ -31,113 +31,30 @@
#define QMLPROJECT_H
#include "qmlprojectmanager.h"
#include "qmlprojectnodes.h"
#include "qmlprojectmanager_global.h"
#include "qml
target
.h"
#include "
fileformat/qmlprojectitem
.h"
#include "qml
projectnodes
.h"
#include "
qmlprojecttarget
.h"
#include <projectexplorer/project.h>
#include <projectexplorer/projectnodes.h>
#include <projectexplorer/buildstep.h>
#include <projectexplorer/applicationrunconfiguration.h>
#include <projectexplorer/filewatcher.h>
#include <coreplugin/ifile.h>
#include <QtCore/QDir>
#include <QtDeclarative/QmlEngine>
namespace
QmlJSEditor
{
class
ModelManagerInterface
;
}
namespace
QmlProjectManager
{
class
QmlProject
;
class
QmlRunConfiguration
;
namespace
Internal
{
class
QmlProjectFile
:
public
Core
::
IFile
{
Q_OBJECT
public:
QmlProjectFile
(
QmlProject
*
parent
,
QString
fileName
);
virtual
~
QmlProjectFile
();
virtual
bool
save
(
const
QString
&
fileName
=
QString
());
virtual
QString
fileName
()
const
;
virtual
QString
defaultPath
()
const
;
virtual
QString
suggestedFileName
()
const
;
virtual
QString
mimeType
()
const
;
virtual
bool
isModified
()
const
;
virtual
bool
isReadOnly
()
const
;
virtual
bool
isSaveAsAllowed
()
const
;
virtual
void
modified
(
ReloadBehavior
*
behavior
);
private:
QmlProject
*
m_project
;
QString
m_fileName
;
};
class
QmlRunConfigurationFactory
:
public
ProjectExplorer
::
IRunConfigurationFactory
{
Q_OBJECT
public:
explicit
QmlRunConfigurationFactory
(
QObject
*
parent
=
0
);
~
QmlRunConfigurationFactory
();
QStringList
availableCreationIds
(
ProjectExplorer
::
Target
*
parent
)
const
;
QString
displayNameForId
(
const
QString
&
id
)
const
;
bool
canCreate
(
ProjectExplorer
::
Target
*
parent
,
const
QString
&
id
)
const
;
ProjectExplorer
::
RunConfiguration
*
create
(
ProjectExplorer
::
Target
*
parent
,
const
QString
&
id
);
bool
canRestore
(
ProjectExplorer
::
Target
*
parent
,
const
QVariantMap
&
map
)
const
;
ProjectExplorer
::
RunConfiguration
*
restore
(
ProjectExplorer
::
Target
*
parent
,
const
QVariantMap
&
map
);
bool
canClone
(
ProjectExplorer
::
Target
*
parent
,
ProjectExplorer
::
RunConfiguration
*
source
)
const
;
ProjectExplorer
::
RunConfiguration
*
clone
(
ProjectExplorer
::
Target
*
parent
,
ProjectExplorer
::
RunConfiguration
*
source
);
};
class
QmlRunControl
:
public
ProjectExplorer
::
RunControl
{
Q_OBJECT
public:
explicit
QmlRunControl
(
QmlRunConfiguration
*
runConfiguration
,
bool
debugMode
);
virtual
~
QmlRunControl
();
// RunControl
virtual
void
start
();
virtual
void
stop
();
virtual
bool
isRunning
()
const
;
namespace
ProjectExplorer
{
class
FileWatcher
;
}
private
slots
:
void
processExited
(
int
exitCode
);
void
slotBringApplicationToForeground
(
qint64
pid
);
void
slotAddToOutputWindow
(
const
QString
&
line
);
void
slotError
(
const
QString
&
error
);
namespace
QmlProjectManager
{
private:
ProjectExplorer
::
ApplicationLauncher
m_applicationLauncher
;
class
QmlProjectItem
;
QString
m_executable
;
QStringList
m_commandLineArguments
;
bool
m_debugMode
;
};
namespace
Internal
{
class
QmlRunControlFactory
:
public
ProjectExplorer
::
IRunControlFactory
{
Q_OBJECT
public:
explicit
QmlRunControlFactory
(
QObject
*
parent
=
0
);
virtual
~
QmlRunControlFactory
();
// IRunControlFactory
virtual
bool
canRun
(
ProjectExplorer
::
RunConfiguration
*
runConfiguration
,
const
QString
&
mode
)
const
;
virtual
ProjectExplorer
::
RunControl
*
create
(
ProjectExplorer
::
RunConfiguration
*
runConfiguration
,
const
QString
&
mode
);
virtual
QString
displayName
()
const
;
virtual
QWidget
*
configurationWidget
(
ProjectExplorer
::
RunConfiguration
*
runConfiguration
);
};
class
QmlProjectFile
;
class
QmlProjectNode
;
}
// namespace Internal
...
...
@@ -155,8 +72,8 @@ public:
QString
id
()
const
;
Core
::
IFile
*
file
()
const
;
Internal
::
Manager
*
projectManager
()
const
;
Internal
::
QmlTargetFactory
*
targetFactory
()
const
;
Internal
::
QmlTarget
*
activeTarget
()
const
;
Internal
::
Qml
Project
TargetFactory
*
targetFactory
()
const
;
Internal
::
Qml
Project
Target
*
activeTarget
()
const
;
QList
<
ProjectExplorer
::
Project
*>
dependsOn
();
...
...
@@ -209,49 +126,7 @@ private:
ProjectExplorer
::
FileWatcher
*
m_fileWatcher
;
Internal
::
QmlProjectNode
*
m_rootNode
;
Internal
::
QmlTargetFactory
*
m_targetFactory
;
};
class
QMLPROJECTMANAGER_EXPORT
QmlRunConfiguration
:
public
ProjectExplorer
::
RunConfiguration
{
Q_OBJECT
friend
class
Internal
::
QmlRunConfigurationFactory
;
public:
QmlRunConfiguration
(
Internal
::
QmlTarget
*
parent
);
virtual
~
QmlRunConfiguration
();
Internal
::
QmlTarget
*
qmlTarget
()
const
;
QString
viewerPath
()
const
;
QStringList
viewerArguments
()
const
;
QString
workingDirectory
()
const
;
uint
debugServerPort
()
const
;
// RunConfiguration
virtual
QWidget
*
configurationWidget
();
QVariantMap
toMap
()
const
;
private
slots
:
QString
mainScript
()
const
;
void
setMainScript
(
const
QString
&
scriptFile
);
void
onQmlViewerChanged
();
void
onQmlViewerArgsChanged
();
void
onDebugServerPortChanged
();
protected:
QmlRunConfiguration
(
Internal
::
QmlTarget
*
parent
,
QmlRunConfiguration
*
source
);
virtual
bool
fromMap
(
const
QVariantMap
&
map
);
private:
void
ctor
();
QString
m_scriptFile
;
QString
m_qmlViewerCustomPath
;
QString
m_qmlViewerDefaultPath
;
QString
m_qmlViewerArgs
;
uint
m_debugServerPort
;
Internal
::
QmlProjectTargetFactory
*
m_targetFactory
;
};
}
// namespace QmlProjectManager
...
...
src/plugins/qmlprojectmanager/qmlprojectfile.cpp
0 → 100644
View file @
fdd85b7f
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://qt.nokia.com/contact.
**
**************************************************************************/
#include "qmlprojectfile.h"
#include "qmlproject.h"
#include "qmlprojectconstants.h"
namespace
QmlProjectManager
{
namespace
Internal
{
QmlProjectFile
::
QmlProjectFile
(
QmlProject
*
parent
,
QString
fileName
)
:
Core
::
IFile
(
parent
),
m_project
(
parent
),
m_fileName
(
fileName
)
{
}
QmlProjectFile
::~
QmlProjectFile
()
{
}
bool
QmlProjectFile
::
save
(
const
QString
&
)
{
return
false
;
}
QString
QmlProjectFile
::
fileName
()
const
{
return
m_fileName
;
}
QString
QmlProjectFile
::
defaultPath
()
const
{
return
QString
();
}
QString
QmlProjectFile
::
suggestedFileName
()
const
{
return
QString
();
}
QString
QmlProjectFile
::
mimeType
()
const
{
return
Constants
::
QMLMIMETYPE
;
}
bool
QmlProjectFile
::
isModified
()
const
{
return
false
;
}
bool
QmlProjectFile
::
isReadOnly
()
const
{
return
true
;
}
bool
QmlProjectFile
::
isSaveAsAllowed
()
const
{
return
false
;
}
void
QmlProjectFile
::
modified
(
ReloadBehavior
*
)
{
}
}
// namespace Internal
}
// namespace QmlProjectManager
src/plugins/qmlprojectmanager/qmlprojectfile.h
0 → 100644
View file @
fdd85b7f
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://qt.nokia.com/contact.
**
**************************************************************************/
#ifndef QMLPROJECTFILE_H
#define QMLPROJECTFILE_H
#include <coreplugin/ifile.h>
namespace
QmlProjectManager
{
class
QmlProject
;
namespace
Internal
{
class
QmlProjectFile
:
public
Core
::
IFile
{
Q_OBJECT
public:
QmlProjectFile
(
QmlProject
*
parent
,
QString
fileName
);
virtual
~
QmlProjectFile
();
virtual
bool
save
(
const
QString
&
fileName
=
QString
());
virtual
QString
fileName
()
const
;
virtual
QString
defaultPath
()
const
;
virtual
QString
suggestedFileName
()
const
;
virtual
QString
mimeType
()
const
;
virtual
bool
isModified
()
const
;
virtual
bool
isReadOnly
()
const
;
virtual
bool
isSaveAsAllowed
()
const
;
virtual
void
modified
(
ReloadBehavior
*
behavior
);
private:
QmlProject
*
m_project
;
QString
m_fileName
;
};
}
// namespace Internal
}
// namespace QmlProjectManager
#endif // QMLPROJECTFILE_H
src/plugins/qmlprojectmanager/qmlprojectmanager.cpp
View file @
fdd85b7f
...
...
@@ -32,6 +32,7 @@
#include "qmlproject.h"
#include <coreplugin/icore.h>
#include <coreplugin/ifile.h>
#include <coreplugin/uniqueidmanager.h>
#include <coreplugin/messagemanager.h>
#include <projectexplorer/projectexplorerconstants.h>
...
...
@@ -40,8 +41,8 @@
#include <QtDebug>
using
namespace
QmlProjectManager
;
using
namespace
QmlProjectManager
::
Internal
;
namespace
QmlProjectManager
{
namespace
Internal
{
Manager
::
Manager
()
{
...
...
@@ -101,3 +102,6 @@ void Manager::notifyChanged(const QString &fileName)
}
}
}
}
// namespace Internal
}
// namespace QmlProjectManager
src/plugins/qmlprojectmanager/qmlprojectmanager.pro
View file @
fdd85b7f
...
...
@@ -14,18 +14,27 @@ HEADERS += qmlproject.h \
qmlprojectconstants
.
h
\
qmlprojectnodes
.
h
\
qmlprojectwizard
.
h
\
qmlprojectfile
.
h
\
qmlprojectruncontrol
.
h
\
qmlprojectrunconfiguration
.
h
\
qmlprojectrunconfigurationfactory
.
h
\
qmlnewprojectwizard
.
h
\
qmltaskmanager
.
h
\
qmlprojectmanager_global
.
h
\
qmltarget
.
h
qmlprojectmanagerconstants
.
h
\
qmlprojecttarget
.
h
SOURCES
+=
qmlproject
.
cpp
\
qmlprojectplugin
.
cpp
\
qmlprojectmanager
.
cpp
\
qmlprojectnodes
.
cpp
\
qmlprojectwizard
.
cpp
\
qmlprojectfile
.
cpp
\
qmlprojectruncontrol
.
cpp
\
qmlprojectrunconfiguration
.
cpp
\
qmlprojectrunconfigurationfactory
.
cpp
\
qmlnewprojectwizard
.
cpp
\
qmltaskmanager
.
cpp
\
qmltarget
.
cpp
qml
project
target
.
cpp
RESOURCES
+=
qmlproject
.
qrc
OTHER_FILES
+=
QmlProjectManager
.
pluginspec
src/plugins/qmlprojectmanager/qmlprojectmanagerconstants.h
0 → 100644
View file @
fdd85b7f
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://qt.nokia.com/contact.
**
**************************************************************************/
#include <qglobal.h>
namespace
QmlProjectManager
{
namespace
Constants
{
const
char
*
const
QML_RC_ID
(
"QmlProjectManager.QmlRunConfiguration"
);
const
char
*
const
QML_RC_DISPLAY_NAME
(
QT_TRANSLATE_NOOP
(
"QmlProjectManager::Internal::QmlRunConfiguration"
,
"QML Viewer"
));
const
char
*
const
QML_VIEWER_KEY
(
"QmlProjectManager.QmlRunConfiguration.QmlViewer"
);
const
char
*
const
QML_VIEWER_ARGUMENTS_KEY
(
"QmlProjectManager.QmlRunConfiguration.QmlViewerArguments"
);
const
char
*
const
QML_VIEWER_TARGET_ID
(
"QmlProjectManager.QmlTarget"
);
const
char
*
const
QML_VIEWER_TARGET_DISPLAY_NAME
(
"QML Viewer"
);
const
char
*
const
QML_MAINSCRIPT_KEY
(
"QmlProjectManager.QmlRunConfiguration.MainScript"
);
const
char
*
const
QML_DEBUG_SERVER_PORT_KEY
(
"QmlProjectManager.QmlRunConfiguration.DebugServerPort"
);
const
int
QML_DEFAULT_DEBUG_SERVER_PORT
(
3768
);
}
// namespace Constants
}
// namespace QmlProjectManager
src/plugins/qmlprojectmanager/qmlprojectnodes.cpp
View file @
fdd85b7f
...
...
@@ -36,9 +36,10 @@
#include <QFileInfo>
#include <QDir>
#include <QTextStream>
using
namespace
QmlProjectManager
;
using
namespace
QmlProjectManager
::
Internal
;
namespace
QmlProjectManager
{
namespace
Internal
{
QmlProjectNode
::
QmlProjectNode
(
QmlProject
*
project
,
Core
::
IFile
*
projectFile
)
:
ProjectExplorer
::
ProjectNode
(
QFileInfo
(
projectFile
->
fileName
()).
absoluteFilePath
()),
...
...
@@ -235,3 +236,6 @@ bool QmlProjectNode::renameFile(const ProjectExplorer::FileType fileType,
Q_UNUSED
(
newFilePath
)
return
false
;
}
}
// namespace Internal
}
// namespace QmlProjectManager
src/plugins/qmlprojectmanager/qmlprojectnodes.h
View file @
fdd85b7f
...
...
@@ -27,8 +27,8 @@
**
**************************************************************************/
#ifndef QMLPROJECTNODE_H
#define QMLPROJECTNODE_H
#ifndef QMLPROJECTNODE
S
_H
#define QMLPROJECTNODE
S
_H
#include <projectexplorer/projectnodes.h>
...
...
@@ -89,4 +89,4 @@ private:
}
// namespace Internal
}
// namespace QmlProjectManager
#endif // QMLPROJECTNODE_H
#endif // QMLPROJECTNODE
S
_H
src/plugins/qmlprojectmanager/qmlprojectplugin.cpp
View file @
fdd85b7f
...
...
@@ -33,6 +33,8 @@
#include "qmlnewprojectwizard.h"
#include "qmlprojectconstants.h"
#include "qmlproject.h"
#include "qmlprojectrunconfigurationfactory.h"
#include "qmlprojectruncontrol.h"
#include "qmltaskmanager.h"
#include <extensionsystem/pluginmanager.h>
...
...
@@ -47,8 +49,8 @@
#include <QtCore/QtPlugin>
using
namespace
QmlProjectManager
;
using
namespace
QmlProjectManager
::
Internal
;
namespace
QmlProjectManager
{
namespace
Internal
{
QmlProjectPlugin
::
QmlProjectPlugin
()
:
m_qmlTaskManager
(
0
)
...
...
@@ -75,8 +77,8 @@ bool QmlProjectPlugin::initialize(const QStringList &, QString *errorMessage)
m_qmlTaskManager
=
new
QmlTaskManager
(
this
);
addAutoReleasedObject
(
manager
);
addAutoReleasedObject
(
new
Qml
RunConfigurationFactory
);
addAutoReleasedObject
(
new
QmlRunControlFactory
);
addAutoReleasedObject
(
new
Internal
::
QmlProject
RunConfigurationFactory
);
addAutoReleasedObject
(
new
Internal
::
QmlRunControlFactory
);
addAutoReleasedObject
(
new
QmlNewProjectWizard
);
addAutoReleasedObject
(
new
QmlProjectWizard
);
return
true
;
...
...
@@ -94,4 +96,7 @@ void QmlProjectPlugin::extensionsInitialized()
m_qmlTaskManager
,
SLOT
(
documentUpdated
(
QmlJS
::
Document
::
Ptr
)));
}
Q_EXPORT_PLUGIN
(
QmlProjectPlugin
)
}
// namespace Internal
}
// namespace QmlProjectManager
Q_EXPORT_PLUGIN
(
QmlProjectManager
::
Internal
::
QmlProjectPlugin
)
src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
0 → 100644
View file @
fdd85b7f
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://qt.nokia.com/contact.
**
**************************************************************************/
#include "qmlproject.h"
#include "qmlprojectmanagerconstants.h"
#include "qmlprojectrunconfiguration.h"
#include "qmlprojecttarget.h"
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/icore.h>
#include <coreplugin/ifile.h>
#include <utils/synchronousprocess.h>
#include <utils/pathchooser.h>
#include <QFormLayout>
#include <QComboBox>
#include <QCoreApplication>
#include <QLineEdit>
#include <QSpinBox>
namespace
QmlProjectManager
{
QmlProjectRunConfiguration
::
QmlProjectRunConfiguration
(
Internal
::
QmlProjectTarget
*
parent
)
:
ProjectExplorer
::
RunConfiguration
(
parent
,
QLatin1String
(
Constants
::
QML_RC_ID
)),
m_debugServerPort
(
Constants
::
QML_DEFAULT_DEBUG_SERVER_PORT
)
{
ctor
();
}
QmlProjectRunConfiguration
::
QmlProjectRunConfiguration
(
Internal
::
QmlProjectTarget
*
parent
,
QmlProjectRunConfiguration
*
source
)
:
ProjectExplorer
::
RunConfiguration
(
parent
,
source
),
m_scriptFile
(
source
->
m_scriptFile
),
m_qmlViewerCustomPath
(
source
->
m_qmlViewerCustomPath
),