Heart
1.3.848.aa44c26
Heart is base back end library for your c++ Qt projects.
softdelete.cpp
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2018-2025 QuasarApp.
3
* Distributed under the lgplv3 software license, see the accompanying
4
* Everyone is permitted to copy and distribute verbatim copies
5
* of this license document, but changing it is not allowed.
6
*/
7
8
#include "
softdelete.h
"
9
#include <quasarapp.h>
10
11
QH::SoftDelete::SoftDelete
() =
default
;
12
13
QH::SoftDelete::~SoftDelete
() {
14
15
if
(!fSoftDelete) {
16
17
qCritical() <<
"You delete %0 without preparing. "
<<
typeid
(
this
).name() <<
18
"The object was deleted without preparing. All changes can not be saved. "
19
"For fix it trouble use the softDelete method."
;
20
21
#ifdef QT_DEBUG
22
std::abort();
23
#endif
24
25
}
26
}
27
28
void
QH::SoftDelete::softDelete
() {
29
fSoftDelete =
true
;
30
prepareForDelete();
31
delete
this
;
32
}
33
QH::SoftDelete::softDelete
void softDelete()
softDelete This method remove this object and save all changes into database.
Definition
softdelete.cpp:28
QH::SoftDelete::~SoftDelete
virtual ~SoftDelete()
~SoftDelete This destructor has bin crashed if the softDelete method not will be invoked before delet...
Definition
softdelete.cpp:13
QH::SoftDelete::SoftDelete
SoftDelete()
softdelete.h
src
public
softdelete.cpp
Generated by
1.9.8