author | zecke <zecke> | 2004-03-23 00:36:37 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-23 00:36:37 (UTC) |
commit | d7581f7cd0ba6adb43ee5c4bdeae696c0a16ae3b (patch) (unidiff) | |
tree | c65e9015323fb7fc4fec45038aa0f0a19b43252f /noncore/graphics/opie-eye/lib | |
parent | 428b687982966dc2efabaf6dbcc55ad0ea30aa10 (diff) | |
download | opie-d7581f7cd0ba6adb43ee5c4bdeae696c0a16ae3b.zip opie-d7581f7cd0ba6adb43ee5c4bdeae696c0a16ae3b.tar.gz opie-d7581f7cd0ba6adb43ee5c4bdeae696c0a16ae3b.tar.bz2 |
Fix communication. It seems like QPixmap and QDataStream
do not mix well if the QPixmap is not valid..
invalidate image requests if we change the dir
Diffstat (limited to 'noncore/graphics/opie-eye/lib') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/lib/slavemaster.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/noncore/graphics/opie-eye/lib/slavemaster.cpp b/noncore/graphics/opie-eye/lib/slavemaster.cpp index 18dc883..4e28535 100644 --- a/noncore/graphics/opie-eye/lib/slavemaster.cpp +++ b/noncore/graphics/opie-eye/lib/slavemaster.cpp | |||
@@ -1,46 +1,51 @@ | |||
1 | #include "slavemaster.h" | 1 | #include "slavemaster.h" |
2 | 2 | ||
3 | #include <qpe/qpeapplication.h> | 3 | #include <qpe/qpeapplication.h> |
4 | #include <qpe/qcopenvelope_qws.h> | 4 | #include <qpe/qcopenvelope_qws.h> |
5 | 5 | ||
6 | #include <qcopchannel_qws.h> | 6 | #include <qcopchannel_qws.h> |
7 | #include <qtimer.h> | 7 | #include <qtimer.h> |
8 | 8 | ||
9 | QDataStream & operator << (QDataStream & str, bool b) | 9 | QDataStream & operator << (QDataStream & str, bool b) |
10 | { | 10 | { |
11 | str << Q_INT8(b); | 11 | str << Q_INT8(b); |
12 | return str; | 12 | return str; |
13 | } | 13 | } |
14 | QDataStream & operator >> (QDataStream & str, bool & b) | 14 | QDataStream & operator >> (QDataStream & str, bool & b) |
15 | { | 15 | { |
16 | Q_INT8 l; | 16 | Q_INT8 l; |
17 | str >> l; | 17 | str >> l; |
18 | b = bool(l); | 18 | b = bool(l); |
19 | return str; | 19 | return str; |
20 | } | 20 | } |
21 | |||
22 | /* | ||
23 | * ! We don't put a Pixmap in!!!! | ||
24 | */ | ||
21 | QDataStream &operator<<( QDataStream& s, const PixmapInfo& inf) { | 25 | QDataStream &operator<<( QDataStream& s, const PixmapInfo& inf) { |
22 | return s << inf.file << inf.pixmap << inf.width << inf.height; | 26 | qWarning( "Image request is %s %d %d", inf.file.latin1(), inf.width, inf.height ); |
27 | return s << inf.file << inf.width << inf.height; | ||
23 | } | 28 | } |
24 | QDataStream &operator>>( QDataStream& s, PixmapInfo& inf ) { | 29 | QDataStream &operator>>( QDataStream& s, PixmapInfo& inf ) { |
25 | s >> inf.file >> inf.pixmap >> inf.width >> inf.height; | 30 | s >> inf.file >> inf.pixmap >> inf.width >> inf.height; |
26 | return s; | 31 | return s; |
27 | } | 32 | } |
28 | QDataStream &operator<<( QDataStream& s, const ImageInfo& i) { | 33 | QDataStream &operator<<( QDataStream& s, const ImageInfo& i) { |
29 | return s << i.kind << i.file << i.info; | 34 | return s << i.kind << i.file << i.info; |
30 | } | 35 | } |
31 | QDataStream &operator>>( QDataStream& s, ImageInfo& i ) { | 36 | QDataStream &operator>>( QDataStream& s, ImageInfo& i ) { |
32 | s >> i.kind >> i.file >> i.info; | 37 | s >> i.kind >> i.file >> i.info; |
33 | return s; | 38 | return s; |
34 | } | 39 | } |
35 | 40 | ||
36 | 41 | ||
37 | 42 | ||
38 | SlaveMaster* SlaveMaster::m_master = 0; | 43 | SlaveMaster* SlaveMaster::m_master = 0; |
39 | 44 | ||
40 | SlaveMaster::SlaveMaster() | 45 | SlaveMaster::SlaveMaster() |
41 | : m_started( false ) | 46 | : m_started( false ) |
42 | { | 47 | { |
43 | QCopChannel *chan= new QCopChannel( "QPE/opie-eye",this ); | 48 | QCopChannel *chan= new QCopChannel( "QPE/opie-eye",this ); |
44 | connect(chan, SIGNAL(received(const QCString&,const QByteArray&)), | 49 | connect(chan, SIGNAL(received(const QCString&,const QByteArray&)), |
45 | this, SLOT(recieve(const QCString&,const QByteArray&)) ); | 50 | this, SLOT(recieve(const QCString&,const QByteArray&)) ); |
46 | } | 51 | } |