-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Save temporary files under temp/ManiVault/<session_id>/
Create temporary /temp/ManiVault/<session_id>/ directory at application startup Create ManiVault TemporaryDir class which refers to the correct application session based temorary directory Remove comments from serializable class
- Loading branch information
1 parent
9946c5c
commit 7ace407
Showing
12 changed files
with
90 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// SPDX-License-Identifier: LGPL-3.0-or-later | ||
// A corresponding LICENSE file is located in the root directory of this source tree | ||
// Copyright (C) 2023 BioVault (Biomedical Visual Analytics Unit LUMC - TU Delft) | ||
|
||
#include "TemporaryDir.h" | ||
#include "Application.h" | ||
|
||
#include <QDir> | ||
|
||
namespace mv::util { | ||
|
||
TemporaryDir::TemporaryDir() : | ||
QTemporaryDir(QDir::cleanPath(QDir::tempPath() + QDir::separator() + "ManiVault" + QDir::separator() + Application::current()->getId())) | ||
{ | ||
qDebug() << QDir::cleanPath(QDir::tempPath() + QDir::separator() + "ManiVault" + QDir::separator() + Application::current()->getId()); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// SPDX-License-Identifier: LGPL-3.0-or-later | ||
// A corresponding LICENSE file is located in the root directory of this source tree | ||
// Copyright (C) 2023 BioVault (Biomedical Visual Analytics Unit LUMC - TU Delft) | ||
|
||
#pragma once | ||
|
||
#include <QTemporaryDir> | ||
|
||
namespace mv::util { | ||
|
||
/** | ||
* Temporary directory class | ||
* | ||
* Wrapper around QTemporaryDir to ensure that all ManiVault temporary data will reside somewhere in /temp/ManiVault | ||
* | ||
* @author Thomas Kroes | ||
*/ | ||
class TemporaryDir final : public QTemporaryDir | ||
{ | ||
public: | ||
|
||
/** | ||
* Construct temporary dir | ||
* Constructs the QTemporaryDir with a temp/ManiVault template path | ||
*/ | ||
TemporaryDir(); | ||
|
||
/** Do not allow users of the temporary dir to construct a temporary dir with their own template path */ | ||
TemporaryDir(const QString& templatePath) = delete; | ||
}; | ||
|
||
} |