formatted all files with clang 9

This commit is contained in:
fourtf
2019-09-26 00:51:05 +02:00
parent e47a043a27
commit 9874bd779a
27 changed files with 102 additions and 185 deletions
+1 -2
View File
@@ -35,8 +35,7 @@ void NotificationPopup::updatePosition()
switch (location)
{
case BottomRight:
{
case BottomRight: {
this->move(rect.right() - this->width(),
rect.bottom() - this->height());
}
+8 -16
View File
@@ -258,33 +258,28 @@ void SelectChannelDialog::setSelectedChannel(IndirectChannel _channel)
switch (_channel.getType())
{
case Channel::Type::Twitch:
{
case Channel::Type::Twitch: {
this->ui_.notebook->selectIndex(TAB_TWITCH);
this->ui_.twitch.channel->setFocus();
this->ui_.twitch.channelName->setText(channel->getName());
}
break;
case Channel::Type::TwitchWatching:
{
case Channel::Type::TwitchWatching: {
this->ui_.notebook->selectIndex(TAB_TWITCH);
this->ui_.twitch.watching->setFocus();
}
break;
case Channel::Type::TwitchMentions:
{
case Channel::Type::TwitchMentions: {
this->ui_.notebook->selectIndex(TAB_TWITCH);
this->ui_.twitch.mentions->setFocus();
}
break;
case Channel::Type::TwitchWhispers:
{
case Channel::Type::TwitchWhispers: {
this->ui_.notebook->selectIndex(TAB_TWITCH);
this->ui_.twitch.whispers->setFocus();
}
break;
case Channel::Type::Irc:
{
case Channel::Type::Irc: {
this->ui_.notebook->selectIndex(TAB_IRC);
this->ui_.irc.channel->setText(_channel.get()->getName());
@@ -309,8 +304,7 @@ void SelectChannelDialog::setSelectedChannel(IndirectChannel _channel)
this->ui_.irc.channel->setFocus();
}
break;
default:
{
default: {
this->ui_.notebook->selectIndex(TAB_TWITCH);
this->ui_.twitch.channel->setFocus();
}
@@ -330,8 +324,7 @@ IndirectChannel SelectChannelDialog::getSelectedChannel() const
switch (this->ui_.notebook->getSelectedIndex())
{
case TAB_TWITCH:
{
case TAB_TWITCH: {
if (this->ui_.twitch.channel->isChecked())
{
return app->twitch.server->getOrAddChannel(
@@ -351,8 +344,7 @@ IndirectChannel SelectChannelDialog::getSelectedChannel() const
}
}
break;
case TAB_IRC:
{
case TAB_IRC: {
int row = this->ui_.irc.servers->getTableView()
->selectionModel()
->currentIndex()
+5 -10
View File
@@ -48,8 +48,7 @@ void UpdateDialog::updateStatusChanged(Updates::Status status)
switch (status)
{
case Updates::UpdateAvailable:
{
case Updates::UpdateAvailable: {
this->ui_.label->setText(
QString("An update (%1) is available.\n\nDo you want to "
"download and install it?")
@@ -58,28 +57,24 @@ void UpdateDialog::updateStatusChanged(Updates::Status status)
}
break;
case Updates::SearchFailed:
{
case Updates::SearchFailed: {
this->ui_.label->setText("Failed to load version information.");
}
break;
case Updates::Downloading:
{
case Updates::Downloading: {
this->ui_.label->setText(
"Downloading updates.\n\nChatterino will restart "
"automatically when the download is done.");
}
break;
case Updates::DownloadFailed:
{
case Updates::DownloadFailed: {
this->ui_.label->setText("Failed to download the update.");
}
break;
case Updates::WriteFileFailed:
{
case Updates::WriteFileFailed: {
this->ui_.label->setText("Failed to save the update to disk.");
}
break;
+3 -6
View File
@@ -191,16 +191,14 @@ UserInfoPopup::UserInfoPopup()
switch (action)
{
case TimeoutWidget::Ban:
{
case TimeoutWidget::Ban: {
if (this->channel_)
{
this->channel_->sendMessage("/ban " + this->userName_);
}
}
break;
case TimeoutWidget::Unban:
{
case TimeoutWidget::Unban: {
if (this->channel_)
{
this->channel_->sendMessage("/unban " +
@@ -208,8 +206,7 @@ UserInfoPopup::UserInfoPopup()
}
}
break;
case TimeoutWidget::Timeout:
{
case TimeoutWidget::Timeout: {
if (this->channel_)
{
this->channel_->sendMessage("/timeout " +