Skip to content

QtFRED Mission Events Editor#6961

Merged
wookieejedi merged 24 commits into
scp-fs2open:masterfrom
MjnMixael:qtfred_mission_events_dialog
Aug 29, 2025
Merged

QtFRED Mission Events Editor#6961
wookieejedi merged 24 commits into
scp-fs2open:masterfrom
MjnMixael:qtfred_mission_events_dialog

Conversation

@MjnMixael

@MjnMixael MjnMixael commented Aug 21, 2025

Copy link
Copy Markdown
Contributor

Cleans up and finishes the Mission Events editor. Adds missing features like annotations support, type to search for operators, message notes, etc. Also adds some new features like easy reorganizing of messages.

Sexp_tree is still kind of a mess as that file owns both the widget ui and the sexp tree data code. To get around this limitation the dialog passes an object to the events editor data model that allows the needed cross talk between the tree and the events data structures.

Fixes #3653

}

// rename all sexp references to old events
for (int i = 0; i < (int)m_events.size(); i++) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (int i = 0; i < (int)m_events.size(); i++) {
for (int i = 0; i < static_cast<int>(m_events.size()); i++) {

free(Messages[i].wave_info.name);
}

Num_messages = (int)m_messages.size() + Num_builtin_messages;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Num_messages = (int)m_messages.size() + Num_builtin_messages;
Num_messages = static_cast<int>(m_messages.size()) + Num_builtin_messages;


Num_messages = (int)m_messages.size() + Num_builtin_messages;
Messages.resize(Num_messages);
for (int i = 0; i < (int)m_messages.size(); i++)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (int i = 0; i < (int)m_messages.size(); i++)
for (int i = 0; i < static_cast<int>(m_messages.size()); i++)

m_events.clear();
m_sig.clear();
m_cur_event = -1;
for (auto i = 0; i < (int)Mission_events.size(); i++) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (auto i = 0; i < (int)Mission_events.size(); i++) {
for (auto i = 0; i < static_cast<int>(Mission_events.size()); i++) {


int MissionEventsDialogModel::findFormulaByOriginalEventIndex(int orig) const
{
for (int cur = 0; cur < (int)m_sig.size(); ++cur)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (int cur = 0; cur < (int)m_sig.size(); ++cur)
for (int cur = 0; cur < static_cast<int>(m_sig.size()); ++cur)

Comment thread qtfred/src/ui/widgets/sexp_tree.cpp
Comment thread qtfred/src/ui/widgets/sexp_tree.cpp Outdated
QStringList sexp_tree::validOperatorsForNode(int nodeIndex)
{
QStringList out;
if (nodeIndex < 0 || nodeIndex >= (int)tree_nodes.size())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (nodeIndex < 0 || nodeIndex >= (int)tree_nodes.size())
if (nodeIndex < 0 || nodeIndex >= static_cast<int>(tree_nodes.size()))

Comment thread qtfred/src/ui/widgets/sexp_tree.cpp Outdated
int nodeIdx = -1;
for (uint i = 0; i < tree_nodes.size(); ++i) {
if (tree_nodes[i].handle == item) {
nodeIdx = (int)i;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
nodeIdx = (int)i;
nodeIdx = static_cast<int>(i);

Comment thread qtfred/src/ui/widgets/sexp_tree.cpp Outdated
_opNodeIndex = -1;

// Commit operator if we resolved one
if (confirm && !chosenOp.isEmpty() && node >= 0 && node < (int)tree_nodes.size()) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (confirm && !chosenOp.isEmpty() && node >= 0 && node < (int)tree_nodes.size()) {
if (confirm && !chosenOp.isEmpty() && node >= 0 && node < static_cast<int>(tree_nodes.size())) {

Comment thread qtfred/src/ui/dialogs/MissionEventsDialog.cpp
@github-project-automation github-project-automation Bot moved this from Work In Progress (PRs) to In Review (PRs) in qtFRED2 Aug 28, 2025

@JohnAFernandez JohnAFernandez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, misclicked. PLEASE ADDRESS THESE CHANGES, I PROMISE I AM NOT DOING CODE REVIEWS UNDER THE INFLUENCE!

@JohnAFernandez JohnAFernandez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that's done then.

@MjnMixael MjnMixael force-pushed the qtfred_mission_events_dialog branch from 5778885 to 172ae32 Compare August 28, 2025 23:44
@wookieejedi

Copy link
Copy Markdown
Member

Will plan to merge tomorrow

@wookieejedi wookieejedi merged commit b3db62c into scp-fs2open:master Aug 29, 2025
20 checks passed
@github-project-automation github-project-automation Bot moved this from In Review (PRs) to Done in qtFRED2 Aug 29, 2025
@MjnMixael MjnMixael deleted the qtfred_mission_events_dialog branch August 29, 2025 13:05
Goober5000 added a commit to Goober5000/fs2open.github.com that referenced this pull request Sep 8, 2025
The double quote conversions added in scp-fs2open#7008 were removed in scp-fs2open#6961, probably inadvertently due to the branch merge.  This adds them back.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

qtfred A feature or issue related to qtFred.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

qtFRED: sexp_tree ignores manual edits

3 participants