Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/activeqt/control/qaxserver.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the ActiveQt framework of the Qt Toolkit.
     
    6465HANDLE qAxInstance = 0;
    6566ITypeLib *qAxTypeLibrary = 0;
    66 char qAxModuleFilename[MAX_PATH];
     67wchar_t qAxModuleFilename[MAX_PATH];
    6768bool qAxOutProcServer = false;
    6869
     
    9192        for (int i = 0; i < keys.count(); ++i) {
    9293            QString key(keys.at(i));
    93             qRegisterMetaType((key + QLatin1String("*")).toLatin1(), (void**)0);
     94            qRegisterMetaType((key + QLatin1Char('*')).toLatin1(), (void**)0);
    9495        }
    9596    }
     
    117118    InitializeCriticalSection(&qAxModuleSection);
    118119   
    119     libFile = QString::fromLocal8Bit(qAxModuleFilename);
     120    libFile = QString::fromWCharArray(qAxModuleFilename);
    120121    libFile = libFile.toLower();
    121     if (LoadTypeLibEx((TCHAR*)libFile.utf16(), REGKIND_NONE, &qAxTypeLibrary) == S_OK)
     122    if (LoadTypeLibEx((wchar_t*)libFile.utf16(), REGKIND_NONE, &qAxTypeLibrary) == S_OK)
    122123        return libFile;
    123124
    124125    int lastDot = libFile.lastIndexOf(QLatin1Char('.'));
    125126    libFile = libFile.left(lastDot) + QLatin1String(".tlb");
    126     if (LoadTypeLibEx((TCHAR*)libFile.utf16(), REGKIND_NONE, &qAxTypeLibrary) == S_OK)
     127    if (LoadTypeLibEx((wchar_t*)libFile.utf16(), REGKIND_NONE, &qAxTypeLibrary) == S_OK)
    127128        return libFile;
    128129
    129130    lastDot = libFile.lastIndexOf(QLatin1Char('.'));
    130131    libFile = libFile.left(lastDot) + QLatin1String(".olb");
    131     if (LoadTypeLibEx((TCHAR*)libFile.utf16(), REGKIND_NONE, &qAxTypeLibrary) == S_OK)
     132    if (LoadTypeLibEx((wchar_t*)libFile.utf16(), REGKIND_NONE, &qAxTypeLibrary) == S_OK)
    132133        return libFile;
    133134
     
    208209{
    209210    qAxIsServer = false;
    210     QString file = QString::fromLocal8Bit(qAxModuleFilename);
    211     QString path = file.left(file.lastIndexOf(QLatin1String("\\"))+1);
     211    QString file = QString::fromWCharArray(qAxModuleFilename);
     212    QString path = file.left(file.lastIndexOf(QLatin1Char('\\'))+1);
    212213    QString module = file.right(file.length() - path.length());
    213     module = module.left(module.lastIndexOf(QLatin1String(".")));
     214    module = module.left(module.lastIndexOf(QLatin1Char('.')));
    214215   
    215216    const QString appId = qAxFactory()->appID().toString().toUpper();
     
    227228    DWORD major = libAttr->wMajorVerNum;
    228229    DWORD minor = libAttr->wMinorVerNum;
    229     typeLibVersion = QString::number((uint)major) + QLatin1String(".") + QString::number((uint)minor);
     230    typeLibVersion = QString::number((uint)major) + QLatin1Char('.') + QString::number((uint)minor);
    230231
    231232    if (bRegister)
    232         RegisterTypeLib(qAxTypeLibrary, (TCHAR*)libFile.utf16(), 0);
     233        RegisterTypeLib(qAxTypeLibrary, (wchar_t*)libFile.utf16(), 0);
    233234    else
    234235        UnRegisterTypeLib(libAttr->guid, libAttr->wMajorVerNum, libAttr->wMinorVerNum, libAttr->lcid, libAttr->syskind);
     
    272273
    273274            if (object) { // don't register subobject classes
    274                 QString classVersion = mo ? QString(QLatin1String(mo->classInfo(mo->indexOfClassInfo("Version")).value())) : QString();
     275                QString classVersion = mo ? QString::fromLatin1(mo->classInfo(mo->indexOfClassInfo("Version")).value()) : QString();
    275276                if (classVersion.isNull())
    276277                    classVersion = QLatin1String("1.0");
    277278                bool insertable = mo && !qstricmp(mo->classInfo(mo->indexOfClassInfo("Insertable")).value(), "yes");
    278279                bool control = object->isWidgetType();
    279                 const QString classMajorVersion = classVersion.left(classVersion.indexOf(QLatin1String(".")));
     280                const QString classMajorVersion = classVersion.left(classVersion.indexOf(QLatin1Char('.')));
    280281                uint olemisc = OLEMISC_SETCLIENTSITEFIRST
    281282                    |OLEMISC_ACTIVATEWHENVISIBLE
     
    288289                    olemisc |= OLEMISC_WANTSTOMENUMERGE;
    289290               
    290                 settings.setValue(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion + QLatin1String("/."), className + QLatin1String(" Class"));
    291                 settings.setValue(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion + QLatin1String("/CLSID/."), classId);
     291                settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/."), className + QLatin1String(" Class"));
     292                settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/CLSID/."), classId);
    292293                if (insertable)
    293                     settings.setValue(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion + QLatin1String("/Insertable/."), QVariant(QLatin1String("")));
     294                    settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/Insertable/."), QVariant(QLatin1String("")));
    294295               
    295                 settings.setValue(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String("/."), className + QLatin1String(" Class"));
    296                 settings.setValue(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String("/CLSID/."), classId);
    297                 settings.setValue(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String("/CurVer/."), module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion);
     296                settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/."), className + QLatin1String(" Class"));
     297                settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/CLSID/."), classId);
     298                settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/CurVer/."), module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion);
    298299               
    299300                settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/."), className + QLatin1String(" Class"));
    300                 if (file.right(3).toLower() == QLatin1String("exe"))
     301                if (file.endsWith(QLatin1String("exe"), Qt::CaseInsensitive))
    301302                    settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/AppID"), appId);
    302303                if (control)
     
    308309                else
    309310                    settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/LocalServer32/."),
    310                                       QLatin1String("\"") + file + QLatin1String("\" -activex"));
     311                                      QLatin1Char('\"') + file + QLatin1String("\" -activex"));
    311312                settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/MiscStatus/."), control ? QLatin1String("1") : QLatin1String("0"));
    312313                settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/MiscStatus/1/."), QString::number(olemisc));
    313314                settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/Programmable/."), QVariant(QLatin1String("")));
    314                 settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/ToolboxBitmap32/."), QLatin1String("\"") +
     315                settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/ToolboxBitmap32/."), QLatin1Char('\"') +
    315316                                  file + QLatin1String("\", 101"));
    316317                settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/TypeLib/."), libId); settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/Version/."), classVersion);
    317                 settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/VersionIndependentProgID/."), module + QLatin1String(".") + className);
    318                 settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/ProgID/."), module + QLatin1String(".") + className + QLatin1String(".") + classVersion.left(classVersion.indexOf(QLatin1Char('.'))));
     318                settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/VersionIndependentProgID/."), module + QLatin1Char('.') + className);
     319                settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/ProgID/."), module + QLatin1Char('.') + className + QLatin1Char('.') + classVersion.left(classVersion.indexOf(QLatin1Char('.'))));
    319320
    320321                QString mime = QLatin1String(mo->classInfo(mo->indexOfClassInfo("MIME")).value());
     
    331332                            // Prepend '.' before extension, if required.
    332333                            extension = extension.trimmed();
    333                             if (extension[0] != QChar(QLatin1Char('.')))
    334                                 extension = QLatin1String(".") + extension;
     334                            if (extension[0] != QLatin1Char('.'))
     335                                extension = QLatin1Char('.') + extension;
    335336                        }
    336337
    337338                        if (!extension.isEmpty()) {
    338                             settings.setValue(QLatin1String("/") + extension + QLatin1String("/."), module + QLatin1String(".") + className);
    339                             settings.setValue(QLatin1String("/") + extension + QLatin1String("/Content Type"), mime);
    340 
    341                             mime = mime.replace(QLatin1String("/"), QLatin1String("\\"));
     339                            settings.setValue(QLatin1Char('/') + extension + QLatin1String("/."), module + QLatin1Char('.') + className);
     340                            settings.setValue(QLatin1Char('/') + extension + QLatin1String("/Content Type"), mime);
     341
     342                            mime = mime.replace(QLatin1Char('/'), QLatin1Char('\\'));
    342343                            settings.setValue(QLatin1String("/MIME/Database/Content Type/") + mime + QLatin1String("/CLSID"), classId);
    343344                            settings.setValue(QLatin1String("/MIME/Database/Content Type/") + mime + QLatin1String("/Extension"), extension);
     
    352353        }
    353354    } else {
     355        if (qAxOutProcServer) {
     356            settings.remove(QLatin1String("/AppID/") + appId + QLatin1String("/."));
     357            settings.remove(QLatin1String("/AppID/") + module + QLatin1String(".EXE"));
     358        }
    354359        QStringList keys = qAxFactory()->featureList();
    355360        for (QStringList::Iterator key = keys.begin(); key != keys.end(); ++key) {
     
    359364            className = qax_clean_type(className, mo);
    360365           
    361             QString classVersion = mo ? QString(QLatin1String(mo->classInfo(mo->indexOfClassInfo("Version")).value())) : QString();
     366            QString classVersion = mo ? QString::fromLatin1(mo->classInfo(mo->indexOfClassInfo("Version")).value()) : QString();
    362367            if (classVersion.isNull())
    363368                classVersion = QLatin1String("1.0");
    364             const QString classMajorVersion = classVersion.left(classVersion.indexOf(QLatin1String(".")));
     369            const QString classMajorVersion = classVersion.left(classVersion.indexOf(QLatin1Char('.')));
    365370           
    366371            qAxFactory()->unregisterClass(*key, &settings);
    367372           
    368             settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion + QLatin1String("/CLSID/."));
    369             settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion + QLatin1String("/Insertable/."));
    370             settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion + QLatin1String("/."));
    371             settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion);
     373            settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/CLSID/."));
     374            settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/Insertable/."));
     375            settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/."));
     376            settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion);
    372377           
    373             settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String("/CLSID/."));
    374             settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String("/CurVer/."));
    375             settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String("/."));
    376             settings.remove(QLatin1String("/") + module + QLatin1String(".") + className);
     378            settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/CLSID/."));
     379            settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/CurVer/."));
     380            settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/."));
     381            settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className);
    377382           
    378383            settings.remove(QLatin1String("/CLSID/") + classId + QLatin1String("/AppID"));
     
    405410                        // Prepend '.' before extension, if required.
    406411                        extension = extension.trimmed();
    407                         if (extension[0] != QChar(QLatin1Char('.')))
    408                             extension = QLatin1String(".") + extension;
     412                        if (extension[0] != QLatin1Char('.'))
     413                            extension.prepend(QLatin1Char('.'));
    409414                    }
    410415                    if (!extension.isEmpty()) {
    411                         settings.remove(QLatin1String("/") + extension + QLatin1String("/Content Type"));
    412                         settings.remove(QLatin1String("/") + extension + QLatin1String("/."));
    413                         settings.remove(QLatin1String("/") + extension);
    414                         mime = mime.replace(QLatin1String("/"), QLatin1String("\\"));
     416                        settings.remove(QLatin1Char('/') + extension + QLatin1String("/Content Type"));
     417                        settings.remove(QLatin1Char('/') + extension + QLatin1String("/."));
     418                        settings.remove(QLatin1Char('/') + extension);
     419                        mime.replace(QLatin1Char('/'), QLatin1Char('\\'));
    415420                        settings.remove(QLatin1String("/MIME/Database/Content Type/") + mime + QLatin1String("/Extension"));
    416421                        settings.remove(QLatin1String("/MIME/Database/Content Type/") + mime + QLatin1String("/CLSID"));
     
    456461    { "QPixmap",        "IPictureDisp*" },
    457462    { "QVariant",       "VARIANT" },
    458     { "QVariantList",   "SAFEARRAY(VARIANT)" },
    459     { "QList<QVariant>","SAFEARRAY(VARIANT)" },
     463    { "QVariantList",    "SAFEARRAY(VARIANT)" },
     464    { "QList<QVariant>", "SAFEARRAY(VARIANT)" },
    460465    { "quint64",        "CY" },
    461466    { "qint64",         "CY" },
     
    465470    { "QStringList",    "SAFEARRAY(BSTR)" },
    466471    // Userdefined Qt datatypes - some not on Borland though
    467     { "QCursor",        "enum MousePointer" },
    468     { "Qt::FocusPolicy","enum FocusPolicy" },
     472    { "QCursor",         "enum MousePointer" },
     473    { "Qt::FocusPolicy", "enum FocusPolicy" },
    469474#ifndef Q_CC_BOR
    470475# if __REQUIRED_RPCNDR_H_VERSION__ >= Q_REQUIRED_RPCNDR_H_VERSION
     
    579584    if (mapping.contains(name)) {
    580585        int n = mapping.value(name);
    581         newName = name + "_" + QByteArray::number(n);
     586        newName = name + '_' + QByteArray::number(n);
    582587        mapping.insert(name, n+1);
    583588    } else {
     
    687692        QByteArray name(parameterNames.at(p));
    688693       
    689         if (type.endsWith("&")) {
     694        if (type.endsWith('&')) {
    690695            out = true;
    691696            type.truncate(type.length() - 1);
     
    693698            out = true;
    694699            type.truncate(type.length() - 1);
    695         } else if (type.endsWith("*") && !subtypes.contains(type)) {
     700        } else if (type.endsWith('*') && !subtypes.contains(type)) {
    696701            type.truncate(type.length() - 1);
    697702        }
     
    702707        type = convertTypes(type, ok);
    703708        if (!out)
    704             prototype += "[in] " + type + " ";
     709            prototype += "[in] " + type + ' ';
    705710        else
    706             prototype += "[in,out] " + type + " ";
     711            prototype += "[in,out] " + type + ' ';
    707712       
    708713        if (out)
    709             prototype += "*";
     714            prototype += '*';
    710715        if (name.isEmpty())
    711             prototype += "p" + QByteArray::number(p);
     716            prototype += 'p' + QByteArray::number(p);
    712717        else
    713718            prototype += "p_" + replaceKeyword(name);
     
    729734    int in = -1;
    730735    while (numDefArgs) {
    731         in = ptype.lastIndexOf("]", in);
     736        in = ptype.lastIndexOf(']', in);
    732737        ptype.replace(in, 1, ",optional]");
    733738        in = ptype.indexOf(' ', in) + 1;
    734739        QByteArray type = ptype.mid(in, ptype.indexOf(' ', in) - in);
    735740        if (type == "enum")
    736             type += " " + ptype.mid(in + 5, ptype.indexOf(' ', in + 5) - in - 5);
     741            type += ' ' + ptype.mid(in + 5, ptype.indexOf(' ', in + 5) - in - 5);
    737742        ptype.replace(in, type.length(), QByteArray("VARIANT /*was: ") + type + "*/");
    738743        --numDefArgs;
     
    802807            QByteArray key(enumerator.key(j));
    803808            while (enumValues.contains(key)) {
    804                 key += "_";
     809                key += '_';
    805810            }
    806811            enumValues.append(key);
     
    823828        enums.append("MousePointer");
    824829        out << "\tenum MousePointer {" << endl;
    825         out << "\t\tArrowCursor             = " << Qt::ArrowCursor << "," << endl;
    826         out << "\t\tUpArrowCursor           = " << Qt::UpArrowCursor << "," << endl;
    827         out << "\t\tCrossCursor             = " << Qt::CrossCursor << "," << endl;
    828         out << "\t\tWaitCursor              = " << Qt::WaitCursor << "," << endl;
    829         out << "\t\tIBeamCursor             = " << Qt::IBeamCursor << "," << endl;
    830         out << "\t\tSizeVerCursor           = " << Qt::SizeVerCursor << "," << endl;
    831         out << "\t\tSizeHorCursor           = " << Qt::SizeHorCursor << "," << endl;
    832         out << "\t\tSizeBDiagCursor         = " << Qt::SizeBDiagCursor << "," << endl;
    833         out << "\t\tSizeFDiagCursor         = " << Qt::SizeFDiagCursor << "," << endl;
    834         out << "\t\tSizeAllCursor           = " << Qt::SizeAllCursor << "," << endl;
    835         out << "\t\tBlankCursor             = " << Qt::BlankCursor << "," << endl;
    836         out << "\t\tSplitVCursor            = " << Qt::SplitVCursor << "," << endl;
    837         out << "\t\tSplitHCursor            = " << Qt::SplitHCursor << "," << endl;
    838         out << "\t\tPointingHandCursor      = " << Qt::PointingHandCursor << "," << endl;
    839         out << "\t\tForbiddenCursor         = " << Qt::ForbiddenCursor << "," << endl;
    840         out << "\t\tWhatsThisCursor         = " << Qt::WhatsThisCursor << "," << endl;
     830        out << "\t\tArrowCursor             = " << Qt::ArrowCursor << ',' << endl;
     831        out << "\t\tUpArrowCursor           = " << Qt::UpArrowCursor << ',' << endl;
     832        out << "\t\tCrossCursor             = " << Qt::CrossCursor << ',' << endl;
     833        out << "\t\tWaitCursor              = " << Qt::WaitCursor << ',' << endl;
     834        out << "\t\tIBeamCursor             = " << Qt::IBeamCursor << ',' << endl;
     835        out << "\t\tSizeVerCursor           = " << Qt::SizeVerCursor << ',' << endl;
     836        out << "\t\tSizeHorCursor           = " << Qt::SizeHorCursor << ',' << endl;
     837        out << "\t\tSizeBDiagCursor         = " << Qt::SizeBDiagCursor << ',' << endl;
     838        out << "\t\tSizeFDiagCursor         = " << Qt::SizeFDiagCursor << ',' << endl;
     839        out << "\t\tSizeAllCursor           = " << Qt::SizeAllCursor << ',' << endl;
     840        out << "\t\tBlankCursor             = " << Qt::BlankCursor << ',' << endl;
     841        out << "\t\tSplitVCursor            = " << Qt::SplitVCursor << ',' << endl;
     842        out << "\t\tSplitHCursor            = " << Qt::SplitHCursor << ',' << endl;
     843        out << "\t\tPointingHandCursor      = " << Qt::PointingHandCursor << ',' << endl;
     844        out << "\t\tForbiddenCursor         = " << Qt::ForbiddenCursor << ',' << endl;
     845        out << "\t\tWhatsThisCursor         = " << Qt::WhatsThisCursor << ',' << endl;
    841846        out << "\t\tBusyCursor\t= " << Qt::BusyCursor << endl;
    842847        out << "\t};" << endl << endl;
     
    845850        enums.append("FocusPolicy");
    846851        out << "\tenum FocusPolicy {" << endl;
    847         out << "\t\tNoFocus             = " << Qt::NoFocus << "," << endl;
    848         out << "\t\tTabFocus            = " << Qt::TabFocus << "," << endl;
    849         out << "\t\tClickFocus          = " << Qt::ClickFocus << "," << endl;
    850         out << "\t\tStrongFocus         = " << Qt::StrongFocus << "," << endl;
     852        out << "\t\tNoFocus             = " << Qt::NoFocus << ',' << endl;
     853        out << "\t\tTabFocus            = " << Qt::TabFocus << ',' << endl;
     854        out << "\t\tClickFocus          = " << Qt::ClickFocus << ',' << endl;
     855        out << "\t\tStrongFocus         = " << Qt::StrongFocus << ',' << endl;
    851856        out << "\t\tWheelFocus          = " << Qt::WheelFocus << endl;
    852857        out << "\t};" << endl << endl;
     
    878883            out << "\t/****** Property is of unsupported datatype" << endl;
    879884       
    880         out << "\t\t[id(" << id << ")";
     885        out << "\t\t[id(" << id << ')';
    881886        if (!property.isWritable())
    882887            out << ", readonly";
     
    887892        if (isBindable)
    888893            out << ", requestedit";
    889         if (defProp == QString::fromLatin1(name.constData()))
     894        if (defProp == QLatin1String(name))
    890895            out << ", uidefault";
    891         out << "] " << type << " " << name << ";" << endl;
     896        out << "] " << type << ' ' << name << ';' << endl;
    892897       
    893898        if (!ok)
     
    940945            outBuffer += "\t/****** Slot parameter uses unsupported datatype\n";
    941946       
    942         outBuffer += "\t\t[id(" + QString::number(id).toLatin1() + ")] " + type + " " + name + "(" + ptype + ");\n";
     947        outBuffer += "\t\t[id(" + QString::number(id).toLatin1() + ")] " + type + ' ' + name + '(' + ptype + ");\n";
    943948       
    944949        if (!ok)
     
    992997            QList<QByteArray> parameterNames(signal.parameterNames());
    993998           
    994             bool isDefault = defSignal == QString::fromLatin1(name.constData());
     999            bool isDefault = defSignal == QLatin1String(name);
    9951000            name = renameOverloads(replaceKeyword(name));
    9961001            bool ok = true;
     
    10041009                out << "\t/****** Signal parameter uses unsupported datatype" << endl;
    10051010           
    1006             out << "\t\t[id(" << id << ")";
     1011            out << "\t\t[id(" << id << ')';
    10071012            if (isDefault)
    10081013                out << ", uidefault";
    1009             out << "] void " << name << "(" << ptype << ");" << endl;
     1014            out << "] void " << name << '(' << ptype << ");" << endl;
    10101015           
    10111016            if (!ok)
     
    10321037    if (classVersion)
    10331038        out << "\t\tversion(" << classVersion << ")," << endl;
    1034     out << "\t\tuuid(" << classID << ")";
     1039    out << "\t\tuuid(" << classID << ')';
    10351040    if (control) {
    10361041        out << ", " << endl;
     
    10441049    out << "\tcoclass " << cleanClassName << endl;
    10451050    out << "\t{" << endl;
    1046     out << "\t\t[default] dispinterface I" << cleanClassName << ";" << endl;
     1051    out << "\t\t[default] dispinterface I" << cleanClassName << ';' << endl;
    10471052    if (hasEvents)
    10481053        out << "\t\t[default, source] dispinterface I" << cleanClassName << "Events;" << endl;
     
    10681073    file.remove();
    10691074   
    1070     QString filebase = QString::fromLocal8Bit(qAxModuleFilename);
    1071     filebase = filebase.left(filebase.lastIndexOf(QLatin1String(".")));
     1075    QString filebase = QString::fromWCharArray(qAxModuleFilename);
     1076    filebase = filebase.left(filebase.lastIndexOf(QLatin1Char('.')));
    10721077   
    10731078    QString appID = qAxFactory()->appID().toString().toUpper();
     
    11041109    out << "** Interface definition generated for ActiveQt project" << endl;
    11051110    out << "**" << endl;
    1106     out << "**     '" << qAxModuleFilename << "'" << endl;
     1111    out << "**     '" << QString::fromWCharArray(qAxModuleFilename) << '\'' << endl;
    11071112    out << "**" << endl;
    11081113    out << "** Created:  " << QDateTime::currentDateTime().toString() << endl;
     
    11221127    }
    11231128   
    1124     out << "[" << endl;
     1129    out << '[' << endl;
    11251130    out << "\tuuid(" << typeLibID << ")," << endl;
    11261131    out << "\tversion(" << version << ")," << endl;
    1127     out << "\thelpstring(\"" << typelib << " " << version << " Type Library\")" << endl;
    1128     out << "]" << endl;
     1132    out << "\thelpstring(\"" << typelib << ' ' << version << " Type Library\")" << endl;
     1133    out << ']' << endl;
    11291134    out << "library " << typelib << "Lib" << endl;
    1130     out << "{" << endl;
     1135    out << '{' << endl;
    11311136    out << "\timportlib(\"stdole32.tlb\");" << endl;
    11321137    out << "\timportlib(\"stdole2.tlb\");" << endl << endl;
     
    11891194        if (mo) {
    11901195            QByteArray cleanType = qax_clean_type(*key, mo).toLatin1();
    1191             out << "\tcoclass " << cleanType << ";" << endl;
     1196            out << "\tcoclass " << cleanType << ';' << endl;
    11921197            subtypes.append(cleanType);
    1193             subtypes.append(cleanType + "*");
    11941198            qRegisterMetaType(cleanType, (void**)0);
    1195             qRegisterMetaType(cleanType + "*", (void**)0);
     1199            cleanType += '*';
     1200            subtypes.append(cleanType);
     1201            qRegisterMetaType(cleanType, (void**)0);
    11961202        }
    11971203    }
     
    12261232        QByteArray cleanType = qax_clean_type(*key, mo).toLatin1();
    12271233        subtypes.append(cleanType);
    1228         subtypes.append(cleanType + "*");
     1234        subtypes.append(cleanType + '*');
    12291235        res = classIDL(o, mo, QString::fromLatin1(className.constData()), isBindable, out);
    12301236        delete o;
Note: See TracChangeset for help on using the changeset viewer.