mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 15:15:34 +00:00
cleanup and style (const ref instead of value, consistent ifndef naming)
This commit is contained in:
parent
6b0998ff85
commit
5bbe9bc5d8
6 changed files with 10 additions and 12 deletions
|
@ -53,8 +53,8 @@ namespace CSVFilter
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void recordFilterChanged(std::shared_ptr<CSMFilter::Node> filter);
|
void recordFilterChanged(std::shared_ptr<CSMFilter::Node> filter);
|
||||||
void recordDropped(std::vector<CSMWorld::UniversalId>& types, std::pair<QVariant, std::string> columnSearchData,
|
void recordDropped(std::vector<CSMWorld::UniversalId>& types,
|
||||||
Qt::DropAction action);
|
const std::pair<QVariant, std::string>& columnSearchData, Qt::DropAction action);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef FILTERDATA_HPP
|
#ifndef CSV_FILTER_FILTERDATA_H
|
||||||
#define FILTERDATA_HPP
|
#define CSV_FILTER_FILTERDATA_H
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <variant>
|
#include <variant>
|
||||||
|
@ -9,13 +9,11 @@
|
||||||
|
|
||||||
namespace CSVFilter
|
namespace CSVFilter
|
||||||
{
|
{
|
||||||
|
|
||||||
struct FilterData
|
struct FilterData
|
||||||
{
|
{
|
||||||
std::variant<std::string, QVariant> searchData;
|
std::variant<std::string, QVariant> searchData;
|
||||||
std::vector<std::string> columns;
|
std::vector<std::string> columns;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // FILTERDATA_HPP
|
#endif
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "dragdroputils.hpp"
|
#include "dragdroputils.hpp"
|
||||||
|
|
||||||
void CSVWorld::DragRecordTable::startDragFromTable(const CSVWorld::DragRecordTable& table, QModelIndex index)
|
void CSVWorld::DragRecordTable::startDragFromTable(const CSVWorld::DragRecordTable& table, const QModelIndex& index)
|
||||||
{
|
{
|
||||||
std::vector<CSMWorld::UniversalId> records = table.getDraggedRecords();
|
std::vector<CSMWorld::UniversalId> records = table.getDraggedRecords();
|
||||||
if (records.empty())
|
if (records.empty())
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace CSVWorld
|
||||||
void setEditLock(bool locked);
|
void setEditLock(bool locked);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void startDragFromTable(const DragRecordTable& table, QModelIndex index);
|
void startDragFromTable(const DragRecordTable& table, const QModelIndex& index);
|
||||||
|
|
||||||
void dragEnterEvent(QDragEnterEvent* event) override;
|
void dragEnterEvent(QDragEnterEvent* event) override;
|
||||||
|
|
||||||
|
|
|
@ -153,8 +153,8 @@ void CSVWorld::TableSubView::cloneRequest(const CSMWorld::UniversalId& toClone)
|
||||||
emit cloneRequest(toClone.getId(), toClone.getType());
|
emit cloneRequest(toClone.getId(), toClone.getType());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSVWorld::TableSubView::createFilterRequest(
|
void CSVWorld::TableSubView::createFilterRequest(std::vector<CSMWorld::UniversalId>& types,
|
||||||
std::vector<CSMWorld::UniversalId>& types, std::pair<QVariant, std::string> columnSearchData, Qt::DropAction action)
|
const std::pair<QVariant, std::string>& columnSearchData, Qt::DropAction action)
|
||||||
{
|
{
|
||||||
std::vector<CSVFilter::FilterData> sourceFilter;
|
std::vector<CSVFilter::FilterData> sourceFilter;
|
||||||
std::vector<std::string> refIdColumns = mTable->getColumnsWithDisplay(
|
std::vector<std::string> refIdColumns = mTable->getColumnsWithDisplay(
|
||||||
|
|
|
@ -63,7 +63,7 @@ namespace CSVWorld
|
||||||
void editRequest(const CSMWorld::UniversalId& id, const std::string& hint);
|
void editRequest(const CSMWorld::UniversalId& id, const std::string& hint);
|
||||||
void cloneRequest(const CSMWorld::UniversalId& toClone);
|
void cloneRequest(const CSMWorld::UniversalId& toClone);
|
||||||
void createFilterRequest(std::vector<CSMWorld::UniversalId>& types,
|
void createFilterRequest(std::vector<CSMWorld::UniversalId>& types,
|
||||||
std::pair<QVariant, std::string> columnSearchData, Qt::DropAction action);
|
const std::pair<QVariant, std::string>& columnSearchData, Qt::DropAction action);
|
||||||
void toggleOptions();
|
void toggleOptions();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
Loading…
Reference in a new issue