Small change concerning casting

This commit is contained in:
Pawel Polanski
2010-08-20 14:14:15 +02:00
parent 6840c1d198
commit b230898b66
2 changed files with 4 additions and 5 deletions

View File

@@ -163,10 +163,9 @@ void S60DeployConfigurationWidget::updateInstallationDrives()
{
m_installationDriveCombo->clear();
for (int i = STARTING_DRIVE_LETTER; i <= LAST_DRIVE_LETTER; ++i) {
m_installationDriveCombo->addItem(QString("%1:").arg((char)i), qVariantFromValue(i));
m_installationDriveCombo->addItem(QString("%1:").arg(static_cast<char>(i)), qVariantFromValue(i));
}
ushort installationDrive = m_deployConfiguration->installationDrive();
int index = QChar::toUpper(installationDrive) - STARTING_DRIVE_LETTER;
int index = QChar::toUpper(static_cast<ushort>(m_deployConfiguration->installationDrive())) - STARTING_DRIVE_LETTER;
Q_ASSERT(index >= 0 && index <= LAST_DRIVE_LETTER-STARTING_DRIVE_LETTER);
@@ -228,7 +227,7 @@ void S60DeployConfigurationWidget::updateTargetInformation()
void S60DeployConfigurationWidget::setInstallationDrive(int index)
{
m_deployConfiguration->setInstallationDrive((char)(STARTING_DRIVE_LETTER + index));
m_deployConfiguration->setInstallationDrive(static_cast<char>(STARTING_DRIVE_LETTER + index));
}
void S60DeployConfigurationWidget::setSerialPort(int index)

View File

@@ -893,7 +893,7 @@ void Launcher::installRemotePackageSilently()
emit installingStarted();
d->m_currentInstallationStep = InstallationModeSilent;
QByteArray ba;
ba.append((char)QChar::toUpper((ushort)d->m_installationDrive));
ba.append(static_cast<char>(QChar::toUpper((ushort)d->m_installationDrive)));
appendString(&ba, d->m_installFileNames.at(d->m_currentInstallFileName).toLocal8Bit(), TargetByteOrder, false);
d->m_device->sendTrkMessage(TrkInstallFile, TrkCallback(this, &Launcher::handleInstallPackageFinished), ba);
}