Lines 34-45
Link Here
|
34 |
app.setStyle(new QLittreStyle); |
34 |
app.setStyle(new QLittreStyle); |
35 |
|
35 |
|
36 |
QTranslator translator; |
36 |
QTranslator translator; |
37 |
if (translator.load("Littre", app.applicationDirPath()) == false) |
37 |
if (translator.load("Littre", "/usr/share/littre") == false) |
38 |
QMessageBox::warning(0, (QString)"Dictionnaire Le Littr" + QChar(0x00E9), QString("Impossible d'ouvrir le fichier %1.").arg(app.applicationDirPath() + QDir::separator() + "Littre.qm")); |
38 |
QMessageBox::warning(0, (QString)"Dictionnaire Le Littr" + QChar(0x00E9), QString("Impossible d'ouvrir le fichier %1.").arg("/usr/share/littre/Littre.qm")); |
39 |
else |
39 |
else |
40 |
app.installTranslator(&translator); |
40 |
app.installTranslator(&translator); |
41 |
|
41 |
|
42 |
QString fileName(app.applicationDirPath() + QDir::separator() + "Littre.dat"); |
42 |
QString fileName("/usr/share/littre/Littre.dat"); |
43 |
if (QResource::registerResource(fileName) == false) { |
43 |
if (QResource::registerResource(fileName) == false) { |
44 |
QMessageBox::warning(0, (QString)"Dictionnaire Le Littr" + QChar(0x00E9), QString("Impossible d'ouvrir le fichier %1. L'application ne peut démarrer sans ce fichier.").arg(fileName)); |
44 |
QMessageBox::warning(0, (QString)"Dictionnaire Le Littr" + QChar(0x00E9), QString("Impossible d'ouvrir le fichier %1. L'application ne peut démarrer sans ce fichier.").arg(fileName)); |
45 |
app.quit(); |
45 |
app.quit(); |