openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #13461
Re: [Merge] lp:~mahfiaz/openlp/bug-860876 into lp:openlp
Without trying to drag this conversation out any more, since the merge has already happened... Meinert, in this particular instance, I'm going to have to agree with Mattias.
Firstly, QtCore has already been imported, and therefore is already in memory, whereas urllib, while part of Python, is not in memory yet. Therefore, importing urllib will actually increase OpenLP's memory footprint.
Secondly, PyQt4's versions of classes such as QString and QByteArray contain a __unicode__ method, which internally converts the contents of the object to unicode from whatever encoding it is in. The object knows what encoding it is in, and thus we don't have to play any guessing games. A Python str does not contain any encoding information, and so we're none-the-wiser when we try to decode it. So with a str we'd have to play guessing games, whereas with a QByteArray, we don't have to care, we just tell it to give us unicode.
--
https://code.launchpad.net/~mahfiaz/openlp/bug-860876/+merge/85758
Your team OpenLP Core is subscribed to branch lp:openlp.
References