Naming and cleanup of worker

This commit is contained in:
Anton Thomasson 2022-01-07 20:36:21 +01:00
parent c93d4a019f
commit d6db1ff5e2
12 changed files with 366 additions and 401 deletions

View file

@ -35,7 +35,6 @@ DEFINES += SEAPRINT_VERSION='\\"$$VERSION\\"'
SOURCES += src/harbour-seaprint.cpp \
src/convertchecker.cpp \
src/convertworker.cpp \
src/curlrequester.cpp \
src/curlworker.cpp \
src/ippdiscovery.cpp \
@ -46,6 +45,7 @@ SOURCES += src/harbour-seaprint.cpp \
ppm2pwg/pdf2printable.cpp \
ppm2pwg/bytestream/bytestream.cpp \
src/overrider.cpp \
src/printerworker.cpp \
src/settings.cpp \
src/svgprovider.cpp
@ -82,7 +82,6 @@ TRANSLATIONS += translations/harbour-seaprint-de.ts \
HEADERS += \
src/convertchecker.h \
src/convertworker.h \
src/curlrequester.h \
src/curlworker.h \
src/ippdiscovery.h \
@ -100,6 +99,7 @@ HEADERS += \
ppm2pwg/bytestream/codable.h \
src/overrider.h \
src/papersizes.h \
src/printerworker.h \
src/settings.h \
src/svgprovider.h

View file

@ -11,23 +11,23 @@ IppPrinter::IppPrinter()
QObject::connect(this, &IppPrinter::urlChanged, this, &IppPrinter::onUrlChanged);
qRegisterMetaType<QTemporaryFile*>("QTemporaryFile*");
_worker = new ConvertWorker(this);
_worker = new PrinterWorker(this);
_worker->moveToThread(&_workerThread);
connect(&_workerThread, &QThread::finished, _worker, &QObject::deleteLater);
connect(this, &IppPrinter::doCommand, _worker, &ConvertWorker::command);
connect(this, &IppPrinter::doGetJobs, _worker, &ConvertWorker::getJobs);
connect(this, &IppPrinter::doCancelJob, _worker, &ConvertWorker::cancelJob);
connect(this, &IppPrinter::doJustUpload, _worker, &ConvertWorker::justUpload);
connect(this, &IppPrinter::doDoGetPrinterAttributes, _worker, &PrinterWorker::getPrinterAttributes);
connect(this, &IppPrinter::doGetJobs, _worker, &PrinterWorker::getJobs);
connect(this, &IppPrinter::doCancelJob, _worker, &PrinterWorker::cancelJob);
connect(this, &IppPrinter::doJustUpload, _worker, &PrinterWorker::justUpload);
connect(this, &IppPrinter::doConvertPdf, _worker, &ConvertWorker::convertPdf);
connect(this, &IppPrinter::doConvertImage, _worker, &ConvertWorker::convertImage);
connect(this, &IppPrinter::doConvertOfficeDocument, _worker, &ConvertWorker::convertOfficeDocument);
connect(this, &IppPrinter::doConvertPlaintext, _worker, &ConvertWorker::convertPlaintext);
connect(_worker, &ConvertWorker::progress, this, &IppPrinter::setProgress);
connect(_worker, &ConvertWorker::busyMessage, this, &IppPrinter::setBusyMessage);
connect(_worker, &ConvertWorker::failed, this, &IppPrinter::convertFailed);
connect(this, &IppPrinter::doConvertPdf, _worker, &PrinterWorker::convertPdf);
connect(this, &IppPrinter::doConvertImage, _worker, &PrinterWorker::convertImage);
connect(this, &IppPrinter::doConvertOfficeDocument, _worker, &PrinterWorker::convertOfficeDocument);
connect(this, &IppPrinter::doConvertPlaintext, _worker, &PrinterWorker::convertPlaintext);
connect(_worker, &PrinterWorker::progress, this, &IppPrinter::setProgress);
connect(_worker, &PrinterWorker::busyMessage, this, &IppPrinter::setBusyMessage);
connect(_worker, &PrinterWorker::failed, this, &IppPrinter::convertFailed);
qRegisterMetaType<QMargins>();
@ -120,7 +120,7 @@ void IppPrinter::refresh() {
QJsonObject o = opAttrs();
IppMsg msg = IppMsg(o);
emit doCommand(msg.encode(IppMsg::GetPrinterAttrs));
emit doDoGetPrinterAttributes(msg.encode(IppMsg::GetPrinterAttrs));
}
}

