Commit 67d81af4 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

[Notifications] Print warning when a destUrl is passed as a file

It's dest*url* after all. Makes it easier to debug why it's not displaying correctly.

According to Qt `/foo/bar` is a child of `stfp://foo`, which completely throws
off `KFilePlacesModel`...
parent 52b62508
......@@ -370,7 +370,13 @@ void JobPrivate::clearDescriptionField(uint number)
void JobPrivate::setDestUrl(const QDBusVariant &urlVariant)
{
const QUrl destUrl = QUrl(urlVariant.variant().toUrl().adjusted(QUrl::StripTrailingSlash)); // urgh
QUrl destUrl = QUrl(urlVariant.variant().toUrl().adjusted(QUrl::StripTrailingSlash)); // urgh
if (destUrl.scheme().isEmpty()) {
qCInfo(NOTIFICATIONMANAGER) << "Job from" << m_applicationName
<< "set a destUrl" << destUrl << "without a scheme (assuming 'file'), this is an application bug!";
destUrl.setScheme(QStringLiteral("file"));
}
updateField(destUrl, m_destUrl, &Job::destUrlChanged);
}
......
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