Customizable folder browsing is same as for the instance folder. Syste Proxy usage.
This commit is contained in:
parent
e7e03c2b54
commit
946d397cce
@ -149,6 +149,9 @@ MultiMC::MultiMC(int &argc, char **argv) : QApplication(argc, argv)
|
||||
// init the http meta cache
|
||||
initHttpMetaCache();
|
||||
|
||||
// set up a basic autodetected proxy (system default)
|
||||
QNetworkProxyFactory::setUseSystemConfiguration(true);
|
||||
|
||||
// create the global network manager
|
||||
m_qnam.reset(new QNetworkAccessManager(this));
|
||||
|
||||
|
@ -67,21 +67,27 @@ void SettingsDialog::on_instDirBrowseBtn_clicked()
|
||||
|
||||
void SettingsDialog::on_modsDirBrowseBtn_clicked()
|
||||
{
|
||||
QString dir = QFileDialog::getExistingDirectory(this, tr("Mods Directory"),
|
||||
ui->modsDirTextBox->text());
|
||||
if (!dir.isEmpty())
|
||||
QString raw_dir = QFileDialog::getExistingDirectory(this, tr("Mods Directory"),
|
||||
ui->modsDirTextBox->text());
|
||||
QString cooked_dir = 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())
|
||||
{
|
||||
ui->modsDirTextBox->setText(dir);
|
||||
ui->modsDirTextBox->setText(cooked_dir);
|
||||
}
|
||||
}
|
||||
|
||||
void SettingsDialog::on_lwjglDirBrowseBtn_clicked()
|
||||
{
|
||||
QString dir = QFileDialog::getExistingDirectory(this, tr("LWJGL Directory"),
|
||||
ui->lwjglDirTextBox->text());
|
||||
if (!dir.isEmpty())
|
||||
QString raw_dir = QFileDialog::getExistingDirectory(this, tr("LWJGL Directory"),
|
||||
ui->lwjglDirTextBox->text());
|
||||
QString cooked_dir = 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())
|
||||
{
|
||||
ui->lwjglDirTextBox->setText(dir);
|
||||
ui->lwjglDirTextBox->setText(cooked_dir);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user