mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
Remove Q_UNREACHABLE from my new code
It is not used anywhere in Falkon code, and it seems to close program when it is reached (at least the compiled as debug version). Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
parent
ab0ff451c2
commit
5b473b6866
|
@ -217,7 +217,6 @@ QString SiteSettingsManager::optionToSqlColumn(const SiteSettingsManager::PageOp
|
|||
return QSL("allow_desktop_audio_video_capture");
|
||||
|
||||
default:
|
||||
Q_UNREACHABLE();
|
||||
qWarning() << "Unknown option" << option;
|
||||
return QLatin1String("");
|
||||
}
|
||||
|
@ -260,7 +259,6 @@ SiteSettingsManager::Permission SiteSettingsManager::getDefaultPermission(const
|
|||
case poZoomLevel:
|
||||
case poAllowCookies:
|
||||
default:
|
||||
Q_UNREACHABLE();
|
||||
qWarning() << "Unknown option" << option;
|
||||
return Deny;
|
||||
}
|
||||
|
@ -291,8 +289,8 @@ void SiteSettingsManager::setDefaultPermission(const SiteSettingsManager::PageOp
|
|||
case poAllowJavascript:
|
||||
case poAllowImages:
|
||||
default:
|
||||
Q_UNREACHABLE();
|
||||
qWarning() << "Unknown option" << option;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -317,8 +315,8 @@ void SiteSettingsManager::setDefaultPermission(const SiteSettingsManager::PageOp
|
|||
m_defaults[option] = permission;
|
||||
break;
|
||||
default:
|
||||
Q_UNREACHABLE();
|
||||
qWarning() << "Unknown option" << option;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -345,7 +343,6 @@ bool SiteSettingsManager::getDefaultOptionValue(const SiteSettingsManager::PageO
|
|||
return false;
|
||||
|
||||
default:
|
||||
Q_UNREACHABLE();
|
||||
qWarning() << "Unknown option" << option;
|
||||
return false;
|
||||
}
|
||||
|
@ -379,7 +376,6 @@ SiteSettingsManager::PageOptions SiteSettingsManager::optionFromWebEngineFeature
|
|||
return poAllowDesktopAudioVideoCapture;
|
||||
|
||||
default:
|
||||
Q_UNREACHABLE();
|
||||
qWarning() << "Unknown feature" << feature;
|
||||
return poAllowNotifications;
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ void HTML5PermissionsDialog::createEntry(const HTML5PermissionsDialog::SiteData&
|
|||
item->setText(1, tr("Ask"));
|
||||
break;
|
||||
default:
|
||||
Q_UNREACHABLE();
|
||||
qWarning() << "Unknown unknown permission" << siteData.perm;
|
||||
item->setText(1, tr("Default"));
|
||||
break;
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ QWebEnginePage::Feature HTML5PermissionsDialog::indexToFeature(const int index)
|
|||
case 7:
|
||||
return QWebEnginePage::DesktopAudioVideoCapture;
|
||||
default:
|
||||
Q_UNREACHABLE();
|
||||
qWarning() << "Unknown feature index" << index;
|
||||
return QWebEnginePage::Notifications;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,6 @@ void HTML5PermissionsItem::permissionIndexChanged()
|
|||
m_permission = SiteSettingsManager::Ask;
|
||||
break;
|
||||
default:
|
||||
Q_UNREACHABLE();
|
||||
qWarning() << "Unknown permission index" << ui->comboBox->currentIndex();
|
||||
break;
|
||||
}
|
||||
|
@ -93,7 +92,6 @@ void HTML5PermissionsItem::setLabel()
|
|||
break;
|
||||
|
||||
default:
|
||||
Q_UNREACHABLE();
|
||||
qWarning() << "Unknown feature" << m_feature;
|
||||
break;
|
||||
}
|
||||
|
@ -113,7 +111,7 @@ void HTML5PermissionsItem::setCombo()
|
|||
ui->comboBox->setCurrentIndex(2);
|
||||
break;
|
||||
default:
|
||||
Q_UNREACHABLE();
|
||||
ui->comboBox->setCurrentIndex(2);
|
||||
qWarning() << "Unknown permission" << m_permission;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user