Changeset View
Changeset View
Standalone View
Standalone View
src/core/slave.cpp
Show First 20 Lines • Show All 496 Lines • ▼ Show 20 Line(s) | 495 | if (lib_path.isEmpty()) { | |||
---|---|---|---|---|---|
497 | error = KIO::ERR_CANNOT_CREATE_SLAVE; | 497 | error = KIO::ERR_CANNOT_CREATE_SLAVE; | ||
498 | delete slave; | 498 | delete slave; | ||
499 | return nullptr; | 499 | return nullptr; | ||
500 | } | 500 | } | ||
501 | 501 | | |||
502 | const QStringList args = QStringList() << lib_path << protocol << QLatin1String("") << slaveAddress.toString(); | 502 | const QStringList args = QStringList() << lib_path << protocol << QLatin1String("") << slaveAddress.toString(); | ||
503 | //qDebug() << "kioslave" << ", " << lib_path << ", " << protocol << ", " << QString() << ", " << slaveAddress; | 503 | //qDebug() << "kioslave" << ", " << lib_path << ", " << protocol << ", " << QString() << ", " << slaveAddress; | ||
504 | 504 | | |||
505 | // look where libexec path is (can be set in qt.conf) | ||||
506 | const QString qlibexec = QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath); | ||||
507 | // on !win32 we use a kf5 suffix | ||||
508 | const QString qlibexecKF5 = QDir(qlibexec).filePath(QStringLiteral("kf5")); | ||||
509 | | ||||
505 | // search paths | 510 | // search paths | ||
506 | const QStringList searchPaths = QStringList() | 511 | const QStringList searchPaths = QStringList() | ||
507 | << QCoreApplication::applicationDirPath() // then look where our application binary is located | 512 | << QCoreApplication::applicationDirPath() // then look where our application binary is located | ||
508 | << QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath) // look where libexec path is (can be set in qt.conf) | 513 | << qlibexec | ||
514 | << qlibexecKF5 | ||||
509 | << QFile::decodeName(CMAKE_INSTALL_FULL_LIBEXECDIR_KF5); // look at our installation location | 515 | << QFile::decodeName(CMAKE_INSTALL_FULL_LIBEXECDIR_KF5); // look at our installation location | ||
510 | const QString kioslaveExecutable = QStandardPaths::findExecutable(QStringLiteral("kioslave"), searchPaths); | 516 | const QString kioslaveExecutable = QStandardPaths::findExecutable(QStringLiteral("kioslave"), searchPaths); | ||
511 | if (kioslaveExecutable.isEmpty()) { | 517 | if (kioslaveExecutable.isEmpty()) { | ||
512 | error_text = i18n("Can not find 'kioslave' executable at '%1'", searchPaths.join(QStringLiteral(", "))); | 518 | error_text = i18n("Can not find 'kioslave' executable at '%1'", searchPaths.join(QStringLiteral(", "))); | ||
513 | error = KIO::ERR_CANNOT_CREATE_SLAVE; | 519 | error = KIO::ERR_CANNOT_CREATE_SLAVE; | ||
514 | delete slave; | 520 | delete slave; | ||
515 | return nullptr; | 521 | return nullptr; | ||
516 | 522 | | |||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |