Spring cleaning
This commit is contained in:
parent
3be30e58e6
commit
71b2986a37
8 changed files with 9 additions and 29 deletions
|
@ -4,7 +4,6 @@
|
|||
#include "convertchecker.h"
|
||||
#include <QProcess>
|
||||
#include <QtDebug>
|
||||
#include "mimer.h"
|
||||
|
||||
ConvertChecker::ConvertChecker() : poppler("libpoppler-glib.so.8")
|
||||
{
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#include <QUrl>
|
||||
#include <QThread>
|
||||
#include <QSemaphore>
|
||||
#include <QMetaMethod>
|
||||
#include <QtConcurrent/QtConcurrent>
|
||||
#include <curl/curl.h>
|
||||
#include <bytestream.h>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include "imageitem.h"
|
||||
#include "svgprovider.h"
|
||||
|
||||
ImageItem::ImageItem()
|
||||
{
|
||||
|
@ -8,7 +7,6 @@ ImageItem::ImageItem()
|
|||
|
||||
void ImageItem::paint(QPainter *painter)
|
||||
{
|
||||
|
||||
QImage scaled = _image.scaledToHeight(boundingRect().height(), Qt::SmoothTransformation);
|
||||
painter->drawImage(QPoint {0, 0}, scaled);
|
||||
}
|
||||
|
@ -25,7 +23,6 @@ void ImageItem::setImage(const QImage &image)
|
|||
update();
|
||||
}
|
||||
|
||||
|
||||
bool ImageItem::isValid() const
|
||||
{
|
||||
return !_image.isNull();
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
#include "bytestream.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonArray>
|
||||
#include <QDate>
|
||||
#include <QTime>
|
||||
#include <QDebug>
|
||||
#include <QUrl>
|
||||
#include <QtNetwork>
|
||||
#include <QNetworkReply>
|
||||
#include <QIODevice>
|
||||
|
||||
class IppMsg
|
||||
{
|
||||
|
|
|
@ -329,16 +329,6 @@ void IppPrinter::getImageFinished(CURLcode res, Bytestream data)
|
|||
}
|
||||
}
|
||||
|
||||
void IppPrinter::ignoreSslErrors(QNetworkReply *reply, const QList<QSslError> &errors)
|
||||
{
|
||||
bool ignore = Settings::instance()->ignoreSslErrors();
|
||||
qDebug() << reply->request().url() << "SSL handshake failed" << errors << ignore;
|
||||
if(ignore)
|
||||
{
|
||||
reply->ignoreSslErrors(errors);
|
||||
}
|
||||
}
|
||||
|
||||
void IppPrinter::convertFailed(QString message)
|
||||
{
|
||||
_jobAttrs = QJsonObject();
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#ifndef IPPPRINTER_H
|
||||
#define IPPPRINTER_H
|
||||
|
||||
#include <QImage>
|
||||
#include "ippmsg.h"
|
||||
#include "printerworker.h"
|
||||
#include "curlrequester.h"
|
||||
#include <mlite5/MGConfItem>
|
||||
#include <QImage>
|
||||
|
||||
|
||||
class IppPrinter : public QObject
|
||||
{
|
||||
|
@ -101,8 +101,6 @@ public slots:
|
|||
void getStringsFinished(CURLcode res, Bytestream data);
|
||||
void getImageFinished(CURLcode res, Bytestream data);
|
||||
|
||||
static void ignoreSslErrors(QNetworkReply *reply, const QList<QSslError> &errors);
|
||||
|
||||
void convertFailed(QString message);
|
||||
|
||||
private:
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include "printerworker.h"
|
||||
#include <sailfishapp.h>
|
||||
#include "papersizes.h"
|
||||
#include "convertchecker.h"
|
||||
#include "mimer.h"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef PRINTERWORKER_H
|
||||
#define PRINTERWORKER_H
|
||||
#include <QObject>
|
||||
#include <QtNetwork>
|
||||
#include "curlrequester.h"
|
||||
|
||||
class IppPrinter;
|
||||
|
@ -9,14 +8,14 @@ class IppPrinter;
|
|||
class ConvertFailedException: public std::exception
|
||||
{
|
||||
private:
|
||||
QString _msg;
|
||||
std::string _msg;
|
||||
public:
|
||||
ConvertFailedException(QString msg = "") : _msg(msg = msg)
|
||||
ConvertFailedException(QString msg = "") : _msg(msg.toStdString())
|
||||
{
|
||||
}
|
||||
virtual const char* what() const throw()
|
||||
{
|
||||
return _msg.toStdString().c_str();
|
||||
return _msg.c_str();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -58,7 +57,6 @@ public slots:
|
|||
quint32 HwResX, quint32 HwResY, bool TwoSided, bool Tumble, bool BackHFlip, bool BackVFlip);
|
||||
|
||||
signals:
|
||||
void done(QNetworkRequest request, QTemporaryFile* data);
|
||||
void progress(qint64 done, qint64 pages);
|
||||
void busyMessage(QString msg);
|
||||
void failed(QString message);
|
||||
|
|
Loading…
Reference in a new issue