summaryrefslogtreecommitdiffstats
path: root/src/activeqt
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-05-28 08:27:50 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-05-28 08:31:07 (GMT)
commitf390f9b51cf8686e9ed44f13a33c7349b9e96a09 (patch)
tree162c768769713a7215bca64daf8f2bdc75c9fbee /src/activeqt
parent0bb0699d403b7541472a72a4057ecf0ca366a7cd (diff)
downloadQt-f390f9b51cf8686e9ed44f13a33c7349b9e96a09.zip
Qt-f390f9b51cf8686e9ed44f13a33c7349b9e96a09.tar.gz
Qt-f390f9b51cf8686e9ed44f13a33c7349b9e96a09.tar.bz2
improved string operations all over the place
used character operations whenever possible better usage of QLatin1String
Diffstat (limited to 'src/activeqt')
-rw-r--r--src/activeqt/container/qaxbase.cpp76
-rw-r--r--src/activeqt/container/qaxdump.cpp38
-rw-r--r--src/activeqt/container/qaxscript.cpp4
-rw-r--r--src/activeqt/control/qaxserver.cpp183
-rw-r--r--src/activeqt/control/qaxserverbase.cpp10
-rw-r--r--src/activeqt/control/qaxservermain.cpp2
-rw-r--r--src/activeqt/shared/qaxtypes.cpp2
7 files changed, 158 insertions, 157 deletions
diff --git a/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp
index 44c3e9e..e1ffb81 100644
--- a/src/activeqt/container/qaxbase.cpp
+++ b/src/activeqt/container/qaxbase.cpp
@@ -421,7 +421,7 @@ public:
argv[p + 1] = varp + p + 1;
} else {
argv[p + 1] = const_cast<void*>(varp[p + 1].constData());
- if (ptype.endsWith("*")) {
+ if (ptype.endsWith('*')) {
argv_pointer[p + 1] = argv[p + 1];
argv[p + 1] = argv_pointer + p + 1;
}
@@ -648,7 +648,7 @@ QByteArray QAxEventSink::findProperty(DISPID dispID)
int index = mo->indexOfProperty(propname);
const QMetaProperty prop = mo->property(index);
propsignal += prop.typeName();
- propsignal += ")";
+ propsignal += ')';
addProperty(dispID, propname, propsignal);
return propname;
@@ -1661,7 +1661,7 @@ private:
void addProperty(const QByteArray &type, const QByteArray &name, uint flags)
{
QByteArray propertyType(type);
- if (propertyType.endsWith("&"))
+ if (propertyType.endsWith('&'))
propertyType.chop(1);
Property &prop = property_list[name];
@@ -2046,11 +2046,11 @@ QByteArray MetaObjectGenerator::guessTypes(const TYPEDESC &tdesc, ITypeInfo *inf
case VT_INT:
case VT_UINT:
case VT_CY:
- str += "&";
+ str += '&';
break;
case VT_PTR:
if (str == "QFont" || str == "QPixmap") {
- str += "&";
+ str += '&';
break;
} else if (str == "void*") {
str = "void **";
@@ -2059,19 +2059,19 @@ QByteArray MetaObjectGenerator::guessTypes(const TYPEDESC &tdesc, ITypeInfo *inf
// FALLTHROUGH
default:
if (str == "QColor")
- str += "&";
+ str += '&';
else if (str == "QDateTime")
- str += "&";
+ str += '&';
else if (str == "QVariantList")
- str += "&";
+ str += '&';
else if (str == "QByteArray")
- str += "&";
+ str += '&';
else if (str == "QStringList")
- str += "&";
+ str += '&';
else if (!str.isEmpty() && hasEnum(str))
- str += "&";
+ str += '&';
else if (!str.isEmpty() && str != "QFont" && str != "QPixmap" && str != "QVariant")
- str += "*";
+ str += '*';
}
break;
case VT_SAFEARRAY:
@@ -2089,7 +2089,7 @@ QByteArray MetaObjectGenerator::guessTypes(const TYPEDESC &tdesc, ITypeInfo *inf
default:
str = guessTypes(tdesc.lpadesc->tdescElem, info, function);
if (!str.isEmpty())
- str = "QList<" + str + ">";
+ str = "QList<" + str + '>';
break;
}
break;
@@ -2097,7 +2097,7 @@ QByteArray MetaObjectGenerator::guessTypes(const TYPEDESC &tdesc, ITypeInfo *inf
str = guessTypes(tdesc.lpadesc->tdescElem, info, function);
if (!str.isEmpty()) {
for (int index = 0; index < tdesc.lpadesc->cDims; ++index)
- str += "[" + QByteArray::number((int)tdesc.lpadesc->rgbounds[index].cElements) + "]";
+ str += '[' + QByteArray::number((int)tdesc.lpadesc->rgbounds[index].cElements) + ']';
}
break;
case VT_USERDEFINED:
@@ -2114,7 +2114,7 @@ QByteArray MetaObjectGenerator::guessTypes(const TYPEDESC &tdesc, ITypeInfo *inf
}
if (tdesc.vt & VT_BYREF)
- str += "&";
+ str += '&';
str.replace("&*", "**");
return str;
@@ -2141,7 +2141,7 @@ void MetaObjectGenerator::readClassInfo()
if (d->useClassInfo && !hasClassInfo("CoClass")) {
QString coClassIDstr = iidnames.value(QLatin1String("/CLSID/") + coClassID + QLatin1String("/Default"), coClassID).toString();
addClassInfo("CoClass", coClassIDstr.isEmpty() ? coClassID.toLatin1() : coClassIDstr.toLatin1());
- QByteArray version = QByteArray::number(typeattr->wMajorVerNum) + "." + QByteArray::number(typeattr->wMinorVerNum);
+ QByteArray version = QByteArray::number(typeattr->wMajorVerNum) + '.' + QByteArray::number(typeattr->wMinorVerNum);
if (version != "0.0")
addClassInfo("Version", version);
}
@@ -2174,7 +2174,7 @@ void MetaObjectGenerator::readClassInfo()
while (tlfile.isEmpty() && vit != versions.end()) {
QString version = *vit;
++vit;
- tlfile = controls.value(QLatin1String("/") + version + QLatin1String("/0/win32/.")).toString();
+ tlfile = controls.value(QLatin1Char('/') + version + QLatin1String("/0/win32/.")).toString();
}
controls.endGroup();
} else {
@@ -2347,7 +2347,7 @@ void MetaObjectGenerator::addChangedSignal(const QByteArray &function, const QBy
// generate changed signal
QByteArray signalName(function);
signalName += "Changed";
- QByteArray signalProto = signalName + "(" + replaceType(type) + ")";
+ QByteArray signalProto = signalName + '(' + replaceType(type) + ')';
if (!hasSignal(signalProto))
addSignal(signalProto, function);
if (eventSink)
@@ -2364,7 +2364,7 @@ void MetaObjectGenerator::addSetterSlot(const QByteArray &property)
set = "set";
prototype[0] = toupper(prototype[0]);
}
- prototype = set + prototype + "(" + propertyType(property) + ")";
+ prototype = set + prototype + '(' + propertyType(property) + ')';
if (!hasSlot(prototype))
addSlot(0, prototype, property);
}
@@ -2381,7 +2381,7 @@ QByteArray MetaObjectGenerator::createPrototype(FUNCDESC *funcdesc, ITypeInfo *t
type = guessTypes(funcdesc->lprgelemdescParam->tdesc, typeinfo, function);
}
- prototype = function + "(";
+ prototype = function + '(';
if (funcdesc->invkind == INVOKE_FUNC && type == hresult)
type = 0;
@@ -2395,7 +2395,7 @@ QByteArray MetaObjectGenerator::createPrototype(FUNCDESC *funcdesc, ITypeInfo *t
QByteArray ptype = guessTypes(tdesc, typeinfo, function);
if (pdesc.wParamFlags & PARAMFLAG_FRETVAL) {
- if (ptype.endsWith("&")) {
+ if (ptype.endsWith('&')) {
ptype.truncate(ptype.length() - 1);
} else if (ptype.endsWith("**")) {
ptype.truncate(ptype.length() - 1);
@@ -2403,8 +2403,8 @@ QByteArray MetaObjectGenerator::createPrototype(FUNCDESC *funcdesc, ITypeInfo *t
type = ptype;
} else {
prototype += ptype;
- if (pdesc.wParamFlags & PARAMFLAG_FOUT && !ptype.endsWith("&") && !ptype.endsWith("**"))
- prototype += "&";
+ if (pdesc.wParamFlags & PARAMFLAG_FOUT && !ptype.endsWith('&') && !ptype.endsWith("**"))
+ prototype += '&';
if (optional || pdesc.wParamFlags & PARAMFLAG_FOPT)
paramName += "=0";
else if (pdesc.wParamFlags & PARAMFLAG_FHASDEFAULT) {
@@ -2414,22 +2414,22 @@ QByteArray MetaObjectGenerator::createPrototype(FUNCDESC *funcdesc, ITypeInfo *t
parameters << paramName;
}
if (p < funcdesc->cParams && !(pdesc.wParamFlags & PARAMFLAG_FRETVAL))
- prototype += ",";
+ prototype += ',';
}
if (!prototype.isEmpty()) {
- if (prototype.right(1) == ",") {
+ if (prototype.endsWith(',')) {
if (funcdesc->invkind == INVOKE_PROPERTYPUT && p == funcdesc->cParams) {
TYPEDESC tdesc = funcdesc->lprgelemdescParam[p-1].tdesc;
QByteArray ptype = guessTypes(tdesc, typeinfo, function);
prototype += ptype;
- prototype += ")";
+ prototype += ')';
parameters << "rhs";
} else {
prototype[prototype.length()-1] = ')';
}
} else {
- prototype += ")";
+ prototype += ')';
}
}
@@ -2577,11 +2577,11 @@ void MetaObjectGenerator::readFuncsInfo(ITypeInfo *typeinfo, ushort nFuncs)
if (defargs) {
parameters.takeLast();
- int lastParam = prototype.lastIndexOf(",");
+ int lastParam = prototype.lastIndexOf(',');
if (lastParam == -1)
- lastParam = prototype.indexOf("(") + 1;
+ lastParam = prototype.indexOf('(') + 1;
prototype.truncate(lastParam);
- prototype += ")";
+ prototype += ')';
}
} while (defargs);
}
@@ -2597,8 +2597,8 @@ void MetaObjectGenerator::readFuncsInfo(ITypeInfo *typeinfo, ushort nFuncs)
QString strDocu = QString::fromUtf16((const ushort*)bstrDocu);
SysFreeString(bstrDocu);
if (!!strDocu)
- desc += "[" + strDocu + "]";
- desc += "\n";
+ desc += '[' + strDocu + ']';
+ desc += '\n';
#endif
typeinfo->ReleaseFuncDesc(funcdesc);
}
@@ -2680,8 +2680,8 @@ void MetaObjectGenerator::readVarsInfo(ITypeInfo *typeinfo, ushort nVars)
QString strDocu = QString::fromUtf16((const ushort*)bstrDocu);
SysFreeString(bstrDocu);
if (!!strDocu)
- desc += "[" + strDocu + "]";
- desc += "\n";
+ desc += '[' + strDocu + ']';
+ desc += '\n';
#endif
typeinfo->ReleaseVarDesc(vardesc);
}
@@ -2827,8 +2827,8 @@ void MetaObjectGenerator::readEventInterface(ITypeInfo *eventinfo, IConnectionPo
QString strDocu = QString::fromUtf16((const ushort*)bstrDocu);
SysFreeString(bstrDocu);
if (!!strDocu)
- desc += "[" + strDocu + "]";
- desc += "\n";
+ desc += '[' + strDocu + ']';
+ desc += '\n';
#endif
eventinfo->ReleaseFuncDesc(funcdesc);
}
@@ -4398,8 +4398,8 @@ QVariant QAxBase::asVariant() const
cn = cn.mid(cn.lastIndexOf(':') + 1);
QObject *object = qObject();
if (QMetaType::type(cn))
- qvar = QVariant(qRegisterMetaType<QObject*>(cn + "*"), &object);
-// qVariantSetValue(qvar, qObject(), cn + "*");
+ qvar = QVariant(qRegisterMetaType<QObject*>(cn + '*'), &object);
+// qVariantSetValue(qvar, qObject(), cn + '*');
}
return qvar;
diff --git a/src/activeqt/container/qaxdump.cpp b/src/activeqt/container/qaxdump.cpp
index 62ef0a4..c3218a9 100644
--- a/src/activeqt/container/qaxdump.cpp
+++ b/src/activeqt/container/qaxdump.cpp
@@ -94,14 +94,14 @@ static QByteArray namedPrototype(const QList<QByteArray> &parameterTypes, const
prototype += type;
if (p < parameterNames.count())
- prototype += " " + parameterNames.at(p);
+ prototype += ' ' + parameterNames.at(p);
if (numDefArgs >= parameterTypes.count() - p)
prototype += " = 0";
if (p < parameterTypes.count() - 1)
prototype += ", ";
}
- prototype += ")";
+ prototype += ')';
return prototype;
}
@@ -196,8 +196,8 @@ QString qax_generateDocumentation(QAxBase *that)
prototype = namedPrototype(slot.parameterTypes(), slot.parameterNames());
QString detail = QString::fromLatin1("<h3><a name=") + QString::fromLatin1(name.constData()) + QLatin1String("></a>") +
- QString::fromLatin1(returntype.constData()) + QLatin1String(" ") +
- QString::fromLatin1(name.constData()) + QLatin1String(" ") +
+ QLatin1String(returntype.constData()) + QLatin1Char(' ') +
+ QLatin1String(name.constData()) + QLatin1Char(' ') +
QString::fromLatin1(prototype.constData()) + QLatin1String("<tt> [slot]</tt></h3>\n");
prototype = namedPrototype(slot.parameterTypes(), QList<QByteArray>());
detail += docuFromName(typeInfo, QString::fromLatin1(name.constData()));
@@ -220,14 +220,14 @@ QString qax_generateDocumentation(QAxBase *that)
returntype = "QAxObject *";
}
if (returntype != "void")
- detail += QString::fromLatin1(returntype.constData()) + QLatin1String(" result = ");
- detail += QLatin1String("object->") + QString::fromLatin1(functionToCall.constData()) +
- QLatin1String("(\"" + name + prototype + "\"");
+ detail += QLatin1String(returntype.constData()) + QLatin1String(" result = ");
+ detail += QLatin1String("object->") + QLatin1String(functionToCall.constData()) +
+ QLatin1String("(\"" + name + prototype + '\"');
if (hasParams)
detail += QLatin1String(", params");
- detail += QLatin1String(")");
+ detail += QLatin1Char(')');
if (returntype != "void" && returntype != "QAxObject *" && returntype != "QVariant")
- detail += QLatin1String(".") + QString::fromLatin1(toType(returntype));
+ detail += QLatin1Char('.') + QLatin1String(toType(returntype));
detail += QLatin1String(";</pre>\n");
} else {
detail += QLatin1String("<p>This function has parameters of unsupported types and cannot be called directly.");
@@ -262,9 +262,9 @@ QString qax_generateDocumentation(QAxBase *that)
QByteArray name = signature.left(signature.indexOf('('));
stream << "<li>void <a href=\"#" << name << "\"><b>" << name << "</b></a>" << prototype << ";</li>" << endl;
- QString detail = QLatin1String("<h3><a name=") + QString::fromLatin1(name.constData()) + QLatin1String("></a>void ") +
- QString::fromLatin1(name.constData()) + QLatin1String(" ") +
- QString::fromLatin1(prototype.constData()) + QLatin1String("<tt> [signal]</tt></h3>\n");
+ QString detail = QLatin1String("<h3><a name=") + QLatin1String(name.constData()) + QLatin1String("></a>void ") +
+ QLatin1String(name.constData()) + QLatin1Char(' ') +
+ QLatin1String(prototype.constData()) + QLatin1String("<tt> [signal]</tt></h3>\n");
if (typeLib) {
interCount = 0;
do {
@@ -311,8 +311,8 @@ QString qax_generateDocumentation(QAxBase *that)
stream << "<li>" << type << " <a href=\"#" << name << "\"><b>" << name << "</b></a>;</li>" << endl;
QString detail = QLatin1String("<h3><a name=") + QString::fromLatin1(name.constData()) + QLatin1String("></a>") +
- QString::fromLatin1(type.constData()) +
- QLatin1String(" ") + QString::fromLatin1(name.constData()) + QLatin1String("</h3>\n");
+ QLatin1String(type.constData()) +
+ QLatin1Char(' ') + QLatin1String(name.constData()) + QLatin1String("</h3>\n");
detail += docuFromName(typeInfo, QString::fromLatin1(name));
QVariant::Type vartype = QVariant::nameToType(type);
if (!prop.isReadable())
@@ -326,14 +326,14 @@ QString qax_generateDocumentation(QAxBase *that)
if (prop.isEnumType())
detail += QLatin1String("\tint val = ");
else
- detail += QLatin1String("\t") + QString::fromLatin1(type.constData()) + QLatin1String(" val = ");
- detail += QLatin1String("object->property(\"") + QString::fromLatin1(name.constData()) +
- QLatin1String("\").") + QString::fromLatin1(toType(type).constData()) + QLatin1String(";\n");
+ detail += QLatin1Char('\t') + QLatin1String(type.constData()) + QLatin1String(" val = ");
+ detail += QLatin1String("object->property(\"") + QLatin1String(name.constData()) +
+ QLatin1String("\").") + QLatin1String(toType(type).constData()) + QLatin1String(";\n");
detail += QLatin1String("</pre>\n");
} else if (type == "IDispatch*" || type == "IUnknown*") {
detail += QLatin1String("<p>Get the subobject using querySubObject:<pre>\n");
- detail += QLatin1String("\tQAxObject *") + QString::fromLatin1(name.constData()) +
- QLatin1String(" = object->querySubObject(\"") + QString::fromLatin1(name.constData()) + QLatin1String("\");\n");
+ detail += QLatin1String("\tQAxObject *") + QLatin1String(name.constData()) +
+ QLatin1String(" = object->querySubObject(\"") + QLatin1String(name.constData()) + QLatin1String("\");\n");
detail += QLatin1String("</pre>\n");
} else {
detail += QLatin1String("<p>This property is of an unsupported type.\n");
diff --git a/src/activeqt/container/qaxscript.cpp b/src/activeqt/container/qaxscript.cpp
index c69fea0..8f8186a 100644
--- a/src/activeqt/container/qaxscript.cpp
+++ b/src/activeqt/container/qaxscript.cpp
@@ -1203,9 +1203,9 @@ QString QAxScriptManager::scriptFileFilter()
continue;
allFiles += QLatin1String(" *") + engine.extension;
- specialFiles += QLatin1String(";;") + engine.name + QLatin1String(" Files (*") + engine.extension + QLatin1String(")");
+ specialFiles += QLatin1String(";;") + engine.name + QLatin1String(" Files (*") + engine.extension + QLatin1Char(')');
}
- allFiles += QLatin1String(")");
+ allFiles += QLatin1Char(')');
return allFiles + specialFiles + QLatin1String(";;All Files (*.*)");
}
diff --git a/src/activeqt/control/qaxserver.cpp b/src/activeqt/control/qaxserver.cpp
index d919382..1771293 100644
--- a/src/activeqt/control/qaxserver.cpp
+++ b/src/activeqt/control/qaxserver.cpp
@@ -90,7 +90,7 @@ QAxFactory *qAxFactory()
QStringList keys(qax_factory->featureList());
for (int i = 0; i < keys.count(); ++i) {
QString key(keys.at(i));
- qRegisterMetaType((key + QLatin1String("*")).toLatin1(), (void**)0);
+ qRegisterMetaType((key + QLatin1Char('*')).toLatin1(), (void**)0);
}
}
return qax_factory;
@@ -208,9 +208,9 @@ HRESULT UpdateRegistry(BOOL bRegister)
{
qAxIsServer = false;
QString file = QString::fromLocal8Bit(qAxModuleFilename);
- QString path = file.left(file.lastIndexOf(QLatin1String("\\"))+1);
+ QString path = file.left(file.lastIndexOf(QLatin1Char('\\'))+1);
QString module = file.right(file.length() - path.length());
- module = module.left(module.lastIndexOf(QLatin1String(".")));
+ module = module.left(module.lastIndexOf(QLatin1Char('.')));
const QString appId = qAxFactory()->appID().toString().toUpper();
const QString libId = qAxFactory()->typeLibID().toString().toUpper();
@@ -226,7 +226,7 @@ HRESULT UpdateRegistry(BOOL bRegister)
DWORD major = libAttr->wMajorVerNum;
DWORD minor = libAttr->wMinorVerNum;
- typeLibVersion = QString::number((uint)major) + QLatin1String(".") + QString::number((uint)minor);
+ typeLibVersion = QString::number((uint)major) + QLatin1Char('.') + QString::number((uint)minor);
if (bRegister)
RegisterTypeLib(qAxTypeLibrary, (TCHAR*)libFile.utf16(), 0);
@@ -271,12 +271,12 @@ HRESULT UpdateRegistry(BOOL bRegister)
className = qax_clean_type(className, mo);
if (object) { // don't register subobject classes
- QString classVersion = mo ? QString(QLatin1String(mo->classInfo(mo->indexOfClassInfo("Version")).value())) : QString();
+ QString classVersion = mo ? QString::fromLatin1(mo->classInfo(mo->indexOfClassInfo("Version")).value()) : QString();
if (classVersion.isNull())
classVersion = QLatin1String("1.0");
bool insertable = mo && !qstricmp(mo->classInfo(mo->indexOfClassInfo("Insertable")).value(), "yes");
bool control = object->isWidgetType();
- const QString classMajorVersion = classVersion.left(classVersion.indexOf(QLatin1String(".")));
+ const QString classMajorVersion = classVersion.left(classVersion.indexOf(QLatin1Char('.')));
uint olemisc = OLEMISC_SETCLIENTSITEFIRST
|OLEMISC_ACTIVATEWHENVISIBLE
|OLEMISC_INSIDEOUT
@@ -287,17 +287,17 @@ HRESULT UpdateRegistry(BOOL bRegister)
else if (qFindChild<QMenuBar*>(object) && !qax_disable_inplaceframe)
olemisc |= OLEMISC_WANTSTOMENUMERGE;
- settings.setValue(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion + QLatin1String("/."), className + QLatin1String(" Class"));
- settings.setValue(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion + QLatin1String("/CLSID/."), classId);
+ settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/."), className + QLatin1String(" Class"));
+ settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/CLSID/."), classId);
if (insertable)
- settings.setValue(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion + QLatin1String("/Insertable/."), QVariant(QLatin1String("")));
+ settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/Insertable/."), QVariant(QLatin1String("")));
- settings.setValue(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String("/."), className + QLatin1String(" Class"));
- settings.setValue(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String("/CLSID/."), classId);
- settings.setValue(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String("/CurVer/."), module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion);
+ settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/."), className + QLatin1String(" Class"));
+ settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/CLSID/."), classId);
+ settings.setValue(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/CurVer/."), module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion);
settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/."), className + QLatin1String(" Class"));
- if (file.right(3).toLower() == QLatin1String("exe"))
+ if (file.endsWith(QLatin1String("exe"), Qt::CaseInsensitive))
settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/AppID"), appId);
if (control)
settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/Control/."), QVariant(QLatin1String("")));
@@ -307,15 +307,15 @@ HRESULT UpdateRegistry(BOOL bRegister)
settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/InProcServer32/."), file);
else
settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/LocalServer32/."),
- QLatin1String("\"") + file + QLatin1String("\" -activex"));
+ QLatin1Char('\"') + file + QLatin1String("\" -activex"));
settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/MiscStatus/."), control ? QLatin1String("1") : QLatin1String("0"));
settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/MiscStatus/1/."), QString::number(olemisc));
settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/Programmable/."), QVariant(QLatin1String("")));
- settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/ToolboxBitmap32/."), QLatin1String("\"") +
+ settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/ToolboxBitmap32/."), QLatin1Char('\"') +
file + QLatin1String("\", 101"));
settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/TypeLib/."), libId); settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/Version/."), classVersion);
- settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/VersionIndependentProgID/."), module + QLatin1String(".") + className);
- settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/ProgID/."), module + QLatin1String(".") + className + QLatin1String(".") + classVersion.left(classVersion.indexOf(QLatin1Char('.'))));
+ settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/VersionIndependentProgID/."), module + QLatin1Char('.') + className);
+ settings.setValue(QLatin1String("/CLSID/") + classId + QLatin1String("/ProgID/."), module + QLatin1Char('.') + className + QLatin1Char('.') + classVersion.left(classVersion.indexOf(QLatin1Char('.'))));
QString mime = QLatin1String(mo->classInfo(mo->indexOfClassInfo("MIME")).value());
if (!mime.isEmpty()) {
@@ -330,15 +330,15 @@ HRESULT UpdateRegistry(BOOL bRegister)
mime = mime.left(mime.length() - extension.length() - 1);
// Prepend '.' before extension, if required.
extension = extension.trimmed();
- if (extension[0] != QChar(QLatin1Char('.')))
- extension = QLatin1String(".") + extension;
+ if (extension[0] != QLatin1Char('.'))
+ extension = QLatin1Char('.') + extension;
}
if (!extension.isEmpty()) {
- settings.setValue(QLatin1String("/") + extension + QLatin1String("/."), module + QLatin1String(".") + className);
- settings.setValue(QLatin1String("/") + extension + QLatin1String("/Content Type"), mime);
+ settings.setValue(QLatin1Char('/') + extension + QLatin1String("/."), module + QLatin1Char('.') + className);
+ settings.setValue(QLatin1Char('/') + extension + QLatin1String("/Content Type"), mime);
- mime = mime.replace(QLatin1String("/"), QLatin1String("\\"));
+ mime = mime.replace(QLatin1Char('/'), QLatin1Char('\\'));
settings.setValue(QLatin1String("/MIME/Database/Content Type/") + mime + QLatin1String("/CLSID"), classId);
settings.setValue(QLatin1String("/MIME/Database/Content Type/") + mime + QLatin1String("/Extension"), extension);
}
@@ -358,22 +358,22 @@ HRESULT UpdateRegistry(BOOL bRegister)
const QString classId = qAxFactory()->classID(className).toString().toUpper();
className = qax_clean_type(className, mo);
- QString classVersion = mo ? QString(QLatin1String(mo->classInfo(mo->indexOfClassInfo("Version")).value())) : QString();
+ QString classVersion = mo ? QString::fromLatin1(mo->classInfo(mo->indexOfClassInfo("Version")).value()) : QString();
if (classVersion.isNull())
classVersion = QLatin1String("1.0");
- const QString classMajorVersion = classVersion.left(classVersion.indexOf(QLatin1String(".")));
+ const QString classMajorVersion = classVersion.left(classVersion.indexOf(QLatin1Char('.')));
qAxFactory()->unregisterClass(*key, &settings);
- settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion + QLatin1String("/CLSID/."));
- settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion + QLatin1String("/Insertable/."));
- settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion + QLatin1String("/."));
- settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String(".") + classMajorVersion);
+ settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/CLSID/."));
+ settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/Insertable/."));
+ settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion + QLatin1String("/."));
+ settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1Char('.') + classMajorVersion);
- settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String("/CLSID/."));
- settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String("/CurVer/."));
- settings.remove(QLatin1String("/") + module + QLatin1String(".") + className + QLatin1String("/."));
- settings.remove(QLatin1String("/") + module + QLatin1String(".") + className);
+ settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/CLSID/."));
+ settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/CurVer/."));
+ settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className + QLatin1String("/."));
+ settings.remove(QLatin1Char('/') + module + QLatin1Char('.') + className);
settings.remove(QLatin1String("/CLSID/") + classId + QLatin1String("/AppID"));
settings.remove(QLatin1String("/CLSID/") + classId + QLatin1String("/Control/."));
@@ -404,14 +404,14 @@ HRESULT UpdateRegistry(BOOL bRegister)
mime = mime.left(mime.length() - extension.length() - 1);
// Prepend '.' before extension, if required.
extension = extension.trimmed();
- if (extension[0] != QChar(QLatin1Char('.')))
- extension = QLatin1String(".") + extension;
+ if (extension[0] != QLatin1Char('.'))
+ extension.prepend(QLatin1Char('.'));
}
if (!extension.isEmpty()) {
- settings.remove(QLatin1String("/") + extension + QLatin1String("/Content Type"));
- settings.remove(QLatin1String("/") + extension + QLatin1String("/."));
- settings.remove(QLatin1String("/") + extension);
- mime = mime.replace(QLatin1String("/"), QLatin1String("\\"));
+ settings.remove(QLatin1Char('/') + extension + QLatin1String("/Content Type"));
+ settings.remove(QLatin1Char('/') + extension + QLatin1String("/."));
+ settings.remove(QLatin1Char('/') + extension);
+ mime.replace(QLatin1Char('/'), QLatin1Char('\\'));
settings.remove(QLatin1String("/MIME/Database/Content Type/") + mime + QLatin1String("/Extension"));
settings.remove(QLatin1String("/MIME/Database/Content Type/") + mime + QLatin1String("/CLSID"));
settings.remove(QLatin1String("/MIME/Database/Content Type/") + mime + QLatin1String("/."));
@@ -455,8 +455,8 @@ static const char* const type_map[][2] =
{ "QFont", "IFontDisp*" },
{ "QPixmap", "IPictureDisp*" },
{ "QVariant", "VARIANT" },
- { "QVariantList", "SAFEARRAY(VARIANT)" },
- { "QList<QVariant>","SAFEARRAY(VARIANT)" },
+ { "QVariantList", "SAFEARRAY(VARIANT)" },
+ { "QList<QVariant>", "SAFEARRAY(VARIANT)" },
{ "quint64", "CY" },
{ "qint64", "CY" },
{ "qulonglong", "CY" },
@@ -464,8 +464,8 @@ static const char* const type_map[][2] =
{ "QByteArray", "SAFEARRAY(BYTE)" },
{ "QStringList", "SAFEARRAY(BSTR)" },
// Userdefined Qt datatypes - some not on Borland though
- { "QCursor", "enum MousePointer" },
- { "Qt::FocusPolicy","enum FocusPolicy" },
+ { "QCursor", "enum MousePointer" },
+ { "Qt::FocusPolicy", "enum FocusPolicy" },
#ifndef Q_CC_BOR
# if __REQUIRED_RPCNDR_H_VERSION__ >= Q_REQUIRED_RPCNDR_H_VERSION
{ "QRect", "struct QRect" },
@@ -578,7 +578,7 @@ static QByteArray renameOverloads(const QByteArray &name)
int n = mapping.value(name);
if (mapping.contains(name)) {
int n = mapping.value(name);
- newName = name + "_" + QByteArray::number(n);
+ newName = name + '_' + QByteArray::number(n);
mapping.insert(name, n+1);
} else {
mapping.insert(name, 1);
@@ -686,13 +686,13 @@ static QByteArray prototype(const QList<QByteArray> &parameterTypes, const QList
QByteArray type(parameterTypes.at(p));
QByteArray name(parameterNames.at(p));
- if (type.endsWith("&")) {
+ if (type.endsWith('&')) {
out = true;
type.truncate(type.length() - 1);
} else if (type.endsWith("**")) {
out = true;
type.truncate(type.length() - 1);
- } else if (type.endsWith("*") && !subtypes.contains(type)) {
+ } else if (type.endsWith('*') && !subtypes.contains(type)) {
type.truncate(type.length() - 1);
}
if (type.isEmpty()) {
@@ -701,14 +701,14 @@ static QByteArray prototype(const QList<QByteArray> &parameterTypes, const QList
}
type = convertTypes(type, ok);
if (!out)
- prototype += "[in] " + type + " ";
+ prototype += "[in] " + type + ' ';
else
- prototype += "[in,out] " + type + " ";
+ prototype += "[in,out] " + type + ' ';
if (out)
- prototype += "*";
+ prototype += '*';
if (name.isEmpty())
- prototype += "p" + QByteArray::number(p);
+ prototype += 'p' + QByteArray::number(p);
else
prototype += "p_" + replaceKeyword(name);
@@ -728,12 +728,12 @@ static QByteArray addDefaultArguments(const QByteArray &prototype, int numDefArg
QByteArray ptype(prototype);
int in = -1;
while (numDefArgs) {
- in = ptype.lastIndexOf("]", in);
+ in = ptype.lastIndexOf(']', in);
ptype.replace(in, 1, ",optional]");
in = ptype.indexOf(' ', in) + 1;
QByteArray type = ptype.mid(in, ptype.indexOf(' ', in) - in);
if (type == "enum")
- type += " " + ptype.mid(in + 5, ptype.indexOf(' ', in + 5) - in - 5);
+ type += ' ' + ptype.mid(in + 5, ptype.indexOf(' ', in + 5) - in - 5);
ptype.replace(in, type.length(), QByteArray("VARIANT /*was: ") + type + "*/");
--numDefArgs;
}
@@ -801,7 +801,7 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN
for (int j = 0; j < enumerator.keyCount(); ++j) {
QByteArray key(enumerator.key(j));
while (enumValues.contains(key)) {
- key += "_";
+ key += '_';
}
enumValues.append(key);
uint value = (uint)enumerator.value(j);
@@ -822,32 +822,32 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN
if (!enums.contains("MousePointer")) {
enums.append("MousePointer");
out << "\tenum MousePointer {" << endl;
- out << "\t\tArrowCursor = " << Qt::ArrowCursor << "," << endl;
- out << "\t\tUpArrowCursor = " << Qt::UpArrowCursor << "," << endl;
- out << "\t\tCrossCursor = " << Qt::CrossCursor << "," << endl;
- out << "\t\tWaitCursor = " << Qt::WaitCursor << "," << endl;
- out << "\t\tIBeamCursor = " << Qt::IBeamCursor << "," << endl;
- out << "\t\tSizeVerCursor = " << Qt::SizeVerCursor << "," << endl;
- out << "\t\tSizeHorCursor = " << Qt::SizeHorCursor << "," << endl;
- out << "\t\tSizeBDiagCursor = " << Qt::SizeBDiagCursor << "," << endl;
- out << "\t\tSizeFDiagCursor = " << Qt::SizeFDiagCursor << "," << endl;
- out << "\t\tSizeAllCursor = " << Qt::SizeAllCursor << "," << endl;
- out << "\t\tBlankCursor = " << Qt::BlankCursor << "," << endl;
- out << "\t\tSplitVCursor = " << Qt::SplitVCursor << "," << endl;
- out << "\t\tSplitHCursor = " << Qt::SplitHCursor << "," << endl;
- out << "\t\tPointingHandCursor = " << Qt::PointingHandCursor << "," << endl;
- out << "\t\tForbiddenCursor = " << Qt::ForbiddenCursor << "," << endl;
- out << "\t\tWhatsThisCursor = " << Qt::WhatsThisCursor << "," << endl;
+ out << "\t\tArrowCursor = " << Qt::ArrowCursor << ',' << endl;
+ out << "\t\tUpArrowCursor = " << Qt::UpArrowCursor << ',' << endl;
+ out << "\t\tCrossCursor = " << Qt::CrossCursor << ',' << endl;
+ out << "\t\tWaitCursor = " << Qt::WaitCursor << ',' << endl;
+ out << "\t\tIBeamCursor = " << Qt::IBeamCursor << ',' << endl;
+ out << "\t\tSizeVerCursor = " << Qt::SizeVerCursor << ',' << endl;
+ out << "\t\tSizeHorCursor = " << Qt::SizeHorCursor << ',' << endl;
+ out << "\t\tSizeBDiagCursor = " << Qt::SizeBDiagCursor << ',' << endl;
+ out << "\t\tSizeFDiagCursor = " << Qt::SizeFDiagCursor << ',' << endl;
+ out << "\t\tSizeAllCursor = " << Qt::SizeAllCursor << ',' << endl;
+ out << "\t\tBlankCursor = " << Qt::BlankCursor << ',' << endl;
+ out << "\t\tSplitVCursor = " << Qt::SplitVCursor << ',' << endl;
+ out << "\t\tSplitHCursor = " << Qt::SplitHCursor << ',' << endl;
+ out << "\t\tPointingHandCursor = " << Qt::PointingHandCursor << ',' << endl;
+ out << "\t\tForbiddenCursor = " << Qt::ForbiddenCursor << ',' << endl;
+ out << "\t\tWhatsThisCursor = " << Qt::WhatsThisCursor << ',' << endl;
out << "\t\tBusyCursor\t= " << Qt::BusyCursor << endl;
out << "\t};" << endl << endl;
}
if (!enums.contains("FocusPolicy")) {
enums.append("FocusPolicy");
out << "\tenum FocusPolicy {" << endl;
- out << "\t\tNoFocus = " << Qt::NoFocus << "," << endl;
- out << "\t\tTabFocus = " << Qt::TabFocus << "," << endl;
- out << "\t\tClickFocus = " << Qt::ClickFocus << "," << endl;
- out << "\t\tStrongFocus = " << Qt::StrongFocus << "," << endl;
+ out << "\t\tNoFocus = " << Qt::NoFocus << ',' << endl;
+ out << "\t\tTabFocus = " << Qt::TabFocus << ',' << endl;
+ out << "\t\tClickFocus = " << Qt::ClickFocus << ',' << endl;
+ out << "\t\tStrongFocus = " << Qt::StrongFocus << ',' << endl;
out << "\t\tWheelFocus = " << Qt::WheelFocus << endl;
out << "\t};" << endl << endl;
}
@@ -877,7 +877,7 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN
if (!ok)
out << "\t/****** Property is of unsupported datatype" << endl;
- out << "\t\t[id(" << id << ")";
+ out << "\t\t[id(" << id << ')';
if (!property.isWritable())
out << ", readonly";
if (isBindable && property.isScriptable(o))
@@ -886,9 +886,9 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN
out << ", nonbrowsable";
if (isBindable)
out << ", requestedit";
- if (defProp == QString::fromLatin1(name.constData()))
+ if (defProp == QLatin1String(name))
out << ", uidefault";
- out << "] " << type << " " << name << ";" << endl;
+ out << "] " << type << ' ' << name << ';' << endl;
if (!ok)
out << "\t******/" << endl;
@@ -939,7 +939,7 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN
if (!ok)
outBuffer += "\t/****** Slot parameter uses unsupported datatype\n";
- outBuffer += "\t\t[id(" + QString::number(id).toLatin1() + ")] " + type + " " + name + "(" + ptype + ");\n";
+ outBuffer += "\t\t[id(" + QString::number(id).toLatin1() + ")] " + type + ' ' + name + '(' + ptype + ");\n";
if (!ok)
outBuffer += "\t******/\n";
@@ -991,7 +991,7 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN
QList<QByteArray> parameterTypes(signal.parameterTypes());
QList<QByteArray> parameterNames(signal.parameterNames());
- bool isDefault = defSignal == QString::fromLatin1(name.constData());
+ bool isDefault = defSignal == QLatin1String(name);
name = renameOverloads(replaceKeyword(name));
bool ok = true;
@@ -1003,10 +1003,10 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN
if (!ok)
out << "\t/****** Signal parameter uses unsupported datatype" << endl;
- out << "\t\t[id(" << id << ")";
+ out << "\t\t[id(" << id << ')';
if (isDefault)
out << ", uidefault";
- out << "] void " << name << "(" << ptype << ");" << endl;
+ out << "] void " << name << '(' << ptype << ");" << endl;
if (!ok)
out << "\t******/" << endl;
@@ -1031,7 +1031,7 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN
const char *classVersion = mo->classInfo(mo->indexOfClassInfo("Version")).value();
if (classVersion)
out << "\t\tversion(" << classVersion << ")," << endl;
- out << "\t\tuuid(" << classID << ")";
+ out << "\t\tuuid(" << classID << ')';
if (control) {
out << ", " << endl;
out << "\t\tcontrol";
@@ -1043,7 +1043,7 @@ static HRESULT classIDL(QObject *o, const QMetaObject *mo, const QString &classN
out << "\t]" << endl;
out << "\tcoclass " << cleanClassName << endl;
out << "\t{" << endl;
- out << "\t\t[default] dispinterface I" << cleanClassName << ";" << endl;
+ out << "\t\t[default] dispinterface I" << cleanClassName << ';' << endl;
if (hasEvents)
out << "\t\t[default, source] dispinterface I" << cleanClassName << "Events;" << endl;
out << "\t};" << endl;
@@ -1068,7 +1068,7 @@ extern "C" HRESULT __stdcall DumpIDL(const QString &outfile, const QString &ver)
file.remove();
QString filebase = QString::fromLocal8Bit(qAxModuleFilename);
- filebase = filebase.left(filebase.lastIndexOf(QLatin1String(".")));
+ filebase = filebase.left(filebase.lastIndexOf(QLatin1Char('.')));
QString appID = qAxFactory()->appID().toString().toUpper();
if (QUuid(appID).isNull())
@@ -1103,7 +1103,7 @@ extern "C" HRESULT __stdcall DumpIDL(const QString &outfile, const QString &ver)
out << "/****************************************************************************" << endl;
out << "** Interface definition generated for ActiveQt project" << endl;
out << "**" << endl;
- out << "** '" << qAxModuleFilename << "'" << endl;
+ out << "** '" << qAxModuleFilename << '\'' << endl;
out << "**" << endl;
out << "** Created: " << QDateTime::currentDateTime().toString() << endl;
out << "**" << endl;
@@ -1121,13 +1121,13 @@ extern "C" HRESULT __stdcall DumpIDL(const QString &outfile, const QString &ver)
delete_qApp = true;
}
- out << "[" << endl;
+ out << '[' << endl;
out << "\tuuid(" << typeLibID << ")," << endl;
out << "\tversion(" << version << ")," << endl;
- out << "\thelpstring(\"" << typelib << " " << version << " Type Library\")" << endl;
- out << "]" << endl;
+ out << "\thelpstring(\"" << typelib << ' ' << version << " Type Library\")" << endl;
+ out << ']' << endl;
out << "library " << typelib << "Lib" << endl;
- out << "{" << endl;
+ out << '{' << endl;
out << "\timportlib(\"stdole32.tlb\");" << endl;
out << "\timportlib(\"stdole2.tlb\");" << endl << endl;
@@ -1188,11 +1188,12 @@ extern "C" HRESULT __stdcall DumpIDL(const QString &outfile, const QString &ver)
// We have meta object information for this type. Forward declare it.
if (mo) {
QByteArray cleanType = qax_clean_type(*key, mo).toLatin1();
- out << "\tcoclass " << cleanType << ";" << endl;
+ out << "\tcoclass " << cleanType << ';' << endl;
+ subtypes.append(cleanType);
+ qRegisterMetaType(cleanType, (void**)0);
+ cleanType += '*';
subtypes.append(cleanType);
- subtypes.append(cleanType + "*");
qRegisterMetaType(cleanType, (void**)0);
- qRegisterMetaType(cleanType + "*", (void**)0);
}
}
out << endl;
@@ -1225,7 +1226,7 @@ extern "C" HRESULT __stdcall DumpIDL(const QString &outfile, const QString &ver)
QByteArray cleanType = qax_clean_type(*key, mo).toLatin1();
subtypes.append(cleanType);
- subtypes.append(cleanType + "*");
+ subtypes.append(cleanType + '*');
res = classIDL(o, mo, QString::fromLatin1(className.constData()), isBindable, out);
delete o;
if (res != S_OK)
diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp
index f3e1dff..19c2404 100644
--- a/src/activeqt/control/qaxserverbase.cpp
+++ b/src/activeqt/control/qaxserverbase.cpp
@@ -2446,10 +2446,10 @@ HRESULT WINAPI QAxServerBase::Invoke(DISPID dispidMember, REFIID riid,
int nameLength = 0;
if (index == -1) {
nameLength = name.length();
- name += "(";
+ name += '(';
// no parameter - shortcut
if (!pDispParams->cArgs)
- index = mo->indexOfSlot((name + ")"));
+ index = mo->indexOfSlot((name + ')'));
// search
if (index == -1) {
for (int i = 0; i < mo->methodCount(); ++i) {
@@ -2463,7 +2463,7 @@ HRESULT WINAPI QAxServerBase::Invoke(DISPID dispidMember, REFIID riid,
if (index == -1) {
QRegExp regexp(QLatin1String("_([0-9])\\("));
if (regexp.lastIndexIn(QString::fromLatin1(name.constData())) != -1) {
- name = name.left(name.length() - regexp.cap(0).length()) + "(";
+ name = name.left(name.length() - regexp.cap(0).length()) + '(';
int overload = regexp.cap(1).toInt() + 1;
for (int s = 0; s < qt.object->metaObject()->methodCount(); ++s) {
@@ -2559,7 +2559,7 @@ HRESULT WINAPI QAxServerBase::Invoke(DISPID dispidMember, REFIID riid,
argv[p + 1] = varp + p + 1;
} else {
argv[p + 1] = const_cast<void*>(varp[p + 1].constData());
- if (ptype.endsWith("*")) {
+ if (ptype.endsWith('*')) {
argv_pointer[p + 1] = argv[p + 1];
argv[p + 1] = argv_pointer + p + 1;
}
@@ -2590,7 +2590,7 @@ HRESULT WINAPI QAxServerBase::Invoke(DISPID dispidMember, REFIID riid,
} else {
argv[0] = const_cast<void*>(varp[0].constData());
}
- if (type.endsWith("*")) {
+ if (type.endsWith('*')) {
argv_pointer[0] = argv[0];
argv[0] = argv_pointer;
}
diff --git a/src/activeqt/control/qaxservermain.cpp b/src/activeqt/control/qaxservermain.cpp
index a50fef0..e3e1e5d 100644
--- a/src/activeqt/control/qaxservermain.cpp
+++ b/src/activeqt/control/qaxservermain.cpp
@@ -253,7 +253,7 @@ EXTERN_C int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR,
run = false;
break;
} else {
- unprocessed += cmds.at(i) + " ";
+ unprocessed += cmds.at(i) + ' ';
}
}
diff --git a/src/activeqt/shared/qaxtypes.cpp b/src/activeqt/shared/qaxtypes.cpp
index ace81e7..12307f3 100644
--- a/src/activeqt/shared/qaxtypes.cpp
+++ b/src/activeqt/shared/qaxtypes.cpp
@@ -1111,7 +1111,7 @@ QVariant VARIANTToQVariant(const VARIANT &arg, const QByteArray &typeName, uint
if (iface) {
QObject *qObj = iface->qObject();
iface->Release();
- var = QVariant(qRegisterMetaType<QObject*>(qObj ? QByteArray(qObj->metaObject()->className()) + "*" : typeName), &qObj);
+ var = QVariant(qRegisterMetaType<QObject*>(qObj ? QByteArray(qObj->metaObject()->className()) + '*' : typeName), &qObj);
} else
#endif
{