Remove unnecessary QObject inheritance

This commit is contained in:
BigBahss 2021-02-18 08:43:52 -05:00 committed by huderlem
parent 6ebf1b54a8
commit d5270df3b6
4 changed files with 4 additions and 9 deletions

View file

@ -15,7 +15,7 @@ enum MapSortOrder {
Layout = 2, Layout = 2,
}; };
class KeyValueConfigBase : public QObject class KeyValueConfigBase
{ {
public: public:
void save(); void save();

View file

@ -79,15 +79,11 @@ public:
QString city_map_name; QString city_map_name;
}; };
class RegionMap : public QObject class RegionMap
{ {
Q_OBJECT
public: public:
RegionMap() = default; RegionMap() = default;
~RegionMap() {};
Project *project = nullptr; Project *project = nullptr;
QVector<RegionMapSquare> map_squares; QVector<RegionMapSquare> map_squares;

View file

@ -5,8 +5,7 @@
#include "metatileselector.h" #include "metatileselector.h"
#include <QGraphicsPixmapItem> #include <QGraphicsPixmapItem>
class CurrentSelectedMetatilesPixmapItem : public QObject, public QGraphicsPixmapItem { class CurrentSelectedMetatilesPixmapItem : public QGraphicsPixmapItem {
Q_OBJECT
public: public:
CurrentSelectedMetatilesPixmapItem(Map *map, MetatileSelector *metatileSelector) { CurrentSelectedMetatilesPixmapItem(Map *map, MetatileSelector *metatileSelector) {
this->map = map; this->map = map;

View file

@ -575,7 +575,7 @@ void ProjectConfig::onNewConfigFileCreated() {
form.addRow(new QLabel("Game Version"), baseGameVersionComboBox); form.addRow(new QLabel("Game Version"), baseGameVersionComboBox);
QDialogButtonBox buttonBox(QDialogButtonBox::Ok, Qt::Horizontal, &dialog); QDialogButtonBox buttonBox(QDialogButtonBox::Ok, Qt::Horizontal, &dialog);
connect(&buttonBox, &QDialogButtonBox::accepted, &dialog, &QDialog::accept); QObject::connect(&buttonBox, &QDialogButtonBox::accepted, &dialog, &QDialog::accept);
form.addRow(&buttonBox); form.addRow(&buttonBox);
if (dialog.exec() == QDialog::Accepted) { if (dialog.exec() == QDialog::Accepted) {