Changeset View
Changeset View
Standalone View
Standalone View
effects.cpp
Show First 20 Lines • Show All 1467 Lines • ▼ Show 20 Line(s) | 1467 | case SwitchDesktopOnScreenEdgeMovingWindows: | |||
---|---|---|---|---|---|
1468 | return ScreenEdges::self()->isDesktopSwitchingMovingClients(); | 1468 | return ScreenEdges::self()->isDesktopSwitchingMovingClients(); | ||
1469 | default: | 1469 | default: | ||
1470 | return QVariant(); // an invalid one | 1470 | return QVariant(); // an invalid one | ||
1471 | } | 1471 | } | ||
1472 | } | 1472 | } | ||
1473 | 1473 | | |||
1474 | QString EffectsHandlerImpl::supportInformation(const QString &name) const | 1474 | QString EffectsHandlerImpl::supportInformation(const QString &name) const | ||
1475 | { | 1475 | { | ||
1476 | if (!isEffectLoaded(name)) { | 1476 | auto it = std::find_if(loaded_effects.constBegin(), loaded_effects.constEnd(), | ||
1477 | [name](const EffectPair &pair) { return pair.first == name; }); | ||||
1478 | if (it == loaded_effects.constEnd()) { | ||||
1477 | return QString(); | 1479 | return QString(); | ||
1478 | } | 1480 | } | ||
1479 | for (QVector< EffectPair >::const_iterator it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) { | 1481 | | ||
1480 | if ((*it).first == name) { | | |||
1481 | QString support((*it).first + QLatin1String(":\n")); | 1482 | QString support((*it).first + QLatin1String(":\n")); | ||
1482 | const QMetaObject *metaOptions = (*it).second->metaObject(); | 1483 | const QMetaObject *metaOptions = (*it).second->metaObject(); | ||
1483 | for (int i=0; i<metaOptions->propertyCount(); ++i) { | 1484 | for (int i=0; i<metaOptions->propertyCount(); ++i) { | ||
1484 | const QMetaProperty property = metaOptions->property(i); | 1485 | const QMetaProperty property = metaOptions->property(i); | ||
1485 | if (qstrcmp(property.name(), "objectName") == 0) { | 1486 | if (qstrcmp(property.name(), "objectName") == 0) { | ||
1486 | continue; | 1487 | continue; | ||
1487 | } | 1488 | } | ||
1488 | support += QString::fromUtf8(property.name()) + QLatin1String(": ") + (*it).second->property(property.name()).toString() + QLatin1Char('\n'); | 1489 | support += QString::fromUtf8(property.name()) + QLatin1String(": ") + (*it).second->property(property.name()).toString() + QLatin1Char('\n'); | ||
1489 | } | 1490 | } | ||
1491 | | ||||
1490 | return support; | 1492 | return support; | ||
1491 | } | 1493 | } | ||
1492 | } | | |||
1493 | return QString(); | | |||
1494 | } | | |||
1495 | 1494 | | |||
1496 | 1495 | | |||
1497 | bool EffectsHandlerImpl::isScreenLocked() const | 1496 | bool EffectsHandlerImpl::isScreenLocked() const | ||
1498 | { | 1497 | { | ||
1499 | return ScreenLockerWatcher::self()->isLocked(); | 1498 | return ScreenLockerWatcher::self()->isLocked(); | ||
1500 | } | 1499 | } | ||
1501 | 1500 | | |||
1502 | QString EffectsHandlerImpl::debug(const QString& name, const QString& parameter) const | 1501 | QString EffectsHandlerImpl::debug(const QString& name, const QString& parameter) const | ||
▲ Show 20 Lines • Show All 571 Lines • Show Last 20 Lines |