Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'jb51416' into 'master'
[qtcontacts-sqlite] Avoid QVariant comparison during destruction. Contributes to JB#51416

See merge request mer-core/qtcontacts-sqlite!48
  • Loading branch information
chriadam committed Oct 6, 2020
2 parents 73ae220 + 829d3c7 commit aff7537
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/engine/contactsengine.cpp
Expand Up @@ -1343,7 +1343,8 @@ ContactsEngine::~ContactsEngine()
QCoreApplication *app = QCoreApplication::instance();
QList<QVariant> engines = app->property(CONTACT_MANAGER_ENGINE_PROP).toList();
for (int i = 0; i < engines.size(); ++i) {
if (engines[i] == QVariant::fromValue(this)) {
QContactManagerEngine *engine = static_cast<QContactManagerEngine*>(engines[i].value<QObject*>());
if (engine == this) {
engines.removeAt(i);
break;
}
Expand Down

0 comments on commit aff7537

Please sign in to comment.