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. [Solved] qmake: += but avoiding duplicates
Forum Update on Monday, May 27th 2025

[Solved] qmake: += but avoiding duplicates

Scheduled Pinned Locked Moved Qt Creator and other tools
qmake
8 Posts 3 Posters 2.0k 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.
  • A Offline
    A Offline
    Asperamanca
    wrote on 11 Mar 2015, 16:10 last edited by Asperamanca
    #1

    A few months ago, someone posted that an alternative to += exists, which will append to a list just as += does, but will avoid duplicate entries.

    So instead of HEADERS += ... you could write HEADERS (?)= ... and be sure that every file is only mentioned once.

    For some reason, this is not in the docs (or very well hidden).

    Does anyone know the thing I'm talking about?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 11 Mar 2015, 18:58 last edited by
      #2

      This is documented: link. You should use star for this: HEADERS *= something.h

      (Z(:^

      A 1 Reply Last reply 12 Mar 2015, 07:59
      2
      • S sierdzio
        11 Mar 2015, 18:58

        This is documented: link. You should use star for this: HEADERS *= something.h

        A Offline
        A Offline
        Asperamanca
        wrote on 12 Mar 2015, 07:59 last edited by Asperamanca 3 Dec 2015, 08:01
        #3

        @sierdzio
        Thanks. I somehow missed that one.

        Edit: Now how do I mark the topic "solved"?

        S 1 Reply Last reply 12 Mar 2015, 17:47
        0
        • A Asperamanca
          12 Mar 2015, 07:59

          @sierdzio
          Thanks. I somehow missed that one.

          Edit: Now how do I mark the topic "solved"?

          S Offline
          S Offline
          sierdzio
          Moderators
          wrote on 12 Mar 2015, 17:47 last edited by sierdzio 3 Dec 2015, 17:48
          #4

          @Asperamanca said:

          @sierdzio
          Thanks. I somehow missed that one.

          Yes, I've noticed this part of help has seen a major rewrite in Qt 5. Not sure where the note is located in new docs. If it is missing, then it is probably a bug.

          Edit: Now how do I mark the topic "solved"?

          You need to go to "Topic Tools" menu - there is a button for marking threads as solved there. If it does not work (I know there used to be some glitches here after forum transition), you can do the good old manual approach: add [solved] to topic title.

          (Z(:^

          A 1 Reply Last reply 13 Mar 2015, 07:54
          1
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 12 Mar 2015, 21:01 last edited by
            #5

            Hi,

            It's now in qmake Language

            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
            4
            • S Offline
              S Offline
              sierdzio
              Moderators
              wrote on 13 Mar 2015, 06:47 last edited by
              #6

              Ah, indeed. Thanks, @SGaist :-)

              (Z(:^

              1 Reply Last reply
              0
              • S sierdzio
                12 Mar 2015, 17:47

                @Asperamanca said:

                @sierdzio
                Thanks. I somehow missed that one.

                Yes, I've noticed this part of help has seen a major rewrite in Qt 5. Not sure where the note is located in new docs. If it is missing, then it is probably a bug.

                Edit: Now how do I mark the topic "solved"?

                You need to go to "Topic Tools" menu - there is a button for marking threads as solved there. If it does not work (I know there used to be some glitches here after forum transition), you can do the good old manual approach: add [solved] to topic title.

                A Offline
                A Offline
                Asperamanca
                wrote on 13 Mar 2015, 07:54 last edited by
                #7

                @sierdzio Tools menu doesn't offer that option (but it strangely has an empty space exactly the size of a button). But good old way works of course :-)

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  sierdzio
                  Moderators
                  wrote on 15 Mar 2015, 19:29 last edited by
                  #8

                  Hm, maybe it's available only to admins at the moment. I know Tero has some problems with this issue (in the forum software Qt IO is using, changing topic title - to prepend [Solved] - requires admin priviledges), but is working on it.

                  (Z(:^

                  1 Reply Last reply
                  0

                  1/8

                  11 Mar 2015, 16:10

                  • Login

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