diff options
author | Jerome Pasion <jerome.pasion@nokia.com> | 2010-09-20 06:35:20 (GMT) |
---|---|---|
committer | Jerome Pasion <jerome.pasion@nokia.com> | 2010-09-20 06:35:20 (GMT) |
commit | d7d837b0b864935a069013ca09f5fb9de40a4d02 (patch) | |
tree | b18e6939358b9f9fdd814ec1b5843e57ab01eace /src/corelib | |
parent | 8e276783918d25d05eee65fd9eb5510ebcfbecc4 (diff) | |
parent | ae0d4fcee9087521afe03732001a0267b06e0317 (diff) | |
download | Qt-d7d837b0b864935a069013ca09f5fb9de40a4d02.zip Qt-d7d837b0b864935a069013ca09f5fb9de40a4d02.tar.gz Qt-d7d837b0b864935a069013ca09f5fb9de40a4d02.tar.bz2 |
Merge branch 'doc-4.7' of scm.dev.nokia.troll.no:qt/qt-doc-team into doc-4.7
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/codecs/qtextcodec_symbian.cpp | 15 | ||||
-rw-r--r-- | src/corelib/io/qdir.cpp | 5 | ||||
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_unix.cpp | 22 | ||||
-rw-r--r-- | src/corelib/kernel/qmetatype.h | 26 | ||||
-rw-r--r-- | src/corelib/tools/qcryptographichash.cpp | 2 |
5 files changed, 41 insertions, 29 deletions
diff --git a/src/corelib/codecs/qtextcodec_symbian.cpp b/src/corelib/codecs/qtextcodec_symbian.cpp index 20e0cfc..18c5fd0 100644 --- a/src/corelib/codecs/qtextcodec_symbian.cpp +++ b/src/corelib/codecs/qtextcodec_symbian.cpp @@ -60,7 +60,7 @@ struct QSymbianCodecInitData { */ static const QSymbianCodecInitData codecsData[] = { { /*268439485*/ KCharacterSetIdentifierShiftJis, 17, "Shift_JIS\0MS_Kanji\0csShiftJIS\0MS_KANJI\0SJIS\0" }, - { /*268439486*/ KCharacterSetIdentifierGb2312, 57, "GB2312\0csGB2312\0CN-GB\0EUC-CN\0" }, + { /*268439486*/ KCharacterSetIdentifierGb2312, 57, "GB2312\0csGB2312\0CN-GB\0EUC-CN\0" }, // Note: ConvertCharacterSetIdentifierToMibEnumL returns Mib 0 instaead of 57 { /*268439487*/ KCharacterSetIdentifierBig5, 2026, "Big5\0csBig5\0Big5-ETen\0CP950\0BIG-FIVE\0CN-BIG5\0" }, { /*268440246*/ KCharacterSetIdentifierCodePage1252, 2252, "windows-1252\0Code Page 1252\0CP1252\0MS-ANSI\0" }, // { /*268450576*/ KCharacterSetIdentifierIso88591, 4, "ISO-8859-1\0ISO_8859-1:1987\0iso-ir-100\0ISO_8859-1\0latin1\0l1\0IBM819\0CP819\0csISOLatin1\0ISO-IR-100\0ISO8859-1\0L1\0LATIN1\0CSISOLATIN1\0" }, @@ -76,7 +76,7 @@ static const QSymbianCodecInitData codecsData[] = { { /*268458028*/ KCharacterSetIdentifierUtf7, 103, "UTF-7\0UNICODE-1-1-UTF-7\0CSUNICODE11UTF7\0" }, // { /*268458029*/ KCharacterSetIdentifierUtf8, 106, "UTF-8\0" }, { /*268458030*/ KCharacterSetIdentifierImapUtf7, 0, "IMAP UTF-7\0" }, - { /*268458031*/ KCharacterSetIdentifierJavaConformantUtf8, 0, "JAVA UTF-8\0" }, + { /*268458031*/ KCharacterSetIdentifierJavaConformantUtf8, 0, "Java UTF-8\0JAVA UTF-8\0" }, { /*268458454*/ 268458454, 2250, "Windows-1250\0CP1250\0MS-EE\0" }, { /*268458455*/ 268458455, 2251, "Windows-1251\0CP1251\0MS-CYRL\0" }, { /*268458456*/ 268458456, 2253, "Windows-1253\0CP1253\0MS-GREEK\0" }, @@ -110,11 +110,16 @@ static const QSymbianCodecInitData codecsData[] = { { /*270562232*/ 270562232, 2258, "Windows-1258\0CP1258\0WINDOWS-1258\0" }, { /*270586888*/ 270586888, 0, "J5\0" }, { /*271011982*/ 271011982, 0, "ISCII\0" }, - { /*271066541*/ 271066541, 2009, "CP850\0IBM850\0""850\0csPC850Multilingual\0" }, + { /*271066541*/ 271066541, 2009, "CP850\0IBM850\0""850\0csPC850Multilingual\0" }, // Note: ConvertCharacterSetIdentifierToMibEnumL returns Mib 0 instead of 2009 { /*271082493*/ 271082493, 0, "EXTENDED_SMS_7BIT\0" }, { /*271082494*/ 271082494, 0, "gsm7_turkish_single\0" }, { /*271082495*/ 271082495, 0, "turkish_locking_gsm7ext\0" }, { /*271082496*/ 271082496, 0, "turkish_locking_single\0" }, + { /*271082503*/ 271082503, 0, "portuguese_gsm7_single\0" }, + { /*271082504*/ 271082504, 0, "portuguese_locking_gsm7ext\0" }, + { /*271082505*/ 271082505, 0, "portuguese_locking_single\0" }, + { /*271082506*/ 271082506, 0, "spanish_gsm7_single\0" }, + { /*271085624*/ 271085624, 114, "GB18030\0" }, { /*536929574*/ 536929574, 38, "EUC-KR\0" }, { /*536936703*/ 536936703, 0, "CP949\0" }, { /*536936705*/ 536936705, 37, "ISO-2022-KR\0" }, @@ -659,6 +664,10 @@ QSymbianTextCodec *QSymbianTextCodec::init() if (charsetId == localeMapperId) localeMapper = c; } else { + // We did not find the charsetId in our codecsData[], therefore we ask + // the OS for the codec name. We first try to get a "standard name" and fall + // back to array->At(i).Name(), if really needed. array->At(i).Name() is not + // guaranteed to be a correct name for QTextCodec::codecFromName(). QScopedPointer<HBufC8> buf; QT_TRAP_THROWING(buf.reset(converter->ConvertCharacterSetIdentifierToStandardNameL(charsetId, qt_s60GetRFs()))) QByteArray name; diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index fcd17f7..efcc8f9 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -1550,10 +1550,11 @@ bool QDir::makeAbsolute() // ### What do the return values signify? QScopedPointer<QDirPrivate> dir(new QDirPrivate(*d_ptr.constData())); dir->setPath(absolutePath); - if (!(dir->fileEngine->fileFlags(QAbstractFileEngine::TypesMask) & QAbstractFileEngine::DirectoryType)) + d_ptr = dir.take(); + + if (!(d_ptr->fileEngine->fileFlags(QAbstractFileEngine::TypesMask) & QAbstractFileEngine::DirectoryType)) return false; - d_ptr = dir.take(); return true; } diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp index 9dadd82..f50994c 100644 --- a/src/corelib/kernel/qeventdispatcher_unix.cpp +++ b/src/corelib/kernel/qeventdispatcher_unix.cpp @@ -549,18 +549,22 @@ int QTimerInfoList::activateTimers() if (qt_disable_lowpriority_timers || isEmpty()) return 0; // nothing to do - bool firstTime = true; - timeval currentTime; - int n_act = 0, maxCount = count(); + int n_act = 0, maxCount = 0; firstTimerInfo = 0; - while (maxCount--) { - currentTime = updateCurrentTime(); - if (firstTime) { - repairTimersIfNeeded(); - firstTime = false; - } + timeval currentTime = updateCurrentTime(); + repairTimersIfNeeded(); + + // Find out how many timer have expired + for (QTimerInfoList::const_iterator it = constBegin(); it != constEnd(); ++it) { + if (currentTime < (*it)->timeout) + break; + maxCount++; + } + + //fire the timers. + while (maxCount--) { if (isEmpty()) break; diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index 2108b92..e16ffe8 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -156,7 +156,18 @@ void qMetaTypeLoadHelper(QDataStream &stream, T *t) } #endif // QT_NO_DATASTREAM -template <typename T> struct QMetaTypeId2; +template <typename T> +struct QMetaTypeId +{ + enum { Defined = 0 }; +}; + +template <typename T> +struct QMetaTypeId2 +{ + enum { Defined = QMetaTypeId<T>::Defined }; + static inline int qt_metatype_id() { return QMetaTypeId<T>::qt_metatype_id(); } +}; namespace QtPrivate { template <typename T, bool Defined = QMetaTypeId2<T>::Defined> @@ -210,19 +221,6 @@ void qRegisterMetaTypeStreamOperators(const char *typeName #endif // QT_NO_DATASTREAM template <typename T> -struct QMetaTypeId -{ - enum { Defined = 0 }; -}; - -template <typename T> -struct QMetaTypeId2 -{ - enum { Defined = QMetaTypeId<T>::Defined }; - static inline int qt_metatype_id() { return QMetaTypeId<T>::qt_metatype_id(); } -}; - -template <typename T> inline int qMetaTypeId( #ifndef qdoc T * /* dummy */ = 0 diff --git a/src/corelib/tools/qcryptographichash.cpp b/src/corelib/tools/qcryptographichash.cpp index f418de9..043d6a3 100644 --- a/src/corelib/tools/qcryptographichash.cpp +++ b/src/corelib/tools/qcryptographichash.cpp @@ -147,7 +147,7 @@ void QCryptographicHash::addData(const char *data, int length) } /*! - /overload + \overload addData() */ void QCryptographicHash::addData(const QByteArray &data) { |