diff options
Diffstat (limited to 'tests/auto/corelib/global/qlogging/app')
-rw-r--r-- | tests/auto/corelib/global/qlogging/app/app.pro | 3 | ||||
-rw-r--r-- | tests/auto/corelib/global/qlogging/app/main.cpp | 31 |
2 files changed, 34 insertions, 0 deletions
diff --git a/tests/auto/corelib/global/qlogging/app/app.pro b/tests/auto/corelib/global/qlogging/app/app.pro index 24ac571bac..b11e792a4c 100644 --- a/tests/auto/corelib/global/qlogging/app/app.pro +++ b/tests/auto/corelib/global/qlogging/app/app.pro @@ -10,3 +10,6 @@ CONFIG += console SOURCES += main.cpp DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 + +gcc:!mingw: QMAKE_LFLAGS += -rdynamic + 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" |