Changeset View
Changeset View
Standalone View
Standalone View
kcms/icons/changeicons.cpp
Show All 26 Lines | 24 | { | |||
---|---|---|---|---|---|
27 | if (app.arguments().count() != 2) { | 27 | if (app.arguments().count() != 2) { | ||
28 | return 1; | 28 | return 1; | ||
29 | } | 29 | } | ||
30 | 30 | | |||
31 | //KNS will give us a path | 31 | //KNS will give us a path | ||
32 | QString themeName = app.arguments().last(); | 32 | QString themeName = app.arguments().last(); | ||
33 | int idx = themeName.lastIndexOf('/'); | 33 | int idx = themeName.lastIndexOf('/'); | ||
34 | if (idx>=0) { | 34 | if (idx>=0) { | ||
35 | themeName = themeName.mid(idx); | 35 | themeName = themeName.mid(idx + 1); | ||
36 | } | 36 | } | ||
37 | 37 | | |||
38 | IconsSettings settings; | 38 | IconsSettings settings; | ||
39 | settings.setTheme(themeName); | 39 | settings.setTheme(themeName); | ||
40 | settings.save(); | 40 | settings.save(); | ||
41 | return 0; | 41 | return 0; | ||
42 | } | 42 | } |