subsurface/qt-ui
Linus Torvalds eb47b2a8d8 Get rid of crazy empty tag_list element at the start
So this is totally unrelated to the git repository format, except for
the fact that I noticed it while writing the git saving code.

The subsurface divetag list handling is being stupid, and has a
initial dummy entry at the head of the list for no good reason.

I say "no good reason", because there *is* a reason for it: it allows
code to avoid the special case of empty list and adding entries to
before the first entry etc etc.  But that reason is a really *bad*
reason, because it's valid only because people don't understand basic
list manipulation and pointers to pointers.

So get rid of the dummy element, and do things right instead - by
passing a *pointer* to the list, instead of the list. And then when
traversing the list and looking for a place to insert things, don't go
to the next entry - just update the "pointer to pointer" to point to
the address of the next entry. Each entry in a C linked list is no
different than the list itself, so you can use the pointer to the
pointer to the next entry as a pointer to the list.

This is a pet peeve of mine. The real beauty of pointers can never be
understood unless you understand the indirection they allow. People
who grew up with Pascal and were corrupted by that mindset are
mentally stunted. Niklaus Wirth has a lot to answer for!

But never fear. You too can overcome that mental limitation, it just
needs some brain exercise. Reading this patch may help. In particular,
contemplate the new "taglist_add_divetag()".

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-10 11:36:17 -07:00
..
css Fix TableWidget ( equipment ones ) on dark scheme. 2013-12-12 03:26:39 +01:00
marble Resync included header with upstream 2014-01-15 15:49:50 +07:00
profile Profile2: reset the zoom level when a new profile is drawn 2014-03-10 09:02:31 -07:00
about.cpp Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
about.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
about.ui SubsurfaceAbout class cleanup. 2014-02-08 08:00:27 -08:00
completionmodels.cpp Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
completionmodels.h Put include guard to every header 2014-02-11 12:37:01 -08:00
divecomputermanagementdialog.cpp Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
divecomputermanagementdialog.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
divecomputermanagementdialog.ui
divelistview.cpp Whitespace cleanup 2014-03-03 13:29:22 -08:00
divelistview.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
divelogimportdialog.cpp Whitespace cleanup 2014-03-03 13:29:22 -08:00
divelogimportdialog.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
divelogimportdialog.ui Tune CVS import dialog 2014-02-27 11:44:59 -08:00
diveplanner.cpp Fix colors on the new profile. 2014-03-07 20:37:17 -08:00
diveplanner.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
diveplanner.ui
downloadfromdivecomputer.cpp Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
downloadfromdivecomputer.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
downloadfromdivecomputer.ui Enable libdivecomputer log or dump from the UI 2013-12-24 16:26:00 -08:00
exif.cpp Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
exif.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
globe.cpp Remove pointless assignments 2014-03-03 21:40:56 -08:00
globe.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
graphicsview-common.cpp Fix colors on the new profile. 2014-03-07 20:37:17 -08:00
graphicsview-common.h Fix colors on the new profile. 2014-03-07 20:37:17 -08:00
groupedlineedit.cpp Whitespace cleanup 2014-03-03 13:29:22 -08:00
groupedlineedit.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
kmessagewidget.cpp Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
kmessagewidget.h Another small tweak to whitespace tool 2014-03-05 13:02:23 -08:00
maintab.cpp Get rid of crazy empty tag_list element at the start 2014-03-10 11:36:17 -07:00
maintab.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
maintab.ui Expand tags approach to divemaster field 2014-01-19 13:57:40 -08:00
mainwindow.cpp Remove the old profile from the main screen of Subsurface 2014-03-07 08:54:20 -08:00
mainwindow.h Remove the old profile from the main screen of Subsurface 2014-03-07 08:54:20 -08:00
mainwindow.ui Remove the old profile from the main screen of Subsurface 2014-03-07 08:54:20 -08:00
modeldelegates.cpp Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
modeldelegates.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
models.cpp Another small tweak to whitespace tool 2014-03-05 13:02:23 -08:00
models.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
preferences.cpp Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
preferences.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
preferences.ui Remove the graph options from the Preferences 2014-02-08 14:29:40 -08:00
printdialog.cpp Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
printdialog.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
printlayout.cpp Fix compile problem 2014-03-07 10:03:03 -08:00
printlayout.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
printoptions.cpp
printoptions.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
printoptions.ui
renumber.ui
shiftimagetimes.ui Compute dive computer/camera time offset from sample picture 2014-02-17 10:59:30 -08:00
shifttimes.ui
simplewidgets.cpp Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
simplewidgets.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
starwidget.cpp Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
starwidget.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
subsurfacewebservices.cpp Remove the old profile from the main screen of Subsurface 2014-03-07 08:54:20 -08:00
subsurfacewebservices.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
tableview.cpp Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
tableview.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
tableview.ui
tagwidget.cpp Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
tagwidget.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
usermanual.cpp Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
usermanual.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
usermanual.ui Close search panel by button click 2014-02-10 07:12:35 -08:00
webservices.ui Improve the download from Subsurface webservice dialog 2014-01-15 15:33:04 +07:00