Commit 4af6372b authored by Claire Sery's avatar Claire Sery
Browse files

Merge branch 'catalogue-related-fix' into develop

parents 1ffd0383 49da91d9
......@@ -53,7 +53,7 @@ VtkImageComponent::VtkImageComponent(const QString& fileName) throw(AbortExcepti
}
// -------------------- createComponent --------------------
void VtkImageComponent::createComponent(const QString& filename) {
void VtkImageComponent::createComponent(const QString& filename) throw (camitk::AbortException) {
if (!filename.isNull()) {
try {
// create the ImageComponent (it will register it self in the list of Components)
......
......@@ -49,7 +49,7 @@ public:
virtual ~VtkImageComponent() {}
/// actually create the component from the file
virtual void createComponent(const QString&);
virtual void createComponent(const QString&) throw (camitk::AbortException);
private:
/**
......
......@@ -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";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment