summaryrefslogtreecommitdiffabout
path: root/libkcal/vcaldrag.cpp
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /libkcal/vcaldrag.cpp
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'libkcal/vcaldrag.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/vcaldrag.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libkcal/vcaldrag.cpp b/libkcal/vcaldrag.cpp
index f01f332..324981e 100644
--- a/libkcal/vcaldrag.cpp
+++ b/libkcal/vcaldrag.cpp
@@ -1,54 +1,54 @@
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 "vcaldrag.h" 22#include "vcaldrag.h"
23 23
24#include "vcalformat.h" 24#include "vcalformat.h"
25 25
26using namespace KCal; 26using namespace KCal;
27 27
28VCalDrag::VCalDrag( Calendar *cal, QWidget *parent, const char *name ) 28VCalDrag::VCalDrag( Calendar *cal, QWidget *parent, const char *name )
29 : QStoredDrag( "text/x-vCalendar", parent, name ) 29 : Q3StoredDrag( "text/x-vCalendar", parent, name )
30{ 30{
31 VCalFormat format; 31 VCalFormat format;
32 setEncodedData( format.toString( cal ).utf8() ); 32 setEncodedData( format.toString( cal ).utf8() );
33} 33}
34 34
35bool VCalDrag::canDecode( QMimeSource *me ) 35bool VCalDrag::canDecode( QMimeSource *me )
36{ 36{
37 return me->provides( "text/x-vCalendar" ); 37 return me->provides( "text/x-vCalendar" );
38} 38}
39 39
40bool VCalDrag::decode( QMimeSource *de, Calendar *cal ) 40bool VCalDrag::decode( QMimeSource *de, Calendar *cal )
41{ 41{
42 bool success = false; 42 bool success = false;
43 43
44 QByteArray payload = de->encodedData( "text/x-vCalendar" ); 44 QByteArray payload = de->encodedData( "text/x-vCalendar" );
45 if ( payload.size() ) { 45 if ( payload.size() ) {
46 QString txt = QString::fromUtf8( payload.data() ); 46 QString txt = QString::fromUtf8( payload.data() );
47 47
48 VCalFormat format; 48 VCalFormat format;
49 success = format.fromString( cal, txt ); 49 success = format.fromString( cal, txt );
50 } 50 }
51 51
52 return success; 52 return success;
53} 53}
54 54