diff options
author | David Boddie <dboddie@trolltech.com> | 2009-06-09 13:27:55 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2009-06-09 13:27:55 (GMT) |
commit | 8e189954eec4a3bebf49fa84f659e59e455a936e (patch) | |
tree | e95d969e952ef872de93a0d08258e7999969ecfd /src/corelib | |
parent | d367ee08d1a07f1a30665b77ec11acec96e65a65 (diff) | |
parent | b9f5e151b3c0bca74136720c5b42c9a93c8f25a8 (diff) | |
download | Qt-8e189954eec4a3bebf49fa84f659e59e455a936e.zip Qt-8e189954eec4a3bebf49fa84f659e59e455a936e.tar.gz Qt-8e189954eec4a3bebf49fa84f659e59e455a936e.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/codecs/qisciicodec.cpp | 2 | ||||
-rw-r--r-- | src/corelib/io/qnoncontiguousbytedevice_p.h | 5 | ||||
-rw-r--r-- | src/corelib/kernel/qobject.cpp | 4 | ||||
-rw-r--r-- | src/corelib/kernel/qvariant.cpp | 2 | ||||
-rw-r--r-- | src/corelib/plugin/qplugin.h | 2 | ||||
-rw-r--r-- | src/corelib/thread/qthread.cpp | 6 | ||||
-rw-r--r-- | src/corelib/thread/qthread_p.h | 54 | ||||
-rw-r--r-- | src/corelib/tools/qlocale.cpp | 2 | ||||
-rw-r--r-- | src/corelib/tools/qlocale_data_p.h | 10 | ||||
-rw-r--r-- | src/corelib/tools/qlocale_p.h | 38 | ||||
-rw-r--r-- | src/corelib/xml/qxmlstream.cpp | 7 | ||||
-rw-r--r-- | src/corelib/xml/qxmlstream_p.h | 41 |
12 files changed, 79 insertions, 94 deletions
diff --git a/src/corelib/codecs/qisciicodec.cpp b/src/corelib/codecs/qisciicodec.cpp index dd2bc8d..de1e477 100644 --- a/src/corelib/codecs/qisciicodec.cpp +++ b/src/corelib/codecs/qisciicodec.cpp @@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE struct Codecs { - const char *name; + const char name[10]; ushort base; }; diff --git a/src/corelib/io/qnoncontiguousbytedevice_p.h b/src/corelib/io/qnoncontiguousbytedevice_p.h index acfc6eb..562b759 100644 --- a/src/corelib/io/qnoncontiguousbytedevice_p.h +++ b/src/corelib/io/qnoncontiguousbytedevice_p.h @@ -96,7 +96,6 @@ public: class QNonContiguousByteDeviceByteArrayImpl : public QNonContiguousByteDevice { - Q_OBJECT public: QNonContiguousByteDeviceByteArrayImpl(QByteArray *ba); ~QNonContiguousByteDeviceByteArrayImpl(); @@ -112,7 +111,6 @@ protected: class QNonContiguousByteDeviceRingBufferImpl : public QNonContiguousByteDevice { - Q_OBJECT public: QNonContiguousByteDeviceRingBufferImpl(QRingBuffer *rb); ~QNonContiguousByteDeviceRingBufferImpl(); @@ -129,7 +127,6 @@ protected: class QNonContiguousByteDeviceIoDeviceImpl : public QNonContiguousByteDevice { - Q_OBJECT public: QNonContiguousByteDeviceIoDeviceImpl(QIODevice *d); ~QNonContiguousByteDeviceIoDeviceImpl(); @@ -151,7 +148,6 @@ protected: class QNonContiguousByteDeviceBufferImpl : public QNonContiguousByteDevice { - Q_OBJECT public: QNonContiguousByteDeviceBufferImpl(QBuffer *b); ~QNonContiguousByteDeviceBufferImpl(); @@ -169,7 +165,6 @@ protected: // ... and the reverse thing class QByteDeviceWrappingIoDevice : public QIODevice { - Q_OBJECT public: QByteDeviceWrappingIoDevice (QNonContiguousByteDevice *bd); ~QByteDeviceWrappingIoDevice (); diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 1501351..5e33a71 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -2228,11 +2228,11 @@ static void err_method_notfound(const QObject *object, if (strchr(method,')') == 0) // common typing mistake qWarning("Object::%s: Parentheses expected, %s %s::%s%s%s", func, type, object->metaObject()->className(), method+1, - loc ? " in ":"\0", loc ? loc : "\0"); + loc ? " in ": "", loc ? loc : ""); else qWarning("Object::%s: No such %s %s::%s%s%s", func, type, object->metaObject()->className(), method+1, - loc ? " in ":"\0", loc ? loc : "\0"); + loc ? " in ": "", loc ? loc : ""); } diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index 2ff9818..e6f1c48 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -1823,7 +1823,7 @@ QVariant::Type QVariant::nameToType(const char *name) #ifndef QT_NO_DATASTREAM enum { MapFromThreeCount = 35 }; -static const uint map_from_three[MapFromThreeCount] = +static const ushort map_from_three[MapFromThreeCount] = { QVariant::Invalid, QVariant::Map, diff --git a/src/corelib/plugin/qplugin.h b/src/corelib/plugin/qplugin.h index 121a875..e3b9d32 100644 --- a/src/corelib/plugin/qplugin.h +++ b/src/corelib/plugin/qplugin.h @@ -131,7 +131,7 @@ struct qt_plugin_instance_deleter "pattern=""QT_PLUGIN_VERIFICATION_DATA""\n" \ "version="QT_VERSION_STR"\n" \ "debug="QPLUGIN_DEBUG_STR"\n" \ - "buildkey="QT_BUILD_KEY"\0"; + "buildkey="QT_BUILD_KEY; # if defined (Q_OS_WIN32) && defined(Q_CC_BOR) # define Q_STANDARD_CALL __stdcall diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp index 2fb6335..8fba574 100644 --- a/src/corelib/thread/qthread.cpp +++ b/src/corelib/thread/qthread.cpp @@ -113,12 +113,6 @@ QThreadData::~QThreadData() // fprintf(stderr, "QThreadData %p destroyed\n", this); } -QThreadData *QThreadData::get2(QThread *thread) -{ - Q_ASSERT_X(thread != 0, "QThread", "internal error"); - return thread->d_func()->data; -} - void QThreadData::ref() { #ifndef QT_NO_THREAD diff --git a/src/corelib/thread/qthread_p.h b/src/corelib/thread/qthread_p.h index 75293ce..eb290db 100644 --- a/src/corelib/thread/qthread_p.h +++ b/src/corelib/thread/qthread_p.h @@ -107,32 +107,6 @@ public: { } }; -class Q_CORE_EXPORT QThreadData -{ - QAtomicInt _ref; - -public: - QThreadData(int initialRefCount = 1); - ~QThreadData(); - - static QThreadData *current(); - static QThreadData *get2(QThread *thread); - - void ref(); - void deref(); - - QThread *thread; - bool quitNow; - int loopLevel; - QAbstractEventDispatcher *eventDispatcher; - QStack<QEventLoop *> eventLoops; - QPostEventList postEventList; - bool canWait; - QMap<int, void *> tls; - - QMutex mutex; -}; - #ifndef QT_NO_THREAD class QThreadPrivate : public QObjectPrivate { @@ -210,6 +184,34 @@ public: #endif // QT_NO_THREAD +class QThreadData +{ + QAtomicInt _ref; + +public: + QThreadData(int initialRefCount = 1); + ~QThreadData(); + + static QThreadData *current(); + static QThreadData *get2(QThread *thread) + { Q_ASSERT_X(thread != 0, "QThread", "internal error"); return thread->d_func()->data; } + + + void ref(); + void deref(); + + QThread *thread; + bool quitNow; + int loopLevel; + QAbstractEventDispatcher *eventDispatcher; + QStack<QEventLoop *> eventLoops; + QPostEventList postEventList; + bool canWait; + QMap<int, void *> tls; + + QMutex mutex; +}; + QT_END_NAMESPACE #endif // QTHREAD_P_H diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index 00132d7..4898e10 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -772,7 +772,7 @@ QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const Instead it can return a "Windows code". This maps windows codes to ISO country names. */ struct WindowsToISOListElt { - int windows_code; + ushort windows_code; char iso_name[6]; }; diff --git a/src/corelib/tools/qlocale_data_p.h b/src/corelib/tools/qlocale_data_p.h index 37f59a4..e0eecf3 100644 --- a/src/corelib/tools/qlocale_data_p.h +++ b/src/corelib/tools/qlocale_data_p.h @@ -60,8 +60,8 @@ QT_BEGIN_NAMESPACE */ struct CountryLanguage { - quint32 languageId; - quint32 countryId; + quint16 languageId; + quint16 countryId; }; static const CountryLanguage ImperialMeasurementSystems[] = { { 31, 225 }, @@ -83,7 +83,7 @@ static const int ImperialMeasurementSystemsCount = */ -static const uint locale_index[] = { +static const quint16 locale_index[] = { 0, // unused 0, // C 0, // Abkhazian @@ -2313,7 +2313,7 @@ static const char language_name_list[] = "Chewa\0" ; -static const uint language_name_index[] = { +static const quint16 language_name_index[] = { 0, // Unused 8, // C 10, // Abkhazian @@ -2727,7 +2727,7 @@ static const char country_name_list[] = "SerbiaAndMontenegro\0" ; -static const uint country_name_index[] = { +static const quint16 country_name_index[] = { 0, // AnyCountry 8, // Afghanistan 20, // Albania diff --git a/src/corelib/tools/qlocale_p.h b/src/corelib/tools/qlocale_p.h index b07b948..ed7fc10 100644 --- a/src/corelib/tools/qlocale_p.h +++ b/src/corelib/tools/qlocale_p.h @@ -140,29 +140,29 @@ public: QString dateTimeToString(const QString &format, const QDate *date, const QTime *time, const QLocale *q) const; - quint32 m_language_id, m_country_id; + quint16 m_language_id, m_country_id; quint16 m_decimal, m_group, m_list, m_percent, m_zero, m_minus, m_plus, m_exponential; - quint32 m_short_date_format_idx, m_short_date_format_size; - quint32 m_long_date_format_idx, m_long_date_format_size; - quint32 m_short_time_format_idx, m_short_time_format_size; - quint32 m_long_time_format_idx, m_long_time_format_size; - quint32 m_standalone_short_month_names_idx, m_standalone_short_month_names_size; - quint32 m_standalone_long_month_names_idx, m_standalone_long_month_names_size; - quint32 m_standalone_narrow_month_names_idx, m_standalone_narrow_month_names_size; - quint32 m_short_month_names_idx, m_short_month_names_size; - quint32 m_long_month_names_idx, m_long_month_names_size; - quint32 m_narrow_month_names_idx, m_narrow_month_names_size; - quint32 m_standalone_short_day_names_idx, m_standalone_short_day_names_size; - quint32 m_standalone_long_day_names_idx, m_standalone_long_day_names_size; - quint32 m_standalone_narrow_day_names_idx, m_standalone_narrow_day_names_size; - quint32 m_short_day_names_idx, m_short_day_names_size; - quint32 m_long_day_names_idx, m_long_day_names_size; - quint32 m_narrow_day_names_idx, m_narrow_day_names_size; - quint32 m_am_idx, m_am_size; - quint32 m_pm_idx, m_pm_size; + quint16 m_short_date_format_idx, m_short_date_format_size; + quint16 m_long_date_format_idx, m_long_date_format_size; + quint16 m_short_time_format_idx, m_short_time_format_size; + quint16 m_long_time_format_idx, m_long_time_format_size; + quint16 m_standalone_short_month_names_idx, m_standalone_short_month_names_size; + quint16 m_standalone_long_month_names_idx, m_standalone_long_month_names_size; + quint16 m_standalone_narrow_month_names_idx, m_standalone_narrow_month_names_size; + quint16 m_short_month_names_idx, m_short_month_names_size; + quint16 m_long_month_names_idx, m_long_month_names_size; + quint16 m_narrow_month_names_idx, m_narrow_month_names_size; + quint16 m_standalone_short_day_names_idx, m_standalone_short_day_names_size; + quint16 m_standalone_long_day_names_idx, m_standalone_long_day_names_size; + quint16 m_standalone_narrow_day_names_idx, m_standalone_narrow_day_names_size; + quint16 m_short_day_names_idx, m_short_day_names_size; + quint16 m_long_day_names_idx, m_long_day_names_size; + quint16 m_narrow_day_names_idx, m_narrow_day_names_size; + quint16 m_am_idx, m_am_size; + quint16 m_pm_idx, m_pm_size; }; inline char QLocalePrivate::digitToCLocale(const QChar &in) const diff --git a/src/corelib/xml/qxmlstream.cpp b/src/corelib/xml/qxmlstream.cpp index 5e1fec3..fddcecf 100644 --- a/src/corelib/xml/qxmlstream.cpp +++ b/src/corelib/xml/qxmlstream.cpp @@ -629,7 +629,7 @@ while (<STDIN>) { $sizes[$i++] = $counter; $counter += length 1 + $_; } -print " \"\\0\";\n\nstatic const int QXmlStreamReader_tokenTypeString_indices[] = {\n "; +print " \"\\0\";\n\nstatic const short QXmlStreamReader_tokenTypeString_indices[] = {\n "; for ($j = 0; $j < $i; ++$j) { printf "$sizes[$j], "; } @@ -660,10 +660,9 @@ static const char QXmlStreamReader_tokenTypeString_string[] = "Comment\0" "DTD\0" "EntityReference\0" - "ProcessingInstruction\0" - "\0"; + "ProcessingInstruction\0"; -static const int QXmlStreamReader_tokenTypeString_indices[] = { +static const short QXmlStreamReader_tokenTypeString_indices[] = { 0, 8, 16, 30, 42, 55, 66, 77, 85, 89, 105, 0 }; diff --git a/src/corelib/xml/qxmlstream_p.h b/src/corelib/xml/qxmlstream_p.h index cf1d228..26509ff 100644 --- a/src/corelib/xml/qxmlstream_p.h +++ b/src/corelib/xml/qxmlstream_p.h @@ -127,27 +127,22 @@ public: GOTO_CHECK_OFFSET = 1017 }; - static const char *const spell []; - static const int lhs []; - static const int rhs []; - static const int goto_default []; - static const int action_default []; - static const int action_index []; - static const int action_info []; - static const int action_check []; + static const char *const spell []; + static const qint16 lhs []; + static const qint16 rhs []; + static const qint16 goto_default []; + static const qint16 action_default []; + static const qint16 action_index []; + static const qint16 action_info []; + static const qint16 action_check []; static inline int nt_action (int state, int nt) { - const int *const goto_index = &action_index [GOTO_INDEX_OFFSET]; - const int *const goto_check = &action_check [GOTO_CHECK_OFFSET]; - - const int yyn = goto_index [state] + nt; - - if (yyn < 0 || goto_check [yyn] != nt) + const int yyn = action_index [GOTO_INDEX_OFFSET + state] + nt; + if (yyn < 0 || action_check [GOTO_CHECK_OFFSET + yyn] != nt) return goto_default [nt]; - const int *const goto_info = &action_info [GOTO_INFO_OFFSET]; - return goto_info [yyn]; + return action_info [GOTO_INFO_OFFSET + yyn]; } static inline int t_action (int state, int token) @@ -170,7 +165,7 @@ const char *const QXmlStreamReader_Table::spell [] = { "EMPTY", "ANY", "PCDATA", 0, 0, 0, 0, "CDATA", "ID", "IDREF", "IDREFS", "ENTITIES", "NMTOKEN", "NMTOKENS", "<?xml", "version", 0}; -const int QXmlStreamReader_Table::lhs [] = { +const qint16 QXmlStreamReader_Table::lhs [] = { 57, 57, 59, 59, 59, 59, 59, 59, 59, 59, 67, 68, 64, 72, 72, 72, 75, 66, 66, 66, 66, 79, 78, 80, 80, 80, 80, 80, 80, 81, @@ -199,7 +194,7 @@ const int QXmlStreamReader_Table::lhs [] = { 58, 58, 58, 58, 58, 58, 58, 58, 74, 69, 69, 77, 111, 102, 102, 102, 102, 102, 140}; -const int QXmlStreamReader_Table:: rhs[] = { +const qint16 QXmlStreamReader_Table:: rhs[] = { 2, 1, 4, 2, 2, 2, 2, 2, 2, 0, 1, 1, 9, 2, 4, 0, 4, 4, 6, 6, 4, 1, 3, 1, 1, 1, 2, 2, 2, 1, @@ -228,7 +223,7 @@ const int QXmlStreamReader_Table:: rhs[] = { 2, 2, 2, 2, 2, 2, 2, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2}; -const int QXmlStreamReader_Table::action_default [] = { +const qint16 QXmlStreamReader_Table::action_default [] = { 10, 258, 0, 2, 1, 0, 124, 116, 118, 119, 126, 128, 122, 11, 113, 107, 0, 108, 127, 110, 114, 112, 120, 123, 125, 106, 109, 111, 117, 115, @@ -273,7 +268,7 @@ const int QXmlStreamReader_Table::action_default [] = { 260, 0, 230, 0, 0, 13, 269, 9, 5, 8, 4, 0, 7, 258, 6, 0, 3}; -const int QXmlStreamReader_Table::goto_default [] = { +const qint16 QXmlStreamReader_Table::goto_default [] = { 2, 4, 3, 49, 388, 43, 37, 52, 47, 41, 249, 53, 127, 84, 393, 81, 85, 126, 42, 46, 169, 130, 131, 146, 145, 149, 138, 136, 140, 147, @@ -284,7 +279,7 @@ const int QXmlStreamReader_Table::goto_default [] = { 264, 252, 251, 250, 339, 326, 325, 329, 398, 399, 50, 51, 59, 0}; -const int QXmlStreamReader_Table::action_index [] = { +const qint16 QXmlStreamReader_Table::action_index [] = { -21, -57, 33, 119, 960, 70, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, 105, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, @@ -373,7 +368,7 @@ const int QXmlStreamReader_Table::action_index [] = { 28, 15, 82, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, 3, -84, 98, -84}; -const int QXmlStreamReader_Table::action_info [] = { +const qint16 QXmlStreamReader_Table::action_info [] = { 65, 332, 65, 405, 392, 385, 377, 65, 414, 410, 415, 55, 397, 374, 373, 217, 206, 408, 65, 65, 207, 211, 216, 1, 55, 199, 182, 192, 70, 70, @@ -507,7 +502,7 @@ const int QXmlStreamReader_Table::action_info [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; -const int QXmlStreamReader_Table::action_check [] = { +const qint16 QXmlStreamReader_Table::action_check [] = { 26, 18, 26, 14, 4, 4, 4, 26, 24, 14, 4, 26, 4, 4, 4, 4, 22, 55, 26, 26, 42, 4, 4, 44, 26, 22, 19, 12, 2, 2, |