forked from qt-creator/qt-creator
Utils: Rework CheckableMessageBox
Remove function overloads, thes are hard to read, to use and to extend. I'd even argue this should be a plain default ctor and a few setters + exec(), pretty much like Process::start() nowadays. Move "decider" magic into a structure that can be filled ad-hoc outside checkablemessagebox.cpp paving the ground for: ...removing aspect dependency from CheckableMessageBox, Instead, add a convenience function to BoolAspect. Arguably, the latter is not needed and could be done on the user side. Use pointers instead of mutable references for in-out parameter. Makes the "specialness" visible on the user side. Pass ICore::settings() centrally as done elsewhere to reduce line noise on the user side. Change-Id: Ibb366353d1ea35401723fd05ce05672617a0a8fd Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -1297,8 +1297,7 @@ QStringList GitClient::setupCheckoutArguments(const FilePath &workingDirectory,
|
||||
ICore::dialogParent() /*parent*/,
|
||||
Tr::tr("Create Local Branch") /*title*/,
|
||||
Tr::tr("Would you like to create a local branch?") /*message*/,
|
||||
ICore::settings(),
|
||||
"Git.CreateLocalBranchOnCheckout" /*setting*/,
|
||||
QString("Git.CreateLocalBranchOnCheckout"), /* decider */
|
||||
QMessageBox::Yes | QMessageBox::No /*buttons*/,
|
||||
QMessageBox::No /*default button*/,
|
||||
QMessageBox::No /*button to save*/)
|
||||
|
||||
Reference in New Issue
Block a user