CResourceMimeData: Make use of std::move
This commit is contained in:
parent
c7fff2816e
commit
d8c865e438
|
@ -12,22 +12,21 @@ class CResourceMimeData : public QMimeData
|
|||
QList<CVirtualDirectory*> mDirectories;
|
||||
|
||||
public:
|
||||
CResourceMimeData(const QList<CResourceEntry*>& rkEntries, const QList<CVirtualDirectory*>& rkDirectories)
|
||||
: QMimeData()
|
||||
, mEntries(rkEntries)
|
||||
, mDirectories(rkDirectories)
|
||||
{}
|
||||
|
||||
CResourceMimeData(CResourceEntry *pEntry)
|
||||
CResourceMimeData(QList<CResourceEntry*> entries, QList<CVirtualDirectory*> directories)
|
||||
: QMimeData()
|
||||
, mEntries(std::move(entries))
|
||||
, mDirectories(std::move(directories))
|
||||
{
|
||||
mEntries << pEntry;
|
||||
}
|
||||
|
||||
CResourceMimeData(CVirtualDirectory *pDir)
|
||||
: QMimeData()
|
||||
explicit CResourceMimeData(CResourceEntry *pEntry)
|
||||
: QMimeData(), mEntries{pEntry}
|
||||
{
|
||||
}
|
||||
|
||||
explicit CResourceMimeData(CVirtualDirectory *pDir)
|
||||
: QMimeData(), mDirectories{pDir}
|
||||
{
|
||||
mDirectories << pDir;
|
||||
}
|
||||
|
||||
const QList<CResourceEntry*>& Resources() const { return mEntries; }
|
||||
|
|
|
@ -143,7 +143,7 @@ QMimeData* CResourceTableModel::mimeData(const QModelIndexList& rkIndexes) const
|
|||
Dirs.push_back(pDir);
|
||||
}
|
||||
|
||||
return new CResourceMimeData(Resources, Dirs);
|
||||
return new CResourceMimeData(std::move(Resources), std::move(Dirs));
|
||||
}
|
||||
|
||||
Qt::DropActions CResourceTableModel::supportedDragActions() const
|
||||
|
|
Loading…
Reference in New Issue