Code Review for Willard: BOR Truckee task 1.5 -- Slot Usability Enhancement
- Phil Weinstein, 3-20-2017 (b)

Willard, really great work of limiting changes to exactly what needs to change. This really helps the commit history/diffs to document exactly what was done to implement the desired functionality.

Also, good level of commenting. Not too much. Kinda perfect.

Note: I'll mark my comments with "Academic" to indicate my preferences, but not something that actually needs to be changed.

Reviewed, "SlotUE" branch:
  https://cadswes2.colorado.edu/internal/cgi-bin/gitweb/gitweb.pl/builds.git/shortlog/refs/heads/SlotUE

(1) Q3GUI/ScalarSlotDlg.cpp
and Q3GUI/SlotQtDlg.cpp

New code:

if ( exists && _slot )
{ // setToggleRelevant() updates the toggle, which sets the tooltip
// to the "null string", so we need only set an existing tooltip
// if setting the toggle as relevant
QString desc = _slot->getUserDesc();
_descToggles->setToggleToolTip( _descTogglesIndex_desc, desc );
}

Academic: I prefer to have a reasonable effect in "non-conforming" cases, rather than having no effect. If _slot is NULL, it would be better to NOT leave any possibly present previously set tooltip. (This is probably academic because if _slot changes from being defined to being NULL, the whole dialog would be deleted. If this was a more fundamental effect -- i.e. not just tooltip text -- I wouldn't want to make that assumption).

That is, I would code it like this::

QString desc = _slot ? _slot->getUserDesc() : QString("");
_descToggles->setToggleToolTip( _descTogglesIndex_desc, desc );

(2) QtRpl/RowOToggles.hpp / .cpp

Good Stuff:

Academic:

Do Change:

(3) QtRpl/RplBlockDlg.cpp, QtRpl/RplFunctionDlg.cpp, QtRpl/RplGroupDlg.cpp, QtRpl/RplSetDlg.cpp

Do Change:

--- (end) ---