Fix path->URL conversion error, detected by -DQT_NO_URL_CAST_FROM_STRING

This commit is contained in:
David Faure 2021-10-02 14:01:56 +02:00
parent b4aab98f09
commit 5c6c094dd2
2 changed files with 3 additions and 1 deletions

View file

@ -25,6 +25,8 @@ include(KDEGitCommitHooks)
include(KDEClangFormat) include(KDEClangFormat)
include(FeatureSummary) include(FeatureSummary)
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED
Core Core
Qml Qml

View file

@ -178,7 +178,7 @@ void PhonePanel::handleMetaDataReceived(const QVariantMap &metadata, int fd)
KNotification *notif = new KNotification("captured"); KNotification *notif = new KNotification("captured");
notif->setComponentName(QStringLiteral("plasma_phone_components")); notif->setComponentName(QStringLiteral("plasma_phone_components"));
notif->setTitle(i18n("New Screenshot")); notif->setTitle(i18n("New Screenshot"));
notif->setUrls({filePath}); notif->setUrls({QUrl::fromLocalFile(filePath)});
notif->setText(i18n("New screenshot saved to %1", filePath)); notif->setText(i18n("New screenshot saved to %1", filePath));
notif->sendEvent(); notif->sendEvent();
} }