Fix gcc 4.5 compile errors

Gcc 4.5 considers explicit calls to object constructors to
be errors. This patch corrects these to enable building using
this current release of the GNU C++ compiler. This is required
to support building on Windows with the current Qt 4.6 sdk
since it includes gcc 4.5.

It is worth noting that this relese of the GNU compiler also
spots two or three uninitialised variables too, I will correct
these at a later date.
This commit is contained in:
Mark Liversedge
2010-08-04 21:35:09 +01:00
parent 02fe34216d
commit de0b28f9dc
4 changed files with 9 additions and 9 deletions

View File

@@ -380,7 +380,7 @@ void LTMTool::readSeasons()
}
Season season;
QDate today = QDate::currentDate();
QDate eom = QDate::QDate(today.year(), today.month(), today.daysInMonth());
QDate eom = QDate(today.year(), today.month(), today.daysInMonth());
// add Default Date Ranges
season.setName(tr("All Dates"));
@@ -391,13 +391,13 @@ void LTMTool::readSeasons()
season.setName(tr("This Year"));
season.setType(Season::temporary);
season.setStart(QDate::QDate(today.year(), 1,1));
season.setEnd(QDate::QDate(today.year(), 12, 31));
season.setStart(QDate(today.year(), 1,1));
season.setEnd(QDate(today.year(), 12, 31));
seasons.append(season);
season.setName(tr("This Month"));
season.setType(Season::temporary);
season.setStart(QDate::QDate(today.year(), today.month(),1));
season.setStart(QDate(today.year(), today.month(),1));
season.setEnd(eom);
seasons.append(season);

View File

@@ -575,7 +575,7 @@ PfPvPlot::recalc()
}
else
// an empty curve if no power (or zero power) is specified
cpCurve->setData(QwtArray <double>::QwtArray(), QwtArray <double>::QwtArray());
cpCurve->setData(QwtArray <double>(), QwtArray <double>());
//replot();
}

View File

@@ -239,7 +239,7 @@ PowerHist::PowerHist(MainWindow *mainWindow):
grid->enableX(false);
grid->attach(this);
zoneLabels = QList <PowerHistZoneLabel *>::QList();
zoneLabels = QList <PowerHistZoneLabel *>();
zoomer = new penTooltip(this->canvas());

View File

@@ -526,7 +526,7 @@ void Zones::setZonesFromCP(int rnum) {
// return the list of starting values of zones for a given range
QList <int> Zones::getZoneLows(int rnum) const {
if (rnum >= ranges.size())
return QList <int>::QList();
return QList <int>();
const ZoneRange &range = ranges[rnum];
QList <int> return_values;
for (int i = 0; i < range.zones.size(); i ++)
@@ -537,7 +537,7 @@ QList <int> Zones::getZoneLows(int rnum) const {
// return the list of ending values of zones for a given range
QList <int> Zones::getZoneHighs(int rnum) const {
if (rnum >= ranges.size())
return QList <int>::QList();
return QList <int>();
const ZoneRange &range = ranges[rnum];
QList <int> return_values;
for (int i = 0; i < range.zones.size(); i ++)
@@ -548,7 +548,7 @@ QList <int> Zones::getZoneHighs(int rnum) const {
// return the list of zone names
QList <QString> Zones::getZoneNames(int rnum) const {
if (rnum >= ranges.size())
return QList <QString>::QList();
return QList <QString>();
const ZoneRange &range = ranges[rnum];
QList <QString> return_values;
for (int i = 0; i < range.zones.size(); i ++)