diff MainWindowController.py @ 16:3ffecc709da9

move fetch logic into Feed
author Dirk Olmes <dirk@xanthippe.ping.de>
date Wed, 28 Apr 2010 03:00:11 +0200
parents b1aeb98824c1
children 5fda8bd94fa8
line wrap: on
line diff
--- a/MainWindowController.py	Wed Apr 28 02:57:41 2010 +0200
+++ b/MainWindowController.py	Wed Apr 28 03:00:11 2010 +0200
@@ -23,11 +23,8 @@
     def __init__(self, parent=None, **args):
         QAbstractListModel.__init__(self, parent, *args)
         self.session = parent.session
-        self.fetchAllFeeds()
-        
-    def fetchAllFeeds(self):
-        self.allFeeds = self.session.query(Feed).all()
-        
+        self.allFeeds = Feed.all(parent.session)
+                
     def rowCount(self, parent=QModelIndex()):
         return len(self.allFeeds)