From 6ecb833dbf4c4930c8354dcce7967ad44c16c217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 28 Oct 2013 20:55:12 +0100 Subject: Fix problem with instance list not using the instance folder path --- MultiMC.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'MultiMC.cpp') diff --git a/MultiMC.cpp b/MultiMC.cpp index 3d62f76e..56109ba6 100644 --- a/MultiMC.cpp +++ b/MultiMC.cpp @@ -32,8 +32,8 @@ using namespace Util::Commandline; MultiMC::MultiMC(int &argc, char **argv) : QApplication(argc, argv) { - setOrganizationName("MultiMC"); - setApplicationName("MultiMC5"); + setOrganizationName("MultiMC"); + setApplicationName("MultiMC5"); initTranslations(); @@ -139,9 +139,12 @@ MultiMC::MultiMC(int &argc, char **argv) : QApplication(argc, argv) initGlobalSettings(); // and instances - m_instances.reset(new InstanceList(m_settings->get("InstanceDir").toString(), this)); + auto InstDirSetting = m_settings->getSetting("InstanceDir"); + m_instances.reset(new InstanceList(InstDirSetting->get().toString(), this)); QLOG_INFO() << "Loading Instances..."; m_instances->loadList(); + connect(InstDirSetting, SIGNAL(settingChanged(const Setting &, QVariant)), + m_instances.get(), SLOT(on_InstFolderChanged(const Setting &, QVariant))); // init the http meta cache initHttpMetaCache(); -- cgit v1.2.3 From 7df667f823fc4a679148dfea215b25642babb48f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 28 Oct 2013 21:50:58 +0100 Subject: Valgrind-checked early application start --- MultiMC.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'MultiMC.cpp') diff --git a/MultiMC.cpp b/MultiMC.cpp index 56109ba6..4e2a5b0b 100644 --- a/MultiMC.cpp +++ b/MultiMC.cpp @@ -351,20 +351,24 @@ std::shared_ptr MultiMC::javalist() return m_javalist; } -int main(int argc, char *argv[]) +int main_gui(MultiMC & app) { - // initialize Qt - MultiMC app(argc, argv); - // show main window MainWindow mainWin; mainWin.show(); mainWin.checkSetDefaultJava(); + return app.exec(); +} + +int main(int argc, char *argv[]) +{ + // initialize Qt + MultiMC app(argc, argv); switch (app.status()) { case MultiMC::Initialized: - return app.exec(); + return main_gui(app); case MultiMC::Failed: return 1; case MultiMC::Succeeded: -- cgit v1.2.3 From 946d397ccedfe1c116566fce1f86ae4f794e44a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 29 Oct 2013 22:13:42 +0100 Subject: Customizable folder browsing is same as for the instance folder. Syste Proxy usage. --- MultiMC.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'MultiMC.cpp') diff --git a/MultiMC.cpp b/MultiMC.cpp index 4e2a5b0b..e425aa44 100644 --- a/MultiMC.cpp +++ b/MultiMC.cpp @@ -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)); -- cgit v1.2.3