diff --git a/CMakeLists.txt b/CMakeLists.txt index 516f5179b..dbaa03953 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,8 @@ include(FeatureSummary) include(KDEConnectMacros.cmake) +add_definitions(-DQT_NO_URL_CAST_FROM_STRING) + include(GenerateExportHeader) include_directories(${CMAKE_CURRENT_BINARY_DIR}) diff --git a/plugins/share/share_config.cpp b/plugins/share/share_config.cpp index c41853420..818748b69 100644 --- a/plugins/share/share_config.cpp +++ b/plugins/share/share_config.cpp @@ -46,7 +46,7 @@ void ShareConfig::defaults() { KCModule::defaults(); - m_ui->kurlrequester->setUrl(QStandardPaths::writableLocation(QStandardPaths::DownloadLocation)); + m_ui->kurlrequester->setUrl(QUrl::fromLocalFile(QStandardPaths::writableLocation(QStandardPaths::DownloadLocation))); Q_EMIT changed(true); } @@ -55,7 +55,7 @@ void ShareConfig::load() { KCModule::load(); - m_ui->kurlrequester->setUrl(config()->get("incoming_path", QStandardPaths::writableLocation(QStandardPaths::DownloadLocation))); + m_ui->kurlrequester->setUrl(config()->get("incoming_path", QUrl::fromLocalFile(QStandardPaths::writableLocation(QStandardPaths::DownloadLocation)))); Q_EMIT changed(false); }