sort app names

This commit is contained in:
Marco Martin 2015-03-05 11:41:01 +01:00
parent 1d29f0874e
commit 2f7c6056d7
3 changed files with 17 additions and 6 deletions

View file

@ -88,8 +88,11 @@ Item {
cellWidth: root.buttonHeight
cellHeight: cellWidth
model: SatelliteComponents.ApplicationListModel {
id: appListModel
model: PlasmaCore.SortFilterModel {
sourceModel: SatelliteComponents.ApplicationListModel {
id: appListModel
}
sortRole: "ApplicationNameRole"
}
snapMode: GridView.SnapToRow
//clip: true
@ -157,6 +160,10 @@ Item {
}
}
}
footer: Item {
width: units. gridUnit * 4
height: width
}
}
}

View file

@ -6,7 +6,14 @@ set(satellitecomponents_SRCS
)
add_library(satellitecomponentsplugin SHARED ${satellitecomponents_SRCS})
target_link_libraries(satellitecomponentsplugin Qt5::Core Qt5::Widgets Qt5::Qml Qt5::Quick KF5::Declarative KF5::I18n KF5::KIOCore KF5::KIOWidgets)
target_link_libraries(satellitecomponentsplugin
Qt5::Core
Qt5::Widgets
Qt5::Qml
Qt5::Quick
KF5::Service
KF5::Declarative
KF5::I18n)
install(TARGETS satellitecomponentsplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/satellite/components)

View file

@ -27,7 +27,6 @@
// KDE
#include <KPluginInfo>
#include <KRun>
#include <KService>
#include <KServiceGroup>
#include <KServiceTypeTrader>
@ -138,9 +137,7 @@ void ApplicationListModel::runApplication(const QString &storageId) {
KService::Ptr service = KService::serviceByStorageId(storageId);
//FIXME: port KRun::run to wayland
QProcess::startDetached(service->exec());
//KRun::run(*service, QList<QUrl>(), 0);
}
#include "applicationlistmodel.moc"