Ignore:
Timestamp:
Aug 2, 2010, 5:05:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

vendor: Merged in qt-everywhere-opensource-src-4.6.3 from Nokia.

Location:
branches/vendor/nokia/qt/current/src/tools
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/vendor/nokia/qt/current/src/tools/moc/generator.cpp

    r649 r767  
    739739                if (p.read.isEmpty())
    740740                    continue;
     741
     742
     743
     744
     745
    741746                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());
    744749                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());
    747752                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());
    750755                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());
    753758            }
    754759            fprintf(out, "        }\n");
     
    769774                if (p.write.isEmpty())
    770775                    continue;
     776
     777
     778
     779
     780
    771781                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());
    774784                } 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());
    777787                }
    778788            }
     
    792802                if (!p.reset.endsWith(')'))
    793803                    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());
    796811            }
    797812            fprintf(out, "        }\n");
  • branches/vendor/nokia/qt/current/src/tools/moc/keywords.cpp

    r649 r767  
    4444
    4545static const short keyword_trans[][128] = {
    46     {0,0,0,0,0,0,0,0,0,525,522,0,0,0,0,0,
    47      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    48      525,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,
    4949     22,22,22,22,22,22,22,22,22,22,34,41,23,39,24,43,
    5050     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,527,32,238,8,
     51     8,21,8,8,8,8,8,8,8,8,8,31,5,32,238,8,
    5252     0,1,2,3,4,5,6,7,8,9,8,8,10,11,12,13,
    5353     14,8,15,16,17,18,19,20,8,8,8,36,245,37,248,0},
     
    191191     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    192192     0,0,0,0,0,0,0,0,0,0,42,0,0,0,28,0,
    193      530,530,530,530,530,530,530,530,530,530,0,0,0,0,0,0,
     193     53,0,0,0,0,0,0,
    194194     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    195195     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
     
    350350    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    351351     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,529,0,0,0,0,528,
     352     0,0,0,0,0,0,0,0,0,0,5,
    353353     0,0,0,0,0,0,0,0,0,0,0,0,0,258,0,0,
    354354     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
     
    426426     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    427427     0,0,0,0,450,0,506,0,0,0,0,0,0,0,0,0,
     428
     429
     430
     431
     432
     433
     434
     435
    428436     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    429437     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
     
    926934    {CHARACTER, 0, 69, 479, CHARACTER},
    927935    {CHARACTER, 0, 95, 480, CHARACTER},
    928     {CHARACTER, 0, 83, 481, CHARACTER},
     936    {CHARACTER, , CHARACTER},
    929937    {CHARACTER, 0, 76, 482, CHARACTER},
    930938    {CHARACTER, 0, 79, 483, CHARACTER},
    931939    {CHARACTER, 0, 84, 484, CHARACTER},
    932940    {Q_PRIVATE_SLOT_TOKEN, 0, 0, 0, CHARACTER},
    933     {CHARACTER, 48, 0, 0, CHARACTER},
     941    {CHARACTER, 4, 0, 0, CHARACTER},
    934942    {CHARACTER, 0, 77, 487, CHARACTER},
    935943    {CHARACTER, 0, 79, 488, CHARACTER},
     
    968976    {CHARACTER, 0, 69, 521, CHARACTER},
    969977    {Q_SCRIPTABLE_TOKEN, 0, 0, 0, CHARACTER},
     978
     979
     980
     981
     982
     983
     984
     985
    970986    {NEWLINE, 0, 0, 0, NOTOKEN},
    971987    {QUOTE, 0, 0, 0, NOTOKEN},
  • branches/vendor/nokia/qt/current/src/tools/moc/moc.cpp

    r649 r767  
    659659                    parseSlotInPrivate(&def, access);
    660660                    break;
     661
     662
     663
    661664                case ENUM: {
    662665                    EnumDef enumDef;
     
    873876}
    874877
    875 
    876 void Moc::parseProperty(ClassDef *def)
    877 {
    878     next(LPAREN);
    879     PropertyDef propDef;
     878void Moc::createPropertyDef(PropertyDef &propDef)
     879{
    880880    QByteArray type = parseType().name;
    881881    if (type.isEmpty())
     
    965965        }
    966966    }
    967     next(RPAREN);
    968967    if (propDef.read.isNull()) {
    969968        QByteArray msg;
     
    989988        warning(msg.constData());
    990989    }
     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
    9911025
    9921026    if(!propDef.notify.isEmpty())
  • branches/vendor/nokia/qt/current/src/tools/moc/moc.h

    r649 r767  
    117117{
    118118    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;
    120120    int notifyId;
    121121    bool constant;
     
    218218    void parseSignals(ClassDef *def);
    219219    void parseProperty(ClassDef *def);
     220
    220221    void parseEnumOrFlag(ClassDef *def, bool isFlag);
    221222    void parseFlag(ClassDef *def);
     
    225226    void parseDeclareMetatype();
    226227    void parseSlotInPrivate(ClassDef *def, FunctionDef::Access access);
     228
    227229
    228230    void parseFunctionArguments(FunctionDef *def);
  • branches/vendor/nokia/qt/current/src/tools/moc/token.cpp

    r649 r767  
    180180        case Q_SLOT_TOKEN: return "Q_SLOT_TOKEN";
    181181        case Q_PRIVATE_SLOT_TOKEN: return "Q_PRIVATE_SLOT_TOKEN";
     182
    182183        case SPECIAL_TREATMENT_MARK: return "SPECIAL_TREATMENT_MARK";
    183184        case MOC_INCLUDE_BEGIN: return "MOC_INCLUDE_BEGIN";
  • branches/vendor/nokia/qt/current/src/tools/moc/token.h

    r649 r767  
    186186    Q_INVOKABLE_TOKEN,
    187187    Q_SCRIPTABLE_TOKEN,
     188
    188189    Q_META_TOKEN_END,
    189190    SPECIAL_TREATMENT_MARK = Q_META_TOKEN_END,
  • branches/vendor/nokia/qt/current/src/tools/moc/util/generate_keywords.cpp

    r649 r767  
    249249    { "Q_SLOT", "Q_SLOT_TOKEN" },
    250250    { "Q_SCRIPTABLE", "Q_SCRIPTABLE_TOKEN" },
    251 
     251    { "Q_PRIVATE_PROPERTY", "Q_PRIVATE_PROPERTY_TOKEN" },
    252252    { "\n", "NEWLINE" },
    253253    { "\"", "QUOTE" },
  • branches/vendor/nokia/qt/current/src/tools/rcc/rcc.cpp

    r649 r767  
    545545    RCCFileInfo *s = new RCCFileInfo(file);
    546546    s->m_parent = parent;
     547
     548
    547549    parent->m_children.insertMulti(filename, s);
    548550    return true;
  • branches/vendor/nokia/qt/current/src/tools/uic/cpp/cppwriteinitialization.cpp

    r649 r767  
    27892789
    27902790    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 (QString str, directives)
    2792         map[str] = true;
     2791    foreach (str, directives)
     2792        map;
    27932793
    27942794    if (map.size() == 1) {
     
    27992799    outputStream << "#if";
    28002800    bool doOr = false;
    2801     foreach (QString str, map.keys()) {
     2801    foreach (str, map.keys()) {
    28022802        if (doOr)
    28032803            outputStream << " ||";
  • branches/vendor/nokia/qt/current/src/tools/uic/qclass_lib_map.h

    r556 r767  
    458458QT_CLASS_LIB(QWebSettings, QtWebKit, qwebsettings.h)
    459459QT_CLASS_LIB(QWebView, QtWebKit, qwebview.h)
     460
    460461QT_CLASS_LIB(QAudioDeviceInfo, QtMultimedia, qaudiodeviceinfo.h)
    461462QT_CLASS_LIB(QAbstractAudioDeviceInfo, QtMultimedia, qaudioengine.h)
  • branches/vendor/nokia/qt/current/src/tools/uic3/converter.cpp

    r649 r767  
    402402            if (objName == receiver) {
    403403                // see if it's a custom slot
    404                 foreach (QString cs, ui_custom_slots) {
     404                foreach (cs, ui_custom_slots) {
    405405                    if (cs == slot) {
    406406                        resolved = true;
     
    11231123                QStringList flags = prop->elementSet().split(QLatin1Char('|'));
    11241124                QStringList v;
    1125                 foreach (QString fl, flags) {
     1125                foreach (fl, flags) {
    11261126                    QString e = WidgetInfo::resolveEnumerator(className, fl);
    11271127                    if (e.isEmpty()) {
     
    12841284    //split type name on <>*& and whitespace
    12851285    QStringList typeNames = t.split(QRegExp(QLatin1String("<|>|\\*|&| ")), QString::SkipEmptyParts);
    1286     foreach(QString typeName , typeNames) {
     1286    foreach(typeName , typeNames) {
    12871287        QString newName = fixClassName(typeName);
    12881288        if( newName != typeName ) {
  • branches/vendor/nokia/qt/current/src/tools/uic3/main.cpp

    r649 r767  
    339339        ui3.computeDeps(e, globalIncludes, localIncludes, impl);
    340340
    341         foreach (QString i, globalIncludes)
     341        foreach (i, globalIncludes)
    342342            printf("%s\n", i.toLatin1().constData());
    343343
    344         foreach (QString i, localIncludes)
     344        foreach (i, localIncludes)
    345345            printf("%s\n", i.toLatin1().constData());
    346346
Note: See TracChangeset for help on using the changeset viewer.