View file

@ -4,7 +4,7 @@
#include <QtNetwork>
#include <QNetworkAccessManager>
#include "ippmsg.h"
#include "convertworker.h"
#include "printerworker.h"
#include "curlrequester.h"
#include <mlite5/MGConfItem>
@ -12,7 +12,7 @@ class IppPrinter : public QObject
{
Q_OBJECT
friend class ConvertWorker;
friend class PrinterWorker;
Q_PROPERTY(QString url READ getUrl WRITE setUrl NOTIFY urlChanged)
Q_PROPERTY(QJsonObject attrs MEMBER _attrs NOTIFY attrsChanged)
@ -50,7 +50,7 @@ signals:
void jobFinished(bool status);
void cancelStatus(bool status);
void doCommand(Bytestream msg);
void doDoGetPrinterAttributes(Bytestream msg);
void doGetJobs(Bytestream msg);
void doCancelJob(Bytestream msg);
@ -119,7 +119,7 @@ private:
QString _progress;
QThread _workerThread;
ConvertWorker* _worker;
PrinterWorker* _worker;
};

View file

@ -1,4 +1,4 @@
#include "convertworker.h"
#include "printerworker.h"
#include <sailfishapp.h>
#include "papersizes.h"
#include "convertchecker.h"
@ -15,39 +15,33 @@
#define OK(call) if(!(call)) throw ConvertFailedException()
ConvertWorker::ConvertWorker(IppPrinter* parent) // : QObject((QObject*)parent) borks multithereading?!
PrinterWorker::PrinterWorker(IppPrinter* parent)
{
_printer = parent;
}
void ConvertWorker::command(Bytestream msg)
void PrinterWorker::getPrinterAttributes(Bytestream msg)
{
CurlRequester cr(_printer->httpUrl());
cr.setFinishedCallback(_printer, &IppPrinter::getPrinterAttributesFinished);
qDebug() << "command...";
cr.write((char*)msg.raw(), msg.size());
}
// TODO: de-duplicate
void ConvertWorker::getJobs(Bytestream msg)
void PrinterWorker::getJobs(Bytestream msg)
{
CurlRequester cr(_printer->httpUrl());
cr.setFinishedCallback(_printer, &IppPrinter::getJobsRequestFinished);
cr.write((char*)msg.raw(), msg.size());
}
void ConvertWorker::cancelJob(Bytestream msg)
void PrinterWorker::cancelJob(Bytestream msg)
{
CurlRequester cr(_printer->httpUrl());
cr.setFinishedCallback(_printer, &IppPrinter::cancelJobFinished);
cr.write((char*)msg.raw(), msg.size());
}
void ConvertWorker::justUpload(QString filename, Bytestream header)
void PrinterWorker::justUpload(QString filename, Bytestream header)
{
try {
emit busyMessage(tr("Printing"));
@ -69,7 +63,7 @@ catch(const ConvertFailedException& e)
}
}
void ConvertWorker::convertPdf(QString filename, Bytestream header,
void PrinterWorker::convertPdf(QString filename, Bytestream header,
QString targetFormat, quint32 Colors, quint32 Quality, QString PaperSize,
quint32 HwResX, quint32 HwResY, bool TwoSided, bool Tumble,
quint32 PageRangeLow, quint32 PageRangeHigh, bool BackHFlip, bool BackVFlip)
@ -147,7 +141,7 @@ catch(const ConvertFailedException& e)
}
}
void ConvertWorker::convertImage(QString filename, Bytestream header,
void PrinterWorker::convertImage(QString filename, Bytestream header,
QString targetFormat, quint32 Colors, quint32 Quality, QString PaperSize,
quint32 HwResX, quint32 HwResY, QMargins margins)
{
@ -289,9 +283,8 @@ try {
outBts << (urf ? make_urf_file_hdr(1) : make_pwg_file_hdr());
bmp_to_pwg(inBts, outBts, urf, 1, Colors, Quality, HwResX, HwResY, Width, Height, false, false, PaperSize.toStdString(), false, false);
}
emit busyMessage(tr("Printing"));
}
CurlRequester cr(_printer->httpUrl());
cr.setFinishedCallback(_printer, &IppPrinter::printRequestFinished);
@ -309,7 +302,7 @@ catch(const ConvertFailedException& e)
}
}
void ConvertWorker::convertOfficeDocument(QString filename, Bytestream header,
void PrinterWorker::convertOfficeDocument(QString filename, Bytestream header,
QString targetFormat, quint32 Colors, quint32 Quality, QString PaperSize,
quint32 HwResX, quint32 HwResY, bool TwoSided, bool Tumble,
quint32 PageRangeLow, quint32 PageRangeHigh, bool BackHFlip, bool BackVFlip)
@ -400,7 +393,7 @@ catch(const ConvertFailedException& e)
}
}
void ConvertWorker::convertPlaintext(QString filename, Bytestream header,
void PrinterWorker::convertPlaintext(QString filename, Bytestream header,
QString targetFormat, quint32 Colors, quint32 Quality, QString PaperSize,
quint32 HwResX, quint32 HwResY, bool TwoSided, bool Tumble,
bool BackHFlip, bool BackVFlip)
@ -553,30 +546,3 @@ catch(const ConvertFailedException& e)
emit failed(e.what() == QString("") ? tr("Conversion error") : e.what());
}
}
QString ConvertWorker::getPopplerShortPaperSize(QString PaperSize)
{
QString ShortPaperSize;
if(PaperSize == "iso_a4_210x297mm")
{
ShortPaperSize = "A4";
}
else if (PaperSize == "iso_a3_297x420mm")
{
ShortPaperSize = "A3";
}
else if (PaperSize == "na_letter_8.5x11in")
{
ShortPaperSize = "letter";
}
else if (PaperSize == "na_legal_8.5x14in")
{
ShortPaperSize = "legal";
}
else
{
qDebug() << "Unsupported PDF paper size" << PaperSize;
throw ConvertFailedException(tr("Unsupported PDF paper size"));
}
return ShortPaperSize;
}

