Build system changed to Cmake, ORM changed to QxORM, Qt6 compatibility.
This commit is contained in:
+8
-8
@@ -16,13 +16,13 @@ template <class T>
|
||||
class AutoForm : public FormBinder<T>
|
||||
{
|
||||
public:
|
||||
explicit AutoForm(QWidget *parent = 0) {
|
||||
explicit AutoForm(QWidget *parent = nullptr) {
|
||||
this->setParent(parent);
|
||||
m_serviceConnected = false;
|
||||
m_saved = false;
|
||||
}
|
||||
|
||||
virtual ~AutoForm() { }
|
||||
virtual ~AutoForm() = default;
|
||||
|
||||
void setNewRec(bool isNew) {
|
||||
this->m_newRec = isNew;
|
||||
@@ -37,11 +37,11 @@ public slots:
|
||||
|
||||
if (!m_serviceConnected)
|
||||
{
|
||||
this->connect(service(), &IService::dbError, [this](QString msg) {
|
||||
this->connect(service(), &IService::dbError, [this](const QString& msg) {
|
||||
QMessageBox::critical(this, this->tr("Database error"), msg.toStdString().c_str());
|
||||
m_saved = false;
|
||||
});
|
||||
this->connect(service(), &IService::permissionDenied, [this](QString permission) {
|
||||
this->connect(service(), &IService::permissionDenied, [this](const QString& permission) {
|
||||
if (permission != PERM_DELETE) {
|
||||
QMessageBox::critical(this, this->tr("Permission denied"), permission.toStdString().c_str());
|
||||
m_saved = false;
|
||||
@@ -73,15 +73,15 @@ public slots:
|
||||
private:
|
||||
Service<T> *service() {
|
||||
IPlugin *plugin = Context::instance().plugin(this->pluginId());
|
||||
if (plugin == NULL) {
|
||||
if (plugin == nullptr) {
|
||||
Q_ASSERT(false);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Service<T> *service = plugin->service<T>();
|
||||
if (service == NULL) {
|
||||
if (service == nullptr) {
|
||||
Q_ASSERT(false);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return service;
|
||||
|
||||
Reference in New Issue
Block a user