Project directory structure

Thiago Macieira thiago at macieira.org
Tue Apr 2 14:34:04 PDT 2013


On terça-feira, 2 de abril de 2013 14.08.40, Dirk Hohndel wrote:
> > In any case, we can make an easy separation: C++ code uses camelCase, C
> > code uses name_with_underline.
> 
> Yuck. I do not care for camelCase. But then again, all the scientific
> studies which one is better have been rigged by one side or the other...

Well, the Qt-using code would be interfacing with the camelCase Qt API anyway, 
so it's unavoidable.

But if you prefer, the project could standardise on underscores for all 
function names, even in C++.

> >> Maybe we should add a Readme-Qt file that collects all the great advice
> > 
> >> that is being rendered here:
> > Other projects usually call it HACKING and they include information on how
> > to develop, where things are, what the conventions are, etc. I'd say that
> > a choice of whether or not to use the automatic connection belongs in
> > that file.
>
> Definitely. Care to get one started? :-)

Sure, just not today. In any case, it needs information from the C side too: 
how does one hack it, how do you do things there?

> > Actually, this is something I recommend even for advanced devs: run "git
> > grep getenv" in the source code and see what switches you can toggle.
> 
> That assumes that I have the Qt sources installed somewhere, right?

Indeed. Strings also helps:

$ strings $objdir/lib/libQt{Core,Gui}.so | grep QT_
QT_PLUGII
QT_CRASH_OUTPUT
QT_NO_CPU_FEATURE
QT_DEBUG_PLUGINS
QT_FATAL_WARNINGS
QSharedPointer: internal self-check inconsistency: pointer %p was not tracked. 
To use QT_SHAREDPOINTER_TRACK_POINTERS, you have to enable it throughout in 
your code.
QT_NO_THREADED_GLIB
QT_NO_GLIB
QT_PLUGIN_PATH
_QT_SELECTION
_QT_CLIPBOARD_SENTINEL
_QT_SELECTION_SENTINEL
_QT_SCROLL_DONE
_QT_INPUT_ENCODING
QT_LAYOUT_DIRECTION
_QT_SETTINGS_TIMESTAMP_
QT_DEFAULT_RUNTIME_SYSTEM
QT_DEBUG_FPS
QT_NO_GLIB
QT_PLATFORM_PLUGIN
QT_ACCESSIBILITY
QT_STYLE_OVERRIDE
QT_USE_NATIVE_WINDOWS
QT_NO_SUBTRACTOPAQUESIBLINGS
QT_NO_FAST_MOVE
QT_NO_FAST_SCROLL
QT_ONSCREEN_PAINT
QT_SLOW_TOPLEVEL_RESIZE
QT_DRAW_SCENE_ITEM_RECTS
QT_ANCHORLAYOUT_NO_SIMPLIFICATION
QT_X11_NO_FONTCONFIG
QT_X11_NO_MITSHM
QT_X11_NO_XRENDER
QT_GRAPHICSSYSTEM

All without leading underscore are getenvs, except for QT_PLUGII (I have no 
idea where that one comes from) and QT_LAYOUT_DIRECTION, which is read from 
translation files and specifies the default text direction (LTR or RTL). The 
ones with underscore are probably X11 atoms.

Some are self-explanatory, some are debugging, some I recognise (onscreen 
paint → disable double buffering and paint directly on screen). The other ones 
must be workarounds for buggy external software (no threaded glib, no fast 
move, no fast scroll, slow top-level resize).

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130402/97efff66/attachment.sig>


More information about the subsurface mailing list