Changeset View
Changeset View
Standalone View
Standalone View
src/kdeinit/kinit.cpp
Show First 20 Lines • Show All 484 Lines • ▼ Show 20 Line(s) | 475 | } else { | |||
---|---|---|---|---|---|
485 | if (lib.contains(QLatin1String(KF5_LIBEXEC_INSTALL_DIR))) { | 485 | if (lib.contains(QLatin1String(KF5_LIBEXEC_INSTALL_DIR))) { | ||
486 | libpath = QString(lib).replace(QLatin1String(KF5_LIBEXEC_INSTALL_DIR), | 486 | libpath = QString(lib).replace(QLatin1String(KF5_LIBEXEC_INSTALL_DIR), | ||
487 | QLatin1String(LIB_INSTALL_DIR "/libkdeinit5_")) + QLatin1String(".so"); | 487 | QLatin1String(LIB_INSTALL_DIR "/libkdeinit5_")) + QLatin1String(".so"); | ||
488 | } else if (lib.contains(QLatin1String("/bin/"))) { | 488 | } else if (lib.contains(QLatin1String("/bin/"))) { | ||
489 | libpath = QString(lib).replace(QLatin1String("/bin/"), | 489 | libpath = QString(lib).replace(QLatin1String("/bin/"), | ||
490 | QLatin1String(LIB_INSTALL_DIR "/libkdeinit5_")) + QLatin1String(".so"); | 490 | QLatin1String(LIB_INSTALL_DIR "/libkdeinit5_")) + QLatin1String(".so"); | ||
491 | } | 491 | } | ||
492 | // Don't confuse the user with "Could not load libkdeinit5_foo.so" if it doesn't exist | 492 | // Don't confuse the user with "Could not load libkdeinit5_foo.so" if it doesn't exist | ||
493 | if (!QFile::exists(libpath)) { | 493 | // (and check for empty string to avoid warning message in QFileInfo::exists) | ||
494 | if (libpath.isEmpty() || !QFileInfo::exists(libpath)) { | ||||
494 | libpath.clear(); | 495 | libpath.clear(); | ||
495 | } | 496 | } | ||
496 | } | 497 | } | ||
497 | } | 498 | } | ||
498 | #ifndef NDEBUG | 499 | #ifndef NDEBUG | ||
499 | fprintf(stderr, "kdeinit5: preparing to launch '%s'\n", libpath.isEmpty() | 500 | fprintf(stderr, "kdeinit5: preparing to launch '%s'\n", libpath.isEmpty() | ||
500 | ? execpath.constData() : libpath.toUtf8().constData()); | 501 | ? execpath.constData() : libpath.toUtf8().constData()); | ||
501 | #endif | 502 | #endif | ||
▲ Show 20 Lines • Show All 1287 Lines • Show Last 20 Lines |