Skip to content

Commit

Permalink
QgsIdentifyResults Qt4 update
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@4894 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed Feb 21, 2006
1 parent a096e73 commit b4bf1cc
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions src/raster/qgsrasterlayer.cpp
Expand Up @@ -4786,27 +4786,22 @@ void QgsRasterLayer::identify(QgsRect * r)
if( !mIdentifyResults)
{

// TODO: Doesn't work in Qt4 (list is now just a QWidgetList, not a pointer to one)
#if QT_VERSION < 0x040000
// TODO it is necessary to pass topLevelWidget()as parent, but there is no QWidget availabl
QWidgetList *list = QApplication::topLevelWidgets ();
QWidgetListIt it( *list );
QWidget *w;
// Win32 doesn't like this approach to creating the window and seems
// to work fine without it [gsherman]
QWidget *top = 0;
while ( (w=it.current()) != 0 )
#ifndef WIN32
foreach (QWidget *w, QApplication::topLevelWidgets())
{
++it;
if ( typeid(*w) == typeid(QgisApp) )
{
top = w;
break;
}
if ( typeid(*w) == typeid(QgisApp) )
{
top = w;
break;
}
}
delete list;
#endif
QgsAttributeAction aa;
mIdentifyResults = new QgsIdentifyResults(aa, top);
mIdentifyResults->restorePosition();
#endif
}
else
{
Expand Down

0 comments on commit b4bf1cc

Please sign in to comment.