diff options
Diffstat (limited to 'tests/auto/corelib/global/qlogging/app/main.cpp')
-rw-r--r-- | tests/auto/corelib/global/qlogging/app/main.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/auto/corelib/global/qlogging/app/main.cpp b/tests/auto/corelib/global/qlogging/app/main.cpp index 621059caad..e190a48873 100644 --- a/tests/auto/corelib/global/qlogging/app/main.cpp +++ b/tests/auto/corelib/global/qlogging/app/main.cpp @@ -42,11 +42,37 @@ #include <QCoreApplication> #include <QLoggingCategory> +#ifdef Q_CC_GNU +#define NEVER_INLINE __attribute__((__noinline__)) +#else +#define NEVER_INLINE +#endif + struct T { T() { qDebug("static constructor"); } ~T() { qDebug("static destructor"); } } t; +class MyClass : public QObject +{ + Q_OBJECT +public slots: + virtual NEVER_INLINE QString mySlot1(); +private: + virtual NEVER_INLINE void myFunction(int a); +}; + +QString MyClass::mySlot1() +{ + myFunction(34); + return QString(); +} + +void MyClass::myFunction(int a) +{ + qDebug() << "from_a_function" << a; +} + int main(int argc, char **argv) { QCoreApplication app(argc, argv); @@ -65,5 +91,10 @@ int main(int argc, char **argv) qDebug("qDebug2"); + MyClass cl; + QMetaObject::invokeMethod(&cl, "mySlot1"); + return 0; } + +#include "main.moc" |