Need help with QDeclarativeNetworkAccessManagerFactory
-
I have app with declarative view. On declarative side i use WorkerScript and XMLHttpRequest to get news from server. All good but some users use this app in environment where there is transparen proxy wtih authorisation. Ok, I wrote QDeclarativeNetworkAccessManagerFactory for creating QNetworkAccessManager wtih proxy settings. Because QDeclarativeNetworkAccessManagerFactory is not child of QObject I wrote special class to ba able to handle signal proxyAuthenticationRequired. I want in the slot show modal dialog where user can enter user name and password for proxy.
Slot code
@void NetworkAccessManagerCreator::onProxyAuthenticationRequired(QNetworkProxy proxy, QAuthenticator *authenticator )
{
WidgetSettings settings;ProxyDialog dlg; dlg.setProxyUrl(proxy.hostName() ); if( dlg.exec() == QDialog::Accepted ) { authenticator->setUser(settings.proxyUser()); authenticator->setPassword(settings.proxyPassword()); }
}@
When creates an instance of of dialogue, I get an error "Microsoft Visual C++ Runtime Library
Runtime Error! This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information."I'm guessing that the error in the call to dialogue in another thread, but I do not understand how to fix it
May be some one have any ideas