Fix NagUtils and hack GroupView to work
This commit is contained in:
parent
aa70ed2244
commit
382ae78a0b
@ -408,8 +408,8 @@ SET(MULTIMC_SOURCES
|
|||||||
logic/minecraft/VersionFilterData.cpp
|
logic/minecraft/VersionFilterData.cpp
|
||||||
|
|
||||||
# Annoying nag screen logic
|
# Annoying nag screen logic
|
||||||
logic/NagUtils.h
|
gui/NagUtils.h
|
||||||
logic/NagUtils.cpp
|
gui/NagUtils.cpp
|
||||||
|
|
||||||
# Player skin utilities
|
# Player skin utilities
|
||||||
logic/SkinUtils.h
|
logic/SkinUtils.h
|
||||||
|
@ -382,7 +382,7 @@ namespace Ui {
|
|||||||
#include "logic/BaseProcess.h"
|
#include "logic/BaseProcess.h"
|
||||||
#include "logic/OneSixUpdate.h"
|
#include "logic/OneSixUpdate.h"
|
||||||
#include "logic/java/JavaUtils.h"
|
#include "logic/java/JavaUtils.h"
|
||||||
#include "logic/NagUtils.h"
|
#include "gui/NagUtils.h"
|
||||||
#include "logic/SkinUtils.h"
|
#include "logic/SkinUtils.h"
|
||||||
|
|
||||||
#include "logic/LegacyInstance.h"
|
#include "logic/LegacyInstance.h"
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "logic/NagUtils.h"
|
#include "gui/NagUtils.h"
|
||||||
#include "gui/dialogs/CustomMessageBox.h"
|
#include "gui/dialogs/CustomMessageBox.h"
|
||||||
|
|
||||||
namespace NagUtils
|
namespace NagUtils
|
@ -6,7 +6,7 @@
|
|||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
#include "gui/dialogs/VersionSelectDialog.h"
|
#include "gui/dialogs/VersionSelectDialog.h"
|
||||||
#include "logic/NagUtils.h"
|
#include "gui/NagUtils.h"
|
||||||
#include "logic/java/JavaVersionList.h"
|
#include "logic/java/JavaVersionList.h"
|
||||||
#include "MultiMC.h"
|
#include "MultiMC.h"
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ void InstanceSettingsPage::loadSettings()
|
|||||||
bool overrideJava = m_settings->get("OverrideJava").toBool();
|
bool overrideJava = m_settings->get("OverrideJava").toBool();
|
||||||
bool overrideLocation = m_settings->get("OverrideJavaLocation").toBool() || overrideJava;
|
bool overrideLocation = m_settings->get("OverrideJavaLocation").toBool() || overrideJava;
|
||||||
bool overrideArgs = m_settings->get("OverrideJavaArgs").toBool() || overrideJava;
|
bool overrideArgs = m_settings->get("OverrideJavaArgs").toBool() || overrideJava;
|
||||||
|
|
||||||
ui->javaSettingsGroupBox->setChecked(overrideLocation);
|
ui->javaSettingsGroupBox->setChecked(overrideLocation);
|
||||||
ui->javaPathTextBox->setText(m_settings->get("JavaPath").toString());
|
ui->javaPathTextBox->setText(m_settings->get("JavaPath").toString());
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include <pathutils.h>
|
#include <pathutils.h>
|
||||||
|
|
||||||
#include "logic/NagUtils.h"
|
#include "gui/NagUtils.h"
|
||||||
|
|
||||||
#include "gui/Platform.h"
|
#include "gui/Platform.h"
|
||||||
#include "gui/dialogs/VersionSelectDialog.h"
|
#include "gui/dialogs/VersionSelectDialog.h"
|
||||||
@ -39,11 +39,11 @@ JavaPage::JavaPage(QWidget *parent) : QWidget(parent), ui(new Ui::JavaPage)
|
|||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->tabWidget->tabBar()->hide();
|
ui->tabWidget->tabBar()->hide();
|
||||||
|
|
||||||
auto resizer = new ColumnResizer(this);
|
auto resizer = new ColumnResizer(this);
|
||||||
resizer->addWidgetsFromLayout(ui->javaSettingsGroupBox->layout(), 0);
|
resizer->addWidgetsFromLayout(ui->javaSettingsGroupBox->layout(), 0);
|
||||||
resizer->addWidgetsFromLayout(ui->customCommandsGroupBox->layout(), 0);
|
resizer->addWidgetsFromLayout(ui->customCommandsGroupBox->layout(), 0);
|
||||||
|
|
||||||
loadSettings();
|
loadSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include "gui/dialogs/VersionSelectDialog.h"
|
#include "gui/dialogs/VersionSelectDialog.h"
|
||||||
#include "gui/dialogs/CustomMessageBox.h"
|
#include "gui/dialogs/CustomMessageBox.h"
|
||||||
|
|
||||||
#include "logic/NagUtils.h"
|
#include "gui/NagUtils.h"
|
||||||
|
|
||||||
#include "logic/java/JavaUtils.h"
|
#include "logic/java/JavaUtils.h"
|
||||||
#include "logic/java/JavaVersionList.h"
|
#include "logic/java/JavaVersionList.h"
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include "gui/dialogs/CustomMessageBox.h"
|
#include "gui/dialogs/CustomMessageBox.h"
|
||||||
#include <gui/ColumnResizer.h>
|
#include <gui/ColumnResizer.h>
|
||||||
|
|
||||||
#include "logic/NagUtils.h"
|
#include "gui/NagUtils.h"
|
||||||
|
|
||||||
#include "logic/java/JavaUtils.h"
|
#include "logic/java/JavaUtils.h"
|
||||||
#include "logic/java/JavaVersionList.h"
|
#include "logic/java/JavaVersionList.h"
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
#include "OneSixInstance.h"
|
#include "OneSixInstance.h"
|
||||||
#include "LegacyInstance.h"
|
#include "LegacyInstance.h"
|
||||||
#include "logger/QsLog.h"
|
#include "logger/QsLog.h"
|
||||||
#include "gui/groupview/GroupView.h"
|
|
||||||
|
|
||||||
const static int GROUP_FILE_FORMAT_VERSION = 1;
|
const static int GROUP_FILE_FORMAT_VERSION = 1;
|
||||||
|
|
||||||
@ -99,8 +98,8 @@ QVariant InstanceList::data(const QModelIndex &index, int role) const
|
|||||||
QString key = pdata->iconKey();
|
QString key = pdata->iconKey();
|
||||||
return ENV.icons()->getIcon(key);
|
return ENV.icons()->getIcon(key);
|
||||||
}
|
}
|
||||||
// for now.
|
// HACK: see GroupView.h in gui!
|
||||||
case GroupViewRoles::GroupRole:
|
case GroupRole:
|
||||||
{
|
{
|
||||||
return pdata->group();
|
return pdata->group();
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QAbstractListModel>
|
#include <QAbstractListModel>
|
||||||
#include <QSet>
|
#include <QSet>
|
||||||
#include <gui/groupview/GroupedProxyModel.h>
|
|
||||||
|
|
||||||
#include "logic/BaseInstance.h"
|
#include "logic/BaseInstance.h"
|
||||||
|
|
||||||
@ -47,6 +46,7 @@ public:
|
|||||||
|
|
||||||
enum AdditionalRoles
|
enum AdditionalRoles
|
||||||
{
|
{
|
||||||
|
GroupRole = Qt::UserRole,
|
||||||
InstancePointerRole = 0x34B1CB48, ///< Return pointer to real instance
|
InstancePointerRole = 0x34B1CB48, ///< Return pointer to real instance
|
||||||
InstanceIDRole = 0x34B1CB49 ///< Return id if the instance
|
InstanceIDRole = 0x34B1CB49 ///< Return id if the instance
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user