chore(cpn): upgrade to Ubuntu 22.04 and Qt 6.9.0 (#5986)
Co-authored-by: elecpower <elecpower@users.noreply.github.com> Co-authored-by: raphaelcoeffic <1050031+raphaelcoeffic@users.noreply.github.com>
This commit is contained in:
co-authored by
elecpower
raphaelcoeffic
parent
7264b28e62
commit
9e86a3ea84
@@ -24,7 +24,7 @@ set(${PROJECT_NAME}_MOC
|
||||
appdata.h
|
||||
)
|
||||
|
||||
qt5_wrap_cpp(${PROJECT_NAME}_SRCS
|
||||
qt_wrap_cpp(${PROJECT_NAME}_SRCS
|
||||
${${PROJECT_NAME}_MOC}
|
||||
)
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ void CompStoreObj::load(CompStoreObj * obj, const QString & name, const QString
|
||||
const QMetaProperty & prop = obj->metaObject()->property(idx);
|
||||
const QVariant currValue = prop.read(obj);
|
||||
QVariant savedValue = m_settings.value(pathForKey(key, group), def);
|
||||
if (savedValue.isValid() && savedValue.convert(currValue.userType()) && savedValue != currValue)
|
||||
if (savedValue.isValid() && savedValue.convert(currValue.metaType()) && savedValue != currValue)
|
||||
prop.write(obj, savedValue);
|
||||
}
|
||||
|
||||
@@ -366,7 +366,6 @@ bool ComponentAssetData::existsOnDisk()
|
||||
|
||||
ComponentData::ComponentData() : CompStoreObj(), index(-1)
|
||||
{
|
||||
qRegisterMetaTypeStreamOperators<ComponentData::ReleaseChannel>("ComponentData::ReleaseChannel");
|
||||
CompStoreObj::addObjectMapping(propertyGroup(), this);
|
||||
}
|
||||
|
||||
@@ -425,12 +424,6 @@ AppData::AppData() :
|
||||
CompStoreObj(),
|
||||
m_sessionId(0)
|
||||
{
|
||||
QMetaType::registerComparators<SimulatorOptions>();
|
||||
qRegisterMetaTypeStreamOperators<SimulatorOptions>("SimulatorOptions");
|
||||
qRegisterMetaTypeStreamOperators<AppData::NewModelAction>("AppData::NewModelAction");
|
||||
qRegisterMetaTypeStreamOperators<AppData::UpdateCheckFreq>("AppData::UpdateCheckFreq");
|
||||
qRegisterMetaTypeStreamOperators<AppData::SimuGenericKeysPos>("AppData::SimuGenericKeysPos");
|
||||
|
||||
CompStoreObj::addObjectMapping(propertyGroup(), this);
|
||||
|
||||
firstUse = !hasCurrentSettings();
|
||||
|
||||
@@ -41,13 +41,14 @@ int HexInterface::load(uint8_t *data, int maxsize)
|
||||
QString line = stream.readLine();
|
||||
|
||||
if(line.left(1)!=":") continue;
|
||||
|
||||
|
||||
int byteCount = getValueFromLine(line,1);
|
||||
int address = getValueFromLine(line,3,4);
|
||||
int recType = getValueFromLine(line,7);
|
||||
if (recType==0x02) {
|
||||
offset+=0x010000;
|
||||
}
|
||||
|
||||
if (recType==0x02)
|
||||
offset+=0x010000;
|
||||
|
||||
if(byteCount<0 || address<0 || recType<0)
|
||||
return 0;
|
||||
|
||||
@@ -59,11 +60,10 @@ int HexInterface::load(uint8_t *data, int maxsize)
|
||||
chkSum -= recType;
|
||||
chkSum -= address & 0xFF;
|
||||
chkSum -= address >> 8;
|
||||
for(int i=0; i<byteCount; i++)
|
||||
{
|
||||
quint8 v = getValueFromLine(line,(i*2)+9) & 0xFF;
|
||||
chkSum -= v;
|
||||
ba.append(v);
|
||||
for(int i=0; i<byteCount; i++) {
|
||||
quint8 v = getValueFromLine(line,(i*2)+9) & 0xFF;
|
||||
chkSum -= v;
|
||||
ba.append(v);
|
||||
}
|
||||
|
||||
quint8 retV = getValueFromLine(line,(byteCount*2)+9) & 0xFF;
|
||||
@@ -80,11 +80,10 @@ int HexInterface::load(uint8_t *data, int maxsize)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
bool HexInterface::save(const uint8_t * data, const int size)
|
||||
{
|
||||
int addr = 0;
|
||||
@@ -133,4 +132,3 @@ QString HexInterface::iHEXExtRec(quint8 bank)
|
||||
str += QString("%1").arg(chkSum, 2, 16, QChar('0'));
|
||||
return str.toUpper(); // output to file and lf;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,11 +19,10 @@
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef _HEXINTERFACE_H_
|
||||
#define _HEXINTERFACE_H_
|
||||
#pragma once
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <QTextStream>
|
||||
#include <QString>
|
||||
|
||||
class HexInterface {
|
||||
public:
|
||||
@@ -40,5 +39,3 @@ class HexInterface {
|
||||
|
||||
QTextStream & stream;
|
||||
};
|
||||
|
||||
#endif // _HEXINTERFACE_H_
|
||||
|
||||
Reference in New Issue
Block a user