const and references in method signatures
Fixed segfault when moving the last tab of a tabwidget to another tabwidget