Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 4bfd2fea authored by Luigi Toscano's avatar Luigi Toscano

Port away from KMimeType to QMime* and reorder headers

parent c65965d7
......@@ -17,20 +17,19 @@
// Qt
#include <qbitmap.h>
#include <qpainter.h>
#include <qpixmap.h>
//Added by qt3to4:
#include <QDragEnterEvent>
#include <QDropEvent>
#include <QMimeDatabase>
#include <QMimeType>
#include <QResizeEvent>
#include <QDragEnterEvent>
#include <qpainter.h>
#include <qpixmap.h>
#include <QMouseEvent>
#include <QStandardPaths>
#
// KDE Frameworks
#include "kimagemapeditor_debug.h"
#include <kmimetype.h>
#include <QStandardPaths>
// Local
#include "drawzone.h"
#include "kimagemapeditor.h"
......@@ -862,10 +861,11 @@ void DrawZone::dragEnterEvent(QDragEnterEvent*e) {
if ( uris.isEmpty() )
return;
KMimeType::Ptr ptr = KMimeType::findByUrl(uris.first());
// qCDebug(KIMAGEMAPEDITOR_LOG) << "***** " << ptr.data()->name();
if ((ptr.data()->name() == "text/html")
|| (ptr.data()->name().left(6) == "image/"))
QMimeDatabase db;
QMimeType draggedMIME = db.mimeTypeForUrl(uris.first());
// qCDebug(KIMAGEMAPEDITOR_LOG) << "***** " << draggedMIME.name();
if ((draggedMIME.name() == "text/html")
|| (draggedMIME.name().left(6) == "image/"))
e->accept();
}
......
Markdown is supported
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