summaryrefslogtreecommitdiffabout
path: root/libkcal/dndfactory.cpp
Unidiff
Diffstat (limited to 'libkcal/dndfactory.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/dndfactory.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/libkcal/dndfactory.cpp b/libkcal/dndfactory.cpp
index cdcfae4..ca7e212 100644
--- a/libkcal/dndfactory.cpp
+++ b/libkcal/dndfactory.cpp
@@ -19,12 +19,15 @@
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. 20 Boston, MA 02111-1307, USA.
21*/ 21*/
22 22
23#include <qapplication.h> 23#include <qapplication.h>
24#include <qclipboard.h> 24#include <qclipboard.h>
25//Added by qt3to4:
26#include <QDropEvent>
27#include <Q3PtrList>
25 28
26#include <kiconloader.h> 29#include <kiconloader.h>
27#include <kdebug.h> 30#include <kdebug.h>
28#include <kmessagebox.h> 31#include <kmessagebox.h>
29#include <klocale.h> 32#include <klocale.h>
30 33
@@ -65,13 +68,13 @@ Event *DndFactory::createDrop(QDropEvent *de)
65 68
66 CalendarLocal cal( mCalendar->timeZoneId() ); 69 CalendarLocal cal( mCalendar->timeZoneId() );
67 70
68 if ( ICalDrag::decode( de, &cal ) || VCalDrag::decode( de, &cal ) ) { 71 if ( ICalDrag::decode( de, &cal ) || VCalDrag::decode( de, &cal ) ) {
69 de->accept(); 72 de->accept();
70 73
71 QPtrList<Event> events = cal.events(); 74 Q3PtrList<Event> events = cal.events();
72 if ( !events.isEmpty() ) { 75 if ( !events.isEmpty() ) {
73 Event *event = new Event( *events.first() ); 76 Event *event = new Event( *events.first() );
74 return event; 77 return event;
75 } 78 }
76 } 79 }
77 80
@@ -84,13 +87,13 @@ Todo *DndFactory::createDropTodo(QDropEvent *de)
84 87
85 CalendarLocal cal( mCalendar->timeZoneId() ); 88 CalendarLocal cal( mCalendar->timeZoneId() );
86 89
87 if ( ICalDrag::decode( de, &cal ) || VCalDrag::decode( de, &cal ) ) { 90 if ( ICalDrag::decode( de, &cal ) || VCalDrag::decode( de, &cal ) ) {
88 de->accept(); 91 de->accept();
89 92
90 QPtrList<Todo> todos = cal.todos(); 93 Q3PtrList<Todo> todos = cal.todos();
91 if ( !todos.isEmpty() ) { 94 if ( !todos.isEmpty() ) {
92 Todo *todo = new Todo( *todos.first() ); 95 Todo *todo = new Todo( *todos.first() );
93 return todo; 96 return todo;
94 } 97 }
95 } 98 }
96 99
@@ -130,13 +133,13 @@ Incidence *DndFactory::pasteIncidence(const QDate &newDate, const QTime *newTime
130 if ( !ICalDrag::decode( cb->data(), &cal ) && 133 if ( !ICalDrag::decode( cb->data(), &cal ) &&
131 !VCalDrag::decode( cb->data(), &cal ) ) { 134 !VCalDrag::decode( cb->data(), &cal ) ) {
132 kdDebug(5800) << "Can't parse clipboard" << endl; 135 kdDebug(5800) << "Can't parse clipboard" << endl;
133 return 0; 136 return 0;
134 } 137 }
135 138
136 QPtrList<Incidence> incList = cal.incidences(); 139 Q3PtrList<Incidence> incList = cal.incidences();
137 Incidence *inc = incList.first(); 140 Incidence *inc = incList.first();
138 141
139 if ( !incList.isEmpty() && inc ) { 142 if ( !incList.isEmpty() && inc ) {
140 inc = inc->clone(); 143 inc = inc->clone();
141 144
142 inc->recreate(); 145 inc->recreate();