Remove secure/taint indicator and related functionality

This commit is contained in:
Anton Thomasson 2021-11-15 22:00:30 +01:00
parent e918b8784a
commit 76e579532a
3 changed files with 5 additions and 34 deletions

View file

@ -265,22 +265,11 @@ Page {
+ (Utils.existsAndNotEmpty("printer-location", printer) ? " • "+printer.attrs["printer-location"].value : "")
}
Row {
Icon {
visible: printer.isIpps && !printer.tainted
color: canPrint || selectedFile == "" ? Theme.highlightColor : Theme.secondaryColor
height: Theme.fontSizeTiny
width: Theme.fontSizeTiny
anchors.verticalCenter: parent.verticalCenter
source: "image://theme/icon-m-browser-permissions"
}
Label {
id: uri_label
color: canPrint || selectedFile == "" ? Theme.highlightColor : Theme.secondaryColor
font.pixelSize: Theme.fontSizeTiny
text: printer.url
}
Label {
id: uri_label
color: canPrint || selectedFile == "" ? Theme.highlightColor : Theme.secondaryColor
font.pixelSize: Theme.fontSizeTiny
text: printer.url
}
Row {

View file

@ -33,7 +33,6 @@ IppPrinter::IppPrinter()
qRegisterMetaType<QMargins>();
_workerThread.start();
_tainted = false;
}
IppPrinter::~IppPrinter() {
@ -249,12 +248,6 @@ void IppPrinter::cancelJobFinished(CURLcode res, QByteArray data)
getJobs();
}
void IppPrinter::onSslErrors(QNetworkReply *reply, const QList<QSslError> &errors)
{
_tainted = true;
emit taintedChanged();
return ignoreSslErrors(reply, errors);
}
void IppPrinter::ignoreSslErrors(QNetworkReply *reply, const QList<QSslError> &errors)
{
@ -655,11 +648,6 @@ bool IppPrinter::cancelJob(qint32 jobId) {
return true;
}
bool IppPrinter::isIpps()
{
return _url.scheme() == "ipps";
}
bool IppPrinter::correctSuffix()
{
foreach(QJsonValue u, _attrs["printer-uri-supported"].toObject()["value"].toArray())

View file

@ -22,8 +22,6 @@ class IppPrinter : public QObject
Q_PROPERTY(QString busyMessage MEMBER _busyMessage NOTIFY busyMessageChanged)
Q_PROPERTY(QString progress MEMBER _progress NOTIFY progressChanged)
Q_PROPERTY(bool tainted MEMBER _tainted NOTIFY taintedChanged)
Q_PROPERTY(bool isIpps READ isIpps NOTIFY urlChanged)
Q_PROPERTY(bool correctSuffix READ correctSuffix NOTIFY attrsChanged)
Q_PROPERTY(QStringList suffixes READ suffixes NOTIFY attrsChanged)
@ -40,7 +38,6 @@ public:
Q_INVOKABLE bool getJobs();
Q_INVOKABLE bool cancelJob(qint32 jobId);
bool isIpps();
bool correctSuffix();
QStringList suffixes();
@ -80,7 +77,6 @@ signals:
void additionalDocumentFormatsChanged();
void busyMessageChanged();
void progressChanged();
void taintedChanged();
public slots:
void print(QJsonObject attrs, QString file);
@ -93,7 +89,6 @@ public slots:
void getJobsRequestFinished(CURLcode res, QByteArray data);
void cancelJobFinished(CURLcode res, QByteArray data);
void onSslErrors(QNetworkReply *reply, const QList<QSslError> &errors);
static void ignoreSslErrors(QNetworkReply *reply, const QList<QSslError> &errors);
void convertFailed(QString message);
@ -126,7 +121,6 @@ private:
QThread _workerThread;
ConvertWorker* _worker;
bool _tainted;
};
#endif // IPPPRINTER_H