| 69 | } |
| 70 | |
| 71 | QString QMakeConfig::qmakeExecutable(const IProject* project) |
| 72 | { |
| 73 | QMutexLocker lock(&s_buildDirMutex); |
| 74 | QString exe; |
| 75 | if (project) { |
| 76 | KSharedConfig::Ptr cfg = project->projectConfiguration(); |
| 77 | KConfigGroup group(cfg.data(), CONFIG_GROUP()); |
| 78 | if (group.hasKey(QMAKE_EXECUTABLE)) { |
| 79 | exe = group.readEntry(QMAKE_EXECUTABLE, QString()); |
| 80 | QFileInfo info(exe); |
| 81 | if (!info.exists() || !info.isExecutable()) { |
| 82 | qCWarning(KDEV_QMAKE) << "bad QMake configured for project " << project->path().toUrl() << ":" << exe; |
| 83 | exe.clear(); |
| 84 | } |
| 85 | } |
| 86 | } |
| 87 | if (exe.isEmpty()) { |
| 88 | static const auto fallbackQmakeExecutable = systemQmakeExecutable(); |
| 89 | exe = fallbackQmakeExecutable; |
| 90 | } |
| 91 | Q_ASSERT(!exe.isEmpty()); |
| 92 | return exe; |
| 93 | } |
| 94 | |
| 95 | QHash<QString, QString> QMakeConfig::queryQMake(const QString& qmakeExecutable, const QStringList& args) |
| 96 | { |
nothing calls this directly
no test coverage detected