Changeset View
Changeset View
Standalone View
Standalone View
applets/kicker/plugin/computermodel.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 "computermodel.h" | 21 | #include "computermodel.h" | ||
22 | #include "actionlist.h" | 22 | #include "actionlist.h" | ||
23 | #include "favoritesmodel.h" | 23 | #include "simplefavoritesmodel.h" | ||
24 | 24 | | |||
25 | #include <QIcon> | 25 | #include <QIcon> | ||
26 | 26 | | |||
27 | #include <KAuthorized> | 27 | #include <KAuthorized> | ||
28 | #include <KConcatenateRowsProxyModel> | 28 | #include <KConcatenateRowsProxyModel> | ||
29 | #include <KFilePlacesModel> | 29 | #include <KFilePlacesModel> | ||
30 | #include <KLocalizedString> | 30 | #include <KLocalizedString> | ||
31 | #include <KRun> | 31 | #include <KRun> | ||
▲ Show 20 Lines • Show All 100 Lines • ▼ Show 20 Line(s) | 122 | { | |||
132 | } | 132 | } | ||
133 | 133 | | |||
134 | return false; | 134 | return false; | ||
135 | } | 135 | } | ||
136 | 136 | | |||
137 | ComputerModel::ComputerModel(QObject *parent) : ForwardingModel(parent) | 137 | ComputerModel::ComputerModel(QObject *parent) : ForwardingModel(parent) | ||
138 | , m_concatProxy(new KConcatenateRowsProxyModel(this)) | 138 | , m_concatProxy(new KConcatenateRowsProxyModel(this)) | ||
139 | , m_runCommandModel(new RunCommandModel(this)) | 139 | , m_runCommandModel(new RunCommandModel(this)) | ||
140 | , m_systemAppsModel(new FavoritesModel(this)) | 140 | , m_systemAppsModel(new SimpleFavoritesModel(this)) | ||
141 | , m_filteredPlacesModel(new FilteredPlacesModel(this)) | 141 | , m_filteredPlacesModel(new FilteredPlacesModel(this)) | ||
142 | , m_appNameFormat(AppEntry::NameOnly) | 142 | , m_appNameFormat(AppEntry::NameOnly) | ||
143 | , m_appletInterface(nullptr) | 143 | , m_appletInterface(nullptr) | ||
144 | { | 144 | { | ||
145 | connect(m_systemAppsModel, &FavoritesModel::favoritesChanged, this, &ComputerModel::systemApplicationsChanged); | 145 | connect(m_systemAppsModel, &SimpleFavoritesModel::favoritesChanged, this, &ComputerModel::systemApplicationsChanged); | ||
146 | m_systemAppsModel->setFavorites(QStringList() << "systemsettings.desktop"); | ||||
146 | 147 | | |||
147 | m_concatProxy->addSourceModel(m_runCommandModel); | 148 | m_concatProxy->addSourceModel(m_runCommandModel); | ||
148 | m_concatProxy->addSourceModel(m_systemAppsModel); | 149 | m_concatProxy->addSourceModel(m_systemAppsModel); | ||
149 | m_concatProxy->addSourceModel(m_filteredPlacesModel); | 150 | m_concatProxy->addSourceModel(m_filteredPlacesModel); | ||
150 | 151 | | |||
151 | setSourceModel(m_concatProxy); | 152 | setSourceModel(m_concatProxy); | ||
152 | } | 153 | } | ||
153 | 154 | | |||
▲ Show 20 Lines • Show All 151 Lines • Show Last 20 Lines |