Skip to content

Commit 282b439

Browse files
fredakillapaceholder
authored andcommitted
Cleanup Qt keywords (paceholder#199)
* Qt no keywords * replace emit with Q_EMIT * add QT_NO_KEYWORDS definition to CMakeLists.txt
1 parent 230af3c commit 282b439

17 files changed

+18
-17
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ target_compile_definitions(nodes
102102
PRIVATE
103103
NODE_EDITOR_EXPORTS
104104
#NODE_DEBUG_DRAWING
105+
QT_NO_KEYWORDS
105106
)
106107

107108
target_compile_options(nodes

examples/calculator/AdditionModel.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@ class AdditionModel : public MathOperationDataModel
5252
_result.reset();
5353
}
5454

55-
emit dataUpdated(outPortIndex);
55+
Q_EMIT dataUpdated(outPortIndex);
5656
}
5757
};

examples/calculator/DivisionModel.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,6 @@ class DivisionModel : public MathOperationDataModel
8686
_result.reset();
8787
}
8888

89-
emit dataUpdated(outPortIndex);
89+
Q_EMIT dataUpdated(outPortIndex);
9090
}
9191
};

examples/calculator/ModuloModel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ setInData(std::shared_ptr<NodeData> data, PortIndex portIndex)
9797
_result.reset();
9898
}
9999

100-
emit dataUpdated(outPortIndex);
100+
Q_EMIT dataUpdated(outPortIndex);
101101
}
102102
}
103103

examples/calculator/MultiplicationModel.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@ class MultiplicationModel : public MathOperationDataModel
5252
_result.reset();
5353
}
5454

55-
emit dataUpdated(outPortIndex);
55+
Q_EMIT dataUpdated(outPortIndex);
5656
}
5757
};

examples/calculator/NumberSourceDataModel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ onTextEdited(QString const &string)
9191
{
9292
_number = std::make_shared<DecimalData>(number);
9393

94-
emit dataUpdated(0);
94+
Q_EMIT dataUpdated(0);
9595
}
9696
else
9797
{
98-
emit dataInvalidated(0);
98+
Q_EMIT dataInvalidated(0);
9999
}
100100
}
101101

examples/calculator/NumberSourceDataModel.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class NumberSourceDataModel
6969
QWidget *
7070
embeddedWidget() override { return _lineEdit; }
7171

72-
private slots:
72+
private Q_SLOTS:
7373

7474
void
7575
onTextEdited(QString const &string);

examples/calculator/SubtractionModel.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,6 @@ class SubtractionModel : public MathOperationDataModel
8181
_result.reset();
8282
}
8383

84-
emit dataUpdated(outPortIndex);
84+
Q_EMIT dataUpdated(outPortIndex);
8585
}
8686
};

examples/example2/TextSourceDataModel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ onTextEdited(QString const &string)
3838
{
3939
Q_UNUSED(string);
4040

41-
emit dataUpdated(0);
41+
Q_EMIT dataUpdated(0);
4242
}
4343

4444

examples/example2/TextSourceDataModel.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class TextSourceDataModel : public NodeDataModel
6161
QWidget *
6262
embeddedWidget() override { return _lineEdit; }
6363

64-
private slots:
64+
private Q_SLOTS:
6565

6666
void
6767
onTextEdited(QString const &string);

0 commit comments

Comments
 (0)