Changing this to QPointer<Entry> historyEntry = new Entry(); would be nice.
After the removeHistoryItems() call it can be checked if historyEntry has been deleted with QVERIFY(historyEntry.isNull());