Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Using Qt Quick Test with QBS
Forum Updated to NodeBB v4.3 + New Features

Using Qt Quick Test with QBS

Scheduled Pinned Locked Moved QML and Qt Quick
qbsquick-test
2 Posts 2 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DanWatkins
    wrote on 22 Sept 2015, 03:14 last edited by DanWatkins
    #1

    Looking at the Qt Quick Test example, I'm wondering how to implement the equivalent using QBS instead of qmake. I've gotten it down to needing QUICK_TEST_SOURCE_DIR to be defined somehow. Adding Depends { name: "Qt.qmltest" } to the Application item and using QUICK_TEST_MAIN(example), the application builds and runs. The problem is the macro is actually expanding to:

    int main(int argc, char **argv) \
    { 
        return quick_test_main(argc, argv, #name, 0); 
    }
    

    Since QUICK_TEST_SOURCE_DIR is not defined, meaning 0 is passed instead. This causes no tests to be run.

    With qmake, the pro file has "CONFIG += warn_on qmltestcase", but I'm not sure how to translate that into QBS. Specifically the qmltestcase part. Any ideas?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dor666
      wrote on 20 Jan 2016, 10:10 last edited by dor666
      #2

      I use CMake, not QBS, but this should be similar.

      All you need to do in CMake is to link your test target to QuickTest module (exactly as you link Core, Gui etc modules)

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved