diff options
Diffstat (limited to 'saltoqd/toqmanageradaptor.cpp')
-rw-r--r-- | saltoqd/toqmanageradaptor.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/saltoqd/toqmanageradaptor.cpp b/saltoqd/toqmanageradaptor.cpp index 5ec11c2..14cbc14 100644 --- a/saltoqd/toqmanageradaptor.cpp +++ b/saltoqd/toqmanageradaptor.cpp @@ -1,5 +1,4 @@ #include <QtCore/QFile> -#include <QtCore/QBuffer> #include <QtGui/QImage> #include "toqmanageradaptor.h" @@ -45,15 +44,12 @@ void ToqManagerAdaptor::PutImage(const QString &localFile, const QString &remote _conn.send(reply); return; } - MSOLImageIOHandler msolio; - QBuffer msolImg; - msolImg.open(QBuffer::WriteOnly); - msolio.setDevice(&msolImg); - if (!msolio.write(image)) { + QByteArray msol = convertImageToMsol(image); + if (msol.isEmpty()) { QDBusMessage reply = msg.createErrorReply("com.javispedro.saltoq.InvalidImage", "Cannot convert this image"); _conn.send(reply); return; } - _fms->updateFile(remoteFile, msolImg.data()); + _fms->updateFile(remoteFile, msol); } |