mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-04-15 05:32:21 +00:00
Remove Boost
Replace boost checksum stuff. Remove boost from versions Remove Boost from src.pro Remove Boost from gcconfig.pri.in
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
#include "DBAccess.h"
|
||||
#include "MetricAggregator.h"
|
||||
#include <QtSql>
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#ifndef GC_VERSION
|
||||
#define GC_VERSION "(developer build)"
|
||||
@@ -221,26 +220,24 @@ VersionPage::VersionPage(MainWindow *main, QDir home) : main(main), home(home)
|
||||
"<table>"
|
||||
"<tr><td colspan=\"2\">QT</td><td>%1</td></tr>"
|
||||
"<tr><td colspan=\"2\">QWT</td><td>%2</td></tr>"
|
||||
"<tr><td colspan=\"2\">BOOST</td><td>%3</td></tr>"
|
||||
"<tr><td colspan=\"2\">GCC</td><td>%4</td></tr>"
|
||||
"<tr><td colspan=\"2\">SRMIO</td><td>%5</td></tr>"
|
||||
"<tr><td colspan=\"2\">OAUTH</td><td>%6</td></tr>"
|
||||
"<tr><td colspan=\"2\">D2XX</td><td>%7</td></tr>"
|
||||
"<tr><td colspan=\"2\">QWTPLOT3D</td><td>%8</td></tr>"
|
||||
"<tr><td colspan=\"2\">KML</td><td>%9</td></tr>"
|
||||
"<tr><td colspan=\"2\">ICAL</td><td>%10</td></tr>"
|
||||
"<tr><td colspan=\"2\">USBXPRESS</td><td>%11</td></tr>"
|
||||
"<tr><td colspan=\"2\">LIBUSB</td><td>%12</td></tr>"
|
||||
"<tr><td colspan=\"2\">VLC</td><td>%13</td></tr>"
|
||||
"<tr><td colspan=\"2\">LUCENE</td><td>%14</td></tr>"
|
||||
"<tr><td colspan=\"2\">GCC</td><td>%3</td></tr>"
|
||||
"<tr><td colspan=\"2\">SRMIO</td><td>%4</td></tr>"
|
||||
"<tr><td colspan=\"2\">OAUTH</td><td>%5</td></tr>"
|
||||
"<tr><td colspan=\"2\">D2XX</td><td>%6</td></tr>"
|
||||
"<tr><td colspan=\"2\">QWTPLOT3D</td><td>%7</td></tr>"
|
||||
"<tr><td colspan=\"2\">KML</td><td>%8</td></tr>"
|
||||
"<tr><td colspan=\"2\">ICAL</td><td>%9</td></tr>"
|
||||
"<tr><td colspan=\"2\">USBXPRESS</td><td>%10</td></tr>"
|
||||
"<tr><td colspan=\"2\">LIBUSB</td><td>%11</td></tr>"
|
||||
"<tr><td colspan=\"2\">VLC</td><td>%12</td></tr>"
|
||||
"<tr><td colspan=\"2\">LUCENE</td><td>%13</td></tr>"
|
||||
#ifdef Q_OS_MAC
|
||||
"<tr><td colspan=\"2\">LION SUPPORT</td><td>%15</td></tr>"
|
||||
"<tr><td colspan=\"2\">LION SUPPORT</td><td>%14</td></tr>"
|
||||
#endif
|
||||
"</table>"
|
||||
)
|
||||
.arg(QT_VERSION_STR)
|
||||
.arg(QWT_VERSION_STR)
|
||||
.arg(BOOST_LIB_VERSION)
|
||||
.arg(GCC_VERSION)
|
||||
.arg(srmio)
|
||||
.arg(oauth)
|
||||
|
||||
@@ -34,8 +34,6 @@
|
||||
#include "RideMetadata.h"
|
||||
#include "SpecialFields.h"
|
||||
|
||||
#include <boost/crc.hpp>
|
||||
|
||||
// DB Schema Version - YOU MUST UPDATE THIS IF THE SCHEMA VERSION CHANGES!!!
|
||||
// Schema version will change if a) the default metadata.xml is updated
|
||||
// or b) new metrics are added / old changed
|
||||
@@ -139,12 +137,7 @@ computeFileCRC(QString filename)
|
||||
rawstream->readRawData(&data[0], file.size());
|
||||
file.close();
|
||||
|
||||
// calculate the CRC
|
||||
boost::crc_optimal<16, 0x1021, 0xFFFF, 0, false, false> CRC;
|
||||
|
||||
CRC.process_bytes(&data[0], file.size());
|
||||
|
||||
return CRC.checksum();
|
||||
return qChecksum(&data[0], file.size());
|
||||
}
|
||||
|
||||
bool DBAccess::createMetricsTable()
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include <qcolor.h>
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <boost/crc.hpp>
|
||||
|
||||
|
||||
// the infinity endpoints are indicated with extreme date ranges
|
||||
@@ -850,29 +849,27 @@ int HrZones::insertRangeAtDate(QDate date, int lt) {
|
||||
return rnum;
|
||||
}
|
||||
|
||||
unsigned long
|
||||
quint16
|
||||
HrZones::getFingerprint() const
|
||||
{
|
||||
boost::crc_optimal<16, 0x1021, 0xFFFF, 0, false, false> CRC;
|
||||
quint64 x = 0;
|
||||
for (int i=0; i<ranges.size(); i++) {
|
||||
|
||||
// from
|
||||
int x = ranges[i].begin.toJulianDay();
|
||||
CRC.process_bytes(&x, sizeof(int));
|
||||
x += ranges[i].begin.toJulianDay();
|
||||
|
||||
// to
|
||||
x = ranges[i].end.toJulianDay();
|
||||
CRC.process_bytes(&x, sizeof(int));
|
||||
x += ranges[i].end.toJulianDay();
|
||||
|
||||
// CP
|
||||
x = ranges[i].lt;
|
||||
CRC.process_bytes(&x, sizeof(int));
|
||||
x += ranges[i].lt;
|
||||
|
||||
// each zone definition (manual edit/default changed)
|
||||
for (int j=0; j<ranges[i].zones.count(); j++) {
|
||||
x = ranges[i].zones[j].lo;
|
||||
CRC.process_bytes(&x, sizeof(int));
|
||||
x += ranges[i].zones[j].lo;
|
||||
|
||||
}
|
||||
}
|
||||
return CRC.checksum();
|
||||
QByteArray ba = QByteArray::number(x);
|
||||
return qChecksum(ba, ba.length());
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ class HrZones : public QObject
|
||||
// calculate a CRC for the zones data - used to see if zones
|
||||
// data is changed since last referenced in Metric code
|
||||
// could also be used in Configuration pages (later)
|
||||
unsigned long getFingerprint() const;
|
||||
quint16 getFingerprint() const;
|
||||
};
|
||||
|
||||
QColor hrZoneColor(int zone, int num_zones);
|
||||
|
||||
@@ -106,7 +106,8 @@ void MetricAggregator::refreshMetrics(QDateTime forceAfterThisDate)
|
||||
}
|
||||
}
|
||||
|
||||
unsigned long zoneFingerPrint = zones->getFingerprint() + hrzones->getFingerprint(); // crc of *all* zone data (HR and Power)
|
||||
unsigned long zoneFingerPrint = static_cast<unsigned long>(zones->getFingerprint())
|
||||
+ static_cast<unsigned long>(hrzones->getFingerprint()); // checksum of *all* zone data (HR and Power)
|
||||
|
||||
// update statistics for ride files which are out of date
|
||||
// showing a progress bar as we go
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include <qcolor.h>
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <boost/crc.hpp>
|
||||
|
||||
|
||||
// the infinity endpoints are indicated with extreme date ranges
|
||||
@@ -826,29 +825,26 @@ int Zones::insertRangeAtDate(QDate date, int cp) {
|
||||
return rnum;
|
||||
}
|
||||
|
||||
unsigned long
|
||||
quint16
|
||||
Zones::getFingerprint() const
|
||||
{
|
||||
boost::crc_optimal<16, 0x1021, 0xFFFF, 0, false, false> CRC;
|
||||
quint64 x = 0;
|
||||
for (int i=0; i<ranges.size(); i++) {
|
||||
|
||||
// from
|
||||
int x = ranges[i].begin.toJulianDay();
|
||||
CRC.process_bytes(&x, sizeof(int));
|
||||
x += ranges[i].begin.toJulianDay();
|
||||
|
||||
// to
|
||||
x = ranges[i].end.toJulianDay();
|
||||
CRC.process_bytes(&x, sizeof(int));
|
||||
x += ranges[i].end.toJulianDay();
|
||||
|
||||
// CP
|
||||
x = ranges[i].cp;
|
||||
CRC.process_bytes(&x, sizeof(int));
|
||||
x += ranges[i].cp;
|
||||
|
||||
// each zone definition (manual edit/default changed)
|
||||
for (int j=0; j<ranges[i].zones.count(); j++) {
|
||||
x = ranges[i].zones[j].lo;
|
||||
CRC.process_bytes(&x, sizeof(int));
|
||||
x += ranges[i].zones[j].lo;
|
||||
}
|
||||
}
|
||||
return CRC.checksum() + (appsettings->value(this, GC_ELEVATION_HYSTERESIS).toDouble()*10);
|
||||
QByteArray ba = QByteArray::number(x);
|
||||
return qChecksum(ba, ba.length()) + (appsettings->value(this, GC_ELEVATION_HYSTERESIS).toDouble()*10);
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ class Zones : public QObject
|
||||
// calculate a CRC for the zones data - used to see if zones
|
||||
// data is changed since last referenced in Metric code
|
||||
// could also be used in Configuration pages (later)
|
||||
unsigned long getFingerprint() const;
|
||||
quint16 getFingerprint() const;
|
||||
};
|
||||
|
||||
QColor zoneColor(int zone, int num_zones);
|
||||
|
||||
@@ -32,12 +32,6 @@
|
||||
# QMAKE_DEL_FILE = rm -f
|
||||
#}
|
||||
|
||||
# Set path to the root of the boost include files.
|
||||
# If the files are in /usr/include/boost then set
|
||||
# BOOST_INCLUDE = /usr/include
|
||||
# If you do not define BOOST_INCLUDE the application may or may not compile.
|
||||
BOOST_INCLUDE =
|
||||
|
||||
# If you want SRM download support you must install SRMIO
|
||||
# http://www.zuto.de/project/srmio/
|
||||
# Set path to the root of the SRMIO installation
|
||||
|
||||
@@ -8,8 +8,6 @@ TARGET = GoldenCheetah
|
||||
!isEmpty( APP_NAME ) { TARGET = $${APP_NAME} }
|
||||
DEPENDPATH += .
|
||||
|
||||
!isEmpty( BOOST_INCLUDE ) { INCLUDEPATH += $${BOOST_INCLUDE} }
|
||||
|
||||
INCLUDEPATH += ../qwt/src ../qxt/src $${LIBZ_INCLUDE}
|
||||
QT += xml sql network webkit script
|
||||
LIBS += ../qwt/lib/libqwt.a
|
||||
|
||||
Reference in New Issue
Block a user