View file

@ -1,5 +1,5 @@
#ifndef CONVERTWORKER_H
#define CONVERTWORKER_H
#ifndef PRINTERWORKER_H
#define PRINTERWORKER_H
#include <QObject>
#include <QtNetwork>
#include "curlrequester.h"
@ -20,18 +20,18 @@ public:
}
};
class ConvertWorker : public QObject
class PrinterWorker : public QObject
{
Q_OBJECT
public:
ConvertWorker(IppPrinter* parent);
PrinterWorker(IppPrinter* parent);
private:
ConvertWorker();
PrinterWorker();
public slots:
void command(Bytestream msg);
void getPrinterAttributes(Bytestream msg);
void getJobs(Bytestream msg);
void cancelJob(Bytestream msg);
@ -65,7 +65,6 @@ private:
IppPrinter* _printer;
QString getPopplerShortPaperSize(QString PaperSize);
};
#endif // CONVERTWORKER_H
#endif // PRINTERWORKER_H

View file

@ -157,53 +157,6 @@
<translation>In die Zwischenablage kopiert</translation>
</message>
</context>
<context>
<name>ConvertWorker</name>
<message>
<source>Conversion error</source>
<translation>Konvertierungsfehler</translation>
</message>
<message>
<source>Failed to load image</source>
<translation>Bild konnte nicht geladen werden</translation>
</message>
<message>
<source>Unsupported PDF paper size</source>
<translation>Nicht unterstützte PDF-Papierformat</translation>
</message>
<message>
<source>Unsupported paper size</source>
<translation>Nicht unterstütztes Papierformat</translation>
</message>
<message>
<source>Unsupported resolution (dpi)</source>
<translation>Nicht unterstützte Auflösung (dpi)</translation>
</message>
<message>
<source>Unsupported target format</source>
<translation>Nicht unterstützes Zielformat</translation>
</message>
<message>
<source>Failed to get info about PDF file</source>
<translation>Informationen über die PDF-Datei können nicht abgerufen werden</translation>
</message>
<message>
<source>Failed to open file</source>
<translation>Öffnen der Datei fehlgeschlagen</translation>
</message>
<message>
<source>Printing</source>
<translation>Es wird gedruckt</translation>
</message>
<message>
<source>Conversion failed</source>
<translation>Konvertierung fehlgeschlagen</translation>
</message>
<message>
<source>Upload error</source>
<translation>Übertragungsfehler</translation>
</message>
</context>
<context>
<name>CoverPage</name>
<message>
@ -513,6 +466,53 @@ auf diesem Drucker</translation>
<translation>Als Standarteinstellung speichern</translation>
</message>
</context>
<context>
<name>PrinterWorker</name>
<message>
<source>Conversion error</source>
<translation>Konvertierungsfehler</translation>
</message>
<message>
<source>Failed to load image</source>
<translation>Bild konnte nicht geladen werden</translation>
</message>
<message>
<source>Unsupported PDF paper size</source>
<translation>Nicht unterstützte PDF-Papierformat</translation>
</message>
<message>
<source>Unsupported paper size</source>
<translation>Nicht unterstütztes Papierformat</translation>
</message>
<message>
<source>Unsupported resolution (dpi)</source>
<translation>Nicht unterstützte Auflösung (dpi)</translation>
</message>
<message>
<source>Unsupported target format</source>
<translation>Nicht unterstützes Zielformat</translation>
</message>
<message>
<source>Failed to get info about PDF file</source>
<translation>Informationen über die PDF-Datei können nicht abgerufen werden</translation>
</message>
<message>
<source>Failed to open file</source>
<translation>Öffnen der Datei fehlgeschlagen</translation>
</message>
<message>
<source>Printing</source>
<translation>Es wird gedruckt</translation>
</message>
<message>
<source>Conversion failed</source>
<translation>Konvertierung fehlgeschlagen</translation>
</message>
<message>
<source>Upload error</source>
<translation>Übertragungsfehler</translation>
</message>
</context>
<context>
<name>RangeSetting</name>
<message>

