diff options
| author | Tannin <sherb@gmx.net> | 2016-01-10 20:19:56 +0100 |
|---|---|---|
| committer | Tannin <sherb@gmx.net> | 2016-01-10 20:19:56 +0100 |
| commit | 2aae65d6f6c1ab3309e54437a339d1644088c5c8 (patch) | |
| tree | b693c455a4433370724cfbaa23a66998a16027a9 /src/profilesdialog.cpp | |
| parent | ddf841400ef4da235f11e9b67177a78bb3d519d4 (diff) | |
made instance-switching usable
this includes tons and tons of changes to how paths are determined.
the profiles-dir can now also be configured
Diffstat (limited to 'src/profilesdialog.cpp')
| -rw-r--r-- | src/profilesdialog.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/profilesdialog.cpp b/src/profilesdialog.cpp index b21aee53..49fbda4e 100644 --- a/src/profilesdialog.cpp +++ b/src/profilesdialog.cpp @@ -25,6 +25,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include "profileinputdialog.h"
#include "mainwindow.h"
#include "aboutdialog.h"
+#include "settings.h"
#include <iplugingame.h>
#include <bsainvalidation.h>
#include <appconfig.h>
@@ -50,7 +51,7 @@ ProfilesDialog::ProfilesDialog(const QString &profileName, MOBase::IPluginGame c {
ui->setupUi(this);
- QDir profilesDir(qApp->property("dataPath").toString() + "/" + QString::fromStdWString(AppConfig::profilesPath()));
+ QDir profilesDir(Settings::instance().getProfileDirectory());
profilesDir.setFilter(QDir::AllDirs | QDir::NoDotAndDotDot);
m_ProfilesList = findChild<QListWidget*>("profilesList");
@@ -187,8 +188,7 @@ void ProfilesDialog::on_removeProfileButton_clicked() Profile::Ptr currentProfile = profilesList->currentItem()->data(Qt::UserRole).value<Profile::Ptr>();
QString profilePath;
if (currentProfile.get() == nullptr) {
- profilePath = qApp->property("dataPath").toString()
- + "/" + QString::fromStdWString(AppConfig::profilesPath())
+ profilePath = Settings::instance().getProfileDirectory()
+ "/" + profilesList->currentItem()->text();
if (QMessageBox::question(this, tr("Profile broken"),
tr("This profile you're about to delete seems to be broken or the path is invalid. "
|
