QVector and QStringList are now just aliases to QList.
This commit is contained in:
parent
171b3be090
commit
734e5d0d11
|
@ -30,10 +30,13 @@
|
||||||
|
|
||||||
class QMimeType;
|
class QMimeType;
|
||||||
class QString;
|
class QString;
|
||||||
class QStringList;
|
|
||||||
class QMimeType;
|
class QMimeType;
|
||||||
class QByteArray;
|
class QByteArray;
|
||||||
|
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
class QStringList;
|
||||||
|
#endif
|
||||||
|
|
||||||
auto IsMimeTypeImage(const QMimeType &mime) -> bool;
|
auto IsMimeTypeImage(const QMimeType &mime) -> bool;
|
||||||
auto SplitString(QString str) -> QStringList;
|
auto SplitString(QString str) -> QStringList;
|
||||||
auto MimeTypeFromByteArray(const QByteArray &data) -> QMimeType;
|
auto MimeTypeFromByteArray(const QByteArray &data) -> QMimeType;
|
||||||
|
|
|
@ -50,7 +50,9 @@
|
||||||
|
|
||||||
class QDomElement;
|
class QDomElement;
|
||||||
class QDomNode;
|
class QDomNode;
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
template <typename T> class QVector;
|
template <typename T> class QVector;
|
||||||
|
#endif
|
||||||
template <typename T> class QFutureWatcher;
|
template <typename T> class QFutureWatcher;
|
||||||
|
|
||||||
Q_DECLARE_LOGGING_CATEGORY(vXML)
|
Q_DECLARE_LOGGING_CATEGORY(vXML)
|
||||||
|
|
|
@ -7,7 +7,11 @@
|
||||||
#include "../vmisc/defglobal.h"
|
#include "../vmisc/defglobal.h"
|
||||||
|
|
||||||
class QTextCodec;
|
class QTextCodec;
|
||||||
|
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
class QStringList;
|
class QStringList;
|
||||||
|
#endif
|
||||||
|
|
||||||
template <class Key, class T> class QMap;
|
template <class Key, class T> class QMap;
|
||||||
|
|
||||||
class DRW_TextCodec
|
class DRW_TextCodec
|
||||||
|
|
|
@ -442,10 +442,12 @@ void VLayoutPaper::SetDetails(const QVector<VLayoutPiece> &details)
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
void VLayoutPaper::SetDetails(const QList<VLayoutPiece> &details)
|
void VLayoutPaper::SetDetails(const QList<VLayoutPiece> &details)
|
||||||
{
|
{
|
||||||
d->details = ConvertToVector(details);
|
d->details = ConvertToVector(details);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
QRectF VLayoutPaper::DetailsBoundingRect() const
|
QRectF VLayoutPaper::DetailsBoundingRect() const
|
||||||
|
|
|
@ -46,7 +46,10 @@ class QRectF;
|
||||||
class QGraphicsItem;
|
class QGraphicsItem;
|
||||||
class QMutex;
|
class QMutex;
|
||||||
template <typename T> class QList;
|
template <typename T> class QList;
|
||||||
|
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
template <typename T> class QVector;
|
template <typename T> class QVector;
|
||||||
|
#endif
|
||||||
|
|
||||||
class VLayoutPaper
|
class VLayoutPaper
|
||||||
{
|
{
|
||||||
|
@ -100,7 +103,9 @@ public:
|
||||||
|
|
||||||
QVector<VLayoutPiece> GetDetails() const;
|
QVector<VLayoutPiece> GetDetails() const;
|
||||||
void SetDetails(const QVector<VLayoutPiece>& details);
|
void SetDetails(const QVector<VLayoutPiece>& details);
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
void SetDetails(const QList<VLayoutPiece>& details);
|
void SetDetails(const QList<VLayoutPiece>& details);
|
||||||
|
#endif
|
||||||
|
|
||||||
QRectF DetailsBoundingRect() const;
|
QRectF DetailsBoundingRect() const;
|
||||||
|
|
||||||
|
|
|
@ -1797,8 +1797,8 @@ auto VLayoutPiece::EdgeByPoint(const QVector<QPointF> &path, const QPointF &p1)
|
||||||
}
|
}
|
||||||
|
|
||||||
const QVector<QPointF> points = Map(path);
|
const QVector<QPointF> points = Map(path);
|
||||||
const auto *const posIter = std::find_if(points.cbegin(), points.cend(),
|
auto posIter = std::find_if(points.cbegin(), points.cend(),
|
||||||
[&p1](const QPointF &point){ return VFuzzyComparePoints(point, p1); });
|
[&p1](const QPointF &point){ return VFuzzyComparePoints(point, p1); });
|
||||||
if (posIter != points.cend())
|
if (posIter != points.cend())
|
||||||
{
|
{
|
||||||
return static_cast<int>(posIter - points.cbegin() + 1);
|
return static_cast<int>(posIter - points.cbegin() + 1);
|
||||||
|
|
|
@ -38,9 +38,13 @@
|
||||||
|
|
||||||
class QGraphicsItem;
|
class QGraphicsItem;
|
||||||
class QPrinter;
|
class QPrinter;
|
||||||
template <class T> class QVector;
|
|
||||||
struct VWatermarkData;
|
struct VWatermarkData;
|
||||||
|
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
template <class T> class QVector;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
struct PosterData
|
struct PosterData
|
||||||
{
|
{
|
||||||
PosterData()
|
PosterData()
|
||||||
|
|
|
@ -29,7 +29,9 @@
|
||||||
#define LITERALS_H
|
#define LITERALS_H
|
||||||
|
|
||||||
class QString;
|
class QString;
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
class QStringList;
|
class QStringList;
|
||||||
|
#endif
|
||||||
|
|
||||||
// From documantation: If you use QStringLiteral you should avoid declaring the same literal in multiple places: This
|
// From documantation: If you use QStringLiteral you should avoid declaring the same literal in multiple places: This
|
||||||
// furthermore blows up the binary sizes.
|
// furthermore blows up the binary sizes.
|
||||||
|
|
|
@ -37,7 +37,9 @@
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
|
|
||||||
class QPointF;
|
class QPointF;
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
template <class T> class QVector;
|
template <class T> class QVector;
|
||||||
|
#endif
|
||||||
class VSAPoint;
|
class VSAPoint;
|
||||||
class VRawSAPoint;
|
class VRawSAPoint;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,9 @@
|
||||||
#include "../vlayout/vrawsapoint.h"
|
#include "../vlayout/vrawsapoint.h"
|
||||||
#include "../ifc/exception/vexception.h"
|
#include "../ifc/exception/vexception.h"
|
||||||
|
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
template <class T> class QVector;
|
template <class T> class QVector;
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <ciso646>
|
#include <ciso646>
|
||||||
|
|
||||||
|
|
|
@ -430,8 +430,8 @@ void DialogMove::SelectedObject(bool selected, quint32 object, quint32 tool)
|
||||||
Q_UNUSED(tool)
|
Q_UNUSED(tool)
|
||||||
if (stage1)
|
if (stage1)
|
||||||
{
|
{
|
||||||
auto *obj = std::find_if(sourceObjects.begin(), sourceObjects.end(),
|
auto obj = std::find_if(sourceObjects.begin(), sourceObjects.end(),
|
||||||
[object](const SourceItem &sItem) { return sItem.id == object; });
|
[object](const SourceItem &sItem) { return sItem.id == object; });
|
||||||
if (selected)
|
if (selected)
|
||||||
{
|
{
|
||||||
if (obj == sourceObjects.cend())
|
if (obj == sourceObjects.cend())
|
||||||
|
|
|
@ -330,8 +330,8 @@ void DialogRotation::ChosenObject(quint32 id, const SceneObject &type)
|
||||||
auto *operation = qobject_cast<VisToolRotation *>(vis);
|
auto *operation = qobject_cast<VisToolRotation *>(vis);
|
||||||
SCASSERT(operation != nullptr)
|
SCASSERT(operation != nullptr)
|
||||||
|
|
||||||
auto *obj = std::find_if(sourceObjects.begin(), sourceObjects.end(),
|
auto obj = std::find_if(sourceObjects.begin(), sourceObjects.end(),
|
||||||
[id](const SourceItem &sItem) { return sItem.id == id; });
|
[id](const SourceItem &sItem) { return sItem.id == id; });
|
||||||
|
|
||||||
if (obj != sourceObjects.cend())
|
if (obj != sourceObjects.cend())
|
||||||
{
|
{
|
||||||
|
@ -370,8 +370,8 @@ void DialogRotation::SelectedObject(bool selected, quint32 object, quint32 tool)
|
||||||
Q_UNUSED(tool)
|
Q_UNUSED(tool)
|
||||||
if (stage1)
|
if (stage1)
|
||||||
{
|
{
|
||||||
auto *obj = std::find_if(sourceObjects.begin(), sourceObjects.end(),
|
auto obj = std::find_if(sourceObjects.begin(), sourceObjects.end(),
|
||||||
[object](const SourceItem &sItem) { return sItem.id == object; });
|
[object](const SourceItem &sItem) { return sItem.id == object; });
|
||||||
if (selected)
|
if (selected)
|
||||||
{
|
{
|
||||||
if (obj == sourceObjects.cend())
|
if (obj == sourceObjects.cend())
|
||||||
|
@ -532,8 +532,8 @@ void DialogRotation::PointChanged()
|
||||||
{
|
{
|
||||||
quint32 id = getCurrentObjectId(ui->comboBoxOriginPoint);
|
quint32 id = getCurrentObjectId(ui->comboBoxOriginPoint);
|
||||||
|
|
||||||
auto *obj = std::find_if(sourceObjects.begin(), sourceObjects.end(),
|
auto obj = std::find_if(sourceObjects.begin(), sourceObjects.end(),
|
||||||
[id](const SourceItem &sItem) { return sItem.id == id; });
|
[id](const SourceItem &sItem) { return sItem.id == id; });
|
||||||
|
|
||||||
QColor color;
|
QColor color;
|
||||||
if (obj != sourceObjects.cend())
|
if (obj != sourceObjects.cend())
|
||||||
|
|
|
@ -67,7 +67,7 @@ DelTool::DelTool(VAbstractPattern *doc, quint32 id, QUndoCommand *parent)
|
||||||
while (i != groups.constEnd())
|
while (i != groups.constEnd())
|
||||||
{
|
{
|
||||||
VGroupData groupData = i.value();
|
VGroupData groupData = i.value();
|
||||||
auto *itemRecord = std::find_if(groupData.items.begin(), groupData.items.end(),
|
auto itemRecord = std::find_if(groupData.items.begin(), groupData.items.end(),
|
||||||
[id](const QPair<vidtype, vidtype> &item) { return item.second == id; });
|
[id](const QPair<vidtype, vidtype> &item) { return item.second == id; });
|
||||||
|
|
||||||
if (itemRecord != groupData.items.end())
|
if (itemRecord != groupData.items.end())
|
||||||
|
|
Loading…
Reference in New Issue
Block a user