Diffstat (limited to 'libopie2/opiepim/core/opimstate.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/opimstate.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libopie2/opiepim/core/opimstate.cpp b/libopie2/opiepim/core/opimstate.cpp index 1013a1c..8aff558 100644 --- a/libopie2/opiepim/core/opimstate.cpp +++ b/libopie2/opiepim/core/opimstate.cpp | |||
@@ -5,52 +5,53 @@ | |||
5 | .=l. | 5 | .=l. |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | #include <qshared.h> | ||
30 | |||
31 | #include "opimstate.h" | 29 | #include "opimstate.h" |
32 | 30 | ||
31 | /* QT */ | ||
32 | #include <qshared.h> | ||
33 | |||
33 | namespace Opie { | 34 | namespace Opie { |
34 | /* | 35 | /* |
35 | * for one int this does not make | 36 | * for one int this does not make |
36 | * much sense but never the less | 37 | * much sense but never the less |
37 | * we will do it for the future | 38 | * we will do it for the future |
38 | */ | 39 | */ |
39 | struct OPimState::Data : public QShared { | 40 | struct OPimState::Data : public QShared { |
40 | Data() : QShared(),state(Undefined) { | 41 | Data() : QShared(),state(Undefined) { |
41 | } | 42 | } |
42 | int state; | 43 | int state; |
43 | }; | 44 | }; |
44 | 45 | ||
45 | OPimState::OPimState( int state ) { | 46 | OPimState::OPimState( int state ) { |
46 | data = new Data; | 47 | data = new Data; |
47 | data->state = state; | 48 | data->state = state; |
48 | } | 49 | } |
49 | OPimState::OPimState( const OPimState& st) : | 50 | OPimState::OPimState( const OPimState& st) : |
50 | data( st.data ) { | 51 | data( st.data ) { |
51 | /* ref up */ | 52 | /* ref up */ |
52 | data->ref(); | 53 | data->ref(); |
53 | } | 54 | } |
54 | OPimState::~OPimState() { | 55 | OPimState::~OPimState() { |
55 | if ( data->deref() ) { | 56 | if ( data->deref() ) { |
56 | delete data ; | 57 | delete data ; |