Dez 042020
 

Mit Code Coverage kann geprüft werden, welche Zeilen in einem Programm wie häufig aufgerufen werden. Das hat im Wesentlichen zwei Vorteile:

  1. Man kann toten Code entdecken
  2. Man kann durch die sog. Testabdeckung feststellen, ob wirklich alle Code-Teile beim Test durchlaufen werden.

Gerade der letzte Punkt ist wichtig, da man mit der angestrebten Testabdeckung von 100% jeden erdenklichen Testfall – auch im Fehlerfall – durchlaufen hat. Man kann dadurch (theoretisch) vollständig testen, ob sich der geprüfte Code wie gewünscht verhält.

Continue reading »
Apr 132020
 

Qt erlaubt es, durch hierarchische Anordnung von Layouts das Aussehen zu optimieren. Beim Anlegen der Layout-Hierarchie geht man Bottom-up vor. Dabei werden erst alle GUI Elemente wie Push-Buttons, Radio-Buttons, Checkboxes, etc. auf die Dialogfläche grob angeordnet. Speziell bei Radio-Buttons gibt es noch zusätzlich die Gruppierung zu beachten. Innerhalb einer Gruppierung kann nur ein Radio-Button aktiviert sein. Es natürlich möglich, mehrere Radio-Groups anzulegen.

Continue reading »
Mrz 052016
 

YAKINDU statechart tools are a pretty nice tool to model statemachines. You can generate code for C/C++ and Java out of the model. Further you can validate and simulate your statemachine to verify the behaviour. If you want to integrate your statemachine into a Qt application the concept of signals and slots fits perfectly into the in and out events of the statechart definition language of the YAKINDU SCT. My new custom Qt generator links both concepts together. It generates a C++ class which links between the C++ class generated from the C++ generator of YAKINDU SCT and the custom implementation code which must be implemented for custom behaviour of your application.

Continue reading »