From c932d54da1b075d76d378711e21e009aa3a726dc Mon Sep 17 00:00:00 2001 From: Anton Thomasson Date: Sun, 21 Mar 2021 17:10:40 +0100 Subject: [PATCH] Remove obsolete option --- qml/harbour-seaprint.qml | 14 -------------- qml/pages/PrinterPage.qml | 1 - qml/pages/SettingsPage.qml | 9 --------- src/ippprinter.cpp | 16 ++++++---------- src/ippprinter.h | 2 +- translations/harbour-seaprint-de.ts | 8 -------- translations/harbour-seaprint-es.ts | 8 -------- translations/harbour-seaprint-fr.ts | 8 -------- translations/harbour-seaprint-nl.ts | 8 -------- translations/harbour-seaprint-pl.ts | 8 -------- translations/harbour-seaprint-zh_CN.ts | 8 -------- translations/harbour-seaprint.ts | 8 -------- 12 files changed, 7 insertions(+), 91 deletions(-) diff --git a/qml/harbour-seaprint.qml b/qml/harbour-seaprint.qml index 6104d99..b9033d0 100644 --- a/qml/harbour-seaprint.qml +++ b/qml/harbour-seaprint.qml @@ -143,20 +143,6 @@ ApplicationWindow defaultValue: true } - ConfigurationValue - { - id: alwaysConvertSetting - key: "/apps/harbour-seaprint/settings/always-convert" - defaultValue: false - } - - ConfigurationValue - { - id: forceIncluDeDocumentFormatSetting - key: "/apps/harbour-seaprint/settings/force-include-document-format" - defaultValue: false - } - ConfigurationValue { id: alwaysUseMediaColSetting diff --git a/qml/pages/PrinterPage.qml b/qml/pages/PrinterPage.qml index f25ca5d..743ddd5 100644 --- a/qml/pages/PrinterPage.qml +++ b/qml/pages/PrinterPage.qml @@ -64,7 +64,6 @@ Page { pageStack.replace(Qt.resolvedUrl("BusyPage.qml"),{printer:printer}, PageStackAction.Immediate) printer.print(jobParams, page.selectedFile, - alwaysConvertSetting.value, alwaysUseMediaColSetting.value) } } diff --git a/qml/pages/SettingsPage.qml b/qml/pages/SettingsPage.qml index 3c5490f..b635c5b 100644 --- a/qml/pages/SettingsPage.qml +++ b/qml/pages/SettingsPage.qml @@ -44,15 +44,6 @@ Page { } } - TextSwitch { - text: qsTr("Always convert to raster format") - description: qsTr("Force conversion to PWG/URF raster format. This is mainly intended for testing.") - checked: alwaysConvertSetting.value - onCheckedChanged: { - alwaysConvertSetting.value = checked - } - } - TextSwitch { text: qsTr("Always use media-col") description: qsTr("Use the attribute media-col instead of media for paper sizes. I.e. do parametric selection of print media rather than by name. If you use zero print margins, parametric selection will be used regardless of this setting.") diff --git a/src/ippprinter.cpp b/src/ippprinter.cpp index bad42be..8ef3a17 100644 --- a/src/ippprinter.cpp +++ b/src/ippprinter.cpp @@ -302,13 +302,9 @@ QString firstMatch(QJsonArray supported, QStringList wanted) return ""; } -QString targetFormatIfAuto(QString documentFormat, QString mimeType, QJsonArray supportedMimeTypes, bool forceRaster) +QString targetFormatIfAuto(QString documentFormat, QString mimeType, QJsonArray supportedMimeTypes) { - if(forceRaster) - { - return firstMatch(supportedMimeTypes, {Mimer::PWG, Mimer::URF}); - } - else if(documentFormat == Mimer::OctetStream) + if(documentFormat == Mimer::OctetStream) { if(mimeType == Mimer::PDF) { @@ -338,9 +334,9 @@ QString targetFormatIfAuto(QString documentFormat, QString mimeType, QJsonArray return documentFormat; } -void IppPrinter::print(QJsonObject attrs, QString filename, bool alwaysConvert, bool alwaysUseMediaCol) +void IppPrinter::print(QJsonObject attrs, QString filename, bool alwaysUseMediaCol) { - qDebug() << "printing" << filename << attrs << alwaysConvert; + qDebug() << "printing" << filename << attrs; _progress = ""; emit progressChanged(); @@ -402,13 +398,13 @@ void IppPrinter::print(QJsonObject attrs, QString filename, bool alwaysConvert, } QString documentFormat = getAttrOrDefault(attrs, "document-format").toString(); - qDebug() << "target format:" << documentFormat << "alwaysConvert:" << alwaysConvert; + qDebug() << "target format:" << documentFormat; // document-format goes in the op-attrs and not the job-attrs o.insert("document-format", QJsonObject {{"tag", IppMsg::MimeMediaType}, {"value", documentFormat}}); attrs.remove("document-format"); - documentFormat = targetFormatIfAuto(documentFormat, mimeType, supportedMimeTypes, alwaysConvert); + documentFormat = targetFormatIfAuto(documentFormat, mimeType, supportedMimeTypes); qDebug() << "adjusted target format:" << documentFormat; if(documentFormat == "" || documentFormat == Mimer::OctetStream) diff --git a/src/ippprinter.h b/src/ippprinter.h index 9131cf3..b0739eb 100644 --- a/src/ippprinter.h +++ b/src/ippprinter.h @@ -59,7 +59,7 @@ signals: void progressChanged(); public slots: - void print(QJsonObject attrs, QString file, bool alwaysConvert, bool alwaysUseMediaCol); + void print(QJsonObject attrs, QString file, bool alwaysUseMediaCol); void onUrlChanged(); diff --git a/translations/harbour-seaprint-de.ts b/translations/harbour-seaprint-de.ts index 57bd014..4ccf837 100644 --- a/translations/harbour-seaprint-de.ts +++ b/translations/harbour-seaprint-de.ts @@ -483,14 +483,6 @@ Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF. Einige Drucker ünterstützen mehr Formate als sie bekannt geben. Zusätliche Formate können aus anderen Attributen geschlussffolgert werden. Das ist hauptsächlich relevant für Postscript kompatible Drucker die auch PDF unterstützen. - - Always convert to raster format - Immer ins Raster Format konvertieren - - - Force conversion to PWG/URF raster format. This is mainly intended for testing. - Konvertierung in das PWG/URF Rasterformat erzwingen. Die ist hauptsächlich für Testzwecke vorgesehen. - Display the warning page about optional dependencies not being installed, if they are not installed. Warnseite über nicht installierte optionalen Abhängigkeiten anzeigen, wenn diese nicht installiert sind. diff --git a/translations/harbour-seaprint-es.ts b/translations/harbour-seaprint-es.ts index d8a1b97..60d2d0e 100644 --- a/translations/harbour-seaprint-es.ts +++ b/translations/harbour-seaprint-es.ts @@ -483,14 +483,6 @@ Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF. Algunas impresoras admiten más formatos de los que anuncian. Sin embargo, es posible deducir formatos adicionales a partir de otros atributos. Principalmente es relevante para impresoras compatibles con Postscript que también admiten PDF. - - Always convert to raster format - Convertir siempre a formato ráster - - - Force conversion to PWG/URF raster format. This is mainly intended for testing. - Forzar conversión a formato ráster PWG/URF. Esto es para hacer pruebas principalmente. - Display the warning page about optional dependencies not being installed, if they are not installed. Mostrar página de advertencia sobre las dependencias opcionales no instaladas cuando no están instaladas. diff --git a/translations/harbour-seaprint-fr.ts b/translations/harbour-seaprint-fr.ts index 4b8416f..7ffb7ff 100644 --- a/translations/harbour-seaprint-fr.ts +++ b/translations/harbour-seaprint-fr.ts @@ -483,14 +483,6 @@ Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF. - - Always convert to raster format - - - - Force conversion to PWG/URF raster format. This is mainly intended for testing. - - Display the warning page about optional dependencies not being installed, if they are not installed. diff --git a/translations/harbour-seaprint-nl.ts b/translations/harbour-seaprint-nl.ts index d771fa5..7dabf07 100644 --- a/translations/harbour-seaprint-nl.ts +++ b/translations/harbour-seaprint-nl.ts @@ -483,14 +483,6 @@ Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF. Sommige printers ondersteunen meer formaten dan ze correct adverteren. Er kunnen echter aanvullende formaten worden afgeleid uit andere attributen. Vooral relevant voor Postscript ondersteunende printers die ook PDF ondersteunen. - - Always convert to raster format - Altijd naar rasterformaat omzetten - - - Force conversion to PWG/URF raster format. This is mainly intended for testing. - Omzetting naar PWG/URF-rasterformaat forceren. Dit is voornamelijk bedoeld om te testen. - Display the warning page about optional dependencies not being installed, if they are not installed. Waarschuwingspagina weergeven over optionele afhankelijkheden die niet worden geïnstalleerd, als ze niet zijn geïnstalleerd. diff --git a/translations/harbour-seaprint-pl.ts b/translations/harbour-seaprint-pl.ts index cdc0c84..e054b74 100644 --- a/translations/harbour-seaprint-pl.ts +++ b/translations/harbour-seaprint-pl.ts @@ -491,14 +491,6 @@ Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF. - - Always convert to raster format - - - - Force conversion to PWG/URF raster format. This is mainly intended for testing. - - Always use media-col diff --git a/translations/harbour-seaprint-zh_CN.ts b/translations/harbour-seaprint-zh_CN.ts index c2d28d6..89acdbb 100644 --- a/translations/harbour-seaprint-zh_CN.ts +++ b/translations/harbour-seaprint-zh_CN.ts @@ -483,14 +483,6 @@ Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF. 有些打印机支持的格式比他们宣传的要多。 可以从其他属性中推断出其它格式。 主要与支持PDF的Postscript—兼容打印机相关。 - - Always convert to raster format - 总是转换为光栅格式 - - - Force conversion to PWG/URF raster format. This is mainly intended for testing. - 强制转换为PWG或URF光栅格式。这主要用于测试。 - Display the warning page about optional dependencies not being installed, if they are not installed. 如果没有安装可选的依赖程序,则显示警告页面。 diff --git a/translations/harbour-seaprint.ts b/translations/harbour-seaprint.ts index 44a4275..8aeb4b3 100644 --- a/translations/harbour-seaprint.ts +++ b/translations/harbour-seaprint.ts @@ -483,14 +483,6 @@ Some printers support more formats than they advertise correctly. However, additional formats can be inferred from other attributes. Mainly relevant for Postscript-compatible printers that also support PDF. - - Always convert to raster format - - - - Force conversion to PWG/URF raster format. This is mainly intended for testing. - - Display the warning page about optional dependencies not being installed, if they are not installed.