NOISSUE dissolve util library
This commit is contained in:
@ -20,10 +20,9 @@
|
||||
#include <QFileDialog>
|
||||
#include <QStandardPaths>
|
||||
|
||||
#include <pathutils.h>
|
||||
|
||||
#include "settings/SettingsObject.h"
|
||||
#include "tools/BaseProfiler.h"
|
||||
#include <FileSystem.h>
|
||||
#include "MultiMC.h"
|
||||
|
||||
ExternalToolsPage::ExternalToolsPage(QWidget *parent) :
|
||||
@ -91,7 +90,7 @@ void ExternalToolsPage::on_jprofilerPathBtn_clicked()
|
||||
{
|
||||
break;
|
||||
}
|
||||
QString cooked_dir = NormalizePath(raw_dir);
|
||||
QString cooked_dir = FS::NormalizePath(raw_dir);
|
||||
if (!MMC->profilers()["jprofiler"]->check(cooked_dir, &error))
|
||||
{
|
||||
QMessageBox::critical(this, tr("Error"),
|
||||
@ -130,7 +129,7 @@ void ExternalToolsPage::on_jvisualvmPathBtn_clicked()
|
||||
{
|
||||
break;
|
||||
}
|
||||
QString cooked_dir = NormalizePath(raw_dir);
|
||||
QString cooked_dir = FS::NormalizePath(raw_dir);
|
||||
if (!MMC->profilers()["jvisualvm"]->check(cooked_dir, &error))
|
||||
{
|
||||
QMessageBox::critical(this, tr("Error"),
|
||||
@ -174,7 +173,7 @@ void ExternalToolsPage::on_mceditPathBtn_clicked()
|
||||
{
|
||||
break;
|
||||
}
|
||||
QString cooked_dir = NormalizePath(raw_dir);
|
||||
QString cooked_dir = FS::NormalizePath(raw_dir);
|
||||
if (!MMC->tools()["mcedit"]->check(cooked_dir, &error))
|
||||
{
|
||||
QMessageBox::critical(this, tr("Error"),
|
||||
@ -213,7 +212,7 @@ void ExternalToolsPage::on_jsonEditorBrowseBtn_clicked()
|
||||
? QStandardPaths::standardLocations(QStandardPaths::ApplicationsLocation).first()
|
||||
#endif
|
||||
: ui->jsonEditorTextBox->text());
|
||||
QString cooked_file = NormalizePath(raw_file);
|
||||
QString cooked_file = FS::NormalizePath(raw_file);
|
||||
|
||||
if (cooked_file.isEmpty())
|
||||
{
|
||||
|
@ -21,8 +21,6 @@
|
||||
#include <QMessageBox>
|
||||
#include <QDir>
|
||||
|
||||
#include <pathutils.h>
|
||||
|
||||
#include "dialogs/VersionSelectDialog.h"
|
||||
#include <ColumnResizer.h>
|
||||
|
||||
@ -30,6 +28,7 @@
|
||||
#include "java/JavaVersionList.h"
|
||||
|
||||
#include "settings/SettingsObject.h"
|
||||
#include <FileSystem.h>
|
||||
#include "MultiMC.h"
|
||||
|
||||
JavaPage::JavaPage(QWidget *parent) : QWidget(parent), ui(new Ui::JavaPage)
|
||||
@ -109,7 +108,7 @@ void JavaPage::on_javaDetectBtn_clicked()
|
||||
void JavaPage::on_javaBrowseBtn_clicked()
|
||||
{
|
||||
QString raw_path = QFileDialog::getOpenFileName(this, tr("Find Java executable"));
|
||||
QString cooked_path = NormalizePath(raw_path);
|
||||
QString cooked_path = FS::NormalizePath(raw_path);
|
||||
|
||||
// do not allow current dir - it's dirty. Do not allow dirs that don't exist
|
||||
if(cooked_path.isEmpty())
|
||||
|
@ -19,8 +19,6 @@
|
||||
#include <QMessageBox>
|
||||
#include <QDir>
|
||||
|
||||
#include <pathutils.h>
|
||||
|
||||
#include "settings/SettingsObject.h"
|
||||
#include "MultiMC.h"
|
||||
|
||||
|
@ -21,11 +21,11 @@
|
||||
#include <QDir>
|
||||
#include <QTextCharFormat>
|
||||
|
||||
#include <pathutils.h>
|
||||
#include <ColumnResizer.h>
|
||||
#include "updater/UpdateChecker.h"
|
||||
|
||||
#include "settings/SettingsObject.h"
|
||||
#include <FileSystem.h>
|
||||
#include "MultiMC.h"
|
||||
|
||||
// FIXME: possibly move elsewhere
|
||||
@ -85,7 +85,7 @@ void MultiMCPage::on_ftbLauncherBrowseBtn_clicked()
|
||||
{
|
||||
QString raw_dir = QFileDialog::getExistingDirectory(this, tr("FTB Launcher Directory"),
|
||||
ui->ftbLauncherBox->text());
|
||||
QString cooked_dir = NormalizePath(raw_dir);
|
||||
QString cooked_dir = FS::NormalizePath(raw_dir);
|
||||
|
||||
// do not allow current dir - it's dirty. Do not allow dirs that don't exist
|
||||
if (!cooked_dir.isEmpty() && QDir(cooked_dir).exists())
|
||||
@ -97,7 +97,7 @@ void MultiMCPage::on_ftbBrowseBtn_clicked()
|
||||
{
|
||||
QString raw_dir =
|
||||
QFileDialog::getExistingDirectory(this, tr("FTB Directory"), ui->ftbBox->text());
|
||||
QString cooked_dir = NormalizePath(raw_dir);
|
||||
QString cooked_dir = FS::NormalizePath(raw_dir);
|
||||
|
||||
// do not allow current dir - it's dirty. Do not allow dirs that don't exist
|
||||
if (!cooked_dir.isEmpty() && QDir(cooked_dir).exists())
|
||||
@ -110,12 +110,12 @@ void MultiMCPage::on_instDirBrowseBtn_clicked()
|
||||
{
|
||||
QString raw_dir = QFileDialog::getExistingDirectory(this, tr("Instance Directory"),
|
||||
ui->instDirTextBox->text());
|
||||
QString cooked_dir = NormalizePath(raw_dir);
|
||||
QString cooked_dir = FS::NormalizePath(raw_dir);
|
||||
|
||||
// do not allow current dir - it's dirty. Do not allow dirs that don't exist
|
||||
if (!cooked_dir.isEmpty() && QDir(cooked_dir).exists())
|
||||
{
|
||||
if (checkProblemticPathJava(QDir(cooked_dir)))
|
||||
if (FS::checkProblemticPathJava(QDir(cooked_dir)))
|
||||
{
|
||||
QMessageBox warning;
|
||||
warning.setText(tr("You're trying to specify an instance folder which\'s path "
|
||||
@ -143,7 +143,7 @@ void MultiMCPage::on_iconsDirBrowseBtn_clicked()
|
||||
{
|
||||
QString raw_dir = QFileDialog::getExistingDirectory(this, tr("Icons Directory"),
|
||||
ui->iconsDirTextBox->text());
|
||||
QString cooked_dir = NormalizePath(raw_dir);
|
||||
QString cooked_dir = FS::NormalizePath(raw_dir);
|
||||
|
||||
// do not allow current dir - it's dirty. Do not allow dirs that don't exist
|
||||
if (!cooked_dir.isEmpty() && QDir(cooked_dir).exists())
|
||||
@ -155,7 +155,7 @@ void MultiMCPage::on_modsDirBrowseBtn_clicked()
|
||||
{
|
||||
QString raw_dir = QFileDialog::getExistingDirectory(this, tr("Mods Directory"),
|
||||
ui->modsDirTextBox->text());
|
||||
QString cooked_dir = NormalizePath(raw_dir);
|
||||
QString cooked_dir = FS::NormalizePath(raw_dir);
|
||||
|
||||
// do not allow current dir - it's dirty. Do not allow dirs that don't exist
|
||||
if (!cooked_dir.isEmpty() && QDir(cooked_dir).exists())
|
||||
@ -167,7 +167,7 @@ void MultiMCPage::on_lwjglDirBrowseBtn_clicked()
|
||||
{
|
||||
QString raw_dir = QFileDialog::getExistingDirectory(this, tr("LWJGL Directory"),
|
||||
ui->lwjglDirTextBox->text());
|
||||
QString cooked_dir = NormalizePath(raw_dir);
|
||||
QString cooked_dir = FS::NormalizePath(raw_dir);
|
||||
|
||||
// do not allow current dir - it's dirty. Do not allow dirs that don't exist
|
||||
if (!cooked_dir.isEmpty() && QDir(cooked_dir).exists())
|
||||
@ -308,8 +308,8 @@ void MultiMCPage::applySettings()
|
||||
|
||||
// FTB
|
||||
s->set("TrackFTBInstances", ui->trackFtbBox->isChecked());
|
||||
s->set("FTBLauncherLocal", NormalizePath(ui->ftbLauncherBox->text()));
|
||||
s->set("FTBRoot", NormalizePath(ui->ftbBox->text()));
|
||||
s->set("FTBLauncherLocal", FS::NormalizePath(ui->ftbLauncherBox->text()));
|
||||
s->set("FTBRoot", FS::NormalizePath(ui->ftbBox->text()));
|
||||
|
||||
// Folders
|
||||
// TODO: Offer to move instances to new instance folder.
|
||||
|
@ -20,8 +20,6 @@
|
||||
#include <QFileDialog>
|
||||
#include <QStandardPaths>
|
||||
|
||||
#include <pathutils.h>
|
||||
|
||||
#include "settings/SettingsObject.h"
|
||||
#include "tools/BaseProfiler.h"
|
||||
#include "MultiMC.h"
|
||||
|
Reference in New Issue
Block a user