From: Manuel Nickschas Date: Tue, 4 Sep 2018 22:36:11 +0000 (+0200) Subject: clang-tidy: Don't call virtual methods from CoreAccountModel's ctor X-Git-Tag: test-travis-01~147 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=7cf8b4e04ae10dd68d344444c49499d4f916394c clang-tidy: Don't call virtual methods from CoreAccountModel's ctor --- diff --git a/src/client/coreaccountmodel.cpp b/src/client/coreaccountmodel.cpp index 0e323bb4..f7c77240 100644 --- a/src/client/coreaccountmodel.cpp +++ b/src/client/coreaccountmodel.cpp @@ -87,12 +87,10 @@ void CoreAccountModel::save() void CoreAccountModel::clear() { - if (rowCount()) { - beginRemoveRows(QModelIndex(), 0, rowCount()-1); - _internalAccount = 0; - _accounts.clear(); - endRemoveRows(); - } + beginResetModel(); + _internalAccount = 0; + _accounts.clear(); + endResetModel(); }