diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2017-06-12 20:50:44 -0700 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2017-06-19 09:22:41 +0000 |
commit | 87dafe8778d8637a30646c3e7ee90e8a87d792d7 (patch) | |
tree | 37aa0775fd6c6f0288e7a93ba4d009874d5546e7 /src/oauth/qoauthhttpserverreplyhandler.cpp | |
parent | 9c170ef9431f8ceec8d9c474de9d75d8dedaa3b9 (diff) |
Replace std::bind with lambdas
They don't compile with Clang 5.0 + libstdc++ from GCC 7.
I didn't care to investigate why.
functional:841:7: error: static_assert failed "Wrong number of arguments for pointer-to-member"
[...]
qoauth2authorizationcodeflow.cpp:340:13: note: while substituting deduced template arguments into function template
'bind' [with _Func = void (QAbstractOAuthReplyHandler::*)(QNetworkReply *), _BoundArgs = <QAbstractOAuthReplyHandler *, QNetworkReply *>]
Change-Id: Ia53158e207a94bf49489fffd14c791ec1aaa707d
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/oauth/qoauthhttpserverreplyhandler.cpp')
-rw-r--r-- | src/oauth/qoauthhttpserverreplyhandler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/oauth/qoauthhttpserverreplyhandler.cpp b/src/oauth/qoauthhttpserverreplyhandler.cpp index c39f051..0748acf 100644 --- a/src/oauth/qoauthhttpserverreplyhandler.cpp +++ b/src/oauth/qoauthhttpserverreplyhandler.cpp @@ -52,7 +52,7 @@ QOAuthHttpServerReplyHandlerPrivate::QOAuthHttpServerReplyHandlerPrivate( text(QObject::tr("Callback received. Feel free to close this page.")), q_ptr(p) { QObject::connect(&httpServer, &QTcpServer::newConnection, - std::bind(&QOAuthHttpServerReplyHandlerPrivate::_q_clientConnected, this)); + [this]() { _q_clientConnected(); }); } QOAuthHttpServerReplyHandlerPrivate::~QOAuthHttpServerReplyHandlerPrivate() @@ -67,7 +67,7 @@ void QOAuthHttpServerReplyHandlerPrivate::_q_clientConnected() QObject::connect(socket, &QTcpSocket::disconnected, socket, &QTcpSocket::deleteLater); QObject::connect(socket, &QTcpSocket::readyRead, - std::bind(&QOAuthHttpServerReplyHandlerPrivate::_q_readData, this, socket)); + [this, socket]() { _q_readData(socket); }); } void QOAuthHttpServerReplyHandlerPrivate::_q_readData(QTcpSocket *socket) |