View file

@ -157,53 +157,6 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ConvertWorker</name>
<message>
<source>Conversion error</source>
<translation>Error de conversión</translation>
</message>
<message>
<source>Failed to load image</source>
<translation>Error al cargar imagen</translation>
</message>
<message>
<source>Unsupported PDF paper size</source>
<translation>Tamaño de papel en PDF no soportado</translation>
</message>
<message>
<source>Unsupported paper size</source>
<translation>Tamaño de papel no soportado</translation>
</message>
<message>
<source>Unsupported resolution (dpi)</source>
<translation>Resolución (ppp) no soportada</translation>
</message>
<message>
<source>Unsupported target format</source>
<translation>Formato de destino no soportado</translation>
</message>
<message>
<source>Failed to get info about PDF file</source>
<translation>Error al obtener info de archivo PDF</translation>
</message>
<message>
<source>Failed to open file</source>
<translation>Error al abrir archivo</translation>
</message>
<message>
<source>Printing</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Conversion failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Upload error</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CoverPage</name>
<message>
@ -512,6 +465,53 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>PrinterWorker</name>
<message>
<source>Conversion error</source>
<translation>Error de conversión</translation>
</message>
<message>
<source>Failed to load image</source>
<translation>Error al cargar imagen</translation>
</message>
<message>
<source>Unsupported PDF paper size</source>
<translation>Tamaño de papel en PDF no soportado</translation>
</message>
<message>
<source>Unsupported paper size</source>
<translation>Tamaño de papel no soportado</translation>
</message>
<message>
<source>Unsupported resolution (dpi)</source>
<translation>Resolución (ppp) no soportada</translation>
</message>
<message>
<source>Unsupported target format</source>
<translation>Formato de destino no soportado</translation>
</message>
<message>
<source>Failed to get info about PDF file</source>
<translation>Error al obtener info de archivo PDF</translation>
</message>
<message>
<source>Failed to open file</source>
<translation>Error al abrir archivo</translation>
</message>
<message>
<source>Printing</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Conversion failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Upload error</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>RangeSetting</name>
<message>

View file

