Ignore:
Timestamp:
Aug 2, 2010, 9:27:30 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.3 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/tools/moc/moc.cpp

    r651 r769  
    659659                    parseSlotInPrivate(&def, access);
    660660                    break;
     661                case Q_PRIVATE_PROPERTY_TOKEN:
     662                    parsePrivateProperty(&def);
     663                    break;
    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
     992void Moc::parseProperty(ClassDef *def)
     993{
     994    next(LPAREN);
     995    PropertyDef propDef;
     996    createPropertyDef(propDef);
     997    next(RPAREN);
     998
     999
     1000    if(!propDef.notify.isEmpty())
     1001        def->notifyableProperties++;
     1002    def->propertyList += propDef;
     1003}
     1004
     1005void Moc::parsePrivateProperty(ClassDef *def)
     1006{
     1007    next(LPAREN);
     1008    PropertyDef propDef;
     1009    next(IDENTIFIER);
     1010    propDef.inPrivateClass = lexem();
     1011    while (test(SCOPE)) {
     1012        propDef.inPrivateClass += lexem();
     1013        next(IDENTIFIER);
     1014        propDef.inPrivateClass += lexem();
     1015    }
     1016    // also allow void functions
     1017    if (test(LPAREN)) {
     1018        next(RPAREN);
     1019        propDef.inPrivateClass += "()";
     1020    }
     1021
     1022    next(COMMA);
     1023
     1024    createPropertyDef(propDef);
    9911025
    9921026    if(!propDef.notify.isEmpty())
Note: See TracChangeset for help on using the changeset viewer.