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/container/qaxscript.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.
     
    3839****************************************************************************/
    3940
    40 #ifndef UNICODE
    41 #define UNICODE
    42 #endif
    43 
    4441#include "qaxscript.h"
    4542
     
    195192        return E_POINTER;
    196193   
    197     QAxBase *object = script->findObject(QString::fromUtf16((const ushort*)pstrName));
     194    QAxBase *object = script->findObject(QString::fromWCharArray(pstrName));
    198195    if (!object)
    199196        return TYPE_E_ELEMENTNOTFOUND;
     
    237234    if (exception)
    238235        emit script->finished(exception->wCode,
    239         QString::fromUtf16((const ushort*)exception->bstrSource),
    240         QString::fromUtf16((const ushort*)exception->bstrDescription),
    241         QString::fromUtf16((const ushort*)exception->bstrHelpFile)
     236        QString::fromWCharArray(exception->bstrSource),
     237        QString::fromWCharArray(exception->bstrDescription),
     238        QString::fromWCharArray(exception->bstrHelpFile)
    242239                            );
    243240    return S_OK;
     
    288285    HRESULT hres = error->GetSourceLineText(&bstrLineText);
    289286    if (hres == S_OK) {
    290         lineText = QString::fromUtf16((const ushort*)bstrLineText);
     287        lineText = QString::fromWCharArray(bstrLineText);
    291288        SysFreeString(bstrLineText);
    292289    }
     
    295292    SysFreeString(exception.bstrHelpFile);
    296293
    297     emit script->error(exception.wCode, QString::fromUtf16((const ushort*)exception.bstrDescription), lineNumber, lineText);
     294    emit script->error(exception.wCode, QString::fromWCharArray(exception.bstrDescription), lineNumber, lineText);
    298295   
    299296    return S_OK;
     
    464461   
    465462    CLSID clsid;
    466     HRESULT hres = CLSIDFromProgID((WCHAR*)script_language.utf16(), &clsid);
     463    HRESULT hres = CLSIDFromProgID((wchar_t*)script_language.utf16(), &clsid);
    467464    if(FAILED(hres))
    468465        return false;
     
    610607        return;
    611608   
    612     engine->AddNamedItem((WCHAR*)name.utf16(), SCRIPTITEM_ISSOURCE|SCRIPTITEM_ISVISIBLE);
     609    engine->AddNamedItem((wchar_t*)name.utf16(), SCRIPTITEM_ISSOURCE|SCRIPTITEM_ISVISIBLE);
    613610#endif
    614611}
     
    11741171   
    11751172    CLSID clsid;
    1176     HRESULT hres = CLSIDFromProgID((WCHAR*)name.utf16(), &clsid);
     1173    HRESULT hres = CLSIDFromProgID((wchar_t*)name.utf16(), &clsid);
    11771174    if (hres != S_OK)
    11781175        return false;
     
    12041201       
    12051202        allFiles += QLatin1String(" *") + engine.extension;
    1206         specialFiles += QLatin1String(";;") + engine.name + QLatin1String(" Files (*") + engine.extension + QLatin1String(")");
    1207     }
    1208     allFiles += QLatin1String(")");
     1203        specialFiles += QLatin1String(";;") + engine.name + QLatin1String(" Files (*") + engine.extension + QLatin1Char(')');
     1204    }
     1205    allFiles += QLatin1Char(')');
    12091206   
    12101207    return allFiles + specialFiles + QLatin1String(";;All Files (*.*)");
Note: See TracChangeset for help on using the changeset viewer.