Changeset 767 for branches/vendor/nokia/qt/current/src/tools
- Timestamp:
- Aug 2, 2010, 5:05:06 PM (15 years ago)
- Location:
- branches/vendor/nokia/qt/current/src/tools
- Files:
-
- 12 edited
-
moc/generator.cpp (modified) (3 diffs)
-
moc/keywords.cpp (modified) (6 diffs)
-
moc/moc.cpp (modified) (4 diffs)
-
moc/moc.h (modified) (3 diffs)
-
moc/token.cpp (modified) (1 diff)
-
moc/token.h (modified) (1 diff)
-
moc/util/generate_keywords.cpp (modified) (1 diff)
-
rcc/rcc.cpp (modified) (1 diff)
-
uic/cpp/cppwriteinitialization.cpp (modified) (2 diffs)
-
uic/qclass_lib_map.h (modified) (1 diff)
-
uic3/converter.cpp (modified) (3 diffs)
-
uic3/main.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/vendor/nokia/qt/current/src/tools/moc/generator.cpp
r649 r767 739 739 if (p.read.isEmpty()) 740 740 continue; 741 742 743 744 745 741 746 if (p.gspec == PropertyDef::PointerSpec) 742 fprintf(out, " case %d: _a[0] = const_cast<void*>(reinterpret_cast<const void*>(%s ())); break;\n",743 propindex, p .read.constData());747 fprintf(out, " case %d: _a[0] = const_cast<void*>(reinterpret_cast<const void*>(%s())); break;\n", 748 propindex, p.read.constData()); 744 749 else if (p.gspec == PropertyDef::ReferenceSpec) 745 fprintf(out, " case %d: _a[0] = const_cast<void*>(reinterpret_cast<const void*>(&%s ())); break;\n",746 propindex, p .read.constData());750 fprintf(out, " case %d: _a[0] = const_cast<void*>(reinterpret_cast<const void*>(&%s())); break;\n", 751 propindex, p.read.constData()); 747 752 else if (cdef->enumDeclarations.value(p.type, false)) 748 fprintf(out, " case %d: *reinterpret_cast<int*>(_v) = QFlag(%s ()); break;\n",749 propindex, p .read.constData());753 fprintf(out, " case %d: *reinterpret_cast<int*>(_v) = QFlag(%s()); break;\n", 754 propindex, p.read.constData()); 750 755 else 751 fprintf(out, " case %d: *reinterpret_cast< %s*>(_v) = %s (); break;\n",752 propindex, p.type.constData(), p .read.constData());756 fprintf(out, " case %d: *reinterpret_cast< %s*>(_v) = %s(); break;\n", 757 propindex, p.type.constData(), p.read.constData()); 753 758 } 754 759 fprintf(out, " }\n"); … … 769 774 if (p.write.isEmpty()) 770 775 continue; 776 777 778 779 780 771 781 if (cdef->enumDeclarations.value(p.type, false)) { 772 fprintf(out, " case %d: %s (QFlag(*reinterpret_cast<int*>(_v))); break;\n",773 propindex, p .write.constData());782 fprintf(out, " case %d: %s(QFlag(*reinterpret_cast<int*>(_v))); break;\n", 783 propindex, p.write.constData()); 774 784 } else { 775 fprintf(out, " case %d: %s (*reinterpret_cast< %s*>(_v)); break;\n",776 propindex, p .write.constData(), p.type.constData());785 fprintf(out, " case %d: %s(*reinterpret_cast< %s*>(_v)); break;\n", 786 propindex, p.write.constData(), p.type.constData()); 777 787 } 778 788 } … … 792 802 if (!p.reset.endsWith(')')) 793 803 continue; 794 fprintf(out, " case %d: %s; break;\n", 795 propindex, p.reset.constData()); 804 QByteArray prefix; 805 if (p.inPrivateClass.size()) { 806 prefix = p.inPrivateClass; 807 prefix.append("->"); 808 } 809 fprintf(out, " case %d: %s%s; break;\n", 810 propindex, prefix.constData(), p.reset.constData()); 796 811 } 797 812 fprintf(out, " }\n"); -
branches/vendor/nokia/qt/current/src/tools/moc/keywords.cpp
r649 r767 44 44 45 45 static const short keyword_trans[][128] = { 46 {0,0,0,0,0,0,0,0,0,5 25,522,0,0,0,0,0,47 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 48 5 25,252,523,526,0,38,239,524,25,26,236,234,30,235,27,237,46 {0,0,0,0,0,0,0,0,0,5,0,0,0,0,0, 47 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 48 5,25,26,236,234,30,235,27,237, 49 49 22,22,22,22,22,22,22,22,22,22,34,41,23,39,24,43, 50 50 0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 51 8,21,8,8,8,8,8,8,8,8,8,31,5 27,32,238,8,51 8,21,8,8,8,8,8,8,8,8,8,31,5,32,238,8, 52 52 0,1,2,3,4,5,6,7,8,9,8,8,10,11,12,13, 53 53 14,8,15,16,17,18,19,20,8,8,8,36,245,37,248,0}, … … 191 191 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 192 192 0,0,0,0,0,0,0,0,0,0,42,0,0,0,28,0, 193 53 0,530,530,530,530,530,530,530,530,530,0,0,0,0,0,0,193 53,0,0,0,0,0,0, 194 194 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 195 195 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, … … 350 350 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 351 351 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 352 0,0,0,0,0,0,0,0,0,0,5 29,0,0,0,0,528,352 0,0,0,0,0,0,0,0,0,0,5, 353 353 0,0,0,0,0,0,0,0,0,0,0,0,0,258,0,0, 354 354 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, … … 426 426 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 427 427 0,0,0,0,450,0,506,0,0,0,0,0,0,0,0,0, 428 429 430 431 432 433 434 435 428 436 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 429 437 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, … … 926 934 {CHARACTER, 0, 69, 479, CHARACTER}, 927 935 {CHARACTER, 0, 95, 480, CHARACTER}, 928 {CHARACTER, 0, 83, 481, CHARACTER},936 {CHARACTER, , CHARACTER}, 929 937 {CHARACTER, 0, 76, 482, CHARACTER}, 930 938 {CHARACTER, 0, 79, 483, CHARACTER}, 931 939 {CHARACTER, 0, 84, 484, CHARACTER}, 932 940 {Q_PRIVATE_SLOT_TOKEN, 0, 0, 0, CHARACTER}, 933 {CHARACTER, 4 8, 0, 0, CHARACTER},941 {CHARACTER, 4, 0, 0, CHARACTER}, 934 942 {CHARACTER, 0, 77, 487, CHARACTER}, 935 943 {CHARACTER, 0, 79, 488, CHARACTER}, … … 968 976 {CHARACTER, 0, 69, 521, CHARACTER}, 969 977 {Q_SCRIPTABLE_TOKEN, 0, 0, 0, CHARACTER}, 978 979 980 981 982 983 984 985 970 986 {NEWLINE, 0, 0, 0, NOTOKEN}, 971 987 {QUOTE, 0, 0, 0, NOTOKEN}, -
branches/vendor/nokia/qt/current/src/tools/moc/moc.cpp
r649 r767 659 659 parseSlotInPrivate(&def, access); 660 660 break; 661 662 663 661 664 case ENUM: { 662 665 EnumDef enumDef; … … 873 876 } 874 877 875 876 void Moc::parseProperty(ClassDef *def) 877 { 878 next(LPAREN); 879 PropertyDef propDef; 878 void Moc::createPropertyDef(PropertyDef &propDef) 879 { 880 880 QByteArray type = parseType().name; 881 881 if (type.isEmpty()) … … 965 965 } 966 966 } 967 next(RPAREN);968 967 if (propDef.read.isNull()) { 969 968 QByteArray msg; … … 989 988 warning(msg.constData()); 990 989 } 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 991 1025 992 1026 if(!propDef.notify.isEmpty()) -
branches/vendor/nokia/qt/current/src/tools/moc/moc.h
r649 r767 117 117 { 118 118 PropertyDef():notifyId(-1), constant(false), final(false), gspec(ValueSpec){} 119 QByteArray name, type, read, write, reset, designable, scriptable, editable, stored, user, notify ;119 QByteArray name, type, read, write, reset, designable, scriptable, editable, stored, user, notify; 120 120 int notifyId; 121 121 bool constant; … … 218 218 void parseSignals(ClassDef *def); 219 219 void parseProperty(ClassDef *def); 220 220 221 void parseEnumOrFlag(ClassDef *def, bool isFlag); 221 222 void parseFlag(ClassDef *def); … … 225 226 void parseDeclareMetatype(); 226 227 void parseSlotInPrivate(ClassDef *def, FunctionDef::Access access); 228 227 229 228 230 void parseFunctionArguments(FunctionDef *def); -
branches/vendor/nokia/qt/current/src/tools/moc/token.cpp
r649 r767 180 180 case Q_SLOT_TOKEN: return "Q_SLOT_TOKEN"; 181 181 case Q_PRIVATE_SLOT_TOKEN: return "Q_PRIVATE_SLOT_TOKEN"; 182 182 183 case SPECIAL_TREATMENT_MARK: return "SPECIAL_TREATMENT_MARK"; 183 184 case MOC_INCLUDE_BEGIN: return "MOC_INCLUDE_BEGIN"; -
branches/vendor/nokia/qt/current/src/tools/moc/token.h
r649 r767 186 186 Q_INVOKABLE_TOKEN, 187 187 Q_SCRIPTABLE_TOKEN, 188 188 189 Q_META_TOKEN_END, 189 190 SPECIAL_TREATMENT_MARK = Q_META_TOKEN_END, -
branches/vendor/nokia/qt/current/src/tools/moc/util/generate_keywords.cpp
r649 r767 249 249 { "Q_SLOT", "Q_SLOT_TOKEN" }, 250 250 { "Q_SCRIPTABLE", "Q_SCRIPTABLE_TOKEN" }, 251 251 { "Q_PRIVATE_PROPERTY", "Q_PRIVATE_PROPERTY_TOKEN" }, 252 252 { "\n", "NEWLINE" }, 253 253 { "\"", "QUOTE" }, -
branches/vendor/nokia/qt/current/src/tools/rcc/rcc.cpp
r649 r767 545 545 RCCFileInfo *s = new RCCFileInfo(file); 546 546 s->m_parent = parent; 547 548 547 549 parent->m_children.insertMulti(filename, s); 548 550 return true; -
branches/vendor/nokia/qt/current/src/tools/uic/cpp/cppwriteinitialization.cpp
r649 r767 2789 2789 2790 2790 QMap<QString, bool> map; // bool is dummy. The idea is to sort that (always generate in the same order) by putting a set into a map 2791 foreach ( QStringstr, directives)2792 map [str] = true;2791 foreach (str, directives) 2792 map; 2793 2793 2794 2794 if (map.size() == 1) { … … 2799 2799 outputStream << "#if"; 2800 2800 bool doOr = false; 2801 foreach ( QStringstr, map.keys()) {2801 foreach (str, map.keys()) { 2802 2802 if (doOr) 2803 2803 outputStream << " ||"; -
branches/vendor/nokia/qt/current/src/tools/uic/qclass_lib_map.h
r556 r767 458 458 QT_CLASS_LIB(QWebSettings, QtWebKit, qwebsettings.h) 459 459 QT_CLASS_LIB(QWebView, QtWebKit, qwebview.h) 460 460 461 QT_CLASS_LIB(QAudioDeviceInfo, QtMultimedia, qaudiodeviceinfo.h) 461 462 QT_CLASS_LIB(QAbstractAudioDeviceInfo, QtMultimedia, qaudioengine.h) -
branches/vendor/nokia/qt/current/src/tools/uic3/converter.cpp
r649 r767 402 402 if (objName == receiver) { 403 403 // see if it's a custom slot 404 foreach ( QStringcs, ui_custom_slots) {404 foreach (cs, ui_custom_slots) { 405 405 if (cs == slot) { 406 406 resolved = true; … … 1123 1123 QStringList flags = prop->elementSet().split(QLatin1Char('|')); 1124 1124 QStringList v; 1125 foreach ( QStringfl, flags) {1125 foreach (fl, flags) { 1126 1126 QString e = WidgetInfo::resolveEnumerator(className, fl); 1127 1127 if (e.isEmpty()) { … … 1284 1284 //split type name on <>*& and whitespace 1285 1285 QStringList typeNames = t.split(QRegExp(QLatin1String("<|>|\\*|&| ")), QString::SkipEmptyParts); 1286 foreach( QStringtypeName , typeNames) {1286 foreach(typeName , typeNames) { 1287 1287 QString newName = fixClassName(typeName); 1288 1288 if( newName != typeName ) { -
branches/vendor/nokia/qt/current/src/tools/uic3/main.cpp
r649 r767 339 339 ui3.computeDeps(e, globalIncludes, localIncludes, impl); 340 340 341 foreach ( QStringi, globalIncludes)341 foreach (i, globalIncludes) 342 342 printf("%s\n", i.toLatin1().constData()); 343 343 344 foreach ( QStringi, localIncludes)344 foreach (i, localIncludes) 345 345 printf("%s\n", i.toLatin1().constData()); 346 346
Note:
See TracChangeset
for help on using the changeset viewer.
