Changeset View
Changeset View
Standalone View
Standalone View
solid-device-automounter/lib/AutomounterSettings.cpp
Show All 14 Lines | |||||
15 | * You should have received a copy of the GNU General Public License * | 15 | * You should have received a copy of the GNU General Public License * | ||
16 | * along with this program; if not, write to the * | 16 | * along with this program; if not, write to the * | ||
17 | * Free Software Foundation, Inc., * | 17 | * Free Software Foundation, Inc., * | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * | 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * | ||
19 | ***************************************************************************/ | 19 | ***************************************************************************/ | ||
20 | 20 | | |||
21 | #include "AutomounterSettings.h" | 21 | #include "AutomounterSettings.h" | ||
22 | 22 | | |||
23 | KConfigGroup AutomounterSettings::deviceSettings(const QString &udi) | 23 | KConfigGroup AutomounterSettings::deviceSettings(const QString &udi) | ||
ervin: I guess you could have used `using AutomounterSettingsBase::AutomounterSettingsBase;` in the… | |||||
meven: Nice suggestion | |||||
24 | { | 24 | { | ||
25 | return self()->config()->group("Devices").group(udi); | 25 | return config()->group("Devices").group(udi); | ||
26 | } | 26 | } | ||
27 | 27 | | |||
28 | QStringList AutomounterSettings::knownDevices() | 28 | QStringList AutomounterSettings::knownDevices() | ||
29 | { | 29 | { | ||
30 | return self()->config()->group("Devices").groupList(); | 30 | return config()->group("Devices").groupList(); | ||
31 | } | 31 | } | ||
32 | 32 | | |||
33 | bool AutomounterSettings::deviceIsKnown(const QString &udi) | 33 | bool AutomounterSettings::deviceIsKnown(const QString &udi) | ||
34 | { | 34 | { | ||
35 | return self()->config()->group("Devices").group(udi).readEntry("EverMounted", false); | 35 | return config()->group("Devices").group(udi).readEntry("EverMounted", false); | ||
36 | } | 36 | } | ||
37 | 37 | | |||
38 | bool AutomounterSettings::deviceAutomountIsForced(const QString &udi, AutomountType type) | 38 | bool AutomounterSettings::deviceAutomountIsForced(const QString &udi, AutomountType type) | ||
39 | { | 39 | { | ||
40 | switch (type) { | 40 | switch (type) { | ||
41 | case Login: | 41 | case Login: | ||
42 | return deviceSettings(udi).readEntry("ForceLoginAutomount", false); | 42 | return deviceSettings(udi).readEntry("ForceLoginAutomount", false); | ||
43 | case Attach: | 43 | case Attach: | ||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |
I guess you could have used using AutomounterSettingsBase::AutomounterSettingsBase; in the header instead.