forked from teamnwah/openmw-tes3coop
Use QString::toInt instead of atoi
This commit is contained in:
parent
c26463fd91
commit
3747843c92
1 changed files with 3 additions and 5 deletions
|
@ -129,8 +129,7 @@ void Launcher::GraphicsPage::saveSettings()
|
||||||
if (cWindowBorder != mEngineSettings.getBool("window border", "Video"))
|
if (cWindowBorder != mEngineSettings.getBool("window border", "Video"))
|
||||||
mEngineSettings.setBool("window border", "Video", cWindowBorder);
|
mEngineSettings.setBool("window border", "Video", cWindowBorder);
|
||||||
|
|
||||||
// The atoi() call is safe because the pull down constrains the string values.
|
int cAAValue = antiAliasingComboBox->currentText().toInt();
|
||||||
int cAAValue = atoi(antiAliasingComboBox->currentText().toLatin1().data());
|
|
||||||
if (cAAValue != mEngineSettings.getInt("antialiasing", "Video"))
|
if (cAAValue != mEngineSettings.getInt("antialiasing", "Video"))
|
||||||
mEngineSettings.setInt("antialiasing", "Video", cAAValue);
|
mEngineSettings.setInt("antialiasing", "Video", cAAValue);
|
||||||
|
|
||||||
|
@ -139,9 +138,8 @@ void Launcher::GraphicsPage::saveSettings()
|
||||||
if (standardRadioButton->isChecked()) {
|
if (standardRadioButton->isChecked()) {
|
||||||
QRegExp resolutionRe(QString("(\\d+) x (\\d+).*"));
|
QRegExp resolutionRe(QString("(\\d+) x (\\d+).*"));
|
||||||
if (resolutionRe.exactMatch(resolutionComboBox->currentText().simplified())) {
|
if (resolutionRe.exactMatch(resolutionComboBox->currentText().simplified())) {
|
||||||
// The atoi() call is safe because the pull down constrains the string values.
|
cWidth = resolutionRe.cap(1).toInt();
|
||||||
cWidth = atoi(resolutionRe.cap(1).toLatin1().data());
|
cHeight = resolutionRe.cap(2).toInt();
|
||||||
cHeight = atoi(resolutionRe.cap(2).toLatin1().data());
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cWidth = customWidthSpinBox->value();
|
cWidth = customWidthSpinBox->value();
|
||||||
|
|
Loading…
Reference in a new issue