Skip to content
Extraits de code Groupes Projets

Add documents

Fusionnées Kubat a demandé de fusionner vivy-document vers master
3 files
+ 10
7
Comparer les modifications
  • Côte à côte
  • En ligne

Fichiers

+ 4
1
@@ -9,6 +9,8 @@
@@ -9,6 +9,8 @@
#include "../Ass/Ass.h"
#include "../Ass/Ass.h"
#include <QString>
#include <QString>
 
/* Types for the different documents */
 
enum AudioDocumentType {
enum AudioDocumentType {
MP3 = Vivy::Utils::DocumentType::MP3,
MP3 = Vivy::Utils::DocumentType::MP3,
OGG = Vivy::Utils::DocumentType::OGG,
OGG = Vivy::Utils::DocumentType::OGG,
@@ -24,6 +26,7 @@ enum AssDocumentType {
@@ -24,6 +26,7 @@ enum AssDocumentType {
ASS = Vivy::Utils::DocumentType::ASS,
ASS = Vivy::Utils::DocumentType::ASS,
};
};
 
/* The Big CRTP class for all common things to all the subdocuments */
template <class CRTPDocumentType, class Document> class CRTPDocument {
template <class CRTPDocumentType, class Document> class CRTPDocument {
public:
public:
using Type = CRTPDocumentType;
using Type = CRTPDocumentType;
@@ -41,7 +44,7 @@ protected:
@@ -41,7 +44,7 @@ protected:
}
}
public:
public:
static Document *fromFile(const QString &path) noexcept
[[nodiscard("allocated")]] static Document *fromFile(const QString &path) noexcept
{
{
Document *ret = new Document();
Document *ret = new Document();
ret->initFromPath(path);
ret->initFromPath(path);
Chargement en cours