Thought about a Qt port

Lubomir I. Ivanov neolit123 at gmail.com
Sun Mar 31 12:19:37 PDT 2013


On 31 March 2013 20:37, Alberto Mardegan <mardy at users.sourceforge.net> wrote:
> On 03/31/2013 06:28 AM, Dirk Hohndel wrote:
>> linking with g++ solves that but then of course the resulting program
>> doesn't run...
>
> Strange, that worked for me. Anyway, linking with g++ is indeed correct,
> so I changed that.
>
>> I am happy to track things in a Qt branch in the official
>> repository. And I'm ok with things in that branch not working /
>> compiling at times. One thing that I do insist on are Signed-off-by:
>> lines for every commit...
>
> Absolutely. But please don't consider these commits as anything that I'd
> submit, they are just a playground to test some things and receive early
> feedback on the generic approach; and don't be too much upset if I'll
> rebase that wip branch -- I indeed plan to do it, and will try to come
> up with commits split in a way that makes sense.
>
> About the changes themselves, feel free to comment (and nitpick on the
> style); if I don't hear anything, I'll assume it's all OK.
>
> I added one more commit which actually does something:
> https://github.com/mardy/subsurface/commit/f1b180afcd3398fec5c0c438ca86b01ab0acc69d
>

i think we should use NULL instead of setting pointers to 0, for clarity mostly.

> Another thing that you (and especially other Qt developers here) might
> want to comment about, is the definition of C++ classes in the .cpp
> files themselves (and not in a header file).
> I usually declare and define the private classes (those that don't need
> to be visible outside of the .cpp file) in the .cpp file itself, while
> generally Qt developers (at least KDE ones) prefer to have the
> declaration in a separate header file, leaving only the methods
> definitions in the .cpp file.  I find it more annoying than helpful (it
> increases the number of files, and force switching files in the editor
> often than necessary), but might be just me. :-)
>

a class that is only used in a particular .cpp file is OK to be
defined/declared in that file, IMHO. its just an object after all..
also, i would probably combine the declaration and definition into one
unless a forward declaration is needed of sorts. the C analogy here is
quite clear, in my book at least.

lubomir
--


More information about the subsurface mailing list