X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fcoreaccountmodel.cpp;h=f7c77240664574ba0935a7d9fe373440707214d9;hp=0e323bb48f6d53333dc89963d1902d8ec1f18da8;hb=7cf8b4e04ae10dd68d344444c49499d4f916394c;hpb=c619044c4f32da908730dc180005df4da2b377f4 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(); }