@ -157,53 +157,6 @@
<translation>Copié dans le presse-papier</translation>
</message>
</context>
<context>
<name>ConvertWorker</name>
<message>
<source>Conversion error</source>
<translation>Erreur de conversion</translation>
</message>
<message>
<source>Failed to load image</source>
<translation>Chargement impossible de l&apos;image</translation>
</message>
<message>
<source>Unsupported PDF paper size</source>
<translation>Taille de papier PDF non prise en charge</translation>
</message>
<message>
<source>Unsupported paper size</source>
<translation>Taille de papier non prise en charge</translation>
</message>
<message>
<source>Unsupported resolution (dpi)</source>
<translation>Résolution (dpi) non prise en charge</translation>
</message>
<message>
<source>Unsupported target format</source>
<translation>Format cible non pris en charge</translation>
</message>
<message>
<source>Failed to get info about PDF file</source>
<translation>Échec de l&apos;obtention d&apos;informations du fichier PDF</translation>
</message>
<message>
<source>Failed to open file</source>
<translation>Échec de l&apos;ouverture du fichier</translation>
</message>
<message>
<source>Printing</source>
<translation>Impression en cours</translation>
</message>
<message>
<source>Conversion failed</source>
<translation>Échec de la conversion</translation>
</message>
<message>
<source>Upload error</source>
<translation>Erreur de chargement</translation>
</message>
</context>
<context>
<name>CoverPage</name>
<message>
@ -513,6 +466,53 @@ sur cette imprimante</translation>
<translation>Sauvegarder paramètres par défaut</translation>
</message>
</context>
<context>
<name>PrinterWorker</name>
<message>
<source>Conversion error</source>
<translation>Erreur de conversion</translation>
</message>
<message>
<source>Failed to load image</source>
<translation>Chargement impossible de l&apos;image</translation>
</message>
<message>
<source>Unsupported PDF paper size</source>
<translation>Taille de papier PDF non prise en charge</translation>
</message>
<message>
<source>Unsupported paper size</source>
<translation>Taille de papier non prise en charge</translation>
</message>
<message>
<source>Unsupported resolution (dpi)</source>
<translation>Résolution (dpi) non prise en charge</translation>
</message>
<message>
<source>Unsupported target format</source>
<translation>Format cible non pris en charge</translation>
</message>
<message>
<source>Failed to get info about PDF file</source>
<translation>Échec de l&apos;obtention d&apos;informations du fichier PDF</translation>
</message>
<message>
<source>Failed to open file</source>
<translation>Échec de l&apos;ouverture du fichier</translation>
</message>
<message>
<source>Printing</source>
<translation>Impression en cours</translation>
</message>
<message>
<source>Conversion failed</source>
<translation>Échec de la conversion</translation>
</message>
<message>
<source>Upload error</source>
<translation>Erreur de chargement</translation>
</message>
</context>
<context>
<name>RangeSetting</name>
<message>

View file

@ -157,53 +157,6 @@
<translation>Gekopieerd naar het klembord</translation>
</message>
</context>
<context>
<name>ConvertWorker</name>
<message>
<source>Conversion error</source>
<translation>Conversiefout</translation>
</message>
<message>
<source>Failed to load image</source>
<translation>Afbeelding laden mislukt</translation>
</message>
<message>
<source>Unsupported PDF paper size</source>
<translation>Niet-ondersteund PDF-papierformaat</translation>
</message>
<message>
<source>Unsupported paper size</source>
<translation>Niet-ondersteund papierformaat</translation>
</message>
<message>
<source>Unsupported resolution (dpi)</source>
<translation>Niet-ondersteunde resolutie (dpi)</translation>
</message>
<message>
<source>Unsupported target format</source>
<translation>Niet-ondersteund doelformaat</translation>
</message>
<message>
<source>Failed to get info about PDF file</source>
<translation>Informatie over het PDF-bestand ophalen mislukt</translation>
</message>
<message>
<source>Failed to open file</source>
<translation>Bestand openen mislukt</translation>
</message>
<message>
<source>Printing</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Conversion failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Upload error</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CoverPage</name>
<message>
@ -512,6 +465,53 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>PrinterWorker</name>
<message>
<source>Conversion error</source>
<translation>Conversiefout</translation>
</message>
<message>
<source>Failed to load image</source>
<translation>Afbeelding laden mislukt</translation>
</message>
<message>
<source>Unsupported PDF paper size</source>
<translation>Niet-ondersteund PDF-papierformaat</translation>
</message>
<message>
<source>Unsupported paper size</source>
<translation>Niet-ondersteund papierformaat</translation>
</message>
<message>
<source>Unsupported resolution (dpi)</source>
<translation>Niet-ondersteunde resolutie (dpi)</translation>
</message>
<message>
<source>Unsupported target format</source>
<translation>Niet-ondersteund doelformaat</translation>
</message>
<message>
<source>Failed to get info about PDF file</source>
<translation>Informatie over het PDF-bestand ophalen mislukt</translation>
</message>
<message>
<source>Failed to open file</source>
<translation>Bestand openen mislukt</translation>
</message>
<message>
<source>Printing</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Conversion failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Upload error</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>RangeSetting</name>
<message>

