Show a list of mods required to be enabled or disabled when mod is toggled - #200
Show a list of mods required to be enabled or disabled when mod is toggled#200dkhex wants to merge 4 commits into
Conversation
… mod is toggled Signed-off-by: dkhex <dk-hex@yandex.ru>
|
lgtm |
notwindstone
left a comment
There was a problem hiding this comment.
thanks for the contribution!
|
Okay, how many rows of text is acceptable for a QMessageBox? Or, maybe (if I don't be a lazy ass) I'll try to turn it into custom widget with scrollable list of affected mods. |
QMessageBox has the detailedText property which allows to dialog contain text of any length |
|
so we can make to show like 5 mods and then "and N more mods..." |
kaeeraa
left a comment
There was a problem hiding this comment.
consider using setDetailedText() or add new constructor: instead of outputting each mod name in message clamp it to first five and add "and N mods more..." in the end
show full list in detailedText
…en mod is toggled Signed-off-by: dkhex <dk-hex@yandex.ru>
so5iso4ka
left a comment
There was a problem hiding this comment.
Fix that; other than that, I like everything.
| box->button(QMessageBox::No)->setText(noButton); | ||
| box->button(QMessageBox::Yes)->setText(yesButton); | ||
| auto response = box->exec(); | ||
| auto dialog = new ModToggleConfirmDialog(nullptr, requiredToEnable, requiredToDisable); |
There was a problem hiding this comment.
There's a memory leak here; leave this dialog as a local variable without using new.
There was a problem hiding this comment.
Hmm... But what kind of magic cleaning QMessageBox* from CustomMessageBox::selectable?
| void on_acceptButton_clicked(); | ||
| void on_rejectButton_clicked(); | ||
| void on_cancelButton_clicked(); |
There was a problem hiding this comment.
And it's better to rename these slots, since you connect them yourself anyway, and Qt throws a warning because of their names:
W: [qt.core.qmetaobject.connectslotsbyname] QMetaObject::connectSlotsByName: No matching signal for on_acceptButton_clicked() (QMetaObject::connectSlotsByName:3951)
There was a problem hiding this comment.
I just took naming conventions from CopyInstanceDialog (look at it as an example). I barely know Qt and didn't know such thing.
|
im not sure that we need these hacks |
Signed-off-by: dkhex <dk-hex@yandex.ru>
Signed-off-by: dkhex <dk-hex@yandex.ru>




A simple QoL addition to "Confirm toggle/enable/disable" MessageBox.