On 08/08/2018 01:41 PM, Edward Welbourne wrote:

I'm not the only one : 
https://github.com/search?p=1&q=QTEST_ADD_GPU_BLACKLIST_SUPPORT_DEFS&type=Code

This URL got me:

                     We could not perform this search
   Must include at least one user, organization, or repository

so I'm none the wiser for it.  What did it reveal to you ?

Lots of cargo-culted altered copies of the QTEST_MAIN macro, like the one we have in QtWebEngine [1].

---snip---
#define W_QTEST_MAIN(TestObject, params) \
QT_BEGIN_NAMESPACE \
QTEST_ADD_GPU_BLACKLIST_SUPPORT_DEFS \
QT_END_NAMESPACE \
int main(int argc, char *argv[]) \
{ \
    QVector<const char *> w_argv(argc); \
    for (int i = 0; i < argc; ++i) \
        w_argv[i] = argv[i]; \
    for (int i = 0; i < params.size(); ++i) \
        w_argv.append(params[i].data()); \
    int w_argc = w_argv.size(); \
    \
    QApplication app(w_argc, const_cast<char **>(w_argv.data())); \
    app.setAttribute(Qt::AA_Use96Dpi, true); \
    QTEST_DISABLE_KEYPAD_NAVIGATION \
    QTEST_ADD_GPU_BLACKLIST_SUPPORT \
    TestObject tc; \
    QTEST_SET_MAIN_SOURCE_PATH \
    return QTest::qExec(&tc, argc, argv); \
}
---snap---


[1]: http://code.qt.io/cgit/qt/qtwebengine.git/tree/tests/auto/widgets/util.h



Cheers,

Joerg
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to