Build system changed to Cmake, ORM changed to QxORM, Qt6 compatibility.

This commit is contained in:
2023-04-28 22:25:29 +02:00
parent 30e6180c82
commit d699ce79f7
481 changed files with 2310 additions and 130206 deletions
+10 -7
View File
@@ -13,7 +13,7 @@ CampGrid::CampGrid(QWidget *parent) : GridForm<CampData>(parent)
QHBoxLayout *tbLayout = qobject_cast<QHBoxLayout*>(this->toolbar()->layout());
if (tbLayout != NULL)
if (tbLayout != nullptr)
{
QToolButton *btnImport = new QToolButton(this->toolbar());
btnImport->setIcon(QIcon(":/icons/pay.svg"));
@@ -76,8 +76,10 @@ void CampGrid::handleEditRecord()
return;
}
CampService srv;
srv.loadItems(data);
if (data->people().isEmpty() || data->services().isEmpty()) {
CampService srv;
srv.load(data);
}
CampWizard *wizard = new CampWizard();
wizard->setAttribute(Qt::WA_DeleteOnClose);
@@ -99,10 +101,10 @@ void CampGrid::doDelete(CampDataPtr entity)
}
CampService srv;
srv.eraseCamp(entity);
srv.erase(entity);
}
void CampGrid::addToVoucher(CampDataPtr data)
void CampGrid::addToVoucher(const CampDataPtr& data)
{
if (data->onVoucher())
{
@@ -143,7 +145,7 @@ void CampGrid::addToVoucher(CampDataPtr data)
data->setOnVoucher(false);
srvCamp.update(data);
voucher->clearItems();
shopSrv.eraseVoucher(voucher);
shopSrv.erase(voucher);
});
}
@@ -151,7 +153,8 @@ void CampGrid::currentIndexChanged(const QModelIndex &current)
{
if (current.isValid())
{
m_detail->setData(currentEntity());
auto current = currentEntity();
m_detail->setData(current);
}
}