qt-creator 3.6 variables (for snippets)



  • At changes from qt-creator 3.6.0: "Made it possible to use Qt Creator variables in snippets". Can I get information about avaliable variables for it? For example I need snippet for GTest:

    TEST_F(%{CurrentFile}, $test_name$)
    {
        $test_body$
    }
    

    But %{CurrentFile} variable does not exist.



  • I found avaliable variables at special dialog from Qt Creator (projects->build&run->run->"Arguments" field->press right button "Insert Variable".
    Now the snippet for gtest looks like:

    TEST_F(%{CurrentDocument:FileBaseName}, $test_name$)
    {
        $test_body$
    }
    

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.