summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--facetracknoir/ui.cpp4
-rw-r--r--opentrack/options.hpp6
2 files changed, 8 insertions, 2 deletions
diff --git a/facetracknoir/ui.cpp b/facetracknoir/ui.cpp
index 6aa47fb6..15c94bd7 100644
--- a/facetracknoir/ui.cpp
+++ b/facetracknoir/ui.cpp
@@ -203,7 +203,7 @@ void MainWindow::refresh_config_list()
QStringList ini_list = group::ini_list();
set_title();
- QString current = QFileInfo(group::ini_pathname()).fileName();
+ QString current = group::ini_filename();
ui.iconcomboProfile->clear();
for (auto x : ini_list)
ui.iconcomboProfile->addItem(QIcon(":/images/settings16.png"), x);
@@ -343,7 +343,7 @@ void MainWindow::set_title(const QString& game_title_)
QString game_title;
if (game_title_ != "")
game_title = " :: " + game_title_;
- QString current = QFileInfo(group::ini_pathname()).fileName();
+ QString current = group::ini_filename();
setWindowTitle(const_cast<const char*>(opentrack_version) + QStringLiteral(" :: ") + current + game_title);
}
diff --git a/opentrack/options.hpp b/opentrack/options.hpp
index 8e623092..f8475877 100644
--- a/opentrack/options.hpp
+++ b/opentrack/options.hpp
@@ -143,6 +143,12 @@ namespace options {
return "";
}
+ static QString ini_filename()
+ {
+ QSettings settings(OPENTRACK_ORG);
+ return settings.value(OPENTRACK_CONFIG_FILENAME_KEY, OPENTRACK_DEFAULT_CONFIG).toString();
+ }
+
static QString ini_pathname()
{
const auto dir = ini_directory();