mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-01 21:06:43 +00:00
Replaced some costly string-comparisons with QLatin1String
This commit is contained in:
parent
6716bf649e
commit
7cbed6c58a
2 changed files with 10 additions and 9 deletions
|
@ -270,7 +270,7 @@ void GraphicsPage::readConfig()
|
||||||
}
|
}
|
||||||
|
|
||||||
index = mOGLAntiAliasingComboBox->findText(getConfigValue("FSAA", mOpenGLRenderSystem));
|
index = mOGLAntiAliasingComboBox->findText(getConfigValue("FSAA", mOpenGLRenderSystem));
|
||||||
if ( index != -1) {
|
if ( index != -1){
|
||||||
mOGLAntiAliasingComboBox->setCurrentIndex(index);
|
mOGLAntiAliasingComboBox->setCurrentIndex(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,17 +285,18 @@ void GraphicsPage::readConfig()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now we do the same for the checkboxes
|
// Now we do the same for the checkboxes
|
||||||
if (QString::compare(getConfigValue("VSync", mOpenGLRenderSystem), QString("Yes")) == 0) {
|
if (getConfigValue("VSync", mOpenGLRenderSystem) == QLatin1String("Yes")) {
|
||||||
mOGLVSyncCheckBox->setCheckState(Qt::Checked);
|
mOGLVSyncCheckBox->setCheckState(Qt::Checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (QString::compare(getConfigValue("Full Screen", mOpenGLRenderSystem), QString("Yes")) == 0) {
|
if (getConfigValue("Full Screen", mOpenGLRenderSystem) == QLatin1String("Yes")) {
|
||||||
mOGLFullScreenCheckBox->setCheckState(Qt::Checked);
|
mOGLFullScreenCheckBox->setCheckState(Qt::Checked);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mDirect3DRenderSystem) {
|
if (mDirect3DRenderSystem) {
|
||||||
int index = mD3DRenderDeviceComboBox->findText(getConfigValue("Rendering Device", mDirect3DRenderSystem));
|
|
||||||
|
int index = mD3DRenderDeviceComboBox->findText(getConfigValue("Rendering Device", mDirect3DRenderSystem));
|
||||||
if ( index != -1) {
|
if ( index != -1) {
|
||||||
mD3DRenderDeviceComboBox->setCurrentIndex(index);
|
mD3DRenderDeviceComboBox->setCurrentIndex(index);
|
||||||
}
|
}
|
||||||
|
@ -315,15 +316,15 @@ void GraphicsPage::readConfig()
|
||||||
mD3DResolutionComboBox->setCurrentIndex(index);
|
mD3DResolutionComboBox->setCurrentIndex(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (QString::compare(getConfigValue("Allow NVPerfHUD", mDirect3DRenderSystem), QString("Yes")) == 0) {
|
if (getConfigValue("Allow NVPerfHUD", mDirect3DRenderSystem) == QLatin1String("Yes")) {
|
||||||
mD3DNvPerfCheckBox->setCheckState(Qt::Checked);
|
mD3DNvPerfCheckBox->setCheckState(Qt::Checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (QString::compare(getConfigValue("VSync", mDirect3DRenderSystem), QString("Yes")) == 0) {
|
if (getConfigValue("VSync", mDirect3DRenderSystem) == QLatin1String("Yes")) {
|
||||||
mD3DVSyncCheckBox->setCheckState(Qt::Checked);
|
mD3DVSyncCheckBox->setCheckState(Qt::Checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (QString::compare(getConfigValue("Full Screen", mDirect3DRenderSystem), QString("Yes")) == 0) {
|
if (getConfigValue("Full Screen", mDirect3DRenderSystem) == QLatin1String("Yes")) {
|
||||||
mD3DFullScreenCheckBox->setCheckState(Qt::Checked);
|
mD3DFullScreenCheckBox->setCheckState(Qt::Checked);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,11 +178,11 @@ void MainDialog::profileChanged(int index)
|
||||||
}
|
}
|
||||||
|
|
||||||
QString currentPage = mIconWidget->currentItem()->data(Qt::DisplayRole).toString();
|
QString currentPage = mIconWidget->currentItem()->data(Qt::DisplayRole).toString();
|
||||||
if (currentPage == QString("Play")) {
|
if (currentPage == QLatin1String("Play")) {
|
||||||
mDataFilesPage->mProfilesComboBox->setCurrentIndex(index);
|
mDataFilesPage->mProfilesComboBox->setCurrentIndex(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentPage == QString("Data Files")) {
|
if (currentPage == QLatin1String("Data Files")) {
|
||||||
mPlayPage->mProfilesComboBox->setCurrentIndex(index);
|
mPlayPage->mProfilesComboBox->setCurrentIndex(index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue