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] Qt Creator plugins
Forum Updated to NodeBB v4.3 + New Features

[Solved] Qt Creator plugins

Scheduled Pinned Locked Moved Qt Creator and other tools
10 Posts 3 Posters 4.0k 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
    DSav
    wrote on last edited by
    #1

    Could somebody please explain the reason why all classes that implement some Qt Creator plugin (Bookmarks, VcsBase, etc or a plugin template in Creator) are „hidden“ in two namespaces: „%plugin-name%“ and then „Internal“?

    1 Reply Last reply
    0
    • L Offline
      L Offline
      loladiro
      wrote on last edited by
      #2

      What else would you expect? The plugins have different namespaces in order to avoid ambiguities between them (and custom plugins). And afaik, the Internal namespace contains the implementation details that are not exported.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DSav
        wrote on last edited by
        #3

        Yes, the presence of namespace „%plugin-name%“ is understandable in this way.

        However, everything inside „%plugin-name%“ is as well inside „Internal“ (except constants, they are inside „%plugin­-name%::Constants“). It looks a bit confusing.

        1 Reply Last reply
        0
        • L Offline
          L Offline
          loladiro
          wrote on last edited by
          #4

          [quote author="DSav" date="1307723676"]
          However, everything inside „%plugin-name%“ is as well inside „Internal“ (except constants, they are inside „%plugin­-name%::Constants“). It looks a bit confusing.[/quote]

          Not everything, just the classes that are not exported (have a look at the VCSBase Plugin for example, the classes in vcsbaseeditor are exported via VCSBASE_EXPORT and therefore not in the Internal namespace).

          1 Reply Last reply
          0
          • D Offline
            D Offline
            DSav
            wrote on last edited by
            #5

            Yes, I wasn’t careful while looking through the sources.

            As far as I undestood there’s only one reason not to „hide“ some class into the „Internal“ namespace: this class is exported by plugin „A“ for being imported by other plugins (those which would depend on „A“). And macros like ZZZZ_EXPORT are used in order to define whether to use Q_DECL_EXPORT or Q_DECL_IMPORT depending on what *.pro file is being built right now.

            Is this correct?

            1 Reply Last reply
            0
            • L Offline
              L Offline
              loladiro
              wrote on last edited by
              #6

              Yes. The internal classes are not exported and can therefore not be used by any other plugin.

              1 Reply Last reply
              0
              • D Offline
                D Offline
                DSav
                wrote on last edited by
                #7

                Ok, thank you for the answers a lot.

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  loladiro
                  wrote on last edited by
                  #8

                  Glad I could help. And please add [Solved] in front of the title (by editing the first post).

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    tobias.hunger
                    wrote on last edited by
                    #9

                    Strictly speaking the Internal namespace is not needed: The internal symbols are hidden and unavailable to other plugins. This hiding happens by the classes not having the export macros. That they are also in the Internal namespace is not really relevant, but it makes it more clear which symbols are exported and which are not.

                    So if you ever stumble over an exported symbol in the Internal namespace: Please file a bug:-)

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      DSav
                      wrote on last edited by
                      #10

                      [deleted]

                      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