Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt Creator automatically parses some files as C-style
QtWS25 Last Chance

Qt Creator automatically parses some files as C-style

Scheduled Pinned Locked Moved General and Desktop
7 Posts 2 Posters 1.8k 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.
  • X Offline
    X Offline
    x6herbius
    wrote on last edited by
    #1

    Have asked on StackOverflow ("http://stackoverflow.com/questions/20470674/qt-creator-parses-sp-file-as-c-code":http://stackoverflow.com/questions/20470674/qt-creator-parses-sp-file-as-c-code) but as there have been no answers as of yet I'm asking here as well.

    I'm trying to use Qt Creator to write "SourcePawn":https://wiki.alliedmods.net/index.php/Category:SourceMod_Development scripting files for SourceMod server plugins. Even without any syntax definition file, the IDE will interpret .sp source files as C/C++, resulting in a lot of green/red underlining as the code parser doesn't understand what's going on. Is there a way to stop this from happening? There doesn't seem to be anything in the options relating to it; I'd rather not exclude *.sp files as I was looking to write my own syntax highlighting definition and this would void that option.

    Thanks.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You can add *.sp to the ignored file pattern in the Generic Syntax Highlighter tab in the Text Editor panel or maybe try to add an empty (or minimal) Syntax Highlight Definition

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • X Offline
        X Offline
        x6herbius
        wrote on last edited by
        #3

        The ignored file patterns are what I was referring to in the last sentence of the previous post, but it didn't work anyway. What did work was creating a skeleton highlighting definition, which I thought I'd checked before (but evidently got the syntax wrong for, or something similar). Thanks!

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Oops, I didn't understood you right about the exclusion. Glad you could work it out.

          However it's still strange that the exclude didn't work. Out of curiosity, did you restart Creator to see if it would apply only after that ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • X Offline
            X Offline
            x6herbius
            wrote on last edited by
            #5

            Yep, restarted in-between and it was still parsing it as if the exclusion weren't there.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              You could have a look at the "bug report system":http://bugreports.qt-project.org to see whether this is something known. You can also try with the latest version of Creator (3.0)

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • X Offline
                X Offline
                x6herbius
                wrote on last edited by
                #7

                Have updated Qt Creator and no change. I might look on the bug tracker and see if a similar thing exists.

                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