Changeset View
Changeset View
Standalone View
Standalone View
common/control.cpp
Show First 20 Lines • Show All 383 Lines • ▼ Show 20 Line(s) | 383 | { | |||
---|---|---|---|---|---|
384 | setReplicationSource(output->hashMd5(), output->name(), source); | 384 | setReplicationSource(output->hashMd5(), output->name(), source); | ||
385 | } | 385 | } | ||
386 | 386 | | |||
387 | void ControlConfig::setReplicationSource(const QString &outputId, const QString &outputName, | 387 | void ControlConfig::setReplicationSource(const QString &outputId, const QString &outputName, | ||
388 | const KScreen::OutputPtr &source) | 388 | const KScreen::OutputPtr &source) | ||
389 | { | 389 | { | ||
390 | QList<QVariant>::iterator it; | 390 | QList<QVariant>::iterator it; | ||
391 | QVariantList outputsInfo = getOutputs(); | 391 | QVariantList outputsInfo = getOutputs(); | ||
392 | const QString sourceHash = source->hashMd5(); | 392 | const QString sourceHash = source ? source->hashMd5() : QStringLiteral(""); | ||
393 | const QString sourceName = source->name(); | 393 | const QString sourceName = source ? source->name() : QStringLiteral(""); | ||
394 | 394 | | |||
395 | for (it = outputsInfo.begin(); it != outputsInfo.end(); ++it) { | 395 | for (it = outputsInfo.begin(); it != outputsInfo.end(); ++it) { | ||
396 | QVariantMap outputInfo = (*it).toMap(); | 396 | QVariantMap outputInfo = (*it).toMap(); | ||
397 | if (!infoIsOutput(outputInfo, outputId, outputName)) { | 397 | if (!infoIsOutput(outputInfo, outputId, outputName)) { | ||
398 | continue; | 398 | continue; | ||
399 | } | 399 | } | ||
400 | outputInfo[QStringLiteral("replicate-hash")] = sourceHash; | 400 | outputInfo[QStringLiteral("replicate-hash")] = sourceHash; | ||
401 | outputInfo[QStringLiteral("replicate-name")] = sourceName; | 401 | outputInfo[QStringLiteral("replicate-name")] = sourceName; | ||
▲ Show 20 Lines • Show All 80 Lines • Show Last 20 Lines |