Changeset View
Changeset View
Standalone View
Standalone View
plugins/qmljs/duchain/cache.cpp
Show First 20 Lines • Show All 163 Lines • ▼ Show 20 Line(s) | 159 | if (!dumpPath.isNull()) { | |||
---|---|---|---|---|---|
164 | continue; | 164 | continue; | ||
165 | } | 165 | } | ||
166 | 166 | | |||
167 | // Create a dump of the file | 167 | // Create a dump of the file | ||
168 | const QStringList args = {QStringLiteral("-noinstantiate"), QStringLiteral("-path"), filePath}; | 168 | const QStringList args = {QStringLiteral("-noinstantiate"), QStringLiteral("-path"), filePath}; | ||
169 | 169 | | |||
170 | for (const PluginDumpExecutable& executable : m_pluginDumpExecutables) { | 170 | for (const PluginDumpExecutable& executable : m_pluginDumpExecutables) { | ||
171 | QProcess qmlplugindump; | 171 | QProcess qmlplugindump; | ||
172 | | ||||
173 | qmlplugindump.setProcessChannelMode(QProcess::SeparateChannels); | 172 | qmlplugindump.setProcessChannelMode(QProcess::SeparateChannels); | ||
174 | qmlplugindump.setWorkingDirectory(fileInfo.absolutePath()); | 173 | qmlplugindump.start(executable.executable, args, QIODevice::ReadOnly); | ||
175 | qmlplugindump.start(executable.executable, args); | | |||
176 | 174 | | |||
177 | qCDebug(KDEV_QMLJS_DUCHAIN) << "starting qmlplugindump with args:" << args; | 175 | qCDebug(KDEV_QMLJS_DUCHAIN) << "starting qmlplugindump with args:" << executable.executable << args << qmlplugindump.state() << fileInfo.absolutePath(); | ||
178 | 176 | | |||
179 | if (!qmlplugindump.waitForFinished(3000)) { | 177 | if (!qmlplugindump.waitForFinished(3000)) { | ||
178 | if (qmlplugindump.state() == QProcess::Running) { | ||||
180 | qCWarning(KDEV_QMLJS_DUCHAIN) << "qmlplugindump didn't finish in time -- killing"; | 179 | qCWarning(KDEV_QMLJS_DUCHAIN) << "qmlplugindump didn't finish in time -- killing"; | ||
181 | qmlplugindump.kill(); | 180 | qmlplugindump.kill(); | ||
182 | qmlplugindump.waitForFinished(100); | 181 | qmlplugindump.waitForFinished(100); | ||
182 | } else { | ||||
183 | qCDebug(KDEV_QMLJS_DUCHAIN) << "qmlplugindump attempt failed" << qmlplugindump.program() << qmlplugindump.arguments() << qmlplugindump.readAllStandardError(); | ||||
184 | } | ||||
183 | continue; | 185 | continue; | ||
184 | } | 186 | } | ||
185 | 187 | | |||
186 | if (qmlplugindump.exitCode() != 0) { | 188 | if (qmlplugindump.exitCode() != 0) { | ||
187 | qCWarning(KDEV_QMLJS_DUCHAIN) << "qmlplugindump finished with exit code:" << qmlplugindump.exitCode(); | 189 | qCWarning(KDEV_QMLJS_DUCHAIN) << "qmlplugindump finished with exit code:" << qmlplugindump.exitCode(); | ||
188 | continue; | 190 | continue; | ||
189 | } | 191 | } | ||
190 | 192 | | |||
▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines |