Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt creator(2.5.0) doesnt interpret "Try catch" block in constructor.
QtWS25 Last Chance

Qt creator(2.5.0) doesnt interpret "Try catch" block in constructor.

Scheduled Pinned Locked Moved Qt Creator and other tools
2 Posts 2 Posters 1.3k Views
  • 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.
  • N Offline
    N Offline
    nikCoder
    wrote on last edited by
    #1

    Consider the below pseudo code, I added a try catch block for the constructor , which i am sure is valid.
    @C::C()
    try
    : A ( /.../ )
    , b( /.../ )
    {
    }
    catch( ... )
    {

    }@

    For some strange reason Qt creator doesn't understand this syntax and underlines the "try" line and the "catch" block in red.

    Qt creator version :2.5.0.

    The code compiles without any error. Please let me know if any one has a solution for this. Thanks!

    --Nikhil

    1 Reply Last reply
    0
    • T Offline
      T Offline
      Tannin
      wrote on last edited by
      #2

      That's not exactly strange, it's a very uncommon syntax. The qt syntax parser is not 100% conformant so it won't understand the more exotic constructs. That's true for almost every IDE I know of.
      I don't think there is a lot one can do beyond submitting a patch.

      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