2018-10-16 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in the 'RDIdValidator' and 'RDTextValidator' classes
	that caused them to throw exceptions when processing certain
	multi-byte UTF-8 characters.
This commit is contained in:
Fred Gleason 2018-10-16 20:49:40 -04:00
parent 9bfc6d6a8f
commit 3aac166983
10 changed files with 97 additions and 34 deletions

View File

@ -17803,3 +17803,7 @@
restarting the 'rivendell' service.
* Updated rdselect(8) to use the proper Systemd idiom for
restarting the 'rivendell' service.
2018-10-16 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in the 'RDIdValidator' and 'RDTextValidator' classes
that caused them to throw exceptions when processing certain
multi-byte UTF-8 characters.

View File

@ -33,9 +33,11 @@ RDIdValidator::RDIdValidator(QObject *parent)
QValidator::State RDIdValidator::validate(QString &input,int &pos) const
{
char c=input.at(pos-1).latin1();
if(input.length()==0) {
return QValidator::Acceptable;
}
for(unsigned i=0;i<banned_chars.size();i++) {
if(banned_chars[i]==c) {
if(input.contains(banned_chars.at(i))) {
return QValidator::Invalid;
}
}

View File

@ -37,10 +37,8 @@ QValidator::State RDTextValidator::validate(QString &input,int &pos) const
if(input.length()==0) {
return QValidator::Acceptable;
}
int inspection_pos=std::max(0,std::min((int)input.length()-1,pos));
char c=input.at(inspection_pos).latin1();
for(unsigned i=0;i<banned_chars.size();i++) {
if(banned_chars[i]==c) {
if(input.contains(banned_chars.at(i))) {
return QValidator::Invalid;
}
}

View File

@ -3222,7 +3222,7 @@ nastaveném pro běh služby CAE pro naplnění databáze se zdroji zvuku.</tran
has not yet been generated. Please start the Rivendell daemons on this host
(by executing, as user &apos;root&apos;, the command &quot;/etc/init.d/rivendell start&quot;)
in order to populate the audio resources database.</source>
<translation>Přiřazení kanálů nebudou dostupná pro tento server jako zdroj zvuku, data
<translation type="obsolete">Přiřazení kanálů nebudou dostupná pro tento server jako zdroj zvuku, data
ještě nebyla vytvořena. Spusťte, prosím, démony Rivendell na tomto serveru.
Zadejte jako superuživatel &apos;root&apos; příkaz &quot;/etc/init.d/rivendell start&quot;
pro naplnění databáze zdroji zvuku.</translation>
@ -3239,6 +3239,13 @@ pro naplnění databáze zdroji zvuku.</translation>
<source>Configure RDPanel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Channel assignments will not be available for this host, as audio resource data
has not yet been generated. Please start the Rivendell daemons on this host
(by executing, as user &apos;root&apos;, the command &quot;systemctl start rivendell&quot;)
in order to populate the audio resources database.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditReplicator</name>
@ -6152,7 +6159,7 @@ Prověřte, prosím, svá nastavení a zkuste to znovu.</translation>
</message>
<message>
<source>Please start the Rivendell daemons on this host (by executing, as user &apos;root&apos;, the command &quot;/etc/init.d/rivendell start&quot;) in order to populate the audio resources database.</source>
<translation>Spusťte, prosím, démony Rivendell na tomto serveru. Zadejte jako superuživatel &apos;root&apos; příkaz &quot;/etc/init.d/rivendell start&quot;
<translation type="obsolete">Spusťte, prosím, démony Rivendell na tomto serveru. Zadejte jako superuživatel &apos;root&apos; příkaz &quot;/etc/init.d/rivendell start&quot;
pro naplnění databáze zdroji zvuku.</translation>
</message>
<message>
@ -6178,5 +6185,9 @@ pro naplnění databáze zdroji zvuku.</translation>
<source>Outputs</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please start the Rivendell daemons on this host (by executing, as user &apos;root&apos;, the command &quot;systemctl start rivendell&quot;) in order to populate the audio resources database.</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -3117,13 +3117,6 @@ configured to run the CAE service in order to populate the audio resources datab
<source>No Audio Configuration Data</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Channel assignments will not be available for this host, as audio resource data
has not yet been generated. Please start the Rivendell daemons on this host
(by executing, as user &apos;root&apos;, the command &quot;/etc/init.d/rivendell start&quot;)
in order to populate the audio resources database.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[none]</source>
<translation type="unfinished">[keine]</translation>
@ -3136,6 +3129,13 @@ in order to populate the audio resources database.</source>
<source>Configure RDPanel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Channel assignments will not be available for this host, as audio resource data
has not yet been generated. Please start the Rivendell daemons on this host
(by executing, as user &apos;root&apos;, the command &quot;systemctl start rivendell&quot;)
in order to populate the audio resources database.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditReplicator</name>
@ -5876,7 +5876,7 @@ Bitte überprüfen Sie ihre Einstellungen und versuchen sie es erneut.</translat
</message>
<message>
<source>Please start the Rivendell daemons on this host (by executing, as user &apos;root&apos;, the command &quot;/etc/init.d/rivendell start&quot;) in order to populate the audio resources database.</source>
<translation>Bitte starten sie die Rivendelldeamons auf diesem Host, indem sie als Benutzer &apos;root&apos; das Kommando &quot;/etc/init.d/rivendell start&quot;
<translation type="obsolete">Bitte starten sie die Rivendelldeamons auf diesem Host, indem sie als Benutzer &apos;root&apos; das Kommando &quot;/etc/init.d/rivendell start&quot;
eingeben um die Audioressourcendatenbank zu füllen.</translation>
</message>
<message>
@ -5902,5 +5902,9 @@ eingeben um die Audioressourcendatenbank zu füllen.</translation>
<source>Outputs</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please start the Rivendell daemons on this host (by executing, as user &apos;root&apos;, the command &quot;systemctl start rivendell&quot;) in order to populate the audio resources database.</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -3210,7 +3210,7 @@ computador para obtener los recursos de audio de dicho equipo.</translation>
has not yet been generated. Please start the Rivendell daemons on this host
(by executing, as user &apos;root&apos;, the command &quot;/etc/init.d/rivendell start&quot;)
in order to populate the audio resources database.</source>
<translation>La asignación de canales no estará disponible para este equipo, debido a que la
<translation type="obsolete">La asignación de canales no estará disponible para este equipo, debido a que la
configuración de audio aún no ha sido generada. Inicie los servicios de Rivendell
en el equipo (ejecutando, como &apos;root&apos;, el comando &quot;/etc/init.d/rivendell start&quot;)
para generar la base de datos con los recursos de audio disponibles.</translation>
@ -3227,6 +3227,13 @@ para generar la base de datos con los recursos de audio disponibles.</translatio
<source>Configure RDPanel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Channel assignments will not be available for this host, as audio resource data
has not yet been generated. Please start the Rivendell daemons on this host
(by executing, as user &apos;root&apos;, the command &quot;systemctl start rivendell&quot;)
in order to populate the audio resources database.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditReplicator</name>
@ -6113,7 +6120,7 @@ Revise los parámetros e intente de nuevo.</translation>
</message>
<message>
<source>Please start the Rivendell daemons on this host (by executing, as user &apos;root&apos;, the command &quot;/etc/init.d/rivendell start&quot;) in order to populate the audio resources database.</source>
<translation>Inicie los servicios Rivendell en este equipo (ejecutando, como &apos;root&apos;, el comando &quot;/etc/init.d/rivendell start&quot;) para iniciar la base de datos de recursos de audio.</translation>
<translation type="obsolete">Inicie los servicios Rivendell en este equipo (ejecutando, como &apos;root&apos;, el comando &quot;/etc/init.d/rivendell start&quot;) para iniciar la base de datos de recursos de audio.</translation>
</message>
<message>
<source>&amp;Close</source>
@ -6137,5 +6144,9 @@ Revise los parámetros e intente de nuevo.</translation>
<source>Outputs</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please start the Rivendell daemons on this host (by executing, as user &apos;root&apos;, the command &quot;systemctl start rivendell&quot;) in order to populate the audio resources database.</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -2682,13 +2682,6 @@ configured to run the CAE service in order to populate the audio resources datab
<source>No Audio Configuration Data</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Channel assignments will not be available for this host, as audio resource data
has not yet been generated. Please start the Rivendell daemons on this host
(by executing, as user &apos;root&apos;, the command &quot;/etc/init.d/rivendell start&quot;)
in order to populate the audio resources database.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[none]</source>
<translation type="unfinished"></translation>
@ -2701,6 +2694,13 @@ in order to populate the audio resources database.</source>
<source>Configure RDPanel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Channel assignments will not be available for this host, as audio resource data
has not yet been generated. Please start the Rivendell daemons on this host
(by executing, as user &apos;root&apos;, the command &quot;systemctl start rivendell&quot;)
in order to populate the audio resources database.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditReplicator</name>
@ -4892,10 +4892,6 @@ please check your settings and try again.</source>
</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please start the Rivendell daemons on this host (by executing, as user &apos;root&apos;, the command &quot;/etc/init.d/rivendell start&quot;) in order to populate the audio resources database.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Close</source>
<translation type="unfinished"></translation>
@ -4918,5 +4914,9 @@ please check your settings and try again.</source>
<source>Outputs</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please start the Rivendell daemons on this host (by executing, as user &apos;root&apos;, the command &quot;systemctl start rivendell&quot;) in order to populate the audio resources database.</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -3098,7 +3098,7 @@ configured to run the CAE service in order to populate the audio resources datab
has not yet been generated. Please start the Rivendell daemons on this host
(by executing, as user &apos;root&apos;, the command &quot;/etc/init.d/rivendell start&quot;)
in order to populate the audio resources database.</source>
<translation type="unfinished">Det vil ikkje vera tilgjengelege kanalar for denne verten, fordi det ikkje har vorte laga
<translation type="obsolete">Det vil ikkje vera tilgjengelege kanalar for denne verten, fordi det ikkje har vorte laga
data for lydressursar enno. Start Rivendell-programma denne verten ved å køyra
kommandoen &quot;/etc/init.d/rivendell-start&quot; som root-brukaren for å fylla ut databasen
for lydressursar.</translation>
@ -3115,6 +3115,13 @@ for lydressursar.</translation>
<source>Configure RDPanel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Channel assignments will not be available for this host, as audio resource data
has not yet been generated. Please start the Rivendell daemons on this host
(by executing, as user &apos;root&apos;, the command &quot;systemctl start rivendell&quot;)
in order to populate the audio resources database.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditReplicator</name>
@ -5768,7 +5775,7 @@ Sjekk oppsettet ditt og prøv att.</translation>
</message>
<message>
<source>Please start the Rivendell daemons on this host (by executing, as user &apos;root&apos;, the command &quot;/etc/init.d/rivendell start&quot;) in order to populate the audio resources database.</source>
<translation>Start Rivendell-nisseprogramma denne verten ved å køyra kommandoen &quot;/etc/init.d/rivendell-start&quot; som root-brukaren for å fylla ut lydressursdatabasen.</translation>
<translation type="obsolete">Start Rivendell-nisseprogramma denne verten ved å køyra kommandoen &quot;/etc/init.d/rivendell-start&quot; som root-brukaren for å fylla ut lydressursdatabasen.</translation>
</message>
<message>
<source>&amp;Close</source>
@ -5792,5 +5799,9 @@ Sjekk oppsettet ditt og prøv att.</translation>
<source>Outputs</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please start the Rivendell daemons on this host (by executing, as user &apos;root&apos;, the command &quot;systemctl start rivendell&quot;) in order to populate the audio resources database.</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -3098,7 +3098,7 @@ configured to run the CAE service in order to populate the audio resources datab
has not yet been generated. Please start the Rivendell daemons on this host
(by executing, as user &apos;root&apos;, the command &quot;/etc/init.d/rivendell start&quot;)
in order to populate the audio resources database.</source>
<translation type="unfinished">Det vil ikkje vera tilgjengelege kanalar for denne verten, fordi det ikkje har vorte laga
<translation type="obsolete">Det vil ikkje vera tilgjengelege kanalar for denne verten, fordi det ikkje har vorte laga
data for lydressursar enno. Start Rivendell-programma denne verten ved å køyra
kommandoen &quot;/etc/init.d/rivendell-start&quot; som root-brukaren for å fylla ut databasen
for lydressursar.</translation>
@ -3115,6 +3115,13 @@ for lydressursar.</translation>
<source>Configure RDPanel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Channel assignments will not be available for this host, as audio resource data
has not yet been generated. Please start the Rivendell daemons on this host
(by executing, as user &apos;root&apos;, the command &quot;systemctl start rivendell&quot;)
in order to populate the audio resources database.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditReplicator</name>
@ -5768,7 +5775,7 @@ Sjekk oppsettet ditt og prøv att.</translation>
</message>
<message>
<source>Please start the Rivendell daemons on this host (by executing, as user &apos;root&apos;, the command &quot;/etc/init.d/rivendell start&quot;) in order to populate the audio resources database.</source>
<translation>Start Rivendell-nisseprogramma denne verten ved å køyra kommandoen &quot;/etc/init.d/rivendell-start&quot; som root-brukaren for å fylla ut lydressursdatabasen.</translation>
<translation type="obsolete">Start Rivendell-nisseprogramma denne verten ved å køyra kommandoen &quot;/etc/init.d/rivendell-start&quot; som root-brukaren for å fylla ut lydressursdatabasen.</translation>
</message>
<message>
<source>&amp;Close</source>
@ -5792,5 +5799,9 @@ Sjekk oppsettet ditt og prøv att.</translation>
<source>Outputs</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please start the Rivendell daemons on this host (by executing, as user &apos;root&apos;, the command &quot;systemctl start rivendell&quot;) in order to populate the audio resources database.</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -3098,7 +3098,7 @@ configured to run the CAE service in order to populate the audio resources datab
has not yet been generated. Please start the Rivendell daemons on this host
(by executing, as user &apos;root&apos;, the command &quot;/etc/init.d/rivendell start&quot;)
in order to populate the audio resources database.</source>
<translation type="unfinished">Configurações de canais não estão disponível para este cliente pois recursos de dados
<translation type="obsolete">Configurações de canais não estão disponível para este cliente pois recursos de dados
ainda não foram gerados. Por Favor, Inicie as processos constantes neste cliente
(executando, como usuário &apos;root&apos;, the command &quot;/etc/init.d/rivendell start&quot;)
Isto para popular os recursos de áudio na Base de Dados.</translation>
@ -3115,6 +3115,13 @@ Isto para popular os recursos de áudio na Base de Dados.</translation>
<source>Configure RDPanel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Channel assignments will not be available for this host, as audio resource data
has not yet been generated. Please start the Rivendell daemons on this host
(by executing, as user &apos;root&apos;, the command &quot;systemctl start rivendell&quot;)
in order to populate the audio resources database.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditReplicator</name>
@ -5841,7 +5848,7 @@ por favor, cheque suas configurações e tente novamente</translation>
</message>
<message>
<source>Please start the Rivendell daemons on this host (by executing, as user &apos;root&apos;, the command &quot;/etc/init.d/rivendell start&quot;) in order to populate the audio resources database.</source>
<translation>Por Favor, Inicie os &apos;daemons&apos; do Rivendell neste Cliente (executando, como &apos;root&apos; o comando &quot;/etc/init.d/rivendell start&quot;). isso proverá a Base de Dados com as informações de Áudio.</translation>
<translation type="obsolete">Por Favor, Inicie os &apos;daemons&apos; do Rivendell neste Cliente (executando, como &apos;root&apos; o comando &quot;/etc/init.d/rivendell start&quot;). isso proverá a Base de Dados com as informações de Áudio.</translation>
</message>
<message>
<source>&amp;Close</source>
@ -5867,5 +5874,9 @@ por favor, cheque suas configurações e tente novamente</translation>
<source>Outputs</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please start the Rivendell daemons on this host (by executing, as user &apos;root&apos;, the command &quot;systemctl start rivendell&quot;) in order to populate the audio resources database.</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>