create a mimetype job instead of a generic transfer job, that is confised to death if the url is a directory instead of a file
BUG:218097 svn path=/trunk/KDE/kdelibs/; revision=1061657
This commit is contained in:
parent
177956d55e
commit
77928c0141
@ -1310,11 +1310,13 @@ void ContainmentPrivate::dropData(QPointF scenePos, QPoint screenPos, QGraphicsS
|
|||||||
|
|
||||||
// It may be a directory or a file, let's stat
|
// It may be a directory or a file, let's stat
|
||||||
KIO::JobFlags flags = KIO::HideProgressInfo;
|
KIO::JobFlags flags = KIO::HideProgressInfo;
|
||||||
KIO::TransferJob *job = KIO::get(url, KIO::NoReload, flags);
|
KIO::MimetypeJob *job = KIO::mimetype(url, flags);
|
||||||
if (dropEvent)
|
if (dropEvent) {
|
||||||
dropPoints[job] = dropEvent->pos();
|
dropPoints[job] = dropEvent->pos();
|
||||||
else
|
} else {
|
||||||
dropPoints[job] = scenePos;
|
dropPoints[job] = scenePos;
|
||||||
|
}
|
||||||
|
|
||||||
QObject::connect(job, SIGNAL(result(KJob*)), q, SLOT(dropJobResult(KJob*)));
|
QObject::connect(job, SIGNAL(result(KJob*)), q, SLOT(dropJobResult(KJob*)));
|
||||||
QObject::connect(job, SIGNAL(mimetype(KIO::Job *, const QString&)),
|
QObject::connect(job, SIGNAL(mimetype(KIO::Job *, const QString&)),
|
||||||
q, SLOT(mimeTypeRetrieved(KIO::Job *, const QString&)));
|
q, SLOT(mimeTypeRetrieved(KIO::Job *, const QString&)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user