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
@ -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(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...
|
||||
int bytesPerLine = (size.width() + 7) / 8;
|
||||
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
|
||||
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
|
||||
// have less detail than rquested.
|
||||
// have less detail than requested.
|
||||
qreal ascore = pa->scale - scale;
|
||||
qreal bscore = pb->scale - scale;
|
||||
|
||||
@ -358,7 +358,7 @@ QSize QPixmapIconEngine::actualSize(const QSize &size, QIcon::Mode mode, QIcon::
|
||||
{
|
||||
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
|
||||
// does not proviode extra actual sizes not also provided by the 1x versions.
|
||||
qreal scale = 1;
|
||||
|
@ -1025,7 +1025,7 @@ QImage::QImage(const char * const xpm[])
|
||||
if (!xpm)
|
||||
return;
|
||||
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");
|
||||
}
|
||||
#endif // QT_NO_IMAGEFORMAT_XPM
|
||||
|
@ -1436,7 +1436,7 @@ void QPixmap::detach()
|
||||
return;
|
||||
|
||||
// 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::ClassId id = pd->classId();
|
||||
if (id == QPlatformPixmap::RasterClass) {
|
||||
|
@ -83,7 +83,7 @@ QPlatformPixmap::QPlatformPixmap(PixelType pixelType, int objectId)
|
||||
|
||||
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
|
||||
// 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
|
||||
|
@ -101,7 +101,7 @@ public:
|
||||
ReadingEnd,
|
||||
Error
|
||||
};
|
||||
// Defines the order of how the various ways of setting colorspace overrides eachother:
|
||||
// Defines the order of how the various ways of setting colorspace overrides each other:
|
||||
enum ColorSpaceState {
|
||||
Undefined = 0,
|
||||
GammaChrm = 1, // gAMA+cHRM chunks
|
||||
|
@ -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*
|
||||
- can't remove rows and later 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
|
||||
use layoutChanged
|
||||
|
@ -3160,7 +3160,7 @@ QMimeData *QStandardItemModel::mimeData(const QModelIndexList &indexes) const
|
||||
}
|
||||
}
|
||||
|
||||
//remove duplicates childrens
|
||||
//remove duplicates children
|
||||
{
|
||||
QDuplicateTracker<QStandardItem *> seen;
|
||||
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) {
|
||||
ret |= Qt::Key_F1 + fnum - 1;
|
||||
} 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.
|
||||
// PortableText will only try the untranlated table.
|
||||
bool found = false;
|
||||
|
@ -1991,7 +1991,7 @@ void QWindowPrivate::destroy()
|
||||
// Let subclasses act, typically by doing graphics resource cleaup, when
|
||||
// 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
|
||||
// stage. However, the typical QWindow cleanup involves either close() or
|
||||
// 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();
|
||||
|
||||
// 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 nativeWindowGlobalPos = QHighDpi::toNativeGlobalPosition(QPointF(d->globalPosition()), this);
|
||||
QPointF nativeLocalPos = nativeGlobalPos - nativeWindowGlobalPos;
|
||||
|
@ -165,7 +165,7 @@ QT_BEGIN_NAMESPACE
|
||||
#if !QT_CONFIG(opengles2)
|
||||
|
||||
// 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
|
||||
#define APIENTRY
|
||||
#endif
|
||||
|
@ -352,7 +352,7 @@ void qDrawBorder(QPainter *p, const QRect &rect, const QCss::BorderStyle *styles
|
||||
QSize 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) {
|
||||
qreal dw1 = (blr.width() || paintsOver(styles, colors, BottomEdge, LeftEdge)) ? 0 : borders[LeftEdge];
|
||||
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:
|
||||
andi t0, a1, 0x3
|
||||
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
|
||||
* (1 if odd, 0 if even) */
|
||||
b 1b /* not word aligned,
|
||||
|
@ -47,7 +47,7 @@
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
/* 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)\
|
||||
for (; x-minusOffsetToAlignSrcOn16Bytes < length-7; x += 4) { \
|
||||
|
@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE
|
||||
* Multiply the components of pixelVector by alphaChannel
|
||||
* Each 32bits components of alphaChannel must be in the form 0x00AA00AA
|
||||
* 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) \
|
||||
{ \
|
||||
@ -102,7 +102,7 @@ QT_BEGIN_NAMESPACE
|
||||
* Each 32bits components of alphaChannel must be in the form 0x00AA00AA
|
||||
* oneMinusAlphaChannel must be 255 - alpha for 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) { \
|
||||
/* interpolate AG */\
|
||||
|
@ -354,7 +354,7 @@ void QOutlineMapper::clipElements(const QPointF *elements,
|
||||
int element_count)
|
||||
{
|
||||
// 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.
|
||||
|
||||
QScopedValueRollback<bool> in_clip_elements(m_in_clip_elements, true);
|
||||
|
@ -969,7 +969,7 @@ void QRasterPaintEnginePrivate::drawImage(const QPointF &pt,
|
||||
if (iw <= 0)
|
||||
return;
|
||||
|
||||
// adapt the y paremeters...
|
||||
// adapt the y parameters...
|
||||
int cy1 = clip.y();
|
||||
int cy2 = clip.y() + clip.height();
|
||||
int y = qRound(pt.y());
|
||||
@ -1039,7 +1039,7 @@ void QRasterPaintEnginePrivate::blitImage(const QPointF &pt,
|
||||
if (iw <= 0)
|
||||
return;
|
||||
|
||||
// adapt the y paremeters...
|
||||
// adapt the y parameters...
|
||||
int cy1 = clip.y();
|
||||
int cy2 = clip.y() + clip.height();
|
||||
int y = qRound(pt.y());
|
||||
|
@ -2126,7 +2126,7 @@ bool QPainterPath::intersects(const QRectF &rect) const
|
||||
|
||||
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) {
|
||||
const Element &e = d->elements.at(i);
|
||||
if (e.type == QPainterPath::MoveToElement && rect.contains(e))
|
||||
|
@ -51,7 +51,7 @@ class QTransform;
|
||||
class QRect;
|
||||
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.
|
||||
class QPolygon : public QList<QPoint>
|
||||
{
|
||||
|
@ -277,7 +277,7 @@ LEAF_MIPS32R2(symbol) \
|
||||
|
||||
/*
|
||||
* 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)
|
||||
* 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
|
||||
@ -352,7 +352,7 @@ LEAF_MIPS32R2(symbol) \
|
||||
|
||||
/*
|
||||
* 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)
|
||||
* 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
|
||||
|
@ -1724,7 +1724,7 @@ QPolygon QTransform::mapToPolygon(const QRect &rect) const
|
||||
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)
|
||||
a.setPoints(4, qRound(x[0]), qRound(y[0]),
|
||||
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
|
||||
list of available convertors.
|
||||
list of available converters.
|
||||
*/
|
||||
QMacInternalPasteboardMime::~QMacInternalPasteboardMime()
|
||||
{
|
||||
|
@ -749,7 +749,7 @@ void QXkbCommon::verifyHasLatinLayout(xkb_keymap *keymap)
|
||||
// This means that lookupLatinKeysym() will not find anything and latin
|
||||
// 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'
|
||||
// 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
|
||||
// selected layouts is irrelevant. Properly functioning desktop environments
|
||||
// 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);
|
||||
|
||||
// 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 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)
|
||||
{
|
||||
// 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.
|
||||
// File content is copied once, so that the passed in content
|
||||
// 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.glformat = texD->glformat;
|
||||
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
|
||||
// row starts, but our raw data here does not.
|
||||
cmd.args.subImage.rowStartAlign = (bytesPerLine & 3) ? 1 : 4;
|
||||
|
@ -2403,7 +2403,7 @@ QFontEngine *QFontDatabasePrivate::findFont(const QFontDef &request,
|
||||
unsigned int score = UINT_MAX;
|
||||
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)) {
|
||||
// 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);
|
||||
}
|
||||
|
||||
|
@ -612,7 +612,7 @@ bool QTextCursorPrivate::movePosition(QTextCursor::MoveOperation op, QTextCursor
|
||||
++row;
|
||||
}
|
||||
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()
|
||||
&& ((op == QTextCursor::NextRow && currentRow == cell.row())
|
||||
|| cell.row() < row));
|
||||
@ -625,7 +625,7 @@ bool QTextCursorPrivate::movePosition(QTextCursor::MoveOperation op, QTextCursor
|
||||
--row;
|
||||
}
|
||||
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()
|
||||
&& ((op == QTextCursor::PreviousRow && currentRow == cell.row())
|
||||
|| cell.row() < row));
|
||||
|
@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
#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)
|
||||
# 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) }
|
||||
|
@ -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
|
||||
// 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
|
||||
// row above must be ignored.
|
||||
static inline double prioritizedEdgeAnchorOffset(const QTextDocumentLayoutPrivate *p,
|
||||
|
@ -81,7 +81,7 @@ public:
|
||||
}
|
||||
|
||||
/// 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)
|
||||
{
|
||||
if (caps == QFont::SmallCaps)
|
||||
@ -3264,7 +3264,7 @@ QFixed QTextEngine::calculateTabWidth(int item, QFixed x) const
|
||||
}
|
||||
}
|
||||
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);
|
||||
|
||||
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 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
|
||||
// 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)
|
||||
lbh.calculateRightBearing();
|
||||
|
||||
|
@ -100,7 +100,7 @@ enum {
|
||||
Minimal container to store Qt::Orientation-discriminated values.
|
||||
|
||||
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>
|
||||
class QHVContainer {
|
||||
|
Loading…
Reference in New Issue
Block a user