Commit 5c95479c authored by Kevin Funk's avatar Kevin Funk

Fully restore compat with Qt 5.5

parent fd60b4b6
......@@ -35,13 +35,23 @@ class IdentityRuntime : public IRuntime
QString name() const override { return i18n("Host System"); }
void startProcess(KProcess *process) const override {
connect(process, &QProcess::errorOccurred, this, [process](QProcess::ProcessError error) {
#if QT_VERSION < 0x050600
connect(process, static_cast<void(QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
#else
connect(process, &QProcess::errorOccurred,
#endif
this, [process](QProcess::ProcessError error) {
qCWarning(SHELL) << "error:" << error << process->program() << process->errorString();
});
process->start();
}
void startProcess(QProcess *process) const override {
connect(process, &QProcess::errorOccurred, this, [process](QProcess::ProcessError error) {
#if QT_VERSION < 0x050600
connect(process, static_cast<void(QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
#else
connect(process, &QProcess::errorOccurred,
#endif
this, [process](QProcess::ProcessError error) {
qCWarning(SHELL) << "error:" << error << process->program() << process->errorString();
});
process->start();
......
......@@ -29,8 +29,8 @@
#include <QProcess>
#include <KLocalizedString>
static const QVector<QLatin1String> args = {
QLatin1String("--help-command"), QLatin1String("--help-variable"), QLatin1String("--help-module"), QLatin1String("--help-property"), QLatin1String(), QLatin1String()
static const QVector<QString> args = {
QLatin1String("--help-command"), QLatin1String("--help-variable"), QLatin1String("--help-module"), QLatin1String("--help-property"), QString(), QString()
};
static QString modules [] = {
i18n("Commands"), i18n("Variables"), i18n("Modules"), i18n("Properties"), i18n("Policies")
......
......@@ -170,9 +170,9 @@ SourceToDestinationMap mapSourceToDestination(const Path::List& sourcePaths, con
SourceToDestinationMap result;
for (const Path& path : sortedPaths) {
if (!result.filteredPaths.isEmpty() && result.filteredPaths.rbegin()->isParentOf(path)) {
if (!result.filteredPaths.isEmpty() && std::reverse_iterator<Path::List::const_iterator>(result.filteredPaths.constBegin())->isParentOf(path)) {
// think: "/tests"
const Path& previousPath = *result.filteredPaths.rbegin();
const Path& previousPath = *std::reverse_iterator<Path::List::const_iterator>(result.filteredPaths.constBegin());
// think: "/dest" + "/".relativePath("/tests/abc.cpp") = /dest/tests/abc.cpp
result.finalPaths[previousPath].append(Path(destinationPath, previousPath.parent().relativePath(path)));
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment