mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 13:15:35 +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:
|
||||
void recordFilterChanged(std::shared_ptr<CSMFilter::Node> filter);
|
||||
void recordDropped(std::vector<CSMWorld::UniversalId>& types, std::pair<QVariant, std::string> columnSearchData,
|
||||
Qt::DropAction action);
|
||||
void recordDropped(std::vector<CSMWorld::UniversalId>& types,
|
||||
const std::pair<QVariant, std::string>& columnSearchData, Qt::DropAction action);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef FILTERDATA_HPP
|
||||
#define FILTERDATA_HPP
|
||||
#ifndef CSV_FILTER_FILTERDATA_H
|
||||
#define CSV_FILTER_FILTERDATA_H
|
||||
|
||||
#include <string>
|
||||
#include <variant>
|
||||
|
@ -9,13 +9,11 @@
|
|||
|
||||
namespace CSVFilter
|
||||
{
|
||||
|
||||
struct FilterData
|
||||
{
|
||||
std::variant<std::string, QVariant> searchData;
|
||||
std::vector<std::string> columns;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // FILTERDATA_HPP
|
||||
#endif
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#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();
|
||||
if (records.empty())
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace CSVWorld
|
|||
void setEditLock(bool locked);
|
||||
|
||||
protected:
|
||||
void startDragFromTable(const DragRecordTable& table, QModelIndex index);
|
||||
void startDragFromTable(const DragRecordTable& table, const QModelIndex& index);
|
||||
|
||||
void dragEnterEvent(QDragEnterEvent* event) override;
|
||||
|
||||
|
|
|
@ -153,8 +153,8 @@ void CSVWorld::TableSubView::cloneRequest(const CSMWorld::UniversalId& toClone)
|
|||
emit cloneRequest(toClone.getId(), toClone.getType());
|
||||
}
|
||||
|
||||
void CSVWorld::TableSubView::createFilterRequest(
|
||||
std::vector<CSMWorld::UniversalId>& types, std::pair<QVariant, std::string> columnSearchData, Qt::DropAction action)
|
||||
void CSVWorld::TableSubView::createFilterRequest(std::vector<CSMWorld::UniversalId>& types,
|
||||
const std::pair<QVariant, std::string>& columnSearchData, Qt::DropAction action)
|
||||
{
|
||||
std::vector<CSVFilter::FilterData> sourceFilter;
|
||||
std::vector<std::string> refIdColumns = mTable->getColumnsWithDisplay(
|
||||
|
|
|
@ -63,7 +63,7 @@ namespace CSVWorld
|
|||
void editRequest(const CSMWorld::UniversalId& id, const std::string& hint);
|
||||
void cloneRequest(const CSMWorld::UniversalId& toClone);
|
||||
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();
|
||||
|
||||
public slots:
|
||||
|
|
Loading…
Reference in a new issue