Arpitgarg
22nd March 2011, 08:45
Hi,
I want to implement fortune server/client example on a different IP. Well I changed the code which finds the IP Addr with this one.
QString ipAddress="10.0.0.132";
QHostAddress(QHostAddress("10.0.0.132") );
and in network access manager
QNetworkConfigurationManager manager;
if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequir ed) {
// Get saved network configuration
QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
settings.beginGroup(QLatin1String("QtNetwork"));
const QString id = settings.value(QLatin1String("DefaultNetworkConfiguration")).toString();
settings.endGroup();
// If the saved network configuration is not currently discovered use the system default
QNetworkConfiguration config = manager.configurationFromIdentifier(id);
if ((config.state() & QNetworkConfiguration::InternetAccessPoint) !=
QNetworkConfiguration::InternetAccessPoint) {
config = manager.defaultConfiguration();
}
networkSession = new QNetworkSession(config, this);
connect(networkSession, SIGNAL(opened()), this, SLOT(sessionOpened()));
I did the same in both server /client.
it gave an error ::Cannot retrieve debugging output!
Pls help me understand the problem
I want to implement fortune server/client example on a different IP. Well I changed the code which finds the IP Addr with this one.
QString ipAddress="10.0.0.132";
QHostAddress(QHostAddress("10.0.0.132") );
and in network access manager
QNetworkConfigurationManager manager;
if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequir ed) {
// Get saved network configuration
QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
settings.beginGroup(QLatin1String("QtNetwork"));
const QString id = settings.value(QLatin1String("DefaultNetworkConfiguration")).toString();
settings.endGroup();
// If the saved network configuration is not currently discovered use the system default
QNetworkConfiguration config = manager.configurationFromIdentifier(id);
if ((config.state() & QNetworkConfiguration::InternetAccessPoint) !=
QNetworkConfiguration::InternetAccessPoint) {
config = manager.defaultConfiguration();
}
networkSession = new QNetworkSession(config, this);
connect(networkSession, SIGNAL(opened()), this, SLOT(sessionOpened()));
I did the same in both server /client.
it gave an error ::Cannot retrieve debugging output!
Pls help me understand the problem