[nostalgia/studio] Add project path to file name function
This commit is contained in:
parent
680881003c
commit
5cec2cf819
@ -13,6 +13,13 @@
|
|||||||
|
|
||||||
namespace nostalgia::studio {
|
namespace nostalgia::studio {
|
||||||
|
|
||||||
|
QString filePathToName(QString path, QString prefix, QString suffix) {
|
||||||
|
const auto begin = prefix.size();
|
||||||
|
const auto end = path.size() - (suffix.size() + prefix.size());
|
||||||
|
return path.mid(begin, end);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Project::Project(QString path): m_fs(path.toUtf8()) {
|
Project::Project(QString path): m_fs(path.toUtf8()) {
|
||||||
qDebug() << "Project:" << path;
|
qDebug() << "Project:" << path;
|
||||||
m_path = path;
|
m_path = path;
|
||||||
|
@ -30,6 +30,8 @@ enum class ProjectEvent {
|
|||||||
FileUpdated,
|
FileUpdated,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[[nodiscard]] QString filePathToName(QString path, QString prefix, QString suffix);
|
||||||
|
|
||||||
class NOSTALGIASTUDIO_EXPORT Project: public QObject {
|
class NOSTALGIASTUDIO_EXPORT Project: public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user