From 79876262351ec0e6b98564ffcf627f947a1d7fe5 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Fri, 17 Sep 2010 17:17:26 +0200 Subject: Remove unnecessary textcodec aliases from qtextcodec_symbian.cpp MS_KANJI and Java UTF-8 are not needed because both had aliases which only differ in character case. Qt handles these aliases case insensitive, however. The removal speeds the lookup up, a bit. Reviewed-By: Olivier Goffart Task-Number: QTBUG-13565 --- src/corelib/codecs/qtextcodec_symbian.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/codecs/qtextcodec_symbian.cpp b/src/corelib/codecs/qtextcodec_symbian.cpp index 18c5fd0..d59998f 100644 --- a/src/corelib/codecs/qtextcodec_symbian.cpp +++ b/src/corelib/codecs/qtextcodec_symbian.cpp @@ -59,7 +59,7 @@ struct QSymbianCodecInitData { It is ordered by charsetId to allow binary search lookup */ static const QSymbianCodecInitData codecsData[] = { - { /*268439485*/ KCharacterSetIdentifierShiftJis, 17, "Shift_JIS\0MS_Kanji\0csShiftJIS\0MS_KANJI\0SJIS\0" }, + { /*268439485*/ KCharacterSetIdentifierShiftJis, 17, "Shift_JIS\0MS_Kanji\0csShiftJIS\0SJIS\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" }, @@ -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\0JAVA UTF-8\0" }, + { /*268458031*/ KCharacterSetIdentifierJavaConformantUtf8, 0, "JAVA 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" }, -- cgit v0.12 on> SCons is an Open Source software construction tool—that is, a next-generation build tool.
summaryrefslogtreecommitdiffstats
path: root/test/CPPDEFINES/live.py
blob: 0c7ad787439730c87f8b514d40f9f116e5279140 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/usr/bin/env python
#
# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#

__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"

"""
Verify basic use of CPPDEFINES with live compilation.
"""

import TestSCons

test = TestSCons.TestSCons()

test.write('SConstruct', """\
foo = Environment(CPPDEFINES = ['FOO', ('VAL', '$VALUE')], VALUE=7)
bar = Environment(CPPDEFINES = {'BAR':None, 'VAL':8})
baz = Environment(CPPDEFINES = ['BAZ', ('VAL', 9)])
f = foo.Object(target = 'foo', source = 'prog.c')
b = bar.Object(target = 'bar', source = 'prog.c')
foo.Program(target = 'foo', source = f)
bar.Program(target = 'bar', source = b)
baz.Program(target = 'baz', source = 'baz.cpp')
""")

test.write('prog.c', r"""
#include <stdio.h>
#include <stdlib.h>

int
main(int argc, char *argv[])
{
        argv[argc++] = "--";
#ifdef FOO
        printf("prog.c:  FOO %d\n", VAL);
#endif
#ifdef BAR
        printf("prog.c:  BAR %d\n", VAL);
#endif
        exit (0);
}
""")

test.write('baz.cpp', r"""\
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
#ifdef  BAZ
        printf("baz.cpp:  BAZ %d\n", VAL);
#endif
        return(0);
}
""")


test.run(arguments = '.')

test.run(program = test.workpath('foo'), stdout = "prog.c:  FOO 7\n")
test.run(program = test.workpath('bar'), stdout = "prog.c:  BAR 8\n")
test.run(program = test.workpath('baz'), stdout = "baz.cpp:  BAZ 9\n")

test.pass_test()

# Local Variables:
# tab-width:4
# indent-tabs-mode:nil
# End:
# vim: set expandtab tabstop=4 shiftwidth=4: