NOISSUE Some happy little refactors
This commit is contained in:
@ -16,7 +16,7 @@
|
||||
#include "InstanceProxyModel.h"
|
||||
|
||||
#include "InstanceView.h"
|
||||
#include "Launcher.h"
|
||||
#include "Application.h"
|
||||
#include <BaseInstance.h>
|
||||
#include <icons/IconList.h>
|
||||
|
||||
@ -34,7 +34,7 @@ QVariant InstanceProxyModel::data(const QModelIndex & index, int role) const
|
||||
QVariant data = QSortFilterProxyModel::data(index, role);
|
||||
if(role == Qt::DecorationRole)
|
||||
{
|
||||
return QVariant(LAUNCHER->icons()->getIcon(data.toString()));
|
||||
return QVariant(APPLICATION->icons()->getIcon(data.toString()));
|
||||
}
|
||||
return data;
|
||||
}
|
||||
@ -59,7 +59,7 @@ bool InstanceProxyModel::subSortLessThan(const QModelIndex &left, const QModelIn
|
||||
{
|
||||
BaseInstance *pdataLeft = static_cast<BaseInstance *>(left.internalPointer());
|
||||
BaseInstance *pdataRight = static_cast<BaseInstance *>(right.internalPointer());
|
||||
QString sortMode = LAUNCHER->settings()->get("InstSortMode").toString();
|
||||
QString sortMode = APPLICATION->settings()->get("InstSortMode").toString();
|
||||
if (sortMode == "LastLaunch")
|
||||
{
|
||||
return pdataLeft->lastLaunch() > pdataRight->lastLaunch();
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "VisualGroup.h"
|
||||
#include <QDebug>
|
||||
|
||||
#include <Launcher.h>
|
||||
#include <Application.h>
|
||||
#include <InstanceList.h>
|
||||
|
||||
|
||||
@ -628,7 +628,7 @@ void InstanceView::dropEvent(QDropEvent *event)
|
||||
return;
|
||||
}
|
||||
auto instanceId = QString::fromUtf8(mimedata->data("application/x-instanceid"));
|
||||
auto instanceList = LAUNCHER->instances().get();
|
||||
auto instanceList = APPLICATION->instances().get();
|
||||
instanceList->setInstanceGroup(instanceId, group->text);
|
||||
event->setDropAction(Qt::MoveAction);
|
||||
event->accept();
|
||||
|
Reference in New Issue
Block a user