Commit d26a4739 authored by Alexander Stippich's avatar Alexander Stippich
Browse files

use non-deprecated libksane interface

parent ae98c7e0
......@@ -43,7 +43,7 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
add_definitions(-DQT_USE_QSTRINGBUILDER)
find_package(KF5Sane)
find_package(KF5Sane ${RELEASE_SERVICE_VERSION})
if(KF5Sane_FOUND)
add_definitions(-DHAVE_KSANE=1)
......
......@@ -47,7 +47,7 @@ SaneDialog::SaneDialog(QWidget *parent)
m_ksanew = new KSaneIface::KSaneWidget(this);
addPage(m_ksanew, QString());
connect (m_ksanew, &KSaneIface::KSaneWidget::imageReady,
connect (m_ksanew, &KSaneIface::KSaneWidget::scannedImageReady,
this, &SaneDialog::imageReady);
m_openDev = QString();
......@@ -107,11 +107,9 @@ SaneDialog::~SaneDialog()
}
}
void SaneDialog::imageReady(QByteArray &data, int w, int h, int bpl, int f)
void SaneDialog::imageReady(const QImage &img)
{
/* copy the image data into img */
QImage img = m_ksanew->toQImage(data, w, h, bpl, static_cast<KSaneIface::KSaneWidget::ImageFormat> (f));
emit finalImage(img, nextId());
Q_EMIT finalImage(img, nextId());
}
int SaneDialog::nextId()
......
......@@ -53,7 +53,7 @@ Q_SIGNALS:
void finalImage(const QImage &img, int id);
protected Q_SLOTS:
void imageReady(QByteArray &, int, int, int, int);
void imageReady(const QImage &img);
private:
int nextId();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment