diff --git a/src/core/slave.cpp b/src/core/slave.cpp --- a/src/core/slave.cpp +++ b/src/core/slave.cpp @@ -499,15 +499,20 @@ return nullptr; } +#ifdef Q_OS_WIN + const QString kioslaveName = QStringLiteral("kioslave5"); +#else + const QString kioslaveName = QStringLiteral("kioslave"); +#endif const QStringList args = QStringList() << lib_path << protocol << QLatin1String("") << slaveAddress.toString(); - //qDebug() << "kioslave" << ", " << lib_path << ", " << protocol << ", " << QString() << ", " << slaveAddress; + //qDebug() << kioslaveName << ", " << lib_path << ", " << protocol << ", " << QString() << ", " << slaveAddress; // search paths const QStringList searchPaths = QStringList() << QCoreApplication::applicationDirPath() // then look where our application binary is located << QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath) // look where libexec path is (can be set in qt.conf) << QFile::decodeName(CMAKE_INSTALL_FULL_LIBEXECDIR_KF5); // look at our installation location - const QString kioslaveExecutable = QStandardPaths::findExecutable(QStringLiteral("kioslave"), searchPaths); + const QString kioslaveExecutable = QStandardPaths::findExecutable(kioslaveName, searchPaths); if (kioslaveExecutable.isEmpty()) { error_text = i18n("Can not find 'kioslave' executable at '%1'", searchPaths.join(QStringLiteral(", "))); error = KIO::ERR_CANNOT_CREATE_SLAVE; diff --git a/src/kioslave/CMakeLists.txt b/src/kioslave/CMakeLists.txt --- a/src/kioslave/CMakeLists.txt +++ b/src/kioslave/CMakeLists.txt @@ -4,5 +4,8 @@ target_link_libraries(kioslave KF5::KIOCore ) +if(WIN32) + set_target_properties(kioslave PROPERTIES OUTPUT_NAME kioslave5) +endif() install(TARGETS kioslave DESTINATION ${KDE_INSTALL_LIBEXECDIR_KF5} )