diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/codecs/codecs.qdoc | 10 | ||||
-rw-r--r-- | src/corelib/codecs/qtextcodec.cpp | 52 | ||||
-rw-r--r-- | src/corelib/global/qendian.qdoc | 10 | ||||
-rw-r--r-- | src/corelib/global/qnamespace.qdoc | 34 | ||||
-rw-r--r-- | src/corelib/kernel/qmath.qdoc | 10 | ||||
-rw-r--r-- | src/corelib/plugin/qplugin.qdoc | 10 | ||||
-rw-r--r-- | src/corelib/plugin/qsystemlibrary.cpp | 9 | ||||
-rw-r--r-- | src/corelib/plugin/qsystemlibrary_p.h | 4 | ||||
-rw-r--r-- | src/corelib/thread/qthread.cpp | 4 | ||||
-rw-r--r-- | src/corelib/thread/qwaitcondition.qdoc | 10 | ||||
-rw-r--r-- | src/corelib/tools/qalgorithms.qdoc | 10 | ||||
-rw-r--r-- | src/corelib/tools/qcache.qdoc | 10 | ||||
-rw-r--r-- | src/corelib/tools/qiterator.qdoc | 10 | ||||
-rw-r--r-- | src/corelib/tools/qpair.qdoc | 10 | ||||
-rw-r--r-- | src/corelib/tools/qset.qdoc | 10 | ||||
-rw-r--r-- | src/corelib/tools/qstring.cpp | 2 | ||||
-rw-r--r-- | src/corelib/tools/qvarlengtharray.qdoc | 10 |
17 files changed, 116 insertions, 99 deletions
diff --git a/src/corelib/codecs/codecs.qdoc b/src/corelib/codecs/codecs.qdoc index b88f016..3171f58 100644 --- a/src/corelib/codecs/codecs.qdoc +++ b/src/corelib/codecs/codecs.qdoc @@ -7,11 +7,11 @@ ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:FDL$ -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in a -** written agreement between you and Nokia. +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Free Documentation License ** Alternatively, this file may be used under the terms of the GNU Free diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp index c9fbec8..83e1f0c 100644 --- a/src/corelib/codecs/qtextcodec.cpp +++ b/src/corelib/codecs/qtextcodec.cpp @@ -110,6 +110,10 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, (QTextCodecFactoryInterface_iid, QLatin1String("/codecs"))) #endif +//Cache for QTextCodec::codecForName and codecForMib. +typedef QHash<QByteArray, QTextCodec *> QTextCodecCache; +Q_GLOBAL_STATIC(QTextCodecCache, qTextCodecCache) + static char qtolower(register char c) { if (c >= 'A' && c <= 'Z') return c + 0x20; return c; } @@ -181,7 +185,6 @@ static QTextCodec *createForMib(int mib) } static QList<QTextCodec*> *all = 0; -static int clearCaches = 0; // flags specifying if caches should be invalided: 0x1 codecForName, 0x2 codecForMib #ifdef Q_DEBUG_TEXTCODEC static bool destroying_is_ok = false; #endif @@ -1007,7 +1010,9 @@ QTextCodec::~QTextCodec() QMutexLocker locker(textCodecsMutex()); #endif all->removeAll(this); - clearCaches = 0x1 | 0x2; + QTextCodecCache *cache = qTextCodecCache(); + if (cache) + cache->clear(); } } @@ -1037,32 +1042,33 @@ QTextCodec *QTextCodec::codecForName(const QByteArray &name) if (!validCodecs()) return 0; - static QHash <QByteArray, QTextCodec *> cache; - if (clearCaches & 0x1) { - cache.clear(); - clearCaches &= ~0x1; + QTextCodecCache *cache = qTextCodecCache(); + QTextCodec *codec; + if (cache) { + codec = cache->value(name); + if (codec) + return codec; } - QTextCodec *codec = cache.value(name); - if (codec) - return codec; for (int i = 0; i < all->size(); ++i) { QTextCodec *cursor = all->at(i); if (nameMatch(cursor->name(), name)) { - cache.insert(name, cursor); + if (cache) + cache->insert(name, cursor); return cursor; } QList<QByteArray> aliases = cursor->aliases(); for (int y = 0; y < aliases.size(); ++y) if (nameMatch(aliases.at(y), name)) { - cache.insert(name, cursor); + if (cache) + cache->insert(name, cursor); return cursor; } } codec = createForName(name); - if (codec) - cache.insert(name, codec); + if (codec && cache) + cache->insert(name, codec); return codec; } @@ -1081,20 +1087,18 @@ QTextCodec* QTextCodec::codecForMib(int mib) if (!validCodecs()) return 0; - static QHash <int, QTextCodec *> cache; - if (clearCaches & 0x2) { - cache.clear(); - clearCaches &= ~0x2; - } - QTextCodec *codec = cache.value(mib); - if (codec) - return codec; + QByteArray key = "MIB: " + QByteArray::number(mib); + QTextCodecCache *cache = qTextCodecCache(); + QTextCodec *codec; + if (cache) + codec = cache->value(key); QList<QTextCodec*>::ConstIterator i; for (int i = 0; i < all->size(); ++i) { QTextCodec *cursor = all->at(i); if (cursor->mibEnum() == mib) { - cache.insert(mib, cursor); + if (cache) + cache->insert(key, cursor); return cursor; } } @@ -1106,8 +1110,8 @@ QTextCodec* QTextCodec::codecForMib(int mib) if (!codec && mib == 1000) return codecForMib(1015); - if (codec) - cache.insert(mib, codec); + if (codec && cache) + cache->insert(key, codec); return codec; } diff --git a/src/corelib/global/qendian.qdoc b/src/corelib/global/qendian.qdoc index 795ff81..ecdaf9f 100644 --- a/src/corelib/global/qendian.qdoc +++ b/src/corelib/global/qendian.qdoc @@ -7,11 +7,11 @@ ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:FDL$ -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in a -** written agreement between you and Nokia. +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Free Documentation License ** Alternatively, this file may be used under the terms of the GNU Free diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 5cd7f0e..32e85db 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -7,11 +7,11 @@ ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:FDL$ -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in a -** written agreement between you and Nokia. +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Free Documentation License ** Alternatively, this file may be used under the terms of the GNU Free @@ -461,14 +461,17 @@ \value TextWordWrap Breaks lines at appropriate points, e.g. at word boundaries. \value TextWrapAnywhere Breaks lines anywhere, even within words. - \value TextHideMnemonic Same as Qt::TextShowMnemonic but doesn't draw the underlines. - \value TextDontPrint Treat this text as "hidden" and don't print - it. - \value IncludeTrailingSpaces When this option is set, QTextLine::naturalTextWidth() and naturalTextRect() will - return a value that includes the width of trailing spaces in the text; otherwise - this width is excluded. + \value TextHideMnemonic Same as Qt::TextShowMnemonic but doesn't draw + the underlines. + \value TextDontPrint Treat this text as "hidden" and don't print it. + \value IncludeTrailingSpaces When this option is set, + QTextLine::naturalTextWidth() and naturalTextRect() will + return a value that includes the width of trailing spaces in the + text; otherwise this width is excluded. \value TextIncludeTrailingSpaces Same as IncludeTrailingSpaces \value TextJustificationForced Ensures that text lines are justified. + \value TextLongestVariant Ensures that the longest variant is always used + when computing the size of a multi-variant string. \omitvalue TextBypassShaping \omitvalue BreakAnywhere @@ -482,7 +485,6 @@ \omitvalue WordBreak \omitvalue TextForceLeftToRight \omitvalue TextForceRightToLeft - \omitvalue TextLongestVariant Always use the longest variant when computing the size of a multi-variant string. You can use as many modifier flags as you want, except that Qt::TextSingleLine and Qt::TextWordWrap cannot be combined. @@ -509,9 +511,11 @@ delivery at a later time. \value AutoConnection - (default) Same as DirectConnection, if the emitter and - receiver are in the same thread. Same as QueuedConnection, - if the emitter and receiver are in different threads. + (default) If the object sending the signal is in a different thread + than the receiving object, the signal is queued, behaving as + Qt::QueuedConnection. If both objects are in the same thread, + the slot is invoked directly, behaving as Qt::DirectConnection. The + type of connection is determined when the signal is emitted. \value DirectConnection The slot is invoked immediately, when the signal is diff --git a/src/corelib/kernel/qmath.qdoc b/src/corelib/kernel/qmath.qdoc index 48f74b6..2c03b9a 100644 --- a/src/corelib/kernel/qmath.qdoc +++ b/src/corelib/kernel/qmath.qdoc @@ -7,11 +7,11 @@ ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:FDL$ -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in a -** written agreement between you and Nokia. +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Free Documentation License ** Alternatively, this file may be used under the terms of the GNU Free diff --git a/src/corelib/plugin/qplugin.qdoc b/src/corelib/plugin/qplugin.qdoc index b02cfbf..9183350 100644 --- a/src/corelib/plugin/qplugin.qdoc +++ b/src/corelib/plugin/qplugin.qdoc @@ -7,11 +7,11 @@ ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:FDL$ -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in a -** written agreement between you and Nokia. +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Free Documentation License ** Alternatively, this file may be used under the terms of the GNU Free diff --git a/src/corelib/plugin/qsystemlibrary.cpp b/src/corelib/plugin/qsystemlibrary.cpp index eeb142b..2386cd6 100644 --- a/src/corelib/plugin/qsystemlibrary.cpp +++ b/src/corelib/plugin/qsystemlibrary.cpp @@ -57,8 +57,8 @@ The search order is the same as the order in DLL Safe search mode Windows, except that we don't search: * The current directory - * The 16-bit system directory. (normally c:\windows\system) - * The Windows directory. (normally c:\windows) + * The 16-bit system directory. (normally \c{c:\windows\system}) + * The Windows directory. (normally \c{c:\windows}) This means that the effective search order is: 1. Application path. @@ -77,6 +77,9 @@ in the documentation for LoadLibrary for Windows CE at MSDN. (http://msdn.microsoft.com/en-us/library/ms886736.aspx) */ + +QT_BEGIN_NAMESPACE + #if defined(Q_OS_WINCE) HINSTANCE QSystemLibrary::load(const wchar_t *libraryName, bool onlySystemDirectory /* = true */) { @@ -134,3 +137,5 @@ HINSTANCE QSystemLibrary::load(const wchar_t *libraryName, bool onlySystemDirect } #endif //Q_OS_WINCE + +QT_END_NAMESPACE diff --git a/src/corelib/plugin/qsystemlibrary_p.h b/src/corelib/plugin/qsystemlibrary_p.h index 3251a3c..8000a61 100644 --- a/src/corelib/plugin/qsystemlibrary_p.h +++ b/src/corelib/plugin/qsystemlibrary_p.h @@ -47,6 +47,8 @@ #include <qt_windows.h> #include <QtCore/qstring.h> +QT_BEGIN_NAMESPACE + class QSystemLibrary { public: @@ -101,6 +103,8 @@ private: bool m_didLoad; }; +QT_END_NAMESPACE + #endif //Q_OS_WIN #endif //QSYSTEMLIBRARY_P_H diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp index 2c63dfc..69b70cb 100644 --- a/src/corelib/thread/qthread.cpp +++ b/src/corelib/thread/qthread.cpp @@ -667,9 +667,9 @@ QThread::Priority QThread::priority() const to finish will be woken up. \warning This function is dangerous and its use is discouraged. - The thread can be terminate at any point in its code path. + The thread can be terminated at any point in its code path. Threads can be terminated while modifying data. There is no - chance for the thread to cleanup after itself, unlock any held + chance for the thread to clean up after itself, unlock any held mutexes, etc. In short, use this function only if absolutely necessary. diff --git a/src/corelib/thread/qwaitcondition.qdoc b/src/corelib/thread/qwaitcondition.qdoc index b21285e..aaed420 100644 --- a/src/corelib/thread/qwaitcondition.qdoc +++ b/src/corelib/thread/qwaitcondition.qdoc @@ -7,11 +7,11 @@ ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:FDL$ -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in a -** written agreement between you and Nokia. +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Free Documentation License ** Alternatively, this file may be used under the terms of the GNU Free diff --git a/src/corelib/tools/qalgorithms.qdoc b/src/corelib/tools/qalgorithms.qdoc index 4a4f592..898f940 100644 --- a/src/corelib/tools/qalgorithms.qdoc +++ b/src/corelib/tools/qalgorithms.qdoc @@ -7,11 +7,11 @@ ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:FDL$ -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in a -** written agreement between you and Nokia. +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Free Documentation License ** Alternatively, this file may be used under the terms of the GNU Free diff --git a/src/corelib/tools/qcache.qdoc b/src/corelib/tools/qcache.qdoc index 71e0483..0a3c971 100644 --- a/src/corelib/tools/qcache.qdoc +++ b/src/corelib/tools/qcache.qdoc @@ -7,11 +7,11 @@ ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:FDL$ -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in a -** written agreement between you and Nokia. +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Free Documentation License ** Alternatively, this file may be used under the terms of the GNU Free diff --git a/src/corelib/tools/qiterator.qdoc b/src/corelib/tools/qiterator.qdoc index 1e7637b..9cec7ec 100644 --- a/src/corelib/tools/qiterator.qdoc +++ b/src/corelib/tools/qiterator.qdoc @@ -7,11 +7,11 @@ ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:FDL$ -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in a -** written agreement between you and Nokia. +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Free Documentation License ** Alternatively, this file may be used under the terms of the GNU Free diff --git a/src/corelib/tools/qpair.qdoc b/src/corelib/tools/qpair.qdoc index d49c09e..4ef151e 100644 --- a/src/corelib/tools/qpair.qdoc +++ b/src/corelib/tools/qpair.qdoc @@ -7,11 +7,11 @@ ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:FDL$ -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in a -** written agreement between you and Nokia. +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Free Documentation License ** Alternatively, this file may be used under the terms of the GNU Free diff --git a/src/corelib/tools/qset.qdoc b/src/corelib/tools/qset.qdoc index d1aca4c..0bc2d2d 100644 --- a/src/corelib/tools/qset.qdoc +++ b/src/corelib/tools/qset.qdoc @@ -7,11 +7,11 @@ ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:FDL$ -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in a -** written agreement between you and Nokia. +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Free Documentation License ** Alternatively, this file may be used under the terms of the GNU Free diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 5be885b..d1060d2 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -3891,7 +3891,7 @@ QString QString::fromLocal8Bit(const char *str, int size) /*! Returns a QString initialized with the first \a size characters - of the 8-bit string \a str. + from the string \a str. If \a size is -1 (default), it is taken to be qstrlen(\a str). diff --git a/src/corelib/tools/qvarlengtharray.qdoc b/src/corelib/tools/qvarlengtharray.qdoc index cbd81c7..6f91bcc 100644 --- a/src/corelib/tools/qvarlengtharray.qdoc +++ b/src/corelib/tools/qvarlengtharray.qdoc @@ -7,11 +7,11 @@ ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:FDL$ -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in a -** written agreement between you and Nokia. +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Free Documentation License ** Alternatively, this file may be used under the terms of the GNU Free |