View file

@ -157,53 +157,6 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ConvertWorker</name>
<message>
<source>Failed to get info about PDF file</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unsupported target format</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unsupported resolution (dpi)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unsupported PDF paper size</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Conversion error</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unsupported paper size</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load image</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to open file</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Printing</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Conversion failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Upload error</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CoverPage</name>
<message>
@ -512,6 +465,53 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>PrinterWorker</name>
<message>
<source>Failed to get info about PDF file</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unsupported target format</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unsupported resolution (dpi)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unsupported PDF paper size</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Conversion error</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unsupported paper size</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load image</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to open file</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Printing</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Conversion failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Upload error</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>RangeSetting</name>
<message>

View file

@ -157,53 +157,6 @@
<translation></translation>
</message>
</context>
<context>
<name>ConvertWorker</name>
<message>
<source>Conversion error</source>
<translation></translation>
</message>
<message>
<source>Failed to load image</source>
<translation></translation>
</message>
<message>
<source>Unsupported PDF paper size</source>
<translation>PDF纸张大小不受支持</translation>
</message>
<message>
<source>Unsupported paper size</source>
<translation></translation>
</message>
<message>
<source>Unsupported resolution (dpi)</source>
<translation>dpi</translation>
</message>
<message>
<source>Unsupported target format</source>
<translation></translation>
</message>
<message>
<source>Failed to get info about PDF file</source>
<translation>PDF文件信息错误</translation>
</message>
<message>
<source>Failed to open file</source>
<translation></translation>
</message>
<message>
<source>Printing</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Conversion failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Upload error</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CoverPage</name>
<message>
@ -512,6 +465,53 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>PrinterWorker</name>
<message>
<source>Conversion error</source>
<translation></translation>
</message>
<message>
<source>Failed to load image</source>
<translation></translation>
</message>
<message>
<source>Unsupported PDF paper size</source>
<translation>PDF纸张大小不受支持</translation>
</message>
<message>
<source>Unsupported paper size</source>
<translation></translation>
</message>
<message>
<source>Unsupported resolution (dpi)</source>
<translation>dpi</translation>
</message>
<message>
<source>Unsupported target format</source>
<translation></translation>
</message>
<message>
<source>Failed to get info about PDF file</source>
<translation>PDF文件信息错误</translation>
</message>
<message>
<source>Failed to open file</source>
<translation></translation>
</message>
<message>
<source>Printing</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Conversion failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Upload error</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>RangeSetting</name>
<message>

View file

@ -157,53 +157,6 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ConvertWorker</name>
<message>
<source>Conversion error</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load image</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unsupported PDF paper size</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unsupported paper size</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unsupported resolution (dpi)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unsupported target format</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to get info about PDF file</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to open file</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Printing</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Conversion failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Upload error</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CoverPage</name>
<message>
@ -512,6 +465,53 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>PrinterWorker</name>
<message>
<source>Conversion error</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to load image</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unsupported PDF paper size</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unsupported paper size</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unsupported resolution (dpi)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unsupported target format</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to get info about PDF file</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to open file</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Printing</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Conversion failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Upload error</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>RangeSetting</name>
<message>