summaryrefslogtreecommitdiffabout
path: root/libkcal/dndfactory.cpp
Side-by-side diff
Diffstat (limited to 'libkcal/dndfactory.cpp') (more/less context) (ignore 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
@@ -13,24 +13,27 @@
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include <qapplication.h>
#include <qclipboard.h>
+//Added by qt3to4:
+#include <QDropEvent>
+#include <Q3PtrList>
#include <kiconloader.h>
#include <kdebug.h>
#include <kmessagebox.h>
#include <klocale.h>
#include "vcaldrag.h"
#include "icaldrag.h"
#include "calendar.h"
#include "vcalformat.h"
#include "icalformat.h"
#include "calendarlocal.h"
@@ -59,44 +62,44 @@ ICalDrag *DndFactory::createDrag( Incidence *incidence, QWidget *owner )
return icd;
}
Event *DndFactory::createDrop(QDropEvent *de)
{
kdDebug(5800) << "DndFactory::createDrop()" << endl;
CalendarLocal cal( mCalendar->timeZoneId() );
if ( ICalDrag::decode( de, &cal ) || VCalDrag::decode( de, &cal ) ) {
de->accept();
- QPtrList<Event> events = cal.events();
+ Q3PtrList<Event> events = cal.events();
if ( !events.isEmpty() ) {
Event *event = new Event( *events.first() );
return event;
}
}
return 0;
}
Todo *DndFactory::createDropTodo(QDropEvent *de)
{
kdDebug(5800) << "VCalFormat::createDropTodo()" << endl;
CalendarLocal cal( mCalendar->timeZoneId() );
if ( ICalDrag::decode( de, &cal ) || VCalDrag::decode( de, &cal ) ) {
de->accept();
- QPtrList<Todo> todos = cal.todos();
+ Q3PtrList<Todo> todos = cal.todos();
if ( !todos.isEmpty() ) {
Todo *todo = new Todo( *todos.first() );
return todo;
}
}
return 0;
}
void DndFactory::cutIncidence( Incidence *selectedInc )
{
@@ -124,25 +127,25 @@ Incidence *DndFactory::pasteIncidence(const QDate &newDate, const QTime *newTime
// kdDebug(5800) << "DnDFactory::pasteEvent()" << endl;
CalendarLocal cal( mCalendar->timeZoneId() );
QClipboard *cb = QApplication::clipboard();
if ( !ICalDrag::decode( cb->data(), &cal ) &&
!VCalDrag::decode( cb->data(), &cal ) ) {
kdDebug(5800) << "Can't parse clipboard" << endl;
return 0;
}
- QPtrList<Incidence> incList = cal.incidences();
+ Q3PtrList<Incidence> incList = cal.incidences();
Incidence *inc = incList.first();
if ( !incList.isEmpty() && inc ) {
inc = inc->clone();
inc->recreate();
if ( inc->type() == "Event" ) {
Event *anEvent = static_cast<Event*>( inc );
// Calculate length of event
int daysOffset = anEvent->dtStart().date().daysTo(