Changeset View
Changeset View
Standalone View
Standalone View
document/kpDocument.cpp
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | |||||
43 | #include "imagelib/effects/kpEffectReduceColors.h" | 43 | #include "imagelib/effects/kpEffectReduceColors.h" | ||
44 | #include "pixmapfx/kpPixmapFX.h" | 44 | #include "pixmapfx/kpPixmapFX.h" | ||
45 | #include "tools/kpTool.h" | 45 | #include "tools/kpTool.h" | ||
46 | #include "widgets/toolbars/kpToolToolBar.h" | 46 | #include "widgets/toolbars/kpToolToolBar.h" | ||
47 | #include "lgpl/generic/kpUrlFormatter.h" | 47 | #include "lgpl/generic/kpUrlFormatter.h" | ||
48 | 48 | | |||
49 | 49 | | |||
50 | #include "kpLogCategories.h" | 50 | #include "kpLogCategories.h" | ||
51 | #include <kio/netaccess.h> // kdelibs4support | 51 | #include <KJobWidgets> | ||
52 | #include <KLocalizedString> | 52 | #include <KLocalizedString> | ||
53 | #include <KIO/StatJob> | ||||
53 | 54 | | |||
54 | #include <QColor> | 55 | #include <QColor> | ||
55 | #include <QBitmap> | 56 | #include <QBitmap> | ||
56 | #include <QBrush> | 57 | #include <QBrush> | ||
57 | #include <QFile> | 58 | #include <QFile> | ||
58 | #include <QImage> | 59 | #include <QImage> | ||
59 | #include <QList> | 60 | #include <QList> | ||
60 | #include <QPainter> | 61 | #include <QPainter> | ||
▲ Show 20 Lines • Show All 89 Lines • ▼ Show 20 Line(s) | 150 | { | |||
150 | return m_isFromExistingURL; | 151 | return m_isFromExistingURL; | ||
151 | } | 152 | } | ||
152 | 153 | | |||
153 | //--------------------------------------------------------------------- | 154 | //--------------------------------------------------------------------- | ||
154 | 155 | | |||
155 | // public | 156 | // public | ||
156 | bool kpDocument::urlExists (const QUrl &url) const | 157 | bool kpDocument::urlExists (const QUrl &url) const | ||
157 | { | 158 | { | ||
158 | return (!url.isEmpty () && | 159 | if (url.isEmpty()) { | ||
159 | KIO::NetAccess::exists (url, KIO::NetAccess::SourceSide/*open*/, | 160 | return false; | ||
160 | d->environ->dialogParent ())); | 161 | } | ||
162 | KIO::StatJob *job = KIO::stat (url, KIO::StatJob::SourceSide, 0); | ||||
163 | KJobWidgets::setWindow (job, d->environ->dialogParent ()); | ||||
164 | return job->exec(); | ||||
161 | } | 165 | } | ||
162 | 166 | | |||
163 | //--------------------------------------------------------------------- | 167 | //--------------------------------------------------------------------- | ||
164 | 168 | | |||
165 | // public | 169 | // public | ||
166 | QString kpDocument::prettyUrl () const | 170 | QString kpDocument::prettyUrl () const | ||
167 | { | 171 | { | ||
168 | return kpUrlFormatter::PrettyUrl (m_url); | 172 | return kpUrlFormatter::PrettyUrl (m_url); | ||
▲ Show 20 Lines • Show All 287 Lines • Show Last 20 Lines |