Changeset View
Changeset View
Standalone View
Standalone View
src/solid/devices/backends/fakehw/fakestorageaccess.cpp
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Line(s) | 63 | { | |||
---|---|---|---|---|---|
64 | if (fakeDevice()->isBroken() || !isAccessible()) { | 64 | if (fakeDevice()->isBroken() || !isAccessible()) { | ||
65 | return false; | 65 | return false; | ||
66 | } else { | 66 | } else { | ||
67 | fakeDevice()->setProperty("isMounted", false); | 67 | fakeDevice()->setProperty("isMounted", false); | ||
68 | return true; | 68 | return true; | ||
69 | } | 69 | } | ||
70 | } | 70 | } | ||
71 | 71 | | |||
72 | bool FakeStorageAccess::changeLabel(const QString &label) | ||||
73 | { | ||||
74 | Q_UNUSED(label); | ||||
75 | return false; | ||||
76 | } | ||||
77 | | ||||
72 | void Solid::Backends::Fake::FakeStorageAccess::onPropertyChanged(const QMap<QString, int> &changes) | 78 | void Solid::Backends::Fake::FakeStorageAccess::onPropertyChanged(const QMap<QString, int> &changes) | ||
73 | { | 79 | { | ||
74 | Q_FOREACH (const QString &property, changes.keys()) { | 80 | Q_FOREACH (const QString &property, changes.keys()) { | ||
75 | if (property == "isMounted") { | 81 | if (property == "isMounted") { | ||
76 | emit accessibilityChanged(fakeDevice()->property("isMounted").toBool(), fakeDevice()->udi()); | 82 | emit accessibilityChanged(fakeDevice()->property("isMounted").toBool(), fakeDevice()->udi()); | ||
77 | } | 83 | } | ||
78 | } | 84 | } | ||
79 | } | 85 | } | ||
80 | 86 | |