mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 13:17:41 +02:00
replace qvector with qlist
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@ -89,7 +89,7 @@ void InstanceView::setModel(QAbstractItemModel* model)
|
||||
|
||||
void InstanceView::dataChanged([[maybe_unused]] const QModelIndex& topLeft,
|
||||
[[maybe_unused]] const QModelIndex& bottomRight,
|
||||
[[maybe_unused]] const QVector<int>& roles)
|
||||
[[maybe_unused]] const QList<int>& roles)
|
||||
{
|
||||
scheduleDelayedItemsLayout();
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ class InstanceView : public QAbstractItemView {
|
||||
virtual void updateGeometries() override;
|
||||
|
||||
protected slots:
|
||||
virtual void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector<int>& roles) override;
|
||||
virtual void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QList<int>& roles) override;
|
||||
virtual void rowsInserted(const QModelIndex& parent, int start, int end) override;
|
||||
virtual void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) override;
|
||||
void modelReset();
|
||||
|
@ -55,7 +55,7 @@ void VisualGroup::update()
|
||||
auto itemsPerRow = view->itemsPerRow();
|
||||
|
||||
int numRows = qMax(1, qCeil((qreal)temp_items.size() / (qreal)itemsPerRow));
|
||||
rows = QVector<VisualRow>(numRows);
|
||||
rows = QList<VisualRow>(numRows);
|
||||
|
||||
int maxRowHeight = 0;
|
||||
int positionInRow = 0;
|
||||
|
@ -35,10 +35,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QList>
|
||||
#include <QRect>
|
||||
#include <QString>
|
||||
#include <QStyleOption>
|
||||
#include <QVector>
|
||||
|
||||
class InstanceView;
|
||||
class QPainter;
|
||||
@ -61,7 +61,7 @@ struct VisualGroup {
|
||||
InstanceView* view = nullptr;
|
||||
QString text;
|
||||
bool collapsed = false;
|
||||
QVector<VisualRow> rows;
|
||||
QList<VisualRow> rows;
|
||||
int firstItemIndex = 0;
|
||||
int m_verticalPosition = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user