diff --git a/src/contactmodel.cpp b/src/contactmodel.cpp index 59b4e5eb50e22bfa53404027ff9a46295398f6f8..34311875fd010a53602a7e9b498e55d30ed5024c 100644 --- a/src/contactmodel.cpp +++ b/src/contactmodel.cpp @@ -214,6 +214,7 @@ ContactModel::hasPendingRequests() const int ContactModel::pendingRequestCount() const { + if (!pimpl_) return 0; std::lock_guard<std::mutex> lk(pimpl_->contactsMtx_); int pendingRequestCount = 0; std::for_each(pimpl_->contacts.begin(), pimpl_->contacts.end(), @@ -232,7 +233,7 @@ ContactModel::addContact(contact::Info contactInfo) // If passed contact is a banned contact, call the daemon to unban it auto it = std::find(pimpl_->bannedContacts.begin(), pimpl_->bannedContacts.end(), profile.uri); if (it != pimpl_->bannedContacts.end()) { - qDebug() << QString("Unban-ing contact %s").arg(profile.uri); + qDebug() << QString("Unban-ing contact %1").arg(profile.uri); ConfigurationManager::instance().addContact(owner.id, profile.uri); // bannedContacts will be updated in slotContactAdded return; diff --git a/src/newaccountmodel.cpp b/src/newaccountmodel.cpp index 45d3adb8fe4679c2663a899dc7aae1d5b7337914..da519930b6f6263f0d9dc44b89019b2f9bdd6769 100644 --- a/src/newaccountmodel.cpp +++ b/src/newaccountmodel.cpp @@ -398,7 +398,7 @@ NewAccountModelPimpl::updateAccounts() for (auto& it : accounts) { auto& accountInfo = it.second.first; if (!accountIds.contains(accountInfo.id)) { - qDebug() << QString("detected account removal %s").arg(accountInfo.id); + qDebug() << QString("detected account removal %1").arg(accountInfo.id); toBeRemoved.push_back(accountInfo.id); } } @@ -414,7 +414,7 @@ NewAccountModelPimpl::updateAccounts() // "Remote peer disconnected", "The name is not activable", etc. // So avoid to create useless directories. if (account == accounts.end() && id.indexOf(" ") == -1) { - qDebug() << QString("detected new account %s").arg(id); + qWarning() << QString("detected new account %1").arg(id); addToAccounts(id); auto updatedAccount = accounts.find(id); if (updatedAccount == accounts.end()) { diff --git a/src/newcallmodel.cpp b/src/newcallmodel.cpp index d2c7c43abda997b0aeb3ec2779d71b3634427890..e01ce541ae6042b627975ff395c3ee3f3598257e 100644 --- a/src/newcallmodel.cpp +++ b/src/newcallmodel.cpp @@ -700,7 +700,7 @@ NewCallModelPimpl::slotCallStateChanged(const QString& callId, const QString& st return; } - qDebug() << QString("slotCallStateChanged (call: %s), from %s to %s") + qDebug() << QString("slotCallStateChanged (call: %1), from %2 to %3") .arg(callId) .arg(call::to_string(previousStatus)) .arg(call::to_string(status));