Commit de8870b0 authored by Andreas Cord-Landwehr's avatar Andreas Cord-Landwehr
Browse files

Adapt to KNewStuff API change in 5.63

Two changes are needed to be compatible with KNewStuff > 5.62:
- the installItem call now requires two arguments (previously this with
  only the first)
- binding the items model to the engine property does not work anymore
  but binding it directly to the engine object solves the issue

Note that this is a runtime only issue because QML methods are used.
However, this patch increases the minimal required version to 5.63 for
all frameworks, which shall help to ensure a functional KNewStuff
version being present.

BUG: 414985
parent 823a2bf2
......@@ -27,7 +27,7 @@ project(artikulate)
cmake_minimum_required(VERSION 3.5.0)
set(QT_MIN_VERSION "5.11.0")
set(KF5_MIN_VERSION "5.57.0")
set(KF5_MIN_VERSION "5.63.0")
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
......
......@@ -89,12 +89,12 @@ Kirigami.Page {
QQC2.Button {
visible: (model.status == KNS.ItemsModel.UpdateableStatus) ? true : false;
text: i18nc("@action:button", "Update")
onClicked: newStuffModel.installItem(model.index)
onClicked: newStuffModel.installItem(model.index, model.PayloadRole)
}
QQC2.Button {
visible: (model.status == KNS.ItemsModel.DownloadableStatus || model.status == KNS.ItemsModel.DeletedStatus) ? true : false;
text: i18nc("@action:button", "Install")
onClicked: newStuffModel.installItem(model.index)
onClicked: newStuffModel.installItem(model.index, model.PayloadRole)
}
QQC2.Button {
visible: (model.status == KNS.ItemsModel.InstalledStatus || model.status == KNS.ItemsModel.UpdateableStatus) ? true : false;
......@@ -113,7 +113,8 @@ Kirigami.Page {
delegate: courseDownloadItem
model: KNS.ItemsModel {
id: newStuffModel;
engine: newStuffEngine.engine;
engine: newStuffEngine;
}
KNS.Engine {
id: newStuffEngine;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment