URL:
  <http://gna.org/bugs/?24005>

                 Summary: Qt client debug builds failing with many -Wshadow
warnings
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Sat 31 Oct 2015 00:13:23 UTC
                Category: client-qt
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: 
         Discussion Lock: Any
        Operating System: None
         Planned Release: 2.6.0, 3.0.0

    _______________________________________________________

Details:

My S2_6/trunk Qt client builds are failing with -Wshadow warnings (and
-Werror).

Ubuntu 14.04: Qt 5.2.1+dfsg-1ubuntu14.3, gcc 4.8.2-1ubuntu6

e.g. trunk r30327:


  CXX      chatline.lo
chatline.cpp: In constructor 'chatwdg::chatwdg(QWidget*)':
chatline.cpp:40:33: error: declaration of 'parent' shadows a member of 'this'
[-Werror=shadow]
 chatwdg::chatwdg(QWidget *parent)
                                 ^
chatline.cpp: In member function 'void chatwdg::append(QString)':
chatline.cpp:171:15: error: declaration of 'cursor' shadows a member of 'this'
[-Werror=shadow]
   QTextCursor cursor;
               ^
chatline.cpp: In member function 'void chatwdg::paint(QPainter*,
QPaintEvent*)':
chatline.cpp:206:58: error: declaration of 'event' shadows a member of 'this'
[-Werror=shadow]
 void chatwdg::paint(QPainter *painter, QPaintEvent *event)
                                                          ^
chatline.cpp: In member function 'virtual void
chatwdg::paintEvent(QPaintEvent*)':
chatline.cpp:215:44: error: declaration of 'event' shadows a member of 'this'
[-Werror=shadow]
 void chatwdg::paintEvent(QPaintEvent *event)
                                            ^
chatline.cpp: In member function 'virtual bool chatwdg::eventFilter(QObject*,
QEvent*)':
chatline.cpp:227:54: error: declaration of 'event' shadows a member of 'this'
[-Werror=shadow]
 bool chatwdg::eventFilter(QObject *obj, QEvent *event)
                                                      ^
In file included from /usr/include/qt5/QtCore/QMap:1:0,
                 from fc_client.h:28,
                 from chatline.cpp:30:
/usr/include/qt5/QtCore/qmap.h: In instantiation of 'typename QMap<T,
U>::iterator QMultiMap<Key, T>::insert(const Key&, const T&) [with Key = int;
T = QString; typename QMap<T, U>::iterator = QMap<int, QString>::iterator]':
chatline.cpp:311:29:   required from here
/usr/include/qt5/QtCore/qmap.h:1153:44: error: declaration of 'value' shadows
a member of 'this' [-Werror=shadow]
     inline typename QMap<Key, T>::iterator insert(const Key &key, const T
&value)
                                            ^
/usr/include/qt5/QtCore/qmap.h:1153:44: error: declaration of 'key' shadows a
member of 'this' [-Werror=shadow]
At global scope:
cc1plus: error: unrecognized command line option "-Wno-tautological-compare"
[-Werror]
cc1plus: all warnings being treated as errors
make[2]: *** [chatline.lo] Error 1
make[2]: Leaving directory
`/home/jtn/src/freeciv/trunk-svn-inst/client/gui-qt'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/jtn/src/freeciv/trunk-svn-inst/client'
make: *** [install-recursive] Error 1





    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?24005>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to