Changeset View
Changeset View
Standalone View
Standalone View
kcms/activities/BlacklistedApplicationsModel.cpp
Show First 20 Lines • Show All 114 Lines • ▼ Show 20 Line(s) | 112 | if (defaultBlockedValue) { | |||
---|---|---|---|---|---|
115 | } | 115 | } | ||
116 | } else { | 116 | } else { | ||
117 | if (!blockedApplications.contains(name)) { | 117 | if (!blockedApplications.contains(name)) { | ||
118 | allowedApplications << name; | 118 | allowedApplications << name; | ||
119 | } | 119 | } | ||
120 | } | 120 | } | ||
121 | } | 121 | } | ||
122 | 122 | | |||
123 | auto applications = (blockedApplications + allowedApplications).toList(); | 123 | auto applications = (blockedApplications + allowedApplications).values(); | ||
124 | 124 | | |||
125 | if (applications.length() > 0) { | 125 | if (applications.length() > 0) { | ||
126 | std::sort(applications.begin(), applications.end()); | 126 | std::sort(applications.begin(), applications.end()); | ||
127 | 127 | | |||
128 | beginInsertRows(QModelIndex(), 0, applications.length() - 1); | 128 | beginInsertRows(QModelIndex(), 0, applications.length() - 1); | ||
129 | 129 | | |||
130 | foreach(const auto & name, applications) | 130 | foreach(const auto & name, applications) | ||
131 | { | 131 | { | ||
▲ Show 20 Lines • Show All 111 Lines • Show Last 20 Lines |