Skip to content

Commit fe971a6

Browse files
author
rblazek
committedFeb 21, 2006
QgsIdentifyResults Qt4 update
git-svn-id: http://svn.osgeo.org/qgis/trunk@4894 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 26a7502 commit fe971a6

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed
 

‎src/raster/qgsrasterlayer.cpp

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4786,27 +4786,22 @@ void QgsRasterLayer::identify(QgsRect * r)
47864786
if( !mIdentifyResults)
47874787
{
47884788

4789-
// TODO: Doesn't work in Qt4 (list is now just a QWidgetList, not a pointer to one)
4790-
#if QT_VERSION < 0x040000
4791-
// TODO it is necessary to pass topLevelWidget()as parent, but there is no QWidget availabl
4792-
QWidgetList *list = QApplication::topLevelWidgets ();
4793-
QWidgetListIt it( *list );
4794-
QWidget *w;
4789+
// Win32 doesn't like this approach to creating the window and seems
4790+
// to work fine without it [gsherman]
47954791
QWidget *top = 0;
4796-
while ( (w=it.current()) != 0 )
4792+
#ifndef WIN32
4793+
foreach (QWidget *w, QApplication::topLevelWidgets())
47974794
{
4798-
++it;
4799-
if ( typeid(*w) == typeid(QgisApp) )
4800-
{
4801-
top = w;
4802-
break;
4803-
}
4795+
if ( typeid(*w) == typeid(QgisApp) )
4796+
{
4797+
top = w;
4798+
break;
4799+
}
48044800
}
4805-
delete list;
4801+
#endif
48064802
QgsAttributeAction aa;
48074803
mIdentifyResults = new QgsIdentifyResults(aa, top);
48084804
mIdentifyResults->restorePosition();
4809-
#endif
48104805
}
48114806
else
48124807
{

0 commit comments

Comments
 (0)
Please sign in to comment.