Commit d2835b23 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Fix QML issues WRT Connections signals syntax

parent 69327059
......@@ -96,7 +96,7 @@ Item
Connections {
target: ResourcesModel
property bool done: false
onIsFetchingChanged: {
function onIsFetchingChanged() {
if (ResourcesModel.isFetching || done)
return;
......
......@@ -202,7 +202,7 @@ DiscoverPage {
Component.onCompleted: appInfo.application.fetchChangelog()
Connections {
target: appInfo.application
onChangelogFetched: {
function onChangelogFetched(changelog) {
changelogLabel.text = changelog
}
}
......
......@@ -105,32 +105,34 @@ Kirigami.ApplicationWindow
Connections {
target: app
onOpenApplicationInternal: {
function onOpenApplicationInternal(app) {
Navigation.clearStack()
Navigation.openApplication(app)
}
onListMimeInternal: {
function onListMimeInternal(mime) {
currentTopLevel = topBrowsingComp;
Navigation.openApplicationMime(mime)
}
onListCategoryInternal: {
function onListCategoryInternal(cat) {
currentTopLevel = topBrowsingComp;
Navigation.openCategory(cat, "")
}
onOpenSearch: {
function onOpenSearch(search) {
Navigation.clearStack()
Navigation.openApplicationList({search: search})
}
onOpenErrorPage: {
function onOpenErrorPage(errorMessage) {
Navigation.clearStack()
console.warn("error", errorMessage)
window.stack.push(errorPageComponent, { error: errorMessage, title: i18n("Sorry...") })
}
onPreventedClose: showPassiveNotification(i18n("Could not close Discover, there are tasks that need to be done."), 20000, i18n("Quit Anyway"), function() { Qt.quit() })
onUnableToFind: {
function onPreventedClose() {
showPassiveNotification(i18n("Could not close Discover, there are tasks that need to be done."), 20000, i18n("Quit Anyway"), function() { Qt.quit() })
}
function onUnableToFind(resid) {
showPassiveNotification(i18n("Unable to find resource: %1", resid));
Navigation.openHome()
}
......@@ -138,7 +140,7 @@ Kirigami.ApplicationWindow
Connections {
target: ResourcesModel
onPassiveMessage: {
function onPassiveMessage (message) {
showPassiveNotification(message)
console.log("message:", message)
}
......
......@@ -53,12 +53,14 @@ Kirigami.ActionTextField
Connections {
ignoreUnknownSignals: true
target: page
onClearSearch: clearText()
function onClearSearch() {
clearText()
}
}
Connections {
target: applicationWindow()
onCurrentTopLevelChanged: {
function onCurrentTopLevelChanged() {
if (applicationWindow().currentTopLevel.length > 0)
clearText()
}
......
......@@ -43,7 +43,7 @@ ApplicationsListPage {
Connections {
ignoreUnknownSignals: true
target: searchPage
onShown: {
function onShown() {
searchField.forceActiveFocus()
}
}
......
......@@ -39,8 +39,10 @@ DiscoverPage {
readonly property var p0: Connections {
target: backendItem.backend
onPassiveMessage: window.showPassiveNotification(message)
onProceedRequest: {
function onPassiveMessage(message) {
window.showPassiveNotification(message)
}
function onProceedRequest(title, description) {
var dialog = sourceProceedDialog.createObject(window, {sourcesBackend: backendItem.backend, title: title, description: description})
dialog.open()
}
......
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