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
CamiTK
CamiTK Community Edition
Commits
49da91d9
Commit
49da91d9
authored
May 13, 2016
by
Claire Sery
Browse files
Modify visibility of methods to generate XML files
parent
588e4cd6
Changes
1
Hide whitespace changes
Inline
Side-by-side
sdk/libraries/cepgenerator/CepGenerator.cpp
View file @
49da91d9
...
...
@@ -156,18 +156,33 @@ void CepGenerator::serializeManifest(QString fileName) {
// Add a comment for the user NOT to manually modify this file...
// TODO, how ?????
// Setting the CEP root directory where the manifest should be
if
(
fileName
.
isEmpty
())
QFileInfo
xmlFileInfo
;
xmlFileInfo
.
setFile
(
fileName
);
if
(
xmlFileInfo
.
exists
()
!=
true
)
{
fileName
=
cepManifestName
;
}
if
(
xmlFileInfo
.
filePath
().
isEmpty
()
!=
true
)
{
QDir
currentDirectory
;
currentDirectory
.
cd
(
devDirectoryName
.
absolutePath
());
currentDirectory
.
cd
(
cepDirectoryName
);
}
else
{
fileName
=
cepManifestName
;
QDir
currentDirectory
;
currentDirectory
.
cd
(
devDirectoryName
.
absolutePath
());
currentDirectory
.
cd
(
cepDirectoryName
);
// Set the right file name
xmlFileInfo
.
setFile
(
currentDirectory
.
absolutePath
(),
fileName
+
cepManifestExtension
);
}
}
// Suppose that fileName is a complete path of file.
else
{
}
// Set the right file name
QFileInfo
xmlFileInfo
;
xmlFileInfo
.
setFile
(
currentDirectory
.
absolutePath
(),
fileName
+
cepManifestExtension
);
QFile
xmlFile
(
xmlFileInfo
.
absoluteFilePath
());
if
(
!
xmlFile
.
open
(
QIODevice
::
WriteOnly
|
QIODevice
::
Text
))
{
QString
msg
=
"Exception from cep file generation
\n
Cannot write on file "
+
xmlFileInfo
.
absoluteFilePath
()
+
"
\n
"
;
...
...
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