diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/libmng/libmng_object_prc.c | 12 | ||||
-rw-r--r-- | src/3rdparty/libmng/libmng_prop_xs.c | 2 | ||||
-rw-r--r-- | src/corelib/io/qfsfileengine_unix.cpp | 2 | ||||
-rw-r--r-- | src/corelib/io/qprocess_symbian.cpp | 5 | ||||
-rw-r--r-- | src/corelib/kernel/qcoreapplication.cpp | 6 | ||||
-rw-r--r-- | src/corelib/tools/qlocale_symbian.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 | ||||
-rw-r--r-- | src/multimedia/audio/qaudioinput.h | 2 | ||||
-rw-r--r-- | src/multimedia/video/qvideosurfaceformat.h | 2 | ||||
-rw-r--r-- | src/sql/drivers/sqlite/qsql_sqlite.cpp | 1 | ||||
-rw-r--r-- | src/svg/qsvghandler.cpp | 3 | ||||
-rw-r--r-- | src/svg/qsvgstyle.cpp | 28 |
18 files changed, 48 insertions, 63 deletions
diff --git a/src/3rdparty/libmng/libmng_object_prc.c b/src/3rdparty/libmng/libmng_object_prc.c index f6691ff..e1724b4 100644 --- a/src/3rdparty/libmng/libmng_object_prc.c +++ b/src/3rdparty/libmng/libmng_object_prc.c @@ -2876,7 +2876,6 @@ mng_retcode mng_create_ani_chrm (mng_datap pData, mng_chunkp pChunk) #endif { - mng_ptr pTemp; mng_ani_chrmp pCHRM; #ifdef MNG_SUPPORT_TRACE @@ -2886,6 +2885,7 @@ mng_retcode mng_create_ani_chrm (mng_datap pData, if (pData->bCacheplayback) /* caching playback info ? */ { #ifdef MNG_OPTIMIZE_OBJCLEANUP + mng_ptr pTemp; mng_retcode iRetcode = create_obj_general (pData, sizeof (mng_ani_chrm), mng_free_obj_general, mng_process_ani_chrm, @@ -3115,7 +3115,6 @@ mng_retcode mng_create_ani_iccp (mng_datap pData, mng_chunkp pChunk) #endif { - mng_ptr pTemp; mng_ani_iccpp pICCP; #ifdef MNG_SUPPORT_TRACE @@ -3125,6 +3124,7 @@ mng_retcode mng_create_ani_iccp (mng_datap pData, if (pData->bCacheplayback) /* caching playback info ? */ { #ifdef MNG_OPTIMIZE_OBJCLEANUP + mng_ptr pTemp; mng_retcode iRetcode = create_obj_general (pData, sizeof (mng_ani_iccp), mng_free_ani_iccp, mng_process_ani_iccp, @@ -3252,7 +3252,6 @@ mng_retcode mng_create_ani_bkgd (mng_datap pData, mng_retcode mng_create_ani_bkgd (mng_datap pData) #endif { - mng_ptr pTemp; mng_ani_bkgdp pBKGD; #ifdef MNG_SUPPORT_TRACE @@ -3262,6 +3261,7 @@ mng_retcode mng_create_ani_bkgd (mng_datap pData) if (pData->bCacheplayback) /* caching playback info ? */ { #ifdef MNG_OPTIMIZE_OBJCLEANUP + mng_ptr pTemp; mng_retcode iRetcode = create_obj_general (pData, sizeof (mng_ani_bkgd), mng_free_obj_general, mng_process_ani_bkgd, @@ -4918,7 +4918,6 @@ mng_retcode mng_process_ani_term (mng_datap pData, #ifndef MNG_SKIPCHUNK_SAVE mng_retcode mng_create_ani_save (mng_datap pData) { - mng_ptr pTemp; mng_ani_savep pSAVE; #ifdef MNG_SUPPORT_TRACE @@ -4928,6 +4927,7 @@ mng_retcode mng_create_ani_save (mng_datap pData) if (pData->bCacheplayback) /* caching playback info ? */ { #ifdef MNG_OPTIMIZE_OBJCLEANUP + mng_ptr pTemp; mng_retcode iRetcode = create_obj_general (pData, sizeof (mng_ani_save), mng_free_obj_general, mng_process_ani_save, @@ -5009,7 +5009,6 @@ mng_retcode mng_create_ani_seek (mng_datap pData, mng_chunkp pChunk) #endif { - mng_ptr pTemp; mng_ani_seekp pSEEK; #ifdef MNG_SUPPORT_TRACE @@ -5019,6 +5018,7 @@ mng_retcode mng_create_ani_seek (mng_datap pData, if (pData->bCacheplayback) /* caching playback info ? */ { #ifdef MNG_OPTIMIZE_OBJCLEANUP + mng_ptr pTemp; mng_retcode iRetcode = create_obj_general (pData, sizeof (mng_ani_seek), mng_free_ani_seek, mng_process_ani_seek, @@ -6106,7 +6106,7 @@ mng_retcode mng_create_ani_disc (mng_datap pData, #endif { mng_ani_discp pDISC; - mng_retcode iRetcode; + mng_retcode iRetcode; #ifdef MNG_SUPPORT_TRACE MNG_TRACE (pData, MNG_FN_CREATE_ANI_DISC, MNG_LC_START); diff --git a/src/3rdparty/libmng/libmng_prop_xs.c b/src/3rdparty/libmng/libmng_prop_xs.c index 88e416d..3849d51 100644 --- a/src/3rdparty/libmng/libmng_prop_xs.c +++ b/src/3rdparty/libmng/libmng_prop_xs.c @@ -1033,7 +1033,7 @@ mng_retcode MNG_DECL mng_set_jpeg_dctmethod (mng_handle hHandle, return MNG_NOERROR; } -#endif MNG_SUPPORT_WRITE +#endif /* MNG_SUPPORT_WRITE */ #endif /* MNG_ACCESS_JPEG */ #endif /* MNG_INCLUDE_JNG */ diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index 580484b..e54bad6 100644 --- a/src/corelib/io/qfsfileengine_unix.cpp +++ b/src/corelib/io/qfsfileengine_unix.cpp @@ -565,7 +565,7 @@ QString QFSFileEngine::currentPath(const QString &) // try to create it (can happen with application private dirs) // Ignore mkdir failures; we want to be consistent with Open C // current path regardless. - QT_MKDIR(QFile::encodeName(nativeCurrentName), 0777); + QT_MKDIR(QFile::encodeName(QLatin1String(nativeCurrentName)), 0777); #else # if defined(QT_DEBUG) qWarning("QFSFileEngine::currentPath: stat(\".\") failed"); diff --git a/src/corelib/io/qprocess_symbian.cpp b/src/corelib/io/qprocess_symbian.cpp index de3e368..d93cdba 100644 --- a/src/corelib/io/qprocess_symbian.cpp +++ b/src/corelib/io/qprocess_symbian.cpp @@ -62,6 +62,7 @@ #include <stdio.h> #include "qplatformdefs.h" +#include "qdir.h" #include "qstring.h" #include "qprocess.h" #include "qprocess_p.h" @@ -261,8 +262,8 @@ static TInt qt_create_symbian_process(RProcess **proc, const QString &programNam if (err == KErrNotFound) { // Strip path from program name and try again (i.e. try from default location "\sys\bin") - int index = programName.lastIndexOf(QChar('\\')); - int index2 = programName.lastIndexOf(QChar('/')); + int index = programName.lastIndexOf(QDir::separator()); + int index2 = programName.lastIndexOf(QChar(QLatin1Char('/'))); index = qMax(index, index2); if (index != -1 && programName.length() >= index) { diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 36bd20e..3dbde3f 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -2184,10 +2184,10 @@ QStringList QCoreApplication::libraryPaths() QString installPathPlugins = QLibraryInfo::location(QLibraryInfo::PluginsPath); #if defined(Q_OS_SYMBIAN) // Add existing path on all drives for relative PluginsPath in Symbian - if (installPathPlugins.at(1) != QChar(':')) { + if (installPathPlugins.at(1) != QChar(QLatin1Char(':'))) { QString tempPath = installPathPlugins; - if (tempPath.at(tempPath.length() - 1) != QChar('\\')) { - tempPath += QChar('\\'); + if (tempPath.at(tempPath.length() - 1) != QDir::separator()) { + tempPath += QDir::separator(); } RFs& fs = qt_s60GetRFs(); TPtrC tempPathPtr(reinterpret_cast<const TText*> (tempPath.constData())); diff --git a/src/corelib/tools/qlocale_symbian.cpp b/src/corelib/tools/qlocale_symbian.cpp index 9bd6ac0..931fbb4 100644 --- a/src/corelib/tools/qlocale_symbian.cpp +++ b/src/corelib/tools/qlocale_symbian.cpp @@ -797,7 +797,7 @@ QLocale QSystemLocale::fallbackLocale() const } TLanguage lang = User::Language(); - QString locale = qt_symbianLocaleName(lang); + QString locale = QLatin1String(qt_symbianLocaleName(lang)); return QLocale(locale); } @@ -853,7 +853,7 @@ QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const case LanguageId: case CountryId: { TLanguage language = User::Language(); - QString locale = qt_symbianLocaleName(language); + QString locale = QLatin1String(qt_symbianLocaleName(language)); QLocale::Language lang; QLocale::Country cntry; getLangAndCountry(locale, lang, cntry); 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; diff --git a/src/multimedia/audio/qaudioinput.h b/src/multimedia/audio/qaudioinput.h index 3e0b354..277a6cf 100644 --- a/src/multimedia/audio/qaudioinput.h +++ b/src/multimedia/audio/qaudioinput.h @@ -96,7 +96,7 @@ Q_SIGNALS: void notify(); private: - Q_DISABLE_COPY(QAudioInput); + Q_DISABLE_COPY(QAudioInput) QAbstractAudioInput* d; }; diff --git a/src/multimedia/video/qvideosurfaceformat.h b/src/multimedia/video/qvideosurfaceformat.h index 8e93067..b3005bd 100644 --- a/src/multimedia/video/qvideosurfaceformat.h +++ b/src/multimedia/video/qvideosurfaceformat.h @@ -147,7 +147,7 @@ Q_MULTIMEDIA_EXPORT QDebug operator<<(QDebug, const QVideoSurfaceFormat &); QT_END_NAMESPACE -Q_DECLARE_METATYPE(QVideoSurfaceFormat::FrameRate); +Q_DECLARE_METATYPE(QVideoSurfaceFormat::FrameRate) Q_DECLARE_METATYPE(QVideoSurfaceFormat::Direction) Q_DECLARE_METATYPE(QVideoSurfaceFormat::YuvColorSpace) diff --git a/src/sql/drivers/sqlite/qsql_sqlite.cpp b/src/sql/drivers/sqlite/qsql_sqlite.cpp index f9296fb..2766cca 100644 --- a/src/sql/drivers/sqlite/qsql_sqlite.cpp +++ b/src/sql/drivers/sqlite/qsql_sqlite.cpp @@ -707,6 +707,7 @@ QVariant QSQLiteDriver::handle() const QString QSQLiteDriver::escapeIdentifier(const QString &identifier, IdentifierType type) const { + Q_UNUSED(type); return _q_escapeIdentifier(identifier); } diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp index 1fd35e0..06a49d8 100644 --- a/src/svg/qsvghandler.cpp +++ b/src/svg/qsvghandler.cpp @@ -1203,10 +1203,9 @@ static void parsePen(QSvgNode *node, } //stroke-width handling - qreal w = 0; if (!attributes.strokeWidth.isEmpty() && attributes.strokeWidth != QT_INHERIT) { QSvgHandler::LengthType lt; - prop->setWidth(w = parseLength(attributes.strokeWidth.toString(), lt, handler)); + prop->setWidth(parseLength(attributes.strokeWidth.toString(), lt, handler)); } //stroke-dasharray diff --git a/src/svg/qsvgstyle.cpp b/src/svg/qsvgstyle.cpp index 3ddf43b..564bf24 100644 --- a/src/svg/qsvgstyle.cpp +++ b/src/svg/qsvgstyle.cpp @@ -697,14 +697,12 @@ void QSvgAnimateTransform::resolveMatrix(QSvgNode *node) case Translate: { startElem *= 3; endElem *= 3; - qreal from1, from2, from3; - qreal to1, to2, to3; + qreal from1, from2; + qreal to1, to2; from1 = m_args[startElem++]; from2 = m_args[startElem++]; - from3 = m_args[startElem++]; to1 = m_args[endElem++]; to2 = m_args[endElem++]; - to3 = m_args[endElem++]; qreal transXDiff = (to1-from1) * percentOfAnimation; qreal transX = from1 + transXDiff; @@ -717,14 +715,12 @@ void QSvgAnimateTransform::resolveMatrix(QSvgNode *node) case Scale: { startElem *= 3; endElem *= 3; - qreal from1, from2, from3; - qreal to1, to2, to3; + qreal from1, from2; + qreal to1, to2; from1 = m_args[startElem++]; from2 = m_args[startElem++]; - from3 = m_args[startElem++]; to1 = m_args[endElem++]; to2 = m_args[endElem++]; - to3 = m_args[endElem++]; qreal transXDiff = (to1-from1) * percentOfAnimation; qreal transX = from1 + transXDiff; @@ -764,14 +760,10 @@ void QSvgAnimateTransform::resolveMatrix(QSvgNode *node) case SkewX: { startElem *= 3; endElem *= 3; - qreal from1, from2, from3; - qreal to1, to2, to3; + qreal from1; + qreal to1; from1 = m_args[startElem++]; - from2 = m_args[startElem++]; - from3 = m_args[startElem++]; to1 = m_args[endElem++]; - to2 = m_args[endElem++]; - to3 = m_args[endElem++]; qreal transXDiff = (to1-from1) * percentOfAnimation; qreal transX = from1 + transXDiff; @@ -782,14 +774,10 @@ void QSvgAnimateTransform::resolveMatrix(QSvgNode *node) case SkewY: { startElem *= 3; endElem *= 3; - qreal from1, from2, from3; - qreal to1, to2, to3; + qreal from1; + qreal to1; from1 = m_args[startElem++]; - from2 = m_args[startElem++]; - from3 = m_args[startElem++]; to1 = m_args[endElem++]; - to2 = m_args[endElem++]; - to3 = m_args[endElem++]; qreal transYDiff = (to1 - from1) * percentOfAnimation; |