mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-14 11:46:34 +02:00
Remove this
and connection from lambda expression
Clang in Xcode 11 is more aggressive about its warnings. This resolves one of the issue Clang noticed in order to support building w/Xcode 11. I first attempted to remove `this` completes, but VS complained that `QObject::disconnect` was being called without `this`. This change satisfies both Clang and VS. A second attempt added this back and then called `disconnect` directly. This also generated a Clang warning. This version resolves the issue by removing the error handler. This also resolves a memory leak caused by the error handler.
This commit is contained in:
parent
69e586cc54
commit
8dc91d640b
1 changed files with 0 additions and 6 deletions
|
@ -232,12 +232,6 @@ void AvatarBookmarks::loadBookmark(const QString& bookmarkName) {
|
|||
emit bookmarkLoaded(bookmarkName);
|
||||
});
|
||||
|
||||
std::shared_ptr<QMetaObject::Connection> connection2 = std::make_shared<QMetaObject::Connection>();
|
||||
*connection2 = connect(myAvatar.get(), &MyAvatar::onLoadFailed, [this, bookmarkName, connection2]() {
|
||||
qCDebug(interfaceapp) << "Failed to load avatar bookmark" << bookmarkName;
|
||||
QObject::disconnect(*connection2);
|
||||
});
|
||||
|
||||
qCDebug(interfaceapp) << "Start loading avatar bookmark" << bookmarkName;
|
||||
|
||||
const QString& avatarUrl = bookmark.value(ENTRY_AVATAR_URL, "").toString();
|
||||
|
|
Loading…
Reference in a new issue