diff --git a/docsrc/manual/project-files.rst b/docsrc/manual/project-files.rst
index fc720c22..5510c61d 100644
--- a/docsrc/manual/project-files.rst
+++ b/docsrc/manual/project-files.rst
@@ -36,12 +36,12 @@ The filepath that Porymap expects for each file can be overridden on the ``Files
data/tilesets/metatiles.inc, yes, yes, ``tilesets_metatiles_asm``, only if ``tilesets_headers`` can't be found
data/tilesets/[primary|secondary]/\*, yes, yes, ``data_tilesets_folders``, default tileset data location
src/data/wild_encounters.json, yes, yes, ``json_wild_encounters``, optional (only required to use Wild Pokémon tab)
+ src/data/heal_locations.json, yes, yes, ``json_heal_locations``,
src/data/object_events/object_event_graphics_info_pointers.h, yes, no, ``data_obj_event_gfx_pointers``,
src/data/object_events/object_event_graphics_info.h, yes, no, ``data_obj_event_gfx_info``,
src/data/object_events/object_event_pic_tables.h, yes, no, ``data_obj_event_pic_tables``,
src/data/object_events/object_event_graphics.h, yes, no, ``data_obj_event_gfx``,
src/data/graphics/pokemon.h, yes, no, ``data_pokemon_gfx``, for pokemon sprite icons
- src/data/heal_locations.h, yes, yes, ``data_heal_locations``,
src/data/region_map/region_map_sections.json, yes, yes, ``json_region_map_entries``,
src/data/region_map/porymap_config.json, yes, yes, ``json_region_porymap_cfg``,
include/constants/global.h, yes, no, ``constants_global``, reads ``define_obj_event_count``
@@ -50,7 +50,6 @@ The filepath that Porymap expects for each file can be overridden on the ``Files
include/constants/vars.h, yes, no, ``constants_vars``, for Trigger events
include/constants/weather.h, yes, no, ``constants_weather``, for map weather and Weather Triggers
include/constants/songs.h, yes, no, ``constants_songs``, for map music
- include/constants/heal_locations.h, yes, yes, ``constants_heal_locations``,
include/constants/pokemon.h, yes, no, ``constants_pokemon``, reads ``define_min_level`` and ``define_max_level``
include/constants/map_types.h, yes, no, ``constants_map_types``,
include/constants/trainer_types.h, yes, no, ``constants_trainer_types``, for Object events
@@ -85,11 +84,6 @@ In addition to these files, there are some specific symbol and macro names that
``symbol_obj_event_gfx_pointers``, ``gObjectEventGraphicsInfoPointers``, to map Object Event graphics IDs to graphics data
``symbol_pokemon_icon_table``, ``gMonIconTable``, to map species constants to icon images
``symbol_wild_encounters``, ``gWildMonHeaders``, output as the ``label`` property for the top-level wild ecounters JSON object
- ``symbol_heal_locations_type``, ``struct HealLocation``, the type for the Heal Locations table
- ``symbol_heal_locations``, ``sHealLocations``, the default Heal Locations table name when ``Respawn Map/NPC`` is disabled
- ``symbol_spawn_points``, ``sSpawnPoints``, the default Heal Locations table name when ``Respawn Map/NPC`` is enabled
- ``symbol_spawn_maps``, ``u16 sWhiteoutRespawnHealCenterMapIdxs``, the type and table name for Heal Location ``Respawn Map`` values
- ``symbol_spawn_npcs``, ``u8 sWhiteoutRespawnHealerNpcIds``, the type and table name for Heal Location ``Respawn NPC`` values
``symbol_attribute_table``, ``sMetatileAttrMasks``, optionally read to get settings on ``Tilesets`` tab
``symbol_tilesets_prefix``, ``gTileset_``, for new tileset names and to extract base tileset names
``symbol_dynamic_map_name``, ``Dynamic``, reserved map name to display for ``define_map_dynamic``
@@ -114,8 +108,7 @@ In addition to these files, there are some specific symbol and macro names that
``define_attribute_terrain``, ``METATILE_ATTRIBUTE_TERRAIN``, name used to extract setting from ``symbol_attribute_table``
``define_attribute_encounter``, ``METATILE_ATTRIBUTE_ENCOUNTER_TYPE``, name used to extract setting from ``symbol_attribute_table``
``define_metatile_label_prefix``, ``METATILE_``, expected prefix for metatile label macro names
- ``define_heal_locations_prefix``, ``HEAL_LOCATION_``, output as prefix for Heal Location IDs if ``Respawn Map/NPC`` is disabled
- ``define_spawn_prefix``, ``SPAWN_``, output as prefix for Heal Location IDs if ``Respawn Map/NPC`` is enabled
+ ``define_heal_locations_prefix``, ``HEAL_LOCATION_``, default prefix for heal location macro names
``define_map_prefix``, ``MAP_``, expected prefix for map macro names
``define_map_dynamic``, ``DYNAMIC``, macro name after prefix for Dynamic maps
``define_map_empty``, ``UNDEFINED``, macro name after prefix for empty maps
diff --git a/forms/mainwindow.ui b/forms/mainwindow.ui
index 4a9e439a..a7a6d112 100644
--- a/forms/mainwindow.ui
+++ b/forms/mainwindow.ui
@@ -2042,9 +2042,9 @@
-
+
- Healspots
+ Heal Locations
@@ -2091,7 +2091,7 @@
-
-
+
Qt::Orientation::Horizontal
@@ -2106,7 +2106,7 @@
-
-
+
QFrame::Shape::NoFrame
@@ -2116,7 +2116,7 @@
Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop
-
+
0
diff --git a/forms/preferenceeditor.ui b/forms/preferenceeditor.ui
index a7009e6e..2863a541 100644
--- a/forms/preferenceeditor.ui
+++ b/forms/preferenceeditor.ui
@@ -54,6 +54,16 @@
+ -
+
+
+ If checked, no warning will be shown when deleting an event that has an associated #define that may also be deleted.
+
+
+ Disable warning when deleting events with IDs
+
+
+
diff --git a/forms/projectsettingseditor.ui b/forms/projectsettingseditor.ui
index fc156a72..da006eff 100644
--- a/forms/projectsettingseditor.ui
+++ b/forms/projectsettingseditor.ui
@@ -1119,9 +1119,9 @@
-
-
+
- The icon that will be used to represent Healspot events
+ The icon that will be used to represent Heal Location events
true
@@ -1136,9 +1136,9 @@
-
-
+
- Healspots
+ Heal Locations
@@ -1224,7 +1224,7 @@
-
-
+
...
diff --git a/include/config.h b/include/config.h
index 502ee1ec..d4bb055e 100644
--- a/include/config.h
+++ b/include/config.h
@@ -79,6 +79,7 @@ public:
this->paletteEditorBitDepth = 24;
this->projectSettingsTab = 0;
this->warpBehaviorWarningDisabled = false;
+ this->eventDeleteWarningDisabled = false;
this->checkForUpdates = true;
this->lastUpdateCheckTime = QDateTime();
this->lastUpdateCheckVersion = porymapVersion;
@@ -132,6 +133,7 @@ public:
int paletteEditorBitDepth;
int projectSettingsTab;
bool warpBehaviorWarningDisabled;
+ bool eventDeleteWarningDisabled;
bool checkForUpdates;
QDateTime lastUpdateCheckTime;
QVersionNumber lastUpdateCheckVersion;
@@ -184,11 +186,6 @@ enum ProjectIdentifier {
symbol_obj_event_gfx_pointers,
symbol_pokemon_icon_table,
symbol_wild_encounters,
- symbol_heal_locations_type,
- symbol_heal_locations,
- symbol_spawn_points,
- symbol_spawn_maps,
- symbol_spawn_npcs,
symbol_attribute_table,
symbol_tilesets_prefix,
symbol_dynamic_map_name,
@@ -214,7 +211,6 @@ enum ProjectIdentifier {
define_attribute_encounter,
define_metatile_label_prefix,
define_heal_locations_prefix,
- define_spawn_prefix,
define_map_prefix,
define_map_dynamic,
define_map_empty,
@@ -247,6 +243,7 @@ enum ProjectFilePath {
json_map_groups,
json_layouts,
json_wild_encounters,
+ json_heal_locations,
json_region_map_entries,
json_region_porymap_cfg,
tilesets_headers,
@@ -260,14 +257,12 @@ enum ProjectFilePath {
data_obj_event_pic_tables,
data_obj_event_gfx,
data_pokemon_gfx,
- data_heal_locations,
constants_global,
constants_items,
constants_flags,
constants_vars,
constants_weather,
constants_songs,
- constants_heal_locations,
constants_pokemon,
constants_map_types,
constants_trainer_types,
diff --git a/include/core/events.h b/include/core/events.h
index 081ff506..bdf9d5a2 100644
--- a/include/core/events.h
+++ b/include/core/events.h
@@ -10,7 +10,6 @@
#include
#include "orderedjson.h"
-using OrderedJson = poryjson::Json;
class Project;
@@ -125,7 +124,7 @@ public:
// standard public methods
public:
- virtual Event *duplicate() = 0;
+ virtual Event *duplicate() const = 0;
void setMap(Map *newMap) { this->map = newMap; }
Map *getMap() const { return this->map; }
@@ -155,7 +154,7 @@ public:
Event::Type getEventType() const { return this->eventType; }
virtual OrderedJson::object buildEventJson(Project *project) = 0;
- virtual bool loadFromJson(QJsonObject json, Project *project) = 0;
+ virtual bool loadFromJson(const QJsonObject &json, Project *project) = 0;
virtual void setDefaultValues(Project *project);
@@ -168,10 +167,10 @@ public:
virtual void loadPixmap(Project *project);
void setPixmap(QPixmap newPixmap) { this->pixmap = newPixmap; }
- QPixmap getPixmap() { return this->pixmap; }
+ QPixmap getPixmap() const { return this->pixmap; }
void setPixmapItem(DraggablePixmapItem *item);
- DraggablePixmapItem *getPixmapItem() { return this->pixmapItem; }
+ DraggablePixmapItem *getPixmapItem() const { return this->pixmapItem; }
void setUsingSprite(bool newUsingSprite) { this->usingSprite = newUsingSprite; }
bool getUsingSprite() const { return this->usingSprite; }
@@ -184,6 +183,9 @@ public:
int getEventIndex();
+ void setIdName(QString newIdName) { this->idName = newIdName; }
+ QString getIdName() const { return this->idName; }
+
static QString eventGroupToString(Event::Group group);
static QString eventTypeToString(Event::Type type);
static Event::Type eventTypeFromString(QString type);
@@ -206,6 +208,11 @@ protected:
int spriteHeight = 16;
bool usingSprite = false;
+ // Some events can have an associated #define name that should be unique to this event.
+ // e.g. object events can have a 'LOCALID', or Heal Locations have a 'HEAL_LOCATION' id.
+ // When deleting events like this we want to warn the user that the #define may also be deleted.
+ QString idName;
+
QMap customAttributes;
QPixmap pixmap;
@@ -227,14 +234,14 @@ public:
}
virtual ~ObjectEvent() {}
- virtual Event *duplicate() override;
+ virtual Event *duplicate() const override;
virtual void accept(EventVisitor *visitor) override { visitor->visitObject(this); }
virtual EventFrame *createEventFrame() override;
virtual OrderedJson::object buildEventJson(Project *project) override;
- virtual bool loadFromJson(QJsonObject json, Project *project) override;
+ virtual bool loadFromJson(const QJsonObject &json, Project *project) override;
virtual void setDefaultValues(Project *project) override;
@@ -243,28 +250,28 @@ public:
virtual void loadPixmap(Project *project) override;
void setGfx(QString newGfx) { this->gfx = newGfx; }
- QString getGfx() { return this->gfx; }
+ QString getGfx() const { return this->gfx; }
void setMovement(QString newMovement) { this->movement = newMovement; }
- QString getMovement() { return this->movement; }
+ QString getMovement() const { return this->movement; }
void setRadiusX(int newRadiusX) { this->radiusX = newRadiusX; }
- int getRadiusX() { return this->radiusX; }
+ int getRadiusX() const { return this->radiusX; }
void setRadiusY(int newRadiusY) { this->radiusY = newRadiusY; }
- int getRadiusY() { return this->radiusY; }
+ int getRadiusY() const { return this->radiusY; }
void setTrainerType(QString newTrainerType) { this->trainerType = newTrainerType; }
- QString getTrainerType() { return this->trainerType; }
+ QString getTrainerType() const { return this->trainerType; }
void setSightRadiusBerryTreeID(QString newValue) { this->sightRadiusBerryTreeID = newValue; }
- QString getSightRadiusBerryTreeID() { return this->sightRadiusBerryTreeID; }
+ QString getSightRadiusBerryTreeID() const { return this->sightRadiusBerryTreeID; }
void setScript(QString newScript) { this->script = newScript; }
- QString getScript() { return this->script; }
+ QString getScript() const { return this->script; }
void setFlag(QString newFlag) { this->flag = newFlag; }
- QString getFlag() { return this->flag; }
+ QString getFlag() const { return this->flag; }
public:
void setFrameFromMovement(QString movement);
@@ -300,12 +307,12 @@ public:
}
virtual ~CloneObjectEvent() {}
- virtual Event *duplicate() override;
+ virtual Event *duplicate() const override;
virtual EventFrame *createEventFrame() override;
virtual OrderedJson::object buildEventJson(Project *project) override;
- virtual bool loadFromJson(QJsonObject json, Project *project) override;
+ virtual bool loadFromJson(const QJsonObject &json, Project *project) override;
virtual void setDefaultValues(Project *project) override;
@@ -314,10 +321,10 @@ public:
virtual void loadPixmap(Project *project) override;
void setTargetMap(QString newTargetMap) { this->targetMap = newTargetMap; }
- QString getTargetMap() { return this->targetMap; }
+ QString getTargetMap() const { return this->targetMap; }
void setTargetID(int newTargetID) { this->targetID = newTargetID; }
- int getTargetID() { return this->targetID; }
+ int getTargetID() const { return this->targetID; }
private:
QString targetMap;
@@ -338,22 +345,22 @@ public:
}
virtual ~WarpEvent() {}
- virtual Event *duplicate() override;
+ virtual Event *duplicate() const override;
virtual EventFrame *createEventFrame() override;
virtual OrderedJson::object buildEventJson(Project *project) override;
- virtual bool loadFromJson(QJsonObject json, Project *project) override;
+ virtual bool loadFromJson(const QJsonObject &json, Project *project) override;
virtual void setDefaultValues(Project *project) override;
virtual QSet getExpectedFields() override;
void setDestinationMap(QString newDestinationMap) { this->destinationMap = newDestinationMap; }
- QString getDestinationMap() { return this->destinationMap; }
+ QString getDestinationMap() const { return this->destinationMap; }
void setDestinationWarpID(QString newDestinationWarpID) { this->destinationWarpID = newDestinationWarpID; }
- QString getDestinationWarpID() { return this->destinationWarpID; }
+ QString getDestinationWarpID() const { return this->destinationWarpID; }
void setWarningEnabled(bool enabled);
@@ -373,12 +380,12 @@ public:
CoordEvent() : Event() {}
virtual ~CoordEvent() {}
- virtual Event *duplicate() override = 0;
+ virtual Event *duplicate() const override = 0;
virtual EventFrame *createEventFrame() override = 0;
virtual OrderedJson::object buildEventJson(Project *project) override = 0;
- virtual bool loadFromJson(QJsonObject json, Project *project) override = 0;
+ virtual bool loadFromJson(const QJsonObject &json, Project *project) override = 0;
virtual void setDefaultValues(Project *project) override = 0;
@@ -399,27 +406,27 @@ public:
}
virtual ~TriggerEvent() {}
- virtual Event *duplicate() override;
+ virtual Event *duplicate() const override;
virtual void accept(EventVisitor *visitor) override { visitor->visitTrigger(this); }
virtual EventFrame *createEventFrame() override;
virtual OrderedJson::object buildEventJson(Project *project) override;
- virtual bool loadFromJson(QJsonObject json, Project *project) override;
+ virtual bool loadFromJson(const QJsonObject &json, Project *project) override;
virtual void setDefaultValues(Project *project) override;
virtual QSet getExpectedFields() override;
void setScriptVar(QString newScriptVar) { this->scriptVar = newScriptVar; }
- QString getScriptVar() { return this->scriptVar; }
+ QString getScriptVar() const { return this->scriptVar; }
void setScriptVarValue(QString newScriptVarValue) { this->scriptVarValue = newScriptVarValue; }
- QString getScriptVarValue() { return this->scriptVarValue; }
+ QString getScriptVarValue() const { return this->scriptVarValue; }
void setScriptLabel(QString newScriptLabel) { this->scriptLabel = newScriptLabel; }
- QString getScriptLabel() { return this->scriptLabel; }
+ QString getScriptLabel() const { return this->scriptLabel; }
private:
QString scriptVar;
@@ -441,19 +448,19 @@ public:
}
virtual ~WeatherTriggerEvent() {}
- virtual Event *duplicate() override;
+ virtual Event *duplicate() const override;
virtual EventFrame *createEventFrame() override;
virtual OrderedJson::object buildEventJson(Project *project) override;
- virtual bool loadFromJson(QJsonObject json, Project *project) override;
+ virtual bool loadFromJson(const QJsonObject &json, Project *project) override;
virtual void setDefaultValues(Project *project) override;
virtual QSet getExpectedFields() override;
void setWeather(QString newWeather) { this->weather = newWeather; }
- QString getWeather() { return this->weather; }
+ QString getWeather() const { return this->weather; }
private:
QString weather;
@@ -472,12 +479,12 @@ public:
}
virtual ~BGEvent() {}
- virtual Event *duplicate() override = 0;
+ virtual Event *duplicate() const override = 0;
virtual EventFrame *createEventFrame() override = 0;
virtual OrderedJson::object buildEventJson(Project *project) override = 0;
- virtual bool loadFromJson(QJsonObject json, Project *project) override = 0;
+ virtual bool loadFromJson(const QJsonObject &json, Project *project) override = 0;
virtual void setDefaultValues(Project *project) override = 0;
@@ -497,24 +504,24 @@ public:
}
virtual ~SignEvent() {}
- virtual Event *duplicate() override;
+ virtual Event *duplicate() const override;
virtual void accept(EventVisitor *visitor) override { visitor->visitSign(this); }
virtual EventFrame *createEventFrame() override;
virtual OrderedJson::object buildEventJson(Project *project) override;
- virtual bool loadFromJson(QJsonObject json, Project *project) override;
+ virtual bool loadFromJson(const QJsonObject &json, Project *project) override;
virtual void setDefaultValues(Project *project) override;
virtual QSet getExpectedFields() override;
void setFacingDirection(QString newFacingDirection) { this->facingDirection = newFacingDirection; }
- QString getFacingDirection() { return this->facingDirection; }
+ QString getFacingDirection() const { return this->facingDirection; }
void setScriptLabel(QString newScriptLabel) { this->scriptLabel = newScriptLabel; }
- QString getScriptLabel() { return this->scriptLabel; }
+ QString getScriptLabel() const { return this->scriptLabel; }
private:
QString facingDirection;
@@ -534,28 +541,28 @@ public:
}
virtual ~HiddenItemEvent() {}
- virtual Event *duplicate() override;
+ virtual Event *duplicate() const override;
virtual EventFrame *createEventFrame() override;
virtual OrderedJson::object buildEventJson(Project *project) override;
- virtual bool loadFromJson(QJsonObject json, Project *project) override;
+ virtual bool loadFromJson(const QJsonObject &json, Project *project) override;
virtual void setDefaultValues(Project *project) override;
virtual QSet getExpectedFields() override;
void setItem(QString newItem) { this->item = newItem; }
- QString getItem() { return this->item; }
+ QString getItem() const { return this->item; }
void setFlag(QString newFlag) { this->flag = newFlag; }
- QString getFlag() { return this->flag; }
+ QString getFlag() const { return this->flag; }
void setQuantity(int newQuantity) { this->quantity = newQuantity; }
- int getQuantity() { return this->quantity; }
+ int getQuantity() const { return this->quantity; }
void setUnderfoot(bool newUnderfoot) { this->underfoot = newUnderfoot; }
- bool getUnderfoot() { return this->underfoot; }
+ bool getUnderfoot() const { return this->underfoot; }
private:
QString item;
@@ -579,19 +586,19 @@ public:
}
virtual ~SecretBaseEvent() {}
- virtual Event *duplicate() override;
+ virtual Event *duplicate() const override;
virtual EventFrame *createEventFrame() override;
virtual OrderedJson::object buildEventJson(Project *project) override;
- virtual bool loadFromJson(QJsonObject json, Project *project) override;
+ virtual bool loadFromJson(const QJsonObject &json, Project *project) override;
virtual void setDefaultValues(Project *project) override;
virtual QSet getExpectedFields() override;
void setBaseID(QString newBaseID) { this->baseID = newBaseID; }
- QString getBaseID() { return this->baseID; }
+ QString getBaseID() const { return this->baseID; }
private:
QString baseID;
@@ -611,38 +618,26 @@ public:
}
virtual ~HealLocationEvent() {}
- virtual Event *duplicate() override { return nullptr; }
+ virtual Event *duplicate() const override;
virtual EventFrame *createEventFrame() override;
virtual OrderedJson::object buildEventJson(Project *project) override;
- virtual bool loadFromJson(QJsonObject, Project *) override { return false; }
+ virtual bool loadFromJson(const QJsonObject &, Project *) override;
virtual void setDefaultValues(Project *project) override;
- virtual QSet getExpectedFields() override { return QSet(); }
+ virtual QSet getExpectedFields() override;
- void setIndex(int newIndex) { this->index = newIndex; }
- int getIndex() { return this->index; }
+ void setRespawnMapName(QString newRespawnMapName) { this->respawnMapName = newRespawnMapName; }
+ QString getRespawnMapName() const { return this->respawnMapName; }
- void setLocationName(QString newLocationName) { this->locationName = newLocationName; }
- QString getLocationName() { return this->locationName; }
-
- void setIdName(QString newIdName) { this->idName = newIdName; }
- QString getIdName() { return this->idName; }
-
- void setRespawnMap(QString newRespawnMap) { this->respawnMap = newRespawnMap; }
- QString getRespawnMap() { return this->respawnMap; }
-
- void setRespawnNPC(uint8_t newRespawnNPC) { this->respawnNPC = newRespawnNPC; }
- uint8_t getRespawnNPC() { return this->respawnNPC; }
+ void setRespawnNPC(QString newRespawnNPC) { this->respawnNPC = newRespawnNPC; }
+ QString getRespawnNPC() const { return this->respawnNPC; }
private:
- int index = -1;
- QString locationName;
- QString idName;
- QString respawnMap;
- uint8_t respawnNPC = 0;
+ QString respawnMapName;
+ QString respawnNPC;
};
@@ -656,7 +651,7 @@ public:
virtual void visitTrigger(TriggerEvent *trigger) override { this->scripts << trigger->getScriptLabel(); };
virtual void visitSign(SignEvent *sign) override { this->scripts << sign->getScriptLabel(); };
- QStringList getScripts() { return this->scripts; }
+ QStringList getScripts() const { return this->scripts; }
private:
QStringList scripts;
diff --git a/include/core/heallocation.h b/include/core/heallocation.h
deleted file mode 100644
index 533f44b5..00000000
--- a/include/core/heallocation.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#pragma once
-#ifndef HEALLOCATION_H
-#define HEALLOCATION_H
-
-#include
-#include
-
-class Event;
-
-class HealLocation {
-
-public:
- HealLocation()=default;
- HealLocation(QString, QString, int, int16_t, int16_t, QString = "", uint8_t = 1);
- friend QDebug operator<<(QDebug debug, const HealLocation &hl);
-
-public:
- QString idName;
- QString mapName;
- int index;
- int16_t x;
- int16_t y;
- QString respawnMap;
- uint8_t respawnNPC;
- static HealLocation fromEvent(Event *);
-};
-
-#endif // HEALLOCATION_H
diff --git a/include/core/map.h b/include/core/map.h
index b223536d..a25db5e9 100644
--- a/include/core/map.h
+++ b/include/core/map.h
@@ -84,7 +84,7 @@ public:
void openScript(QString label);
void removeEvent(Event *);
void addEvent(Event *);
- int getIndexOfEvent(Event *) const;
+ int getIndexOfEvent(const Event *) const;
void deleteConnections();
QList getConnections() const;
diff --git a/include/core/parseutil.h b/include/core/parseutil.h
index d184646b..b220597a 100644
--- a/include/core/parseutil.h
+++ b/include/core/parseutil.h
@@ -2,7 +2,6 @@
#ifndef PARSEUTIL_H
#define PARSEUTIL_H
-#include "heallocation.h"
#include "log.h"
#include "orderedjson.h"
#include "orderedmap.h"
@@ -78,11 +77,11 @@ public:
static QString removeLineComments(QString text, const QStringList &commentSymbols);
static QStringList splitShellCommand(QStringView command);
- static int gameStringToInt(QString gameString, bool * ok = nullptr);
- static bool gameStringToBool(QString gameString, bool * ok = nullptr);
- static QString jsonToQString(QJsonValue value, bool * ok = nullptr);
- static int jsonToInt(QJsonValue value, bool * ok = nullptr);
- static bool jsonToBool(QJsonValue value, bool * ok = nullptr);
+ static int gameStringToInt(const QString &gameString, bool * ok = nullptr);
+ static bool gameStringToBool(const QString &gameString, bool * ok = nullptr);
+ static QString jsonToQString(const QJsonValue &value, bool * ok = nullptr);
+ static int jsonToInt(const QJsonValue &value, bool * ok = nullptr);
+ static bool jsonToBool(const QJsonValue &value, bool * ok = nullptr);
private:
QString root;
diff --git a/include/editor.h b/include/editor.h
index 81bf1611..104cda9a 100644
--- a/include/editor.h
+++ b/include/editor.h
@@ -46,7 +46,6 @@ public:
public:
Ui::MainWindow* ui;
- QObject *parent = nullptr;
QPointer project = nullptr;
QPointer