[En-Nut-Discussion] Optimizing nutconf
Thiago A. Corrêa
thiago.correa at gmail.com
Mon Jan 12 15:07:50 CET 2009
On Mon, Jan 12, 2009 at 8:31 AM, Harald Kipp <harald.kipp at egnite.de> wrote:
> Thiago A. Corrêa wrote:
>> You know... I was almost going to rewrite the nutconf (nutconf2) using
>> Qt, just for the fun of it. Doesn't seam too much work, since all of
>> the "what to do and how" is already layed out in nutconf code.
>> Qt code looks much better and shouldn't have so many issues on other
>> platforms (Mac issues, now KDE).
> I'd like to have your time, Thiago. ;-)
Hehe. It's not all that much free time, it's just that I'm used to Qt
coding.... plus I had a boring weekend with my fiance working all
> If you really want to do some Linux GUI work, why not try to fix the
> wxWidget/GTK code for us? If you are able to run KDE4 like me or Gnome
> 2.24 like Ole, then you may be able to re-produce the seg-fault. My
> experience with Unix GUI stuff ended in early X11 days. When looking to
> the internal wxWidgets GTK stuff, I became totally puzzled.
I had some difficulty with the wxWidgets public API and building :P
I tried to, under windows at least I could build a project file to
build it, but under linux I had the problems I mentioned with
>>> IMHO it is not allowed to have both, a pure-specifier and the
>>> definition. Although, the MS compiler accepted that statement. Do we
>>> need the declaration of the destructor at all?
>> Actually, destructors are a speciall case in pure virtual syntax, they
>> must always have a body, and since the compiler won't generate one if
>> you declare it, you must provide one. Probably the compiler has a bug
>> with the inline body.
> Sorry, that still doesn't make sense me. If you provide a body, why do
> you need the pure-specifier then?
Well, an abstract class is one that you can't instantiate. Usually any
pure virtual method makes it abstract, and classes that inherit from
it must implement those methods. They usually don't have a body in the
abstract class. When you don't have any methods that are required to
be reimplemented, you can make the destructor pure virtual. The
problem is that destructors are required to always have a body
(compiler will generate one for you if you omit the destructor).
Here is where the C++ specification got tricky, when you declare a
destructor (or constructor) it will disable the compiler's auto
generate feature. Therefore an special case was made for destructors
in the C++ specification. :)
Destructors are really just the one special case with pure virtuals.
All modern compilers should accept this, not that the specification is
new, but rather that compilers took quite a long time to adhere to the
C++ specifications. Now most comply with most part of the C++ 98. Even
partial template specialization is ok with MSVC and gcc now. Qt only
has to work around that for MSVC6 which is very old and buggy, they
probably only do that because of commercial customers given that MSVC7
and 8 are free downloads as long as you don't care for plugin support
in the IDE.
Thiago A. Correa
More information about the En-Nut-Discussion