MCPcopy Create free account
hub / github.com/KDAB/GammaRay / setMethod

Method setMethod

core/methodargumentmodel.cpp:23–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23void MethodArgumentModel::setMethod(const QMetaMethod &method)
24{
25 beginResetModel();
26 m_method = method;
27 m_arguments.clear();
28 m_arguments.resize(method.parameterTypes().size());
29 for (int i = 0; i < m_arguments.size(); ++i) {
30 const QByteArray typeName = method.parameterTypes().at(i);
31
32 int metaTypeId = QMetaType::fromName(typeName).id();
33 const auto variantType = metaTypeId <= int(QMetaType::User) ? metaTypeId : QMetaType::User;
34 m_arguments[i] = QVariant(variantType);
35 }
36 endResetModel();
37}
38
39QVariant MethodArgumentModel::data(const QModelIndex &index, int role) const
40{

Callers 2

activateMethodMethod · 0.80
invokeMethodMethod · 0.80

Calls 5

QVariantClass · 0.70
clearMethod · 0.45
resizeMethod · 0.45
sizeMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected