Use QList instead of QVector in gui implementation
Task-number: QTBUG-84469 Change-Id: I366e845249203d80d640355a7780ac2f91a762f1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
7f400522c3
commit
471e4fcb22
@ -1090,10 +1090,10 @@ QPair< int, int > QAccessible::qAccessibleTextBoundaryHelper(const QTextCursor &
|
||||
|
||||
\sa parent(), child()
|
||||
*/
|
||||
QVector<QPair<QAccessibleInterface*, QAccessible::Relation> >
|
||||
QList<QPair<QAccessibleInterface*, QAccessible::Relation>>
|
||||
QAccessibleInterface::relations(QAccessible::Relation /*match = QAccessible::AllRelations*/) const
|
||||
{
|
||||
return QVector<QPair<QAccessibleInterface*, QAccessible::Relation> >();
|
||||
return { };
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, bridgeloader,
|
||||
(QAccessibleBridgeFactoryInterface_iid, QLatin1String("/accessiblebridge")))
|
||||
|
||||
Q_GLOBAL_STATIC(QVector<QAccessibleBridge *>, bridges)
|
||||
Q_GLOBAL_STATIC(QList<QAccessibleBridge *>, bridges)
|
||||
|
||||
/*!
|
||||
\class QPlatformAccessibility
|
||||
|
@ -71,7 +71,7 @@ painter.setPen(pen);
|
||||
|
||||
//! [2]
|
||||
QPen pen;
|
||||
QVector<qreal> dashes;
|
||||
QList<qreal> dashes;
|
||||
qreal space = 4;
|
||||
|
||||
dashes << 1 << space << 3 << space << 9 << space
|
||||
@ -83,7 +83,7 @@ pen.setDashPattern(dashes);
|
||||
|
||||
//! [3]
|
||||
QPen pen;
|
||||
QVector<qreal> dashes;
|
||||
QList<qreal> dashes;
|
||||
qreal space = 4;
|
||||
dashes << 1 << space << 3 << space << 9 << space
|
||||
<< 27 << space << 9 << space;
|
||||
|
@ -112,6 +112,6 @@ struct ParenthesisInfo
|
||||
|
||||
struct BlockData : public QTextBlockUserData
|
||||
{
|
||||
QVector<ParenthesisInfo> parentheses;
|
||||
QList<ParenthesisInfo> parentheses;
|
||||
};
|
||||
//! [3]
|
||||
|
@ -83,7 +83,7 @@ MainWindow::MainWindow()
|
||||
//! [2]
|
||||
QTextTableFormat tableFormat;
|
||||
tableFormat.setBackground(QColor("#e0e0e0"));
|
||||
QVector<QTextLength> constraints;
|
||||
QList<QTextLength> constraints;
|
||||
constraints << QTextLength(QTextLength::PercentageLength, 16);
|
||||
constraints << QTextLength(QTextLength::PercentageLength, 28);
|
||||
constraints << QTextLength(QTextLength::PercentageLength, 28);
|
||||
|
@ -42,8 +42,8 @@
|
||||
#ifndef QT_NO_IMAGEFORMAT_BMP
|
||||
|
||||
#include <qimage.h>
|
||||
#include <qlist.h>
|
||||
#include <qvariant.h>
|
||||
#include <qvector.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -588,7 +588,7 @@ bool qt_write_dib(QDataStream &s, const QImage &image, int bpl, int bpl_bmp, int
|
||||
if (image.depth() != 32) { // write color table
|
||||
uchar *color_table = new uchar[4*image.colorCount()];
|
||||
uchar *rgb = color_table;
|
||||
QVector<QRgb> c = image.colorTable();
|
||||
QList<QRgb> c = image.colorTable();
|
||||
for (int i = 0; i < image.colorCount(); i++) {
|
||||
*rgb++ = qBlue (c[i]);
|
||||
*rgb++ = qGreen(c[i]);
|
||||
|
@ -385,7 +385,7 @@ static inline int origIcoDepth(const QImage &image)
|
||||
return s.isEmpty() ? 32 : s.toInt();
|
||||
}
|
||||
|
||||
static inline int findBySize(const QVector<QImage> &images, const QSize &size)
|
||||
static inline int findBySize(const QList<QImage> &images, const QSize &size)
|
||||
{
|
||||
for (int i = 0; i < images.size(); ++i) {
|
||||
if (images.at(i).size() == size)
|
||||
@ -449,7 +449,7 @@ void QPixmapIconEngine::addFile(const QString &fileName, const QSize &size, QIco
|
||||
// these files may contain low-resolution images. As this information is lost,
|
||||
// ICOReader sets the original format as an image text key value. Read all matching
|
||||
// images into a list trying to find the highest quality per size.
|
||||
QVector<QImage> icoImages;
|
||||
QList<QImage> icoImages;
|
||||
while (imageReader.read(&image)) {
|
||||
if (ignoreSize || image.size() == size) {
|
||||
const int position = findBySize(icoImages, image.size());
|
||||
|
@ -217,7 +217,7 @@ class QIconCacheGtkReader
|
||||
{
|
||||
public:
|
||||
explicit QIconCacheGtkReader(const QString &themeDir);
|
||||
QVector<const char *> lookup(QStringView);
|
||||
QList<const char *> lookup(QStringView);
|
||||
bool isValid() const { return m_isValid; }
|
||||
private:
|
||||
QFile m_file;
|
||||
@ -290,9 +290,9 @@ static quint32 icon_name_hash(const char *p)
|
||||
with this name is present. The char* are pointers to the mapped data.
|
||||
For example, this would return { "32x32/apps", "24x24/apps" , ... }
|
||||
*/
|
||||
QVector<const char *> QIconCacheGtkReader::lookup(QStringView name)
|
||||
QList<const char *> QIconCacheGtkReader::lookup(QStringView name)
|
||||
{
|
||||
QVector<const char *> ret;
|
||||
QList<const char *> ret;
|
||||
if (!isValid() || name.isEmpty())
|
||||
return ret;
|
||||
|
||||
@ -452,7 +452,7 @@ QThemeIconInfo QIconLoader::findIconHelper(const QString &themeName,
|
||||
|
||||
// Add all relevant files
|
||||
for (int i = 0; i < contentDirs.size(); ++i) {
|
||||
QVector<QIconDirInfo> subDirs = theme.keyList();
|
||||
QList<QIconDirInfo> subDirs = theme.keyList();
|
||||
|
||||
// Try to reduce the amount of subDirs by looking in the GTK+ cache in order to save
|
||||
// a massive amount of file stat (especially if the icon is not there)
|
||||
@ -460,7 +460,7 @@ QThemeIconInfo QIconLoader::findIconHelper(const QString &themeName,
|
||||
if (cache->isValid()) {
|
||||
const auto result = cache->lookup(iconNameFallback);
|
||||
if (cache->isValid()) {
|
||||
const QVector<QIconDirInfo> subDirsCopy = subDirs;
|
||||
const QList<QIconDirInfo> subDirsCopy = subDirs;
|
||||
subDirs.clear();
|
||||
subDirs.reserve(result.count());
|
||||
for (const char *s : result) {
|
||||
|
@ -541,7 +541,7 @@ bool QImageData::checkForAlphaPixels() const
|
||||
|
||||
8-bit images are stored using 8-bit indexes into a color table,
|
||||
i.e. they have a single byte per pixel. The color table is a
|
||||
QVector<QRgb>, and the QRgb typedef is equivalent to an unsigned
|
||||
QList<QRgb>, and the QRgb typedef is equivalent to an unsigned
|
||||
int containing an ARGB quadruplet on the format 0xAARRGGBB.
|
||||
|
||||
32-bit images have no color table; instead, each pixel contains an
|
||||
@ -1398,7 +1398,7 @@ int QImage::colorCount() const
|
||||
\sa colorTable(), setColor(), {QImage#Image Transformations}{Image
|
||||
Transformations}
|
||||
*/
|
||||
void QImage::setColorTable(const QVector<QRgb> &colors)
|
||||
void QImage::setColorTable(const QList<QRgb> &colors)
|
||||
{
|
||||
if (!d)
|
||||
return;
|
||||
@ -1424,9 +1424,9 @@ void QImage::setColorTable(const QVector<QRgb> &colors)
|
||||
|
||||
\sa setColorTable(), colorCount(), color()
|
||||
*/
|
||||
QVector<QRgb> QImage::colorTable() const
|
||||
QList<QRgb> QImage::colorTable() const
|
||||
{
|
||||
return d ? d->colortable : QVector<QRgb>();
|
||||
return d ? d->colortable : QList<QRgb>();
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -2014,7 +2014,7 @@ void QImage::setColorCount(int colorCount)
|
||||
if (colorCount == d->colortable.size())
|
||||
return;
|
||||
if (colorCount <= 0) { // use no color table
|
||||
d->colortable = QVector<QRgb>();
|
||||
d->colortable.clear();
|
||||
return;
|
||||
}
|
||||
int nc = d->colortable.size();
|
||||
@ -2109,7 +2109,7 @@ static inline int pixel_distance(QRgb p1, QRgb p2) {
|
||||
return abs(r1 - r2) + abs(g1 - g2) + abs(b1 - b2) + abs(a1 - a2);
|
||||
}
|
||||
|
||||
static inline int closestMatch(QRgb pixel, const QVector<QRgb> &clut) {
|
||||
static inline int closestMatch(QRgb pixel, const QList<QRgb> &clut) {
|
||||
int idx = 0;
|
||||
int current_distance = INT_MAX;
|
||||
for (int i=0; i<clut.size(); ++i) {
|
||||
@ -2123,7 +2123,7 @@ static inline int closestMatch(QRgb pixel, const QVector<QRgb> &clut) {
|
||||
}
|
||||
|
||||
static QImage convertWithPalette(const QImage &src, QImage::Format format,
|
||||
const QVector<QRgb> &clut) {
|
||||
const QList<QRgb> &clut) {
|
||||
QImage dest(src.size(), format);
|
||||
dest.setColorTable(clut);
|
||||
|
||||
@ -2149,7 +2149,7 @@ static QImage convertWithPalette(const QImage &src, QImage::Format format,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
QVector<QRgb> table = clut;
|
||||
QList<QRgb> table = clut;
|
||||
table.resize(2);
|
||||
for (int y=0; y<h; ++y) {
|
||||
const QRgb *src_pixels = (const QRgb *) src.scanLine(y);
|
||||
@ -2178,7 +2178,7 @@ static QImage convertWithPalette(const QImage &src, QImage::Format format,
|
||||
and will use a straightforward nearest color approach, with no
|
||||
dithering.
|
||||
*/
|
||||
QImage QImage::convertToFormat(Format format, const QVector<QRgb> &colorTable, Qt::ImageConversionFlags flags) const
|
||||
QImage QImage::convertToFormat(Format format, const QList<QRgb> &colorTable, Qt::ImageConversionFlags flags) const
|
||||
{
|
||||
if (!d || d->format == format)
|
||||
return *this;
|
||||
@ -3776,8 +3776,8 @@ bool QImage::operator==(const QImage & i) const
|
||||
} else {
|
||||
const int w = width();
|
||||
const int h = height();
|
||||
const QVector<QRgb> &colortable = d->colortable;
|
||||
const QVector<QRgb> &icolortable = i.d->colortable;
|
||||
const QList<QRgb> &colortable = d->colortable;
|
||||
const QList<QRgb> &icolortable = i.d->colortable;
|
||||
for (int y=0; y<h; ++y) {
|
||||
for (int x=0; x<w; ++x) {
|
||||
if (colortable[pixelIndex(x, y)] != icolortable[i.pixelIndex(x, y)])
|
||||
|
@ -69,7 +69,7 @@ struct QDefaultColorTables
|
||||
}
|
||||
}
|
||||
|
||||
QVector<QRgb> gray, alpha;
|
||||
QList<QRgb> gray, alpha;
|
||||
};
|
||||
|
||||
Q_GLOBAL_STATIC(QDefaultColorTables, defaultColorTables);
|
||||
@ -132,7 +132,7 @@ void qGamma_correct_back_to_linear_cs(QImage *image)
|
||||
// The drawhelper conversions from/to RGB32 are passthroughs which is not always correct for general image conversion
|
||||
#if !defined(__ARM_NEON__) || !(Q_BYTE_ORDER == Q_LITTLE_ENDIAN)
|
||||
static void QT_FASTCALL storeRGB32FromARGB32PM(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
uint *d = reinterpret_cast<uint *>(dest) + index;
|
||||
for (int i = 0; i < count; ++i)
|
||||
@ -141,7 +141,7 @@ static void QT_FASTCALL storeRGB32FromARGB32PM(uchar *dest, const uint *src, int
|
||||
#endif
|
||||
|
||||
static void QT_FASTCALL storeRGB32FromARGB32(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
uint *d = reinterpret_cast<uint *>(dest) + index;
|
||||
for (int i = 0; i < count; ++i)
|
||||
@ -149,7 +149,7 @@ static void QT_FASTCALL storeRGB32FromARGB32(uchar *dest, const uint *src, int i
|
||||
}
|
||||
|
||||
static const uint *QT_FASTCALL fetchRGB32ToARGB32PM(uint *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
const uint *s = reinterpret_cast<const uint *>(src) + index;
|
||||
for (int i = 0; i < count; ++i)
|
||||
@ -159,10 +159,10 @@ static const uint *QT_FASTCALL fetchRGB32ToARGB32PM(uint *buffer, const uchar *s
|
||||
|
||||
#ifdef QT_COMPILER_SUPPORTS_SSE4_1
|
||||
extern void QT_FASTCALL storeRGB32FromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
#elif defined(__ARM_NEON__) && (Q_BYTE_ORDER == Q_LITTLE_ENDIAN)
|
||||
extern void QT_FASTCALL storeRGB32FromARGB32PM_neon(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
#endif
|
||||
|
||||
void convert_generic(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags flags)
|
||||
@ -1308,9 +1308,9 @@ static void convert_RGBA64_to_gray16(QImageData *dest, const QImageData *src, Qt
|
||||
}
|
||||
}
|
||||
|
||||
static QVector<QRgb> fix_color_table(const QVector<QRgb> &ctbl, QImage::Format format)
|
||||
static QList<QRgb> fix_color_table(const QList<QRgb> &ctbl, QImage::Format format)
|
||||
{
|
||||
QVector<QRgb> colorTable = ctbl;
|
||||
QList<QRgb> colorTable = ctbl;
|
||||
if (format == QImage::Format_RGB32) {
|
||||
// check if the color table has alpha
|
||||
for (int i = 0; i < colorTable.size(); ++i)
|
||||
@ -1644,7 +1644,7 @@ static void convert_RGB_to_Indexed8(QImageData *dst, const QImageData *src, Qt::
|
||||
int pix=0;
|
||||
|
||||
if (!dst->colortable.isEmpty()) {
|
||||
QVector<QRgb> ctbl = dst->colortable;
|
||||
QList<QRgb> ctbl = dst->colortable;
|
||||
dst->colortable.resize(256);
|
||||
// Preload palette into table.
|
||||
// Almost same code as pixel insertion below
|
||||
@ -1907,7 +1907,7 @@ static void convert_Indexed8_to_X32(QImageData *dest, const QImageData *src, Qt:
|
||||
Q_ASSERT(src->width == dest->width);
|
||||
Q_ASSERT(src->height == dest->height);
|
||||
|
||||
QVector<QRgb> colorTable = src->has_alpha_clut ? fix_color_table(src->colortable, dest->format) : src->colortable;
|
||||
QList<QRgb> colorTable = src->has_alpha_clut ? fix_color_table(src->colortable, dest->format) : src->colortable;
|
||||
if (colorTable.size() == 0) {
|
||||
colorTable.resize(256);
|
||||
for (int i=0; i<256; ++i)
|
||||
@ -1947,7 +1947,7 @@ static void convert_Mono_to_X32(QImageData *dest, const QImageData *src, Qt::Ima
|
||||
Q_ASSERT(src->width == dest->width);
|
||||
Q_ASSERT(src->height == dest->height);
|
||||
|
||||
QVector<QRgb> colorTable = fix_color_table(src->colortable, dest->format);
|
||||
QList<QRgb> colorTable = fix_color_table(src->colortable, dest->format);
|
||||
|
||||
// Default to black / white colors
|
||||
if (colorTable.size() < 2) {
|
||||
@ -1987,7 +1987,7 @@ static void convert_Mono_to_Indexed8(QImageData *dest, const QImageData *src, Qt
|
||||
Q_ASSERT(src->width == dest->width);
|
||||
Q_ASSERT(src->height == dest->height);
|
||||
|
||||
QVector<QRgb> ctbl = src->colortable;
|
||||
QList<QRgb> ctbl = src->colortable;
|
||||
if (ctbl.size() > 2) {
|
||||
ctbl.resize(2);
|
||||
} else if (ctbl.size() < 2) {
|
||||
@ -2041,7 +2041,7 @@ static void convert_Indexed8_to_Alpha8(QImageData *dest, const QImageData *src,
|
||||
Q_ASSERT(dest->format == QImage::Format_Alpha8);
|
||||
|
||||
uchar translate[256];
|
||||
const QVector<QRgb> &colors = src->colortable;
|
||||
const QList<QRgb> &colors = src->colortable;
|
||||
bool simpleCase = (colors.size() == 256);
|
||||
for (int i = 0; i < colors.size(); ++i) {
|
||||
uchar alpha = qAlpha(colors[i]);
|
||||
@ -2069,7 +2069,7 @@ static void convert_Indexed8_to_Grayscale8(QImageData *dest, const QImageData *s
|
||||
Q_ASSERT(dest->format == QImage::Format_Grayscale8);
|
||||
|
||||
uchar translate[256];
|
||||
const QVector<QRgb> &colors = src->colortable;
|
||||
const QList<QRgb> &colors = src->colortable;
|
||||
bool simpleCase = (colors.size() == 256);
|
||||
for (int i = 0; i < colors.size(); ++i) {
|
||||
uchar gray = qGray(colors[i]);
|
||||
@ -2096,7 +2096,7 @@ static bool convert_Indexed8_to_Alpha8_inplace(QImageData *data, Qt::ImageConver
|
||||
Q_ASSERT(data->format == QImage::Format_Indexed8);
|
||||
|
||||
// Just check if this is an Alpha8 in Indexed8 disguise.
|
||||
const QVector<QRgb> &colors = data->colortable;
|
||||
const QList<QRgb> &colors = data->colortable;
|
||||
if (colors.size() != 256)
|
||||
return false;
|
||||
for (int i = 0; i < colors.size(); ++i) {
|
||||
@ -2115,7 +2115,7 @@ static bool convert_Indexed8_to_Grayscale8_inplace(QImageData *data, Qt::ImageCo
|
||||
Q_ASSERT(data->format == QImage::Format_Indexed8);
|
||||
|
||||
// Just check if this is a Grayscale8 in Indexed8 disguise.
|
||||
const QVector<QRgb> &colors = data->colortable;
|
||||
const QList<QRgb> &colors = data->colortable;
|
||||
if (colors.size() != 256)
|
||||
return false;
|
||||
for (int i = 0; i < colors.size(); ++i) {
|
||||
|
@ -181,7 +181,7 @@ static QImage copyImageData(const BITMAPINFOHEADER &header, const RGBQUAD *color
|
||||
}
|
||||
if (colorTableSize) {
|
||||
Q_ASSERT(colorTableIn);
|
||||
QVector<QRgb> colorTable;
|
||||
QList<QRgb> colorTable;
|
||||
colorTable.reserve(colorTableSize);
|
||||
std::transform(colorTableIn, colorTableIn + colorTableSize,
|
||||
std::back_inserter(colorTable), rgbQuadToQRgb);
|
||||
|
@ -45,9 +45,7 @@
|
||||
#include <qdebug.h>
|
||||
#include <qiodevice.h>
|
||||
#include <qimage.h>
|
||||
#include <qlist.h>
|
||||
#include <qvariant.h>
|
||||
#include <qvector.h>
|
||||
|
||||
#include <private/qimage_p.h> // for qt_getImageText
|
||||
|
||||
|
@ -42,8 +42,8 @@
|
||||
#ifndef QT_NO_IMAGEFORMAT_PPM
|
||||
|
||||
#include <qimage.h>
|
||||
#include <qlist.h>
|
||||
#include <qvariant.h>
|
||||
#include <qvector.h>
|
||||
#include <ctype.h>
|
||||
#include <qrgba64.h>
|
||||
|
||||
@ -367,7 +367,7 @@ static bool write_pbm_image(QIODevice *out, const QImage &sourceImage, const QBy
|
||||
qsizetype bpl = qsizetype(w) * (gray ? 1 : 3);
|
||||
uchar *buf = new uchar[bpl];
|
||||
if (image.format() == QImage::Format_Indexed8) {
|
||||
QVector<QRgb> color = image.colorTable();
|
||||
QList<QRgb> color = image.colorTable();
|
||||
for (uint y=0; y<h; y++) {
|
||||
const uchar *b = image.constScanLine(y);
|
||||
uchar *p = buf;
|
||||
|
@ -44,7 +44,6 @@
|
||||
#include <QtCore/qmap.h>
|
||||
#include <QtCore/qpair.h>
|
||||
#include <QtCore/qvariant.h>
|
||||
#include <QtCore/qvector.h>
|
||||
#include <QtCore/qstringlist.h>
|
||||
#include <QtCore/qbitarray.h>
|
||||
#include <QtCore/qmimedata.h>
|
||||
@ -274,11 +273,11 @@ void QStandardItemPrivate::setItemData(const QMap<int, QVariant> &roles)
|
||||
std::sort(values.begin(), values.end(), byRole);
|
||||
|
||||
/*
|
||||
Create a vector of QStandardItemData that will contain the original values
|
||||
Create a list of QStandardItemData that will contain the original values
|
||||
if the matching role is not contained in roles, the new value if it is and
|
||||
if the new value is an invalid QVariant, it will be removed.
|
||||
*/
|
||||
QVector<QStandardItemData> newValues;
|
||||
QList<QStandardItemData> newValues;
|
||||
newValues.reserve(values.size());
|
||||
roleMapStandardItemDataUnion(roles.keyValueBegin(),
|
||||
roles.keyValueEnd(),
|
||||
@ -288,7 +287,7 @@ void QStandardItemPrivate::setItemData(const QMap<int, QVariant> &roles)
|
||||
if (newValues != values) {
|
||||
values.swap(newValues);
|
||||
if (model) {
|
||||
QVector<int> roleKeys;
|
||||
QList<int> roleKeys;
|
||||
roleKeys.reserve(roles.size() + 1);
|
||||
bool hasEditRole = false;
|
||||
bool hasDisplayRole = false;
|
||||
@ -314,7 +313,7 @@ void QStandardItemPrivate::setItemData(const QMap<int, QVariant> &roles)
|
||||
const QMap<int, QVariant> QStandardItemPrivate::itemData() const
|
||||
{
|
||||
QMap<int, QVariant> result;
|
||||
QVector<QStandardItemData>::const_iterator it;
|
||||
QList<QStandardItemData>::const_iterator it;
|
||||
for (it = values.cbegin(); it != values.cend(); ++it){
|
||||
// Qt::UserRole - 1 is used internally to store the flags
|
||||
if (it->role != Qt::UserRole - 1)
|
||||
@ -332,8 +331,8 @@ void QStandardItemPrivate::sortChildren(int column, Qt::SortOrder order)
|
||||
if (column >= columnCount())
|
||||
return;
|
||||
|
||||
QVector<QPair<QStandardItem*, int> > sortable;
|
||||
QVector<int> unsortable;
|
||||
QList<QPair<QStandardItem*, int> > sortable;
|
||||
QList<int> unsortable;
|
||||
|
||||
sortable.reserve(rowCount());
|
||||
unsortable.reserve(rowCount());
|
||||
@ -355,7 +354,7 @@ void QStandardItemPrivate::sortChildren(int column, Qt::SortOrder order)
|
||||
}
|
||||
|
||||
QModelIndexList changedPersistentIndexesFrom, changedPersistentIndexesTo;
|
||||
QVector<QStandardItem*> sorted_children(children.count());
|
||||
QList<QStandardItem*> sorted_children(children.count());
|
||||
for (int i = 0; i < rowCount(); ++i) {
|
||||
int r = (i < sortable.count()
|
||||
? sortable.at(i).second
|
||||
@ -380,7 +379,7 @@ void QStandardItemPrivate::sortChildren(int column, Qt::SortOrder order)
|
||||
model->changePersistentIndexList(changedPersistentIndexesFrom, changedPersistentIndexesTo);
|
||||
}
|
||||
|
||||
QVector<QStandardItem*>::iterator it;
|
||||
QList<QStandardItem*>::iterator it;
|
||||
for (it = children.begin(); it != children.end(); ++it) {
|
||||
if (*it)
|
||||
(*it)->d_func()->sortChildren(column, order);
|
||||
@ -406,7 +405,7 @@ void QStandardItemPrivate::setModel(QStandardItemModel *mod)
|
||||
itm->d_func()->model->d_func()->invalidatePersistentIndex(itm->d_func()->model->indexFromItem(itm));
|
||||
}
|
||||
itm->d_func()->model = mod;
|
||||
const QVector<QStandardItem*> &childList = itm->d_func()->children;
|
||||
const QList<QStandardItem*> &childList = itm->d_func()->children;
|
||||
for (int i = 0; i < childList.count(); ++i) {
|
||||
QStandardItem *chi = childList.at(i);
|
||||
if (chi)
|
||||
@ -589,7 +588,7 @@ bool QStandardItemPrivate::insertColumns(int column, int count, const QList<QSta
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
void QStandardItemModelPrivate::itemChanged(QStandardItem *item, const QVector<int> &roles)
|
||||
void QStandardItemModelPrivate::itemChanged(QStandardItem *item, const QList<int> &roles)
|
||||
{
|
||||
Q_Q(QStandardItemModel);
|
||||
Q_ASSERT(item);
|
||||
@ -920,17 +919,18 @@ void QStandardItem::setData(const QVariant &value, int role)
|
||||
{
|
||||
Q_D(QStandardItem);
|
||||
role = (role == Qt::EditRole) ? Qt::DisplayRole : role;
|
||||
const QVector<int> roles((role == Qt::DisplayRole) ?
|
||||
QVector<int>({Qt::DisplayRole, Qt::EditRole}) :
|
||||
QVector<int>({role}));
|
||||
QVector<QStandardItemData>::iterator it;
|
||||
for (it = d->values.begin(); it != d->values.end(); ++it) {
|
||||
const QList<int> roles((role == Qt::DisplayRole) ?
|
||||
QList<int>({Qt::DisplayRole, Qt::EditRole}) :
|
||||
QList<int>({role}));
|
||||
for (auto it = d->values.begin(); it != d->values.end(); ++it) {
|
||||
if ((*it).role == role) {
|
||||
if (value.isValid()) {
|
||||
if ((*it).value.userType() == value.userType() && (*it).value == value)
|
||||
return;
|
||||
(*it).value = value;
|
||||
} else {
|
||||
// Don't need to assign proper it after erase() since we
|
||||
// return unconditionally in this code path.
|
||||
d->values.erase(it);
|
||||
}
|
||||
if (d->model)
|
||||
@ -955,7 +955,7 @@ void QStandardItem::clearData()
|
||||
return;
|
||||
d->values.clear();
|
||||
if (d->model)
|
||||
d->model->d_func()->itemChanged(this, QVector<int>{});
|
||||
d->model->d_func()->itemChanged(this, QList<int>{});
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -968,11 +968,10 @@ void QStandardItem::clearData()
|
||||
QVariant QStandardItem::data(int role) const
|
||||
{
|
||||
Q_D(const QStandardItem);
|
||||
role = (role == Qt::EditRole) ? Qt::DisplayRole : role;
|
||||
QVector<QStandardItemData>::const_iterator it;
|
||||
for (it = d->values.begin(); it != d->values.end(); ++it) {
|
||||
if ((*it).role == role)
|
||||
return (*it).value;
|
||||
const int r = (role == Qt::EditRole) ? Qt::DisplayRole : role;
|
||||
for (const auto &value : d->values) {
|
||||
if (value.role == r)
|
||||
return value.value;
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
@ -3111,7 +3110,7 @@ QMimeData *QStandardItemModel::mimeData(const QModelIndexList &indexes) const
|
||||
if (seen.hasSeen(itm))
|
||||
continue;
|
||||
|
||||
const QVector<QStandardItem*> &childList = itm->d_func()->children;
|
||||
const QList<QStandardItem*> &childList = itm->d_func()->children;
|
||||
for (int i = 0; i < childList.count(); ++i) {
|
||||
QStandardItem *chi = childList.at(i);
|
||||
if (chi) {
|
||||
@ -3196,8 +3195,8 @@ bool QStandardItemModel::dropMimeData(const QMimeData *data, Qt::DropAction acti
|
||||
int left = INT_MAX;
|
||||
int bottom = 0;
|
||||
int right = 0;
|
||||
QVector<int> rows, columns;
|
||||
QVector<QStandardItem *> items;
|
||||
QList<int> rows, columns;
|
||||
QList<QStandardItem *> items;
|
||||
|
||||
while (!stream.atEnd()) {
|
||||
int r, c;
|
||||
@ -3220,7 +3219,7 @@ bool QStandardItemModel::dropMimeData(const QMimeData *data, Qt::DropAction acti
|
||||
int dragColumnCount = right - left + 1;
|
||||
|
||||
// Compute the number of continuous rows upon insertion and modify the rows to match
|
||||
QVector<int> rowsToInsert(bottom + 1);
|
||||
QList<int> rowsToInsert(bottom + 1);
|
||||
for (int i = 0; i < rows.count(); ++i)
|
||||
rowsToInsert[rows.at(i)] = 1;
|
||||
for (int i = 0; i < rowsToInsert.count(); ++i) {
|
||||
@ -3249,7 +3248,7 @@ bool QStandardItemModel::dropMimeData(const QMimeData *data, Qt::DropAction acti
|
||||
if (!parentItem)
|
||||
parentItem = invisibleRootItem();
|
||||
|
||||
QVector<QPersistentModelIndex> newIndexes(items.size());
|
||||
QList<QPersistentModelIndex> newIndexes(items.size());
|
||||
// set the data in the table
|
||||
for (int j = 0; j < items.size(); ++j) {
|
||||
int relativeRow = rows.at(j) - top;
|
||||
|
@ -570,7 +570,7 @@ QActionGroup *QAction::actionGroup() const
|
||||
|
||||
\sa QWidget::addAction(), QGraphicsWidget::addAction()
|
||||
*/
|
||||
QVector<QObject*> QAction::associatedObjects() const
|
||||
QList<QObject*> QAction::associatedObjects() const
|
||||
{
|
||||
Q_D(const QAction);
|
||||
return d->associatedObjects;
|
||||
|
@ -4487,7 +4487,7 @@ QTouchEvent::TouchPoint::InfoFlags QTouchEvent::TouchPoint::flags() const
|
||||
Returns the raw, unfiltered positions for the touch point. The positions are in native screen coordinates.
|
||||
To get local coordinates you can use mapFromGlobal() of the QWindow returned by QTouchEvent::window().
|
||||
|
||||
\note Returns an empty vector if the touch device's capabilities do not include QPointingDevice::RawPositions.
|
||||
\note Returns an empty list if the touch device's capabilities do not include QPointingDevice::RawPositions.
|
||||
|
||||
\note Native screen coordinates refer to the native orientation of the screen which, in case of
|
||||
mobile devices, is typically portrait. This means that on systems capable of screen orientation
|
||||
@ -4496,7 +4496,7 @@ QTouchEvent::TouchPoint::InfoFlags QTouchEvent::TouchPoint::flags() const
|
||||
|
||||
\sa QPointingDevice::capabilities(), device(), window()
|
||||
*/
|
||||
QVector<QPointF> QTouchEvent::TouchPoint::rawScreenPositions() const
|
||||
QList<QPointF> QTouchEvent::TouchPoint::rawScreenPositions() const
|
||||
{
|
||||
return d->rawScreenPositions;
|
||||
}
|
||||
@ -4654,7 +4654,7 @@ void QTouchEvent::TouchPoint::setVelocity(const QVector2D &v)
|
||||
}
|
||||
|
||||
/*! \internal */
|
||||
void QTouchEvent::TouchPoint::setRawScreenPositions(const QVector<QPointF> &positions)
|
||||
void QTouchEvent::TouchPoint::setRawScreenPositions(const QList<QPointF> &positions)
|
||||
{
|
||||
if (d->ref.loadRelaxed() != 1)
|
||||
d = d->detach();
|
||||
@ -4933,7 +4933,7 @@ Qt::ApplicationState QApplicationStateChangeEvent::applicationState() const
|
||||
functions by value.
|
||||
|
||||
This type actively prevents you from holding it in a QList, because doing so would
|
||||
be very inefficient. Use a QVector instead, which has the same API as QList, but more
|
||||
be very inefficient. Use a QList instead, which has the same API as QList, but more
|
||||
efficient storage.
|
||||
|
||||
\sa QTouchEvent::TouchPoint
|
||||
|
@ -160,7 +160,7 @@ bool QGuiApplicationPrivate::highDpiScalingUpdated = false;
|
||||
|
||||
QPointer<QWindow> QGuiApplicationPrivate::currentDragWindow;
|
||||
|
||||
QVector<QGuiApplicationPrivate::TabletPointData> QGuiApplicationPrivate::tabletDevicePoints;
|
||||
QList<QGuiApplicationPrivate::TabletPointData> QGuiApplicationPrivate::tabletDevicePoints;
|
||||
|
||||
QPlatformIntegration *QGuiApplicationPrivate::platform_integration = nullptr;
|
||||
QPlatformTheme *QGuiApplicationPrivate::platform_theme = nullptr;
|
||||
|
@ -185,14 +185,14 @@ inline QMargins scale(const QMargins &margins, qreal scaleFactor, QPoint origin
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
QList<T> scale(const QList<T> &vector, qreal scaleFactor, QPoint origin = QPoint(0, 0))
|
||||
QList<T> scale(const QList<T> &list, qreal scaleFactor, QPoint origin = QPoint(0, 0))
|
||||
{
|
||||
if (!QHighDpiScaling::isActive())
|
||||
return vector;
|
||||
return list;
|
||||
|
||||
QList<T> scaled;
|
||||
scaled.reserve(vector.size());
|
||||
for (const T &item : vector)
|
||||
scaled.reserve(list.size());
|
||||
for (const T &item : list)
|
||||
scaled.append(scale(item, scaleFactor, origin));
|
||||
return scaled;
|
||||
}
|
||||
|
@ -1050,8 +1050,8 @@ struct QModifKeyName {
|
||||
};
|
||||
Q_DECLARE_TYPEINFO(QModifKeyName, Q_MOVABLE_TYPE);
|
||||
|
||||
Q_GLOBAL_STATIC(QVector<QModifKeyName>, globalModifs)
|
||||
Q_GLOBAL_STATIC(QVector<QModifKeyName>, globalPortableModifs)
|
||||
Q_GLOBAL_STATIC(QList<QModifKeyName>, globalModifs)
|
||||
Q_GLOBAL_STATIC(QList<QModifKeyName>, globalPortableModifs)
|
||||
|
||||
/*!
|
||||
Constructs a single key from the string \a str.
|
||||
@ -1069,7 +1069,7 @@ int QKeySequencePrivate::decodeString(QString accel, QKeySequence::SequenceForma
|
||||
accel = std::move(accel).toLower();
|
||||
bool nativeText = (format == QKeySequence::NativeText);
|
||||
|
||||
QVector<QModifKeyName> *gmodifs;
|
||||
QList<QModifKeyName> *gmodifs;
|
||||
if (nativeText) {
|
||||
gmodifs = globalModifs();
|
||||
if (gmodifs->isEmpty()) {
|
||||
@ -1104,7 +1104,7 @@ int QKeySequencePrivate::decodeString(QString accel, QKeySequence::SequenceForma
|
||||
}
|
||||
|
||||
|
||||
QVector<QModifKeyName> modifs;
|
||||
QList<QModifKeyName> modifs;
|
||||
if (nativeText) {
|
||||
modifs << QModifKeyName(Qt::CTRL, QCoreApplication::translate("QShortcut", "Ctrl").toLower().append(QLatin1Char('+')))
|
||||
<< QModifKeyName(Qt::SHIFT, QCoreApplication::translate("QShortcut", "Shift").toLower().append(QLatin1Char('+')))
|
||||
|
@ -40,16 +40,16 @@
|
||||
#include "qplatformdialoghelper.h"
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtCore/QList>
|
||||
#if QT_CONFIG(regularexpression)
|
||||
#include <QtCore/QRegularExpression>
|
||||
#endif
|
||||
#include <QtCore/QSharedData>
|
||||
#if QT_CONFIG(settings)
|
||||
#include <QtCore/QSettings>
|
||||
#endif
|
||||
#include <QtCore/QSharedData>
|
||||
#include <QtCore/QUrl>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtGui/QColor>
|
||||
|
||||
#include <algorithm>
|
||||
@ -812,7 +812,7 @@ public:
|
||||
QString informativeText;
|
||||
QString detailedText;
|
||||
QPlatformDialogHelper::StandardButtons buttons;
|
||||
QVector<QMessageDialogOptions::CustomButton> customButtons;
|
||||
QList<QMessageDialogOptions::CustomButton> customButtons;
|
||||
int nextCustomButtonId;
|
||||
};
|
||||
|
||||
@ -923,7 +923,7 @@ void QMessageDialogOptions::removeButton(int id)
|
||||
d->customButtons.removeOne(CustomButton(id));
|
||||
}
|
||||
|
||||
const QVector<QMessageDialogOptions::CustomButton> &QMessageDialogOptions::customButtons()
|
||||
const QList<QMessageDialogOptions::CustomButton> &QMessageDialogOptions::customButtons()
|
||||
{
|
||||
return d->customButtons;
|
||||
}
|
||||
|
@ -554,9 +554,9 @@ void QPlatformScreen::setPowerState(PowerState state)
|
||||
|
||||
\since 5.9
|
||||
*/
|
||||
QVector<QPlatformScreen::Mode> QPlatformScreen::modes() const
|
||||
QList<QPlatformScreen::Mode> QPlatformScreen::modes() const
|
||||
{
|
||||
QVector<QPlatformScreen::Mode> list;
|
||||
QList<QPlatformScreen::Mode> list;
|
||||
list.append({geometry().size(), refreshRate()});
|
||||
return list;
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ QT_BEGIN_NAMESPACE
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void QPlatformSharedGraphicsCache::requestItems(const QByteArray &cacheId, const QVector<quint32> &itemIds)
|
||||
\fn void QPlatformSharedGraphicsCache::requestItems(const QByteArray &cacheId, const QList<quint32> &itemIds)
|
||||
|
||||
Requests all the items in \a itemIds from the cache with the name \a cacheId.
|
||||
|
||||
@ -116,7 +116,7 @@ QT_BEGIN_NAMESPACE
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void QPlatformSharedGraphicsCache::insertItems(const QByteArray &cacheId, const QVector<quint32> &itemIds, const QVector<QImage> &items)
|
||||
\fn void QPlatformSharedGraphicsCache::insertItems(const QByteArray &cacheId, const QList<quint32> &itemIds, const QList<QImage> &items)
|
||||
|
||||
Inserts the items in \a itemIds into the cache named \a cacheId. The appearance of
|
||||
each item is stored in \a items. The format of the QImage objects is expected to match the
|
||||
@ -132,7 +132,7 @@ QT_BEGIN_NAMESPACE
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void QPlatformSharedGraphicsCache::releaseItems(const QByteArray &cacheId, const QVector<quint32> &itemIds)
|
||||
\fn void QPlatformSharedGraphicsCache::releaseItems(const QByteArray &cacheId, const QList<quint32> &itemIds)
|
||||
|
||||
Releases the reference to the items in \a itemIds from the cache named \a cacheId. This should
|
||||
only be called when all references to the items have been released by the user, and they are no
|
||||
@ -140,20 +140,20 @@ QT_BEGIN_NAMESPACE
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void QPlatformSharedGraphicsCache::itemsMissing(const QByteArray &cacheId, const QVector<quint32> &itemIds)
|
||||
\fn void QPlatformSharedGraphicsCache::itemsMissing(const QByteArray &cacheId, const QList<quint32> &itemIds)
|
||||
|
||||
This signal is emitted when requestItems() has been called for one or more items in the
|
||||
cache named \a cacheId which are not yet available in the cache. The user is then expected to
|
||||
call insertItems() to update the cache with the respective items, at which point they will
|
||||
become available to all clients of the shared cache.
|
||||
|
||||
The vector \a itemIds contains the IDs of the items that need to be inserted into the cache.
|
||||
The \a itemIds list contains the IDs of the items that need to be inserted into the cache.
|
||||
|
||||
\sa itemsAvailable(), insertItems(), requestItems()
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void QPlatformSharedGraphicsCache::itemsAvailable(const QByteArray &cacheId, void *bufferId, const QVector<quint32> &itemIds, const QVector<QPoint> &positionsInBuffer)
|
||||
\fn void QPlatformSharedGraphicsCache::itemsAvailable(const QByteArray &cacheId, void *bufferId, const QList<quint32> &itemIds, const QList<QPoint> &positionsInBuffer)
|
||||
|
||||
This signal can be emitted at any time when either requestItems() or insertItems() has been
|
||||
called by the application for one or more items in the cache named \a cacheId, as long as
|
||||
@ -167,8 +167,8 @@ QT_BEGIN_NAMESPACE
|
||||
initialization. If it is a OpenGLTexture, its texture ID can be requested using the
|
||||
textureIdForBuffer() function. The dimensions of the buffer are given by \a bufferSize.
|
||||
|
||||
The items provided by the cache are identified in the \a itemIds vector. The
|
||||
\a positionsInBuffer vector contains the locations inside the buffer of each item. Each entry in
|
||||
The items provided by the cache are identified in the \a itemIds list. The
|
||||
\a positionsInBuffer list contains the locations inside the buffer of each item. Each entry in
|
||||
\a positionsInBuffer corresponds to an item in \a itemIds.
|
||||
|
||||
The buffer and the items' locations within the buffer can be considered valid until an
|
||||
@ -179,7 +179,7 @@ QT_BEGIN_NAMESPACE
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void QPlatformSharedGraphicsCache::itemsUpdated(const QByteArray &cacheId, void *bufferId, const QVector<quint32> &itemIds, const QVector<QPoint> &positionsInBuffer)
|
||||
\fn void QPlatformSharedGraphicsCache::itemsUpdated(const QByteArray &cacheId, void *bufferId, const QList<quint32> &itemIds, const QList<QPoint> &positionsInBuffer)
|
||||
|
||||
This signal is similar in usage to the itemsAvailable() signal, but will be emitted when
|
||||
the location of a previously requested or inserted item has been updated. The application
|
||||
@ -194,7 +194,7 @@ QT_BEGIN_NAMESPACE
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void QPlatformSharedGraphicsCache::itemsInvalidated(const QByteArray &cacheId, const QVector<quint32> &itemIds)
|
||||
\fn void QPlatformSharedGraphicsCache::itemsInvalidated(const QByteArray &cacheId, const QList<quint32> &itemIds)
|
||||
|
||||
This signal is emitted when the items given by \a itemIds in the cache named \a cacheId have
|
||||
been removed from the cache and the previously reported information about them is considered
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include "qkeysequence.h"
|
||||
#include "qdebug.h"
|
||||
#include "qevent.h"
|
||||
#include "qvector.h"
|
||||
#include "qlist.h"
|
||||
#include "qcoreapplication.h"
|
||||
#include <private/qkeymapper_p.h>
|
||||
#include <QtCore/qloggingcategory.h>
|
||||
@ -122,15 +122,15 @@ public:
|
||||
}
|
||||
QShortcutMap *q_ptr; // Private's parent
|
||||
|
||||
QVector<QShortcutEntry> sequences; // All sequences!
|
||||
QList<QShortcutEntry> sequences; // All sequences!
|
||||
|
||||
int currentId; // Global shortcut ID number
|
||||
int ambigCount; // Index of last enabled ambiguous dispatch
|
||||
QKeySequence::SequenceMatch currentState;
|
||||
QVector<QKeySequence> currentSequences; // Sequence for the current state
|
||||
QVector<QKeySequence> newEntries;
|
||||
QList<QKeySequence> currentSequences; // Sequence for the current state
|
||||
QList<QKeySequence> newEntries;
|
||||
QKeySequence prevSequence; // Sequence for the previous identical match
|
||||
QVector<const QShortcutEntry*> identicals; // Last identical matches
|
||||
QList<const QShortcutEntry*> identicals; // Last identical matches
|
||||
};
|
||||
|
||||
|
||||
@ -413,7 +413,7 @@ bool QShortcutMap::hasShortcutForKeySequence(const QKeySequence &seq) const
|
||||
/*! \internal
|
||||
Returns the next state of the statemachine, based
|
||||
on the new key event \a e.
|
||||
Matches are appended to the vector of identicals,
|
||||
Matches are appended to the list of identicals,
|
||||
which can be access through matches().
|
||||
\sa matches
|
||||
*/
|
||||
@ -438,7 +438,7 @@ QKeySequence::SequenceMatch QShortcutMap::find(QKeyEvent *e, int ignoredModifier
|
||||
|
||||
bool partialFound = false;
|
||||
bool identicalDisabledFound = false;
|
||||
QVector<QKeySequence> okEntries;
|
||||
QList<QKeySequence> okEntries;
|
||||
int result = QKeySequence::NoMatch;
|
||||
for (int i = d->newEntries.count()-1; i >= 0 ; --i) {
|
||||
QShortcutEntry entry(d->newEntries.at(i)); // needed for searching
|
||||
@ -506,7 +506,7 @@ QKeySequence::SequenceMatch QShortcutMap::find(QKeyEvent *e, int ignoredModifier
|
||||
Same as doing (the slower)
|
||||
\snippet code/src_gui_kernel_qshortcutmap.cpp 0
|
||||
*/
|
||||
void QShortcutMap::clearSequence(QVector<QKeySequence> &ksl)
|
||||
void QShortcutMap::clearSequence(QList<QKeySequence> &ksl)
|
||||
{
|
||||
ksl.clear();
|
||||
d_func()->newEntries.clear();
|
||||
@ -516,7 +516,7 @@ void QShortcutMap::clearSequence(QVector<QKeySequence> &ksl)
|
||||
Alters \a seq to the new sequence state, based on the
|
||||
current sequence state, and the new key event \a e.
|
||||
*/
|
||||
void QShortcutMap::createNewSequences(QKeyEvent *e, QVector<QKeySequence> &ksl, int ignoredModifiers)
|
||||
void QShortcutMap::createNewSequences(QKeyEvent *e, QList<QKeySequence> &ksl, int ignoredModifiers)
|
||||
{
|
||||
Q_D(QShortcutMap);
|
||||
QList<int> possibleKeys = QKeyMapper::possibleKeys(e);
|
||||
@ -605,9 +605,9 @@ int QShortcutMap::translateModifiers(Qt::KeyboardModifiers modifiers)
|
||||
}
|
||||
|
||||
/*! \internal
|
||||
Returns the vector of QShortcutEntry's matching the last Identical state.
|
||||
Returns the list of QShortcutEntry's matching the last Identical state.
|
||||
*/
|
||||
QVector<const QShortcutEntry*> QShortcutMap::matches() const
|
||||
QList<const QShortcutEntry*> QShortcutMap::matches() const
|
||||
{
|
||||
Q_D(const QShortcutMap);
|
||||
return d->identicals;
|
||||
@ -630,7 +630,7 @@ void QShortcutMap::dispatchEvent(QKeyEvent *e)
|
||||
// Find next
|
||||
const QShortcutEntry *current = nullptr, *next = nullptr;
|
||||
int i = 0, enabledShortcuts = 0;
|
||||
QVector<const QShortcutEntry*> ambiguousShortcuts;
|
||||
QList<const QShortcutEntry*> ambiguousShortcuts;
|
||||
while(i < d->identicals.size()) {
|
||||
current = d->identicals.at(i);
|
||||
if (current->enabled || !next){
|
||||
|
@ -40,10 +40,8 @@
|
||||
#include "qbezier_p.h"
|
||||
#include <qdebug.h>
|
||||
#include <qline.h>
|
||||
#include <qpolygon.h>
|
||||
#include <qvector.h>
|
||||
#include <qlist.h>
|
||||
#include <qmath.h>
|
||||
#include <qpolygon.h>
|
||||
|
||||
#include <private/qnumeric_p.h>
|
||||
|
||||
|
@ -1071,7 +1071,7 @@ QDataStream &operator<<(QDataStream &s, const QBrush &b)
|
||||
// ensure that we write doubles here instead of streaming the stops
|
||||
// directly; otherwise, platforms that redefine qreal might generate
|
||||
// data that cannot be read on other platforms.
|
||||
QVector<QGradientStop> stops = gradient->stops();
|
||||
QList<QGradientStop> stops = gradient->stops();
|
||||
s << quint32(stops.size());
|
||||
for (int i = 0; i < stops.size(); ++i) {
|
||||
const QGradientStop &stop = stops.at(i);
|
||||
@ -2364,7 +2364,7 @@ void QConicalGradient::setAngle(qreal angle)
|
||||
\typedef QGradientStops
|
||||
\relates QGradient
|
||||
|
||||
Typedef for QVector<QGradientStop>.
|
||||
Typedef for QList<QGradientStop>.
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
@ -249,7 +249,7 @@ void QCosmeticStroker::setup()
|
||||
if (state->renderHints & QPainter::Antialiasing)
|
||||
strokeSelection |= AntiAliased;
|
||||
|
||||
const QVector<qreal> &penPattern = state->lastPen.dashPattern();
|
||||
const QList<qreal> &penPattern = state->lastPen.dashPattern();
|
||||
if (penPattern.isEmpty()) {
|
||||
Q_ASSERT(!pattern && !reversePattern);
|
||||
pattern = nullptr;
|
||||
|
@ -1583,7 +1583,7 @@ static void QT_FASTCALL fetchTransformedBilinear_simple_scale_helper(uint *b, ui
|
||||
int &fx, int &fy, int fdx, int /*fdy*/)
|
||||
{
|
||||
const QPixelLayout *layout = &qPixelLayouts[image.format];
|
||||
const QVector<QRgb> *clut = image.colorTable;
|
||||
const QList<QRgb> *clut = image.colorTable;
|
||||
const FetchAndConvertPixelsFunc fetch = layout->fetchToARGB32PM;
|
||||
|
||||
int y1 = (fy >> 16);
|
||||
@ -1890,7 +1890,7 @@ static const uint *QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Oper
|
||||
const QSpanData *data, int y, int x, int length)
|
||||
{
|
||||
const QPixelLayout *layout = &qPixelLayouts[data->texture.format];
|
||||
const QVector<QRgb> *clut = data->texture.colorTable;
|
||||
const QList<QRgb> *clut = data->texture.colorTable;
|
||||
Q_ASSERT(bpp == QPixelLayout::BPPNone || layout->bpp == bpp);
|
||||
|
||||
const qreal cx = x + qreal(0.5);
|
||||
@ -2038,7 +2038,7 @@ static const QRgba64 *QT_FASTCALL fetchTransformedBilinear64_uint32(QRgba64 *buf
|
||||
int y, int x, int length)
|
||||
{
|
||||
const QPixelLayout *layout = &qPixelLayouts[data->texture.format];
|
||||
const QVector<QRgb> *clut = data->texture.colorTable;
|
||||
const QList<QRgb> *clut = data->texture.colorTable;
|
||||
|
||||
const qreal cx = x + qreal(0.5);
|
||||
const qreal cy = y + qreal(0.5);
|
||||
@ -5103,7 +5103,7 @@ decltype(qt_memfill64_sse2) *qt_memfill64 = nullptr;
|
||||
#endif
|
||||
|
||||
#ifdef QT_COMPILER_SUPPORTS_SSE4_1
|
||||
template<QtPixelOrder> void QT_FASTCALL storeA2RGB30PMFromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count, const QVector<QRgb> *, QDitherInfo *);
|
||||
template<QtPixelOrder> void QT_FASTCALL storeA2RGB30PMFromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count, const QList<QRgb> *, QDitherInfo *);
|
||||
#endif
|
||||
|
||||
extern void qInitBlendFunctions();
|
||||
@ -5193,30 +5193,30 @@ static void qInitDrawhelperFunctions()
|
||||
|
||||
#if defined(QT_COMPILER_SUPPORTS_SSE4_1)
|
||||
if (qCpuHasFeature(SSE4_1)) {
|
||||
extern void QT_FASTCALL convertARGB32ToARGB32PM_sse4(uint *buffer, int count, const QVector<QRgb> *);
|
||||
extern void QT_FASTCALL convertRGBA8888ToARGB32PM_sse4(uint *buffer, int count, const QVector<QRgb> *);
|
||||
extern void QT_FASTCALL convertARGB32ToARGB32PM_sse4(uint *buffer, int count, const QList<QRgb> *);
|
||||
extern void QT_FASTCALL convertRGBA8888ToARGB32PM_sse4(uint *buffer, int count, const QList<QRgb> *);
|
||||
extern const uint *QT_FASTCALL fetchARGB32ToARGB32PM_sse4(uint *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
extern const uint *QT_FASTCALL fetchRGBA8888ToARGB32PM_sse4(uint *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
extern const QRgba64 * QT_FASTCALL convertARGB32ToRGBA64PM_sse4(QRgba64 *buffer, const uint *src, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
extern const QRgba64 * QT_FASTCALL convertRGBA8888ToRGBA64PM_sse4(QRgba64 *buffer, const uint *src, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
extern const QRgba64 *QT_FASTCALL fetchARGB32ToRGBA64PM_sse4(QRgba64 *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
extern const QRgba64 *QT_FASTCALL fetchRGBA8888ToRGBA64PM_sse4(QRgba64 *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
extern void QT_FASTCALL storeARGB32FromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
extern void QT_FASTCALL storeRGBA8888FromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
extern void QT_FASTCALL storeRGBXFromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
extern void QT_FASTCALL storeARGB32FromRGBA64PM_sse4(uchar *dest, const QRgba64 *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
extern void QT_FASTCALL storeRGBA8888FromRGBA64PM_sse4(uchar *dest, const QRgba64 *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
extern void QT_FASTCALL destStore64ARGB32_sse4(QRasterBuffer *rasterBuffer, int x, int y, const QRgba64 *buffer, int length);
|
||||
extern void QT_FASTCALL destStore64RGBA8888_sse4(QRasterBuffer *rasterBuffer, int x, int y, const QRgba64 *buffer, int length);
|
||||
# ifndef __AVX2__
|
||||
@ -5290,22 +5290,22 @@ static void qInitDrawhelperFunctions()
|
||||
bilinearFastTransformHelperARGB32PM[0][DownscaleTransform] = fetchTransformedBilinearARGB32PM_downscale_helper_avx2;
|
||||
bilinearFastTransformHelperARGB32PM[0][FastRotateTransform] = fetchTransformedBilinearARGB32PM_fast_rotate_helper_avx2;
|
||||
|
||||
extern void QT_FASTCALL convertARGB32ToARGB32PM_avx2(uint *buffer, int count, const QVector<QRgb> *);
|
||||
extern void QT_FASTCALL convertRGBA8888ToARGB32PM_avx2(uint *buffer, int count, const QVector<QRgb> *);
|
||||
extern void QT_FASTCALL convertARGB32ToARGB32PM_avx2(uint *buffer, int count, const QList<QRgb> *);
|
||||
extern void QT_FASTCALL convertRGBA8888ToARGB32PM_avx2(uint *buffer, int count, const QList<QRgb> *);
|
||||
extern const uint *QT_FASTCALL fetchARGB32ToARGB32PM_avx2(uint *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
extern const uint *QT_FASTCALL fetchRGBA8888ToARGB32PM_avx2(uint *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
qPixelLayouts[QImage::Format_ARGB32].fetchToARGB32PM = fetchARGB32ToARGB32PM_avx2;
|
||||
qPixelLayouts[QImage::Format_ARGB32].convertToARGB32PM = convertARGB32ToARGB32PM_avx2;
|
||||
qPixelLayouts[QImage::Format_RGBA8888].fetchToARGB32PM = fetchRGBA8888ToARGB32PM_avx2;
|
||||
qPixelLayouts[QImage::Format_RGBA8888].convertToARGB32PM = convertRGBA8888ToARGB32PM_avx2;
|
||||
|
||||
#if QT_CONFIG(raster_64bit)
|
||||
extern const QRgba64 * QT_FASTCALL convertARGB32ToRGBA64PM_avx2(QRgba64 *, const uint *, int, const QVector<QRgb> *, QDitherInfo *);
|
||||
extern const QRgba64 * QT_FASTCALL convertRGBA8888ToRGBA64PM_avx2(QRgba64 *, const uint *, int count, const QVector<QRgb> *, QDitherInfo *);
|
||||
extern const QRgba64 *QT_FASTCALL fetchARGB32ToRGBA64PM_avx2(QRgba64 *, const uchar *, int, int, const QVector<QRgb> *, QDitherInfo *);
|
||||
extern const QRgba64 *QT_FASTCALL fetchRGBA8888ToRGBA64PM_avx2(QRgba64 *, const uchar *, int, int, const QVector<QRgb> *, QDitherInfo *);
|
||||
extern const QRgba64 * QT_FASTCALL convertARGB32ToRGBA64PM_avx2(QRgba64 *, const uint *, int, const QList<QRgb> *, QDitherInfo *);
|
||||
extern const QRgba64 * QT_FASTCALL convertRGBA8888ToRGBA64PM_avx2(QRgba64 *, const uint *, int count, const QList<QRgb> *, QDitherInfo *);
|
||||
extern const QRgba64 *QT_FASTCALL fetchARGB32ToRGBA64PM_avx2(QRgba64 *, const uchar *, int, int, const QList<QRgb> *, QDitherInfo *);
|
||||
extern const QRgba64 *QT_FASTCALL fetchRGBA8888ToRGBA64PM_avx2(QRgba64 *, const uchar *, int, int, const QList<QRgb> *, QDitherInfo *);
|
||||
qPixelLayouts[QImage::Format_ARGB32].convertToRGBA64PM = convertARGB32ToRGBA64PM_avx2;
|
||||
qPixelLayouts[QImage::Format_RGBX8888].convertToRGBA64PM = convertRGBA8888ToRGBA64PM_avx2;
|
||||
qPixelLayouts[QImage::Format_ARGB32].fetchToRGBA64PM = fetchARGB32ToRGBA64PM_avx2;
|
||||
@ -5340,26 +5340,26 @@ static void qInitDrawhelperFunctions()
|
||||
sourceFetchUntransformed[QImage::Format_RGB888] = qt_fetchUntransformed_888_neon;
|
||||
|
||||
#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
|
||||
extern void QT_FASTCALL convertARGB32ToARGB32PM_neon(uint *buffer, int count, const QVector<QRgb> *);
|
||||
extern void QT_FASTCALL convertRGBA8888ToARGB32PM_neon(uint *buffer, int count, const QVector<QRgb> *);
|
||||
extern void QT_FASTCALL convertARGB32ToARGB32PM_neon(uint *buffer, int count, const QList<QRgb> *);
|
||||
extern void QT_FASTCALL convertRGBA8888ToARGB32PM_neon(uint *buffer, int count, const QList<QRgb> *);
|
||||
extern const uint *QT_FASTCALL fetchARGB32ToARGB32PM_neon(uint *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
extern const uint *QT_FASTCALL fetchRGBA8888ToARGB32PM_neon(uint *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
extern const QRgba64 * QT_FASTCALL convertARGB32ToRGBA64PM_neon(QRgba64 *buffer, const uint *src, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
extern const QRgba64 * QT_FASTCALL convertRGBA8888ToRGBA64PM_neon(QRgba64 *buffer, const uint *src, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
extern const QRgba64 *QT_FASTCALL fetchARGB32ToRGBA64PM_neon(QRgba64 *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
extern const QRgba64 *QT_FASTCALL fetchRGBA8888ToRGBA64PM_neon(QRgba64 *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
extern void QT_FASTCALL storeARGB32FromARGB32PM_neon(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
extern void QT_FASTCALL storeRGBA8888FromARGB32PM_neon(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
extern void QT_FASTCALL storeRGBXFromARGB32PM_neon(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
qPixelLayouts[QImage::Format_ARGB32].fetchToARGB32PM = fetchARGB32ToARGB32PM_neon;
|
||||
qPixelLayouts[QImage::Format_ARGB32].convertToARGB32PM = convertARGB32ToARGB32PM_neon;
|
||||
qPixelLayouts[QImage::Format_ARGB32].storeFromARGB32PM = storeARGB32FromARGB32PM_neon;
|
||||
|
@ -1089,25 +1089,25 @@ static void convertARGBToARGB32PM_avx2(uint *buffer, const uint *src, qsizetype
|
||||
}
|
||||
}
|
||||
|
||||
void QT_FASTCALL convertARGB32ToARGB32PM_avx2(uint *buffer, int count, const QVector<QRgb> *)
|
||||
void QT_FASTCALL convertARGB32ToARGB32PM_avx2(uint *buffer, int count, const QList<QRgb> *)
|
||||
{
|
||||
convertARGBToARGB32PM_avx2<false>(buffer, buffer, count);
|
||||
}
|
||||
|
||||
void QT_FASTCALL convertRGBA8888ToARGB32PM_avx2(uint *buffer, int count, const QVector<QRgb> *)
|
||||
void QT_FASTCALL convertRGBA8888ToARGB32PM_avx2(uint *buffer, int count, const QList<QRgb> *)
|
||||
{
|
||||
convertARGBToARGB32PM_avx2<true>(buffer, buffer, count);
|
||||
}
|
||||
|
||||
const uint *QT_FASTCALL fetchARGB32ToARGB32PM_avx2(uint *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
convertARGBToARGB32PM_avx2<false>(buffer, reinterpret_cast<const uint *>(src) + index, count);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
const uint *QT_FASTCALL fetchRGBA8888ToARGB32PM_avx2(uint *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
convertARGBToARGB32PM_avx2<true>(buffer, reinterpret_cast<const uint *>(src) + index, count);
|
||||
return buffer;
|
||||
@ -1202,28 +1202,28 @@ static void convertARGBToRGBA64PM_avx2(QRgba64 *buffer, const uint *src, qsizety
|
||||
}
|
||||
|
||||
const QRgba64 * QT_FASTCALL convertARGB32ToRGBA64PM_avx2(QRgba64 *buffer, const uint *src, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
convertARGBToRGBA64PM_avx2<false>(buffer, src, count);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
const QRgba64 * QT_FASTCALL convertRGBA8888ToRGBA64PM_avx2(QRgba64 *buffer, const uint *src, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
convertARGBToRGBA64PM_avx2<true>(buffer, src, count);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
const QRgba64 *QT_FASTCALL fetchARGB32ToRGBA64PM_avx2(QRgba64 *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
convertARGBToRGBA64PM_avx2<false>(buffer, reinterpret_cast<const uint *>(src) + index, count);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
const QRgba64 *QT_FASTCALL fetchRGBA8888ToRGBA64PM_avx2(QRgba64 *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
convertARGBToRGBA64PM_avx2<true>(buffer, reinterpret_cast<const uint *>(src) + index, count);
|
||||
return buffer;
|
||||
|
@ -1312,81 +1312,81 @@ static inline void convertARGBFromARGB32PM_neon(uint *buffer, const uint *src, i
|
||||
}
|
||||
}
|
||||
|
||||
void QT_FASTCALL convertARGB32ToARGB32PM_neon(uint *buffer, int count, const QVector<QRgb> *)
|
||||
void QT_FASTCALL convertARGB32ToARGB32PM_neon(uint *buffer, int count, const QList<QRgb> *)
|
||||
{
|
||||
convertARGBToARGB32PM_neon<false>(buffer, buffer, count);
|
||||
}
|
||||
|
||||
void QT_FASTCALL convertRGBA8888ToARGB32PM_neon(uint *buffer, int count, const QVector<QRgb> *)
|
||||
void QT_FASTCALL convertRGBA8888ToARGB32PM_neon(uint *buffer, int count, const QList<QRgb> *)
|
||||
{
|
||||
convertARGBToARGB32PM_neon<true>(buffer, buffer, count);
|
||||
}
|
||||
|
||||
const uint *QT_FASTCALL fetchARGB32ToARGB32PM_neon(uint *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
convertARGBToARGB32PM_neon<false>(buffer, reinterpret_cast<const uint *>(src) + index, count);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
const uint *QT_FASTCALL fetchRGBA8888ToARGB32PM_neon(uint *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
convertARGBToARGB32PM_neon<true>(buffer, reinterpret_cast<const uint *>(src) + index, count);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
const QRgba64 * QT_FASTCALL convertARGB32ToRGBA64PM_neon(QRgba64 *buffer, const uint *src, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
convertARGB32ToRGBA64PM_neon<false>(buffer, src, count);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
const QRgba64 * QT_FASTCALL convertRGBA8888ToRGBA64PM_neon(QRgba64 *buffer, const uint *src, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
convertARGB32ToRGBA64PM_neon<true>(buffer, src, count);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
const QRgba64 *QT_FASTCALL fetchARGB32ToRGBA64PM_neon(QRgba64 *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
convertARGB32ToRGBA64PM_neon<false>(buffer, reinterpret_cast<const uint *>(src) + index, count);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
const QRgba64 *QT_FASTCALL fetchRGBA8888ToRGBA64PM_neon(QRgba64 *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
convertARGB32ToRGBA64PM_neon<true>(buffer, reinterpret_cast<const uint *>(src) + index, count);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
void QT_FASTCALL storeRGB32FromARGB32PM_neon(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
uint *d = reinterpret_cast<uint *>(dest) + index;
|
||||
convertARGBFromARGB32PM_neon<false,true>(d, src, count);
|
||||
}
|
||||
|
||||
void QT_FASTCALL storeARGB32FromARGB32PM_neon(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
uint *d = reinterpret_cast<uint *>(dest) + index;
|
||||
convertARGBFromARGB32PM_neon<false,false>(d, src, count);
|
||||
}
|
||||
|
||||
void QT_FASTCALL storeRGBA8888FromARGB32PM_neon(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
uint *d = reinterpret_cast<uint *>(dest) + index;
|
||||
convertARGBFromARGB32PM_neon<true,false>(d, src, count);
|
||||
}
|
||||
|
||||
void QT_FASTCALL storeRGBXFromARGB32PM_neon(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
uint *d = reinterpret_cast<uint *>(dest) + index;
|
||||
convertARGBFromARGB32PM_neon<true,true>(d, src, count);
|
||||
|
@ -328,53 +328,53 @@ static inline void convertARGBFromRGBA64PM_sse4(uint *buffer, const QRgba64 *src
|
||||
}
|
||||
|
||||
#ifndef __AVX2__
|
||||
void QT_FASTCALL convertARGB32ToARGB32PM_sse4(uint *buffer, int count, const QVector<QRgb> *)
|
||||
void QT_FASTCALL convertARGB32ToARGB32PM_sse4(uint *buffer, int count, const QList<QRgb> *)
|
||||
{
|
||||
convertARGBToARGB32PM_sse4<false>(buffer, buffer, count);
|
||||
}
|
||||
|
||||
void QT_FASTCALL convertRGBA8888ToARGB32PM_sse4(uint *buffer, int count, const QVector<QRgb> *)
|
||||
void QT_FASTCALL convertRGBA8888ToARGB32PM_sse4(uint *buffer, int count, const QList<QRgb> *)
|
||||
{
|
||||
convertARGBToARGB32PM_sse4<true>(buffer, buffer, count);
|
||||
}
|
||||
|
||||
const QRgba64 * QT_FASTCALL convertARGB32ToRGBA64PM_sse4(QRgba64 *buffer, const uint *src, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
convertARGBToRGBA64PM_sse4<false>(buffer, src, count);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
const QRgba64 * QT_FASTCALL convertRGBA8888ToRGBA64PM_sse4(QRgba64 *buffer, const uint *src, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
convertARGBToRGBA64PM_sse4<true>(buffer, src, count);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
const uint *QT_FASTCALL fetchARGB32ToARGB32PM_sse4(uint *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
convertARGBToARGB32PM_sse4<false>(buffer, reinterpret_cast<const uint *>(src) + index, count);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
const uint *QT_FASTCALL fetchRGBA8888ToARGB32PM_sse4(uint *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
convertARGBToARGB32PM_sse4<true>(buffer, reinterpret_cast<const uint *>(src) + index, count);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
const QRgba64 *QT_FASTCALL fetchARGB32ToRGBA64PM_sse4(QRgba64 *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
convertARGBToRGBA64PM_sse4<false>(buffer, reinterpret_cast<const uint *>(src) + index, count);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
const QRgba64 *QT_FASTCALL fetchRGBA8888ToRGBA64PM_sse4(QRgba64 *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
convertARGBToRGBA64PM_sse4<true>(buffer, reinterpret_cast<const uint *>(src) + index, count);
|
||||
return buffer;
|
||||
@ -382,28 +382,28 @@ const QRgba64 *QT_FASTCALL fetchRGBA8888ToRGBA64PM_sse4(QRgba64 *buffer, const u
|
||||
#endif // __AVX2__
|
||||
|
||||
void QT_FASTCALL storeRGB32FromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
uint *d = reinterpret_cast<uint *>(dest) + index;
|
||||
convertARGBFromARGB32PM_sse4<false,true>(d, src, count);
|
||||
}
|
||||
|
||||
void QT_FASTCALL storeARGB32FromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
uint *d = reinterpret_cast<uint *>(dest) + index;
|
||||
convertARGBFromARGB32PM_sse4<false,false>(d, src, count);
|
||||
}
|
||||
|
||||
void QT_FASTCALL storeRGBA8888FromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
uint *d = reinterpret_cast<uint *>(dest) + index;
|
||||
convertARGBFromARGB32PM_sse4<true,false>(d, src, count);
|
||||
}
|
||||
|
||||
void QT_FASTCALL storeRGBXFromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
uint *d = reinterpret_cast<uint *>(dest) + index;
|
||||
convertARGBFromARGB32PM_sse4<true,true>(d, src, count);
|
||||
@ -411,7 +411,7 @@ void QT_FASTCALL storeRGBXFromARGB32PM_sse4(uchar *dest, const uint *src, int in
|
||||
|
||||
template<QtPixelOrder PixelOrder>
|
||||
void QT_FASTCALL storeA2RGB30PMFromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
uint *d = reinterpret_cast<uint *>(dest) + index;
|
||||
for (int i = 0; i < count; ++i)
|
||||
@ -433,14 +433,14 @@ void QT_FASTCALL destStore64RGBA8888_sse4(QRasterBuffer *rasterBuffer, int x, in
|
||||
#endif
|
||||
|
||||
void QT_FASTCALL storeARGB32FromRGBA64PM_sse4(uchar *dest, const QRgba64 *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
uint *d = (uint*)dest + index;
|
||||
convertARGBFromRGBA64PM_sse4<false>(d, src, count);
|
||||
}
|
||||
|
||||
void QT_FASTCALL storeRGBA8888FromRGBA64PM_sse4(uchar *dest, const QRgba64 *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
uint *d = (uint*)dest + index;
|
||||
convertARGBFromRGBA64PM_sse4<true>(d, src, count);
|
||||
@ -448,10 +448,10 @@ void QT_FASTCALL storeRGBA8888FromRGBA64PM_sse4(uchar *dest, const QRgba64 *src,
|
||||
|
||||
template
|
||||
void QT_FASTCALL storeA2RGB30PMFromARGB32PM_sse4<PixelOrderBGR>(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
template
|
||||
void QT_FASTCALL storeA2RGB30PMFromARGB32PM_sse4<PixelOrderRGB>(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *);
|
||||
const QList<QRgb> *, QDitherInfo *);
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -478,7 +478,7 @@ bool parseTRC(const QByteArray &data, const TagEntry &tagEntry, QColorTrc &gamma
|
||||
gamma.m_type = QColorTrc::Type::Function;
|
||||
gamma.m_fun = QColorTransferFunction::fromGamma(g);
|
||||
} else {
|
||||
QVector<quint16> tabl;
|
||||
QList<quint16> tabl;
|
||||
tabl.resize(curv->valueCount);
|
||||
for (uint i = 0; i < curv->valueCount; ++i)
|
||||
tabl[i] = curv->value[i];
|
||||
|
@ -1667,7 +1667,7 @@ void QRasterPaintEngine::stroke(const QVectorPath &path, const QPen &pen)
|
||||
qreal dashOffset = s->lastPen.dashOffset();
|
||||
bool inDash = true;
|
||||
qreal patternLength = 0;
|
||||
const QVector<qreal> pattern = s->lastPen.dashPattern();
|
||||
const QList<qreal> pattern = s->lastPen.dashPattern();
|
||||
for (int i = 0; i < pattern.size(); ++i)
|
||||
patternLength += pattern.at(i);
|
||||
|
||||
@ -1888,14 +1888,14 @@ static inline bool isAbove(const QPointF *a, const QPointF *b)
|
||||
return a->y() < b->y();
|
||||
}
|
||||
|
||||
static bool splitPolygon(const QPointF *points, int pointCount, QVector<QPointF> *upper, QVector<QPointF> *lower)
|
||||
static bool splitPolygon(const QPointF *points, int pointCount, QList<QPointF> *upper, QList<QPointF> *lower)
|
||||
{
|
||||
Q_ASSERT(upper);
|
||||
Q_ASSERT(lower);
|
||||
|
||||
Q_ASSERT(pointCount >= 2);
|
||||
|
||||
QVector<const QPointF *> sorted;
|
||||
QList<const QPointF *> sorted;
|
||||
sorted.reserve(pointCount);
|
||||
|
||||
upper->reserve(pointCount * 3 / 4);
|
||||
@ -1911,7 +1911,7 @@ static bool splitPolygon(const QPointF *points, int pointCount, QVector<QPointF>
|
||||
const QPointF *end = points + pointCount;
|
||||
const QPointF *last = end - 1;
|
||||
|
||||
QVector<QPointF> *bin[2] = { upper, lower };
|
||||
QList<QPointF> *bin[2] = { upper, lower };
|
||||
|
||||
for (const QPointF *p = points; p < end; ++p) {
|
||||
int side = p->y() < splitY;
|
||||
@ -1952,7 +1952,7 @@ void QRasterPaintEngine::fillPolygon(const QPointF *points, int pointCount, Poly
|
||||
|
||||
// max amount of points that raster engine can reliably handle
|
||||
if (pointCount > maxPoints) {
|
||||
QVector<QPointF> upper, lower;
|
||||
QList<QPointF> upper, lower;
|
||||
|
||||
if (splitPolygon(points, pointCount, &upper, &lower)) {
|
||||
fillPolygon(upper.constData(), upper.size(), mode);
|
||||
@ -3289,7 +3289,7 @@ void QRasterPaintEnginePrivate::rasterizeLine_dashed(QLineF line,
|
||||
|
||||
const QPen &pen = s->lastPen;
|
||||
const bool squareCap = (pen.capStyle() == Qt::SquareCap);
|
||||
const QVector<qreal> pattern = pen.dashPattern();
|
||||
const QList<qreal> pattern = pen.dashPattern();
|
||||
|
||||
qreal patternLength = 0;
|
||||
for (int i = 0; i < pattern.size(); ++i)
|
||||
@ -3831,7 +3831,7 @@ QImage::Format QRasterBuffer::prepare(QImage *image)
|
||||
format = image->format();
|
||||
if (image->depth() == 1 && image->colorTable().size() == 2) {
|
||||
monoDestinationWithClut = true;
|
||||
const QVector<QRgb> colorTable = image->colorTable();
|
||||
const QList<QRgb> colorTable = image->colorTable();
|
||||
destColor0 = qPremultiply(colorTable[0]);
|
||||
destColor1 = qPremultiply(colorTable[1]);
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ void QPaintEngineExPrivate::replayClipOperations()
|
||||
if (!p || !p->d_ptr)
|
||||
return;
|
||||
|
||||
const QVector<QPainterClipInfo> &clipInfo = p->d_ptr->state->clipInfo;
|
||||
const QList<QPainterClipInfo> &clipInfo = p->d_ptr->state->clipInfo;
|
||||
|
||||
QTransform transform = q->state()->matrix;
|
||||
|
||||
|
@ -3412,14 +3412,14 @@ void QPainter::drawRects(const QRect *rects, int rectCount)
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn void QPainter::drawRects(const QVector<QRectF> &rectangles)
|
||||
\fn void QPainter::drawRects(const QList<QRectF> &rectangles)
|
||||
\overload
|
||||
|
||||
Draws the given \a rectangles using the current pen and brush.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void QPainter::drawRects(const QVector<QRect> &rectangles)
|
||||
\fn void QPainter::drawRects(const QList<QRect> &rectangles)
|
||||
|
||||
\overload
|
||||
|
||||
@ -4421,7 +4421,7 @@ void QPainter::drawLines(const QPoint *pointPairs, int lineCount)
|
||||
|
||||
|
||||
/*!
|
||||
\fn void QPainter::drawLines(const QVector<QPointF> &pointPairs)
|
||||
\fn void QPainter::drawLines(const QList<QPointF> &pointPairs)
|
||||
\overload
|
||||
|
||||
Draws a line for each pair of points in the vector \a pointPairs
|
||||
@ -4430,7 +4430,7 @@ void QPainter::drawLines(const QPoint *pointPairs, int lineCount)
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void QPainter::drawLines(const QVector<QPoint> &pointPairs)
|
||||
\fn void QPainter::drawLines(const QList<QPoint> &pointPairs)
|
||||
\overload
|
||||
|
||||
Draws a line for each pair of points in the vector \a pointPairs
|
||||
@ -4438,7 +4438,7 @@ void QPainter::drawLines(const QPoint *pointPairs, int lineCount)
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void QPainter::drawLines(const QVector<QLineF> &lines)
|
||||
\fn void QPainter::drawLines(const QList<QLineF> &lines)
|
||||
\overload
|
||||
|
||||
Draws the set of lines defined by the list \a lines using the
|
||||
@ -4446,7 +4446,7 @@ void QPainter::drawLines(const QPoint *pointPairs, int lineCount)
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void QPainter::drawLines(const QVector<QLine> &lines)
|
||||
\fn void QPainter::drawLines(const QList<QLine> &lines)
|
||||
\overload
|
||||
|
||||
Draws the set of lines defined by the list \a lines using the
|
||||
@ -7198,7 +7198,7 @@ start_lengthVariant:
|
||||
}
|
||||
}
|
||||
|
||||
QVector<QTextLayout::FormatRange> underlineFormats;
|
||||
QList<QTextLayout::FormatRange> underlineFormats;
|
||||
int length = offset - old_offset;
|
||||
if ((hidemnmemonic || showmnemonic) && maxUnderlines > 0) {
|
||||
QChar *cout = text.data() + old_offset;
|
||||
|
@ -668,7 +668,7 @@ void QPainterPath::clear()
|
||||
|
||||
Attempts to allocate memory for at least \a size elements.
|
||||
|
||||
\sa clear(), capacity(), QVector::reserve()
|
||||
\sa clear(), capacity(), QList::reserve()
|
||||
\since 5.13
|
||||
*/
|
||||
void QPainterPath::reserve(int size)
|
||||
@ -1692,7 +1692,7 @@ QList<QPolygonF> QPainterPath::toFillPolygons(const QTransform &matrix) const
|
||||
if (count == 0)
|
||||
return polys;
|
||||
|
||||
QVector<QRectF> bounds;
|
||||
QList<QRectF> bounds;
|
||||
bounds.reserve(count);
|
||||
for (int i=0; i<count; ++i)
|
||||
bounds += subpaths.at(i).boundingRect();
|
||||
@ -1703,7 +1703,7 @@ QList<QPolygonF> QPainterPath::toFillPolygons(const QTransform &matrix) const
|
||||
qDebug() << " bounds" << i << bounds.at(i);
|
||||
#endif
|
||||
|
||||
QVector< QVector<int> > isects;
|
||||
QList< QList<int> > isects;
|
||||
isects.resize(count);
|
||||
|
||||
// find all intersections
|
||||
@ -1731,12 +1731,12 @@ QList<QPolygonF> QPainterPath::toFillPolygons(const QTransform &matrix) const
|
||||
|
||||
// flatten the sets of intersections
|
||||
for (int i=0; i<count; ++i) {
|
||||
const QVector<int> ¤t_isects = isects.at(i);
|
||||
const QList<int> ¤t_isects = isects.at(i);
|
||||
for (int j=0; j<current_isects.size(); ++j) {
|
||||
int isect_j = current_isects.at(j);
|
||||
if (isect_j == i)
|
||||
continue;
|
||||
const QVector<int> &isects_j = isects.at(isect_j);
|
||||
const QList<int> &isects_j = isects.at(isect_j);
|
||||
for (int k = 0, size = isects_j.size(); k < size; ++k) {
|
||||
int isect_k = isects_j.at(k);
|
||||
if (isect_k != i && !isects.at(i).contains(isect_k)) {
|
||||
@ -1760,7 +1760,7 @@ QList<QPolygonF> QPainterPath::toFillPolygons(const QTransform &matrix) const
|
||||
|
||||
// Join the intersected subpaths as rewinded polygons
|
||||
for (int i=0; i<count; ++i) {
|
||||
const QVector<int> &subpath_list = isects.at(i);
|
||||
const QList<int> &subpath_list = isects.at(i);
|
||||
if (!subpath_list.isEmpty()) {
|
||||
QPolygonF buildUp;
|
||||
for (int j=0; j<subpath_list.size(); ++j) {
|
||||
@ -2592,7 +2592,7 @@ void qt_path_stroke_cubic_to(qfixed c1x, qfixed c1y,
|
||||
\endlist
|
||||
|
||||
The setDashPattern() function accepts both a Qt::PenStyle object
|
||||
and a vector representation of the pattern as argument.
|
||||
and a list representation of the pattern as argument.
|
||||
|
||||
In addition you can specify a curve's threshold, controlling the
|
||||
granularity with which a curve is drawn, using the
|
||||
@ -2811,16 +2811,16 @@ void QPainterPathStroker::setDashPattern(Qt::PenStyle style)
|
||||
dashPattern. This function makes it possible to specify custom
|
||||
dash patterns.
|
||||
|
||||
Each element in the vector contains the lengths of the dashes and spaces
|
||||
Each element in the list contains the lengths of the dashes and spaces
|
||||
in the stroke, beginning with the first dash in the first element, the
|
||||
first space in the second element, and alternating between dashes and
|
||||
spaces for each following pair of elements.
|
||||
|
||||
The vector can contain an odd number of elements, in which case the last
|
||||
The list can contain an odd number of elements, in which case the last
|
||||
element will be extended by the length of the first element when the
|
||||
pattern repeats.
|
||||
*/
|
||||
void QPainterPathStroker::setDashPattern(const QVector<qreal> &dashPattern)
|
||||
void QPainterPathStroker::setDashPattern(const QList<qreal> &dashPattern)
|
||||
{
|
||||
d_func()->dashPattern.clear();
|
||||
for (int i=0; i<dashPattern.size(); ++i)
|
||||
@ -2830,7 +2830,7 @@ void QPainterPathStroker::setDashPattern(const QVector<qreal> &dashPattern)
|
||||
/*!
|
||||
Returns the dash pattern for the generated outlines.
|
||||
*/
|
||||
QVector<qreal> QPainterPathStroker::dashPattern() const
|
||||
QList<qreal> QPainterPathStroker::dashPattern() const
|
||||
{
|
||||
return d_func()->dashPattern;
|
||||
}
|
||||
|
@ -268,11 +268,11 @@ private:
|
||||
void intersectLines(const QLineF &a, const QLineF &b, QDataBuffer<QIntersection> &intersections);
|
||||
|
||||
QPathSegments &m_segments;
|
||||
QVector<int> m_index;
|
||||
QList<int> m_index;
|
||||
|
||||
RectF m_bounds;
|
||||
|
||||
QVector<TreeNode> m_tree;
|
||||
QList<TreeNode> m_tree;
|
||||
QDataBuffer<QIntersection> m_intersections;
|
||||
};
|
||||
|
||||
@ -1618,7 +1618,7 @@ QPainterPath QPathClipper::clip(Operation operation)
|
||||
|
||||
bool QPathClipper::doClip(QWingedEdge &list, ClipperMode mode)
|
||||
{
|
||||
QVector<qreal> y_coords;
|
||||
QList<qreal> y_coords;
|
||||
y_coords.reserve(list.vertexCount());
|
||||
for (int i = 0; i < list.vertexCount(); ++i)
|
||||
y_coords << list.vertex(i)->y;
|
||||
@ -1778,9 +1778,9 @@ bool QWingedEdge::isInside(qreal x, qreal y) const
|
||||
return winding & 1;
|
||||
}
|
||||
|
||||
static QVector<QCrossingEdge> findCrossings(const QWingedEdge &list, qreal y)
|
||||
static QList<QCrossingEdge> findCrossings(const QWingedEdge &list, qreal y)
|
||||
{
|
||||
QVector<QCrossingEdge> crossings;
|
||||
QList<QCrossingEdge> crossings;
|
||||
for (int i = 0; i < list.edgeCount(); ++i) {
|
||||
const QPathEdge *edge = list.edge(i);
|
||||
QPointF a = *list.vertex(edge->first);
|
||||
@ -1797,7 +1797,7 @@ static QVector<QCrossingEdge> findCrossings(const QWingedEdge &list, qreal y)
|
||||
|
||||
bool QPathClipper::handleCrossingEdges(QWingedEdge &list, qreal y, ClipperMode mode)
|
||||
{
|
||||
QVector<QCrossingEdge> crossings = findCrossings(list, y);
|
||||
QList<QCrossingEdge> crossings = findCrossings(list, y);
|
||||
|
||||
Q_ASSERT(!crossings.isEmpty());
|
||||
std::sort(crossings.begin(), crossings.end());
|
||||
@ -1869,10 +1869,10 @@ bool QPathClipper::handleCrossingEdges(QWingedEdge &list, qreal y, ClipperMode m
|
||||
|
||||
namespace {
|
||||
|
||||
QVector<QPainterPath> toSubpaths(const QPainterPath &path)
|
||||
QList<QPainterPath> toSubpaths(const QPainterPath &path)
|
||||
{
|
||||
|
||||
QVector<QPainterPath> subpaths;
|
||||
QList<QPainterPath> subpaths;
|
||||
if (path.isEmpty())
|
||||
return subpaths;
|
||||
|
||||
@ -2072,7 +2072,7 @@ QPainterPath clip(const QPainterPath &path, qreal t)
|
||||
|
||||
QPainterPath intersectPath(const QPainterPath &path, const QRectF &rect)
|
||||
{
|
||||
QVector<QPainterPath> subpaths = toSubpaths(path);
|
||||
QList<QPainterPath> subpaths = toSubpaths(path);
|
||||
|
||||
QPainterPath result;
|
||||
result.setFillRule(path.fillRule());
|
||||
|
@ -421,7 +421,7 @@ QByteArray QPdf::generateDashes(const QPen &pen)
|
||||
ByteStream s(&result);
|
||||
s << '[';
|
||||
|
||||
QVector<qreal> dasharray = pen.dashPattern();
|
||||
QList<qreal> dasharray = pen.dashPattern();
|
||||
qreal w = pen.widthF();
|
||||
if (w < 0.001)
|
||||
w = 1;
|
||||
@ -666,7 +666,7 @@ void QPdf::Stroker::setPen(const QPen &pen, QPainter::RenderHints hints)
|
||||
basicStroker.setJoinStyle(pen.joinStyle());
|
||||
basicStroker.setMiterLimit(pen.miterLimit());
|
||||
|
||||
QVector<qreal> dashpattern = pen.dashPattern();
|
||||
QList<qreal> dashpattern = pen.dashPattern();
|
||||
if (zeroWidth) {
|
||||
for (int i = 0; i < dashpattern.size(); ++i)
|
||||
dashpattern[i] *= 10.;
|
||||
@ -1824,7 +1824,7 @@ void QPdfEnginePrivate::writeAttachmentRoot()
|
||||
if (fileCache.isEmpty())
|
||||
return;
|
||||
|
||||
QVector<int> attachments;
|
||||
QList<int> attachments;
|
||||
const int size = fileCache.size();
|
||||
for (int i = 0; i < size; ++i) {
|
||||
auto attachment = fileCache.at(i);
|
||||
@ -2396,7 +2396,7 @@ int QPdfEnginePrivate::createShadingFunction(const QGradient *gradient, int from
|
||||
if (stops.at(stops.size() - 1).first < 1)
|
||||
stops.append(QGradientStop(1, stops.at(stops.size() - 1).second));
|
||||
|
||||
QVector<int> functions;
|
||||
QList<int> functions;
|
||||
const int numStops = stops.size();
|
||||
functions.reserve(numStops - 1);
|
||||
for (int i = 0; i < numStops - 1; ++i) {
|
||||
@ -2420,7 +2420,7 @@ int QPdfEnginePrivate::createShadingFunction(const QGradient *gradient, int from
|
||||
functions << f;
|
||||
}
|
||||
|
||||
QVector<QGradientBound> gradientBounds;
|
||||
QList<QGradientBound> gradientBounds;
|
||||
gradientBounds.reserve((to - from) * (numStops - 1));
|
||||
|
||||
for (int step = from; step < to; ++step) {
|
||||
@ -2816,7 +2816,7 @@ int QPdfEnginePrivate::addBrushPattern(const QTransform &m, bool *specifyColor,
|
||||
return patternObj;
|
||||
}
|
||||
|
||||
static inline bool is_monochrome(const QVector<QRgb> &colorTable)
|
||||
static inline bool is_monochrome(const QList<QRgb> &colorTable)
|
||||
{
|
||||
return colorTable.size() == 2
|
||||
&& colorTable.at(0) == QColor(Qt::black).rgba()
|
||||
|
@ -129,7 +129,7 @@ typedef QPenPrivate QPenData;
|
||||
Since Qt 4.1 it is also possible to specify a custom dash pattern
|
||||
using the setDashPattern() function which implicitly converts the
|
||||
style of the pen to Qt::CustomDashLine. The pattern argument, a
|
||||
QVector, must be specified as an even number of \l qreal entries
|
||||
QList, must be specified as an even number of \l qreal entries
|
||||
where the entries 1, 3, 5... are the dashes and 2, 4, 6... are the
|
||||
spaces. For example, the custom pattern shown above is created
|
||||
using the following code:
|
||||
@ -453,11 +453,11 @@ void QPen::setStyle(Qt::PenStyle s)
|
||||
|
||||
\sa style(), isSolid()
|
||||
*/
|
||||
QVector<qreal> QPen::dashPattern() const
|
||||
QList<qreal> QPen::dashPattern() const
|
||||
{
|
||||
QPenData *dd = static_cast<QPenData *>(d);
|
||||
if (d->style == Qt::SolidLine || d->style == Qt::NoPen) {
|
||||
return QVector<qreal>();
|
||||
return QList<qreal>();
|
||||
} else if (dd->dashPattern.isEmpty()) {
|
||||
const qreal space = 2;
|
||||
const qreal dot = 1;
|
||||
@ -517,7 +517,7 @@ QVector<qreal> QPen::dashPattern() const
|
||||
|
||||
\sa setStyle(), dashPattern(), setCapStyle(), setCosmetic()
|
||||
*/
|
||||
void QPen::setDashPattern(const QVector<qreal> &pattern)
|
||||
void QPen::setDashPattern(const QList<qreal> &pattern)
|
||||
{
|
||||
if (pattern.isEmpty())
|
||||
return;
|
||||
@ -928,7 +928,7 @@ QDataStream &operator<<(QDataStream &s, const QPen &p)
|
||||
// ensure that we write doubles here instead of streaming the pattern
|
||||
// directly; otherwise, platforms that redefine qreal might generate
|
||||
// data that cannot be read on other platforms.
|
||||
QVector<qreal> pattern = p.dashPattern();
|
||||
QList<qreal> pattern = p.dashPattern();
|
||||
s << quint32(pattern.size());
|
||||
for (int i = 0; i < pattern.size(); ++i)
|
||||
s << double(pattern.at(i));
|
||||
@ -959,7 +959,7 @@ QDataStream &operator>>(QDataStream &s, QPen &p)
|
||||
QColor color;
|
||||
QBrush brush;
|
||||
double miterLimit = 2;
|
||||
QVector<qreal> dashPattern;
|
||||
QList<qreal> dashPattern;
|
||||
double dashOffset = 0;
|
||||
bool cosmetic = false;
|
||||
bool defaultWidth = false;
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
Qt::PenStyle style;
|
||||
Qt::PenCapStyle capStyle;
|
||||
Qt::PenJoinStyle joinStyle;
|
||||
mutable QVector<qreal> dashPattern;
|
||||
mutable QList<qreal> dashPattern;
|
||||
qreal dashOffset;
|
||||
qreal miterLimit;
|
||||
uint cosmetic : 1;
|
||||
|
@ -244,7 +244,7 @@ static Q_ALWAYS_INLINE uint convertPixelToRGB32(uint s)
|
||||
}
|
||||
|
||||
template<QImage::Format Format>
|
||||
static void QT_FASTCALL convertToRGB32(uint *buffer, int count, const QVector<QRgb> *)
|
||||
static void QT_FASTCALL convertToRGB32(uint *buffer, int count, const QList<QRgb> *)
|
||||
{
|
||||
for (int i = 0; i < count; ++i)
|
||||
buffer[i] = convertPixelToRGB32<Format>(buffer[i]);
|
||||
@ -256,7 +256,7 @@ extern const uint * QT_FASTCALL fetchPixelsBPP24_ssse3(uint *dest, const uchar*s
|
||||
|
||||
template<QImage::Format Format>
|
||||
static const uint *QT_FASTCALL fetchRGBToRGB32(uint *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
constexpr QPixelLayout::BPP BPP = bitsPerPixel<Format>();
|
||||
#if defined(__SSE2__) && !defined(__SSSE3__) && QT_COMPILER_SUPPORTS_SSSE3
|
||||
@ -281,7 +281,7 @@ static Q_ALWAYS_INLINE QRgba64 convertPixelToRGB64(uint s)
|
||||
|
||||
template<QImage::Format Format>
|
||||
static const QRgba64 *QT_FASTCALL convertToRGB64(QRgba64 *buffer, const uint *src, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
for (int i = 0; i < count; ++i)
|
||||
buffer[i] = convertPixelToRGB64<Format>(src[i]);
|
||||
@ -290,7 +290,7 @@ static const QRgba64 *QT_FASTCALL convertToRGB64(QRgba64 *buffer, const uint *sr
|
||||
|
||||
template<QImage::Format Format>
|
||||
static const QRgba64 *QT_FASTCALL fetchRGBToRGB64(QRgba64 *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
for (int i = 0; i < count; ++i)
|
||||
buffer[i] = convertPixelToRGB64<Format>(qFetchPixel<bitsPerPixel<Format>()>(src, index + i));
|
||||
@ -339,7 +339,7 @@ static Q_ALWAYS_INLINE uint convertPixelToARGB32PM(uint s)
|
||||
}
|
||||
|
||||
template<QImage::Format Format>
|
||||
static void QT_FASTCALL convertARGBPMToARGB32PM(uint *buffer, int count, const QVector<QRgb> *)
|
||||
static void QT_FASTCALL convertARGBPMToARGB32PM(uint *buffer, int count, const QList<QRgb> *)
|
||||
{
|
||||
for (int i = 0; i < count; ++i)
|
||||
buffer[i] = convertPixelToARGB32PM<Format>(buffer[i]);
|
||||
@ -347,7 +347,7 @@ static void QT_FASTCALL convertARGBPMToARGB32PM(uint *buffer, int count, const Q
|
||||
|
||||
template<QImage::Format Format>
|
||||
static const uint *QT_FASTCALL fetchARGBPMToARGB32PM(uint *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
constexpr QPixelLayout::BPP BPP = bitsPerPixel<Format>();
|
||||
#if defined(__SSE2__) && !defined(__SSSE3__) && QT_COMPILER_SUPPORTS_SSSE3
|
||||
@ -372,7 +372,7 @@ static Q_ALWAYS_INLINE QRgba64 convertPixelToRGBA64PM(uint s)
|
||||
|
||||
template<QImage::Format Format>
|
||||
static const QRgba64 *QT_FASTCALL convertARGBPMToRGBA64PM(QRgba64 *buffer, const uint *src, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
for (int i = 0; i < count; ++i)
|
||||
buffer[i] = convertPixelToRGB64<Format>(src[i]);
|
||||
@ -381,7 +381,7 @@ static const QRgba64 *QT_FASTCALL convertARGBPMToRGBA64PM(QRgba64 *buffer, const
|
||||
|
||||
template<QImage::Format Format>
|
||||
static const QRgba64 *QT_FASTCALL fetchARGBPMToRGBA64PM(QRgba64 *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
constexpr QPixelLayout::BPP bpp = bitsPerPixel<Format>();
|
||||
for (int i = 0; i < count; ++i)
|
||||
@ -391,7 +391,7 @@ static const QRgba64 *QT_FASTCALL fetchARGBPMToRGBA64PM(QRgba64 *buffer, const u
|
||||
|
||||
template<QImage::Format Format, bool fromRGB>
|
||||
static void QT_FASTCALL storeRGBFromARGB32PM(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *dither)
|
||||
const QList<QRgb> *, QDitherInfo *dither)
|
||||
{
|
||||
Q_CONSTEXPR uchar rWidth = redWidth<Format>();
|
||||
Q_CONSTEXPR uchar gWidth = greenWidth<Format>();
|
||||
@ -443,7 +443,7 @@ static void QT_FASTCALL storeRGBFromARGB32PM(uchar *dest, const uint *src, int i
|
||||
|
||||
template<QImage::Format Format, bool fromRGB>
|
||||
static void QT_FASTCALL storeARGBPMFromARGB32PM(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *dither)
|
||||
const QList<QRgb> *, QDitherInfo *dither)
|
||||
{
|
||||
constexpr QPixelLayout::BPP BPP = bitsPerPixel<Format>();
|
||||
if (!dither) {
|
||||
@ -602,7 +602,7 @@ template<QImage::Format Format> Q_DECL_CONSTEXPR static inline QPixelLayout pixe
|
||||
};
|
||||
}
|
||||
|
||||
static void QT_FASTCALL convertIndexedToARGB32PM(uint *buffer, int count, const QVector<QRgb> *clut)
|
||||
static void QT_FASTCALL convertIndexedToARGB32PM(uint *buffer, int count, const QList<QRgb> *clut)
|
||||
{
|
||||
for (int i = 0; i < count; ++i)
|
||||
buffer[i] = qPremultiply(clut->at(buffer[i]));
|
||||
@ -610,7 +610,7 @@ static void QT_FASTCALL convertIndexedToARGB32PM(uint *buffer, int count, const
|
||||
|
||||
template<QPixelLayout::BPP BPP>
|
||||
static const uint *QT_FASTCALL fetchIndexedToARGB32PM(uint *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *clut, QDitherInfo *)
|
||||
const QList<QRgb> *clut, QDitherInfo *)
|
||||
{
|
||||
for (int i = 0; i < count; ++i) {
|
||||
const uint s = qFetchPixel<BPP>(src, index + i);
|
||||
@ -621,7 +621,7 @@ static const uint *QT_FASTCALL fetchIndexedToARGB32PM(uint *buffer, const uchar
|
||||
|
||||
template<QPixelLayout::BPP BPP>
|
||||
static const QRgba64 *QT_FASTCALL fetchIndexedToRGBA64PM(QRgba64 *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *clut, QDitherInfo *)
|
||||
const QList<QRgb> *clut, QDitherInfo *)
|
||||
{
|
||||
for (int i = 0; i < count; ++i) {
|
||||
const uint s = qFetchPixel<BPP>(src, index + i);
|
||||
@ -631,81 +631,81 @@ static const QRgba64 *QT_FASTCALL fetchIndexedToRGBA64PM(QRgba64 *buffer, const
|
||||
}
|
||||
|
||||
static const QRgba64 *QT_FASTCALL convertIndexedToRGBA64PM(QRgba64 *buffer, const uint *src, int count,
|
||||
const QVector<QRgb> *clut, QDitherInfo *)
|
||||
const QList<QRgb> *clut, QDitherInfo *)
|
||||
{
|
||||
for (int i = 0; i < count; ++i)
|
||||
buffer[i] = QRgba64::fromArgb32(clut->at(src[i])).premultiplied();
|
||||
return buffer;
|
||||
}
|
||||
|
||||
static void QT_FASTCALL convertPassThrough(uint *, int, const QVector<QRgb> *)
|
||||
static void QT_FASTCALL convertPassThrough(uint *, int, const QList<QRgb> *)
|
||||
{
|
||||
}
|
||||
|
||||
static const uint *QT_FASTCALL fetchPassThrough(uint *, const uchar *src, int index, int,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
return reinterpret_cast<const uint *>(src) + index;
|
||||
}
|
||||
|
||||
static const QRgba64 *QT_FASTCALL fetchPassThrough64(QRgba64 *, const uchar *src, int index, int,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
return reinterpret_cast<const QRgba64 *>(src) + index;
|
||||
}
|
||||
|
||||
static void QT_FASTCALL storePassThrough(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
uint *d = reinterpret_cast<uint *>(dest) + index;
|
||||
if (d != src)
|
||||
memcpy(d, src, count * sizeof(uint));
|
||||
}
|
||||
|
||||
static void QT_FASTCALL convertARGB32ToARGB32PM(uint *buffer, int count, const QVector<QRgb> *)
|
||||
static void QT_FASTCALL convertARGB32ToARGB32PM(uint *buffer, int count, const QList<QRgb> *)
|
||||
{
|
||||
qt_convertARGB32ToARGB32PM(buffer, buffer, count);
|
||||
}
|
||||
|
||||
static const uint *QT_FASTCALL fetchARGB32ToARGB32PM(uint *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
return qt_convertARGB32ToARGB32PM(buffer, reinterpret_cast<const uint *>(src) + index, count);
|
||||
}
|
||||
|
||||
static void QT_FASTCALL convertRGBA8888PMToARGB32PM(uint *buffer, int count, const QVector<QRgb> *)
|
||||
static void QT_FASTCALL convertRGBA8888PMToARGB32PM(uint *buffer, int count, const QList<QRgb> *)
|
||||
{
|
||||
for (int i = 0; i < count; ++i)
|
||||
buffer[i] = RGBA2ARGB(buffer[i]);
|
||||
}
|
||||
|
||||
static const uint *QT_FASTCALL fetchRGBA8888PMToARGB32PM(uint *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
const uint *s = reinterpret_cast<const uint *>(src) + index;
|
||||
UNALIASED_CONVERSION_LOOP(buffer, s, count, RGBA2ARGB);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
static void QT_FASTCALL convertRGBA8888ToARGB32PM(uint *buffer, int count, const QVector<QRgb> *)
|
||||
static void QT_FASTCALL convertRGBA8888ToARGB32PM(uint *buffer, int count, const QList<QRgb> *)
|
||||
{
|
||||
qt_convertRGBA8888ToARGB32PM(buffer, buffer, count);
|
||||
}
|
||||
|
||||
static const uint *QT_FASTCALL fetchRGBA8888ToARGB32PM(uint *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
return qt_convertRGBA8888ToARGB32PM(buffer, reinterpret_cast<const uint *>(src) + index, count);
|
||||
}
|
||||
|
||||
static void QT_FASTCALL convertAlpha8ToRGB32(uint *buffer, int count, const QVector<QRgb> *)
|
||||
static void QT_FASTCALL convertAlpha8ToRGB32(uint *buffer, int count, const QList<QRgb> *)
|
||||
{
|
||||
for (int i = 0; i < count; ++i)
|
||||
buffer[i] = qRgba(0, 0, 0, buffer[i]);
|
||||
}
|
||||
|
||||
static const uint *QT_FASTCALL fetchAlpha8ToRGB32(uint *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
for (int i = 0; i < count; ++i)
|
||||
buffer[i] = qRgba(0, 0, 0, src[index + i]);
|
||||
@ -713,21 +713,21 @@ static const uint *QT_FASTCALL fetchAlpha8ToRGB32(uint *buffer, const uchar *src
|
||||
}
|
||||
|
||||
static const QRgba64 *QT_FASTCALL convertAlpha8ToRGB64(QRgba64 *buffer, const uint *src, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
for (int i = 0; i < count; ++i)
|
||||
buffer[i] = QRgba64::fromRgba(0, 0, 0, src[i]);
|
||||
return buffer;
|
||||
}
|
||||
static const QRgba64 *QT_FASTCALL fetchAlpha8ToRGB64(QRgba64 *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
for (int i = 0; i < count; ++i)
|
||||
buffer[i] = QRgba64::fromRgba(0, 0, 0, src[index + i]);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
static void QT_FASTCALL convertGrayscale8ToRGB32(uint *buffer, int count, const QVector<QRgb> *)
|
||||
static void QT_FASTCALL convertGrayscale8ToRGB32(uint *buffer, int count, const QList<QRgb> *)
|
||||
{
|
||||
for (int i = 0; i < count; ++i) {
|
||||
const uint s = buffer[i];
|
||||
@ -736,7 +736,7 @@ static void QT_FASTCALL convertGrayscale8ToRGB32(uint *buffer, int count, const
|
||||
}
|
||||
|
||||
static const uint *QT_FASTCALL fetchGrayscale8ToRGB32(uint *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
for (int i = 0; i < count; ++i) {
|
||||
const uint s = src[index + i];
|
||||
@ -746,7 +746,7 @@ static const uint *QT_FASTCALL fetchGrayscale8ToRGB32(uint *buffer, const uchar
|
||||
}
|
||||
|
||||
static const QRgba64 *QT_FASTCALL convertGrayscale8ToRGB64(QRgba64 *buffer, const uint *src, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
for (int i = 0; i < count; ++i)
|
||||
buffer[i] = QRgba64::fromRgba(src[i], src[i], src[i], 255);
|
||||
@ -754,7 +754,7 @@ static const QRgba64 *QT_FASTCALL convertGrayscale8ToRGB64(QRgba64 *buffer, cons
|
||||
}
|
||||
|
||||
static const QRgba64 *QT_FASTCALL fetchGrayscale8ToRGB64(QRgba64 *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
for (int i = 0; i < count; ++i) {
|
||||
const uint s = src[index + i];
|
||||
@ -763,7 +763,7 @@ static const QRgba64 *QT_FASTCALL fetchGrayscale8ToRGB64(QRgba64 *buffer, const
|
||||
return buffer;
|
||||
}
|
||||
|
||||
static void QT_FASTCALL convertGrayscale16ToRGB32(uint *buffer, int count, const QVector<QRgb> *)
|
||||
static void QT_FASTCALL convertGrayscale16ToRGB32(uint *buffer, int count, const QList<QRgb> *)
|
||||
{
|
||||
for (int i = 0; i < count; ++i) {
|
||||
const uint x = qt_div_257(buffer[i]);
|
||||
@ -772,7 +772,7 @@ static void QT_FASTCALL convertGrayscale16ToRGB32(uint *buffer, int count, const
|
||||
}
|
||||
|
||||
static const uint *QT_FASTCALL fetchGrayscale16ToRGB32(uint *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
const unsigned short *s = reinterpret_cast<const unsigned short *>(src) + index;
|
||||
for (int i = 0; i < count; ++i) {
|
||||
@ -783,7 +783,7 @@ static const uint *QT_FASTCALL fetchGrayscale16ToRGB32(uint *buffer, const uchar
|
||||
}
|
||||
|
||||
static const QRgba64 *QT_FASTCALL convertGrayscale16ToRGBA64(QRgba64 *buffer, const uint *src, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
const unsigned short *s = reinterpret_cast<const unsigned short *>(src);
|
||||
for (int i = 0; i < count; ++i)
|
||||
@ -792,7 +792,7 @@ static const QRgba64 *QT_FASTCALL convertGrayscale16ToRGBA64(QRgba64 *buffer, co
|
||||
}
|
||||
|
||||
static const QRgba64 *QT_FASTCALL fetchGrayscale16ToRGBA64(QRgba64 *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
const unsigned short *s = reinterpret_cast<const unsigned short *>(src) + index;
|
||||
for (int i = 0; i < count; ++i) {
|
||||
@ -802,14 +802,14 @@ static const QRgba64 *QT_FASTCALL fetchGrayscale16ToRGBA64(QRgba64 *buffer, cons
|
||||
}
|
||||
|
||||
static void QT_FASTCALL storeARGB32FromARGB32PM(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
uint *d = reinterpret_cast<uint *>(dest) + index;
|
||||
UNALIASED_CONVERSION_LOOP(d, src, count, [](uint c) { return qUnpremultiply(c); });
|
||||
}
|
||||
|
||||
static void QT_FASTCALL storeRGBA8888PMFromARGB32PM(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
uint *d = reinterpret_cast<uint *>(dest) + index;
|
||||
UNALIASED_CONVERSION_LOOP(d, src, count, ARGB2RGBA);
|
||||
@ -970,7 +970,7 @@ static inline void qConvertARGB32PMToRGBA64PM_neon(QRgba64 *buffer, const uint *
|
||||
#endif
|
||||
|
||||
static const QRgba64 *QT_FASTCALL convertRGB32ToRGB64(QRgba64 *buffer, const uint *src, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
#ifdef __SSE2__
|
||||
qConvertARGB32PMToRGBA64PM_sse2<false, true>(buffer, src, count);
|
||||
@ -984,13 +984,13 @@ static const QRgba64 *QT_FASTCALL convertRGB32ToRGB64(QRgba64 *buffer, const uin
|
||||
}
|
||||
|
||||
static const QRgba64 *QT_FASTCALL fetchRGB32ToRGB64(QRgba64 *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
return convertRGB32ToRGB64(buffer, reinterpret_cast<const uint *>(src) + index, count, nullptr, nullptr);
|
||||
}
|
||||
|
||||
static const QRgba64 *QT_FASTCALL convertARGB32ToRGBA64PM(QRgba64 *buffer, const uint *src, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
for (int i = 0; i < count; ++i)
|
||||
buffer[i] = QRgba64::fromArgb32(src[i]).premultiplied();
|
||||
@ -998,13 +998,13 @@ static const QRgba64 *QT_FASTCALL convertARGB32ToRGBA64PM(QRgba64 *buffer, const
|
||||
}
|
||||
|
||||
static const QRgba64 *QT_FASTCALL fetchARGB32ToRGBA64PM(QRgba64 *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
return convertARGB32ToRGBA64PM(buffer, reinterpret_cast<const uint *>(src) + index, count, nullptr, nullptr);
|
||||
}
|
||||
|
||||
static const QRgba64 *QT_FASTCALL convertARGB32PMToRGBA64PM(QRgba64 *buffer, const uint *src, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
#ifdef __SSE2__
|
||||
qConvertARGB32PMToRGBA64PM_sse2<false, false>(buffer, src, count);
|
||||
@ -1018,13 +1018,13 @@ static const QRgba64 *QT_FASTCALL convertARGB32PMToRGBA64PM(QRgba64 *buffer, con
|
||||
}
|
||||
|
||||
static const QRgba64 *QT_FASTCALL fetchARGB32PMToRGBA64PM(QRgba64 *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
return convertARGB32PMToRGBA64PM(buffer, reinterpret_cast<const uint *>(src) + index, count, nullptr, nullptr);
|
||||
}
|
||||
|
||||
static const QRgba64 *QT_FASTCALL fetchRGBA64ToRGBA64PM(QRgba64 *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
const QRgba64 *s = reinterpret_cast<const QRgba64 *>(src) + index;
|
||||
for (int i = 0; i < count; ++i)
|
||||
@ -1033,7 +1033,7 @@ static const QRgba64 *QT_FASTCALL fetchRGBA64ToRGBA64PM(QRgba64 *buffer, const u
|
||||
}
|
||||
|
||||
static const QRgba64 *QT_FASTCALL convertRGBA8888ToRGBA64PM(QRgba64 *buffer, const uint *src, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
for (int i = 0; i < count; ++i)
|
||||
buffer[i] = QRgba64::fromArgb32(RGBA2ARGB(src[i])).premultiplied();
|
||||
@ -1041,13 +1041,13 @@ static const QRgba64 *QT_FASTCALL convertRGBA8888ToRGBA64PM(QRgba64 *buffer, con
|
||||
}
|
||||
|
||||
static const QRgba64 *QT_FASTCALL fetchRGBA8888ToRGBA64PM(QRgba64 *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
return convertRGBA8888ToRGBA64PM(buffer, reinterpret_cast<const uint *>(src) + index, count, nullptr, nullptr);
|
||||
}
|
||||
|
||||
static const QRgba64 *QT_FASTCALL convertRGBA8888PMToRGBA64PM(QRgba64 *buffer, const uint *src, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
#ifdef __SSE2__
|
||||
qConvertARGB32PMToRGBA64PM_sse2<true, false>(buffer, src, count);
|
||||
@ -1061,34 +1061,34 @@ static const QRgba64 *QT_FASTCALL convertRGBA8888PMToRGBA64PM(QRgba64 *buffer, c
|
||||
}
|
||||
|
||||
static const QRgba64 *QT_FASTCALL fetchRGBA8888PMToRGBA64PM(QRgba64 *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
return convertRGBA8888PMToRGBA64PM(buffer, reinterpret_cast<const uint *>(src) + index, count, nullptr, nullptr);
|
||||
}
|
||||
|
||||
static void QT_FASTCALL storeRGBA8888FromARGB32PM(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
uint *d = reinterpret_cast<uint *>(dest) + index;
|
||||
UNALIASED_CONVERSION_LOOP(d, src, count, [](uint c) { return ARGB2RGBA(qUnpremultiply(c)); });
|
||||
}
|
||||
|
||||
static void QT_FASTCALL storeRGBXFromRGB32(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
uint *d = reinterpret_cast<uint *>(dest) + index;
|
||||
UNALIASED_CONVERSION_LOOP(d, src, count, [](uint c) { return ARGB2RGBA(0xff000000 | c); });
|
||||
}
|
||||
|
||||
static void QT_FASTCALL storeRGBXFromARGB32PM(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
uint *d = reinterpret_cast<uint *>(dest) + index;
|
||||
UNALIASED_CONVERSION_LOOP(d, src, count, [](uint c) { return ARGB2RGBA(0xff000000 | qUnpremultiply(c)); });
|
||||
}
|
||||
|
||||
template<QtPixelOrder PixelOrder>
|
||||
static void QT_FASTCALL convertA2RGB30PMToARGB32PM(uint *buffer, int count, const QVector<QRgb> *)
|
||||
static void QT_FASTCALL convertA2RGB30PMToARGB32PM(uint *buffer, int count, const QList<QRgb> *)
|
||||
{
|
||||
for (int i = 0; i < count; ++i)
|
||||
buffer[i] = qConvertA2rgb30ToArgb32<PixelOrder>(buffer[i]);
|
||||
@ -1096,7 +1096,7 @@ static void QT_FASTCALL convertA2RGB30PMToARGB32PM(uint *buffer, int count, cons
|
||||
|
||||
template<QtPixelOrder PixelOrder>
|
||||
static const uint *QT_FASTCALL fetchA2RGB30PMToARGB32PM(uint *buffer, const uchar *s, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *dither)
|
||||
const QList<QRgb> *, QDitherInfo *dither)
|
||||
{
|
||||
const uint *src = reinterpret_cast<const uint *>(s) + index;
|
||||
if (!dither) {
|
||||
@ -1167,7 +1167,7 @@ static inline void qConvertA2RGB30PMToRGBA64PM_sse2(QRgba64 *buffer, const uint
|
||||
|
||||
template<QtPixelOrder PixelOrder>
|
||||
static const QRgba64 *QT_FASTCALL convertA2RGB30PMToRGBA64PM(QRgba64 *buffer, const uint *src, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
#ifdef __SSE2__
|
||||
qConvertA2RGB30PMToRGBA64PM_sse2<PixelOrder>(buffer, src, count);
|
||||
@ -1180,14 +1180,14 @@ static const QRgba64 *QT_FASTCALL convertA2RGB30PMToRGBA64PM(QRgba64 *buffer, co
|
||||
|
||||
template<QtPixelOrder PixelOrder>
|
||||
static const QRgba64 *QT_FASTCALL fetchA2RGB30PMToRGBA64PM(QRgba64 *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
return convertA2RGB30PMToRGBA64PM<PixelOrder>(buffer, reinterpret_cast<const uint *>(src) + index, count, nullptr, nullptr);
|
||||
}
|
||||
|
||||
template<QtPixelOrder PixelOrder>
|
||||
static void QT_FASTCALL storeA2RGB30PMFromARGB32PM(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
uint *d = reinterpret_cast<uint *>(dest) + index;
|
||||
UNALIASED_CONVERSION_LOOP(d, src, count, qConvertArgb32ToA2rgb30<PixelOrder>);
|
||||
@ -1195,7 +1195,7 @@ static void QT_FASTCALL storeA2RGB30PMFromARGB32PM(uchar *dest, const uint *src,
|
||||
|
||||
template<QtPixelOrder PixelOrder>
|
||||
static void QT_FASTCALL storeRGB30FromRGB32(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
uint *d = reinterpret_cast<uint *>(dest) + index;
|
||||
UNALIASED_CONVERSION_LOOP(d, src, count, qConvertRgb32ToRgb30<PixelOrder>);
|
||||
@ -1203,7 +1203,7 @@ static void QT_FASTCALL storeRGB30FromRGB32(uchar *dest, const uint *src, int in
|
||||
|
||||
template<QtPixelOrder PixelOrder>
|
||||
static void QT_FASTCALL storeRGB30FromARGB32PM(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
uint *d = reinterpret_cast<uint *>(dest) + index;
|
||||
UNALIASED_CONVERSION_LOOP(d, src, count, qConvertRgb32ToRgb30<PixelOrder>);
|
||||
@ -1256,28 +1256,28 @@ template void qt_convertRGBA64ToARGB32<true>(uint *dst, const QRgba64 *src, int
|
||||
|
||||
|
||||
static void QT_FASTCALL storeAlpha8FromARGB32PM(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
for (int i = 0; i < count; ++i)
|
||||
dest[index + i] = qAlpha(src[i]);
|
||||
}
|
||||
|
||||
static void QT_FASTCALL storeGrayscale8FromRGB32(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
for (int i = 0; i < count; ++i)
|
||||
dest[index + i] = qGray(src[i]);
|
||||
}
|
||||
|
||||
static void QT_FASTCALL storeGrayscale8FromARGB32PM(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
for (int i = 0; i < count; ++i)
|
||||
dest[index + i] = qGray(qUnpremultiply(src[i]));
|
||||
}
|
||||
|
||||
static void QT_FASTCALL storeGrayscale16FromRGB32(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
unsigned short *d = reinterpret_cast<unsigned short *>(dest) + index;
|
||||
for (int i = 0; i < count; ++i)
|
||||
@ -1285,7 +1285,7 @@ static void QT_FASTCALL storeGrayscale16FromRGB32(uchar *dest, const uint *src,
|
||||
}
|
||||
|
||||
static void QT_FASTCALL storeGrayscale16FromARGB32PM(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
unsigned short *d = reinterpret_cast<unsigned short *>(dest) + index;
|
||||
for (int i = 0; i < count; ++i)
|
||||
@ -1293,7 +1293,7 @@ static void QT_FASTCALL storeGrayscale16FromARGB32PM(uchar *dest, const uint *sr
|
||||
}
|
||||
|
||||
static const uint *QT_FASTCALL fetchRGB64ToRGB32(uint *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
const QRgba64 *s = reinterpret_cast<const QRgba64 *>(src) + index;
|
||||
for (int i = 0; i < count; ++i)
|
||||
@ -1302,7 +1302,7 @@ static const uint *QT_FASTCALL fetchRGB64ToRGB32(uint *buffer, const uchar *src,
|
||||
}
|
||||
|
||||
static void QT_FASTCALL storeRGB64FromRGB32(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
QRgba64 *d = reinterpret_cast<QRgba64 *>(dest) + index;
|
||||
for (int i = 0; i < count; ++i)
|
||||
@ -1310,7 +1310,7 @@ static void QT_FASTCALL storeRGB64FromRGB32(uchar *dest, const uint *src, int in
|
||||
}
|
||||
|
||||
static const uint *QT_FASTCALL fetchRGBA64ToARGB32PM(uint *buffer, const uchar *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
const QRgba64 *s = reinterpret_cast<const QRgba64 *>(src) + index;
|
||||
for (int i = 0; i < count; ++i)
|
||||
@ -1319,7 +1319,7 @@ static const uint *QT_FASTCALL fetchRGBA64ToARGB32PM(uint *buffer, const uchar *
|
||||
}
|
||||
|
||||
static void QT_FASTCALL storeRGBA64FromARGB32PM(uchar *dest, const uint *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
QRgba64 *d = reinterpret_cast<QRgba64 *>(dest) + index;
|
||||
for (int i = 0; i < count; ++i)
|
||||
@ -1437,7 +1437,7 @@ static void QT_FASTCALL convertFromRgb64(uint *dest, const QRgba64 *src, int len
|
||||
|
||||
template<QImage::Format format>
|
||||
static void QT_FASTCALL storeGenericFromRGBA64PM(uchar *dest, const QRgba64 *src, int index, int count,
|
||||
const QVector<QRgb> *clut, QDitherInfo *dither)
|
||||
const QList<QRgb> *clut, QDitherInfo *dither)
|
||||
{
|
||||
uint buffer[BufferSize];
|
||||
convertFromRgb64(buffer, src, count);
|
||||
@ -1445,7 +1445,7 @@ static void QT_FASTCALL storeGenericFromRGBA64PM(uchar *dest, const QRgba64 *src
|
||||
}
|
||||
|
||||
static void QT_FASTCALL storeARGB32FromRGBA64PM(uchar *dest, const QRgba64 *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
uint *d = (uint*)dest + index;
|
||||
for (int i = 0; i < count; ++i)
|
||||
@ -1453,7 +1453,7 @@ static void QT_FASTCALL storeARGB32FromRGBA64PM(uchar *dest, const QRgba64 *src,
|
||||
}
|
||||
|
||||
static void QT_FASTCALL storeRGBA8888FromRGBA64PM(uchar *dest, const QRgba64 *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
uint *d = (uint*)dest + index;
|
||||
for (int i = 0; i < count; ++i)
|
||||
@ -1462,7 +1462,7 @@ static void QT_FASTCALL storeRGBA8888FromRGBA64PM(uchar *dest, const QRgba64 *sr
|
||||
|
||||
template<QtPixelOrder PixelOrder>
|
||||
static void QT_FASTCALL storeRGB30FromRGBA64PM(uchar *dest, const QRgba64 *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
uint *d = (uint*)dest + index;
|
||||
#ifdef __SSE2__
|
||||
@ -1474,7 +1474,7 @@ static void QT_FASTCALL storeRGB30FromRGBA64PM(uchar *dest, const QRgba64 *src,
|
||||
}
|
||||
|
||||
static void QT_FASTCALL storeRGBX64FromRGBA64PM(uchar *dest, const QRgba64 *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
QRgba64 *d = reinterpret_cast<QRgba64*>(dest) + index;
|
||||
for (int i = 0; i < count; ++i) {
|
||||
@ -1484,7 +1484,7 @@ static void QT_FASTCALL storeRGBX64FromRGBA64PM(uchar *dest, const QRgba64 *src,
|
||||
}
|
||||
|
||||
static void QT_FASTCALL storeRGBA64FromRGBA64PM(uchar *dest, const QRgba64 *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
QRgba64 *d = reinterpret_cast<QRgba64*>(dest) + index;
|
||||
for (int i = 0; i < count; ++i)
|
||||
@ -1492,7 +1492,7 @@ static void QT_FASTCALL storeRGBA64FromRGBA64PM(uchar *dest, const QRgba64 *src,
|
||||
}
|
||||
|
||||
static void QT_FASTCALL storeRGBA64PMFromRGBA64PM(uchar *dest, const QRgba64 *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
QRgba64 *d = reinterpret_cast<QRgba64*>(dest) + index;
|
||||
if (d != src)
|
||||
@ -1500,7 +1500,7 @@ static void QT_FASTCALL storeRGBA64PMFromRGBA64PM(uchar *dest, const QRgba64 *sr
|
||||
}
|
||||
|
||||
static void QT_FASTCALL storeGray16FromRGBA64PM(uchar *dest, const QRgba64 *src, int index, int count,
|
||||
const QVector<QRgb> *, QDitherInfo *)
|
||||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
quint16 *d = reinterpret_cast<quint16*>(dest) + index;
|
||||
for (int i = 0; i < count; ++i) {
|
||||
|
@ -90,7 +90,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
QVector<QBackingstoreTextureInfo> textures;
|
||||
QList<QBackingstoreTextureInfo> textures;
|
||||
bool locked;
|
||||
};
|
||||
|
||||
|
@ -84,7 +84,7 @@ static void qt_polygon_isect_line(const QPointF &p1, const QPointF &p2, const QP
|
||||
|
||||
/*!
|
||||
\class QPolygon
|
||||
\brief The QPolygon class provides a vector of points using
|
||||
\brief The QPolygon class provides a list of points using
|
||||
integer precision.
|
||||
\inmodule QtGui
|
||||
|
||||
@ -93,13 +93,13 @@ static void qt_polygon_isect_line(const QPointF &p1, const QPointF &p2, const QP
|
||||
\ingroup painting
|
||||
\ingroup shared
|
||||
|
||||
A QPolygon object is a QVector<QPoint>. The easiest way to add
|
||||
points to a QPolygon is to use QVector's streaming operator, as
|
||||
A QPolygon object is a QList<QPoint>. The easiest way to add
|
||||
points to a QPolygon is to use QList's streaming operator, as
|
||||
illustrated below:
|
||||
|
||||
\snippet polygon/polygon.cpp 0
|
||||
|
||||
In addition to the functions provided by QVector, QPolygon
|
||||
In addition to the functions provided by QList, QPolygon
|
||||
provides some point-specific functions.
|
||||
|
||||
Each point in a polygon can be retrieved by passing its index to
|
||||
@ -117,7 +117,7 @@ static void qt_polygon_isect_line(const QPointF &p1, const QPointF &p2, const QP
|
||||
The QPolygon class is \l {Implicit Data Sharing}{implicitly
|
||||
shared}.
|
||||
|
||||
\sa QVector, QPolygonF, QLine
|
||||
\sa QList, QPolygonF, QLine
|
||||
*/
|
||||
|
||||
|
||||
@ -130,7 +130,7 @@ static void qt_polygon_isect_line(const QPointF &p1, const QPointF &p2, const QP
|
||||
|
||||
Constructs a polygon with no points.
|
||||
|
||||
\sa QVector::isEmpty()
|
||||
\sa QList::isEmpty()
|
||||
*/
|
||||
|
||||
/*!
|
||||
@ -139,7 +139,7 @@ static void qt_polygon_isect_line(const QPointF &p1, const QPointF &p2, const QP
|
||||
Constructs a polygon of the given \a size. Creates an empty
|
||||
polygon if \a size == 0.
|
||||
|
||||
\sa QVector::isEmpty()
|
||||
\sa QList::isEmpty()
|
||||
*/
|
||||
|
||||
/*!
|
||||
@ -151,7 +151,7 @@ static void qt_polygon_isect_line(const QPointF &p1, const QPointF &p2, const QP
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QPolygon::QPolygon(const QVector<QPoint> &points)
|
||||
\fn QPolygon::QPolygon(const QList<QPoint> &points)
|
||||
|
||||
Constructs a polygon containing the specified \a points.
|
||||
|
||||
@ -438,7 +438,7 @@ void QPolygon::putPoints(int index, int nPoints, const QPolygon & from, int from
|
||||
Returns the bounding rectangle of the polygon, or QRect(0, 0, 0,
|
||||
0) if the polygon is empty.
|
||||
|
||||
\sa QVector::isEmpty()
|
||||
\sa QList::isEmpty()
|
||||
*/
|
||||
|
||||
QRect QPolygon::boundingRect() const
|
||||
@ -479,7 +479,7 @@ QDebug operator<<(QDebug dbg, const QPolygon &a)
|
||||
|
||||
/*!
|
||||
\class QPolygonF
|
||||
\brief The QPolygonF class provides a vector of points using
|
||||
\brief The QPolygonF class provides a list of points using
|
||||
floating point precision.
|
||||
\inmodule QtGui
|
||||
|
||||
@ -487,13 +487,13 @@ QDebug operator<<(QDebug dbg, const QPolygon &a)
|
||||
\ingroup painting
|
||||
\ingroup shared
|
||||
|
||||
A QPolygonF is a QVector<QPointF>. The easiest way to add points
|
||||
A QPolygonF is a QList<QPointF>. The easiest way to add points
|
||||
to a QPolygonF is to use its streaming operator, as illustrated
|
||||
below:
|
||||
|
||||
\snippet polygon/polygon.cpp 1
|
||||
|
||||
In addition to the functions provided by QVector, QPolygonF
|
||||
In addition to the functions provided by QList, QPolygonF
|
||||
provides the boundingRect() and translate() functions for geometry
|
||||
operations. Use the QTransform::map() function for more general
|
||||
transformations of QPolygonFs.
|
||||
@ -506,7 +506,7 @@ QDebug operator<<(QDebug dbg, const QPolygon &a)
|
||||
The QPolygonF class is \l {Implicit Data Sharing}{implicitly
|
||||
shared}.
|
||||
|
||||
\sa QVector, QPolygon, QLineF
|
||||
\sa QList, QPolygon, QLineF
|
||||
*/
|
||||
|
||||
|
||||
@ -519,7 +519,7 @@ QDebug operator<<(QDebug dbg, const QPolygon &a)
|
||||
|
||||
Constructs a polygon with no points.
|
||||
|
||||
\sa QVector::isEmpty()
|
||||
\sa QList::isEmpty()
|
||||
*/
|
||||
|
||||
/*!
|
||||
@ -528,7 +528,7 @@ QDebug operator<<(QDebug dbg, const QPolygon &a)
|
||||
Constructs a polygon of the given \a size. Creates an empty
|
||||
polygon if \a size == 0.
|
||||
|
||||
\sa QVector::isEmpty()
|
||||
\sa QList::isEmpty()
|
||||
*/
|
||||
|
||||
/*!
|
||||
@ -538,7 +538,7 @@ QDebug operator<<(QDebug dbg, const QPolygon &a)
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QPolygonF::QPolygonF(const QVector<QPointF> &points)
|
||||
\fn QPolygonF::QPolygonF(const QList<QPointF> &points)
|
||||
|
||||
Constructs a polygon containing the specified \a points.
|
||||
*/
|
||||
@ -645,14 +645,14 @@ QPolygonF QPolygonF::translated(const QPointF &offset) const
|
||||
|
||||
A polygon is said to be closed if its start point and end point are equal.
|
||||
|
||||
\sa QVector::first(), QVector::last()
|
||||
\sa QList::first(), QList::last()
|
||||
*/
|
||||
|
||||
/*!
|
||||
Returns the bounding rectangle of the polygon, or QRectF(0,0,0,0)
|
||||
if the polygon is empty.
|
||||
|
||||
\sa QVector::isEmpty()
|
||||
\sa QList::isEmpty()
|
||||
*/
|
||||
|
||||
QRectF QPolygonF::boundingRect() const
|
||||
@ -735,7 +735,7 @@ QPolygon::operator QVariant() const
|
||||
*/
|
||||
QDataStream &operator<<(QDataStream &s, const QPolygon &a)
|
||||
{
|
||||
const QVector<QPoint> &v = a;
|
||||
const QList<QPoint> &v = a;
|
||||
return s << v;
|
||||
}
|
||||
|
||||
@ -751,7 +751,7 @@ QDataStream &operator<<(QDataStream &s, const QPolygon &a)
|
||||
*/
|
||||
QDataStream &operator>>(QDataStream &s, QPolygon &a)
|
||||
{
|
||||
QVector<QPoint> &v = a;
|
||||
QList<QPoint> &v = a;
|
||||
return s >> v;
|
||||
}
|
||||
#endif // QT_NO_DATASTREAM
|
||||
|
@ -1101,7 +1101,7 @@ Q_GUI_EXPORT QPainterPath qt_regionToPath(const QRegion ®ion)
|
||||
struct QRegionPrivate {
|
||||
int numRects;
|
||||
int innerArea;
|
||||
QVector<QRect> rects;
|
||||
QList<QRect> rects;
|
||||
QRect extents;
|
||||
QRect innerRect;
|
||||
|
||||
@ -2173,7 +2173,7 @@ static void miRegionOp(QRegionPrivate &dest,
|
||||
* reg1->rects and reg2->rects (if the regions have more than 1 rectangle),
|
||||
* take a copy of dest.rects to keep those iteractors valid.
|
||||
*/
|
||||
const QVector<QRect> destRectsCopy = dest.rects;
|
||||
const QList<QRect> destRectsCopy = dest.rects;
|
||||
Q_UNUSED(destRectsCopy);
|
||||
|
||||
dest.numRects = 0;
|
||||
|
@ -1028,13 +1028,13 @@ QDashStroker::~QDashStroker()
|
||||
{
|
||||
}
|
||||
|
||||
QVector<qfixed> QDashStroker::patternForStyle(Qt::PenStyle style)
|
||||
QList<qfixed> QDashStroker::patternForStyle(Qt::PenStyle style)
|
||||
{
|
||||
const qfixed space = 2;
|
||||
const qfixed dot = 1;
|
||||
const qfixed dash = 4;
|
||||
|
||||
QVector<qfixed> pattern;
|
||||
QList<qfixed> pattern;
|
||||
|
||||
switch (style) {
|
||||
case Qt::DashLine:
|
||||
|
@ -66,8 +66,8 @@ struct QVertexSet
|
||||
QVertexSet<T> &operator = (const QVertexSet<T> &other) {vertices = other.vertices; indices = other.indices; return *this;}
|
||||
|
||||
// The vertices of a triangle are given by: (x[i[n]], y[i[n]]), (x[j[n]], y[j[n]]), (x[k[n]], y[k[n]]), n = 0, 1, ...
|
||||
QVector<qreal> vertices; // [x[0], y[0], x[1], y[1], x[2], ...]
|
||||
QVector<T> indices; // [i[0], j[0], k[0], i[1], j[1], k[1], i[2], ...]
|
||||
QList<qreal> vertices; // [x[0], y[0], x[1], y[1], x[2], ...]
|
||||
QList<T> indices; // [i[0], j[0], k[0], i[1], j[1], k[1], i[2], ...]
|
||||
};
|
||||
|
||||
//============================================================================//
|
||||
@ -761,7 +761,7 @@ public:
|
||||
QVertexSet<T> polyline();
|
||||
private:
|
||||
QDataBuffer<QPodPoint> m_vertices;
|
||||
QVector<T> m_indices;
|
||||
QList<T> m_indices;
|
||||
uint m_hint;
|
||||
};
|
||||
|
||||
@ -2155,7 +2155,7 @@ bool QTriangulator<T>::SimpleToMonotone::CompareVertices::operator () (int i, in
|
||||
template <typename T>
|
||||
void QTriangulator<T>::MonotoneToTriangles::decompose()
|
||||
{
|
||||
QVector<T> result;
|
||||
QList<T> result;
|
||||
QDataBuffer<int> stack(m_parent->m_indices.size());
|
||||
m_first = 0;
|
||||
// Require at least three more indices.
|
||||
|
@ -63,8 +63,8 @@ QT_BEGIN_NAMESPACE
|
||||
class QDBusPlatformMenu;
|
||||
class QDBusPlatformMenuItem;
|
||||
class QDBusMenuItem;
|
||||
typedef QVector<QDBusMenuItem> QDBusMenuItemList;
|
||||
typedef QVector<QStringList> QDBusMenuShortcut;
|
||||
typedef QList<QDBusMenuItem> QDBusMenuItemList;
|
||||
typedef QList<QStringList> QDBusMenuShortcut;
|
||||
|
||||
class QDBusMenuItem
|
||||
{
|
||||
@ -99,7 +99,7 @@ Q_DECLARE_TYPEINFO(QDBusMenuItemKeys, Q_MOVABLE_TYPE);
|
||||
const QDBusArgument &operator<<(QDBusArgument &arg, const QDBusMenuItemKeys &keys);
|
||||
const QDBusArgument &operator>>(const QDBusArgument &arg, QDBusMenuItemKeys &keys);
|
||||
|
||||
typedef QVector<QDBusMenuItemKeys> QDBusMenuItemKeysList;
|
||||
typedef QList<QDBusMenuItemKeys> QDBusMenuItemKeysList;
|
||||
|
||||
class QDBusMenuLayoutItem
|
||||
{
|
||||
@ -110,14 +110,14 @@ public:
|
||||
|
||||
int m_id;
|
||||
QVariantMap m_properties;
|
||||
QVector<QDBusMenuLayoutItem> m_children;
|
||||
QList<QDBusMenuLayoutItem> m_children;
|
||||
};
|
||||
Q_DECLARE_TYPEINFO(QDBusMenuLayoutItem, Q_MOVABLE_TYPE);
|
||||
|
||||
const QDBusArgument &operator<<(QDBusArgument &arg, const QDBusMenuLayoutItem &);
|
||||
const QDBusArgument &operator>>(const QDBusArgument &arg, QDBusMenuLayoutItem &item);
|
||||
|
||||
typedef QVector<QDBusMenuLayoutItem> QDBusMenuLayoutItemList;
|
||||
typedef QList<QDBusMenuLayoutItem> QDBusMenuLayoutItemList;
|
||||
|
||||
class QDBusMenuEvent
|
||||
{
|
||||
@ -133,7 +133,7 @@ Q_DECLARE_TYPEINFO(QDBusMenuEvent, Q_MOVABLE_TYPE); // QDBusVariant is movable,
|
||||
const QDBusArgument &operator<<(QDBusArgument &arg, const QDBusMenuEvent &ev);
|
||||
const QDBusArgument &operator>>(const QDBusArgument &arg, QDBusMenuEvent &ev);
|
||||
|
||||
typedef QVector<QDBusMenuEvent> QDBusMenuEventList;
|
||||
typedef QList<QDBusMenuEvent> QDBusMenuEventList;
|
||||
|
||||
#ifndef QT_NO_DEBUG_STREAM
|
||||
QDebug operator<<(QDebug d, const QDBusMenuItem &item);
|
||||
|
@ -77,7 +77,7 @@ struct QXdgDBusImageStruct
|
||||
};
|
||||
Q_DECLARE_TYPEINFO(QXdgDBusImageStruct, Q_MOVABLE_TYPE);
|
||||
|
||||
typedef QVector<QXdgDBusImageStruct> QXdgDBusImageVector;
|
||||
using QXdgDBusImageVector = QList<QXdgDBusImageStruct>;
|
||||
|
||||
QXdgDBusImageVector iconToQXdgDBusImageVector(const QIcon &icon);
|
||||
|
||||
|
@ -485,7 +485,7 @@ QList<xkb_keysym_t> QXkbCommon::toKeysym(QKeyEvent *event)
|
||||
return keysyms;
|
||||
}
|
||||
|
||||
QVector<uint> ucs4;
|
||||
QList<uint> ucs4;
|
||||
if (event->text().isEmpty())
|
||||
ucs4.append(qtKey);
|
||||
else
|
||||
|
@ -1632,7 +1632,7 @@ QRhiTextureUploadEntry::QRhiTextureUploadEntry(int layer, int level,
|
||||
\badcode
|
||||
QImage faces[6];
|
||||
...
|
||||
QVector<QRhiTextureUploadEntry> entries;
|
||||
QList<QRhiTextureUploadEntry> entries;
|
||||
for (int i = 0; i < 6; ++i)
|
||||
entries.append(QRhiTextureUploadEntry(i, 0, faces[i]));
|
||||
QRhiTextureUploadDescription desc(entries);
|
||||
@ -3337,7 +3337,7 @@ QDebug operator<<(QDebug dbg, const QRhiShaderResourceBindings &srb)
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void QRhiGraphicsPipeline::setTargetBlends(const QVector<TargetBlend> &blends)
|
||||
\fn void QRhiGraphicsPipeline::setTargetBlends(const QList<TargetBlend> &blends)
|
||||
|
||||
Sets the blend specification for color attachments. Each element in \a
|
||||
blends corresponds to a color attachment of the render target.
|
||||
@ -5850,7 +5850,7 @@ QRhi::FrameOpResult QRhi::finish()
|
||||
with some others the (physical) device properties indicate what is
|
||||
supported at run time.
|
||||
*/
|
||||
QVector<int> QRhi::supportedSampleCounts() const
|
||||
QList<int> QRhi::supportedSampleCounts() const
|
||||
{
|
||||
return d->supportedSampleCounts();
|
||||
}
|
||||
|
@ -395,7 +395,7 @@ void QRhiD3D11::reportLiveObjects(ID3D11Device *device)
|
||||
}
|
||||
}
|
||||
|
||||
QVector<int> QRhiD3D11::supportedSampleCounts() const
|
||||
QList<int> QRhiD3D11::supportedSampleCounts() const
|
||||
{
|
||||
return { 1, 2, 4, 8 };
|
||||
}
|
||||
|
@ -594,7 +594,7 @@ void QRhiGles2::executeDeferredReleases()
|
||||
}
|
||||
}
|
||||
|
||||
QVector<int> QRhiGles2::supportedSampleCounts() const
|
||||
QList<int> QRhiGles2::supportedSampleCounts() const
|
||||
{
|
||||
if (supportedSampleCountList.isEmpty()) {
|
||||
// 1, 2, 4, 8, ...
|
||||
@ -3294,7 +3294,7 @@ static inline GLenum toGlShaderType(QRhiShaderStage::Type type)
|
||||
QByteArray QRhiGles2::shaderSource(const QRhiShaderStage &shaderStage, int *glslVersion)
|
||||
{
|
||||
const QShader bakedShader = shaderStage.shader();
|
||||
QVector<int> versionsToTry;
|
||||
QList<int> versionsToTry;
|
||||
QByteArray source;
|
||||
if (caps.gles) {
|
||||
if (caps.ctxMajor > 3 || (caps.ctxMajor == 3 && caps.ctxMinor >= 2)) {
|
||||
|
@ -83,7 +83,7 @@ void QRhiNull::destroy()
|
||||
{
|
||||
}
|
||||
|
||||
QVector<int> QRhiNull::supportedSampleCounts() const
|
||||
QList<int> QRhiNull::supportedSampleCounts() const
|
||||
{
|
||||
return { 1 };
|
||||
}
|
||||
|
@ -489,7 +489,7 @@ void QRhiProfilerPrivate::releaseSwapChain(QRhiSwapChain *sc)
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void calcTiming(QVector<T> *vec, T *minDelta, T *maxDelta, float *avgDelta)
|
||||
void calcTiming(QList<T> *vec, T *minDelta, T *maxDelta, float *avgDelta)
|
||||
{
|
||||
if (vec->isEmpty())
|
||||
return;
|
||||
|
@ -376,7 +376,7 @@ bool QRhiVulkan::create(QRhi::Flags flags)
|
||||
|
||||
f = inst->functions();
|
||||
|
||||
QVector<VkQueueFamilyProperties> queueFamilyProps;
|
||||
QList<VkQueueFamilyProperties> queueFamilyProps;
|
||||
auto queryQueueFamilyProps = [this, &queueFamilyProps] {
|
||||
uint32_t queueCount = 0;
|
||||
f->vkGetPhysicalDeviceQueueFamilyProperties(physDev, &queueCount, nullptr);
|
||||
@ -492,7 +492,7 @@ bool QRhiVulkan::create(QRhi::Flags flags)
|
||||
queueInfo[0].queueCount = 1;
|
||||
queueInfo[0].pQueuePriorities = prio;
|
||||
|
||||
QVector<const char *> devLayers;
|
||||
QList<const char *> devLayers;
|
||||
if (inst->layers().contains("VK_LAYER_LUNARG_standard_validation"))
|
||||
devLayers.append("VK_LAYER_LUNARG_standard_validation");
|
||||
|
||||
@ -500,14 +500,14 @@ bool QRhiVulkan::create(QRhi::Flags flags)
|
||||
uint32_t devExtCount = 0;
|
||||
f->vkEnumerateDeviceExtensionProperties(physDev, nullptr, &devExtCount, nullptr);
|
||||
if (devExtCount) {
|
||||
QVector<VkExtensionProperties> extProps(devExtCount);
|
||||
QList<VkExtensionProperties> extProps(devExtCount);
|
||||
f->vkEnumerateDeviceExtensionProperties(physDev, nullptr, &devExtCount, extProps.data());
|
||||
for (const VkExtensionProperties &p : qAsConst(extProps))
|
||||
devExts.append({ p.extensionName, p.specVersion });
|
||||
}
|
||||
qCDebug(QRHI_LOG_INFO, "%d device extensions available", int(devExts.count()));
|
||||
|
||||
QVector<const char *> requestedDevExts;
|
||||
QList<const char *> requestedDevExts;
|
||||
requestedDevExts.append("VK_KHR_swapchain");
|
||||
|
||||
debugMarkersAvailable = false;
|
||||
@ -3101,7 +3101,7 @@ void QRhiVulkan::enqueueResourceUpdates(QVkCommandBuffer *cbD, QRhiResourceUpdat
|
||||
|
||||
for (int layer = 0; layer < QRhi::MAX_LAYERS; ++layer) {
|
||||
for (int level = 0; level < QRhi::MAX_LEVELS; ++level) {
|
||||
const QVector<QRhiTextureSubresourceUploadDescription> &srd(u.subresDesc[layer][level]);
|
||||
const QList<QRhiTextureSubresourceUploadDescription> &srd(u.subresDesc[layer][level]);
|
||||
if (srd.isEmpty())
|
||||
continue;
|
||||
for (const QRhiTextureSubresourceUploadDescription &subresDesc : qAsConst(srd)) {
|
||||
@ -3581,13 +3581,13 @@ static struct {
|
||||
{ VK_SAMPLE_COUNT_64_BIT, 64 }
|
||||
};
|
||||
|
||||
QVector<int> QRhiVulkan::supportedSampleCounts() const
|
||||
QList<int> QRhiVulkan::supportedSampleCounts() const
|
||||
{
|
||||
const VkPhysicalDeviceLimits *limits = &physDevProperties.limits;
|
||||
VkSampleCountFlags color = limits->framebufferColorSampleCounts;
|
||||
VkSampleCountFlags depth = limits->framebufferDepthSampleCounts;
|
||||
VkSampleCountFlags stencil = limits->framebufferStencilSampleCounts;
|
||||
QVector<int> result;
|
||||
QList<int> result;
|
||||
|
||||
for (const auto &qvk_sampleCount : qvk_sampleCounts) {
|
||||
if ((color & qvk_sampleCount.mask)
|
||||
@ -6711,7 +6711,7 @@ bool QVkSwapChain::ensureSurface()
|
||||
|
||||
quint32 formatCount = 0;
|
||||
rhiD->vkGetPhysicalDeviceSurfaceFormatsKHR(rhiD->physDev, surface, &formatCount, nullptr);
|
||||
QVector<VkSurfaceFormatKHR> formats(formatCount);
|
||||
QList<VkSurfaceFormatKHR> formats(formatCount);
|
||||
if (formatCount)
|
||||
rhiD->vkGetPhysicalDeviceSurfaceFormatsKHR(rhiD->physDev, surface, &formatCount, formats.data());
|
||||
|
||||
|
@ -304,7 +304,7 @@ void QShader::setDescription(const QShaderDescription &desc)
|
||||
/*!
|
||||
\return the list of available shader versions
|
||||
*/
|
||||
QVector<QShaderKey> QShader::availableShaders() const
|
||||
QList<QShaderKey> QShader::availableShaders() const
|
||||
{
|
||||
return d->shaders.keys().toVector();
|
||||
}
|
||||
|
@ -417,7 +417,7 @@ QShaderDescription QShaderDescription::deserialize(QDataStream *stream, int vers
|
||||
called attributes) for the vertex stage, and inputs for other stages
|
||||
(sometimes called varyings).
|
||||
*/
|
||||
QVector<QShaderDescription::InOutVariable> QShaderDescription::inputVariables() const
|
||||
QList<QShaderDescription::InOutVariable> QShaderDescription::inputVariables() const
|
||||
{
|
||||
return d->inVars;
|
||||
}
|
||||
@ -425,7 +425,7 @@ QVector<QShaderDescription::InOutVariable> QShaderDescription::inputVariables()
|
||||
/*!
|
||||
\return the list of output variables.
|
||||
*/
|
||||
QVector<QShaderDescription::InOutVariable> QShaderDescription::outputVariables() const
|
||||
QList<QShaderDescription::InOutVariable> QShaderDescription::outputVariables() const
|
||||
{
|
||||
return d->outVars;
|
||||
}
|
||||
@ -433,7 +433,7 @@ QVector<QShaderDescription::InOutVariable> QShaderDescription::outputVariables()
|
||||
/*!
|
||||
\return the list of uniform blocks.
|
||||
*/
|
||||
QVector<QShaderDescription::UniformBlock> QShaderDescription::uniformBlocks() const
|
||||
QList<QShaderDescription::UniformBlock> QShaderDescription::uniformBlocks() const
|
||||
{
|
||||
return d->uniformBlocks;
|
||||
}
|
||||
@ -445,7 +445,7 @@ QVector<QShaderDescription::UniformBlock> QShaderDescription::uniformBlocks() co
|
||||
in combination with the Qt Rendering Hardware Interface since that
|
||||
currently has no support for them.
|
||||
*/
|
||||
QVector<QShaderDescription::PushConstantBlock> QShaderDescription::pushConstantBlocks() const
|
||||
QList<QShaderDescription::PushConstantBlock> QShaderDescription::pushConstantBlocks() const
|
||||
{
|
||||
return d->pushConstantBlocks;
|
||||
}
|
||||
@ -516,7 +516,7 @@ QVector<QShaderDescription::PushConstantBlock> QShaderDescription::pushConstantB
|
||||
\note SSBOs are not available with some graphics APIs, such as, OpenGL 2.x or
|
||||
OpenGL ES older than 3.1.
|
||||
*/
|
||||
QVector<QShaderDescription::StorageBlock> QShaderDescription::storageBlocks() const
|
||||
QList<QShaderDescription::StorageBlock> QShaderDescription::storageBlocks() const
|
||||
{
|
||||
return d->storageBlocks;
|
||||
}
|
||||
@ -543,7 +543,7 @@ QVector<QShaderDescription::StorageBlock> QShaderDescription::storageBlocks() co
|
||||
exist everywhere. For instance, a HLSL version will likely just use a
|
||||
Texture2D and SamplerState object with registers t1 and s1, respectively.
|
||||
*/
|
||||
QVector<QShaderDescription::InOutVariable> QShaderDescription::combinedImageSamplers() const
|
||||
QList<QShaderDescription::InOutVariable> QShaderDescription::combinedImageSamplers() const
|
||||
{
|
||||
return d->combinedImageSamplers;
|
||||
}
|
||||
@ -570,7 +570,7 @@ QVector<QShaderDescription::InOutVariable> QShaderDescription::combinedImageSamp
|
||||
\note Separate image objects are not compatible with some graphics APIs,
|
||||
such as, OpenGL 2.x or OpenGL ES older than 3.1.
|
||||
*/
|
||||
QVector<QShaderDescription::InOutVariable> QShaderDescription::storageImages() const
|
||||
QList<QShaderDescription::InOutVariable> QShaderDescription::storageImages() const
|
||||
{
|
||||
return d->storageImages;
|
||||
}
|
||||
|
@ -357,7 +357,7 @@ QTextObjectInterface::~QTextObjectInterface()
|
||||
\brief the collection of selections that will be rendered when passing this
|
||||
paint context to QAbstractTextDocumentLayout's draw() function.
|
||||
|
||||
The default value is an empty vector indicating no selection.
|
||||
The default value is an empty list indicating no selection.
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
@ -399,7 +399,7 @@ static inline bool isInheritable(Property propertyId)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Value Extractor
|
||||
ValueExtractor::ValueExtractor(const QVector<Declaration> &decls, const QPalette &pal)
|
||||
ValueExtractor::ValueExtractor(const QList<Declaration> &decls, const QPalette &pal)
|
||||
: declarations(decls), adjustment(0), fontExtracted(false), pal(pal)
|
||||
{
|
||||
}
|
||||
@ -752,7 +752,7 @@ static ColorData parseColorValue(QCss::Value v)
|
||||
if (!p.testExpr())
|
||||
return ColorData();
|
||||
|
||||
QVector<QCss::Value> colorDigits;
|
||||
QList<QCss::Value> colorDigits;
|
||||
if (!p.parseExpr(&colorDigits))
|
||||
return ColorData();
|
||||
const int tokenCount = colorDigits.count();
|
||||
@ -830,7 +830,7 @@ static BrushData parseBrushValue(const QCss::Value &v, const QPalette &pal)
|
||||
return BrushData();
|
||||
|
||||
QHash<QString, qreal> vars;
|
||||
QVector<QGradientStop> stops;
|
||||
QList<QGradientStop> stops;
|
||||
|
||||
int spread = -1;
|
||||
QStringList spreads;
|
||||
@ -1009,7 +1009,7 @@ void ValueExtractor::borderValue(const Declaration &decl, int *width, QCss::Bord
|
||||
decl.d->parsed = QVariant::fromValue<BorderData>(data);
|
||||
}
|
||||
|
||||
static void parseShorthandBackgroundProperty(const QVector<QCss::Value> &values, BrushData *brush, QString *image, Repeat *repeat, Qt::Alignment *alignment, const QPalette &pal)
|
||||
static void parseShorthandBackgroundProperty(const QList<QCss::Value> &values, BrushData *brush, QString *image, Repeat *repeat, Qt::Alignment *alignment, const QPalette &pal)
|
||||
{
|
||||
*brush = BrushData();
|
||||
*image = QString();
|
||||
@ -1202,7 +1202,7 @@ static bool setFontWeightFromValue(const QCss::Value &value, QFont *font)
|
||||
* and set it the \a font
|
||||
* The function returns \c true if a family was extracted.
|
||||
*/
|
||||
static bool setFontFamilyFromValues(const QVector<QCss::Value> &values, QFont *font, int start = 0)
|
||||
static bool setFontFamilyFromValues(const QList<QCss::Value> &values, QFont *font, int start = 0)
|
||||
{
|
||||
QString family;
|
||||
QStringList families;
|
||||
@ -1232,7 +1232,7 @@ static bool setFontFamilyFromValues(const QVector<QCss::Value> &values, QFont *f
|
||||
return true;
|
||||
}
|
||||
|
||||
static void setTextDecorationFromValues(const QVector<QCss::Value> &values, QFont *font)
|
||||
static void setTextDecorationFromValues(const QList<QCss::Value> &values, QFont *font)
|
||||
{
|
||||
for (int i = 0; i < values.count(); ++i) {
|
||||
if (values.at(i).type != Value::KnownIdentifier)
|
||||
@ -1282,7 +1282,7 @@ static void setWordSpacingFromValue(const QCss::Value &value, QFont *font)
|
||||
}
|
||||
}
|
||||
|
||||
static void parseShorthandFontProperty(const QVector<QCss::Value> &values, QFont *font, int *fontSizeAdjustment)
|
||||
static void parseShorthandFontProperty(const QList<QCss::Value> &values, QFont *font, int *fontSizeAdjustment)
|
||||
{
|
||||
font->setStyle(QFont::StyleNormal);
|
||||
font->setWeight(QFont::Normal);
|
||||
@ -1900,10 +1900,10 @@ quint64 Selector::pseudoClass(quint64 *negated) const
|
||||
// StyleSheet
|
||||
void StyleSheet::buildIndexes(Qt::CaseSensitivity nameCaseSensitivity)
|
||||
{
|
||||
QVector<StyleRule> universals;
|
||||
QList<StyleRule> universals;
|
||||
for (int i = 0; i < styleRules.count(); ++i) {
|
||||
const StyleRule &rule = styleRules.at(i);
|
||||
QVector<Selector> universalsSelectors;
|
||||
QList<Selector> universalsSelectors;
|
||||
for (int j = 0; j < rule.selectors.count(); ++j) {
|
||||
const Selector& selector = rule.selectors.at(j);
|
||||
|
||||
@ -2106,9 +2106,9 @@ void StyleSelector::matchRule(NodePtr node, const StyleRule &rule, StyleSheetOri
|
||||
|
||||
// Returns style rules that are in ascending order of specificity
|
||||
// Each of the StyleRule returned will contain exactly one Selector
|
||||
QVector<StyleRule> StyleSelector::styleRulesForNode(NodePtr node)
|
||||
QList<StyleRule> StyleSelector::styleRulesForNode(NodePtr node)
|
||||
{
|
||||
QVector<StyleRule> rules;
|
||||
QList<StyleRule> rules;
|
||||
if (styleSheets.isEmpty())
|
||||
return rules;
|
||||
|
||||
@ -2167,10 +2167,10 @@ QVector<StyleRule> StyleSelector::styleRulesForNode(NodePtr node)
|
||||
|
||||
// for qtexthtmlparser which requires just the declarations with Enabled state
|
||||
// and without pseudo elements
|
||||
QVector<Declaration> StyleSelector::declarationsForNode(NodePtr node, const char *extraPseudo)
|
||||
QList<Declaration> StyleSelector::declarationsForNode(NodePtr node, const char *extraPseudo)
|
||||
{
|
||||
QVector<Declaration> decls;
|
||||
QVector<StyleRule> rules = styleRulesForNode(node);
|
||||
QList<Declaration> decls;
|
||||
QList<StyleRule> rules = styleRulesForNode(node);
|
||||
for (int i = 0; i < rules.count(); i++) {
|
||||
const Selector& selector = rules.at(i).selectors.at(0);
|
||||
const QString pseudoElement = selector.pseudoElement();
|
||||
@ -2253,7 +2253,7 @@ int QCssScanner_Generated::handleCommentStart()
|
||||
return S;
|
||||
}
|
||||
|
||||
void Scanner::scan(const QString &preprocessedInput, QVector<Symbol> *symbols)
|
||||
void Scanner::scan(const QString &preprocessedInput, QList<Symbol> *symbols)
|
||||
{
|
||||
QCssScanner_Generated scanner(preprocessedInput);
|
||||
Symbol sym;
|
||||
@ -2710,7 +2710,7 @@ bool Parser::parsePrio(Declaration *declaration)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Parser::parseExpr(QVector<Value> *values)
|
||||
bool Parser::parseExpr(QList<Value> *values)
|
||||
{
|
||||
Value val;
|
||||
if (!parseTerm(&val)) return false;
|
||||
|
@ -796,7 +796,7 @@ bool qt_fontHasNarrowOutlines(const QRawFont &f)
|
||||
if (!font.isValid())
|
||||
return false;
|
||||
|
||||
QVector<quint32> glyphIndices = font.glyphIndexesForString(QLatin1String("O"));
|
||||
QList<quint32> glyphIndices = font.glyphIndexesForString(QLatin1String("O"));
|
||||
if (glyphIndices.isEmpty() || glyphIndices[0] == 0)
|
||||
return false;
|
||||
|
||||
|
@ -112,7 +112,7 @@ QByteArray QFontSubset::glyphName(unsigned short unicode, bool symbol)
|
||||
return buffer;
|
||||
}
|
||||
|
||||
QByteArray QFontSubset::glyphName(unsigned int glyph, const QVector<int> &reverseMap) const
|
||||
QByteArray QFontSubset::glyphName(unsigned int glyph, const QList<int> &reverseMap) const
|
||||
{
|
||||
uint glyphIndex = glyph_indices[glyph];
|
||||
|
||||
@ -197,9 +197,9 @@ static void checkRanges(QPdf::ByteStream &ts, QByteArray &ranges, int &nranges)
|
||||
}
|
||||
}
|
||||
|
||||
QVector<int> QFontSubset::getReverseMap() const
|
||||
QList<int> QFontSubset::getReverseMap() const
|
||||
{
|
||||
QVector<int> reverseMap(0x10000, 0);
|
||||
QList<int> reverseMap(0x10000, 0);
|
||||
for (uint uc = 0; uc < 0x10000; ++uc) {
|
||||
int idx = glyph_indices.indexOf(fontEngine->glyphIndex(uc));
|
||||
if (idx >= 0 && !reverseMap.at(idx))
|
||||
@ -210,7 +210,7 @@ QVector<int> QFontSubset::getReverseMap() const
|
||||
|
||||
QByteArray QFontSubset::createToUnicodeMap() const
|
||||
{
|
||||
QVector<int> reverseMap = getReverseMap();
|
||||
QList<int> reverseMap = getReverseMap();
|
||||
|
||||
QByteArray touc;
|
||||
QPdf::ByteStream ts(&touc);
|
||||
@ -423,9 +423,9 @@ Q_DECLARE_TYPEINFO(QTtfGlyph, Q_MOVABLE_TYPE);
|
||||
|
||||
static QTtfGlyph generateGlyph(int index, const QPainterPath &path, qreal advance, qreal lsb, qreal ppem);
|
||||
// generates glyf, loca and hmtx
|
||||
static QVector<QTtfTable> generateGlyphTables(qttf_font_tables &tables, const QVector<QTtfGlyph> &_glyphs);
|
||||
static QList<QTtfTable> generateGlyphTables(qttf_font_tables &tables, const QList<QTtfGlyph> &_glyphs);
|
||||
|
||||
static QByteArray bindFont(const QVector<QTtfTable>& _tables);
|
||||
static QByteArray bindFont(const QList<QTtfTable>& _tables);
|
||||
|
||||
|
||||
static quint32 checksum(const QByteArray &table)
|
||||
@ -621,11 +621,11 @@ struct QTtfNameRecord {
|
||||
};
|
||||
Q_DECLARE_TYPEINFO(QTtfNameRecord, Q_MOVABLE_TYPE);
|
||||
|
||||
static QTtfTable generateName(const QVector<QTtfNameRecord> &name);
|
||||
static QTtfTable generateName(const QList<QTtfNameRecord> &name);
|
||||
|
||||
static QTtfTable generateName(const qttf_name_table &name)
|
||||
{
|
||||
QVector<QTtfNameRecord> list;
|
||||
QList<QTtfNameRecord> list;
|
||||
list.reserve(5);
|
||||
QTtfNameRecord rec;
|
||||
rec.nameId = 0;
|
||||
@ -650,7 +650,7 @@ static QTtfTable generateName(const qttf_name_table &name)
|
||||
}
|
||||
|
||||
// ####### should probably generate Macintosh/Roman name entries as well
|
||||
static QTtfTable generateName(const QVector<QTtfNameRecord> &name)
|
||||
static QTtfTable generateName(const QList<QTtfNameRecord> &name)
|
||||
{
|
||||
const int char_size = 2;
|
||||
|
||||
@ -721,7 +721,7 @@ struct TTF_POINT {
|
||||
};
|
||||
Q_DECLARE_TYPEINFO(TTF_POINT, Q_PRIMITIVE_TYPE);
|
||||
|
||||
static void convertPath(const QPainterPath &path, QVector<TTF_POINT> *points, QVector<int> *endPoints, qreal ppem)
|
||||
static void convertPath(const QPainterPath &path, QList<TTF_POINT> *points, QList<int> *endPoints, qreal ppem)
|
||||
{
|
||||
int numElements = path.elementCount();
|
||||
for (int i = 0; i < numElements - 1; ++i) {
|
||||
@ -843,7 +843,7 @@ static void convertPath(const QPainterPath &path, QVector<TTF_POINT> *points, QV
|
||||
endPoints->append(points->size() - 1);
|
||||
}
|
||||
|
||||
static void getBounds(const QVector<TTF_POINT> &points, qint16 *xmin, qint16 *xmax, qint16 *ymin, qint16 *ymax)
|
||||
static void getBounds(const QList<TTF_POINT> &points, qint16 *xmin, qint16 *xmax, qint16 *ymin, qint16 *ymax)
|
||||
{
|
||||
*xmin = points.at(0).x;
|
||||
*xmax = *xmin;
|
||||
@ -858,7 +858,7 @@ static void getBounds(const QVector<TTF_POINT> &points, qint16 *xmin, qint16 *xm
|
||||
}
|
||||
}
|
||||
|
||||
static int convertToRelative(QVector<TTF_POINT> *points)
|
||||
static int convertToRelative(QList<TTF_POINT> *points)
|
||||
{
|
||||
// convert points to relative and setup flags
|
||||
// qDebug("relative points:");
|
||||
@ -911,7 +911,7 @@ static int convertToRelative(QVector<TTF_POINT> *points)
|
||||
return point_array_size;
|
||||
}
|
||||
|
||||
static void getGlyphData(QTtfGlyph *glyph, const QVector<TTF_POINT> &points, const QVector<int> &endPoints, int point_array_size)
|
||||
static void getGlyphData(QTtfGlyph *glyph, const QList<TTF_POINT> &points, const QList<int> &endPoints, int point_array_size)
|
||||
{
|
||||
const int max_size = 5*sizeof(qint16) // header
|
||||
+ endPoints.size()*sizeof(quint16) // end points of contours
|
||||
@ -961,8 +961,8 @@ static void getGlyphData(QTtfGlyph *glyph, const QVector<TTF_POINT> &points, con
|
||||
|
||||
static QTtfGlyph generateGlyph(int index, const QPainterPath &path, qreal advance, qreal lsb, qreal ppem)
|
||||
{
|
||||
QVector<TTF_POINT> points;
|
||||
QVector<int> endPoints;
|
||||
QList<TTF_POINT> points;
|
||||
QList<int> endPoints;
|
||||
QTtfGlyph glyph;
|
||||
glyph.index = index;
|
||||
glyph.advanceWidth = qRound(advance * 2048. / ppem);
|
||||
@ -997,10 +997,10 @@ static bool operator <(const QTtfGlyph &g1, const QTtfGlyph &g2)
|
||||
return g1.index < g2.index;
|
||||
}
|
||||
|
||||
static QVector<QTtfTable> generateGlyphTables(qttf_font_tables &tables, const QVector<QTtfGlyph> &_glyphs)
|
||||
static QList<QTtfTable> generateGlyphTables(qttf_font_tables &tables, const QList<QTtfGlyph> &_glyphs)
|
||||
{
|
||||
const int max_size_small = 65536*2;
|
||||
QVector<QTtfGlyph> glyphs = _glyphs;
|
||||
QList<QTtfGlyph> glyphs = _glyphs;
|
||||
std::sort(glyphs.begin(), glyphs.end());
|
||||
|
||||
Q_ASSERT(tables.maxp.numGlyphs == glyphs.at(glyphs.size()-1).index + 1);
|
||||
@ -1063,7 +1063,7 @@ static QVector<QTtfTable> generateGlyphTables(qttf_font_tables &tables, const QV
|
||||
Q_ASSERT(loca.data.size() == ls.offset());
|
||||
Q_ASSERT(hmtx.data.size() == hs.offset());
|
||||
|
||||
QVector<QTtfTable> list;
|
||||
QList<QTtfTable> list;
|
||||
list.reserve(3);
|
||||
list.append(glyf);
|
||||
list.append(loca);
|
||||
@ -1076,9 +1076,9 @@ static bool operator <(const QTtfTable &t1, const QTtfTable &t2)
|
||||
return t1.tag < t2.tag;
|
||||
}
|
||||
|
||||
static QByteArray bindFont(const QVector<QTtfTable>& _tables)
|
||||
static QByteArray bindFont(const QList<QTtfTable>& _tables)
|
||||
{
|
||||
QVector<QTtfTable> tables = _tables;
|
||||
QList<QTtfTable> tables = _tables;
|
||||
|
||||
std::sort(tables.begin(), tables.end());
|
||||
|
||||
@ -1205,7 +1205,7 @@ QByteArray QFontSubset::toTruetype() const
|
||||
font.maxp.maxComponentDepth = 0;
|
||||
const int numGlyphs = nGlyphs();
|
||||
font.maxp.numGlyphs = numGlyphs;
|
||||
QVector<QTtfGlyph> glyphs;
|
||||
QList<QTtfGlyph> glyphs;
|
||||
glyphs.reserve(numGlyphs);
|
||||
|
||||
uint sumAdvances = 0;
|
||||
@ -1240,7 +1240,7 @@ QByteArray QFontSubset::toTruetype() const
|
||||
}
|
||||
|
||||
|
||||
QVector<QTtfTable> tables = generateGlyphTables(font, glyphs);
|
||||
QList<QTtfTable> tables = generateGlyphTables(font, glyphs);
|
||||
tables.append(generateHead(font.head));
|
||||
tables.append(generateHhea(font.hhea));
|
||||
tables.append(generateMaxp(font.maxp));
|
||||
|
@ -222,12 +222,12 @@ void QGlyphRun::setRawFont(const QRawFont &rawFont)
|
||||
|
||||
\sa setGlyphIndexes(), setPositions()
|
||||
*/
|
||||
QVector<quint32> QGlyphRun::glyphIndexes() const
|
||||
QList<quint32> QGlyphRun::glyphIndexes() const
|
||||
{
|
||||
if (d->glyphIndexes.constData() == d->glyphIndexData) {
|
||||
return d->glyphIndexes;
|
||||
} else {
|
||||
QVector<quint32> indexes(d->glyphIndexDataSize);
|
||||
QList<quint32> indexes(d->glyphIndexDataSize);
|
||||
memcpy(indexes.data(), d->glyphIndexData, d->glyphIndexDataSize * sizeof(quint32));
|
||||
return indexes;
|
||||
}
|
||||
@ -237,10 +237,10 @@ QVector<quint32> QGlyphRun::glyphIndexes() const
|
||||
Set the glyph indexes for this QGlyphRun object to \a glyphIndexes. The glyph indexes must
|
||||
be valid for the selected font.
|
||||
*/
|
||||
void QGlyphRun::setGlyphIndexes(const QVector<quint32> &glyphIndexes)
|
||||
void QGlyphRun::setGlyphIndexes(const QList<quint32> &glyphIndexes)
|
||||
{
|
||||
detach();
|
||||
d->glyphIndexes = glyphIndexes; // Keep a reference to the QVector to avoid copying
|
||||
d->glyphIndexes = glyphIndexes; // Keep a reference to the QList to avoid copying
|
||||
d->glyphIndexData = glyphIndexes.constData();
|
||||
d->glyphIndexDataSize = glyphIndexes.size();
|
||||
}
|
||||
@ -248,12 +248,12 @@ void QGlyphRun::setGlyphIndexes(const QVector<quint32> &glyphIndexes)
|
||||
/*!
|
||||
Returns the position of the edge of the baseline for each glyph in this set of glyph indexes.
|
||||
*/
|
||||
QVector<QPointF> QGlyphRun::positions() const
|
||||
QList<QPointF> QGlyphRun::positions() const
|
||||
{
|
||||
if (d->glyphPositions.constData() == d->glyphPositionData) {
|
||||
return d->glyphPositions;
|
||||
} else {
|
||||
QVector<QPointF> glyphPositions(d->glyphPositionDataSize);
|
||||
QList<QPointF> glyphPositions(d->glyphPositionDataSize);
|
||||
memcpy(glyphPositions.data(), d->glyphPositionData,
|
||||
d->glyphPositionDataSize * sizeof(QPointF));
|
||||
return glyphPositions;
|
||||
@ -264,10 +264,10 @@ QVector<QPointF> QGlyphRun::positions() const
|
||||
Sets the positions of the edge of the baseline for each glyph in this set of glyph indexes to
|
||||
\a positions.
|
||||
*/
|
||||
void QGlyphRun::setPositions(const QVector<QPointF> &positions)
|
||||
void QGlyphRun::setPositions(const QList<QPointF> &positions)
|
||||
{
|
||||
detach();
|
||||
d->glyphPositions = positions; // Keep a reference to the vector to avoid copying
|
||||
d->glyphPositions = positions; // Keep a reference to the list to avoid copying
|
||||
d->glyphPositionData = positions.constData();
|
||||
d->glyphPositionDataSize = positions.size();
|
||||
}
|
||||
@ -281,8 +281,8 @@ void QGlyphRun::clear()
|
||||
d->rawFont = QRawFont();
|
||||
d->flags = { };
|
||||
|
||||
setPositions(QVector<QPointF>());
|
||||
setGlyphIndexes(QVector<quint32>());
|
||||
setPositions(QList<QPointF>());
|
||||
setGlyphIndexes(QList<quint32>());
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -41,7 +41,6 @@
|
||||
#include "qharfbuzzng_p.h"
|
||||
|
||||
#include <qstring.h>
|
||||
#include <qvector.h>
|
||||
|
||||
#include <private/qstringiterator_p.h>
|
||||
|
||||
|
@ -159,18 +159,18 @@ class QWritingSystemsPrivate
|
||||
public:
|
||||
QWritingSystemsPrivate()
|
||||
: ref(1)
|
||||
, vector(QFontDatabase::WritingSystemsCount,false)
|
||||
, list(QFontDatabase::WritingSystemsCount, false)
|
||||
{
|
||||
}
|
||||
|
||||
QWritingSystemsPrivate(const QWritingSystemsPrivate *other)
|
||||
: ref(1)
|
||||
, vector(other->vector)
|
||||
, list(other->list)
|
||||
{
|
||||
}
|
||||
|
||||
QAtomicInt ref;
|
||||
QVector<bool> vector;
|
||||
QList<bool> list;
|
||||
};
|
||||
|
||||
/*!
|
||||
@ -212,10 +212,10 @@ QDebug operator<<(QDebug debug, const QSupportedWritingSystems &sws)
|
||||
|
||||
QDebugStateSaver saver(debug);
|
||||
debug.nospace() << "QSupportedWritingSystems(";
|
||||
int i = sws.d->vector.indexOf(true);
|
||||
int i = sws.d->list.indexOf(true);
|
||||
while (i > 0) {
|
||||
debug << me.valueToKey(i);
|
||||
i = sws.d->vector.indexOf(true, i + 1);
|
||||
i = sws.d->list.indexOf(true, i + 1);
|
||||
if (i > 0)
|
||||
debug << ", ";
|
||||
}
|
||||
@ -253,7 +253,7 @@ void QSupportedWritingSystems::detach()
|
||||
void QSupportedWritingSystems::setSupported(QFontDatabase::WritingSystem writingSystem, bool support)
|
||||
{
|
||||
detach();
|
||||
d->vector[writingSystem] = support;
|
||||
d->list[writingSystem] = support;
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -262,7 +262,7 @@ void QSupportedWritingSystems::setSupported(QFontDatabase::WritingSystem writing
|
||||
*/
|
||||
bool QSupportedWritingSystems::supported(QFontDatabase::WritingSystem writingSystem) const
|
||||
{
|
||||
return d->vector.at(writingSystem);
|
||||
return d->list.at(writingSystem);
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -379,7 +379,7 @@ QFontEngine *QPlatformFontDatabase::fontEngine(const QByteArray &fontData, qreal
|
||||
or using the font contained in the file referenced by \a fileName. Returns
|
||||
a list of family names, or an empty list if the font could not be added.
|
||||
|
||||
If \a applicationFont is non-null, its \c properties vector should be filled
|
||||
If \a applicationFont is non-null, its \c properties list should be filled
|
||||
with information from the loaded fonts. This is exposed through FontLoader in
|
||||
Qt Quick where it is needed for disambiguating fonts in the same family. When
|
||||
the function exits, the \a applicationFont should contain an entry of properties
|
||||
|
@ -511,7 +511,7 @@ int QRawFont::weight() const
|
||||
|
||||
/*!
|
||||
Converts the string of unicode points given by \a text to glyph indexes
|
||||
using the CMAP table in the underlying font, and returns a vector containing
|
||||
using the CMAP table in the underlying font, and returns a list containing
|
||||
the result.
|
||||
|
||||
Note that, in cases where there are other tables in the font that affect the
|
||||
@ -522,9 +522,9 @@ int QRawFont::weight() const
|
||||
|
||||
\sa advancesForGlyphIndexes(), glyphIndexesForChars(), QGlyphRun, QTextLayout::glyphRuns(), QTextFragment::glyphRuns()
|
||||
*/
|
||||
QVector<quint32> QRawFont::glyphIndexesForString(const QString &text) const
|
||||
QList<quint32> QRawFont::glyphIndexesForString(const QString &text) const
|
||||
{
|
||||
QVector<quint32> glyphIndexes;
|
||||
QList<quint32> glyphIndexes;
|
||||
if (!d->isValid() || text.isEmpty())
|
||||
return glyphIndexes;
|
||||
|
||||
@ -571,7 +571,7 @@ bool QRawFont::glyphIndexesForChars(const QChar *chars, int numChars, quint32 *g
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn QVector<QPointF> QRawFont::advancesForGlyphIndexes(const QVector<quint32> &glyphIndexes, LayoutFlags layoutFlags) const
|
||||
\fn QList<QPointF> QRawFont::advancesForGlyphIndexes(const QList<quint32> &glyphIndexes, LayoutFlags layoutFlags) const
|
||||
\since 5.1
|
||||
|
||||
Returns the QRawFont's advances for each of the \a glyphIndexes in pixel units. The advances
|
||||
@ -583,7 +583,7 @@ bool QRawFont::glyphIndexesForChars(const QChar *chars, int numChars, quint32 *g
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QVector<QPointF> QRawFont::advancesForGlyphIndexes(const QVector<quint32> &glyphIndexes) const
|
||||
\fn QList<QPointF> QRawFont::advancesForGlyphIndexes(const QList<quint32> &glyphIndexes) const
|
||||
|
||||
\overload
|
||||
|
||||
|
@ -498,25 +498,25 @@ namespace {
|
||||
return User;
|
||||
}
|
||||
|
||||
QVector<QStaticTextItem> items() const
|
||||
QList<QStaticTextItem> items() const
|
||||
{
|
||||
return m_items;
|
||||
}
|
||||
|
||||
QVector<QFixedPoint> positions() const
|
||||
QList<QFixedPoint> positions() const
|
||||
{
|
||||
return m_positions;
|
||||
}
|
||||
|
||||
QVector<glyph_t> glyphs() const
|
||||
QList<glyph_t> glyphs() const
|
||||
{
|
||||
return m_glyphs;
|
||||
}
|
||||
|
||||
private:
|
||||
QVector<QStaticTextItem> m_items;
|
||||
QVector<QFixedPoint> m_positions;
|
||||
QVector<glyph_t> m_glyphs;
|
||||
QList<QStaticTextItem> m_items;
|
||||
QList<QFixedPoint> m_positions;
|
||||
QList<glyph_t> m_glyphs;
|
||||
|
||||
bool m_dirtyPen;
|
||||
bool m_useBackendOptimizations;
|
||||
@ -580,17 +580,17 @@ namespace {
|
||||
return m_paintEngine;
|
||||
}
|
||||
|
||||
QVector<glyph_t> glyphs() const
|
||||
QList<glyph_t> glyphs() const
|
||||
{
|
||||
return m_paintEngine->glyphs();
|
||||
}
|
||||
|
||||
QVector<QFixedPoint> positions() const
|
||||
QList<QFixedPoint> positions() const
|
||||
{
|
||||
return m_paintEngine->positions();
|
||||
}
|
||||
|
||||
QVector<QStaticTextItem> items() const
|
||||
QList<QStaticTextItem> items() const
|
||||
{
|
||||
return m_paintEngine->items();
|
||||
}
|
||||
@ -684,9 +684,9 @@ void QStaticTextPrivate::init()
|
||||
paintText(QPointF(0, 0), &painter, QColor(0, 0, 0, 0));
|
||||
}
|
||||
|
||||
QVector<QStaticTextItem> deviceItems = device.items();
|
||||
QVector<QFixedPoint> positions = device.positions();
|
||||
QVector<glyph_t> glyphs = device.glyphs();
|
||||
QList<QStaticTextItem> deviceItems = device.items();
|
||||
QList<QFixedPoint> positions = device.positions();
|
||||
QList<glyph_t> glyphs = device.glyphs();
|
||||
|
||||
itemCount = deviceItems.size();
|
||||
items = new QStaticTextItem[itemCount];
|
||||
|
@ -87,7 +87,7 @@ public:
|
||||
}
|
||||
|
||||
void applyFormatChanges();
|
||||
QVector<QTextCharFormat> formatChanges;
|
||||
QList<QTextCharFormat> formatChanges;
|
||||
QTextBlock currentBlock;
|
||||
bool rehighlightPending;
|
||||
bool inReformatBlocks;
|
||||
@ -99,7 +99,7 @@ void QSyntaxHighlighterPrivate::applyFormatChanges()
|
||||
|
||||
QTextLayout *layout = currentBlock.layout();
|
||||
|
||||
QVector<QTextLayout::FormatRange> ranges = layout->formats();
|
||||
QList<QTextLayout::FormatRange> ranges = layout->formats();
|
||||
|
||||
const int preeditAreaStart = layout->preeditAreaPosition();
|
||||
const int preeditAreaLength = layout->preeditAreaText().length();
|
||||
|
@ -3015,7 +3015,7 @@ void QTextHtmlExporter::emitTable(const QTextTable *table)
|
||||
const int rows = table->rows();
|
||||
const int columns = table->columns();
|
||||
|
||||
QVector<QTextLength> columnWidths = format.columnWidthConstraints();
|
||||
QList<QTextLength> columnWidths = format.columnWidthConstraints();
|
||||
if (columnWidths.isEmpty()) {
|
||||
columnWidths.resize(columns);
|
||||
columnWidths.fill(QTextLength());
|
||||
@ -3311,9 +3311,9 @@ void QTextDocument::setMarkdown(const QString &markdown, QTextDocument::Markdown
|
||||
#endif
|
||||
|
||||
/*!
|
||||
Returns a vector of text formats for all the formats used in the document.
|
||||
Returns a list of text formats for all the formats used in the document.
|
||||
*/
|
||||
QVector<QTextFormat> QTextDocument::allFormats() const
|
||||
QList<QTextFormat> QTextDocument::allFormats() const
|
||||
{
|
||||
Q_D(const QTextDocument);
|
||||
return d->formatCollection()->formats;
|
||||
|
@ -891,10 +891,10 @@ QTextHtmlImporter::Table QTextHtmlImporter::scanTable(int tableNodeIdx)
|
||||
Table table;
|
||||
table.columns = 0;
|
||||
|
||||
QVector<QTextLength> columnWidths;
|
||||
QList<QTextLength> columnWidths;
|
||||
|
||||
int tableHeaderRowCount = 0;
|
||||
QVector<int> rowNodes;
|
||||
QList<int> rowNodes;
|
||||
rowNodes.reserve(at(tableNodeIdx).children.count());
|
||||
for (int row : at(tableNodeIdx).children) {
|
||||
switch (at(row).id) {
|
||||
@ -916,8 +916,8 @@ QTextHtmlImporter::Table QTextHtmlImporter::scanTable(int tableNodeIdx)
|
||||
}
|
||||
}
|
||||
|
||||
QVector<RowColSpanInfo> rowColSpans;
|
||||
QVector<RowColSpanInfo> rowColSpanForColumn;
|
||||
QList<RowColSpanInfo> rowColSpans;
|
||||
QList<RowColSpanInfo> rowColSpanForColumn;
|
||||
|
||||
int effectiveRow = 0;
|
||||
for (int row : qAsConst(rowNodes)) {
|
||||
|
@ -107,7 +107,7 @@ public:
|
||||
bool layoutDirty;
|
||||
bool fullLayoutCompleted;
|
||||
|
||||
QVector<QPointer<QTextFrame> > floats;
|
||||
QList<QPointer<QTextFrame>> floats;
|
||||
};
|
||||
|
||||
QTextFrameData::QTextFrameData()
|
||||
@ -205,14 +205,14 @@ class QTextTableData : public QTextFrameData
|
||||
public:
|
||||
QFixed cellSpacing, cellPadding;
|
||||
qreal deviceScale;
|
||||
QVector<QFixed> minWidths;
|
||||
QVector<QFixed> maxWidths;
|
||||
QVector<QFixed> widths;
|
||||
QVector<QFixed> heights;
|
||||
QVector<QFixed> columnPositions;
|
||||
QVector<QFixed> rowPositions;
|
||||
QList<QFixed> minWidths;
|
||||
QList<QFixed> maxWidths;
|
||||
QList<QFixed> widths;
|
||||
QList<QFixed> heights;
|
||||
QList<QFixed> columnPositions;
|
||||
QList<QFixed> rowPositions;
|
||||
|
||||
QVector<QFixed> cellVerticalOffsets;
|
||||
QList<QFixed> cellVerticalOffsets;
|
||||
|
||||
// without borderCollapse, those equal QTextFrameData::border;
|
||||
// otherwise the widest outermost cell edge will be used
|
||||
@ -585,7 +585,7 @@ public:
|
||||
void floatMargins(const QFixed &y, const QTextLayoutStruct *layoutStruct, QFixed *left, QFixed *right) const;
|
||||
QFixed findY(QFixed yFrom, const QTextLayoutStruct *layoutStruct, QFixed requiredWidth) const;
|
||||
|
||||
QVector<QCheckPoint> checkPoints;
|
||||
QList<QCheckPoint> checkPoints;
|
||||
|
||||
QTextFrame::Iterator frameIteratorForYPosition(QFixed y) const;
|
||||
QTextFrame::Iterator frameIteratorForTextPosition(int position) const;
|
||||
@ -623,7 +623,7 @@ QTextFrame::Iterator QTextDocumentLayoutPrivate::frameIteratorForYPosition(QFixe
|
||||
|| y < 0 || y > data(rootFrame)->size.height)
|
||||
return rootFrame->begin();
|
||||
|
||||
QVector<QCheckPoint>::ConstIterator checkPoint = std::lower_bound(checkPoints.begin(), checkPoints.end(), y);
|
||||
auto checkPoint = std::lower_bound(checkPoints.begin(), checkPoints.end(), y);
|
||||
if (checkPoint == checkPoints.end())
|
||||
return rootFrame->begin();
|
||||
|
||||
@ -792,14 +792,14 @@ QTextDocumentLayoutPrivate::hitTest(QTextTable *table, const QFixedPoint &point,
|
||||
{
|
||||
QTextTableData *td = static_cast<QTextTableData *>(data(table));
|
||||
|
||||
QVector<QFixed>::ConstIterator rowIt = std::lower_bound(td->rowPositions.constBegin(), td->rowPositions.constEnd(), point.y);
|
||||
auto rowIt = std::lower_bound(td->rowPositions.constBegin(), td->rowPositions.constEnd(), point.y);
|
||||
if (rowIt == td->rowPositions.constEnd()) {
|
||||
rowIt = td->rowPositions.constEnd() - 1;
|
||||
} else if (rowIt != td->rowPositions.constBegin()) {
|
||||
--rowIt;
|
||||
}
|
||||
|
||||
QVector<QFixed>::ConstIterator colIt = std::lower_bound(td->columnPositions.constBegin(), td->columnPositions.constEnd(), point.x);
|
||||
auto colIt = std::lower_bound(td->columnPositions.constBegin(), td->columnPositions.constEnd(), point.x);
|
||||
if (colIt == td->columnPositions.constEnd()) {
|
||||
colIt = td->columnPositions.constEnd() - 1;
|
||||
} else if (colIt != td->columnPositions.constBegin()) {
|
||||
@ -1169,7 +1169,7 @@ void QTextDocumentLayoutPrivate::drawFrame(const QPointF &offset, QPainter *pain
|
||||
int lastRow = rows;
|
||||
|
||||
if (context.clip.isValid()) {
|
||||
QVector<QFixed>::ConstIterator rowIt = std::lower_bound(td->rowPositions.constBegin(), td->rowPositions.constEnd(), QFixed::fromReal(context.clip.top() - off.y()));
|
||||
auto rowIt = std::lower_bound(td->rowPositions.constBegin(), td->rowPositions.constEnd(), QFixed::fromReal(context.clip.top() - off.y()));
|
||||
if (rowIt != td->rowPositions.constEnd() && rowIt != td->rowPositions.constBegin()) {
|
||||
--rowIt;
|
||||
firstRow = rowIt - td->rowPositions.constBegin();
|
||||
@ -1949,7 +1949,7 @@ void QTextDocumentLayoutPrivate::drawFlow(const QPointF &offset, QPainter *paint
|
||||
Q_Q(const QTextDocumentLayout);
|
||||
const bool inRootFrame = (!it.atEnd() && it.parentFrame() && it.parentFrame()->parentFrame() == nullptr);
|
||||
|
||||
QVector<QCheckPoint>::ConstIterator lastVisibleCheckPoint = checkPoints.end();
|
||||
auto lastVisibleCheckPoint = checkPoints.end();
|
||||
if (inRootFrame && context.clip.isValid()) {
|
||||
lastVisibleCheckPoint = std::lower_bound(checkPoints.begin(), checkPoints.end(), QFixed::fromReal(context.clip.bottom()));
|
||||
}
|
||||
@ -2048,7 +2048,7 @@ void QTextDocumentLayoutPrivate::drawBlock(const QPointF &offset, QPainter *pain
|
||||
fillBackground(painter, rect, bg, r.topLeft());
|
||||
}
|
||||
|
||||
QVector<QTextLayout::FormatRange> selections;
|
||||
QList<QTextLayout::FormatRange> selections;
|
||||
int blpos = bl.position();
|
||||
int bllen = bl.length();
|
||||
const QTextCharFormat *selFormat = nullptr;
|
||||
@ -2402,7 +2402,7 @@ QRectF QTextDocumentLayoutPrivate::layoutTable(QTextTable *table, int layoutFrom
|
||||
}
|
||||
}
|
||||
|
||||
QVector<QTextLength> columnWidthConstraints = fmt.columnWidthConstraints();
|
||||
QList<QTextLength> columnWidthConstraints = fmt.columnWidthConstraints();
|
||||
if (columnWidthConstraints.size() != columns)
|
||||
columnWidthConstraints.resize(columns);
|
||||
Q_ASSERT(columnWidthConstraints.count() == columns);
|
||||
@ -2666,14 +2666,14 @@ recalc_minmax_widths:
|
||||
bool haveRowSpannedCells = false;
|
||||
|
||||
// need to keep track of cell heights for vertical alignment
|
||||
QVector<QFixed> cellHeights;
|
||||
QList<QFixed> cellHeights;
|
||||
cellHeights.reserve(rows * columns);
|
||||
|
||||
QFixed pageHeight = QFixed::fromReal(document->pageSize().height());
|
||||
if (pageHeight <= 0)
|
||||
pageHeight = QFIXED_MAX;
|
||||
|
||||
QVector<QFixed> heightToDistribute;
|
||||
QList<QFixed> heightToDistribute;
|
||||
heightToDistribute.resize(columns);
|
||||
|
||||
td->headerHeight = 0;
|
||||
@ -3093,7 +3093,7 @@ void QTextDocumentLayoutPrivate::layoutFlow(QTextFrame::Iterator it, QTextLayout
|
||||
bool redoCheckPoints = layoutStruct->fullLayout || checkPoints.isEmpty();
|
||||
|
||||
if (!redoCheckPoints) {
|
||||
QVector<QCheckPoint>::Iterator checkPoint = std::lower_bound(checkPoints.begin(), checkPoints.end(), layoutFrom);
|
||||
auto checkPoint = std::lower_bound(checkPoints.begin(), checkPoints.end(), layoutFrom);
|
||||
if (checkPoint != checkPoints.end()) {
|
||||
if (checkPoint != checkPoints.begin())
|
||||
--checkPoint;
|
||||
|
@ -1466,7 +1466,7 @@ void QTextEngine::shapeText(int item) const
|
||||
|
||||
// split up the item into parts that come from different font engines
|
||||
// k * 3 entries, array[k] == index in string, array[k + 1] == index in glyphs, array[k + 2] == engine index
|
||||
QVector<uint> itemBoundaries;
|
||||
QList<uint> itemBoundaries;
|
||||
itemBoundaries.reserve(24);
|
||||
|
||||
QGlyphLayout initialGlyphs = availableGlyphs(&si);
|
||||
@ -1608,7 +1608,7 @@ int QTextEngine::shapeTextWithHarfbuzzNG(const QScriptItem &si,
|
||||
const ushort *string,
|
||||
int itemLength,
|
||||
QFontEngine *fontEngine,
|
||||
const QVector<uint> &itemBoundaries,
|
||||
const QList<uint> &itemBoundaries,
|
||||
bool kerningEnabled,
|
||||
bool hasLetterSpacing) const
|
||||
{
|
||||
@ -2887,7 +2887,7 @@ void QTextEngine::setPreeditArea(int position, const QString &preeditText)
|
||||
clearLineData();
|
||||
}
|
||||
|
||||
void QTextEngine::setFormats(const QVector<QTextLayout::FormatRange> &formats)
|
||||
void QTextEngine::setFormats(const QList<QTextLayout::FormatRange> &formats)
|
||||
{
|
||||
if (formats.isEmpty()) {
|
||||
if (!specialData)
|
||||
@ -3278,17 +3278,17 @@ QFixed QTextEngine::calculateTabWidth(int item, QFixed x) const
|
||||
|
||||
namespace {
|
||||
class FormatRangeComparatorByStart {
|
||||
const QVector<QTextLayout::FormatRange> &list;
|
||||
const QList<QTextLayout::FormatRange> &list;
|
||||
public:
|
||||
FormatRangeComparatorByStart(const QVector<QTextLayout::FormatRange> &list) : list(list) { }
|
||||
FormatRangeComparatorByStart(const QList<QTextLayout::FormatRange> &list) : list(list) { }
|
||||
bool operator()(int a, int b) {
|
||||
return list.at(a).start < list.at(b).start;
|
||||
}
|
||||
};
|
||||
class FormatRangeComparatorByEnd {
|
||||
const QVector<QTextLayout::FormatRange> &list;
|
||||
const QList<QTextLayout::FormatRange> &list;
|
||||
public:
|
||||
FormatRangeComparatorByEnd(const QVector<QTextLayout::FormatRange> &list) : list(list) { }
|
||||
FormatRangeComparatorByEnd(const QList<QTextLayout::FormatRange> &list) : list(list) { }
|
||||
bool operator()(int a, int b) {
|
||||
return list.at(a).start + list.at(a).length < list.at(b).start + list.at(b).length;
|
||||
}
|
||||
@ -3303,7 +3303,7 @@ void QTextEngine::resolveFormats() const
|
||||
|
||||
QTextFormatCollection *collection = formatCollection();
|
||||
|
||||
QVector<QTextCharFormat> resolvedFormats(layoutData->items.count());
|
||||
QList<QTextCharFormat> resolvedFormats(layoutData->items.count());
|
||||
|
||||
QVarLengthArray<int, 64> formatsSortedByStart;
|
||||
formatsSortedByStart.reserve(specialData->formats.size());
|
||||
|
@ -251,7 +251,7 @@ public:
|
||||
return fnt;
|
||||
}
|
||||
|
||||
QVector<Property> props;
|
||||
QList<Property> props;
|
||||
private:
|
||||
|
||||
size_t recalcHash() const;
|
||||
@ -312,7 +312,8 @@ static inline size_t getHash(const QTextFormatPrivate *d, int format)
|
||||
size_t QTextFormatPrivate::recalcHash() const
|
||||
{
|
||||
hashValue = 0;
|
||||
for (QVector<Property>::ConstIterator it = props.constBegin(); it != props.constEnd(); ++it)
|
||||
const auto end = props.constEnd();
|
||||
for (auto it = props.constBegin(); it != end; ++it)
|
||||
hashValue += (static_cast<quint32>(it->key) << 16) + variantHash(it->value);
|
||||
|
||||
hashDirty = false;
|
||||
@ -916,7 +917,7 @@ void QTextFormat::merge(const QTextFormat &other)
|
||||
|
||||
QTextFormatPrivate *d = this->d;
|
||||
|
||||
const QVector<QT_PREPEND_NAMESPACE(Property)> &otherProps = other.d->props;
|
||||
const QList<QT_PREPEND_NAMESPACE(Property)> &otherProps = other.d->props;
|
||||
d->props.reserve(d->props.size() + otherProps.size());
|
||||
for (int i = 0; i < otherProps.count(); ++i) {
|
||||
const QT_PREPEND_NAMESPACE(Property) &p = otherProps.at(i);
|
||||
@ -1134,29 +1135,28 @@ QTextLength QTextFormat::lengthProperty(int propertyId) const
|
||||
|
||||
/*!
|
||||
Returns the value of the property given by \a propertyId. If the
|
||||
property isn't of QTextFormat::LengthVector type, an empty length
|
||||
vector is returned instead.
|
||||
property isn't of QTextFormat::LengthVector type, an empty
|
||||
list is returned instead.
|
||||
|
||||
\sa setProperty(), boolProperty(), intProperty(), doubleProperty(), stringProperty(),
|
||||
colorProperty(), lengthProperty(), Property
|
||||
*/
|
||||
QVector<QTextLength> QTextFormat::lengthVectorProperty(int propertyId) const
|
||||
QList<QTextLength> QTextFormat::lengthVectorProperty(int propertyId) const
|
||||
{
|
||||
QVector<QTextLength> vector;
|
||||
QList<QTextLength> list;
|
||||
if (!d)
|
||||
return vector;
|
||||
return list;
|
||||
const QVariant prop = d->property(propertyId);
|
||||
if (prop.userType() != QMetaType::QVariantList)
|
||||
return vector;
|
||||
return list;
|
||||
|
||||
QList<QVariant> propertyList = prop.toList();
|
||||
for (int i=0; i<propertyList.size(); ++i) {
|
||||
QVariant var = propertyList.at(i);
|
||||
const QList<QVariant> propertyList = prop.toList();
|
||||
for (const auto &var : propertyList) {
|
||||
if (var.userType() == QMetaType::QTextLength)
|
||||
vector.append(qvariant_cast<QTextLength>(var));
|
||||
list.append(qvariant_cast<QTextLength>(var));
|
||||
}
|
||||
|
||||
return vector;
|
||||
return list;
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -1189,7 +1189,7 @@ void QTextFormat::setProperty(int propertyId, const QVariant &value)
|
||||
|
||||
\sa lengthVectorProperty(), Property
|
||||
*/
|
||||
void QTextFormat::setProperty(int propertyId, const QVector<QTextLength> &value)
|
||||
void QTextFormat::setProperty(int propertyId, const QList<QTextLength> &value)
|
||||
{
|
||||
if (!d)
|
||||
d = new QTextFormatPrivate;
|
||||
@ -2998,7 +2998,7 @@ qreal QTextFrameFormat::rightMargin() const
|
||||
returns the number of columns with constraints, and the
|
||||
columnWidthConstraints() function returns the constraints defined for the
|
||||
table. These quantities can also be set by calling setColumnWidthConstraints()
|
||||
with a vector containing new constraints. If no constraints are
|
||||
with a list containing new constraints. If no constraints are
|
||||
required, clearColumnWidthConstraints() can be used to remove them.
|
||||
|
||||
\sa QTextTable, QTextTableCell, QTextLength
|
||||
@ -3062,7 +3062,7 @@ QTextTableFormat::QTextTableFormat(const QTextFormat &fmt)
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void QTextTableFormat::setColumnWidthConstraints(const QVector<QTextLength> &constraints)
|
||||
\fn void QTextTableFormat::setColumnWidthConstraints(const QList<QTextLength> &constraints)
|
||||
|
||||
Sets the column width \a constraints for the table.
|
||||
|
||||
@ -3070,7 +3070,7 @@ QTextTableFormat::QTextTableFormat(const QTextFormat &fmt)
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn QVector<QTextLength> QTextTableFormat::columnWidthConstraints() const
|
||||
\fn QList<QTextLength> QTextTableFormat::columnWidthConstraints() const
|
||||
|
||||
Returns a list of constraints used by this table format to control the
|
||||
appearance of columns in a table.
|
||||
|
@ -1141,7 +1141,7 @@ void QTextHtmlParserNode::initializeProperties(const QTextHtmlParserNode *parent
|
||||
}
|
||||
|
||||
#ifndef QT_NO_CSSPARSER
|
||||
void QTextHtmlParserNode::setListStyle(const QVector<QCss::Value> &cssValues)
|
||||
void QTextHtmlParserNode::setListStyle(const QList<QCss::Value> &cssValues)
|
||||
{
|
||||
for (int i = 0; i < cssValues.count(); ++i) {
|
||||
if (cssValues.at(i).type == QCss::Value::KnownIdentifier) {
|
||||
@ -1164,7 +1164,7 @@ void QTextHtmlParserNode::setListStyle(const QVector<QCss::Value> &cssValues)
|
||||
blockFormat.setProperty(QTextFormat::ListStyle, listStyle);
|
||||
}
|
||||
|
||||
void QTextHtmlParserNode::applyCssDeclarations(const QVector<QCss::Declaration> &declarations, const QTextDocument *resourceProvider)
|
||||
void QTextHtmlParserNode::applyCssDeclarations(const QList<QCss::Declaration> &declarations, const QTextDocument *resourceProvider)
|
||||
{
|
||||
QCss::ValueExtractor extractor(declarations);
|
||||
extractor.extractBox(margin, padding);
|
||||
@ -1915,9 +1915,9 @@ void QTextHtmlParser::importStyleSheet(const QString &href)
|
||||
}
|
||||
}
|
||||
|
||||
QVector<QCss::Declaration> standardDeclarationForNode(const QTextHtmlParserNode &node)
|
||||
QList<QCss::Declaration> standardDeclarationForNode(const QTextHtmlParserNode &node)
|
||||
{
|
||||
QVector<QCss::Declaration> decls;
|
||||
QList<QCss::Declaration> decls;
|
||||
QCss::Declaration decl;
|
||||
QCss::Value val;
|
||||
switch (node.id) {
|
||||
@ -1934,7 +1934,7 @@ QVector<QCss::Declaration> standardDeclarationForNode(const QTextHtmlParserNode
|
||||
decl.d->propertyId = QCss::Color;
|
||||
val.type = QCss::Value::Color;
|
||||
val.variant = QVariant(QGuiApplication::palette().link());
|
||||
decl.d->values = QVector<QCss::Value>() << val;
|
||||
decl.d->values = QList<QCss::Value> { val };
|
||||
decl.d->inheritable = true;
|
||||
decls << decl;
|
||||
break;
|
||||
@ -1947,7 +1947,7 @@ QVector<QCss::Declaration> standardDeclarationForNode(const QTextHtmlParserNode
|
||||
decl.d->propertyId = QCss::TextDecoration;
|
||||
val.type = QCss::Value::KnownIdentifier;
|
||||
val.variant = QVariant(QCss::Value_Underline);
|
||||
decl.d->values = QVector<QCss::Value>() << val;
|
||||
decl.d->values = QList<QCss::Value> { val };
|
||||
decl.d->inheritable = true;
|
||||
decls << decl;
|
||||
}
|
||||
@ -1966,7 +1966,7 @@ QVector<QCss::Declaration> standardDeclarationForNode(const QTextHtmlParserNode
|
||||
decl.d->propertyId = QCss::FontWeight;
|
||||
val.type = QCss::Value::KnownIdentifier;
|
||||
val.variant = QVariant(QCss::Value_Bold);
|
||||
decl.d->values = QVector<QCss::Value>() << val;
|
||||
decl.d->values = QList<QCss::Value> { val };
|
||||
decl.d->inheritable = true;
|
||||
decls << decl;
|
||||
if (node.id == Html_b || node.id == Html_strong)
|
||||
@ -1988,7 +1988,7 @@ QVector<QCss::Declaration> standardDeclarationForNode(const QTextHtmlParserNode
|
||||
case Html_h5: case Html_small: val.variant = QVariant(QCss::Value_Small); break;
|
||||
default: break;
|
||||
}
|
||||
decl.d->values = QVector<QCss::Value>() << val;
|
||||
decl.d->values = QList<QCss::Value> { val };
|
||||
decls << decl;
|
||||
break;
|
||||
}
|
||||
@ -2000,7 +2000,7 @@ QVector<QCss::Declaration> standardDeclarationForNode(const QTextHtmlParserNode
|
||||
decl.d->propertyId = QCss::TextAlignment;
|
||||
val.type = QCss::Value::KnownIdentifier;
|
||||
val.variant = (node.id == Html_td) ? QVariant(QCss::Value_Left) : QVariant(QCss::Value_Center);
|
||||
decl.d->values = QVector<QCss::Value>() << val;
|
||||
decl.d->values = QList<QCss::Value> { val };
|
||||
decl.d->inheritable = true;
|
||||
decls << decl;
|
||||
break;
|
||||
@ -2010,7 +2010,7 @@ QVector<QCss::Declaration> standardDeclarationForNode(const QTextHtmlParserNode
|
||||
decl.d->propertyId = QCss::TextDecoration;
|
||||
val.type = QCss::Value::KnownIdentifier;
|
||||
val.variant = QVariant(QCss::Value_LineThrough);
|
||||
decl.d->values = QVector<QCss::Value>() << val;
|
||||
decl.d->values = QList<QCss::Value> { val };
|
||||
decl.d->inheritable = true;
|
||||
decls << decl;
|
||||
break;
|
||||
@ -2025,7 +2025,7 @@ QVector<QCss::Declaration> standardDeclarationForNode(const QTextHtmlParserNode
|
||||
decl.d->propertyId = QCss::FontStyle;
|
||||
val.type = QCss::Value::KnownIdentifier;
|
||||
val.variant = QVariant(QCss::Value_Italic);
|
||||
decl.d->values = QVector<QCss::Value>() << val;
|
||||
decl.d->values = QList<QCss::Value> { val };
|
||||
decl.d->inheritable = true;
|
||||
decls << decl;
|
||||
break;
|
||||
@ -2036,7 +2036,7 @@ QVector<QCss::Declaration> standardDeclarationForNode(const QTextHtmlParserNode
|
||||
decl.d->propertyId = QCss::VerticalAlignment;
|
||||
val.type = QCss::Value::KnownIdentifier;
|
||||
val.variant = (node.id == Html_sub) ? QVariant(QCss::Value_Sub) : QVariant(QCss::Value_Super);
|
||||
decl.d->values = QVector<QCss::Value>() << val;
|
||||
decl.d->values = QList<QCss::Value> { val };
|
||||
decl.d->inheritable = true;
|
||||
decls << decl;
|
||||
break;
|
||||
@ -2047,7 +2047,7 @@ QVector<QCss::Declaration> standardDeclarationForNode(const QTextHtmlParserNode
|
||||
decl.d->propertyId = QCss::ListStyle;
|
||||
val.type = QCss::Value::KnownIdentifier;
|
||||
val.variant = (node.id == Html_ul) ? QVariant(QCss::Value_Disc) : QVariant(QCss::Value_Decimal);
|
||||
decl.d->values = QVector<QCss::Value>() << val;
|
||||
decl.d->values = QList<QCss::Value> { val };
|
||||
decl.d->inheritable = true;
|
||||
decls << decl;
|
||||
break;
|
||||
@ -2059,7 +2059,7 @@ QVector<QCss::Declaration> standardDeclarationForNode(const QTextHtmlParserNode
|
||||
decl = QCss::Declaration();
|
||||
decl.d->property = QLatin1String("font-family");
|
||||
decl.d->propertyId = QCss::FontFamily;
|
||||
QVector<QCss::Value> values;
|
||||
QList<QCss::Value> values;
|
||||
val.type = QCss::Value::String;
|
||||
val.variant = QFontDatabase::systemFont(QFontDatabase::FixedFont).family();
|
||||
values << val;
|
||||
@ -2082,7 +2082,7 @@ QVector<QCss::Declaration> standardDeclarationForNode(const QTextHtmlParserNode
|
||||
case Html_pre: val.variant = QVariant(QCss::Value_Pre); break;
|
||||
default: break;
|
||||
}
|
||||
decl.d->values = QVector<QCss::Value>() << val;
|
||||
decl.d->values = QList<QCss::Value> { val };
|
||||
decl.d->inheritable = true;
|
||||
decls << decl;
|
||||
break;
|
||||
@ -2092,9 +2092,9 @@ QVector<QCss::Declaration> standardDeclarationForNode(const QTextHtmlParserNode
|
||||
return decls;
|
||||
}
|
||||
|
||||
QVector<QCss::Declaration> QTextHtmlParser::declarationsForNode(int node) const
|
||||
QList<QCss::Declaration> QTextHtmlParser::declarationsForNode(int node) const
|
||||
{
|
||||
QVector<QCss::Declaration> decls;
|
||||
QList<QCss::Declaration> decls;
|
||||
|
||||
QTextHtmlStyleSelector selector(this);
|
||||
|
||||
@ -2124,7 +2124,7 @@ QVector<QCss::Declaration> QTextHtmlParser::declarationsForNode(int node) const
|
||||
decls += selector.declarationsForNode(n, extraPseudo);
|
||||
n = selector.parentNode(n);
|
||||
while (!selector.isNullNode(n)) {
|
||||
QVector<QCss::Declaration> inheritedDecls;
|
||||
QList<QCss::Declaration> inheritedDecls;
|
||||
inheritedDecls = selector.declarationsForNode(n, extraPseudo);
|
||||
for (int i = 0; i < inheritedDecls.size(); ++i) {
|
||||
const QCss::Declaration &decl = inheritedDecls.at(i);
|
||||
|
@ -534,7 +534,7 @@ void QTextLayout::setAdditionalFormats(const QList<FormatRange> &formatList)
|
||||
|
||||
\sa formats(), clearFormats()
|
||||
*/
|
||||
void QTextLayout::setFormats(const QVector<FormatRange> &formats)
|
||||
void QTextLayout::setFormats(const QList<FormatRange> &formats)
|
||||
{
|
||||
d->setFormats(formats);
|
||||
|
||||
@ -561,7 +561,7 @@ QList<QTextLayout::FormatRange> QTextLayout::additionalFormats() const
|
||||
|
||||
\sa setFormats(), clearFormats()
|
||||
*/
|
||||
QVector<QTextLayout::FormatRange> QTextLayout::formats() const
|
||||
QList<QTextLayout::FormatRange> QTextLayout::formats() const
|
||||
{
|
||||
return d->formats();
|
||||
}
|
||||
@ -585,7 +585,7 @@ void QTextLayout::clearAdditionalFormats()
|
||||
*/
|
||||
void QTextLayout::clearFormats()
|
||||
{
|
||||
setFormats(QVector<FormatRange>());
|
||||
setFormats(QList<FormatRange>());
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -1076,8 +1076,8 @@ QList<QGlyphRun> QTextLayout::glyphRuns(int from, int length) const
|
||||
if (oldGlyphRun.isEmpty()) {
|
||||
oldGlyphRun = glyphRun;
|
||||
} else {
|
||||
QVector<quint32> indexes = oldGlyphRun.glyphIndexes();
|
||||
QVector<QPointF> positions = oldGlyphRun.positions();
|
||||
QList<quint32> indexes = oldGlyphRun.glyphIndexes();
|
||||
QList<QPointF> positions = oldGlyphRun.positions();
|
||||
QRectF boundingRect = oldGlyphRun.boundingRect();
|
||||
|
||||
indexes += glyphRun.glyphIndexes();
|
||||
@ -1101,7 +1101,7 @@ QList<QGlyphRun> QTextLayout::glyphRuns(int from, int length) const
|
||||
The rendered layout includes the given \a selections and is clipped within
|
||||
the rectangle specified by \a clip.
|
||||
*/
|
||||
void QTextLayout::draw(QPainter *p, const QPointF &pos, const QVector<FormatRange> &selections, const QRectF &clip) const
|
||||
void QTextLayout::draw(QPainter *p, const QPointF &pos, const QList<FormatRange> &selections, const QRectF &clip) const
|
||||
{
|
||||
if (d->lines.isEmpty())
|
||||
return;
|
||||
@ -2276,9 +2276,9 @@ static QGlyphRun glyphRunWithInfo(QFontEngine *fontEngine,
|
||||
qreal fontHeight = font.ascent() + font.descent();
|
||||
qreal minY = 0;
|
||||
qreal maxY = 0;
|
||||
QVector<quint32> glyphs;
|
||||
QList<quint32> glyphs;
|
||||
glyphs.reserve(glyphsArray.size());
|
||||
QVector<QPointF> positions;
|
||||
QList<QPointF> positions;
|
||||
positions.reserve(glyphsArray.size());
|
||||
for (int i=0; i<glyphsArray.size(); ++i) {
|
||||
glyphs.append(glyphsArray.at(i) & 0xffffff);
|
||||
|
@ -79,7 +79,7 @@ bool QTextMarkdownWriter::writeAll(const QTextDocument *document)
|
||||
#if QT_CONFIG(itemmodel)
|
||||
void QTextMarkdownWriter::writeTable(const QAbstractItemModel *table)
|
||||
{
|
||||
QVector<int> tableColumnWidths(table->columnCount());
|
||||
QList<int> tableColumnWidths(table->columnCount());
|
||||
for (int col = 0; col < table->columnCount(); ++col) {
|
||||
tableColumnWidths[col] = table->headerData(col, Qt::Horizontal).toString().length();
|
||||
for (int row = 0; row < table->rowCount(); ++row) {
|
||||
@ -118,7 +118,7 @@ void QTextMarkdownWriter::writeFrame(const QTextFrame *frame)
|
||||
QTextFrame *child = nullptr;
|
||||
int tableRow = -1;
|
||||
bool lastWasList = false;
|
||||
QVector<int> tableColumnWidths;
|
||||
QList<int> tableColumnWidths;
|
||||
if (table) {
|
||||
tableColumnWidths.resize(table->columns());
|
||||
for (int col = 0; col < table->columns(); ++col) {
|
||||
|
@ -1198,9 +1198,9 @@ QString QTextBlock::text() const
|
||||
|
||||
\sa charFormat(), blockFormat()
|
||||
*/
|
||||
QVector<QTextLayout::FormatRange> QTextBlock::textFormats() const
|
||||
QList<QTextLayout::FormatRange> QTextBlock::textFormats() const
|
||||
{
|
||||
QVector<QTextLayout::FormatRange> formats;
|
||||
QList<QTextLayout::FormatRange> formats;
|
||||
if (!p || !n)
|
||||
return formats;
|
||||
|
||||
|
@ -525,7 +525,7 @@ void QTextOdfWriter::writeInlineCharacter(QXmlStreamWriter &writer, const QTextF
|
||||
void QTextOdfWriter::writeFormats(QXmlStreamWriter &writer, const QSet<int> &formats) const
|
||||
{
|
||||
writer.writeStartElement(officeNS, QString::fromLatin1("automatic-styles"));
|
||||
QVector<QTextFormat> allStyles = m_document->allFormats();
|
||||
QList<QTextFormat> allStyles = m_document->allFormats();
|
||||
for (int formatIndex : formats) {
|
||||
QTextFormat textFormat = allStyles.at(formatIndex);
|
||||
switch (textFormat.type()) {
|
||||
@ -905,11 +905,11 @@ void QTextOdfWriter::writeTableFormat(QXmlStreamWriter &writer, QTextTableFormat
|
||||
}
|
||||
|
||||
void QTextOdfWriter::writeTableCellFormat(QXmlStreamWriter &writer, QTextTableCellFormat format,
|
||||
int formatIndex, QVector<QTextFormat> &styles) const
|
||||
int formatIndex, QList<QTextFormat> &styles) const
|
||||
{
|
||||
// check for all table cells here if they are in a table with border
|
||||
if (m_cellFormatsInTablesWithBorders.contains(formatIndex)) {
|
||||
const QVector<int> tableIdVector = m_cellFormatsInTablesWithBorders.value(formatIndex);
|
||||
const QList<int> tableIdVector = m_cellFormatsInTablesWithBorders.value(formatIndex);
|
||||
for (const auto &tableId : tableIdVector) {
|
||||
const auto &tmpStyle = styles.at(tableId);
|
||||
if (tmpStyle.isTableFormat()) {
|
||||
@ -1052,7 +1052,7 @@ bool QTextOdfWriter::writeAll()
|
||||
}
|
||||
|
||||
// add objects for lists, frames and tables
|
||||
const QVector<QTextFormat> allFormats = m_document->allFormats();
|
||||
const QList<QTextFormat> allFormats = m_document->allFormats();
|
||||
const QList<int> copy = formats.values();
|
||||
for (auto index : copy) {
|
||||
QTextObject *object = m_document->objectForFormat(allFormats[index]);
|
||||
@ -1067,7 +1067,7 @@ bool QTextOdfWriter::writeAll()
|
||||
for (int rowindex = 0; rowindex < tableobject->rows(); ++rowindex) {
|
||||
for (int colindex = 0; colindex < tableobject->columns(); ++colindex) {
|
||||
const int cellFormatID = tableobject->cellAt(rowindex, colindex).tableCellFormatIndex();
|
||||
QVector<int> tableIdsTmp;
|
||||
QList<int> tableIdsTmp;
|
||||
if (m_cellFormatsInTablesWithBorders.contains(cellFormatID))
|
||||
tableIdsTmp = m_cellFormatsInTablesWithBorders.value(cellFormatID);
|
||||
if (!tableIdsTmp.contains(tableID))
|
||||
|
@ -759,7 +759,7 @@ void QTextTable::insertColumns(int pos, int num)
|
||||
QTextFormatCollection *c = p->formatCollection();
|
||||
p->beginEditBlock();
|
||||
|
||||
QVector<int> extendedSpans;
|
||||
QList<int> extendedSpans;
|
||||
for (int i = 0; i < d->nRows; ++i) {
|
||||
int cell;
|
||||
if (i == d->nRows - 1 && pos == d->nCols) {
|
||||
@ -825,7 +825,7 @@ void QTextTable::insertColumns(int pos, int num)
|
||||
|
||||
QTextTableFormat tfmt = format();
|
||||
tfmt.setColumns(tfmt.columns()+num);
|
||||
QVector<QTextLength> columnWidths = tfmt.columnWidthConstraints();
|
||||
QList<QTextLength> columnWidths = tfmt.columnWidthConstraints();
|
||||
if (! columnWidths.isEmpty()) {
|
||||
for (int i = num; i > 0; --i)
|
||||
columnWidths.insert(pos, columnWidths.at(qMax(0, pos - 1)));
|
||||
@ -894,7 +894,7 @@ void QTextTable::removeRows(int pos, int num)
|
||||
|
||||
p->aboutToRemoveCell(cellAt(pos, 0).firstPosition(), cellAt(pos + num - 1, d->nCols - 1).lastPosition());
|
||||
|
||||
QVector<int> touchedCells;
|
||||
QList<int> touchedCells;
|
||||
for (int r = pos; r < pos + num; ++r) {
|
||||
for (int c = 0; c < d->nCols; ++c) {
|
||||
int cell = d->grid[r*d->nCols + c];
|
||||
@ -956,7 +956,7 @@ void QTextTable::removeColumns(int pos, int num)
|
||||
|
||||
p->aboutToRemoveCell(cellAt(0, pos).firstPosition(), cellAt(d->nRows - 1, pos + num - 1).lastPosition());
|
||||
|
||||
QVector<int> touchedCells;
|
||||
QList<int> touchedCells;
|
||||
for (int r = 0; r < d->nRows; ++r) {
|
||||
for (int c = pos; c < pos + num; ++c) {
|
||||
int cell = d->grid[r*d->nCols + c];
|
||||
@ -981,7 +981,7 @@ void QTextTable::removeColumns(int pos, int num)
|
||||
|
||||
QTextTableFormat tfmt = format();
|
||||
tfmt.setColumns(tfmt.columns()-num);
|
||||
QVector<QTextLength> columnWidths = tfmt.columnWidthConstraints();
|
||||
QList<QTextLength> columnWidths = tfmt.columnWidthConstraints();
|
||||
if (columnWidths.count() > pos) {
|
||||
columnWidths.remove(pos, num);
|
||||
tfmt.setColumnWidthConstraints (columnWidths);
|
||||
|
@ -435,7 +435,7 @@ public:
|
||||
QIODevice *device;
|
||||
bool ownDevice;
|
||||
bool dirtyFileTree;
|
||||
QVector<FileHeader> fileHeaders;
|
||||
QList<FileHeader> fileHeaders;
|
||||
QByteArray comment;
|
||||
uint start_of_directory;
|
||||
};
|
||||
@ -894,10 +894,10 @@ bool QZipReader::exists() const
|
||||
/*!
|
||||
Returns the list of files the archive contains.
|
||||
*/
|
||||
QVector<QZipReader::FileInfo> QZipReader::fileInfoList() const
|
||||
QList<QZipReader::FileInfo> QZipReader::fileInfoList() const
|
||||
{
|
||||
d->scanFiles();
|
||||
QVector<FileInfo> files;
|
||||
QList<FileInfo> files;
|
||||
const int numFileHeaders = d->fileHeaders.size();
|
||||
files.reserve(numFileHeaders);
|
||||
for (int i = 0; i < numFileHeaders; ++i)
|
||||
@ -1023,7 +1023,7 @@ bool QZipReader::extractAll(const QString &destinationDir) const
|
||||
QDir baseDir(destinationDir);
|
||||
|
||||
// create directories first
|
||||
const QVector<FileInfo> allFiles = fileInfoList();
|
||||
const QList<FileInfo> allFiles = fileInfoList();
|
||||
for (const FileInfo &fi : allFiles) {
|
||||
const QString absPath = destinationDir + QDir::separator() + fi.filePath;
|
||||
if (fi.isDir) {
|
||||
|
@ -890,8 +890,8 @@ static void getFontTable(const uchar *fileBegin, const uchar *data, quint32 tag,
|
||||
|
||||
static void getFamiliesAndSignatures(const QByteArray &fontData,
|
||||
QList<QFontNames> *families,
|
||||
QVector<FONTSIGNATURE> *signatures,
|
||||
QVector<QFontValues> *values)
|
||||
QList<FONTSIGNATURE> *signatures,
|
||||
QList<QFontValues> *values)
|
||||
{
|
||||
const uchar *data = reinterpret_cast<const uchar *>(fontData.constData());
|
||||
|
||||
@ -952,8 +952,8 @@ QStringList QWindowsFontDatabase::addApplicationFont(const QByteArray &fontData,
|
||||
{
|
||||
WinApplicationFont font;
|
||||
font.fileName = fileName;
|
||||
QVector<FONTSIGNATURE> signatures;
|
||||
QVector<QFontValues> fontValues;
|
||||
QList<FONTSIGNATURE> signatures;
|
||||
QList<QFontValues> fontValues;
|
||||
QList<QFontNames> families;
|
||||
QStringList familyNames;
|
||||
|
||||
|
@ -111,7 +111,7 @@ struct FontKey
|
||||
};
|
||||
} // namespace
|
||||
|
||||
typedef QVector<FontKey> FontKeys;
|
||||
using FontKeys = QList<FontKey>;
|
||||
|
||||
static FontKeys &fontKeys()
|
||||
{
|
||||
|
@ -48,7 +48,7 @@
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
template<typename T>
|
||||
static void insertOrRemoveItems(QVector<T> &items, int index, int delta)
|
||||
static void insertOrRemoveItems(QList<T> &items, int index, int delta)
|
||||
{
|
||||
int count = items.count();
|
||||
if (index < count) {
|
||||
@ -355,7 +355,7 @@ void QGridLayoutRowData::calculateGeometries(int start, int end, qreal targetSiz
|
||||
if (newSizes[i] >= 0.0)
|
||||
continue;
|
||||
|
||||
const QVector<QGridLayoutBox> &rBoxes = isLargerThanMaximum ? rowInfo.boxes : boxes;
|
||||
const QList<QGridLayoutBox> &rBoxes = isLargerThanMaximum ? rowInfo.boxes : boxes;
|
||||
const QGridLayoutBox &box = rBoxes.value(start + i);
|
||||
qreal maxBoxSize = box.q_maximumSize;
|
||||
|
||||
@ -1095,8 +1095,8 @@ QSizeF QGridLayoutEngine::sizeHint(Qt::SizeHint which, const QSizeF &constraint,
|
||||
//We have items whose height depends on their width
|
||||
if (constraint.width() >= 0) {
|
||||
ensureColumnAndRowData(&q_columnData, &sizehint_totalBoxes[Qt::Horizontal], nullptr, nullptr, Qt::Horizontal, styleInfo);
|
||||
QVector<qreal> sizehint_xx;
|
||||
QVector<qreal> sizehint_widths;
|
||||
QList<qreal> sizehint_xx;
|
||||
QList<qreal> sizehint_widths;
|
||||
|
||||
sizehint_xx.resize(columnCount());
|
||||
sizehint_widths.resize(columnCount());
|
||||
@ -1112,8 +1112,8 @@ QSizeF QGridLayoutEngine::sizeHint(Qt::SizeHint which, const QSizeF &constraint,
|
||||
if (constraint.height() >= 0) {
|
||||
//We have items whose width depends on their height
|
||||
ensureColumnAndRowData(&q_rowData, &sizehint_totalBoxes[Qt::Vertical], nullptr, nullptr, Qt::Vertical, styleInfo);
|
||||
QVector<qreal> sizehint_yy;
|
||||
QVector<qreal> sizehint_heights;
|
||||
QList<qreal> sizehint_yy;
|
||||
QList<qreal> sizehint_heights;
|
||||
|
||||
sizehint_yy.resize(rowCount());
|
||||
sizehint_heights.resize(rowCount());
|
||||
@ -1210,7 +1210,7 @@ void QGridLayoutEngine::dump(int indent) const
|
||||
q_rowData.dump(indent + 2);
|
||||
|
||||
qDebug("%*s Geometries output", indent, "");
|
||||
QVector<qreal> *cellPos = &q_yy;
|
||||
QList<qreal> *cellPos = &q_yy;
|
||||
for (int pass = 0; pass < 2; ++pass) {
|
||||
QString message;
|
||||
for (i = 0; i < cellPos->count(); ++i) {
|
||||
|
@ -322,17 +322,17 @@ QByteArray QShaderGenerator::createShaderCode(const QStringList &enabledLayers)
|
||||
[enabledLayers] (const QString &s) { return enabledLayers.contains(s); });
|
||||
};
|
||||
|
||||
QVector<QString> globalInputVariables;
|
||||
QList<QString> globalInputVariables;
|
||||
const QRegularExpression globalInputExtractRegExp(QStringLiteral("^.*\\s+(\\w+).*;$"));
|
||||
|
||||
const QVector<QShaderNode> nodes = graph.nodes();
|
||||
const QList<QShaderNode> nodes = graph.nodes();
|
||||
for (const QShaderNode &node : nodes) {
|
||||
if (intersectsEnabledLayers(node.layers())) {
|
||||
const QByteArrayList headerSnippets = node.rule(format).headerSnippets;
|
||||
for (const QByteArray &snippet : headerSnippets) {
|
||||
code << replaceParameters(snippet, node, format);
|
||||
|
||||
// If node is an input, record the variable name into the globalInputVariables vector
|
||||
// If node is an input, record the variable name into the globalInputVariables list
|
||||
if (node.type() == QShaderNode::Input) {
|
||||
const QRegularExpressionMatch match = globalInputExtractRegExp.match(QString::fromUtf8(code.last()));
|
||||
if (match.hasMatch())
|
||||
@ -355,7 +355,7 @@ QByteArray QShaderGenerator::createShaderCode(const QStringList &enabledLayers)
|
||||
struct Assignment
|
||||
{
|
||||
QString expression;
|
||||
QVector<Variable *> referencedVariables;
|
||||
QList<Variable *> referencedVariables;
|
||||
};
|
||||
|
||||
struct Variable
|
||||
@ -415,11 +415,11 @@ QByteArray QShaderGenerator::createShaderCode(const QStringList &enabledLayers)
|
||||
// just use vertexPosition directly.
|
||||
// The added benefit is when having arrays, we don't try to create
|
||||
// mat4 v38 = skinningPalelette[100] which would be invalid
|
||||
QVector<Variable> temporaryVariables;
|
||||
QList<Variable> temporaryVariables;
|
||||
// Reserve more than enough space to ensure no reallocation will take place
|
||||
temporaryVariables.reserve(nodes.size() * 8);
|
||||
|
||||
QVector<LineContent> lines;
|
||||
QList<LineContent> lines;
|
||||
|
||||
auto createVariable = [&] () -> Variable * {
|
||||
Q_ASSERT(temporaryVariables.capacity() > 0);
|
||||
@ -456,14 +456,14 @@ QByteArray QShaderGenerator::createShaderCode(const QStringList &enabledLayers)
|
||||
for (const QShaderGraph::Statement &statement : graph.createStatements(enabledLayers)) {
|
||||
const QShaderNode node = statement.node;
|
||||
QByteArray line = node.rule(format).substitution;
|
||||
const QVector<QShaderNodePort> ports = node.ports();
|
||||
const QList<QShaderNodePort> ports = node.ports();
|
||||
|
||||
struct VariableReplacement {
|
||||
QByteArray placeholder;
|
||||
QByteArray variable;
|
||||
};
|
||||
|
||||
QVector<VariableReplacement> variableReplacements;
|
||||
QList<VariableReplacement> variableReplacements;
|
||||
|
||||
// Generate temporary variable names vN
|
||||
for (const QShaderNodePort &port : ports) {
|
||||
|
@ -44,9 +44,9 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace
|
||||
{
|
||||
QVector<QShaderNode> copyOutputNodes(const QVector<QShaderNode> &nodes, const QVector<QShaderGraph::Edge> &edges)
|
||||
QList<QShaderNode> copyOutputNodes(const QList<QShaderNode> &nodes, const QList<QShaderGraph::Edge> &edges)
|
||||
{
|
||||
auto res = QVector<QShaderNode>();
|
||||
auto res = QList<QShaderNode>();
|
||||
std::copy_if(nodes.cbegin(), nodes.cend(),
|
||||
std::back_inserter(res),
|
||||
[&edges] (const QShaderNode &node) {
|
||||
@ -62,9 +62,9 @@ namespace
|
||||
return res;
|
||||
}
|
||||
|
||||
QVector<QShaderGraph::Edge> incomingEdges(const QVector<QShaderGraph::Edge> &edges, const QUuid &uuid)
|
||||
QList<QShaderGraph::Edge> incomingEdges(const QList<QShaderGraph::Edge> &edges, const QUuid &uuid)
|
||||
{
|
||||
auto res = QVector<QShaderGraph::Edge>();
|
||||
auto res = QList<QShaderGraph::Edge>();
|
||||
std::copy_if(edges.cbegin(), edges.cend(),
|
||||
std::back_inserter(res),
|
||||
[uuid] (const QShaderGraph::Edge &edge) {
|
||||
@ -73,9 +73,9 @@ namespace
|
||||
return res;
|
||||
}
|
||||
|
||||
QVector<QShaderGraph::Edge> outgoingEdges(const QVector<QShaderGraph::Edge> &edges, const QUuid &uuid)
|
||||
QList<QShaderGraph::Edge> outgoingEdges(const QList<QShaderGraph::Edge> &edges, const QUuid &uuid)
|
||||
{
|
||||
auto res = QVector<QShaderGraph::Edge>();
|
||||
auto res = QList<QShaderGraph::Edge>();
|
||||
std::copy_if(edges.cbegin(), edges.cend(),
|
||||
std::back_inserter(res),
|
||||
[uuid] (const QShaderGraph::Edge &edge) {
|
||||
@ -89,7 +89,7 @@ namespace
|
||||
auto statement = QShaderGraph::Statement();
|
||||
statement.node = node;
|
||||
|
||||
const QVector<QShaderNodePort> ports = node.ports();
|
||||
const QList<QShaderNodePort> ports = node.ports();
|
||||
for (const QShaderNodePort &port : ports) {
|
||||
if (port.direction == QShaderNodePort::Input) {
|
||||
statement.inputs.append(-1);
|
||||
@ -102,7 +102,7 @@ namespace
|
||||
}
|
||||
|
||||
QShaderGraph::Statement completeStatement(const QHash<QUuid, QShaderGraph::Statement> &idHash,
|
||||
const QVector<QShaderGraph::Edge> edges,
|
||||
const QList<QShaderGraph::Edge> edges,
|
||||
const QUuid &uuid)
|
||||
{
|
||||
auto targetStatement = idHash.value(uuid);
|
||||
@ -117,29 +117,29 @@ namespace
|
||||
if (sourcePortIndex < 0 || targetPortIndex < 0)
|
||||
continue;
|
||||
|
||||
const QVector<int> sourceOutputs = sourceStatement.outputs;
|
||||
QVector<int> &targetInputs = targetStatement.inputs;
|
||||
const QList<int> sourceOutputs = sourceStatement.outputs;
|
||||
QList<int> &targetInputs = targetStatement.inputs;
|
||||
targetInputs[targetPortIndex] = sourceOutputs[sourcePortIndex];
|
||||
}
|
||||
return targetStatement;
|
||||
}
|
||||
|
||||
void removeNodesWithUnboundInputs(QVector<QShaderGraph::Statement> &statements,
|
||||
const QVector<QShaderGraph::Edge> &allEdges)
|
||||
void removeNodesWithUnboundInputs(QList<QShaderGraph::Statement> &statements,
|
||||
const QList<QShaderGraph::Edge> &allEdges)
|
||||
{
|
||||
// A node is invalid if any of its input ports is disconected
|
||||
// or connected to the output port of another invalid node.
|
||||
|
||||
// Keeps track of the edges from the nodes we know to be valid
|
||||
// to unvisited nodes
|
||||
auto currentEdges = QVector<QShaderGraph::Edge>();
|
||||
auto currentEdges = QList<QShaderGraph::Edge>();
|
||||
|
||||
statements.erase(std::remove_if(statements.begin(),
|
||||
statements.end(),
|
||||
[¤tEdges, &allEdges] (const QShaderGraph::Statement &statement) {
|
||||
const QShaderNode &node = statement.node;
|
||||
const QVector<QShaderGraph::Edge> outgoing = outgoingEdges(currentEdges, node.uuid());
|
||||
const QVector<QShaderNodePort> ports = node.ports();
|
||||
const QList<QShaderGraph::Edge> outgoing = outgoingEdges(currentEdges, node.uuid());
|
||||
const QList<QShaderNodePort> ports = node.ports();
|
||||
|
||||
bool allInputsConnected = true;
|
||||
for (const QShaderNodePort &port : node.ports()) {
|
||||
@ -159,7 +159,7 @@ namespace
|
||||
}
|
||||
|
||||
if (allInputsConnected) {
|
||||
const QVector<QShaderGraph::Edge> incoming = incomingEdges(allEdges, node.uuid());
|
||||
const QList<QShaderGraph::Edge> incoming = incomingEdges(allEdges, node.uuid());
|
||||
currentEdges.append(incoming);
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ QUuid QShaderGraph::Statement::uuid() const noexcept
|
||||
|
||||
int QShaderGraph::Statement::portIndex(QShaderNodePort::Direction direction, const QString &portName) const noexcept
|
||||
{
|
||||
const QVector<QShaderNodePort> ports = node.ports();
|
||||
const QList<QShaderNodePort> ports = node.ports();
|
||||
int index = 0;
|
||||
for (const QShaderNodePort &port : ports) {
|
||||
if (port.name == portName && port.direction == direction)
|
||||
@ -201,7 +201,7 @@ void QShaderGraph::removeNode(const QShaderNode &node)
|
||||
m_nodes.erase(it);
|
||||
}
|
||||
|
||||
QVector<QShaderNode> QShaderGraph::nodes() const noexcept
|
||||
QList<QShaderNode> QShaderGraph::nodes() const noexcept
|
||||
{
|
||||
return m_nodes;
|
||||
}
|
||||
@ -218,12 +218,12 @@ void QShaderGraph::removeEdge(const QShaderGraph::Edge &edge)
|
||||
m_edges.removeAll(edge);
|
||||
}
|
||||
|
||||
QVector<QShaderGraph::Edge> QShaderGraph::edges() const noexcept
|
||||
QList<QShaderGraph::Edge> QShaderGraph::edges() const noexcept
|
||||
{
|
||||
return m_edges;
|
||||
}
|
||||
|
||||
QVector<QShaderGraph::Statement> QShaderGraph::createStatements(const QStringList &enabledLayers) const
|
||||
QList<QShaderGraph::Statement> QShaderGraph::createStatements(const QStringList &enabledLayers) const
|
||||
{
|
||||
const auto intersectsEnabledLayers = [enabledLayers] (const QStringList &layers) {
|
||||
return layers.isEmpty()
|
||||
@ -231,8 +231,8 @@ QVector<QShaderGraph::Statement> QShaderGraph::createStatements(const QStringLis
|
||||
[enabledLayers] (const QString &s) { return enabledLayers.contains(s); });
|
||||
};
|
||||
|
||||
const QVector<QShaderNode> enabledNodes = [this, intersectsEnabledLayers] {
|
||||
auto res = QVector<QShaderNode>();
|
||||
const QList<QShaderNode> enabledNodes = [this, intersectsEnabledLayers] {
|
||||
auto res = QList<QShaderNode>();
|
||||
std::copy_if(m_nodes.cbegin(), m_nodes.cend(),
|
||||
std::back_inserter(res),
|
||||
[intersectsEnabledLayers] (const QShaderNode &node) {
|
||||
@ -241,8 +241,8 @@ QVector<QShaderGraph::Statement> QShaderGraph::createStatements(const QStringLis
|
||||
return res;
|
||||
}();
|
||||
|
||||
const QVector<Edge> enabledEdges = [this, intersectsEnabledLayers] {
|
||||
auto res = QVector<Edge>();
|
||||
const QList<Edge> enabledEdges = [this, intersectsEnabledLayers] {
|
||||
auto res = QList<Edge>();
|
||||
std::copy_if(m_edges.cbegin(), m_edges.cend(),
|
||||
std::back_inserter(res),
|
||||
[intersectsEnabledLayers] (const Edge &edge) {
|
||||
@ -259,11 +259,11 @@ QVector<QShaderGraph::Statement> QShaderGraph::createStatements(const QStringLis
|
||||
return res;
|
||||
}();
|
||||
|
||||
auto result = QVector<Statement>();
|
||||
QVector<Edge> currentEdges = enabledEdges;
|
||||
QVector<QUuid> currentUuids = [enabledNodes, enabledEdges] {
|
||||
const QVector<QShaderNode> inputs = copyOutputNodes(enabledNodes, enabledEdges);
|
||||
auto res = QVector<QUuid>();
|
||||
auto result = QList<Statement>();
|
||||
QList<Edge> currentEdges = enabledEdges;
|
||||
QList<QUuid> currentUuids = [enabledNodes, enabledEdges] {
|
||||
const QList<QShaderNode> inputs = copyOutputNodes(enabledNodes, enabledEdges);
|
||||
auto res = QList<QUuid>();
|
||||
std::transform(inputs.cbegin(), inputs.cend(),
|
||||
std::back_inserter(res),
|
||||
[](const QShaderNode &node) { return node.uuid(); });
|
||||
@ -280,11 +280,11 @@ QVector<QShaderGraph::Statement> QShaderGraph::createStatements(const QStringLis
|
||||
const QUuid uuid = currentUuids.takeFirst();
|
||||
result.append(completeStatement(idHash, enabledEdges, uuid));
|
||||
|
||||
const QVector<QShaderGraph::Edge> outgoing = outgoingEdges(currentEdges, uuid);
|
||||
const QList<QShaderGraph::Edge> outgoing = outgoingEdges(currentEdges, uuid);
|
||||
for (const QShaderGraph::Edge &outgoingEdge : outgoing) {
|
||||
currentEdges.removeAll(outgoingEdge);
|
||||
const QUuid nextUuid = outgoingEdge.sourceNodeUuid;
|
||||
const QVector<QShaderGraph::Edge> incoming = incomingEdges(currentEdges, nextUuid);
|
||||
const QList<QShaderGraph::Edge> incoming = incomingEdges(currentEdges, nextUuid);
|
||||
if (incoming.isEmpty()) {
|
||||
currentUuids.append(nextUuid);
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ void QShaderNode::setLayers(const QStringList &layers) noexcept
|
||||
m_layers = layers;
|
||||
}
|
||||
|
||||
QVector<QShaderNodePort> QShaderNode::ports() const noexcept
|
||||
QList<QShaderNodePort> QShaderNode::ports() const noexcept
|
||||
{
|
||||
return m_ports;
|
||||
}
|
||||
@ -139,9 +139,9 @@ void QShaderNode::removeRule(const QShaderFormat &format)
|
||||
m_rules.erase(it);
|
||||
}
|
||||
|
||||
QVector<QShaderFormat> QShaderNode::availableFormats() const
|
||||
QList<QShaderFormat> QShaderNode::availableFormats() const
|
||||
{
|
||||
auto res = QVector<QShaderFormat>();
|
||||
auto res = QList<QShaderFormat>();
|
||||
std::transform(m_rules.cbegin(), m_rules.cend(),
|
||||
std::back_inserter(res),
|
||||
[](const QPair<QShaderFormat, Rule> &entry) { return entry.first; });
|
||||
|
@ -75,8 +75,8 @@ public:
|
||||
|
||||
QByteArray logName;
|
||||
QByteArray data;
|
||||
QVector<int> offsets;
|
||||
QVector<int> lengths;
|
||||
QList<int> offsets;
|
||||
QList<int> lengths;
|
||||
QSize size;
|
||||
quint32 format = 0;
|
||||
quint32 internalFormat = 0;
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include "qbasicvulkanplatforminstance_p.h"
|
||||
#include <QLibrary>
|
||||
#include <QCoreApplication>
|
||||
#include <QVector>
|
||||
#include <QList>
|
||||
#include <QLoggingCategory>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
@ -138,7 +138,7 @@ void QBasicPlatformVulkanInstance::init(QLibrary *lib)
|
||||
uint32_t layerCount = 0;
|
||||
m_vkEnumerateInstanceLayerProperties(&layerCount, nullptr);
|
||||
if (layerCount) {
|
||||
QVector<VkLayerProperties> layerProps(layerCount);
|
||||
QList<VkLayerProperties> layerProps(layerCount);
|
||||
m_vkEnumerateInstanceLayerProperties(&layerCount, layerProps.data());
|
||||
m_supportedLayers.reserve(layerCount);
|
||||
for (const VkLayerProperties &p : qAsConst(layerProps)) {
|
||||
@ -157,7 +157,7 @@ void QBasicPlatformVulkanInstance::init(QLibrary *lib)
|
||||
uint32_t extCount = 0;
|
||||
m_vkEnumerateInstanceExtensionProperties(nullptr, &extCount, nullptr);
|
||||
if (extCount) {
|
||||
QVector<VkExtensionProperties> extProps(extCount);
|
||||
QList<VkExtensionProperties> extProps(extCount);
|
||||
m_vkEnumerateInstanceExtensionProperties(nullptr, &extCount, extProps.data());
|
||||
m_supportedExtensions.reserve(extCount);
|
||||
for (const VkExtensionProperties &p : qAsConst(extProps)) {
|
||||
@ -250,7 +250,7 @@ void QBasicPlatformVulkanInstance::initInstance(QVulkanInstance *instance, const
|
||||
instInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
|
||||
instInfo.pApplicationInfo = &appInfo;
|
||||
|
||||
QVector<const char *> layerNameVec;
|
||||
QList<const char *> layerNameVec;
|
||||
for (const QByteArray &ba : qAsConst(m_enabledLayers))
|
||||
layerNameVec.append(ba.constData());
|
||||
if (!layerNameVec.isEmpty()) {
|
||||
@ -258,7 +258,7 @@ void QBasicPlatformVulkanInstance::initInstance(QVulkanInstance *instance, const
|
||||
instInfo.ppEnabledLayerNames = layerNameVec.constData();
|
||||
}
|
||||
|
||||
QVector<const char *> extNameVec;
|
||||
QList<const char *> extNameVec;
|
||||
for (const QByteArray &ba : qAsConst(m_enabledExtensions))
|
||||
extNameVec.append(ba.constData());
|
||||
if (!extNameVec.isEmpty()) {
|
||||
@ -346,7 +346,7 @@ bool QBasicPlatformVulkanInstance::supportsPresent(VkPhysicalDevice physicalDevi
|
||||
return supported;
|
||||
}
|
||||
|
||||
void QBasicPlatformVulkanInstance::setDebugFilters(const QVector<QVulkanInstance::DebugFilter> &filters)
|
||||
void QBasicPlatformVulkanInstance::setDebugFilters(const QList<QVulkanInstance::DebugFilter> &filters)
|
||||
{
|
||||
m_debugFilters = filters;
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ void QPlatformVulkanInstance::presentQueued(QWindow *window)
|
||||
Q_UNUSED(window);
|
||||
}
|
||||
|
||||
void QPlatformVulkanInstance::setDebugFilters(const QVector<QVulkanInstance::DebugFilter> &filters)
|
||||
void QPlatformVulkanInstance::setDebugFilters(const QList<QVulkanInstance::DebugFilter> &filters)
|
||||
{
|
||||
Q_UNUSED(filters);
|
||||
}
|
||||
|
@ -268,7 +268,7 @@ public:
|
||||
VkResult errorCode;
|
||||
QScopedPointer<QVulkanFunctions> funcs;
|
||||
QHash<VkDevice, QVulkanDeviceFunctions *> deviceFuncs;
|
||||
QVector<QVulkanInstance::DebugFilter> debugFilters;
|
||||
QList<QVulkanInstance::DebugFilter> debugFilters;
|
||||
};
|
||||
|
||||
bool QVulkanInstancePrivate::ensureVulkan()
|
||||
@ -411,19 +411,19 @@ QVulkanInstance::~QVulkanInstance()
|
||||
|
||||
/*!
|
||||
\class QVulkanInfoVector
|
||||
\brief A specialized QVector for QVulkanLayer and QVulkanExtension.
|
||||
\brief A specialized QList for QVulkanLayer and QVulkanExtension.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn template<typename T> bool QVulkanInfoVector<T>::contains(const QByteArray &name) const
|
||||
|
||||
\return true if the vector contains a layer or extension with the given \a name.
|
||||
\return true if the list contains a layer or extension with the given \a name.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn template<typename T> bool QVulkanInfoVector<T>::contains(const QByteArray &name, int minVersion) const
|
||||
|
||||
\return true if the vector contains a layer or extension with the given
|
||||
\return true if the list contains a layer or extension with the given
|
||||
\a name and a version same as or newer than \a minVersion.
|
||||
*/
|
||||
|
||||
|
@ -284,7 +284,7 @@ QVulkanWindow::Flags QVulkanWindow::flags() const
|
||||
|
||||
\note This function can be called before making the window visible.
|
||||
*/
|
||||
QVector<VkPhysicalDeviceProperties> QVulkanWindow::availablePhysicalDevices()
|
||||
QList<VkPhysicalDeviceProperties> QVulkanWindow::availablePhysicalDevices()
|
||||
{
|
||||
Q_D(QVulkanWindow);
|
||||
if (!d->physDevs.isEmpty() && !d->physDevProps.isEmpty())
|
||||
@ -308,7 +308,7 @@ QVector<VkPhysicalDeviceProperties> QVulkanWindow::availablePhysicalDevices()
|
||||
if (!count)
|
||||
return d->physDevProps;
|
||||
|
||||
QVector<VkPhysicalDevice> devs(count);
|
||||
QList<VkPhysicalDevice> devs(count);
|
||||
err = f->vkEnumeratePhysicalDevices(inst->vkInstance(), &count, devs.data());
|
||||
if (err != VK_SUCCESS) {
|
||||
qWarning("QVulkanWindow: Failed to enumerate physical devices: %d", err);
|
||||
@ -378,7 +378,7 @@ QVulkanInfoVector<QVulkanExtension> QVulkanWindow::supportedDeviceExtensions()
|
||||
uint32_t count = 0;
|
||||
VkResult err = f->vkEnumerateDeviceExtensionProperties(physDev, nullptr, &count, nullptr);
|
||||
if (err == VK_SUCCESS) {
|
||||
QVector<VkExtensionProperties> extProps(count);
|
||||
QList<VkExtensionProperties> extProps(count);
|
||||
err = f->vkEnumerateDeviceExtensionProperties(physDev, nullptr, &count, extProps.data());
|
||||
if (err == VK_SUCCESS) {
|
||||
QVulkanInfoVector<QVulkanExtension> exts;
|
||||
@ -445,7 +445,7 @@ void QVulkanWindow::setDeviceExtensions(const QByteArrayList &extensions)
|
||||
|
||||
\sa colorFormat()
|
||||
*/
|
||||
void QVulkanWindow::setPreferredColorFormats(const QVector<VkFormat> &formats)
|
||||
void QVulkanWindow::setPreferredColorFormats(const QList<VkFormat> &formats)
|
||||
{
|
||||
Q_D(QVulkanWindow);
|
||||
if (d->status != QVulkanWindowPrivate::StatusUninitialized) {
|
||||
@ -471,7 +471,7 @@ static struct {
|
||||
|
||||
/*!
|
||||
Returns the set of supported sample counts when using the physical device
|
||||
selected by setPhysicalDeviceIndex(), as a sorted vector.
|
||||
selected by setPhysicalDeviceIndex(), as a sorted list.
|
||||
|
||||
By default QVulkanWindow uses a sample count of 1. By calling setSampleCount()
|
||||
with a different value (2, 4, 8, ...) from the set returned by this
|
||||
@ -481,10 +481,10 @@ static struct {
|
||||
|
||||
\sa setSampleCount()
|
||||
*/
|
||||
QVector<int> QVulkanWindow::supportedSampleCounts()
|
||||
QList<int> QVulkanWindow::supportedSampleCounts()
|
||||
{
|
||||
Q_D(const QVulkanWindow);
|
||||
QVector<int> result;
|
||||
QList<int> result;
|
||||
|
||||
availablePhysicalDevices();
|
||||
|
||||
@ -606,7 +606,7 @@ void QVulkanWindowPrivate::init()
|
||||
|
||||
uint32_t queueCount = 0;
|
||||
f->vkGetPhysicalDeviceQueueFamilyProperties(physDev, &queueCount, nullptr);
|
||||
QVector<VkQueueFamilyProperties> queueFamilyProps(queueCount);
|
||||
QList<VkQueueFamilyProperties> queueFamilyProps(queueCount);
|
||||
f->vkGetPhysicalDeviceQueueFamilyProperties(physDev, &queueCount, queueFamilyProps.data());
|
||||
gfxQueueFamilyIdx = uint32_t(-1);
|
||||
presQueueFamilyIdx = uint32_t(-1);
|
||||
@ -647,7 +647,7 @@ void QVulkanWindowPrivate::init()
|
||||
#endif
|
||||
qCDebug(lcGuiVk, "Using queue families: graphics = %u present = %u", gfxQueueFamilyIdx, presQueueFamilyIdx);
|
||||
|
||||
QVector<VkDeviceQueueCreateInfo> queueInfo;
|
||||
QList<VkDeviceQueueCreateInfo> queueInfo;
|
||||
queueInfo.reserve(2);
|
||||
const float prio[] = { 0 };
|
||||
VkDeviceQueueCreateInfo addQueueInfo;
|
||||
@ -685,7 +685,7 @@ void QVulkanWindowPrivate::init()
|
||||
|
||||
// Filter out unsupported extensions in order to keep symmetry
|
||||
// with how QVulkanInstance behaves. Add the swapchain extension.
|
||||
QVector<const char *> devExts;
|
||||
QList<const char *> devExts;
|
||||
QVulkanInfoVector<QVulkanExtension> supportedExtensions = q->supportedDeviceExtensions();
|
||||
QByteArrayList reqExts = requestedDevExtensions;
|
||||
reqExts.append("VK_KHR_swapchain");
|
||||
@ -728,7 +728,7 @@ void QVulkanWindowPrivate::init()
|
||||
uint32_t count = 0;
|
||||
VkResult err = f->vkEnumerateDeviceLayerProperties(physDev, &count, nullptr);
|
||||
if (err == VK_SUCCESS) {
|
||||
QVector<VkLayerProperties> layerProps(count);
|
||||
QList<VkLayerProperties> layerProps(count);
|
||||
err = f->vkEnumerateDeviceLayerProperties(physDev, &count, layerProps.data());
|
||||
if (err == VK_SUCCESS) {
|
||||
for (const VkLayerProperties &prop : layerProps) {
|
||||
@ -840,7 +840,7 @@ void QVulkanWindowPrivate::init()
|
||||
|
||||
uint32_t formatCount = 0;
|
||||
vkGetPhysicalDeviceSurfaceFormatsKHR(physDev, surface, &formatCount, nullptr);
|
||||
QVector<VkSurfaceFormatKHR> formats(formatCount);
|
||||
QList<VkSurfaceFormatKHR> formats(formatCount);
|
||||
if (formatCount)
|
||||
vkGetPhysicalDeviceSurfaceFormatsKHR(physDev, surface, &formatCount, formats.data());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user