Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
Vivy
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Wiki externe
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Elliu
Vivy
Validations
7e72f8d5
Vérifiée
Valider
7e72f8d5
rédigé
11 juil. 2021
par
Kubat
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
ASS: Correct construct of lines, still not the times
parent
6e4f1d4d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion
!7
Add the ASS sub document and the ASS tree
Modifications
2
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
src/Lib/Ass/AssFactory.cc
+2
-0
2 ajouts, 0 suppression
src/Lib/Ass/AssFactory.cc
src/Lib/Ass/Line.cc
+12
-8
12 ajouts, 8 suppressions
src/Lib/Ass/Line.cc
avec
14 ajouts
et
8 suppressions
src/Lib/Ass/AssFactory.cc
+
2
−
0
Voir le fichier @
7e72f8d5
...
...
@@ -69,6 +69,8 @@ AssFactory::initFromStorage() noexcept
qCritical
()
<<
"Failed to create ASS style or events with error:"
<<
e
.
what
();
}
qDebug
()
<<
"Got"
<<
assLines
.
size
()
<<
"ASS dialog lines"
;
return
true
;
}
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
src/Lib/Ass/Line.cc
+
12
−
8
Voir le fichier @
7e72f8d5
...
...
@@ -27,18 +27,17 @@ Line::Line(AssFactory *const factory, const QString &lineString)
throw
std
::
runtime_error
((
"invalid event line header: "
+
lineString
).
toStdString
());
const
QString
lineContent
=
lineString
.
mid
(
lineString
.
indexOf
(
": "
)
+
2
/* strlen ": " */
);
const
QStringList
contentList
=
lineContent
.
split
(
","
,
Qt
::
KeepEmptyParts
,
Qt
::
CaseInsensitive
);
QStringList
contentList
=
lineContent
.
split
(
","
,
Qt
::
KeepEmptyParts
,
Qt
::
CaseInsensitive
);
if
(
contentList
.
size
()
!=
LineIndex
::
PastLastCode
)
throw
std
::
runtime_error
((
"invalid number of items "
+
QString
::
number
(
content
.
size
())
+
" instead of
"
+
QString
::
number
(
PastLastCode
)
+
" for line: "
+
lineContent
)
if
(
contentList
.
size
()
<
LineIndex
::
PastLastCode
)
throw
std
::
runtime_error
((
"invalid number of items "
+
QString
::
number
(
content
List
.
size
())
+
" instead of
something superiror or equal to "
+
QString
::
number
(
PastLastCode
)
+
" for line: "
+
lineContent
)
.
toStdString
());
layer
=
Utils
::
decodeLineToInteger
(
contentList
[
LineIndex
::
Layer
],
"Layer is not an integer"
);
effect
=
contentList
[
LineIndex
::
Effect
];
nameOrActor
=
contentList
[
LineIndex
::
Name
];
___contentAsText
=
lineContent
[
LineIndex
::
Text
];
styleProperties
.
marginL
=
Utils
::
decodeLineToInteger
(
contentList
[
LineIndex
::
MarginL
],
"MarginL is not an integer"
);
styleProperties
.
marginR
=
...
...
@@ -50,6 +49,11 @@ Line::Line(AssFactory *const factory, const QString &lineString)
if
(
!
assFactory
->
hasStyle
(
style
))
throw
std
::
runtime_error
((
"Invalid or not declared style name: "
+
style
).
toStdString
());
lineStyle
=
assFactory
->
getStyle
(
style
);
// Pop all but the text, it may contains `,` characters
for
(
int
i
=
0
;
i
<
LineIndex
::
Text
;
++
i
)
contentList
.
removeFirst
();
___contentAsText
=
contentList
.
join
(
""
);
}
void
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter