Diffstat (limited to 'library/qcopenvelope_qws.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | library/qcopenvelope_qws.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/qcopenvelope_qws.cpp b/library/qcopenvelope_qws.cpp index 8f58787..63efb13 100644 --- a/library/qcopenvelope_qws.cpp +++ b/library/qcopenvelope_qws.cpp | |||
@@ -47,50 +47,50 @@ | |||
47 | QCopEnvelope e(channelname, messagename); | 47 | QCopEnvelope e(channelname, messagename); |
48 | e << parameter1 << parameter2 << ...; | 48 | e << parameter1 << parameter2 << ...; |
49 | \endcode | 49 | \endcode |
50 | 50 | ||
51 | For messages without parameters, simply use: | 51 | For messages without parameters, simply use: |
52 | 52 | ||
53 | \code | 53 | \code |
54 | QCopEnvelope e(channelname, messagename); | 54 | QCopEnvelope e(channelname, messagename); |
55 | \endcode | 55 | \endcode |
56 | 56 | ||
57 | (Do not try to simplify this further as it may confuse some | 57 | (Do not try to simplify this further as it may confuse some |
58 | compilers.) | 58 | compilers.) |
59 | 59 | ||
60 | The \c{channelname} of channels within Qtopia all start with "QPE/". | 60 | The \c{channelname} of channels within Qtopia all start with "QPE/". |
61 | The \c{messagename} is a function identifier followed by a list of types | 61 | The \c{messagename} is a function identifier followed by a list of types |
62 | in parentheses. There is no whitespace in the message name. | 62 | in parentheses. There is no whitespace in the message name. |
63 | 63 | ||
64 | To receive a message, you will generally just use your application's | 64 | To receive a message, you will generally just use your application's |
65 | predefined QPE/Application/\e{appname} channel | 65 | predefined QPE/Application/\e{appname} channel |
66 | (see QPEApplication::appMessage()), but you can make another channel | 66 | (see QPEApplication::appMessage()), but you can make another channel |
67 | and connect it to a slot like this: | 67 | and connect it to a slot like this: |
68 | 68 | ||
69 | \code | 69 | \code |
70 | myChannel = new QCopChannel( "QPE/FooBar", this ); | 70 | myChannel = new QCopChannel( "QPE/FooBar", this ); |
71 | connect( myChannel, SIGNAL(received(const QCString &, const QByteArray &)), | 71 | connect( myChannel, SIGNAL(received(const QCString&,const QByteArray&)), |
72 | this, SLOT(fooBarMessage( const QCString &, const QByteArray &)) ); | 72 | this, SLOT(fooBarMessage(const QCString&,const QByteArray&)) ); |
73 | \endcode | 73 | \endcode |
74 | 74 | ||
75 | See also, the \link qcop.html list of Qtopia messages\endlink. | 75 | See also, the \link qcop.html list of Qtopia messages\endlink. |
76 | */ | 76 | */ |
77 | 77 | ||
78 | /*! | 78 | /*! |
79 | Constructs a QCopEnvelope that will write \a message to \a channel. | 79 | Constructs a QCopEnvelope that will write \a message to \a channel. |
80 | If \a message has parameters, you must then use operator<<() to | 80 | If \a message has parameters, you must then use operator<<() to |
81 | add these parameters to the envelope. | 81 | add these parameters to the envelope. |
82 | */ | 82 | */ |
83 | QCopEnvelope::QCopEnvelope( const QCString& channel, const QCString& message ) : | 83 | QCopEnvelope::QCopEnvelope( const QCString& channel, const QCString& message ) : |
84 | QDataStream(new QBuffer), | 84 | QDataStream(new QBuffer), |
85 | ch(channel), msg(message) | 85 | ch(channel), msg(message) |
86 | { | 86 | { |
87 | device()->open(IO_WriteOnly); | 87 | device()->open(IO_WriteOnly); |
88 | } | 88 | } |
89 | 89 | ||
90 | /*! | 90 | /*! |
91 | Writes the message and then destroys the QCopEnvelope. | 91 | Writes the message and then destroys the QCopEnvelope. |
92 | */ | 92 | */ |
93 | QCopEnvelope::~QCopEnvelope() | 93 | QCopEnvelope::~QCopEnvelope() |
94 | { | 94 | { |
95 | QByteArray data = ((QBuffer*)device())->buffer(); | 95 | QByteArray data = ((QBuffer*)device())->buffer(); |
96 | const int pref=16; | 96 | const int pref=16; |