Code review comment for lp:~trb143/openlp/servicing

Revision history for this message
Martin Thompson (mjthompson) wrote :

On Mon, May 04, 2009 at 06:35:06PM -0000 or thereabouts, Raoul Snyman wrote:
>
> 966 - self.Layout = QtGui.QVBoxLayout(self)
> 967 + self.Layout = QVBoxLayout(self)
>
> Please rather use "from PyQt4 import QtCore, QtGui" as it pollutes
> the local namespace less. (I'm also cleaning this up in my local
> cleanup branch).

If I can throw in my 2p worth here... it appears to me to be more
Qt-like to *not* prefix everything with the, and it certainly reduces
the amount of typing, and faffing around remembering whether something
is Core, or Gui.

In addition, I found that the endless prefixes got in the way of my
understanding of the code, which is why I stopped using them in my
later code (after I'd seen somewhere suggesting it - can't recall
where though). This might be (yet another) case of Tim getting the
blame for my coding - sorry!

From the point of view of namespace pollution, all the Qt calls have a
Q on the front to avoid collisions, and I think that's likely to be
pretty successful...

Anyway, that was my thinking when I started doing it, but I'll go with
the consensus in future!

--
<email address hidden>
  A man leaves his darkness when he follows the Son
      - The Great American Novel (Larry Norman)
%

« Back to merge proposal