mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-05 23:19:08 +02:00
2022-09-29 Fred Gleason <fredg@paravelsystems.com>
* Added a workaround for a bug in 'QTranslator::load()' that indicates failure when attempting to load a valid-but-null translation map. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
66b3773033
commit
c6adb2863a
@ -23427,3 +23427,7 @@
|
|||||||
2022-09-29 Fred Gleason <fredg@paravelsystems.com>
|
2022-09-29 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Fixed a bug in 'rdcartslots/Makefile.am' that caused i18n
|
* Fixed a bug in 'rdcartslots/Makefile.am' that caused i18n
|
||||||
translation maps for rdcartslots(1) to fail to be generated.
|
translation maps for rdcartslots(1) to fail to be generated.
|
||||||
|
2022-09-29 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Added a workaround for a bug in 'QTranslator::load()' that
|
||||||
|
indicates failure when attempting to load a valid-but-null
|
||||||
|
translation map.
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
#include <QFile>
|
||||||
|
|
||||||
#include "rdapplication.h"
|
#include "rdapplication.h"
|
||||||
#include "rdtranslator.h"
|
#include "rdtranslator.h"
|
||||||
@ -45,10 +46,15 @@ bool RDTranslator::LoadTranslation(const QString &filename,
|
|||||||
{
|
{
|
||||||
QTranslator *qt=new QTranslator(0);
|
QTranslator *qt=new QTranslator(0);
|
||||||
if(!qt->load(filename,dirname)) {
|
if(!qt->load(filename,dirname)) {
|
||||||
|
//
|
||||||
|
// Silly workaround so we don't false alarm on a valid-but-null file
|
||||||
|
//
|
||||||
|
if(QFile(dirname+"/"+filename).size()!=16) {
|
||||||
fprintf(stderr,"%s: failed to load translation file \"%s/%s\"\n",
|
fprintf(stderr,"%s: failed to load translation file \"%s/%s\"\n",
|
||||||
d_command_name.toUtf8().constData(),
|
d_command_name.toUtf8().constData(),
|
||||||
dirname.toUtf8().constData(),
|
dirname.toUtf8().constData(),
|
||||||
filename.toUtf8().constData());
|
filename.toUtf8().constData());
|
||||||
|
}
|
||||||
delete qt;
|
delete qt;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user