diff --git a/mainwindow.cpp b/mainwindow.cpp index efb48b528401a4dd48160f55c6d6f817623e8dfe..74eaa41cdb419eb47eeec5db6637491e607baef3 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -290,6 +290,7 @@ MainWindow::closeEvent(QCloseEvent* event) settings.setValue(SettingsKey::geometry, saveGeometry()); settings.setValue(SettingsKey::windowState, saveState()); } + this->disconnect(screenChangedConnection_); LRCInstance::reset(); QMainWindow::closeEvent(event); } diff --git a/smartlistmodel.cpp b/smartlistmodel.cpp index 03551f983c4c8bbdef4a7016de2e5614536c0c4f..be10454b28c79c5bfc1e0b85fefe75962432c05e 100644 --- a/smartlistmodel.cpp +++ b/smartlistmodel.cpp @@ -40,9 +40,7 @@ SmartListModel::SmartListModel(const lrc::api::account::Info &acc, QObject *pare int SmartListModel::rowCount(const QModelIndex &parent) const { if (!parent.isValid()) { - try { - return acc_.conversationModel->allFilteredConversations().size(); - } catch (...) {} + return acc_.conversationModel->allFilteredConversations().size(); } return 0; // A valid QModelIndex returns 0 as no entry has sub-elements }