patch provided by jkohnert, see Ticket #63 Fix compiler warnings on Linux

This commit is contained in:
root 2020-03-29 12:12:13 +02:00
parent 53f50070a7
commit ead042a301
5 changed files with 24 additions and 16 deletions

View file

@ -106,6 +106,10 @@ win32 {
# we want to compile with C++11 # we want to compile with C++11
QMAKE_CXXFLAGS += -std=c++11 QMAKE_CXXFLAGS += -std=c++11
# we assume to have lrintf() one moderately modern linux distributions
# would be better to have that tested, though
DEFINES += HAVE_LRINTF
# we assume that stdint.h is always present in a Linux system # we assume that stdint.h is always present in a Linux system
DEFINES += HAVE_STDINT_H DEFINES += HAVE_STDINT_H

View file

@ -536,15 +536,15 @@ void CConnectDlg::SetPingTimeAndNumClientsResult ( CHostAddress&
switch ( ePingTimeLEDColor ) switch ( ePingTimeLEDColor )
{ {
case CMultiColorLED::RL_GREEN: case CMultiColorLED::RL_GREEN:
pCurListViewItem->setTextColor ( 1, Qt::darkGreen ); pCurListViewItem->setForeground ( 1, Qt::darkGreen );
break; break;
case CMultiColorLED::RL_YELLOW: case CMultiColorLED::RL_YELLOW:
pCurListViewItem->setTextColor ( 1, Qt::darkYellow ); pCurListViewItem->setForeground ( 1, Qt::darkYellow );
break; break;
default: // including "CMultiColorLED::RL_RED" default: // including "CMultiColorLED::RL_RED"
pCurListViewItem->setTextColor ( 1, Qt::red ); pCurListViewItem->setForeground ( 1, Qt::red );
break; break;
} }

View file

@ -62,7 +62,7 @@ private network.
#include <QObject> #include <QObject>
#include <QLocale> #include <QLocale>
#include <QList> #include <QList>
#include <QTimer> #include <QElapsedTimer>
#include <QMutex> #include <QMutex>
#include "global.h" #include "global.h"
#include "util.h" #include "util.h"
@ -116,7 +116,7 @@ public:
public: public:
// time on which the entry was registered // time on which the entry was registered
QTime RegisterTime; QElapsedTimer RegisterTime;
}; };
class CServerListManager : public QObject class CServerListManager : public QObject

View file

@ -114,6 +114,8 @@ public:
CVector ( const int iNeSi, CVector ( const int iNeSi,
const TData tInVa ) { Init ( iNeSi, tInVa ); } const TData tInVa ) { Init ( iNeSi, tInVa ); }
CVector ( CVector const& ) = default;
void Init ( const int iNewSize ); void Init ( const int iNewSize );
// use this init to give all elements a defined value // use this init to give all elements a defined value
@ -778,6 +780,8 @@ public:
( CompChanInfo.eSkillLevel != eSkillLevel ) ); ( CompChanInfo.eSkillLevel != eSkillLevel ) );
} }
CChannelCoreInfo& operator= ( const CChannelCoreInfo& ) = default;
// fader tag text (channel name) // fader tag text (channel name)
QString strName; QString strName;