Skip to content
Permalink
Browse files

wms provider: fix status messages from data items

  • Loading branch information
jef-n committed Feb 25, 2014
1 parent 6c9dd84 commit 07516fcdff36d3c7339d7b031e18d82ec781cb80
Showing with 18 additions and 1 deletion.
  1. +18 −1 src/providers/wms/qgswmsdataitems.cpp
@@ -69,7 +69,24 @@ QVector<QgsDataItem*> QgsWMSConnectionItem::createChildren()
}

QgsWmsCapabilitiesDownload capDownload( wmsSettings.baseUrl(), wmsSettings.authorization() );
connect( &capDownload, SIGNAL( statusChanged( QString ) ), this, SLOT( showStatusMessage( QString ) ) );

QWidget *mainWindow = 0;

QWidgetList topLevelWidgets = qApp->topLevelWidgets();
for ( QWidgetList::iterator it = topLevelWidgets.begin(); it != topLevelWidgets.end(); ++it )
{
if (( *it )->objectName() == "QgisApp" )
{
mainWindow = *it;
break;
}
}

if ( mainWindow )
{
connect( &capDownload, SIGNAL( statusChanged( QString ) ), mainWindow, SLOT( showStatusMessage( QString ) ) );
}


QApplication::setOverrideCursor( Qt::WaitCursor );
bool res = capDownload.downloadCapabilities();

0 comments on commit 07516fc

Please sign in to comment.
You can’t perform that action at this time.