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
cd9bd8d5
Commit
cd9bd8d5
authored
May 06, 2009
by
Roberto Raggi
Browse files
Changed the .qmlproject file format.
parent
d3f43f5d
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmlprojectmanager/QmlProject.mimetypes.xml
View file @
cd9bd8d5
...
...
@@ -6,11 +6,4 @@
<comment>
Qml Project file
</comment>
<glob
pattern=
"*.qmlproject"
/>
</mime-type>
<mime-type
type=
"application/vnd.nokia.qt.qml.files"
>
<sub-class-of
type=
"text/plain"
/>
<comment>
Qml Project Files
</comment>
<glob
pattern=
"*.files"
/>
</mime-type>
</mime-info>
src/plugins/qmlprojectmanager/qmlproject.cpp
View file @
cd9bd8d5
...
...
@@ -114,10 +114,7 @@ QmlProject::QmlProject(Manager *manager, const QString &fileName)
m_fileName
(
fileName
)
{
QFileInfo
fileInfo
(
m_fileName
);
QDir
dir
=
fileInfo
.
dir
();
m_projectName
=
fileInfo
.
completeBaseName
();
m_filesFileName
=
QFileInfo
(
dir
,
m_projectName
+
QLatin1String
(
".files"
)).
absoluteFilePath
();
m_projectName
=
fileInfo
.
completeBaseName
();
m_file
=
new
QmlProjectFile
(
this
,
fileName
);
m_rootNode
=
new
QmlProjectNode
(
this
,
m_file
);
...
...
@@ -136,7 +133,7 @@ QmlProject::~QmlProject()
}
QString
QmlProject
::
filesFileName
()
const
{
return
m_file
sFile
Name
;
}
{
return
m_fileName
;
}
static
QStringList
readLines
(
const
QString
&
absoluteFileName
)
{
...
...
src/plugins/qmlprojectmanager/qmlprojectconstants.h
View file @
cd9bd8d5
...
...
@@ -34,7 +34,7 @@ namespace QmlProjectManager {
namespace
Constants
{
const
char
*
const
PROJECTCONTEXT
=
"QmlProject.ProjectContext"
;
const
char
*
const
QMLMIMETYPE
=
"text/x-qml-project"
;
// ### FIXME
const
char
*
const
QMLMIMETYPE
=
"text/x-qml-project"
;
// ### FIXME
const
char
*
const
MAKESTEP
=
"QmlProjectManager.MakeStep"
;
// contexts
...
...
@@ -43,14 +43,8 @@ const char *const C_FILESEDITOR = ".files Editor";
// kinds
const
char
*
const
PROJECT_KIND
=
"Qml"
;
const
char
*
const
FILES_EDITOR
=
".files Editor"
;
const
char
*
const
FILES_MIMETYPE
=
"application/vnd.nokia.qt.qml.files"
;
const
char
*
const
INCLUDES_EDITOR
=
".includes Editor"
;
const
char
*
const
INCLUDES_MIMETYPE
=
"application/vnd.nokia.qt.qml.includes"
;
const
char
*
const
CONFIG_EDITOR
=
".includes Editor"
;
const
char
*
const
CONFIG_MIMETYPE
=
"application/vnd.nokia.qt.qml.config"
;
const
char
*
const
FILES_EDITOR
=
".qmlproject Editor"
;
const
char
*
const
FILES_MIMETYPE
=
QMLMIMETYPE
;
}
// namespace Constants
}
// namespace QmlProjectManager
...
...
src/plugins/qmlprojectmanager/qmlprojectfileseditor.cpp
View file @
cd9bd8d5
...
...
@@ -52,8 +52,6 @@ ProjectFilesFactory::ProjectFilesFactory(Manager *manager,
m_actionHandler
(
handler
)
{
m_mimeTypes
.
append
(
QLatin1String
(
Constants
::
FILES_MIMETYPE
));
m_mimeTypes
.
append
(
QLatin1String
(
Constants
::
INCLUDES_MIMETYPE
));
m_mimeTypes
.
append
(
QLatin1String
(
Constants
::
CONFIG_MIMETYPE
));
}
ProjectFilesFactory
::~
ProjectFilesFactory
()
...
...
src/plugins/qmlprojectmanager/qmlprojectwizard.cpp
View file @
cd9bd8d5
...
...
@@ -264,7 +264,7 @@ bool QmlProjectWizard::isValidDir(const QFileInfo &fileInfo) const
}
Core
::
GeneratedFiles
QmlProjectWizard
::
generateFiles
(
const
QWizard
*
w
,
QString
*
errorMessage
)
const
QString
*
errorMessage
)
const
{
Q_UNUSED
(
errorMessage
)
...
...
@@ -273,7 +273,6 @@ Core::GeneratedFiles QmlProjectWizard::generateFiles(const QWizard *w,
const
QDir
dir
(
projectPath
);
const
QString
projectName
=
wizard
->
projectName
();
const
QString
creatorFileName
=
QFileInfo
(
dir
,
projectName
+
QLatin1String
(
".qmlproject"
)).
absoluteFilePath
();
const
QString
filesFileName
=
QFileInfo
(
dir
,
projectName
+
QLatin1String
(
".files"
)).
absoluteFilePath
();
Core
::
ICore
*
core
=
Core
::
ICore
::
instance
();
Core
::
MimeDatabase
*
mimeDatabase
=
core
->
mimeDatabase
();
...
...
@@ -284,13 +283,9 @@ Core::GeneratedFiles QmlProjectWizard::generateFiles(const QWizard *w,
getFileList
(
dir
,
projectPath
,
suffixes
,
&
sources
,
&
paths
);
Core
::
GeneratedFile
generatedCreatorFile
(
creatorFileName
);
generatedCreatorFile
.
setContents
(
QLatin1String
(
"[General]
\n
"
));
Core
::
GeneratedFile
generatedFilesFile
(
filesFileName
);
generatedFilesFile
.
setContents
(
sources
.
join
(
QLatin1String
(
"
\n
"
)));
generatedCreatorFile
.
setContents
(
sources
.
join
(
QLatin1String
(
"
\n
"
)));
Core
::
GeneratedFiles
files
;
files
.
append
(
generatedFilesFile
);
files
.
append
(
generatedCreatorFile
);
return
files
;
...
...
Write
Preview
Markdown
is supported
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