diff --git a/src/qcheckgmail.cpp b/src/qcheckgmail.cpp index ed15a0d..071fc77 100644 --- a/src/qcheckgmail.cpp +++ b/src/qcheckgmail.cpp @@ -1023,7 +1023,7 @@ void qCheckGMail::getAccessToken( int counter, m_logWindow.update( logWindow::TYPE::REQUEST,m ) ; - this->networkAccess( { counter,false,request,acc,UrlLabel } ) ; + this->networkAccess( request,{ counter,false,acc,UrlLabel } ) ; } }else{ if( reply.timeOut() ){ @@ -1169,9 +1169,9 @@ qCheckGMail::GMailError qCheckGMail::gmailError( const QByteArray& msg ) return { code,QObject::tr( "Unknown GMail Error" ) } ; } -void qCheckGMail::networkAccess( const networkAccessContext& ctx ) +void qCheckGMail::networkAccess( const QNetworkRequest& request,networkAccessContext ctx ) { - m_manager.get( ctx.request,[ this,ctx = ctx ]( const utils::network::reply& reply ){ + m_manager.get( request,[ this,ctx = std::move( ctx ) ]( const utils::network::reply& reply ){ if( ctx.counter != m_counter ){ @@ -1418,7 +1418,7 @@ void qCheckGMail::checkMail( int counter,const accounts& acc,const QString& UrlL m_logWindow.update( logWindow::TYPE::REQUEST,m ) ; - this->networkAccess( { counter,retrying,s,acc,UrlLabel } ) ; + this->networkAccess( s,{ counter,retrying,acc,UrlLabel } ) ; } } diff --git a/src/qcheckgmail.h b/src/qcheckgmail.h index 17e0f1f..e53c04d 100644 --- a/src/qcheckgmail.h +++ b/src/qcheckgmail.h @@ -113,7 +113,6 @@ private slots: { int counter ; bool retrying ; - const QNetworkRequest& request ; const accounts& acc ; const QString& label ; } ; @@ -130,7 +129,7 @@ private slots: QString txt ; QString accName ; } ; - void networkAccess( const networkAccessContext& ) ; + void networkAccess( const QNetworkRequest&,networkAccessContext ) ; void getGMailAccountInfoWithoutToken( const QString&,addaccount::GmailAccountInfo ) ; void getGMailAccountInfoWithToken( const QString&,addaccount::GmailAccountInfo ) ;