summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-11-19 03:01:17 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-11-19 03:01:17 +0100
commit4e98abe73d1b1549e086768e752b11eb68496180 (patch)
tree489be3b7e341d54ece94beef7f51ae48f5d0f5c3 /tools
parente1d2fb8931f4c760f5d50b6c7b0a723d35b81c89 (diff)
parent622841e9271fb8f649a2290aaf1505f34aae88b3 (diff)
downloadqtactiveqt-4e98abe73d1b1549e086768e752b11eb68496180.tar.gz
Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I1e014608bc0a7b07a37a18d43dc3ecc7eb281321
Diffstat (limited to 'tools')
-rw-r--r--tools/dumpcpp/main.cpp28
-rw-r--r--tools/testcon/ambientproperties.cpp2
-rw-r--r--tools/testcon/changeproperties.cpp4
-rw-r--r--tools/testcon/invokemethod.cpp6
-rw-r--r--tools/testcon/mainwindow.cpp10
-rw-r--r--tools/testcon/mainwindow.h3
6 files changed, 27 insertions, 26 deletions
diff --git a/tools/dumpcpp/main.cpp b/tools/dumpcpp/main.cpp
index 8068baf..780d41b 100644
--- a/tools/dumpcpp/main.cpp
+++ b/tools/dumpcpp/main.cpp
@@ -71,7 +71,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(ObjectCategories)
extern QMetaObject *qax_readEnumInfo(ITypeLib *typeLib, const QMetaObject *parentObject);
extern QMetaObject *qax_readClassInfo(ITypeLib *typeLib, ITypeInfo *typeInfo, const QMetaObject *parentObject);
extern QMetaObject *qax_readInterfaceInfo(ITypeLib *typeLib, ITypeInfo *typeInfo, const QMetaObject *parentObject);
-extern QList<QByteArray> qax_qualified_usertypes;
+extern QByteArrayList qax_qualified_usertypes;
extern QString qax_docuFromName(ITypeInfo *typeInfo, const QString &name);
extern bool qax_dispatchEqualsIDispatch;
extern void qax_deleteMetaObject(QMetaObject *mo);
@@ -127,7 +127,7 @@ void generateNameSpace(QTextStream &out, const QMetaObject *mo, const QByteArray
// don't close on purpose
}
-static QByteArray joinParameterNames(const QList<QByteArray> &parameterNames)
+static QByteArray joinParameterNames(const QByteArrayList &parameterNames)
{
QByteArray slotParameters;
for (int p = 0; p < parameterNames.count(); ++p) {
@@ -214,7 +214,7 @@ void generateClassDecl(QTextStream &out, const QMetaObject *mo,
const QByteArray &className, const QByteArray &nameSpace,
ObjectCategories category)
{
- QList<QByteArray> functions;
+ QByteArrayList functions;
QByteArray indent;
if (!(category & OnlyInlines))
@@ -274,7 +274,7 @@ void generateClassDecl(QTextStream &out, const QMetaObject *mo,
}
}
// QAxBase public virtual functions.
- QList<QByteArray> axBase_vfuncs;
+ QByteArrayList axBase_vfuncs;
axBase_vfuncs.append("metaObject");
axBase_vfuncs.append("qObject");
axBase_vfuncs.append("className");
@@ -446,8 +446,8 @@ void generateClassDecl(QTextStream &out, const QMetaObject *mo,
QByteArray slotSignatureTruncated(slotSignature.mid(slotNamedSignature.length()));
slotSignatureTruncated.truncate(slotSignatureTruncated.length() - 1);
- QList<QByteArray> signatureSplit = slotSignatureTruncated.split(',');
- QList<QByteArray> parameterSplit;
+ const auto signatureSplit = slotSignatureTruncated.split(',');
+ QByteArrayList parameterSplit;
if (slotParameters.isEmpty()) { // generate parameter names
for (int i = 0; i < signatureSplit.count(); ++i)
parameterSplit << QByteArray("p") + QByteArray::number(i);
@@ -700,7 +700,7 @@ void generateMethodParameters(QTextStream &out, const QMetaObject *mo, const QMe
out << ',';
// Parameter types
- const QList<QByteArray> parameterTypes = method.parameterTypes();
+ const auto parameterTypes = method.parameterTypes();
for (int j = 0; j < argsCount; ++j) {
out << ' ';
generateTypeInfo(out, parameterTypes.at(j));
@@ -708,7 +708,7 @@ void generateMethodParameters(QTextStream &out, const QMetaObject *mo, const QMe
}
// Parameter names
- const QList<QByteArray> parameterNames = method.parameterNames();
+ const auto parameterNames = method.parameterNames();
for (int j = 0; j < argsCount; ++j)
out << ' ' << stridx(parameterNames.at(j)) << ',';
@@ -767,8 +767,8 @@ void generateClassImpl(QTextStream &out, const QMetaObject *mo, const QByteArray
strreg(typeName);
strreg(method.tag());
- const QList<QByteArray> parameterNames = method.parameterNames();
- const QList<QByteArray> parameterTypes = method.parameterTypes();
+ const auto parameterNames = method.parameterNames();
+ const auto parameterTypes = method.parameterTypes();
for (int j = 0; j < argsCount; ++j) {
if (!QtPrivate::isBuiltinType(parameterTypes.at(j)))
strDetachAndRegister(parameterTypes.at(j));
@@ -1054,7 +1054,7 @@ bool generateTypeLibrary(QString typeLibFile, QString outname,
QByteArray inlines;
QTextStream inlinesOut(&inlines, QIODevice::WriteOnly);
- QMap<QByteArray, QList<QByteArray> > namespaces;
+ QMap<QByteArray, QByteArrayList> namespaces;
if(!(category & NoDeclaration)) {
if (!declFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
@@ -1196,7 +1196,7 @@ bool generateTypeLibrary(QString typeLibFile, QString outname,
declOut << Qt::endl;
}
- QList<QByteArray> subtypes;
+ QByteArrayList subtypes;
UINT typeCount = typelib->GetTypeInfoCount();
for (UINT index = 0; index < typeCount; ++index) {
@@ -1304,8 +1304,8 @@ bool generateTypeLibrary(QString typeLibFile, QString outname,
implOut << "struct qt_meta_stringdata_all_t {" << Qt::endl;
implOut << " QByteArrayData data[" << strings.size() << "];" << Qt::endl;
- QVector<QList<QByteArray> > listVector;
- QList<QByteArray> currentList;
+ QVector<QByteArrayList> listVector;
+ QByteArrayList currentList;
int currentTableLen = 0;
for (const auto &s : strings) {
diff --git a/tools/testcon/ambientproperties.cpp b/tools/testcon/ambientproperties.cpp
index ae759f5..83ef2e2 100644
--- a/tools/testcon/ambientproperties.cpp
+++ b/tools/testcon/ambientproperties.cpp
@@ -122,7 +122,7 @@ QWidgetList AmbientProperties::mdiAreaWidgets() const
QWidgetList result;
if (QMdiArea *mdiArea = qobject_cast<QMdiArea*>(container)) {
- const QList<QMdiSubWindow *> mdiSubWindows = mdiArea->subWindowList();
+ const auto mdiSubWindows = mdiArea->subWindowList();
for (const QMdiSubWindow *subWindow : mdiSubWindows)
result.push_back(subWindow->widget());
}
diff --git a/tools/testcon/changeproperties.cpp b/tools/testcon/changeproperties.cpp
index 4ec1332..e3356ed 100644
--- a/tools/testcon/changeproperties.cpp
+++ b/tools/testcon/changeproperties.cpp
@@ -144,7 +144,7 @@ void ChangeProperties::on_buttonSet_clicked()
case QVariant::List:
{
QStringList txtList = editValue->text().split(QRegularExpression(QLatin1String("[,;]")));
- QList<QVariant> varList;
+ QVariantList varList;
for (int i = 0; i < txtList.count(); ++i) {
QVariant svar(txtList.at(i));
QString str = svar.toString();
@@ -234,7 +234,7 @@ void ChangeProperties::updateProperties()
break;
case QVariant::List:
{
- const QList<QVariant> varList = var.toList();
+ const auto varList = var.toList();
QStringList strList;
for (const auto &var : varList)
strList << var.toString();
diff --git a/tools/testcon/invokemethod.cpp b/tools/testcon/invokemethod.cpp
index 796f0e7..2c30705 100644
--- a/tools/testcon/invokemethod.cpp
+++ b/tools/testcon/invokemethod.cpp
@@ -86,7 +86,7 @@ void InvokeMethod::on_buttonInvoke_clicked()
on_buttonSet_clicked();
QString method = comboMethods->currentText();
- QList<QVariant> vars;
+ QVariantList vars;
int itemCount = listParameters->topLevelItemCount();
for (int i = 0; i < itemCount; ++i) {
@@ -117,8 +117,8 @@ void InvokeMethod::on_comboMethods_activated(const QString &method)
signature.remove(0, signature.indexOf(QLatin1Char('(')) + 1);
signature.truncate(signature.length()-1);
- QList<QByteArray> pnames = slot.parameterNames();
- QList<QByteArray> ptypes = slot.parameterTypes();
+ const auto pnames = slot.parameterNames();
+ const auto ptypes = slot.parameterTypes();
for (int p = 0; p < ptypes.count(); ++p) {
QString ptype(QString::fromLatin1(ptypes.at(p)));
diff --git a/tools/testcon/mainwindow.cpp b/tools/testcon/mainwindow.cpp
index 14db741..8e483b3 100644
--- a/tools/testcon/mainwindow.cpp
+++ b/tools/testcon/mainwindow.cpp
@@ -105,10 +105,10 @@ QAxWidget *MainWindow::activeAxWidget() const
return nullptr;
}
-QList<QAxWidget *> MainWindow::axWidgets() const
+QVector<QAxWidget *> MainWindow::axWidgets() const
{
- QList<QAxWidget *> result;
- const QList<QMdiSubWindow *> mdiSubWindows = m_mdiArea->subWindowList();
+ QVector<QAxWidget *> result;
+ const auto mdiSubWindows = m_mdiArea->subWindowList();
for (const QMdiSubWindow *subWindow : mdiSubWindows)
if (QAxWidget *axWidget = qobject_cast<QAxWidget *>(subWindow->widget()))
result.push_back(axWidget);
@@ -463,7 +463,7 @@ bool MainWindow::loadScript(const QString &file)
m_scripts->addObject(this);
}
- const QList<QAxWidget *> axw = axWidgets();
+ const auto axw = axWidgets();
for (QAxWidget *axWidget : axw) {
QAxBase *ax = axWidget;
m_scripts->addObject(ax);
@@ -547,7 +547,7 @@ void MainWindow::updateGUI()
if (m_dlgProperties)
m_dlgProperties->setControl(hasControl ? container : nullptr);
- const QList<QAxWidget *> axw = axWidgets();
+ const auto axw = axWidgets();
for (QAxWidget *container : axw) {
container->disconnect(SIGNAL(signal(QString,int,void*)));
if (actionLogSignals->isChecked())
diff --git a/tools/testcon/mainwindow.h b/tools/testcon/mainwindow.h
index b3be5c0..8975201 100644
--- a/tools/testcon/mainwindow.h
+++ b/tools/testcon/mainwindow.h
@@ -30,6 +30,7 @@
#define MAINWINDOW_H
#include <ActiveQt/QAxSelect>
+#include <QVector>
#include "ui_mainwindow.h"
@@ -96,7 +97,7 @@ protected slots:
private:
QAxWidget *activeAxWidget() const;
- QList<QAxWidget *> axWidgets() const;
+ QVector<QAxWidget *> axWidgets() const;
static MainWindow *m_instance;