summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2018-02-08 22:45:59 +0100
committerLaurent Montel <[email protected]>2018-02-08 22:45:59 +0100
commit8619cf2922fc1abd3b9dac8cab238756b8857052 (patch)
treeaf451f670d2d5bc4b6535a01e86e041a6448957e
parent2fa9c91afee329c84ae910cfc61d6c88ae459e3a (diff)
Use static_cast
-rw-r--r--src/serversievesettings.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/serversievesettings.cpp b/src/serversievesettings.cpp
index f9016d1..1b6f6f1 100644
--- a/src/serversievesettings.cpp
+++ b/src/serversievesettings.cpp
@@ -59,7 +59,7 @@ static void addAuthenticationItem(QComboBox *authCombo, MailTransport::Transport
static MailTransport::Transport::EnumAuthenticationType::type getCurrentAuthMode(QComboBox *authCombo)
{
- MailTransport::Transport::EnumAuthenticationType::type authtype = (MailTransport::Transport::EnumAuthenticationType::type)authCombo->itemData(authCombo->currentIndex()).toInt();
+ MailTransport::Transport::EnumAuthenticationType::type authtype = static_cast<MailTransport::Transport::EnumAuthenticationType::type>(authCombo->itemData(authCombo->currentIndex()).toInt());
//qCDebug(SIEVEEDITOR_LOG) << "current auth mode: " << authenticationModeString( authtype );
return authtype;
}
@@ -73,7 +73,7 @@ static void setCurrentAuthMode(QComboBox *authCombo, MailTransport::Transport::E
}
//qCDebug(SIEVEEDITOR_LOG) << "found corresponding index: " << index << "with data" << authenticationModeString( (MailTransport::Transport::EnumAuthenticationType::type) authCombo->itemData( index ).toInt() );
authCombo->setCurrentIndex(index);
- MailTransport::Transport::EnumAuthenticationType::type t = (MailTransport::Transport::EnumAuthenticationType::type)authCombo->itemData(authCombo->currentIndex()).toInt();
+ MailTransport::Transport::EnumAuthenticationType::type t = static_cast<MailTransport::Transport::EnumAuthenticationType::type>(authCombo->itemData(authCombo->currentIndex()).toInt());
//qCDebug(SIEVEEDITOR_LOG) << "selected auth mode:" << authenticationModeString( t );
Q_ASSERT(t == authtype);
}
@@ -397,12 +397,12 @@ void ServerSieveSettings::slotSafetyChanged()
ui->imapAuthenticationCombo->clear();
addAuthenticationItem(ui->imapAuthenticationCombo, MailTransport::Transport::EnumAuthenticationType::CLEAR);
for (int prot : qAsConst(protocols)) {
- addAuthenticationItem(ui->imapAuthenticationCombo, (MailTransport::Transport::EnumAuthenticationType::type)prot);
+ addAuthenticationItem(ui->imapAuthenticationCombo, static_cast<MailTransport::Transport::EnumAuthenticationType::type>(prot));
}
if (protocols.isEmpty()) {
qCDebug(SIEVEEDITOR_LOG) << "no authmodes found";
} else {
- setCurrentAuthMode(ui->imapAuthenticationCombo, (MailTransport::Transport::EnumAuthenticationType::type)protocols.constFirst());
+ setCurrentAuthMode(ui->imapAuthenticationCombo, static_cast<MailTransport::Transport::EnumAuthenticationType::type>(protocols.constFirst()));
}
mServerTest->deleteLater();
mServerTest = nullptr;