Skip to content

Commit 60c7b00

Browse files
committed
Merge branch 'master' into wip-translator
2 parents 1bdca90 + d8bca6c commit 60c7b00

22 files changed

Lines changed: 84 additions & 30 deletions

File tree

Editor/editing/_scenes/level/items/item_bgo.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@
2727

2828
class ItemBGO : public LvlBaseItem
2929
{
30-
Q_OBJECT
3130
void construct();
31+
32+
static inline QString tr(const char *sourceText, const char *disambiguation = nullptr, int n = -1)
33+
{
34+
return QCoreApplication::translate("ItemBGO", sourceText, disambiguation, n);
35+
}
36+
3237
public:
3338
ItemBGO(QGraphicsItem *parent = nullptr);
3439
ItemBGO(LvlScene *parentScene, QGraphicsItem *parent = nullptr);

Editor/editing/_scenes/level/items/item_block.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@
2727

2828
class ItemBlock : public LvlBaseItem
2929
{
30-
Q_OBJECT
3130
void construct();
31+
32+
static inline QString tr(const char *sourceText, const char *disambiguation = nullptr, int n = -1)
33+
{
34+
return QCoreApplication::translate("ItemBlock", sourceText, disambiguation, n);
35+
}
36+
3237
public:
3338
ItemBlock(LvlScene *parentScene, QGraphicsItem *parent = nullptr);
3439
ItemBlock(QGraphicsItem *parent = nullptr);

Editor/editing/_scenes/level/items/item_door.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@
2727

2828
class ItemDoor : public LvlBaseItem
2929
{
30-
Q_OBJECT
3130
void construct();
31+
32+
static inline QString tr(const char *sourceText, const char *disambiguation = nullptr, int n = -1)
33+
{
34+
return QCoreApplication::translate("ItemDoor", sourceText, disambiguation, n);
35+
}
36+
3237
public:
3338
ItemDoor(QGraphicsItem *parent = nullptr);
3439
ItemDoor(LvlScene *parentScene, QGraphicsItem *parent = nullptr);

Editor/editing/_scenes/level/items/item_npc.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@
2727

2828
class ItemNPC : public LvlBaseItem
2929
{
30-
Q_OBJECT
3130
void construct();
31+
32+
static inline QString tr(const char *sourceText, const char *disambiguation = nullptr, int n = -1)
33+
{
34+
return QCoreApplication::translate("ItemNPC", sourceText, disambiguation, n);
35+
}
36+
3237
public:
3338
ItemNPC(LvlScene *parentScene, QGraphicsItem *parent = nullptr);
3439
ItemNPC(bool noScene = false, QGraphicsItem *parent = nullptr);

Editor/editing/_scenes/level/items/item_playerpoint.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@
2727

2828
class ItemPlayerPoint : public LvlBaseItem
2929
{
30-
Q_OBJECT
3130
void construct();
31+
32+
static inline QString tr(const char *sourceText, const char *disambiguation = nullptr, int n = -1)
33+
{
34+
return QCoreApplication::translate("ItemPlayerPoint", sourceText, disambiguation, n);
35+
}
36+
3237
public:
3338
explicit ItemPlayerPoint(QGraphicsItem *parent = nullptr);
3439
explicit ItemPlayerPoint(LvlScene *parentScene, QGraphicsItem *parent = nullptr);

Editor/editing/_scenes/level/items/item_water.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@
2727

2828
class ItemPhysEnv : public LvlBaseItem
2929
{
30-
Q_OBJECT
3130
void construct();
31+
32+
static inline QString tr(const char *sourceText, const char *disambiguation = nullptr, int n = -1)
33+
{
34+
return QCoreApplication::translate("ItemPhysEnv", sourceText, disambiguation, n);
35+
}
36+
3237
public:
3338
ItemPhysEnv(QGraphicsItem *parent = nullptr);
3439
ItemPhysEnv(LvlScene *parentScene, QGraphicsItem *parent = nullptr);

Editor/editing/_scenes/level/items/lvl_base_item.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,8 @@
3030

3131
class LvlScene;
3232

33-
class LvlBaseItem:
34-
public QObject,
35-
public QGraphicsItem
33+
class LvlBaseItem : public QGraphicsItem
3634
{
37-
Q_OBJECT
3835
Q_INTERFACES(QGraphicsItem)
3936

4037
private:

Editor/editing/_scenes/world/items/item_level.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@
2727

2828
class ItemLevel : public WldBaseItem
2929
{
30-
Q_OBJECT
3130
void construct();
31+
32+
static inline QString tr(const char *sourceText, const char *disambiguation = nullptr, int n = -1)
33+
{
34+
return QCoreApplication::translate("ItemLevel", sourceText, disambiguation, n);
35+
}
36+
3237
public:
3338
ItemLevel(QGraphicsItem *parent = nullptr);
3439
ItemLevel(WldScene *parentScene, QGraphicsItem *parent = nullptr);

Editor/editing/_scenes/world/items/item_music.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@
2727

2828
class ItemMusic : public WldBaseItem
2929
{
30-
Q_OBJECT
3130
void construct();
31+
32+
static inline QString tr(const char *sourceText, const char *disambiguation = nullptr, int n = -1)
33+
{
34+
return QCoreApplication::translate("ItemMusic", sourceText, disambiguation, n);
35+
}
36+
3237
public:
3338
ItemMusic(QGraphicsItem *parent = nullptr);
3439
ItemMusic(WldScene *parentScene, QGraphicsItem *parent = nullptr);

Editor/editing/_scenes/world/items/item_path.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@
2727

2828
class ItemPath : public WldBaseItem
2929
{
30-
Q_OBJECT
3130
void construct();
31+
32+
static inline QString tr(const char *sourceText, const char *disambiguation = nullptr, int n = -1)
33+
{
34+
return QCoreApplication::translate("ItemPath", sourceText, disambiguation, n);
35+
}
36+
3237
public:
3338
ItemPath(QGraphicsItem *parent = nullptr);
3439
ItemPath(WldScene *parentScene, QGraphicsItem *parent = nullptr);

0 commit comments

Comments
 (0)