Manager: Use the CONFIG_FILE macro for 86box.cfg
This commit is contained in:
@@ -601,7 +601,7 @@ VMManagerMain::addNewSystem(const QString &name, const QString &dir, const QStri
|
|||||||
const auto newSystemDirectory = QDir(QDir::cleanPath(dir + "/" + name));
|
const auto newSystemDirectory = QDir(QDir::cleanPath(dir + "/" + name));
|
||||||
|
|
||||||
// qt replaces `/` with native separators
|
// qt replaces `/` with native separators
|
||||||
const auto newSystemConfigFile = QFileInfo(newSystemDirectory.path() + "/" + "86box.cfg");
|
const auto newSystemConfigFile = QFileInfo(newSystemDirectory.path() + "/" + CONFIG_FILE);
|
||||||
if (newSystemConfigFile.exists() || newSystemDirectory.exists()) {
|
if (newSystemConfigFile.exists() || newSystemDirectory.exists()) {
|
||||||
QMessageBox::critical(this, tr("Directory in use"), tr("The selected directory is already in use. Please select a different directory."));
|
QMessageBox::critical(this, tr("Directory in use"), tr("The selected directory is already in use. Please select a different directory."));
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ VMManagerSystem::scanForConfigs(QWidget* parent, const QString &searchPath)
|
|||||||
scanTimer.start();
|
scanTimer.start();
|
||||||
QVector<VMManagerSystem *> system_configs;
|
QVector<VMManagerSystem *> system_configs;
|
||||||
|
|
||||||
const auto config_file_name = QString("86box.cfg");
|
const auto config_file_name = QString(CONFIG_FILE);
|
||||||
const QStringList filters = {config_file_name};
|
const QStringList filters = {config_file_name};
|
||||||
QStringList matches;
|
QStringList matches;
|
||||||
QString search_directory;
|
QString search_directory;
|
||||||
|
|||||||
Reference in New Issue
Block a user