[PyKDE] Minor changes to eric to support old project files...

Mike C. Fletcher mcfletch at rogers.com
Mon Jan 23 16:39:02 GMT 2006


Hi all, just updated to Eric 3.8.1 (running on Gentoo).  Basically none 
of my projects would load (they were originally generated from an old 
script, but have since been saved by Eric).  There were 3 lines that 
needed changes to get them to load:

Project/Project.py line 221 assumes the presence of sourceKey in the 
sourceExtensions dictionary, suggest using get with a default empty 
tuple/list:

        for ext in self.sourceExtensions.get(sourceKey,[]):

VCS/cvsPackage/ProjectBrowserHelper.py line 190 and 305 assume that they 
get a valid menu.  On my system it's getting None.  I just return in 
that case:

    def addVCSMenu(self, menu):
        """
        Public method used to add the VCS menu to all project browsers.
       
        @param menu reference to the menu to be amended
        """
        if not menu:
            return False
...

    def addVCSMenuBack(self, menu):
        """
        Public method used to add the VCS menu to all project browsers.
       
        @param menu reference to the menu to be amended
        """
        if not menu:
            return False
...

Those last two are obviously just hacks, but they do let Eric finish 
loading the files (the first one prevents loading entirely, the second 
two leave the mouse cursor in a "waiting" state, which is somewhat 
annoying to work with).

Have fun,
Mike

-- 
________________________________________________
  Mike C. Fletcher
  Designer, VR Plumber, Coder
  http://www.vrplumber.com
  http://blog.vrplumber.com




More information about the PyQt mailing list