diff options
Diffstat (limited to 'src/gui')
28 files changed, 98 insertions, 48 deletions
diff --git a/src/gui/accessible/qaccessible_mac_p.h b/src/gui/accessible/qaccessible_mac_p.h index 4ee3a2d..e417cb6 100644 --- a/src/gui/accessible/qaccessible_mac_p.h +++ b/src/gui/accessible/qaccessible_mac_p.h @@ -122,7 +122,7 @@ private: QAccessibleInterfaceWrapper wrapper class. It has the same API as QAccessibleInterface, minus the child parameter - in the funcitons. + in the functions. */ class Q_AUTOTEST_EXPORT QAInterface : public QAccessible { @@ -432,7 +432,7 @@ public: /* QAccessibleHierarchyManager bridges the Mac and Qt accessibility hierarchies. There is a one-to-one relationship between QAElements on the Mac side - and QAInterfaces on the Qt side, and this class provies lookup funcitons + and QAInterfaces on the Qt side, and this class provides lookup functions that translates between these to items. The identity of a QAInterface is determined by its QAccessibleInterface and diff --git a/src/gui/embedded/qcopchannel_qws.cpp b/src/gui/embedded/qcopchannel_qws.cpp index 5786866..0d9d9d3 100644 --- a/src/gui/embedded/qcopchannel_qws.cpp +++ b/src/gui/embedded/qcopchannel_qws.cpp @@ -502,7 +502,7 @@ void QCopChannel::answer(QWSClient *cl, const QString& ch, bool known = qcopServerMap && qcopServerMap->contains(c) && !((*qcopServerMap)[c]).isEmpty(); // Yes, it's a typo, it's not user-visible, and we choose not to fix it for compatibility - QLatin1String ans = QLatin1String(known ? "known" : "unkown"); + QLatin1String ans = QLatin1String(known ? "known" : "unknown"); QWSServerPrivate::sendQCopEvent(cl, QLatin1String(""), ans, data, true); return; diff --git a/src/gui/embedded/qtransportauth_qws.cpp b/src/gui/embedded/qtransportauth_qws.cpp index 9a50702..90e90d1 100644 --- a/src/gui/embedded/qtransportauth_qws.cpp +++ b/src/gui/embedded/qtransportauth_qws.cpp @@ -445,7 +445,7 @@ QIODevice *QTransportAuth::passThroughByClient( QWSClient *client ) const /*! \internal Return a QIODevice pointer (to an internal QBuffer) which can be used - to receive data after authorisation on transport \a d. + to receive data after authorization on transport \a d. The return QIODevice will act as a pass-through. @@ -468,7 +468,7 @@ QAuthDevice *QTransportAuth::recvBuf( QTransportAuth::Data *data, QIODevice *iod /*! Return a QIODevice pointer (to an internal QBuffer) which can be used - to write data onto, for authorisation on transport \a d. + to write data onto, for authorization on transport \a d. The return QIODevice will act as a pass-through. diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index 8480c19..1b7aa97 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -722,7 +722,7 @@ public: /*! Returns true if \a item1 is on top of \a item2. - The items dont need to be siblings. + The items don't need to be siblings. \internal */ @@ -776,7 +776,7 @@ inline bool qt_closestItemFirst(const QGraphicsItem *item1, const QGraphicsItem /*! Returns true if \a item2 is on top of \a item1. - The items dont need to be siblings. + The items don't need to be siblings. \internal */ diff --git a/src/gui/inputmethod/qinputcontextfactory.cpp b/src/gui/inputmethod/qinputcontextfactory.cpp index 865c1b2..afe5095 100644 --- a/src/gui/inputmethod/qinputcontextfactory.cpp +++ b/src/gui/inputmethod/qinputcontextfactory.cpp @@ -205,7 +205,7 @@ QStringList QInputContextFactory::keys() This function contains pure Symbian exception handling code for getting S60 language list. - Returned object ownership is transfered to caller. + Returned object ownership is transferred to caller. */ static CAknInputLanguageList* s60LangListL() { @@ -224,7 +224,7 @@ static CAknInputLanguageList* s60LangListL() \internal This function utility function return S60 language list. - Returned object ownership is transfered to caller. + Returned object ownership is transferred to caller. */ static CAknInputLanguageList* s60LangList() { diff --git a/src/gui/itemviews/qitemselectionmodel.cpp b/src/gui/itemviews/qitemselectionmodel.cpp index e69cd65..e2a16b1 100644 --- a/src/gui/itemviews/qitemselectionmodel.cpp +++ b/src/gui/itemviews/qitemselectionmodel.cpp @@ -772,7 +772,7 @@ void QItemSelectionModelPrivate::_q_layoutAboutToBeChanged() savedPersistentIndexes.clear(); savedPersistentCurrentIndexes.clear(); - // optimisation for when all indexes are selected + // optimization for when all indexes are selected // (only if there is lots of items (1000) because this is not entirely correct) if (ranges.isEmpty() && currentSelection.count() == 1) { QItemSelectionRange range = currentSelection.first(); diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index d8fb74c..a4cc5a3 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -3742,7 +3742,7 @@ int QApplication::x11ProcessEvent(XEvent* event) // toplevel reparented... QWidget *newparent = QWidget::find(event->xreparent.parent); if (! newparent || (newparent->windowType() == Qt::Desktop)) { - // we dont' know about the new parent (or we've been + // we don't know about the new parent (or we've been // reparented to root), perhaps a window manager // has been (re)started? reset the focus model to unknown X11->focus_model = QX11Data::FM_Unknown; diff --git a/src/gui/kernel/qclipboard_win.cpp b/src/gui/kernel/qclipboard_win.cpp index 63ca9e5..c2e29fd 100644 --- a/src/gui/kernel/qclipboard_win.cpp +++ b/src/gui/kernel/qclipboard_win.cpp @@ -141,7 +141,7 @@ public: clipBoardViewer = new QWidget(); clipBoardViewer->createWinId(); clipBoardViewer->setObjectName(QLatin1String("internal clipboard owner")); - // We dont need this internal widget to appear in QApplication::topLevelWidgets() + // We don't need this internal widget to appear in QApplication::topLevelWidgets() if (QWidgetPrivate::allWidgets) QWidgetPrivate::allWidgets->remove(clipBoardViewer); } diff --git a/src/gui/kernel/qclipboard_x11.cpp b/src/gui/kernel/qclipboard_x11.cpp index 55548ef..62c861d 100644 --- a/src/gui/kernel/qclipboard_x11.cpp +++ b/src/gui/kernel/qclipboard_x11.cpp @@ -132,7 +132,7 @@ void setupOwner() requestor = new QWidget(0); requestor->createWinId(); requestor->setObjectName(QLatin1String("internal clipboard requestor")); - // We dont need this internal widgets to appear in QApplication::topLevelWidgets() + // We don't need this internal widgets to appear in QApplication::topLevelWidgets() if (QWidgetPrivate::allWidgets) { QWidgetPrivate::allWidgets->remove(owner); QWidgetPrivate::allWidgets->remove(requestor); @@ -769,7 +769,7 @@ QByteArray QX11Data::clipboardReadIncrementalProperty(Window win, Atom property, delete requestor; requestor = new QWidget(0); requestor->setObjectName(QLatin1String("internal clipboard requestor")); - // We dont need this internal widget to appear in QApplication::topLevelWidgets() + // We don't need this internal widget to appear in QApplication::topLevelWidgets() if (QWidgetPrivate::allWidgets) QWidgetPrivate::allWidgets->remove(requestor); diff --git a/src/gui/kernel/qkeymapper_mac.cpp b/src/gui/kernel/qkeymapper_mac.cpp index 3dc6afc..300e5ca 100644 --- a/src/gui/kernel/qkeymapper_mac.cpp +++ b/src/gui/kernel/qkeymapper_mac.cpp @@ -749,7 +749,7 @@ bool QKeyMapperPrivate::translateKeyEvent(QWidget *widget, EventHandlerCallRef e } return false; } - // Once we process the key down , we dont need to send the saved event again from + // Once we process the key down , we don't need to send the saved event again from // kEventTextInputUnicodeForKeyEvent, so clear it. if (currentContext && ekind == kEventRawKeyDown) { QMacInputContext *context = qobject_cast<QMacInputContext*>(currentContext); diff --git a/src/gui/kernel/qsoftkeymanager_s60.cpp b/src/gui/kernel/qsoftkeymanager_s60.cpp index fee1580..c81d75f 100644 --- a/src/gui/kernel/qsoftkeymanager_s60.cpp +++ b/src/gui/kernel/qsoftkeymanager_s60.cpp @@ -265,7 +265,7 @@ bool QSoftKeyManagerPrivateS60::setSoftkeyImage(CEikButtonGroupContainer *cba, CFbsBitmap* nMask = softkeyAlpha.toSymbianCFbsBitmap(); CEikImage* myimage = new (ELeave) CEikImage; - myimage->SetPicture( nBitmap, nMask ); // nBitmap and nMask ownership transfered + myimage->SetPicture( nBitmap, nMask ); // nBitmap and nMask ownership transferred EikSoftkeyImage::SetImage(cba, *myimage, left); // Takes myimage ownership cbaHasImage[position] = true; diff --git a/src/gui/kernel/qstandardgestures.cpp b/src/gui/kernel/qstandardgestures.cpp index 893ba2b..1821c3d 100644 --- a/src/gui/kernel/qstandardgestures.cpp +++ b/src/gui/kernel/qstandardgestures.cpp @@ -198,25 +198,22 @@ QGestureRecognizer::Result QPinchGestureRecognizer::recognize(QGesture *state, d->startPosition[0] = p1.screenPos(); d->startPosition[1] = p2.screenPos(); } - QLineF line(p1.screenPos(), p2.screenPos()); - QLineF lastLine(p1.lastScreenPos(), p2.lastScreenPos()); - QLineF tmp(line); - tmp.setLength(line.length() / 2.); - QPointF centerPoint = tmp.p2(); d->lastCenterPoint = d->centerPoint; - d->centerPoint = centerPoint; - d->changeFlags |= QPinchGesture::CenterPointChanged; + d->centerPoint = (p1.screenPos() + p2.screenPos()) / 2.0; - const qreal scaleFactor = line.length() / lastLine.length(); + d->changeFlags |= QPinchGesture::CenterPointChanged; if (d->isNewSequence) { - d->lastScaleFactor = scaleFactor; + d->scaleFactor = 1.0; + d->lastScaleFactor = 1.0; } else { d->lastScaleFactor = d->scaleFactor; + QLineF line(p1.screenPos(), p2.screenPos()); + QLineF lastLine(p1.lastScreenPos(), p2.lastScreenPos()); + d->scaleFactor = line.length() / lastLine.length(); } - d->scaleFactor = scaleFactor; - d->totalScaleFactor = d->totalScaleFactor * scaleFactor; + d->totalScaleFactor = d->totalScaleFactor * d->scaleFactor; d->changeFlags |= QPinchGesture::ScaleFactorChanged; qreal angle = QLineF(p1.screenPos(), p2.screenPos()).angle(); diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 9b44f15..e22ec55 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -236,6 +236,17 @@ void QWidgetBackingStoreTracker::unregisterWidget(QWidget *w) } } +/*! + \internal + Recursively remove widget and all of its descendents. + */ +void QWidgetBackingStoreTracker::unregisterWidgetSubtree(QWidget *widget) +{ + unregisterWidget(widget); + foreach (QObject *child, widget->children()) + if (QWidget *childWidget = qobject_cast<QWidget *>(child)) + unregisterWidgetSubtree(childWidget); +} QWidgetPrivate::QWidgetPrivate(int version) : QObjectPrivate(version) @@ -326,15 +337,27 @@ QWidgetPrivate::~QWidgetPrivate() #endif //QT_NO_GRAPHICSEFFECT } +class QDummyWindowSurface : public QWindowSurface +{ +public: + QDummyWindowSurface(QWidget *window) : QWindowSurface(window) {} + QPaintDevice *paintDevice() { return window(); } + void flush(QWidget *, const QRegion &, const QPoint &) {} +}; + QWindowSurface *QWidgetPrivate::createDefaultWindowSurface() { Q_Q(QWidget); QWindowSurface *surface; - if (QApplicationPrivate::graphicsSystem()) - surface = QApplicationPrivate::graphicsSystem()->createWindowSurface(q); - else - surface = createDefaultWindowSurface_sys(); + if (q->property("_q_DummyWindowSurface").toBool()) { + surface = new QDummyWindowSurface(q); + } else { + if (QApplicationPrivate::graphicsSystem()) + surface = QApplicationPrivate::graphicsSystem()->createWindowSurface(q); + else + surface = createDefaultWindowSurface_sys(); + } return surface; } @@ -10031,7 +10054,16 @@ void QWidget::setParent(QWidget *parent, Qt::WindowFlags f) if (newParent && isAncestorOf(focusWidget())) focusWidget()->clearFocus(); + QTLWExtra *oldTopExtra = window()->d_func()->maybeTopData(); + QWidgetBackingStoreTracker *oldBsTracker = oldTopExtra ? &oldTopExtra->backingStore : 0; + d->setParent_sys(parent, f); + + QTLWExtra *topExtra = window()->d_func()->maybeTopData(); + QWidgetBackingStoreTracker *bsTracker = topExtra ? &topExtra->backingStore : 0; + if (oldBsTracker && oldBsTracker != bsTracker) + oldBsTracker->unregisterWidgetSubtree(this); + if (desktopWidget) parent = 0; diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h index 6c89659..ca1e3fc 100644 --- a/src/gui/kernel/qwidget_p.h +++ b/src/gui/kernel/qwidget_p.h @@ -122,6 +122,7 @@ public: void registerWidget(QWidget *w); void unregisterWidget(QWidget *w); + void unregisterWidgetSubtree(QWidget *w); inline QWidgetBackingStore* data() { diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 5df5e19..cf4bdf1 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -577,7 +577,7 @@ void QWidgetPrivate::hide_sys() QSymbianControl *id = static_cast<QSymbianControl *>(q->internalWinId()); if (id) { - //Incorrect optimisation - for popup windows, Qt's focus is moved before + //Incorrect optimization - for popup windows, Qt's focus is moved before //hide_sys is called, resulting in the popup window keeping its elevated //position in the CONE control stack. //This can result in keyboard focus being in an invisible widget in some @@ -709,7 +709,8 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f) // old_winid may not have received a 'not visible' visibility // changed event before being destroyed; make sure that it is // removed from the backing store's list of visible windows. - S60->controlVisibilityChanged(old_winid, false); + if (old_winid) + S60->controlVisibilityChanged(old_winid, false); setWinId(0); diff --git a/src/gui/painting/qdrawhelper_arm_simd.cpp b/src/gui/painting/qdrawhelper_arm_simd.cpp index 61dac5e..2a5f5e4 100644 --- a/src/gui/painting/qdrawhelper_arm_simd.cpp +++ b/src/gui/painting/qdrawhelper_arm_simd.cpp @@ -47,7 +47,26 @@ #ifdef QT_HAVE_ARM_SIMD #if defined(Q_OS_SYMBIAN) -#include <u32std.h> +#if !defined(__SWITCH_TO_ARM) +#ifdef __MARM_THUMB__ +#ifndef __ARMCC__ +#define __SWITCH_TO_ARM asm("push {r0} ");\ + asm("add r0, pc, #4 ");\ + asm("bx r0 ");\ + asm("nop ");\ + asm(".align 2 ");\ + asm(".code 32 ");\ + asm("ldr r0, [sp], #4 ") +#define __END_ARM asm(".code 16 ") +#else +#define __SWITCH_TO_ARM asm(".code 32 "); +#define __END_ARM +#endif // __ARMCC__ +#else +#define __SWITCH_TO_ARM +#define __END_ARM +#endif //__MARM_THUMB__ +#endif #endif #if defined(Q_OS_SYMBIAN) && defined(Q_CC_RVCT) diff --git a/src/gui/painting/qgraphicssystem_qws.cpp b/src/gui/painting/qgraphicssystem_qws.cpp index f5dab4b..03a0d11 100644 --- a/src/gui/painting/qgraphicssystem_qws.cpp +++ b/src/gui/painting/qgraphicssystem_qws.cpp @@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE QPixmapData *QWSGraphicsSystem::createPixmapData(QPixmapData::PixelType type) const { if (screen->pixmapDataFactory()) - return screen->pixmapDataFactory()->create(type); //### For 4.4 compatability + return screen->pixmapDataFactory()->create(type); //### For 4.4 compatibility else return new QRasterPixmapData(type); } diff --git a/src/gui/painting/qimagescale.cpp b/src/gui/painting/qimagescale.cpp index 8580775..7383308 100644 --- a/src/gui/painting/qimagescale.cpp +++ b/src/gui/painting/qimagescale.cpp @@ -304,7 +304,7 @@ QImageScaleInfo* QImageScale::qimageCalcScaleInfo(const QImage &img, return(isi); } -/* FIXME: NEED to optimise ScaleAARGBA - currently its "ok" but needs work*/ +/* FIXME: NEED to optimize ScaleAARGBA - currently its "ok" but needs work*/ /* scale by area sampling */ static void qt_qimageScaleAARGBA(QImageScaleInfo *isi, unsigned int *dest, diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index c92d291..8f9d8ba 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -1102,7 +1102,7 @@ void QRasterPaintEnginePrivate::updateMatrixData(QSpanData *spanData, const QBru Q_Q(QRasterPaintEngine); bool bilinear = q->state()->flags.bilinear; - if (b.d->transform.type() > QTransform::TxNone) { // FALCON: optimise + if (b.d->transform.type() > QTransform::TxNone) { // FALCON: optimize spanData->setupMatrix(b.transform() * m, bilinear); } else { if (m.type() <= QTransform::TxTranslate) { diff --git a/src/gui/painting/qregion.h b/src/gui/painting/qregion.h index bc4da28..acb20c1 100644 --- a/src/gui/painting/qregion.h +++ b/src/gui/painting/qregion.h @@ -201,7 +201,7 @@ private: Region rgn; void *xrectangles; #elif defined(Q_WS_MAC) && !defined(QT_MAC_USE_COCOA) - mutable RgnHandle unused; // Here for binary compatability reasons. ### Qt 5 remove. + mutable RgnHandle unused; // Here for binary compatibility reasons. ### Qt 5 remove. #endif #if defined(Q_WS_QWS) || defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN) QRegionPrivate *qt_rgn; diff --git a/src/gui/styles/qwindowsxpstyle.cpp b/src/gui/styles/qwindowsxpstyle.cpp index a5e9c19..da29440 100644 --- a/src/gui/styles/qwindowsxpstyle.cpp +++ b/src/gui/styles/qwindowsxpstyle.cpp @@ -302,7 +302,7 @@ HWND QWindowsXPStylePrivate::winId(const QWidget *widget) limboWidget = new QWidget(0); limboWidget->createWinId(); limboWidget->setObjectName(QLatin1String("xp_limbo_widget")); - // We dont need this internal widget to appear in QApplication::topLevelWidgets() + // We don't need this internal widget to appear in QApplication::topLevelWidgets() if (QWidgetPrivate::allWidgets) QWidgetPrivate::allWidgets->remove(limboWidget); } diff --git a/src/gui/text/qfontdatabase_x11.cpp b/src/gui/text/qfontdatabase_x11.cpp index 9bf6cc8..ecc4690 100644 --- a/src/gui/text/qfontdatabase_x11.cpp +++ b/src/gui/text/qfontdatabase_x11.cpp @@ -2006,7 +2006,7 @@ static void registerFont(QFontDatabasePrivate::ApplicationFont *fnt) FcFontSet *set = FcConfigGetFonts(config, FcSetApplication); if (!set) { - FcConfigAppFontAddFile(config, (const FcChar8 *)":/non-existant"); + FcConfigAppFontAddFile(config, (const FcChar8 *)":/non-existent"); set = FcConfigGetFonts(config, FcSetApplication); // try again if (!set) return; diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h index 571cf98..fc26eef 100644 --- a/src/gui/text/qfontengine_p.h +++ b/src/gui/text/qfontengine_p.h @@ -158,7 +158,7 @@ public: virtual QFixed emSquareSize() const { return ascent(); } - /* returns 0 as glyph index for non existant glyphs */ + /* returns 0 as glyph index for non existent glyphs */ virtual bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, QTextEngine::ShaperFlags flags) const = 0; /** diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp index 7609ee5..5f25752 100644 --- a/src/gui/text/qfontengine_win.cpp +++ b/src/gui/text/qfontengine_win.cpp @@ -1209,7 +1209,7 @@ QImage QFontEngineWin::alphaMapForGlyph(glyph_t glyph, const QTransform &xform) QImage indexed(mask->width(), mask->height(), QImage::Format_Indexed8); - // ### This part is kinda pointless, but we'll crash later if we dont because some + // ### This part is kinda pointless, but we'll crash later if we don't because some // code paths expects there to be colortables for index8-bit... QVector<QRgb> colors(256); for (int i=0; i<256; ++i) diff --git a/src/gui/text/qfontsubset.cpp b/src/gui/text/qfontsubset.cpp index e49f5b4..2283358 100644 --- a/src/gui/text/qfontsubset.cpp +++ b/src/gui/text/qfontsubset.cpp @@ -697,7 +697,7 @@ static QTtfTable generateHead(const qttf_head_table &head) // Bits 5-10: These should be set according to Apple's specification . However, they are not implemented in OpenType. // Bit 11: Font data is 'lossless,' as a result of having been compressed and decompressed with the Agfa MicroType Express engine. // Bit 12: Font converted (produce compatible metrics) -// Bit 13: Font optimised for ClearType +// Bit 13: Font optimized for ClearType // Bit 14: Reserved, set to 0 // Bit 15: Reserved, set to 0 << quint16(0) @@ -1008,7 +1008,7 @@ static void convertPath(const QPainterPath &path, QList<TTF_POINT> *points, QLis np.x = (i1_x + i2_x) >> 1; np.y = (i1_y + i2_y) >> 1; if (try_reduce) { - // see if we can optimise out the last onCurve point + // see if we can optimize out the last onCurve point int mx = (points->at(points->size() - 2).x + base[2].x) >> 1; int my = (points->at(points->size() - 2).y + base[2].y) >> 1; if (qAbs(mx - base[3].x) <= split_limit && qAbs(my = base[3].y) <= split_limit) diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp index 213db7e..0bdd20d 100644 --- a/src/gui/text/qtextdocument_p.cpp +++ b/src/gui/text/qtextdocument_p.cpp @@ -320,7 +320,7 @@ void QTextDocumentPrivate::setLayout(QAbstractTextDocumentLayout *layout) void QTextDocumentPrivate::insert_string(int pos, uint strPos, uint length, int format, QTextUndoCommand::Operation op) { - // ##### optimise when only appending to the fragment! + // ##### optimize when only appending to the fragment! Q_ASSERT(noBlockInString(text.mid(strPos, length))); split(pos); @@ -1446,7 +1446,7 @@ void QTextDocumentPrivate::clearFrame(QTextFrame *f) void QTextDocumentPrivate::scan_frames(int pos, int charsRemoved, int charsAdded) { - // ###### optimise + // ###### optimize Q_UNUSED(pos); Q_UNUSED(charsRemoved); Q_UNUSED(charsAdded); diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index f432b7e..f1278b9 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -1615,7 +1615,7 @@ void QTextLine::setLineWidth(qreal width) if (line.length && line.textWidth <= line.width && line.from + line.length == eng->layoutData->string.length()) - // no need to do anything if the line is already layouted and the last one. This optimisation helps + // no need to do anything if the line is already layouted and the last one. This optimization helps // when using things in a single line layout. return; line.length = 0; diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp index f38bae7..a8b39f4 100644 --- a/src/gui/widgets/qabstractslider.cpp +++ b/src/gui/widgets/qabstractslider.cpp @@ -722,7 +722,7 @@ bool QAbstractSliderPrivate::scrollByDelta(Qt::Orientation orientation, Qt::Keyb #else // Native UI-elements on Mac can scroll hundreds of lines at a time as // a result of acceleration. So keep the same behaviour in Qt, and - // dont restrict stepsToScroll to certain maximum (pageStep): + // don't restrict stepsToScroll to certain maximum (pageStep): stepsToScroll = int(offset_accumulated); #endif offset_accumulated -= int(offset_accumulated); |