Build system changed to Cmake, ORM changed to QxORM, Qt6 compatibility.
This commit is contained in:
+10
-7
@@ -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 ¤t)
|
||||
{
|
||||
if (current.isValid())
|
||||
{
|
||||
m_detail->setData(currentEntity());
|
||||
auto current = currentEntity();
|
||||
m_detail->setData(current);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user