diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 4 | ||||
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 8 | ||||
-rw-r--r-- | src/gui/painting/qpaintbuffer.cpp | 2 | ||||
-rw-r--r-- | src/gui/painting/qpainter.cpp | 2 | ||||
-rw-r--r-- | src/gui/styles/qs60style_s60.cpp | 8 | ||||
-rw-r--r-- | src/gui/styles/qwindowsstyle.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qfontdatabase_s60.cpp | 2 | ||||
-rw-r--r-- | src/gui/util/qdesktopservices_s60.cpp | 20 |
8 files changed, 23 insertions, 25 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 4fc0aed..d67011b 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -934,7 +934,7 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent) } QGraphicsItem *lastSubFocusItem = subFocusItem; - if (subFocusItem && !inDestructor) { + if (subFocusItem) { // Update the child focus chain; when reparenting an item that has a // focus child, ensure that that focus child clears its focus child // chain from our parents before it's reparented. @@ -1226,6 +1226,8 @@ QGraphicsItem::~QGraphicsItem() Q_ASSERT(d_ptr->children.isEmpty()); } + d_ptr->subFocusItem = 0; + if (d_ptr->scene) { d_ptr->scene->d_func()->removeItemHelper(this); } else { diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index f7db819..b198ae1 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -213,7 +213,7 @@ void QCoeFepInputContext::mouseHandler( int x, QMouseEvent *event) QList<QInputMethodEvent::Attribute> attributes; attributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, pos + x, 0, QVariant()); - QInputMethodEvent event("", attributes); + QInputMethodEvent event(QLatin1String(""), attributes); sendEvent(event); } } @@ -500,8 +500,8 @@ void QCoeFepInputContext::SetInlineEditingCursorVisibilityL(TBool aCursorVisibil void QCoeFepInputContext::CancelFepInlineEdit() { QList<QInputMethodEvent::Attribute> attributes; - QInputMethodEvent event("", attributes); - event.setCommitString("", 0, 0); + QInputMethodEvent event(QLatin1String(""), attributes); + event.setCommitString(QLatin1String(""), 0, 0); m_preeditString.clear(); sendEvent(event); @@ -618,7 +618,7 @@ void QCoeFepInputContext::commitCurrentString(bool triggeredBySymbian) } QList<QInputMethodEvent::Attribute> attributes; - QInputMethodEvent event("", attributes); + QInputMethodEvent event(QLatin1String(""), attributes); event.setCommitString(m_preeditString, 0, 0);//m_preeditString.size()); m_preeditString.clear(); sendEvent(event); diff --git a/src/gui/painting/qpaintbuffer.cpp b/src/gui/painting/qpaintbuffer.cpp index 0600bd9..1038f74 100644 --- a/src/gui/painting/qpaintbuffer.cpp +++ b/src/gui/painting/qpaintbuffer.cpp @@ -1740,7 +1740,7 @@ struct QPaintBufferCacheEntry QVariant::Type type; quint64 cacheKey; }; -Q_DECLARE_METATYPE(QPaintBufferCacheEntry); +Q_DECLARE_METATYPE(QPaintBufferCacheEntry) QDataStream &operator<<(QDataStream &stream, const QPaintBufferCacheEntry &entry) { diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 147b64c..2dcc20c 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -7556,7 +7556,6 @@ start_lengthVariant: bool hasMoreLengthVariants = false; // compatible behaviour to the old implementation. Replace // tabs by spaces - bool has_tab = false; int old_offset = offset; for (; offset < text.length(); offset++) { QChar chr = text.at(offset); @@ -7572,7 +7571,6 @@ start_lengthVariant: } else if (!tabarraylen && !tabstops) { tabstops = qRound(fm.width(QLatin1Char('x'))*8); } - has_tab = true; } else if (chr == QChar(ushort(0x9c))) { // string with multiple length variants hasMoreLengthVariants = true; diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index af7d37e..4fdf48b 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -117,7 +117,7 @@ private: static void checkAndUnCompressBitmap(CFbsBitmap*& aOriginalBitmap); static void unCompressBitmapL(const TRect& aTrgRect, CFbsBitmap* aTrgBitmap, CFbsBitmap* aSrcBitmap); static void colorGroupAndIndex(QS60StyleEnums::SkinParts skinID, - TAknsItemID &colorGroup, int colorIndex); + TAknsItemID &colorGroup, int &colorIndex); static void fallbackInfo(const QS60StyleEnums::SkinParts &stylepart, TDes& fallbackFileName, TInt& fallbackIndex); static bool checkSupport(const int supportedRelease); static TAknsItemID checkAndUpdateReleaseSpecificGraphics(int part); @@ -1016,7 +1016,7 @@ QS60StylePrivate::QS60StylePrivate() void QS60StylePrivate::setStyleProperty_specific(const char *name, const QVariant &value) { - if (name == QLatin1String("foo")) { + if (QLatin1String(name) == QLatin1String("foo")) { // BaR } else { setStyleProperty(name, value); @@ -1025,7 +1025,7 @@ void QS60StylePrivate::setStyleProperty_specific(const char *name, const QVarian QVariant QS60StylePrivate::styleProperty_specific(const char *name) const { - if (name == QLatin1String("foo")) + if (QLatin1String(name) == QLatin1String("foo")) return QLatin1String("Bar"); else return styleProperty(name); @@ -1331,7 +1331,7 @@ QSize QS60StylePrivate::screenSize() } void QS60StyleModeSpecifics::colorGroupAndIndex( - QS60StyleEnums::SkinParts skinID, TAknsItemID &colorGroup, int colorIndex) + QS60StyleEnums::SkinParts skinID, TAknsItemID &colorGroup, int &colorIndex) { switch(skinID) { case QS60StyleEnums::SP_QgnIndiSubMenu: diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp index 419aef1..742b5b0 100644 --- a/src/gui/styles/qwindowsstyle.cpp +++ b/src/gui/styles/qwindowsstyle.cpp @@ -1770,8 +1770,6 @@ case PE_FrameDockWidget: #endif // QT_NO_PROGRESSBAR case PE_FrameTabWidget: { - QRect rect = opt->rect; - QPalette pal = opt->palette; qDrawWinButton(p, opt->rect, opt->palette, false, 0); break; } diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp index 20361f9..dd0fcb4 100644 --- a/src/gui/text/qfontdatabase_s60.cpp +++ b/src/gui/text/qfontdatabase_s60.cpp @@ -66,7 +66,7 @@ QFileInfoList alternativeFilePaths(const QString &path, const QStringList &nameF foreach (const QFileInfo &drive, QDir::drives()) driveStrings.append(drive.absolutePath()); driveStrings.sort(); - const QString zDriveString("Z:/"); + const QString zDriveString(QLatin1String("Z:/")); driveStrings.removeAll(zDriveString); driveStrings.prepend(zDriveString); diff --git a/src/gui/util/qdesktopservices_s60.cpp b/src/gui/util/qdesktopservices_s60.cpp index a0e2ec7..b78e51b 100644 --- a/src/gui/util/qdesktopservices_s60.cpp +++ b/src/gui/util/qdesktopservices_s60.cpp @@ -101,17 +101,17 @@ static void handleMailtoSchemeLX(const QUrl &url) // this function has many intermingled leaves and throws. Qt and Symbian objects do not have // destructor dependencies, and cleanup object is used to prevent cleanup stack dependency on stack. QString recipient = url.path(); - QString subject = url.queryItemValue("subject"); - QString body = url.queryItemValue("body"); - QString to = url.queryItemValue("to"); - QString cc = url.queryItemValue("cc"); - QString bcc = url.queryItemValue("bcc"); + QString subject = url.queryItemValue(QLatin1String("subject")); + QString body = url.queryItemValue(QLatin1String("body")); + QString to = url.queryItemValue(QLatin1String("to")); + QString cc = url.queryItemValue(QLatin1String("cc")); + QString bcc = url.queryItemValue(QLatin1String("bcc")); // these fields might have comma separated addresses - QStringList recipients = recipient.split(",", QString::SkipEmptyParts); - QStringList tos = to.split(",", QString::SkipEmptyParts); - QStringList ccs = cc.split(",", QString::SkipEmptyParts); - QStringList bccs = bcc.split(",", QString::SkipEmptyParts); + QStringList recipients = recipient.split(QLatin1String(","), QString::SkipEmptyParts); + QStringList tos = to.split(QLatin1String(","), QString::SkipEmptyParts); + QStringList ccs = cc.split(QLatin1String(","), QString::SkipEmptyParts); + QStringList bccs = bcc.split(QLatin1String(","), QString::SkipEmptyParts); RSendAs sendAs; @@ -200,7 +200,7 @@ static void handleOtherSchemesL(const TDesC& aUrl) static bool handleOtherSchemes(const QUrl &url) { - QString encUrl(url.toEncoded()); + QString encUrl(QString::fromUtf8(url.toEncoded())); TPtrC urlPtr(qt_QString2TPtrC(encUrl)); TRAPD( err, handleOtherSchemesL(urlPtr)); return err ? false : true; |