Fix Clang 6 warning about comparing different enums

qdialogbuttonbox.cpp:862:14: error: comparison of two values with different enumeration types in switch statement
('QDialogButtonBox::ButtonRole' and 'QPlatformDialogHelper::ButtonRole') [-Wenum-compare-switch]

Change-Id: I3840d727dee443318644fffd1529350b81678712
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Thiago Macieira 2018-04-26 22:51:12 -07:00
parent e67671d7cb
commit 70f51cccaf

View File

@ -858,7 +858,7 @@ void QDialogButtonBoxPrivate::_q_handleButtonClicked()
if (!guard)
return;
switch (buttonRole) {
switch (QPlatformDialogHelper::ButtonRole(buttonRole)) {
case QPlatformDialogHelper::AcceptRole:
case QPlatformDialogHelper::YesRole:
emit q->accepted();