Commit af59baf6 authored by David Faure's avatar David Faure
Browse files

Port urlExists() from NetAccess to KIO::NetAccess::exists

Reviewers: broulik, andreagenor, tcanabrava, vkrause

Reviewed By: vkrause

Subscribers: vkrause

Maniphest Tasks: T11576

Differential Revision: https://phabricator.kde.org/D25478
parent 2147b5c1
......@@ -48,8 +48,9 @@
#include "kpLogCategories.h"
#include <kio/netaccess.h> // kdelibs4support
#include <KJobWidgets>
#include <KLocalizedString>
#include <KIO/StatJob>
#include <QColor>
#include <QBitmap>
......@@ -155,9 +156,12 @@ bool kpDocument::isFromExistingURL () const
// public
bool kpDocument::urlExists (const QUrl &url) const
{
return (!url.isEmpty () &&
KIO::NetAccess::exists (url, KIO::NetAccess::SourceSide/*open*/,
d->environ->dialogParent ()));
if (url.isEmpty()) {
return false;
}
KIO::StatJob *job = KIO::stat (url, KIO::StatJob::SourceSide, 0);
KJobWidgets::setWindow (job, d->environ->dialogParent ());
return job->exec();
}
//---------------------------------------------------------------------
......
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