Merge lp:~larryprice/libertine/deb-filepicker into lp:libertine

Proposed by Larry Price
Status: Needs review
Proposed branch: lp:~larryprice/libertine/deb-filepicker
Merge into: lp:libertine
Diff against target: 135 lines (+23/-79)
2 files modified
qml/common/ContainerEditView.qml (+6/-2)
qml/common/DebianPackagePicker.qml (+17/-77)
To merge this branch: bzr merge lp:~larryprice/libertine/deb-filepicker
Reviewer Review Type Date Requested Status
Christopher Townsend Needs Fixing
Libertine CI Bot continuous-integration Approve
Review via email: mp+320829@code.launchpad.net

Commit message

Use the QML FileDialog to pick debian packages for installation.

Description of the change

Use the QML FileDialog to pick debian packages for installation.

To post a comment you must log in.
Revision history for this message
Libertine CI Bot (libertine-ci-bot) wrote :

PASSED: Continuous integration, rev:410
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/490/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/887
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/731
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=zesty,testname=default/731
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/731
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=zesty,testname=default/731
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/897
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/888
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/888/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/888
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/888/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/888
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/888/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/888
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/888/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/490/rebuild

review: Approve (continuous-integration)
411. By Larry Price

merge

Revision history for this message
Libertine CI Bot (libertine-ci-bot) wrote :

PASSED: Continuous integration, rev:411
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/501/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/905
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/743
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=zesty,testname=default/743
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/743
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=zesty,testname=default/743
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/916
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/905
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/905/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/905
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/905/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/905
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/905/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/905
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/905/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/501/rebuild

review: Approve (continuous-integration)
Revision history for this message
Christopher Townsend (townsend) wrote :

When I click "Choose Debian package to install", the filepicker does not show and this is what is in the systemd log:

Apr 05 14:50:46 Yoga2 libertine-manager-app[25271]: QQmlComponent: Component is not ready
Apr 05 14:50:46 Yoga2 libertine-manager-app[25271]: file:///usr/share/libertine/qml/common/ContainerEditView.qml:157: TypeError: Cannot call method 'open' of null

review: Needs Fixing
Revision history for this message
Larry Price (larryprice) wrote :

I see the same results. AddBindMountDialog has the same problem in Unity8. For some reason, the createObject() fails and doesn't give any specifics. Unfortunately, I'm not even able to get libertine-manager-app to run in Unity 7 right now (from the archive). Big Trouble in Little China. It's trying to use mir automatically, which is wrong. Might be recent U-A-L changes?

Unmerged revisions

411. By Larry Price

merge

410. By Larry Price

Seems to be mostly working

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'qml/common/ContainerEditView.qml'
--- qml/common/ContainerEditView.qml 2017-02-28 20:54:07 +0000
+++ qml/common/ContainerEditView.qml 2017-03-31 20:18:19 +0000
@@ -138,8 +138,7 @@
138 width: parent.width138 width: parent.width
139 onClicked: {139 onClicked: {
140 PopupUtils.close(addAppsDialog)140 PopupUtils.close(addAppsDialog)
141 var packages = containerConfigList.getDebianPackageFiles()141 openDebianPackagePicker()
142 pageStack.addPageToNextColumn(homeView, Qt.resolvedUrl("DebianPackagePicker.qml"), {packageList: packages})
143 }142 }
144 }143 }
145 Button {144 Button {
@@ -153,6 +152,11 @@
153 }152 }
154 }153 }
155154
155 function openDebianPackagePicker() {
156 var fileDialog = Qt.createComponent("DebianPackagePicker.qml").createObject(homeView)
157 fileDialog.open()
158 }
159
156 property var searchResultsView: null160 property var searchResultsView: null
157 function openSearchDialog(container) {161 function openSearchDialog(container) {
158 var dialog = PopupUtils.open(Qt.resolvedUrl("SearchPackagesDialog.qml"), null, {currentContainer: container})162 var dialog = PopupUtils.open(Qt.resolvedUrl("SearchPackagesDialog.qml"), null, {currentContainer: container})
159163
=== modified file 'qml/common/DebianPackagePicker.qml'
--- qml/common/DebianPackagePicker.qml 2017-03-02 19:42:45 +0000
+++ qml/common/DebianPackagePicker.qml 2017-03-31 20:18:19 +0000
@@ -3,7 +3,7 @@
3 * @brief Libertine container Debian package picker view3 * @brief Libertine container Debian package picker view
4 */4 */
5/*5/*
6 * Copyright 2016 Canonical Ltd6 * Copyright 2016-2017 Canonical Ltd
7 *7 *
8 * Libertine is free software: you can redistribute it and/or modify it under8 * Libertine is free software: you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License, version 3, as published by the9 * the terms of the GNU General Public License, version 3, as published by the
@@ -18,80 +18,20 @@
18 */18 */
1919
20import QtQuick 2.420import QtQuick 2.4
21import Ubuntu.Components 1.321import QtQuick.Dialogs 1.0
2222
2323FileDialog {
24Page {24 id: debianPicker
25 id: debianPackagePicker25 title: "Choose debian package to install"
26 header: PageHeader {26 nameFilters: ["debian packages (*.deb)"]
27 id: pageHeader27 selectMultiple: true
28 title: i18n.tr("Available Debian Packages to Install")28 onAccepted: {
29 }29 if (debianPicker.fileUrls.length > 0) {
3030 var packages = ""
31 property var packageList: null31 for (var i = 0; i < fileUrls.length; ++i) {
3232 packages += fileUrls[i].toString().replace("file:///", "/") + " "
33 ListModel {33 }
34 id: packageListModel34 homeView.installPackage(packages)
35 }35 }
3636 }
37 UbuntuListView {
38 id: listView
39 anchors {
40 topMargin: pageHeader.height
41 fill: parent
42 }
43 model: packageListModel
44 visible: packageList.length > 0 ? true : false
45
46 function install(fileName) {
47 pageStack.removePages(debianPackagePicker)
48 pageStack.currentPage.installPackage(containerConfigList.getDownloadsLocation() + "/" + fileName)
49 }
50
51 delegate: ListItem {
52 id: packageItem
53 Label {
54 text: model.file_name
55 anchors {
56 verticalCenter: parent.verticalCenter
57 left: parent.left
58 leftMargin: units.gu(2)
59 }
60 }
61
62 onClicked: {
63 listView.install(model.file_name)
64 }
65
66 trailingActions: ListItemActions {
67 actions: [
68 Action {
69 iconName: "select"
70 description: i18n.tr("Install Package")
71 onTriggered: {
72 listView.install(model.file_name)
73 }
74 }
75 ]
76 }
77 }
78 }
79
80 Label {
81 id: emptyLabel
82 anchors.centerIn: parent
83 visible: packageList.length == 0 ? true : false
84 wrapMode: Text.Wrap
85 width: parent.width
86 horizontalAlignment: Text.AlignHCenter
87 text: i18n.tr("No Debian packages available")
88 }
89
90 Component.onCompleted: {
91 for (var i = 0; i < packageList.length; ++i)
92 {
93 packageListModel.append({"file_name": packageList[i]})
94 }
95 }
96
97}37}

Subscribers

People subscribed via source and target branches