Fix deprecated-copy errors and made deprecated-declarations just a warning

This commit is contained in:
harre 2019-08-06 23:49:51 +02:00
parent 5cf6e14816
commit 77ccd417a3
6 changed files with 11 additions and 114 deletions

View File

@ -22,18 +22,7 @@ struct PressureInfo
peaktime = peakevents = 0;
min_pressure = max_pressure = 0;
}
PressureInfo(PressureInfo &copy) {
code = copy.code;
minx = copy.minx;
maxx = copy.maxx;
peaktime = copy.peaktime;
peakevents = copy.peakevents;
min_pressure = copy.min_pressure;
max_pressure = copy.max_pressure;
times = copy.times;
events = copy.events;
chans = copy.chans;
}
PressureInfo(PressureInfo &copy) = default;
PressureInfo(ChannelID code, qint64 minx, qint64 maxx) : code(code), minx(minx), maxx(maxx)
{

View File

@ -69,11 +69,7 @@ struct ValueCount {
ValueCount( EventDataType val, qint64 cnt, double pp)
:value(val), count(cnt), p(pp) {}
ValueCount(const ValueCount &copy) {
value = copy.value;
count = copy.count;
p = copy.p;
}
ValueCount(const ValueCount &copy) = default;
EventDataType value;
qint64 count;
double p;

View File

@ -125,82 +125,8 @@ struct STRRecord
date=QDate();
}
STRRecord(const STRRecord & copy) {
maskon = copy.maskon;
maskoff = copy.maskoff;
maskdur = copy.maskdur;
maskevents = copy.maskevents;
mode = copy.mode;
rms9_mode = copy.rms9_mode;
set_pressure = copy.set_pressure;
epap = copy.epap;
max_pressure = copy.max_pressure;
min_pressure = copy.min_pressure;
max_ps = copy.max_ps;
min_ps = copy.min_ps;
ps = copy.ps;
max_epap = copy.max_epap;
min_epap = copy.min_epap;
ipap = copy.ipap;
max_ipap = copy.max_ipap;
min_ipap = copy.min_ipap;
epr = copy.epr;
epr_level = copy.epr_level;
sessionid = copy.sessionid;
ahi = copy.ahi;
ai = copy.ai;
oai = copy.oai;
hi = copy.hi;
uai = copy.uai;
cai = copy.cai;
csr = copy.csr;
STRRecord(const STRRecord & copy) = default;
date = copy.date;
leak50 = copy.leak50;
leak95 = copy.leak95;
leakmax = copy.leakmax;
rr50 = copy.rr50;
rr95 = copy.rr95;
rrmax = copy.rrmax;
mv50 = copy.mv50;
mv95 = copy.mv95;
mvmax = copy.mvmax;
ie50 = copy.ie50;
ie95 = copy.ie95;
iemax = copy.iemax;
tv50 = copy.tv50;
tv95 = copy.tv95;
tvmax = copy.tvmax;
mp50 = copy.mp50;
mp95 = copy.mp95;
mpmax = copy.mpmax;
tgtepap50 = copy.tgtepap50;
tgtepap95 = copy.tgtepap95;
tgtepapmax = copy.tgtepapmax;
tgtipap50 = copy.tgtipap50;
tgtipap95 = copy.tgtipap95;
tgtipapmax = copy.tgtipapmax;
s_EPREnable = copy.s_EPREnable;
s_EPR_ClinEnable = copy.s_EPREnable;
s_RampEnable = copy.s_RampEnable;
s_RampTime = copy.s_RampTime;
s_SmartStart = copy.s_SmartStart;
s_PtAccess = copy.s_PtAccess;
s_ABFilter = copy.s_ABFilter;
s_Mask = copy.s_Mask;
s_Tube = copy.s_Tube;
s_ClimateControl = copy.s_ClimateControl;
s_HumEnable = copy.s_HumEnable;
s_HumLevel = copy.s_HumLevel;
s_TempEnable = copy.s_TempEnable;
s_Temp = copy.s_Temp;
ramp_pressure = copy.ramp_pressure;
}
QVector<quint32> maskon;
QVector<quint32> maskoff;
@ -347,10 +273,7 @@ struct STRFile {
filename(QString()), edf(nullptr) {}
STRFile(QString name, ResMedEDFParser *str) :
filename(name), edf(str) {}
STRFile(const STRFile & copy) {
filename = copy.filename;
edf = copy.edf;
}
STRFile(const STRFile & copy) = default;
~STRFile() {
}

View File

@ -92,18 +92,7 @@ enum PRTimeModes { //:short
struct MachineInfo {
MachineInfo() { type = MT_UNKNOWN; version = 0; cap=0; }
MachineInfo(const MachineInfo & copy) {
type = copy.type;
loadername = copy.loadername;
brand = copy.brand;
model = copy.model;
modelnumber = copy.modelnumber;
serial = copy.serial;
series = copy.series;
version = copy.version;
lastimported = copy.lastimported;
cap = copy.cap;
}
MachineInfo(const MachineInfo & copy) = default;
MachineInfo(MachineType type, quint32 cap, QString loadername, QString brand, QString model, QString modelnumber, QString serial, QString series, QDateTime lastimported, int version) :
type(type), cap(cap), loadername(loadername), brand(brand), model(model), modelnumber(modelnumber), serial(serial), series(series), lastimported(lastimported), version(version) {}

View File

@ -36,12 +36,7 @@ public:
color = Qt::black;
type = Calc_Zero;
}
ChannelCalc(const ChannelCalc & copy) {
code = copy.code;
color = copy.color;
enabled = copy.enabled;
type = copy.type;
}
ChannelCalc(const ChannelCalc & copy) = default;
ChannelCalc(ChannelID code, ChannelCalcType type, QColor color, bool enabled):
code(code), type(type), color(color), enabled(enabled) {}

View File

@ -455,6 +455,11 @@ DISTFILES += help/default.css \
QMAKE_CFLAGS += -Werror
QMAKE_CXXFLAGS += -Werror
# Make deprecation warnings just warnings
QMAKE_CFLAGS += -Wno-error=deprecated-declarations
QMAKE_CXXFLAGS += -Wno-error=deprecated-declarations
# Create a debug GUI build by adding "CONFIG+=memdebug" to your qmake command
memdebug {
!win32 { # add memory checking on Linux and macOS debug builds