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. Explain: bool _showArgumentNames: 1;
Forum Updated to NodeBB v4.3 + New Features

Explain: bool _showArgumentNames: 1;

Scheduled Pinned Locked Moved General and Desktop
7 Posts 5 Posters 3.2k 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.
  • Y Offline
    Y Offline
    Yash
    wrote on last edited by
    #1

    @
    bool _showArgumentNames: 1;
    @
    What is this?

    @

    TypePrettyPrinter::TypePrettyPrinter(const Overview *overview)
    : _showArgumentNames(false)
    {
    @

    Please explain both the statments. Source lines are taken from qtcreator source code.

    [Edit: Code hightlighting / Vass, Volker]

    http://kineticwing.com : Web IDE, QSS Editor
    http://speedovation.com : Development Lab

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dangelog
      wrote on last edited by
      #2

      [quote author="Yash" date="1293020286"]bool _showArgumentNames: 1;

      What is this?[/quote]

      It's a bitfield inside a struct or a class. It means that that variable is 1 bit wide. http://en.wikipedia.org/wiki/C_syntax#Bit_fields

      [quote]
      TypePrettyPrinter::TypePrettyPrinter(const Overview *overview)
      : _showArgumentNames(false)

      Please explain both the statments. Source lines are taken from qtcreator source code.
      [/quote]

      It's a member initialization in the initialization list. http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.6

      Check out some C++ books :-) http://developer.qt.nokia.com/wiki/Books_and_Links_for_learning_C_and_advanced_topics

      Software Engineer
      KDAB (UK) Ltd., a KDAB Group company

      1 Reply Last reply
      0
      • Y Offline
        Y Offline
        Yash
        wrote on last edited by
        #3

        Thank you peppe :) Sure I'll check

        http://kineticwing.com : Web IDE, QSS Editor
        http://speedovation.com : Development Lab

        1 Reply Last reply
        0
        • I Offline
          I Offline
          Immii
          wrote on last edited by
          #4

          This is called bitwise operator as I remember my Old 'C' days

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kamalakshantv
            wrote on last edited by
            #5

            Seems there is a bug here. In the first post second code snippet the _ is not visible to me.

            Using Fire Fox on Windows 7.

            1 Reply Last reply
            0
            • G Offline
              G Offline
              goetz
              wrote on last edited by
              #6

              [quote author="QtK" date="1293042556"]

              Seems there is a bug here. In the first post second code snippet the _ is not visible to me.

              Using Fire Fox on Windows 7.[/quote]

              Seems to be am issue with the vertical scrollbar, it scrolls one or two pixels which makes the underscore visible or not...

              http://www.catb.org/~esr/faqs/smart-questions.html

              1 Reply Last reply
              0
              • K Offline
                K Offline
                kamalakshantv
                wrote on last edited by
                #7

                and in FF it does not show that vertical scroll bar in this case.

                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