1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 20:53:50 +00:00

Merge remote branch 'pvdk/master'

This commit is contained in:
Marc Zinnschlag 2012-03-22 13:49:37 +01:00
commit fe9cbdde89

View file

@ -225,7 +225,7 @@ void DataFilesPage::setupDataFiles()
msgBox.setIcon(QMessageBox::Warning); msgBox.setIcon(QMessageBox::Warning);
msgBox.setStandardButtons(QMessageBox::Cancel); msgBox.setStandardButtons(QMessageBox::Cancel);
msgBox.setText(tr("<br><b>Could not find the Data Files location</b><br><br> \ msgBox.setText(tr("<br><b>Could not find the Data Files location</b><br><br> \
The directory containing the Data Files was not found.<br><br> \ The directory containing the data files was not found.<br><br> \
Press \"Browse...\" to specify the location manually.<br>")); Press \"Browse...\" to specify the location manually.<br>"));
QAbstractButton *dirSelectButton = QAbstractButton *dirSelectButton =
@ -1057,16 +1057,8 @@ void DataFilesPage::writeConfig(QString profile)
return; return;
} }
// Prepare the OpenMW config // Open the OpenMW config as a QFile
QString config = QString::fromStdString((mCfgMgr.getLocalPath() / "openmw.cfg").string()); QFile file(QString::fromStdString((mCfgMgr.getUserPath() / "openmw.cfg").string()));
QFile file(config);
if (!file.exists()) {
config = QString::fromStdString((mCfgMgr.getUserPath() / "openmw.cfg").string());
}
// Open the config as a QFile
file.setFileName(config);
if (!file.open(QIODevice::ReadWrite | QIODevice::Text)) { if (!file.open(QIODevice::ReadWrite | QIODevice::Text)) {
// File cannot be opened or created // File cannot be opened or created