Skip to content

Commit

Permalink
qtcollider: QcSignalSpy prevent creating QVariant<QVariant>
Browse files Browse the repository at this point in the history
  • Loading branch information
elgiano committed Oct 25, 2020
1 parent 291dd1a commit e95df8e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion QtCollider/QcSignalSpy.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,12 @@ class QcSignalSpy : public QObject {

for (int i = 0; i < _argTypes.count(); ++i) {
QMetaType::Type type = static_cast<QMetaType::Type>(_argTypes.at(i));
args << QVariant(type, argData[i + 1]);
if (type == QMetaType::QVariant) {
// avoid creating a QVariant<QVariant>
args << QVariant(type, argData[i + 1]).value<QVariant>();
} else {
args << QVariant(type, argData[i + 1]);
}
}

react(args);
Expand Down

0 comments on commit e95df8e

Please sign in to comment.