cic
21st August 2013, 09:34
since qmetacallevent is private defined, i dont find any documentation so far.
but for the project test purpose i need to create one for testing.
has anyone idea?
In my project, i need to grab the information of each queued signal/slot message for testing.
The messages are for debugging purpose in run time.
Therefore i have modified the notify function.
bool MyApplication::notify(QObject* receiver, QEvent* event)
{
TEST_FLAG(SIGNAL_PROTOCOL)
// test function goes here
END
return QApplication::notify(receiver, event);
}
Since there would be mass of event go through, the performance impact of the function is also of my concern.
That's why i want to test it.
The test function entry is defined with QMetaCallEvent.
In my test environment, I simply setup a loop to see the run time consumption of the test function.
GTEST_XXX()
{
for (int i = 0; i < TEN_MILLION; i++){
// test function
}
}
I used to think by only accessing QMetaObject, QMetaMethod. But it is not able to fulfill my need since the argument value of the signal transmitted is also for me important.
but for the project test purpose i need to create one for testing.
has anyone idea?
In my project, i need to grab the information of each queued signal/slot message for testing.
The messages are for debugging purpose in run time.
Therefore i have modified the notify function.
bool MyApplication::notify(QObject* receiver, QEvent* event)
{
TEST_FLAG(SIGNAL_PROTOCOL)
// test function goes here
END
return QApplication::notify(receiver, event);
}
Since there would be mass of event go through, the performance impact of the function is also of my concern.
That's why i want to test it.
The test function entry is defined with QMetaCallEvent.
In my test environment, I simply setup a loop to see the run time consumption of the test function.
GTEST_XXX()
{
for (int i = 0; i < TEN_MILLION; i++){
// test function
}
}
I used to think by only accessing QMetaObject, QMetaMethod. But it is not able to fulfill my need since the argument value of the signal transmitted is also for me important.