mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
refs #522, mutex for mutable members (thread safe)
* copy/assignment/lock for mutable members * also removed redundant in status message (slack discussion MS/KB)
This commit is contained in:
@@ -25,7 +25,7 @@ namespace BlackMisc
|
||||
{
|
||||
public:
|
||||
//! Default constructor.
|
||||
CPixmap();
|
||||
CPixmap() = default;
|
||||
|
||||
//! Constructor.
|
||||
CPixmap(const QPixmap &pixmap);
|
||||
@@ -57,11 +57,10 @@ namespace BlackMisc
|
||||
//! Init the byte array with data
|
||||
void fillByteArray();
|
||||
|
||||
QByteArray m_array; //!< data of pixmap
|
||||
mutable QPixmap m_pixmap; //!< cached pixmap, mutable because of lazy initialization
|
||||
mutable bool m_hasCachedPixmap = false; //!< pixmap? Mutable because of lazy initialization
|
||||
mutable QReadWriteLock m_lock; //!< lock (because of mutable members)
|
||||
|
||||
QByteArray m_array; //!< data of pixmap
|
||||
};
|
||||
} // namespace
|
||||
|
||||
|
||||
Reference in New Issue
Block a user