gui: Fix typos in source code comments
Pick-to: 5.15 6.2 Change-Id: Ie53e5542a8f93856470982939ecd8ec90b323d69 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This commit is contained in:
parent
5cb48619e2
commit
651d7debe1
src/gui
image
itemmodels
kernel
opengl
painting
qcssutil.cppqdrawhelper_mips_dsp_asm.Sqdrawhelper_ssse3.cppqdrawingprimitive_sse2_p.hqoutlinemapper.cppqpaintengine_raster.cppqpainterpath.cppqpolygon.hqt_mips_asm_dsp_p.hqtransform.cpp
platform
rhi
text
qfontdatabase.cppqtextcursor.cppqtextdocument_p.cppqtextdocumentlayout.cppqtextengine.cppqtextlayout.cpp
util
@ -240,7 +240,7 @@ QBitmap QBitmap::fromData(const QSize &size, const uchar *bits, QImage::Format m
|
|||||||
image.setColor(0, QColor(Qt::color0).rgb());
|
image.setColor(0, QColor(Qt::color0).rgb());
|
||||||
image.setColor(1, QColor(Qt::color1).rgb());
|
image.setColor(1, QColor(Qt::color1).rgb());
|
||||||
|
|
||||||
// Need to memcpy each line separatly since QImage is 32bit aligned and
|
// Need to memcpy each line separately since QImage is 32bit aligned and
|
||||||
// this data is only byte aligned...
|
// this data is only byte aligned...
|
||||||
int bytesPerLine = (size.width() + 7) / 8;
|
int bytesPerLine = (size.width() + 7) / 8;
|
||||||
for (int y = 0; y < size.height(); ++y)
|
for (int y = 0; y < size.height(); ++y)
|
||||||
|
@ -192,9 +192,9 @@ static QPixmapIconEngineEntry *bestSizeScaleMatch(const QSize &size, qreal scale
|
|||||||
// scale: we can only differentiate on scale if the scale differs
|
// scale: we can only differentiate on scale if the scale differs
|
||||||
if (pa->scale != pb->scale) {
|
if (pa->scale != pb->scale) {
|
||||||
|
|
||||||
// Score the pixmaps: 0 is an exact scale match, postive
|
// Score the pixmaps: 0 is an exact scale match, positive
|
||||||
// scores have more detail than requested, negative scores
|
// scores have more detail than requested, negative scores
|
||||||
// have less detail than rquested.
|
// have less detail than requested.
|
||||||
qreal ascore = pa->scale - scale;
|
qreal ascore = pa->scale - scale;
|
||||||
qreal bscore = pb->scale - scale;
|
qreal bscore = pb->scale - scale;
|
||||||
|
|
||||||
@ -358,7 +358,7 @@ QSize QPixmapIconEngine::actualSize(const QSize &size, QIcon::Mode mode, QIcon::
|
|||||||
{
|
{
|
||||||
QSize actualSize;
|
QSize actualSize;
|
||||||
|
|
||||||
// The returned actiual size is the size in device independent pixels,
|
// The returned actual size is the size in device independent pixels,
|
||||||
// so we limit the search to scale 1 and assume that e.g. @2x versions
|
// so we limit the search to scale 1 and assume that e.g. @2x versions
|
||||||
// does not proviode extra actual sizes not also provided by the 1x versions.
|
// does not proviode extra actual sizes not also provided by the 1x versions.
|
||||||
qreal scale = 1;
|
qreal scale = 1;
|
||||||
|
@ -1025,7 +1025,7 @@ QImage::QImage(const char * const xpm[])
|
|||||||
if (!xpm)
|
if (!xpm)
|
||||||
return;
|
return;
|
||||||
if (!qt_read_xpm_image_or_array(nullptr, xpm, *this))
|
if (!qt_read_xpm_image_or_array(nullptr, xpm, *this))
|
||||||
// Issue: Warning because the constructor may be ambigious
|
// Issue: Warning because the constructor may be ambiguous
|
||||||
qWarning("QImage::QImage(), XPM is not supported");
|
qWarning("QImage::QImage(), XPM is not supported");
|
||||||
}
|
}
|
||||||
#endif // QT_NO_IMAGEFORMAT_XPM
|
#endif // QT_NO_IMAGEFORMAT_XPM
|
||||||
|
@ -1436,7 +1436,7 @@ void QPixmap::detach()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// QPixmap.data member may be QRuntimePlatformPixmap so use handle() function to get
|
// QPixmap.data member may be QRuntimePlatformPixmap so use handle() function to get
|
||||||
// the actual underlaying runtime pixmap data.
|
// the actual underlying runtime pixmap data.
|
||||||
QPlatformPixmap *pd = handle();
|
QPlatformPixmap *pd = handle();
|
||||||
QPlatformPixmap::ClassId id = pd->classId();
|
QPlatformPixmap::ClassId id = pd->classId();
|
||||||
if (id == QPlatformPixmap::RasterClass) {
|
if (id == QPlatformPixmap::RasterClass) {
|
||||||
|
@ -83,7 +83,7 @@ QPlatformPixmap::QPlatformPixmap(PixelType pixelType, int objectId)
|
|||||||
|
|
||||||
QPlatformPixmap::~QPlatformPixmap()
|
QPlatformPixmap::~QPlatformPixmap()
|
||||||
{
|
{
|
||||||
// Sometimes the pixmap cleanup hooks will be called from derrived classes, which will
|
// Sometimes the pixmap cleanup hooks will be called from derived classes, which will
|
||||||
// then set is_cached to false. For example, on X11 Qt GUI needs to delete the GLXPixmap
|
// then set is_cached to false. For example, on X11 Qt GUI needs to delete the GLXPixmap
|
||||||
// or EGL Pixmap Surface for a given pixmap _before_ the native X11 pixmap is deleted,
|
// or EGL Pixmap Surface for a given pixmap _before_ the native X11 pixmap is deleted,
|
||||||
// otherwise some drivers will leak the GL surface. In this case, QX11PlatformPixmap will
|
// otherwise some drivers will leak the GL surface. In this case, QX11PlatformPixmap will
|
||||||
|
@ -896,7 +896,7 @@ bool QFileSystemModel::setData(const QModelIndex &idx, const QVariant &value, in
|
|||||||
*After re-naming something we don't want the selection to change*
|
*After re-naming something we don't want the selection to change*
|
||||||
- can't remove rows and later insert
|
- can't remove rows and later insert
|
||||||
- can't quickly remove and insert
|
- can't quickly remove and insert
|
||||||
- index pointer can't change because treeview doesn't use persistant index's
|
- index pointer can't change because treeview doesn't use persistent index's
|
||||||
|
|
||||||
- if this get any more complicated think of changing it to just
|
- if this get any more complicated think of changing it to just
|
||||||
use layoutChanged
|
use layoutChanged
|
||||||
|
@ -3160,7 +3160,7 @@ QMimeData *QStandardItemModel::mimeData(const QModelIndexList &indexes) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//remove duplicates childrens
|
//remove duplicates children
|
||||||
{
|
{
|
||||||
QDuplicateTracker<QStandardItem *> seen;
|
QDuplicateTracker<QStandardItem *> seen;
|
||||||
while (!stack.isEmpty()) {
|
while (!stack.isEmpty()) {
|
||||||
|
@ -1193,7 +1193,7 @@ int QKeySequencePrivate::decodeString(QString accel, QKeySequence::SequenceForma
|
|||||||
} else if (accelRef.at(0) == QLatin1Char('f') && (fnum = accelRef.mid(1).toInt()) >= 1 && fnum <= 35) {
|
} else if (accelRef.at(0) == QLatin1Char('f') && (fnum = accelRef.mid(1).toInt()) >= 1 && fnum <= 35) {
|
||||||
ret |= Qt::Key_F1 + fnum - 1;
|
ret |= Qt::Key_F1 + fnum - 1;
|
||||||
} else {
|
} else {
|
||||||
// For NativeText, check the traslation table first,
|
// For NativeText, check the translation table first,
|
||||||
// if we don't find anything then try it out with just the untranlated stuff.
|
// if we don't find anything then try it out with just the untranlated stuff.
|
||||||
// PortableText will only try the untranlated table.
|
// PortableText will only try the untranlated table.
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
@ -1991,7 +1991,7 @@ void QWindowPrivate::destroy()
|
|||||||
// Let subclasses act, typically by doing graphics resource cleaup, when
|
// Let subclasses act, typically by doing graphics resource cleaup, when
|
||||||
// the window, to which graphics resource may be tied, is going away.
|
// the window, to which graphics resource may be tied, is going away.
|
||||||
//
|
//
|
||||||
// NB! This is disfunctional when destroy() is invoked from the dtor since
|
// NB! This is dysfunctional when destroy() is invoked from the dtor since
|
||||||
// a reimplemented event() will not get called in the subclasses at that
|
// a reimplemented event() will not get called in the subclasses at that
|
||||||
// stage. However, the typical QWindow cleanup involves either close() or
|
// stage. However, the typical QWindow cleanup involves either close() or
|
||||||
// going through QWindowContainer, both of which will do an explicit, early
|
// going through QWindowContainer, both of which will do an explicit, early
|
||||||
@ -2771,7 +2771,7 @@ QPointF QWindow::mapFromGlobal(const QPointF &pos) const
|
|||||||
return pos - d->globalPosition();
|
return pos - d->globalPosition();
|
||||||
|
|
||||||
// Calculate local position in the native coordinate system. (See comment for the
|
// Calculate local position in the native coordinate system. (See comment for the
|
||||||
// correspinding mapToGlobal() code above).
|
// corresponding mapToGlobal() code above).
|
||||||
QPointF nativeGlobalPos = QHighDpi::toNativeGlobalPosition(pos, this);
|
QPointF nativeGlobalPos = QHighDpi::toNativeGlobalPosition(pos, this);
|
||||||
QPointF nativeWindowGlobalPos = QHighDpi::toNativeGlobalPosition(QPointF(d->globalPosition()), this);
|
QPointF nativeWindowGlobalPos = QHighDpi::toNativeGlobalPosition(QPointF(d->globalPosition()), this);
|
||||||
QPointF nativeLocalPos = nativeGlobalPos - nativeWindowGlobalPos;
|
QPointF nativeLocalPos = nativeGlobalPos - nativeWindowGlobalPos;
|
||||||
|
@ -165,7 +165,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
#if !QT_CONFIG(opengles2)
|
#if !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
// OS X 10.6 doesn't define these which are needed below
|
// OS X 10.6 doesn't define these which are needed below
|
||||||
// OS X 10.7 and later defien them in gl3.h
|
// OS X 10.7 and later define them in gl3.h
|
||||||
#ifndef APIENTRY
|
#ifndef APIENTRY
|
||||||
#define APIENTRY
|
#define APIENTRY
|
||||||
#endif
|
#endif
|
||||||
|
@ -352,7 +352,7 @@ void qDrawBorder(QPainter *p, const QRect &rect, const QCss::BorderStyle *styles
|
|||||||
QSize tlr, trr, blr, brr;
|
QSize tlr, trr, blr, brr;
|
||||||
qNormalizeRadii(rect, radii, &tlr, &trr, &blr, &brr);
|
qNormalizeRadii(rect, radii, &tlr, &trr, &blr, &brr);
|
||||||
|
|
||||||
// Drawn in increasing order of precendence
|
// Drawn in increasing order of precedence
|
||||||
if (styles[BottomEdge] != BorderStyle_None && borders[BottomEdge] > 0) {
|
if (styles[BottomEdge] != BorderStyle_None && borders[BottomEdge] > 0) {
|
||||||
qreal dw1 = (blr.width() || paintsOver(styles, colors, BottomEdge, LeftEdge)) ? 0 : borders[LeftEdge];
|
qreal dw1 = (blr.width() || paintsOver(styles, colors, BottomEdge, LeftEdge)) ? 0 : borders[LeftEdge];
|
||||||
qreal dw2 = (brr.width() || paintsOver(styles, colors, BottomEdge, RightEdge)) ? 0 : borders[RightEdge];
|
qreal dw2 = (brr.width() || paintsOver(styles, colors, BottomEdge, RightEdge)) ? 0 : borders[RightEdge];
|
||||||
|
@ -1970,7 +1970,7 @@ LEAF_MIPS_DSP(fetchUntransformed_444_asm_mips_dsp)
|
|||||||
2:
|
2:
|
||||||
andi t0, a1, 0x3
|
andi t0, a1, 0x3
|
||||||
beqz t0, 3f /* memory is word aligned */
|
beqz t0, 3f /* memory is word aligned */
|
||||||
andi a3, a2, 0x1 /* set the a3 register as the comparation
|
andi a3, a2, 0x1 /* set the a3 register as the comparison
|
||||||
* for ending the unrolled loop
|
* for ending the unrolled loop
|
||||||
* (1 if odd, 0 if even) */
|
* (1 if odd, 0 if even) */
|
||||||
b 1b /* not word aligned,
|
b 1b /* not word aligned,
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
/* The instruction palignr uses direct arguments, so we have to generate the code fo the different
|
/* The instruction palignr uses direct arguments, so we have to generate the code fo the different
|
||||||
shift (4, 8, 12). Checking the alignment inside the loop is unfortunatelly way too slow.
|
shift (4, 8, 12). Checking the alignment inside the loop is unfortunately way too slow.
|
||||||
*/
|
*/
|
||||||
#define BLENDING_LOOP(palignrOffset, length)\
|
#define BLENDING_LOOP(palignrOffset, length)\
|
||||||
for (; x-minusOffsetToAlignSrcOn16Bytes < length-7; x += 4) { \
|
for (; x-minusOffsetToAlignSrcOn16Bytes < length-7; x += 4) { \
|
||||||
|
@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
* Multiply the components of pixelVector by alphaChannel
|
* Multiply the components of pixelVector by alphaChannel
|
||||||
* Each 32bits components of alphaChannel must be in the form 0x00AA00AA
|
* Each 32bits components of alphaChannel must be in the form 0x00AA00AA
|
||||||
* colorMask must have 0x00ff00ff on each 32 bits component
|
* colorMask must have 0x00ff00ff on each 32 bits component
|
||||||
* half must have the value 128 (0x80) for each 32 bits compnent
|
* half must have the value 128 (0x80) for each 32 bits component
|
||||||
*/
|
*/
|
||||||
#define BYTE_MUL_SSE2(result, pixelVector, alphaChannel, colorMask, half) \
|
#define BYTE_MUL_SSE2(result, pixelVector, alphaChannel, colorMask, half) \
|
||||||
{ \
|
{ \
|
||||||
@ -102,7 +102,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
* Each 32bits components of alphaChannel must be in the form 0x00AA00AA
|
* Each 32bits components of alphaChannel must be in the form 0x00AA00AA
|
||||||
* oneMinusAlphaChannel must be 255 - alpha for each 32 bits component
|
* oneMinusAlphaChannel must be 255 - alpha for each 32 bits component
|
||||||
* colorMask must have 0x00ff00ff on each 32 bits component
|
* colorMask must have 0x00ff00ff on each 32 bits component
|
||||||
* half must have the value 128 (0x80) for each 32 bits compnent
|
* half must have the value 128 (0x80) for each 32 bits component
|
||||||
*/
|
*/
|
||||||
#define INTERPOLATE_PIXEL_255_SSE2(result, srcVector, dstVector, alphaChannel, oneMinusAlphaChannel, colorMask, half) { \
|
#define INTERPOLATE_PIXEL_255_SSE2(result, srcVector, dstVector, alphaChannel, oneMinusAlphaChannel, colorMask, half) { \
|
||||||
/* interpolate AG */\
|
/* interpolate AG */\
|
||||||
|
@ -354,7 +354,7 @@ void QOutlineMapper::clipElements(const QPointF *elements,
|
|||||||
int element_count)
|
int element_count)
|
||||||
{
|
{
|
||||||
// We could save a bit of time by actually implementing them fully
|
// We could save a bit of time by actually implementing them fully
|
||||||
// instead of going through convenience functionallity, but since
|
// instead of going through convenience functionality, but since
|
||||||
// this part of code hardly every used, it shouldn't matter.
|
// this part of code hardly every used, it shouldn't matter.
|
||||||
|
|
||||||
QScopedValueRollback<bool> in_clip_elements(m_in_clip_elements, true);
|
QScopedValueRollback<bool> in_clip_elements(m_in_clip_elements, true);
|
||||||
|
@ -969,7 +969,7 @@ void QRasterPaintEnginePrivate::drawImage(const QPointF &pt,
|
|||||||
if (iw <= 0)
|
if (iw <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// adapt the y paremeters...
|
// adapt the y parameters...
|
||||||
int cy1 = clip.y();
|
int cy1 = clip.y();
|
||||||
int cy2 = clip.y() + clip.height();
|
int cy2 = clip.y() + clip.height();
|
||||||
int y = qRound(pt.y());
|
int y = qRound(pt.y());
|
||||||
@ -1039,7 +1039,7 @@ void QRasterPaintEnginePrivate::blitImage(const QPointF &pt,
|
|||||||
if (iw <= 0)
|
if (iw <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// adapt the y paremeters...
|
// adapt the y parameters...
|
||||||
int cy1 = clip.y();
|
int cy1 = clip.y();
|
||||||
int cy2 = clip.y() + clip.height();
|
int cy2 = clip.y() + clip.height();
|
||||||
int y = qRound(pt.y());
|
int y = qRound(pt.y());
|
||||||
|
@ -2126,7 +2126,7 @@ bool QPainterPath::intersects(const QRectF &rect) const
|
|||||||
|
|
||||||
Q_D(QPainterPath);
|
Q_D(QPainterPath);
|
||||||
|
|
||||||
// Check if the rectangle surounds any subpath...
|
// Check if the rectangle surrounds any subpath...
|
||||||
for (int i=0; i<d->elements.size(); ++i) {
|
for (int i=0; i<d->elements.size(); ++i) {
|
||||||
const Element &e = d->elements.at(i);
|
const Element &e = d->elements.at(i);
|
||||||
if (e.type == QPainterPath::MoveToElement && rect.contains(e))
|
if (e.type == QPainterPath::MoveToElement && rect.contains(e))
|
||||||
|
@ -51,7 +51,7 @@ class QTransform;
|
|||||||
class QRect;
|
class QRect;
|
||||||
class QVariant;
|
class QVariant;
|
||||||
|
|
||||||
// We export each out-of-line method invidually to prevent MSVC from
|
// We export each out-of-line method individually to prevent MSVC from
|
||||||
// exporting the whole QList class.
|
// exporting the whole QList class.
|
||||||
class QPolygon : public QList<QPoint>
|
class QPolygon : public QList<QPoint>
|
||||||
{
|
{
|
||||||
|
@ -277,7 +277,7 @@ LEAF_MIPS32R2(symbol) \
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Saves set of registers on stack. Maximum number of registers that
|
* Saves set of registers on stack. Maximum number of registers that
|
||||||
* can be saved on stack is limitted to 14 (a0-a3, v0-v1 and s0-s7).
|
* can be saved on stack is limited to 14 (a0-a3, v0-v1 and s0-s7).
|
||||||
* Stack offset is number of bytes that are added to stack pointer (sp)
|
* Stack offset is number of bytes that are added to stack pointer (sp)
|
||||||
* before registers are pushed in order to provide enough space on stack
|
* before registers are pushed in order to provide enough space on stack
|
||||||
* (offset must be multiple of 4, and must be big enough, as described by
|
* (offset must be multiple of 4, and must be big enough, as described by
|
||||||
@ -352,7 +352,7 @@ LEAF_MIPS32R2(symbol) \
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Restores set of registers from stack. Maximum number of registers that
|
* Restores set of registers from stack. Maximum number of registers that
|
||||||
* can be restored from stack is limitted to 14 (a0-a3, v0-v1 and s0-s7).
|
* can be restored from stack is limited to 14 (a0-a3, v0-v1 and s0-s7).
|
||||||
* Stack offset is number of bytes that are added to stack pointer (sp)
|
* Stack offset is number of bytes that are added to stack pointer (sp)
|
||||||
* after registers are restored (offset must be multiple of 4, and must
|
* after registers are restored (offset must be multiple of 4, and must
|
||||||
* be big enough, as described by CHECK_STACK_OFFSET macro). This macro is
|
* be big enough, as described by CHECK_STACK_OFFSET macro). This macro is
|
||||||
|
@ -1724,7 +1724,7 @@ QPolygon QTransform::mapToPolygon(const QRect &rect) const
|
|||||||
MAP(rect.x(), bottom, x[3], y[3]);
|
MAP(rect.x(), bottom, x[3], y[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// all coordinates are correctly, tranform to a pointarray
|
// all coordinates are correctly, transform to a pointarray
|
||||||
// (rounding to the next integer)
|
// (rounding to the next integer)
|
||||||
a.setPoints(4, qRound(x[0]), qRound(y[0]),
|
a.setPoints(4, qRound(x[0]), qRound(y[0]),
|
||||||
qRound(x[1]), qRound(y[1]),
|
qRound(x[1]), qRound(y[1]),
|
||||||
|
@ -168,7 +168,7 @@ QMacInternalPasteboardMime::QMacInternalPasteboardMime(char t) : type(t)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
Destroys a conversion object, removing it from the global
|
Destroys a conversion object, removing it from the global
|
||||||
list of available convertors.
|
list of available converters.
|
||||||
*/
|
*/
|
||||||
QMacInternalPasteboardMime::~QMacInternalPasteboardMime()
|
QMacInternalPasteboardMime::~QMacInternalPasteboardMime()
|
||||||
{
|
{
|
||||||
|
@ -749,7 +749,7 @@ void QXkbCommon::verifyHasLatinLayout(xkb_keymap *keymap)
|
|||||||
// This means that lookupLatinKeysym() will not find anything and latin
|
// This means that lookupLatinKeysym() will not find anything and latin
|
||||||
// key shortcuts might not work. This is a bug in the affected desktop
|
// key shortcuts might not work. This is a bug in the affected desktop
|
||||||
// environment. Usually can be solved via system settings by adding e.g. 'us'
|
// environment. Usually can be solved via system settings by adding e.g. 'us'
|
||||||
// layout to the list of seleced layouts, or by using command line, "setxkbmap
|
// layout to the list of selected layouts, or by using command line, "setxkbmap
|
||||||
// -layout rus,en". The position of latin key based layout in the list of the
|
// -layout rus,en". The position of latin key based layout in the list of the
|
||||||
// selected layouts is irrelevant. Properly functioning desktop environments
|
// selected layouts is irrelevant. Properly functioning desktop environments
|
||||||
// handle this behind the scenes, even if no latin key based layout has been
|
// handle this behind the scenes, even if no latin key based layout has been
|
||||||
|
@ -82,7 +82,7 @@ public:
|
|||||||
bool superAsMeta = false, bool hyperAsMeta = false);
|
bool superAsMeta = false, bool hyperAsMeta = false);
|
||||||
|
|
||||||
// xkbcommon_* API is part of libxkbcommon internals, with modifications as
|
// xkbcommon_* API is part of libxkbcommon internals, with modifications as
|
||||||
// desribed in the header of the implementation file.
|
// described in the header of the implementation file.
|
||||||
static void xkbcommon_XConvertCase(xkb_keysym_t sym, xkb_keysym_t *lower, xkb_keysym_t *upper);
|
static void xkbcommon_XConvertCase(xkb_keysym_t sym, xkb_keysym_t *lower, xkb_keysym_t *upper);
|
||||||
static xkb_keysym_t qxkbcommon_xkb_keysym_to_upper(xkb_keysym_t ks);
|
static xkb_keysym_t qxkbcommon_xkb_keysym_to_upper(xkb_keysym_t ks);
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ void openFile(const std::string &accept,
|
|||||||
|
|
||||||
void saveFile(const char *content, size_t size, const std::string &fileNameHint)
|
void saveFile(const char *content, size_t size, const std::string &fileNameHint)
|
||||||
{
|
{
|
||||||
// Save a file by creating programatically clicking a download
|
// Save a file by creating programmatically clicking a download
|
||||||
// link to an object url to a Blob containing the file content.
|
// link to an object url to a Blob containing the file content.
|
||||||
// File content is copied once, so that the passed in content
|
// File content is copied once, so that the passed in content
|
||||||
// buffer can be released as soon as this function returns - we
|
// buffer can be released as soon as this function returns - we
|
||||||
|
@ -1986,7 +1986,7 @@ void QRhiGles2::enqueueSubresUpload(QGles2Texture *texD, QGles2CommandBuffer *cb
|
|||||||
cmd.args.subImage.h = size.height();
|
cmd.args.subImage.h = size.height();
|
||||||
cmd.args.subImage.glformat = texD->glformat;
|
cmd.args.subImage.glformat = texD->glformat;
|
||||||
cmd.args.subImage.gltype = texD->gltype;
|
cmd.args.subImage.gltype = texD->gltype;
|
||||||
// Default unpack alignment (row start aligment
|
// Default unpack alignment (row start alignment
|
||||||
// requirement) is 4. QImage guarantees 4 byte aligned
|
// requirement) is 4. QImage guarantees 4 byte aligned
|
||||||
// row starts, but our raw data here does not.
|
// row starts, but our raw data here does not.
|
||||||
cmd.args.subImage.rowStartAlign = (bytesPerLine & 3) ? 1 : 4;
|
cmd.args.subImage.rowStartAlign = (bytesPerLine & 3) ? 1 : 4;
|
||||||
|
@ -2403,7 +2403,7 @@ QFontEngine *QFontDatabasePrivate::findFont(const QFontDef &request,
|
|||||||
unsigned int score = UINT_MAX;
|
unsigned int score = UINT_MAX;
|
||||||
int index = match(multi ? QChar::Script_Common : script, request, family_name, foundry_name, &desc, blackListed, &score);
|
int index = match(multi ? QChar::Script_Common : script, request, family_name, foundry_name, &desc, blackListed, &score);
|
||||||
if (score > 0 && QGuiApplicationPrivate::platformIntegration()->fontDatabase()->populateFamilyAliases(family_name)) {
|
if (score > 0 && QGuiApplicationPrivate::platformIntegration()->fontDatabase()->populateFamilyAliases(family_name)) {
|
||||||
// We populated familiy aliases (e.g. localized families), so try again
|
// We populated family aliases (e.g. localized families), so try again
|
||||||
index = match(multi ? QChar::Script_Common : script, request, family_name, foundry_name, &desc, blackListed);
|
index = match(multi ? QChar::Script_Common : script, request, family_name, foundry_name, &desc, blackListed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -612,7 +612,7 @@ bool QTextCursorPrivate::movePosition(QTextCursor::MoveOperation op, QTextCursor
|
|||||||
++row;
|
++row;
|
||||||
}
|
}
|
||||||
cell = table->cellAt(row, column);
|
cell = table->cellAt(row, column);
|
||||||
// note we also continue while we have not reached a cell thats not merged with one above us
|
// note we also continue while we have not reached a cell that's not merged with one above us
|
||||||
} while (cell.isValid()
|
} while (cell.isValid()
|
||||||
&& ((op == QTextCursor::NextRow && currentRow == cell.row())
|
&& ((op == QTextCursor::NextRow && currentRow == cell.row())
|
||||||
|| cell.row() < row));
|
|| cell.row() < row));
|
||||||
@ -625,7 +625,7 @@ bool QTextCursorPrivate::movePosition(QTextCursor::MoveOperation op, QTextCursor
|
|||||||
--row;
|
--row;
|
||||||
}
|
}
|
||||||
cell = table->cellAt(row, column);
|
cell = table->cellAt(row, column);
|
||||||
// note we also continue while we have not reached a cell thats not merged with one above us
|
// note we also continue while we have not reached a cell that's not merged with one above us
|
||||||
} while (cell.isValid()
|
} while (cell.isValid()
|
||||||
&& ((op == QTextCursor::PreviousRow && currentRow == cell.row())
|
&& ((op == QTextCursor::PreviousRow && currentRow == cell.row())
|
||||||
|| cell.row() < row));
|
|| cell.row() < row));
|
||||||
|
@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
#define PMDEBUG if(0) qDebug
|
#define PMDEBUG if(0) qDebug
|
||||||
|
|
||||||
// The VxWorks DIAB compiler crashes when initializing the anonymouse union with { a7 }
|
// The VxWorks DIAB compiler crashes when initializing the anonymous union with { a7 }
|
||||||
#if !defined(Q_CC_DIAB)
|
#if !defined(Q_CC_DIAB)
|
||||||
# define QT_INIT_TEXTUNDOCOMMAND(c, a1, a2, a3, a4, a5, a6, a7, a8) \
|
# define QT_INIT_TEXTUNDOCOMMAND(c, a1, a2, a3, a4, a5, a6, a7, a8) \
|
||||||
QTextUndoCommand c = { a1, a2, 0, 0, quint8(a3), a4, quint32(a5), quint32(a6), { int(a7) }, quint32(a8) }
|
QTextUndoCommand c = { a1, a2, 0, 0, quint8(a3), a4, quint32(a5), quint32(a6), { int(a7) }, quint32(a8) }
|
||||||
|
@ -1519,7 +1519,7 @@ static inline qreal collapseOffset(const QTextDocumentLayoutPrivate *p, const Ed
|
|||||||
// there was no edge B (due to a rowspan or the axis C-D being the table's right
|
// there was no edge B (due to a rowspan or the axis C-D being the table's right
|
||||||
// border).
|
// border).
|
||||||
//
|
//
|
||||||
// ignoreEdgesAbove: true if an egde (left, right or top) for the first row
|
// ignoreEdgesAbove: true if an edge (left, right or top) for the first row
|
||||||
// after a table page break should be painted. In this case the edges of the
|
// after a table page break should be painted. In this case the edges of the
|
||||||
// row above must be ignored.
|
// row above must be ignored.
|
||||||
static inline double prioritizedEdgeAnchorOffset(const QTextDocumentLayoutPrivate *p,
|
static inline double prioritizedEdgeAnchorOffset(const QTextDocumentLayoutPrivate *p,
|
||||||
|
@ -81,7 +81,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// generate the script items
|
/// generate the script items
|
||||||
/// The caps parameter is used to choose the algoritm of splitting text and assiging roles to the textitems
|
/// The caps parameter is used to choose the algorithm of splitting text and assigning roles to the textitems
|
||||||
void generate(int start, int length, QFont::Capitalization caps)
|
void generate(int start, int length, QFont::Capitalization caps)
|
||||||
{
|
{
|
||||||
if (caps == QFont::SmallCaps)
|
if (caps == QFont::SmallCaps)
|
||||||
@ -3264,7 +3264,7 @@ QFixed QTextEngine::calculateTabWidth(int item, QFixed x) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (tabSpec.type == QTextOption::DelimiterTab)
|
else if (tabSpec.type == QTextOption::DelimiterTab)
|
||||||
// find delimitor character to calculate the width required
|
// find delimiter character to calculate the width required
|
||||||
tabSectionEnd = qMax(si.position, layoutData->string.indexOf(tabSpec.delimiter, si.position) + 1);
|
tabSectionEnd = qMax(si.position, layoutData->string.indexOf(tabSpec.delimiter, si.position) + 1);
|
||||||
|
|
||||||
if (tabSectionEnd > si.position) {
|
if (tabSectionEnd > si.position) {
|
||||||
|
@ -2002,7 +2002,7 @@ void QTextLine::layout_helper(int maxGlyphs)
|
|||||||
// and when we then end up breaking on the next glyph we compute the right bearing
|
// and when we then end up breaking on the next glyph we compute the right bearing
|
||||||
// and end up with a line width that is slightly larger width than what was requested.
|
// and end up with a line width that is slightly larger width than what was requested.
|
||||||
// Unfortunately we can't remove this optimization as it will slow down text
|
// Unfortunately we can't remove this optimization as it will slow down text
|
||||||
// layouting significantly, so we accept the slight correctnes issue.
|
// layouting significantly, so we accept the slight correctness issue.
|
||||||
if ((lbh.calculateNewWidth(line) + qAbs(lbh.minimumRightBearing)) > line.width)
|
if ((lbh.calculateNewWidth(line) + qAbs(lbh.minimumRightBearing)) > line.width)
|
||||||
lbh.calculateRightBearing();
|
lbh.calculateRightBearing();
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ enum {
|
|||||||
Minimal container to store Qt::Orientation-discriminated values.
|
Minimal container to store Qt::Orientation-discriminated values.
|
||||||
|
|
||||||
The salient feature is the indexing operator, which takes
|
The salient feature is the indexing operator, which takes
|
||||||
Qt::Orientation (and assumes it's passed only Qt::Horizonal or Qt::Vertical).
|
Qt::Orientation (and assumes it's passed only Qt::Horizontal or Qt::Vertical).
|
||||||
*/
|
*/
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class QHVContainer {
|
class QHVContainer {
|
||||||
|
Loading…
Reference in New Issue
Block a user