author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /libkcal/icaldrag.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-p1.zip kdepimpi-p1.tar.gz kdepimpi-p1.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | libkcal/icaldrag.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libkcal/icaldrag.cpp b/libkcal/icaldrag.cpp index 446a115..7f5a796 100644 --- a/libkcal/icaldrag.cpp +++ b/libkcal/icaldrag.cpp | |||
@@ -1,58 +1,58 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libkcal. | 2 | This file is part of libkcal. |
3 | Copyright (c) 1998 Preston Brown | 3 | Copyright (c) 1998 Preston Brown |
4 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 4 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
5 | 5 | ||
6 | This library is free software; you can redistribute it and/or | 6 | This library is free software; you can redistribute it and/or |
7 | modify it under the terms of the GNU Library General Public | 7 | modify it under the terms of the GNU Library General Public |
8 | License as published by the Free Software Foundation; either | 8 | License as published by the Free Software Foundation; either |
9 | version 2 of the License, or (at your option) any later version. | 9 | version 2 of the License, or (at your option) any later version. |
10 | 10 | ||
11 | This library is distributed in the hope that it will be useful, | 11 | This library is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 | Library General Public License for more details. | 14 | Library General Public License for more details. |
15 | 15 | ||
16 | You should have received a copy of the GNU Library General Public License | 16 | You should have received a copy of the GNU Library General Public License |
17 | along with this library; see the file COPYING.LIB. If not, write to | 17 | along with this library; see the file COPYING.LIB. If not, write to |
18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
19 | Boston, MA 02111-1307, USA. | 19 | Boston, MA 02111-1307, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include "icaldrag.h" | 22 | #include "icaldrag.h" |
23 | 23 | ||
24 | #include "icalformat.h" | 24 | #include "icalformat.h" |
25 | 25 | ||
26 | #include <kdebug.h> | 26 | #include <kdebug.h> |
27 | 27 | ||
28 | using namespace KCal; | 28 | using namespace KCal; |
29 | 29 | ||
30 | ICalDrag::ICalDrag( Calendar *cal, QWidget *parent, const char *name ) | 30 | ICalDrag::ICalDrag( Calendar *cal, QWidget *parent, const char *name ) |
31 | : QStoredDrag( "text/calendar", parent, name ) | 31 | : Q3StoredDrag( "text/calendar", parent, name ) |
32 | { | 32 | { |
33 | ICalFormat icf; | 33 | ICalFormat icf; |
34 | QString scal = icf.toString( cal ); | 34 | QString scal = icf.toString( cal ); |
35 | 35 | ||
36 | setEncodedData( scal.utf8() ); | 36 | setEncodedData( scal.utf8() ); |
37 | } | 37 | } |
38 | 38 | ||
39 | bool ICalDrag::canDecode( QMimeSource *me ) | 39 | bool ICalDrag::canDecode( QMimeSource *me ) |
40 | { | 40 | { |
41 | return me->provides( "text/calendar" ); | 41 | return me->provides( "text/calendar" ); |
42 | } | 42 | } |
43 | 43 | ||
44 | bool ICalDrag::decode( QMimeSource *de, Calendar *cal ) | 44 | bool ICalDrag::decode( QMimeSource *de, Calendar *cal ) |
45 | { | 45 | { |
46 | bool success = false; | 46 | bool success = false; |
47 | 47 | ||
48 | QByteArray payload = de->encodedData( "text/calendar" ); | 48 | QByteArray payload = de->encodedData( "text/calendar" ); |
49 | if ( payload.size() ) { | 49 | if ( payload.size() ) { |
50 | QString txt = QString::fromUtf8( payload.data() ); | 50 | QString txt = QString::fromUtf8( payload.data() ); |
51 | 51 | ||
52 | ICalFormat icf; | 52 | ICalFormat icf; |
53 | success = icf.fromString( cal, txt ); | 53 | success = icf.fromString( cal, txt ); |
54 | } | 54 | } |
55 | 55 | ||
56 | return success; | 56 | return success; |
57 | } | 57 | } |
58 | 58 | ||