Commit 44f6420b authored by Volker Krause's avatar Volker Krause Committed by Laurent Montel
Browse files

A QDrag owner no longer needs to be a wiget, an QObject is enough

parent 56f47990
Pipeline #173252 passed with stage
in 2 minutes and 53 seconds
......@@ -39,7 +39,6 @@
#include <QIcon>
#include <QMimeData>
#include <QTimeZone>
#include <QWidget>
using namespace KCalendarCore;
using namespace KCalUtils;
......@@ -137,7 +136,7 @@ QMimeData *DndFactory::createMimeData()
return mimeData;
}
QDrag *DndFactory::createDrag(QWidget *owner)
QDrag *DndFactory::createDrag(QObject *owner)
{
auto *drag = new QDrag(owner);
drag->setMimeData(createMimeData());
......@@ -168,7 +167,7 @@ QMimeData *DndFactory::createMimeData(const Incidence::Ptr &incidence)
return mimeData;
}
QDrag *DndFactory::createDrag(const Incidence::Ptr &incidence, QWidget *owner)
QDrag *DndFactory::createDrag(const Incidence::Ptr &incidence, QObject *owner)
{
auto *drag = new QDrag(owner);
drag->setMimeData(createMimeData(incidence));
......
......@@ -79,7 +79,7 @@ public:
/**
Create a drag object for the whole calendar.
*/
QDrag *createDrag(QWidget *owner);
QDrag *createDrag(QObject *owner);
/**
Create the mime data for a single incidence.
......@@ -89,7 +89,7 @@ public:
/**
Create a drag object for a single incidence.
*/
QDrag *createDrag(const KCalendarCore::Incidence::Ptr &incidence, QWidget *owner);
QDrag *createDrag(const KCalendarCore::Incidence::Ptr &incidence, QObject *owner);
/**
Create Todo object from mime data.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment