[Pkg-privacy-commits] [tails-installer] 09/27: Avoid warning about missing method when not fully initialized

Intrigeri intrigeri at moszumanska.debian.org
Wed May 24 15:26:58 UTC 2017


This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to tag 3.91.0
in repository tails-installer.

commit 90d5b41e471184a09ef133d06d7437575eabedb6
Author: Martin Briza <mbriza at redhat.com>
Date:   Tue Mar 1 14:22:19 2016 +0100

    Avoid warning about missing method when not fully initialized
---
 liveusb/components/DelegateImage.qml | 2 +-
 liveusb/gui.py                       | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/liveusb/components/DelegateImage.qml b/liveusb/components/DelegateImage.qml
index 5583c0f..a467303 100644
--- a/liveusb/components/DelegateImage.qml
+++ b/liveusb/components/DelegateImage.qml
@@ -6,7 +6,7 @@ Item {
     height: $(84)
 
     readonly property bool isTop: !liveUSBData.releaseProxyModel.get(index-1) || release.category != liveUSBData.releaseProxyModel.get(index-1).category
-    readonly property bool isBottom: !liveUSBData.releaseProxyModel.get(index+1) || (release.category != liveUSBData.releaseProxyModel.get(index+1).category &&  !liveUSBData.releaseProxyModel.isFront)
+    readonly property bool isBottom: !liveUSBData.releaseProxyModel.get(index+1) || (!liveUSBData.releaseProxyModel.isFront && release.category != liveUSBData.releaseProxyModel.get(index+1).category)
 
     readonly property color color: mouse.containsPress ? "#ededed" : mouse.containsMouse ? "#f8f8f8" : "white"
 
diff --git a/liveusb/gui.py b/liveusb/gui.py
index 5acbb53..646bb33 100755
--- a/liveusb/gui.py
+++ b/liveusb/gui.py
@@ -624,6 +624,8 @@ class ReleaseListProxy(QSortFilterProxyModel):
     def get(self, i):
         if i < 0 or i >= len(self.parent().releaseData):
             return None
+        if not self.parent().releaseData[i].category:
+            return None
         return self.parent().releaseData[i]
 
     def rowCount(self, parent=QModelIndex()):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/tails-installer.git



More information about the Pkg-privacy-commits mailing list