Opened 6 years ago

Closed 5 years ago

#307 closed defect (invalid)

qtconcurrentfilter.h generates -Wunused-local-typedefs warning when compiling with GCC 4.9.2

Reported by: Alex Taylor Owned by:
Priority: minor Milestone: Qt 5
Component: General Version: 4.7.3
Severity: low Keywords:
Cc:

Description

Compiling a Qt4 application with the current RPM/YUM GCC (4.9.2.1-3.oc00.i686) generates the following warning (often multiple times):

g++ -c @CXXFLAGS.qe.rsp @DEFINES.qe.rsp @INCPATH.qe.rsp -o mainwindow.obj mainwindow.cpp
In file included from e:\usr\include/QtCore/QtCore:124:0,
                 from e:\usr\include\QtGui/QtGui:3,
                 from mainwindow.cpp:23:
e:\usr\include/QtCore/qtconcurrentfilter.h: In function 'QtConcurrent::ThreadEngineStarter<void> QtConcurrent::filterInternal(Sequence&, KeepFunctor, T (C::*)(U))':
e:\usr\include/QtCore/qtconcurrentfilter.h:109:47: warning: typedef 'Iterator' locally defined but not used [-Wunused-local-typedefs]
     typedef typename Sequence::const_iterator Iterator;
                                               ^

This is quite inconvenient as certain IDEs or code editors (including mine) flag this as a problem and pop up a message during build.

Change History (3)

comment:1 Changed 6 years ago by Alex Taylor

It seems I can work around this on a per-project basis by adding

QMAKE_CXXFLAGS += -Wno-unused-local-typedefs

to the .pro file. A more comprehensive fix would still be desirable, though (either by updating the header file in question, or adding the above switch to QMAKE_CFLAGS_WARN_ON in qmake.conf).

comment:2 Changed 6 years ago by Silvan Scherrer

Milestone: Qt EnhancedQt 5

as you found a workaround I move the ticket to Qt5. As we will most probably not change anything in Qt4 at all

comment:3 Changed 5 years ago by Silvan Scherrer

Resolution: invalid
Status: newclosed

please retry when Qt5 is out. We don't update anything in Qt4 anymore.

Note: See TracTickets for help on using tickets.