summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/IconPickerDialog.cpp2
-rw-r--r--gui/LegacyModEditDialog.cpp206
-rw-r--r--gui/LegacyModEditDialog.h8
-rw-r--r--gui/OneSixModEditDialog.cpp19
-rw-r--r--gui/OneSixModEditDialog.h6
-rw-r--r--gui/aboutdialog.ui97
-rw-r--r--gui/logindialog.cpp10
-rw-r--r--gui/lwjglselectdialog.cpp6
-rw-r--r--gui/mainwindow.cpp360
-rw-r--r--gui/newinstancedialog.cpp2
-rw-r--r--gui/settingsdialog.cpp4
-rw-r--r--gui/versionselectdialog.cpp2
12 files changed, 361 insertions, 361 deletions
diff --git a/gui/IconPickerDialog.cpp b/gui/IconPickerDialog.cpp
index 8f5d8256..6a1ca546 100644
--- a/gui/IconPickerDialog.cpp
+++ b/gui/IconPickerDialog.cpp
@@ -39,7 +39,7 @@ IconPickerDialog::IconPickerDialog(QWidget *parent) :
contentsWidget->installEventFilter(this);
- contentsWidget->setModel(MMC->icons().data());
+ contentsWidget->setModel(MMC->icons().get());
auto buttonAdd = ui->buttonBox->addButton(tr("Add Icon"),QDialogButtonBox::ResetRole);
auto buttonRemove = ui->buttonBox->addButton(tr("Remove Icon"),QDialogButtonBox::ResetRole);
diff --git a/gui/LegacyModEditDialog.cpp b/gui/LegacyModEditDialog.cpp
index 053aef6b..c240daff 100644
--- a/gui/LegacyModEditDialog.cpp
+++ b/gui/LegacyModEditDialog.cpp
@@ -3,7 +3,7 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -28,49 +28,47 @@
#include <QEvent>
#include <QKeyEvent>
-LegacyModEditDialog::LegacyModEditDialog( LegacyInstance* inst, QWidget* parent ) :
- m_inst(inst),
- QDialog(parent),
- ui(new Ui::LegacyModEditDialog)
+LegacyModEditDialog::LegacyModEditDialog(LegacyInstance *inst, QWidget *parent)
+ : m_inst(inst), QDialog(parent), ui(new Ui::LegacyModEditDialog)
{
ui->setupUi(this);
-
+
// Jar mods
{
ensureFolderPathExists(m_inst->jarModsDir());
m_jarmods = m_inst->jarModList();
- ui->jarModsTreeView->setModel(m_jarmods.data());
+ ui->jarModsTreeView->setModel(m_jarmods.get());
#ifndef Q_OS_LINUX
// FIXME: internal DnD causes segfaults later
ui->jarModsTreeView->setDragDropMode(QAbstractItemView::DragDrop);
// FIXME: DnD is glitched with contiguous (we move only first item in selection)
ui->jarModsTreeView->setSelectionMode(QAbstractItemView::SingleSelection);
#endif
- ui->jarModsTreeView->installEventFilter( this );
+ ui->jarModsTreeView->installEventFilter(this);
m_jarmods->startWatching();
}
// Core mods
{
ensureFolderPathExists(m_inst->coreModsDir());
m_coremods = m_inst->coreModList();
- ui->coreModsTreeView->setModel(m_coremods.data());
- ui->coreModsTreeView->installEventFilter( this );
+ ui->coreModsTreeView->setModel(m_coremods.get());
+ ui->coreModsTreeView->installEventFilter(this);
m_coremods->startWatching();
}
// Loader mods
{
ensureFolderPathExists(m_inst->loaderModsDir());
m_mods = m_inst->loaderModList();
- ui->loaderModTreeView->setModel(m_mods.data());
- ui->loaderModTreeView->installEventFilter( this );
+ ui->loaderModTreeView->setModel(m_mods.get());
+ ui->loaderModTreeView->installEventFilter(this);
m_mods->startWatching();
}
// texture packs
{
ensureFolderPathExists(m_inst->texturePacksDir());
m_texturepacks = m_inst->texturePackList();
- ui->texPackTreeView->setModel(m_texturepacks.data());
- ui->texPackTreeView->installEventFilter( this );
+ ui->texPackTreeView->setModel(m_texturepacks.get());
+ ui->texPackTreeView->installEventFilter(this);
m_texturepacks->startWatching();
}
}
@@ -84,113 +82,111 @@ LegacyModEditDialog::~LegacyModEditDialog()
delete ui;
}
-bool LegacyModEditDialog::coreListFilter ( QKeyEvent* keyEvent )
+bool LegacyModEditDialog::coreListFilter(QKeyEvent *keyEvent)
{
- switch(keyEvent->key())
+ switch (keyEvent->key())
{
- case Qt::Key_Delete:
- on_rmCoreBtn_clicked();
- return true;
- case Qt::Key_Plus:
- on_addCoreBtn_clicked();
- return true;
- default:
- break;
+ case Qt::Key_Delete:
+ on_rmCoreBtn_clicked();
+ return true;
+ case Qt::Key_Plus:
+ on_addCoreBtn_clicked();
+ return true;
+ default:
+ break;
}
- return QDialog::eventFilter( ui->coreModsTreeView, keyEvent );
+ return QDialog::eventFilter(ui->coreModsTreeView, keyEvent);
}
-bool LegacyModEditDialog::jarListFilter ( QKeyEvent* keyEvent )
+bool LegacyModEditDialog::jarListFilter(QKeyEvent *keyEvent)
{
- switch(keyEvent->key())
+ switch (keyEvent->key())
{
- case Qt::Key_Up:
+ case Qt::Key_Up:
+ {
+ if (keyEvent->modifiers() & Qt::ControlModifier)
{
- if(keyEvent->modifiers() & Qt::ControlModifier)
- {
- on_moveJarUpBtn_clicked();
- return true;
- }
- break;
+ on_moveJarUpBtn_clicked();
+ return true;
}
- case Qt::Key_Down:
+ break;
+ }
+ case Qt::Key_Down:
+ {
+ if (keyEvent->modifiers() & Qt::ControlModifier)
{
- if(keyEvent->modifiers() & Qt::ControlModifier)
- {
- on_moveJarDownBtn_clicked();
- return true;
- }
- break;
- }
- case Qt::Key_Delete:
- on_rmJarBtn_clicked();
- return true;
- case Qt::Key_Plus:
- on_addJarBtn_clicked();
+ on_moveJarDownBtn_clicked();
return true;
- default:
- break;
+ }
+ break;
}
- return QDialog::eventFilter( ui->jarModsTreeView, keyEvent );
+ case Qt::Key_Delete:
+ on_rmJarBtn_clicked();
+ return true;
+ case Qt::Key_Plus:
+ on_addJarBtn_clicked();
+ return true;
+ default:
+ break;
+ }
+ return QDialog::eventFilter(ui->jarModsTreeView, keyEvent);
}
-bool LegacyModEditDialog::loaderListFilter ( QKeyEvent* keyEvent )
+bool LegacyModEditDialog::loaderListFilter(QKeyEvent *keyEvent)
{
- switch(keyEvent->key())
+ switch (keyEvent->key())
{
- case Qt::Key_Delete:
- on_rmModBtn_clicked();
- return true;
- case Qt::Key_Plus:
- on_addModBtn_clicked();
- return true;
- default:
- break;
+ case Qt::Key_Delete:
+ on_rmModBtn_clicked();
+ return true;
+ case Qt::Key_Plus:
+ on_addModBtn_clicked();
+ return true;
+ default:
+ break;
}
- return QDialog::eventFilter( ui->loaderModTreeView, keyEvent );
+ return QDialog::eventFilter(ui->loaderModTreeView, keyEvent);
}
-bool LegacyModEditDialog::texturePackListFilter ( QKeyEvent* keyEvent )
+bool LegacyModEditDialog::texturePackListFilter(QKeyEvent *keyEvent)
{
- switch(keyEvent->key())
+ switch (keyEvent->key())
{
- case Qt::Key_Delete:
- on_rmTexPackBtn_clicked();
- return true;
- case Qt::Key_Plus:
- on_addTexPackBtn_clicked();
- return true;
- default:
- break;
+ case Qt::Key_Delete:
+ on_rmTexPackBtn_clicked();
+ return true;
+ case Qt::Key_Plus:
+ on_addTexPackBtn_clicked();
+ return true;
+ default:
+ break;
}
- return QDialog::eventFilter( ui->texPackTreeView, keyEvent );
+ return QDialog::eventFilter(ui->texPackTreeView, keyEvent);
}
-
-bool LegacyModEditDialog::eventFilter ( QObject* obj, QEvent* ev )
+bool LegacyModEditDialog::eventFilter(QObject *obj, QEvent *ev)
{
if (ev->type() != QEvent::KeyPress)
{
- return QDialog::eventFilter( obj, ev );
+ return QDialog::eventFilter(obj, ev);
}
- QKeyEvent *keyEvent = static_cast<QKeyEvent*>(ev);
- if(obj == ui->jarModsTreeView)
+ QKeyEvent *keyEvent = static_cast<QKeyEvent *>(ev);
+ if (obj == ui->jarModsTreeView)
return jarListFilter(keyEvent);
- if(obj == ui->coreModsTreeView)
+ if (obj == ui->coreModsTreeView)
return coreListFilter(keyEvent);
- if(obj == ui->loaderModTreeView)
+ if (obj == ui->loaderModTreeView)
return loaderListFilter(keyEvent);
- if(obj == ui->texPackTreeView)
+ if (obj == ui->texPackTreeView)
return texturePackListFilter(keyEvent);
- return QDialog::eventFilter( obj, ev );
+ return QDialog::eventFilter(obj, ev);
}
-
void LegacyModEditDialog::on_addCoreBtn_clicked()
{
//: Title of core mod selection dialog
QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Select Core Mods"));
- for(auto filename:fileNames)
+ for (auto filename : fileNames)
{
m_coremods->stopWatching();
m_coremods->installMod(QFileInfo(filename));
@@ -199,21 +195,22 @@ void LegacyModEditDialog::on_addCoreBtn_clicked()
}
void LegacyModEditDialog::on_addForgeBtn_clicked()
{
- VersionSelectDialog vselect(MMC->forgelist().data(), this);
+ VersionSelectDialog vselect(MMC->forgelist().get(), this);
vselect.setFilter(1, m_inst->intendedVersionId());
if (vselect.exec() && vselect.selectedVersion())
{
- ForgeVersionPtr forge = vselect.selectedVersion().dynamicCast<ForgeVersion>();
- if(!forge)
+ ForgeVersionPtr forge =
+ std::dynamic_pointer_cast<ForgeVersion> (vselect.selectedVersion());
+ if (!forge)
return;
auto entry = MMC->metacache()->resolveEntry("minecraftforge", forge->filename);
- if(entry->stale)
+ if (entry->stale)
{
- DownloadJob * fjob = new DownloadJob("Forge download");
+ DownloadJob *fjob = new DownloadJob("Forge download");
fjob->addCacheDownload(forge->universal_url, entry);
ProgressDialog dlg(this);
dlg.exec(fjob);
- if(dlg.result() == QDialog::Accepted)
+ if (dlg.result() == QDialog::Accepted)
{
m_jarmods->stopWatching();
m_jarmods->installMod(QFileInfo(entry->getFullPath()));
@@ -236,7 +233,7 @@ void LegacyModEditDialog::on_addJarBtn_clicked()
{
//: Title of jar mod selection dialog
QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Select Jar Mods"));
- for(auto filename:fileNames)
+ for (auto filename : fileNames)
{
m_jarmods->stopWatching();
m_jarmods->installMod(QFileInfo(filename));
@@ -247,7 +244,7 @@ void LegacyModEditDialog::on_addModBtn_clicked()
{
//: Title of regular mod selection dialog
QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Select Loader Mods"));
- for(auto filename:fileNames)
+ for (auto filename : fileNames)
{
m_mods->stopWatching();
m_mods->installMod(QFileInfo(filename));
@@ -258,7 +255,7 @@ void LegacyModEditDialog::on_addTexPackBtn_clicked()
{
//: Title of texture pack selection dialog
QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Select Texture Packs"));
- for(auto filename:fileNames)
+ for (auto filename : fileNames)
{
m_texturepacks->stopWatching();
m_texturepacks->installMod(QFileInfo(filename));
@@ -270,8 +267,8 @@ void LegacyModEditDialog::on_moveJarDownBtn_clicked()
{
int first, last;
auto list = ui->jarModsTreeView->selectionModel()->selectedRows();
-
- if(!lastfirst(list, first, last))
+
+ if (!lastfirst(list, first, last))
return;
m_jarmods->moveModsDown(first, last);
@@ -280,8 +277,8 @@ void LegacyModEditDialog::on_moveJarUpBtn_clicked()
{
int first, last;
auto list = ui->jarModsTreeView->selectionModel()->selectedRows();
-
- if(!lastfirst(list, first, last))
+
+ if (!lastfirst(list, first, last))
return;
m_jarmods->moveModsUp(first, last);
}
@@ -289,8 +286,8 @@ void LegacyModEditDialog::on_rmCoreBtn_clicked()
{
int first, last;
auto list = ui->coreModsTreeView->selectionModel()->selectedRows();
-
- if(!lastfirst(list, first, last))
+
+ if (!lastfirst(list, first, last))
return;
m_coremods->stopWatching();
m_coremods->deleteMods(first, last);
@@ -300,8 +297,8 @@ void LegacyModEditDialog::on_rmJarBtn_clicked()
{
int first, last;
auto list = ui->jarModsTreeView->selectionModel()->selectedRows();
-
- if(!lastfirst(list, first, last))
+
+ if (!lastfirst(list, first, last))
return;
m_jarmods->stopWatching();
m_jarmods->deleteMods(first, last);
@@ -311,8 +308,8 @@ void LegacyModEditDialog::on_rmModBtn_clicked()
{
int first, last;
auto list = ui->loaderModTreeView->selectionModel()->selectedRows();
-
- if(!lastfirst(list, first, last))
+
+ if (!lastfirst(list, first, last))
return;
m_mods->stopWatching();
m_mods->deleteMods(first, last);
@@ -322,8 +319,8 @@ void LegacyModEditDialog::on_rmTexPackBtn_clicked()
{
int first, last;
auto list = ui->texPackTreeView->selectionModel()->selectedRows();
-
- if(!lastfirst(list, first, last))
+
+ if (!lastfirst(list, first, last))
return;
m_texturepacks->stopWatching();
m_texturepacks->deleteMods(first, last);
@@ -342,7 +339,6 @@ void LegacyModEditDialog::on_viewTexPackBtn_clicked()
openDirInDefaultProgram(m_inst->texturePacksDir(), true);
}
-
void LegacyModEditDialog::on_buttonBox_rejected()
{
close();
diff --git a/gui/LegacyModEditDialog.h b/gui/LegacyModEditDialog.h
index b824a86a..5f6973d3 100644
--- a/gui/LegacyModEditDialog.h
+++ b/gui/LegacyModEditDialog.h
@@ -60,10 +60,10 @@ protected:
bool texturePackListFilter( QKeyEvent* ev );
private:
Ui::LegacyModEditDialog *ui;
- QSharedPointer<ModList> m_mods;
- QSharedPointer<ModList> m_coremods;
- QSharedPointer<ModList> m_jarmods;
- QSharedPointer<ModList> m_texturepacks;
+ std::shared_ptr<ModList> m_mods;
+ std::shared_ptr<ModList> m_coremods;
+ std::shared_ptr<ModList> m_jarmods;
+ std::shared_ptr<ModList> m_texturepacks;
LegacyInstance * m_inst;
DownloadJobPtr forgeJob;
};
diff --git a/gui/OneSixModEditDialog.cpp b/gui/OneSixModEditDialog.cpp
index f2e7c5d2..e8c7f9ed 100644
--- a/gui/OneSixModEditDialog.cpp
+++ b/gui/OneSixModEditDialog.cpp
@@ -42,7 +42,7 @@ OneSixModEditDialog::OneSixModEditDialog(OneSixInstance *inst, QWidget *parent)
{
main_model = new EnabledItemFilter(this);
main_model->setActive(true);
- main_model->setSourceModel(m_version.data());
+ main_model->setSourceModel(m_version.get());
ui->libraryTreeView->setModel(main_model);
ui->libraryTreeView->installEventFilter(this);
ui->mainClassEdit->setText(m_version->mainClass);
@@ -56,7 +56,7 @@ OneSixModEditDialog::OneSixModEditDialog(OneSixInstance *inst, QWidget *parent)
{
ensureFolderPathExists(m_inst->loaderModsDir());
m_mods = m_inst->loaderModList();
- ui->loaderModTreeView->setModel(m_mods.data());
+ ui->loaderModTreeView->setModel(m_mods.get());
ui->loaderModTreeView->installEventFilter(this);
m_mods->startWatching();
}
@@ -64,7 +64,7 @@ OneSixModEditDialog::OneSixModEditDialog(OneSixInstance *inst, QWidget *parent)
{
ensureFolderPathExists(m_inst->resourcePacksDir());
m_resourcepacks = m_inst->resourcePackList();
- ui->resPackTreeView->setModel(m_resourcepacks.data());
+ ui->resPackTreeView->setModel(m_resourcepacks.get());
ui->resPackTreeView->installEventFilter(this);
m_resourcepacks->startWatching();
}
@@ -97,7 +97,7 @@ void OneSixModEditDialog::on_customizeBtn_clicked()
if (m_inst->customizeVersion())
{
m_version = m_inst->getFullVersion();
- main_model->setSourceModel(m_version.data());
+ main_model->setSourceModel(m_version.get());
updateVersionControls();
}
}
@@ -113,7 +113,7 @@ void OneSixModEditDialog::on_revertBtn_clicked()
if (m_inst->revertCustomVersion())
{
m_version = m_inst->getFullVersion();
- main_model->setSourceModel(m_version.data());
+ main_model->setSourceModel(m_version.get());
updateVersionControls();
}
}
@@ -121,7 +121,7 @@ void OneSixModEditDialog::on_revertBtn_clicked()
void OneSixModEditDialog::on_forgeBtn_clicked()
{
- VersionSelectDialog vselect(MMC->forgelist().data(), this);
+ VersionSelectDialog vselect(MMC->forgelist().get(), this);
vselect.setFilter(1, m_inst->currentVersionId());
if (vselect.exec() && vselect.selectedVersion())
{
@@ -139,7 +139,7 @@ void OneSixModEditDialog::on_forgeBtn_clicked()
m_inst->customizeVersion();
{
m_version = m_inst->getFullVersion();
- main_model->setSourceModel(m_version.data());
+ main_model->setSourceModel(m_version.get());
updateVersionControls();
}
}
@@ -150,10 +150,11 @@ void OneSixModEditDialog::on_forgeBtn_clicked()
{
m_inst->customizeVersion();
m_version = m_inst->getFullVersion();
- main_model->setSourceModel(m_version.data());
+ main_model->setSourceModel(m_version.get());
updateVersionControls();
}
- ForgeVersionPtr forgeVersion = vselect.selectedVersion().dynamicCast<ForgeVersion>();
+ ForgeVersionPtr forgeVersion =
+ std::dynamic_pointer_cast<ForgeVersion>(vselect.selectedVersion());
if (!forgeVersion)
return;
auto entry = MMC->metacache()->resolveEntry("minecraftforge", forgeVersion->filename);
diff --git a/gui/OneSixModEditDialog.h b/gui/OneSixModEditDialog.h
index e70bd73f..5c65fea3 100644
--- a/gui/OneSixModEditDialog.h
+++ b/gui/OneSixModEditDialog.h
@@ -52,9 +52,9 @@ protected:
bool resourcePackListFilter( QKeyEvent* ev );
private:
Ui::OneSixModEditDialog *ui;
- QSharedPointer<OneSixVersion> m_version;
- QSharedPointer<ModList> m_mods;
- QSharedPointer<ModList> m_resourcepacks;
+ std::shared_ptr<OneSixVersion> m_version;
+ std::shared_ptr<ModList> m_mods;
+ std::shared_ptr<ModList> m_resourcepacks;
EnabledItemFilter * main_model;
OneSixInstance * m_inst;
};
diff --git a/gui/aboutdialog.ui b/gui/aboutdialog.ui
index ac4952f9..bd5cc568 100644
--- a/gui/aboutdialog.ui
+++ b/gui/aboutdialog.ui
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>450</width>
- <height>400</height>
+ <height>429</height>
</rect>
</property>
<property name="minimumSize">
@@ -101,7 +101,7 @@
<x>0</x>
<y>0</y>
<width>432</width>
- <height>159</height>
+ <height>179</height>
</rect>
</property>
<attribute name="label">
@@ -159,8 +159,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>98</width>
- <height>93</height>
+ <width>682</width>
+ <height>584</height>
</rect>
</property>
<attribute name="label">
@@ -176,10 +176,10 @@
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt;&quot;&gt;Andrew Okin &amp;lt;&lt;/span&gt;&lt;a href=&quot;mailto:forkk@forkk.net&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;&quot;&gt;forkk@forkk.net&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt;&quot;&gt;Petr Mrázek &amp;lt;&lt;/span&gt;&lt;a href=&quot;mailto:peterix@gmail.com&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;&quot;&gt;peterix@gmail.com&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt;&quot;&gt;Orochimarufan &amp;lt;&lt;/span&gt;&lt;a href=&quot;mailto:orochimarufan.x3@gmail.com&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;&quot;&gt;orochimarufan.x3@gmail.com&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Bitstream Vera Sans'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;Andrew Okin &amp;lt;&lt;/span&gt;&lt;a href=&quot;mailto:forkk@forkk.net&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; text-decoration: underline; color:#0000ff;&quot;&gt;forkk@forkk.net&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;Petr Mrázek &amp;lt;&lt;/span&gt;&lt;a href=&quot;mailto:peterix@gmail.com&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; text-decoration: underline; color:#0000ff;&quot;&gt;peterix@gmail.com&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;Orochimarufan &amp;lt;&lt;/span&gt;&lt;a href=&quot;mailto:orochimarufan.x3@gmail.com&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; text-decoration: underline; color:#0000ff;&quot;&gt;orochimarufan.x3@gmail.com&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
@@ -190,8 +190,8 @@ p, li { white-space: pre-wrap; }
<rect>
<x>0</x>
<y>0</y>
- <width>98</width>
- <height>93</height>
+ <width>682</width>
+ <height>584</height>
</rect>
</property>
<attribute name="label">
@@ -213,44 +213,45 @@ p, li { white-space: pre-wrap; }
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;Copyright 2012 MultiMC Contributors&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;Licensed under the Apache License, Version 2.0 (the &amp;quot;License&amp;quot;);&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;you may not use this file except in compliance with the License.&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;You may obtain a copy of the License at&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu';&quot;&gt;&lt;br /&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt; http://www.apache.org/licenses/LICENSE-2.0&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu';&quot;&gt;&lt;br /&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;Unless required by applicable law or agreed to in writing, software&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;distributed under the License is distributed on an &amp;quot;AS IS&amp;quot; BASIS,&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;See the License for the specific language governing permissions and&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;limitations under the License.&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu';&quot;&gt;&lt;br /&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;MultiMC uses bspatch, &lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;Copyright 2003-2005 Colin Percival&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;All rights reserved&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu';&quot;&gt;&lt;br /&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;Redistribution and use in source and binary forms, with or without&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;modification, are permitted providing that the following conditions&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;are met: &lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;1. Redistributions of source code must retain the above copyright&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt; notice, this list of conditions and the following disclaimer.&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;2. Redistributions in binary form must reproduce the above copyright&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt; notice, this list of conditions and the following disclaimer in the&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt; documentation and/or other materials provided with the distribution.&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu';&quot;&gt;&lt;br /&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;POSSIBILITY OF SUCH DAMAGE.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Bitstream Vera Sans'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;Copyright 2012 MultiMC Contributors&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;Licensed under the Apache License, Version 2.0 (the &amp;quot;License&amp;quot;);&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;you may not use this file except in compliance with the License.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;You may obtain a copy of the License at&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt; http://www.apache.org/licenses/LICENSE-2.0&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;Unless required by applicable law or agreed to in writing, software&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;distributed under the License is distributed on an &amp;quot;AS IS&amp;quot; BASIS,&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;See the License for the specific language governing permissions and&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;limitations under the License.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;MultiMC uses QSLog, &lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;Copyright (c) 2010, Razvan Petru&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;All rights reserved.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;Redistribution and use in source and binary forms, with or without modification,&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;are permitted provided that the following conditions are met:&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;* Redistributions of source code must retain the above copyright notice, this&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt; list of conditions and the following disclaimer.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;* Redistributions in binary form must reproduce the above copyright notice, this&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt; list of conditions and the following disclaimer in the documentation and/or other&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt; materials provided with the distribution.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;* The name of the contributors may not be used to endorse or promote products&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt; derived from this software without specific prior written permission.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &amp;quot;AS IS&amp;quot; AND&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;OF THE POSSIBILITY OF SUCH DAMAGE.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
diff --git a/gui/logindialog.cpp b/gui/logindialog.cpp
index 37e30c85..fdc94ac7 100644
--- a/gui/logindialog.cpp
+++ b/gui/logindialog.cpp
@@ -16,7 +16,7 @@
#include "logindialog.h"
#include "ui_logindialog.h"
#include "keyring.h"
-#include <QDebug>
+#include <logger/QsLog.h>
LoginDialog::LoginDialog(QWidget *parent, const QString& loginErrMsg) :
QDialog(parent),
@@ -109,7 +109,7 @@ void LoginDialog::passwordToggled ( bool state )
blockToggles = true;
if(!state)
{
- qDebug() << "password disabled";
+ QLOG_DEBUG() << "password disabled";
}
else
{
@@ -117,7 +117,7 @@ void LoginDialog::passwordToggled ( bool state )
{
ui->rememberUsernameCheckbox->setChecked(true);
}
- qDebug() << "password enabled";
+ QLOG_DEBUG() << "password enabled";
}
blockToggles = false;
}
@@ -134,11 +134,11 @@ void LoginDialog::usernameToggled ( bool state )
{
ui->rememberPasswordCheckbox->setChecked(false);
}
- qDebug() << "username disabled";
+ QLOG_DEBUG() << "username disabled";
}
else
{
- qDebug() << "username enabled";
+ QLOG_DEBUG() << "username enabled";
}
blockToggles = false;
}
diff --git a/gui/lwjglselectdialog.cpp b/gui/lwjglselectdialog.cpp
index e48bb975..4518e8cd 100644
--- a/gui/lwjglselectdialog.cpp
+++ b/gui/lwjglselectdialog.cpp
@@ -26,10 +26,10 @@ LWJGLSelectDialog::LWJGLSelectDialog(QWidget *parent) :
ui->setupUi(this);
ui->labelStatus->setVisible(false);
auto lwjgllist = MMC->lwjgllist();
- ui->lwjglListView->setModel(lwjgllist.data());
+ ui->lwjglListView->setModel(lwjgllist.get());
- connect(lwjgllist.data(), SIGNAL(loadingStateUpdated(bool)), SLOT(loadingStateUpdated(bool)));
- connect(lwjgllist.data(), SIGNAL(loadListFailed(QString)), SLOT(loadingFailed(QString)));
+ connect(lwjgllist.get(), SIGNAL(loadingStateUpdated(bool)), SLOT(loadingStateUpdated(bool)));
+ connect(lwjgllist.get(), SIGNAL(loadListFailed(QString)), SLOT(loadingFailed(QString)));
loadingStateUpdated(lwjgllist->isLoading());
}
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp
index d7b77c8b..ecf5f79d 100644
--- a/gui/mainwindow.cpp
+++ b/gui/mainwindow.cpp
@@ -68,20 +68,19 @@
#include "LabeledToolButton.h"
#include "EditNotesDialog.h"
-MainWindow::MainWindow ( QWidget *parent )
- :QMainWindow ( parent ), ui ( new Ui::MainWindow )
+MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)
{
- ui->setupUi ( this );
- setWindowTitle ( QString ( "MultiMC %1" ).arg ( MMC->version().toString() ) );
-
+ ui->setupUi(this);
+ setWindowTitle(QString("MultiMC %1").arg(MMC->version().toString()));
+
// Set the selected instance to null
m_selectedInstance = nullptr;
// Set active instance to null.
m_activeInst = nullptr;
-
+
// OSX magic.
setUnifiedTitleAndToolBarOnMac(true);
-
+
// The instance action toolbar customizations
{
ui->instanceToolBar->setEnabled(false);
@@ -92,44 +91,45 @@ MainWindow::MainWindow ( QWidget *parent )
connect(renameButton, SIGNAL(clicked(bool)), SLOT(on_actionRenameInstance_triggered()));
ui->instanceToolBar->insertWidget(ui->actionLaunchInstance, renameButton);
ui->instanceToolBar->insertSeparator(ui->actionLaunchInstance);
- renameButton->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred);
+ renameButton->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
}
-
+
// Create the instance list widget
{
- view = new KCategorizedView ( ui->centralWidget );
- drawer = new KCategoryDrawer ( view );
-
- view->setSelectionMode ( QAbstractItemView::SingleSelection );
- view->setCategoryDrawer ( drawer );
- view->setCollapsibleBlocks ( true );
- view->setViewMode ( QListView::IconMode );
- view->setFlow ( QListView::LeftToRight );
+ view = new KCategorizedView(ui->centralWidget);
+ drawer = new KCategoryDrawer(view);
+
+ view->setSelectionMode(QAbstractItemView::SingleSelection);
+ view->setCategoryDrawer(drawer);
+ view->setCollapsibleBlocks(true);
+ view->setViewMode(QListView::IconMode);
+ view->setFlow(QListView::LeftToRight);
view->setWordWrap(true);
- view->setMouseTracking ( true );
- view->viewport()->setAttribute ( Qt::WA_Hover );
+ view->setMouseTracking(true);
+ view->viewport()->setAttribute(Qt::WA_Hover);
auto delegate = new ListViewDelegate();
view->setItemDelegate(delegate);
view->setSpacing(10);
view->setUniformItemWidths(true);
-
+
// do not show ugly blue border on the mac
view->setAttribute(Qt::WA_MacShowFocusRect, false);
-
+
view->installEventFilter(this);
- proxymodel = new InstanceProxyModel ( this );
- proxymodel->setSortRole ( KCategorizedSortFilterProxyModel::CategorySortRole );
- proxymodel->setFilterRole ( KCategorizedSortFilterProxyModel::CategorySortRole );
- //proxymodel->setDynamicSortFilter ( true );
-
- // FIXME: instList should be global-ish, or at least not tied to the main window... maybe the application itself?
- proxymodel->setSourceModel ( MMC->instances().data() );
- proxymodel->sort ( 0 );
- view->setFrameShape ( QFrame::NoFrame );
- view->setModel ( proxymodel );
-
- ui->horizontalLayout->addWidget ( view );
+ proxymodel = new InstanceProxyModel(this);
+ proxymodel->setSortRole(KCategorizedSortFilterProxyModel::CategorySortRole);
+ proxymodel->setFilterRole(KCategorizedSortFilterProxyModel::CategorySortRole);
+ // proxymodel->setDynamicSortFilter ( true );
+
+ // FIXME: instList should be global-ish, or at least not tied to the main window...
+ // maybe the application itself?
+ proxymodel->setSourceModel(MMC->instances().get());
+ proxymodel->sort(0);
+ view->setFrameShape(QFrame::NoFrame);
+ view->setModel(proxymodel);
+
+ ui->horizontalLayout->addWidget(view);
}
// The cat background
{
@@ -139,18 +139,16 @@ MainWindow::MainWindow ( QWidget *parent )
setCatBackground(cat_enable);
}
// start instance when double-clicked
- connect(view, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(instanceActivated(const QModelIndex &)));
+ connect(view, SIGNAL(doubleClicked(const QModelIndex &)), this,
+ SLOT(instanceActivated(const QModelIndex &)));
// track the selection -- update the instance toolbar
- connect(
- view->selectionModel(),
- SIGNAL(currentChanged(const QModelIndex &,const QModelIndex &)),
- this,
- SLOT(instanceChanged(const QModelIndex &,const QModelIndex &))
- );
+ connect(view->selectionModel(),
+ SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)), this,
+ SLOT(instanceChanged(const QModelIndex &, const QModelIndex &)));
// model reset -> selection is invalid. All the instance pointers are wrong.
// FIXME: stop using POINTERS everywhere
- connect(MMC->instances().data() ,SIGNAL(dataIsInvalid()),SLOT(selectionBad()));
-
+ connect(MMC->instances().get(), SIGNAL(dataIsInvalid()), SLOT(selectionBad()));
+
// run the things that load and download other things... FIXME: this is NOT the place
// FIXME: invisible actions in the background = NOPE.
{
@@ -176,57 +174,55 @@ MainWindow::~MainWindow()
delete assets_downloader;
}
-bool MainWindow::eventFilter ( QObject* obj, QEvent* ev )
+bool MainWindow::eventFilter(QObject *obj, QEvent *ev)
{
- if(obj == view)
+ if (obj == view)
{
if (ev->type() == QEvent::KeyPress)
{
- QKeyEvent *keyEvent = static_cast<QKeyEvent*>(ev);
- switch(keyEvent->key())
+ QKeyEvent *keyEvent = static_cast<QKeyEvent *>(ev);
+ switch (keyEvent->key())
{
- case Qt::Key_Enter:
- case Qt::Key_Return:
- on_actionLaunchInstance_triggered();
- return true;
- case Qt::Key_Delete:
- on_actionDeleteInstance_triggered();
- return true;
- case Qt::Key_F5:
- on_actionRefresh_triggered();
- return true;
- case Qt::Key_F2:
- on_actionRenameInstance_triggered();
- return true;
- default:
- break;
+ case Qt::Key_Enter:
+ case Qt::Key_Return:
+ on_actionLaunchInstance_triggered();
+ return true;
+ case Qt::Key_Delete:
+ on_actionDeleteInstance_triggered();
+ return true;
+ case Qt::Key_F5:
+ on_actionRefresh_triggered();
+ return true;
+ case Qt::Key_F2:
+ on_actionRenameInstance_triggered();
+ return true;
+ default:
+ break;
}
}
}
- return QMainWindow::eventFilter ( obj, ev );
+ return QMainWindow::eventFilter(obj, ev);
}
-void MainWindow::onCatToggled ( bool state )
+void MainWindow::onCatToggled(bool state)
{
setCatBackground(state);
MMC->settings()->set("TheCat", state);
}
-void MainWindow::setCatBackground ( bool enabled )
+void MainWindow::setCatBackground(bool enabled)
{
- if(enabled)
+ if (enabled)
{
- view->setStyleSheet(
- "QListView"
- "{"
- "background-image: url(:/backgrounds/kitteh);"
- "background-attachment: fixed;"
- "background-clip: padding;"
- "background-position: top right;"
- "background-repeat: none;"
- "background-color:palette(base);"
- "}"
- );
+ view->setStyleSheet("QListView"
+ "{"
+ "background-image: url(:/backgrounds/kitteh);"
+ "background-attachment: fixed;"
+ "background-clip: padding;"
+ "background-position: top right;"
+ "background-repeat: none;"
+ "background-color:palette(base);"
+ "}");
}
else
{
@@ -234,37 +230,37 @@ void MainWindow::setCatBackground ( bool enabled )
}
}
-
-void MainWindow::instanceActivated ( QModelIndex index )
+void MainWindow::instanceActivated(QModelIndex index)
{
- if(!index.isValid())
+ if (!index.isValid())
return;
- BaseInstance * inst = (BaseInstance *) index.data(InstanceList::InstancePointerRole).value<void *>();
+ BaseInstance *inst =
+ (BaseInstance *)index.data(InstanceList::InstancePointerRole).value<void *>();
doLogin();
}
void MainWindow::on_actionAddInstance_triggered()
{
- if (!MMC->minecraftlist()->isLoaded() &&
- m_versionLoadTask && m_versionLoadTask->isRunning())
+ if (!MMC->minecraftlist()->isLoaded() && m_versionLoadTask &&
+ m_versionLoadTask->isRunning())
{
QEventLoop waitLoop;
waitLoop.connect(m_versionLoadTask, SIGNAL(failed(QString)), SLOT(quit()));
waitLoop.connect(m_versionLoadTask, SIGNAL(succeeded()), SLOT(quit()));
waitLoop.exec();
}
-
- NewInstanceDialog newInstDlg( this );
+
+ NewInstanceDialog newInstDlg(this);
if (!newInstDlg.exec())
return;
-
+
BaseInstance *newInstance = NULL;
-
+
QString instDirName = DirNameFromString(newInstDlg.instName());
QString instDir = PathCombine(MMC->settings()->get("InstanceDir").toString(), instDirName);
-
+
auto &loader = InstanceFactory::get();
-
+
auto error = loader.createInstance(newInstance, newInstDlg.selectedVersion(), instDir);
QString errorMsg = QString("Failed to create instance %1: ").arg(instDirName);
switch (error)
@@ -274,17 +270,17 @@ void MainWindow::on_actionAddInstance_triggered()
newInstance->setIconKey(newInstDlg.iconKey());
MMC->instances()->add(InstancePtr(newInstance));
return;
-
+
case InstanceFactory::InstExists:
errorMsg += "An instance with the given directory name already exists.";
QMessageBox::warning(this, "Error", errorMsg);
break;
-
+
case InstanceFactory::CantCreateDir:
errorMsg += "Failed to create the instance directory.";
QMessageBox::warning(this, "Error", errorMsg);
break;
-
+
default:
errorMsg += QString("Unknown instance loader error %1").arg(error);
QMessageBox::warning(this, "Error", errorMsg);
@@ -294,12 +290,12 @@ void MainWindow::on_actionAddInstance_triggered()
void MainWindow::on_actionChangeInstIcon_triggered()
{
- if(!m_selectedInstance)
+ if (!m_selectedInstance)
return;
-
+
IconPickerDialog dlg(this);
dlg.exec(m_selectedInstance->iconKey());
- if(dlg.result() == QDialog::Accepted)
+ if (dlg.result() == QDialog::Accepted)
{
m_selectedInstance->setIconKey(dlg.selectedIconKey);
auto ico = MMC->icons()->getIcon(dlg.selectedIconKey);
@@ -307,25 +303,23 @@ void MainWindow::on_actionChangeInstIcon_triggered()
}
}
-
void MainWindow::on_actionChangeInstGroup_triggered()
{
- if(!m_selectedInstance)
+ if (!m_selectedInstance)
return;
-
+
bool ok = false;
- QString name ( m_selectedInstance->group() );
- name = QInputDialog::getText ( this, tr ( "Group name" ), tr ( "Enter a new group name." ),
- QLineEdit::Normal, name, &ok );
- if(ok)
+ QString name(m_selectedInstance->group());
+ name = QInputDialog::getText(this, tr("Group name"), tr("Enter a new group name."),
+ QLineEdit::Normal, name, &ok);
+ if (ok)
m_selectedInstance->setGroupPost(name);
}
-
void MainWindow::on_actionViewInstanceFolder_triggered()
{
- QString str = MMC->settings()->get ( "InstanceDir" ).toString();
- openDirInDefaultProgram ( str );
+ QString str = MMC->settings()->get("InstanceDir").toString();
+ openDirInDefaultProgram(str);
}
void MainWindow::on_actionRefresh_triggered()
@@ -335,59 +329,58 @@ void MainWindow::on_actionRefresh_triggered()
void MainWindow::on_actionViewCentralModsFolder_triggered()
{
- openDirInDefaultProgram ( MMC->settings()->get ( "CentralModsDir" ).toString() , true);
+ openDirInDefaultProgram(MMC->settings()->get("CentralModsDir").toString(), true);
}
void MainWindow::on_actionConfig_Folder_triggered()
{
- if(m_selectedInstance)
+ if (m_selectedInstance)
{
QString str = m_selectedInstance->instanceConfigFolder();
- openDirInDefaultProgram ( QDir(str).absolutePath() );
+ openDirInDefaultProgram(QDir(str).absolutePath());
}
}
-
void MainWindow::on_actionCheckUpdate_triggered()
{
-
}
void MainWindow::on_actionSettings_triggered()
{
- SettingsDialog dialog ( this );
+ SettingsDialog dialog(this);
dialog.exec();
}
void MainWindow::on_actionReportBug_triggered()
{
- openWebPage ( QUrl ( "http://multimc.myjetbrains.com/youtrack/dashboard#newissue=yes" ) );
+ openWebPage(QUrl("http://multimc.myjetbrains.com/youtrack/dashboard#newissue=yes"));
}
void MainWindow::on_actionNews_triggered()
{
- openWebPage ( QUrl ( "http://forkk.net/tag/multimc.html" ) );
+ openWebPage(QUrl("http://forkk.net/tag/multimc.html"));
}
void MainWindow::on_actionAbout_triggered()
{
- AboutDialog dialog ( this );
+ AboutDialog dialog(this);
dialog.exec();
}
-void MainWindow::on_mainToolBar_visibilityChanged ( bool )
+void MainWindow::on_mainToolBar_visibilityChanged(bool)
{
// Don't allow hiding the main toolbar.
// This is the only way I could find to prevent it... :/
- ui->mainToolBar->setVisible ( true );
+ ui->mainToolBar->setVisible(true);
}
void MainWindow::on_actionDeleteInstance_triggered()
{
if (m_selectedInstance)
{
- int response = QMessageBox::question(this, "CAREFUL",
- QString("This is permanent! Are you sure?\nAbout to delete: ") + m_selectedInstance->name());
+ int response = QMessageBox::question(
+ this, "CAREFUL", QString("This is permanent! Are you sure?\nAbout to delete: ") +
+ m_selectedInstance->name());
if (response == QMessageBox::Yes)
{
m_selectedInstance->nuke();
@@ -397,31 +390,31 @@ void MainWindow::on_actionDeleteInstance_triggered()
void MainWindow::on_actionRenameInstance_triggered()
{
- if(m_selectedInstance)
+ if (m_selectedInstance)
{
bool ok = false;
- QString name ( m_selectedInstance->name() );
- name = QInputDialog::getText ( this, tr ( "Instance name" ), tr ( "Enter a new instance name." ),
- QLineEdit::Normal, name, &ok );
-
+ QString name(m_selectedInstance->name());
+ name =
+ QInputDialog::getText(this, tr("Instance name"), tr("Enter a new instance name."),
+ QLineEdit::Normal, name, &ok);
+
if (name.length() > 0)
{
- if(ok && name.length())
+ if (ok && name.length())
{
m_selectedInstance->setName(name);
renameButton->setText(name);
}
}
-
}
}
void MainWindow::on_actionViewSelectedInstFolder_triggered()
{
- if(m_selectedInstance)
+ if (m_selectedInstance)
{
QString str = m_selectedInstance->instanceRoot();
- openDirInDefaultProgram ( QDir(str).absolutePath() );
+ openDirInDefaultProgram(QDir(str).absolutePath());
}
}
@@ -430,59 +423,61 @@ void MainWindow::on_actionEditInstMods_triggered()
if (m_selectedInstance)
{
auto dialog = m_selectedInstance->createModEditDialog(this);
- if(dialog)
+ if (dialog)
dialog->exec();
dialog->deleteLater();
}
}
-void MainWindow::closeEvent ( QCloseEvent *event )
+void MainWindow::closeEvent(QCloseEvent *event)
{
// Save the window state and geometry.
// TODO: Make this work with the new settings system.
-// settings->getConfig().setValue("MainWindowGeometry", saveGeometry());
-// settings->getConfig().setValue("MainWindowState", saveState());
- QMainWindow::closeEvent ( event );
+ // settings->getConfig().setValue("MainWindowGeometry", saveGeometry());
+ // settings->getConfig().setValue("MainWindowState", saveState());
+ QMainWindow::closeEvent(event);
}
-void MainWindow::on_instanceView_customContextMenuRequested ( const QPoint &pos )
+void MainWindow::on_instanceView_customContextMenuRequested(const QPoint &pos)
{
- QMenu *instContextMenu = new QMenu ( "Instance", this );
+ QMenu *instContextMenu = new QMenu("Instance", this);
// Add the actions from the toolbar to the context menu.
- instContextMenu->addActions ( ui->instanceToolBar->actions() );
+ instContextMenu->addActions(ui->instanceToolBar->actions());
- instContextMenu->exec ( view->mapToGlobal ( pos ) );
+ instContextMenu->exec(view->mapToGlobal(pos));
}
void MainWindow::on_actionLaunchInstance_triggered()
{
- if(m_selectedInstance)
+ if (m_selectedInstance)
{
doLogin();
}
}
-void MainWindow::doLogin(const QString& errorMsg)
+void MainWindow::doLogin(const QString &errorMsg)
{
if (!m_selectedInstance)
return;
-
- LoginDialog* loginDlg = new LoginDialog(this, errorMsg);
+
+ LoginDialog *loginDlg = new LoginDialog(this, errorMsg);
if (!m_selectedInstance->lastLaunch())
loginDlg->forceOnline();
-
+
loginDlg->exec();
- if(loginDlg->result() == QDialog::Accepted)
+ if (loginDlg->result() == QDialog::Accepted)
{
- if (loginDlg->isOnline())
+ if (loginDlg->isOnline())
{
UserInfo uInfo{loginDlg->getUsername(), loginDlg->getPassword()};
- ProgressDialog* tDialog = new ProgressDialog(this);
- LoginTask* loginTask = new LoginTask(uInfo, tDialog);
- connect(loginTask, SIGNAL(succeeded()),SLOT(onLoginComplete()), Qt::QueuedConnection);
- connect(loginTask, SIGNAL(failed(QString)), SLOT(doLogin(QString)), Qt::QueuedConnection);
+ ProgressDialog *tDialog = new ProgressDialog(this);
+ LoginTask *loginTask = new LoginTask(uInfo, tDialog);
+ connect(loginTask, SIGNAL(succeeded()), SLOT(onLoginComplete()),
+ Qt::QueuedConnection);
+ connect(loginTask, SIGNAL(failed(QString)), SLOT(doLogin(QString)),
+ Qt::QueuedConnection);
m_activeInst = m_selectedInstance;
tDialog->exec(loginTask);
}
@@ -490,7 +485,7 @@ void MainWindow::doLogin(const QString& errorMsg)
{
QString user = loginDlg->getUsername();
if (user.length() == 0)
- user = QString("Offline");
+ user = QString("Offline");
m_activeLogin = {user, QString("Offline"), QString(), QString()};
m_activeInst = m_selectedInstance;
launchInstance(m_activeInst, m_activeLogin);
@@ -500,20 +495,20 @@ void MainWindow::doLogin(const QString& errorMsg)
void MainWindow::onLoginComplete()
{
- if(!m_activeInst)
+ if (!m_activeInst)
return;
- LoginTask * task = (LoginTask *) QObject::sender();
+ LoginTask *task = (LoginTask *)QObject::sender();
m_activeLogin = task->getResult();
-
+
BaseUpdate *updateTask = m_activeInst->doUpdate();
- if(!updateTask)
+ if (!updateTask)
{
launchInstance(m_activeInst, m_activeLogin);
}
else
{
ProgressDialog *tDialog = new ProgressDialog(this);
- connect(updateTask, SIGNAL(succeeded()),SLOT(onGameUpdateComplete()));
+ connect(updateTask, SIGNAL(succeeded()), SLOT(onGameUpdateComplete()));
connect(updateTask, SIGNAL(failed(QString)), SLOT(onGameUpdateError(QString)));
tDialog->exec(updateTask);
}
@@ -532,11 +527,11 @@ void MainWindow::onGameUpdateError(QString error)
void MainWindow::launchInstance(BaseInstance *instance, LoginResponse response)
{
Q_ASSERT_X(instance != NULL, "launchInstance", "instance is NULL");
-
+
proc = instance->prepareForLaunch(response);
- if(!proc)
+ if (!proc)
return;
-
+
// Prepare GUI: If it shall stay open disable the required parts
if (MMC->settings()->get("NoHide").toBool())
{
@@ -546,11 +541,11 @@ void MainWindow::launchInstance(BaseInstance *instance, LoginResponse response)
{
this->hide();
}
-
+
console = new ConsoleWindow(proc);
console->show();
- connect(proc, SIGNAL(log(QString, MessageLevel::Enum)),
- console, SLOT(write(QString, MessageLevel::Enum)));
+ connect(proc, SIGNAL(log(QString, MessageLevel::Enum)), console,
+ SLOT(write(QString, MessageLevel::Enum)));
connect(proc, SIGNAL(ended()), this, SLOT(instanceEnded()));
proc->setLogin(response.username, response.session_id);
proc->launch();
@@ -566,7 +561,7 @@ void MainWindow::taskEnd()
QObject *sender = QObject::sender();
if (sender == m_versionLoadTask)
m_versionLoadTask = NULL;
-
+
sender->deleteLater();
}
@@ -578,20 +573,24 @@ void MainWindow::startTask(Task *task)
task->start();
}
-
// Create A Desktop Shortcut
void MainWindow::on_actionMakeDesktopShortcut_triggered()
{
- QString name ( "Test" );
- name = QInputDialog::getText ( this, tr ( "MultiMC Shortcut" ), tr ( "Enter a Shortcut Name." ), QLineEdit::Normal, name );
+ QString name("Test");
+ name = QInputDialog::getText(this, tr("MultiMC Shortcut"), tr("Enter a Shortcut Name."),
+ QLineEdit::Normal, name);
- Util::createShortCut ( Util::getDesktopDir(), QApplication::instance()->applicationFilePath(), QStringList() << "-dl" << QDir::currentPath() << "test", name, "application-x-octet-stream" );
+ Util::createShortCut(Util::getDesktopDir(), QApplication::instance()->applicationFilePath(),
+ QStringList() << "-dl" << QDir::currentPath() << "test", name,
+ "application-x-octet-stream");
- QMessageBox::warning ( this, tr("Not useful"), tr("A Dummy Shortcut was created. it will not do anything productive") );
+ QMessageBox::warning(
+ this, tr("Not useful"),
+ tr("A Dummy Shortcut was created. it will not do anything productive"));
}
// BrowserDialog
-void MainWindow::openWebPage ( QUrl url )
+void MainWindow::openWebPage(QUrl url)
{
QDesktopServices::openUrl(url);
}
@@ -600,8 +599,8 @@ void MainWindow::on_actionChangeInstMCVersion_triggered()
{
if (view->selectionModel()->selectedIndexes().count() < 1)
return;
-
- VersionSelectDialog vselect(m_selectedInstance->versionList().data(), this);
+
+ VersionSelectDialog vselect(m_selectedInstance->versionList().get(), this);
if (vselect.exec() && vselect.selectedVersion())
{
m_selectedInstance->setIntendedVersionId(vselect.selectedVersion()->descriptor());
@@ -612,12 +611,12 @@ void MainWindow::on_actionChangeInstLWJGLVersion_triggered()
{
if (!m_selectedInstance)
return;
-
+
LWJGLSelectDialog lselect(this);
lselect.exec();
if (lselect.result() == QDialog::Accepted)
{
- LegacyInstance * linst = (LegacyInstance *) m_selectedInstance;
+ LegacyInstance *linst = (LegacyInstance *)m_selectedInstance;
linst->setLWJGLVersion(lselect.selectedVersion());
}
}
@@ -632,18 +631,23 @@ void MainWindow::on_actionInstanceSettings_triggered()
settings.exec();
}
-void MainWindow::instanceChanged( const QModelIndex& current, const QModelIndex& previous )
+void MainWindow::instanceChanged(const QModelIndex &current, const QModelIndex &previous)
{
- if(current.isValid() && nullptr != (m_selectedInstance = (BaseInstance *) current.data(InstanceList::InstancePointerRole).value<void *>()))
+ if (current.isValid() &&
+ nullptr != (m_selectedInstance =
+ (BaseInstance *)current.data(InstanceList::InstancePointerRole)
+ .value<void *>()))
{
ui->instanceToolBar->setEnabled(true);
QString iconKey = m_selectedInstance->iconKey();
renameButton->setText(m_selectedInstance->name());
- ui->actionChangeInstLWJGLVersion->setEnabled(m_selectedInstance->menuActionEnabled("actionChangeInstLWJGLVersion"));
- ui->actionEditInstMods->setEnabled(m_selectedInstance->menuActionEnabled("actionEditInstMods"));
+ ui->actionChangeInstLWJGLVersion->setEnabled(
+ m_selectedInstance->menuActionEnabled("actionChangeInstLWJGLVersion"));
+ ui->actionEditInstMods->setEnabled(
+ m_selectedInstance->menuActionEnabled("actionEditInstMods"));
statusBar()->clearMessage();
statusBar()->showMessage(m_selectedInstance->getStatusbarDescription());
- auto ico =MMC->icons()->getIcon(iconKey);
+ auto ico = MMC->icons()->getIcon(iconKey);
ui->actionChangeInstIcon->setIcon(ico);
}
else
@@ -663,19 +667,17 @@ void MainWindow::selectionBad()
ui->actionChangeInstIcon->setIcon(ico);
}
-
-
void MainWindow::on_actionEditInstNotes_triggered()
{
if (!m_selectedInstance)
return;
- LegacyInstance * linst = (LegacyInstance *) m_selectedInstance;
-
+ LegacyInstance *linst = (LegacyInstance *)m_selectedInstance;
+
EditNotesDialog noteedit(linst->notes(), linst->name(), this);
noteedit.exec();
if (noteedit.result() == QDialog::Accepted)
{
-
+
linst->setNotes(noteedit.getText());
}
}
diff --git a/gui/newinstancedialog.cpp b/gui/newinstancedialog.cpp
index 859077d9..c035302c 100644
--- a/gui/newinstancedialog.cpp
+++ b/gui/newinstancedialog.cpp
@@ -96,7 +96,7 @@ BaseVersionPtr NewInstanceDialog::selectedVersion() const
void NewInstanceDialog::on_btnChangeVersion_clicked()
{
- VersionSelectDialog vselect(MMC->minecraftlist().data(), this);
+ VersionSelectDialog vselect(MMC->minecraftlist().get(), this);
vselect.exec();
if (vselect.result() == QDialog::Accepted)
{
diff --git a/gui/settingsdialog.cpp b/gui/settingsdialog.cpp
index 9736c1c7..31fe2d96 100644
--- a/gui/settingsdialog.cpp
+++ b/gui/settingsdialog.cpp
@@ -27,7 +27,7 @@ SettingsDialog::SettingsDialog(QWidget *parent) :
{
ui->setupUi(this);
- loadSettings(MMC->settings().data());
+ loadSettings(MMC->settings().get());
updateCheckboxStuff();
}
@@ -85,7 +85,7 @@ void SettingsDialog::on_maximizedCheckBox_clicked(bool checked)
void SettingsDialog::on_buttonBox_accepted()
{
- applySettings(MMC->settings().data());
+ applySettings(MMC->settings().get());
}
void SettingsDialog::applySettings(SettingsObject *s)
diff --git a/gui/versionselectdialog.cpp b/gui/versionselectdialog.cpp
index 1e60c7d9..ff990188 100644
--- a/gui/versionselectdialog.cpp
+++ b/gui/versionselectdialog.cpp
@@ -91,6 +91,6 @@ void VersionSelectDialog::setFilter(int column, QString filter)
if (filteredTypes.length() > 0)
regexStr = QString("^((?!%1).)*$").arg(filteredTypes.join('|'));
- qDebug() << "Filter:" << regexStr;
+ QLOG_DEBUG() << "Filter:" << regexStr;
*/
}