refs #469, misc:

* Formatting
* added begin/endStructure for pixmap
This commit is contained in:
Klaus Basan
2015-09-28 18:22:56 +02:00
committed by Mathew Sutcliffe
parent 2ba061bbc0
commit e033cfacfd
2 changed files with 7 additions and 4 deletions

View File

@@ -13,16 +13,19 @@
const QDBusArgument &operator>>(const QDBusArgument &argument, QPixmap &pixmap)
{
QByteArray ba;
argument.beginStructure();
argument >> ba;
BlackMisc::pngByteArrayToPixmapRef(ba, pixmap);
argument.endStructure();
return argument;
}
QDBusArgument &operator<<(QDBusArgument &argument, const QPixmap &pixmap)
{
QByteArray ba;
BlackMisc::pixmapToPngByteArray(pixmap, ba);
argument.beginStructure();
argument << ba;
argument.endStructure();
return argument;
}

View File

@@ -13,6 +13,7 @@
//! \file
#include "blackmiscexport.h"
#include "blackmisc/network/entityflags.h"
#include "worker.h"
#include <QReadWriteLock>
#include <QDateTime>
@@ -62,9 +63,8 @@ namespace BlackMisc
CThreadedReader(QObject *owner, const QString &name);
QTimer *m_updateTimer = nullptr; //!< update timer
bool m_shutdown = false; //!< in shutdown process
mutable QReadWriteLock m_lock {QReadWriteLock::Recursive}; //!< lock
bool m_shutdown = false; //!< in shutdown process
mutable QReadWriteLock m_lock {QReadWriteLock::Recursive}; //!< lock which can be used from the derived classes
//! Make sure everthing runs correctly in own thread
void threadAssertCheck() const;