linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Steve Graegert" <graegerts@gmail.com>
To: Shriramana Sharma <samjnaa@gmail.com>
Cc: Linux C Programming List <linux-c-programming@vger.kernel.org>
Subject: Re: class Q_CORE_EXPORT QFlag
Date: Fri, 4 May 2007 14:04:04 +0200	[thread overview]
Message-ID: <6a00c8d50705040504p4fadca4vd62b074c2696c7e6@mail.gmail.com> (raw)
In-Reply-To: <46372A8E.5090201@gmail.com>

On 5/1/07, Shriramana Sharma <samjnaa@gmail.com> wrote:
> I see many usages in the Qt sources like:
>
> class Q_CORE_EXPORT QFlag
> {
>         <blah blah blah>
> } ;
>
> Isn't the word immediately next to the keyword class supposed to be the
> class name? Q_CORE_EXPORT etc are certainly not class names. What are
> they and how are they allowed in between the word class and the class name?
>
> I searched my "Thinking in C++" for this but did not turn up an answer.
> Please help.

It's a macro that expands with different results depending on the
platform and/or context.  For example when building Qt applications on
a Windows machine, it's redefined to Q_DECL_EXPORT which, in this
case, expands to __declspec(dllexport).  See
/src/corelib/global/qglobal.h in the Qt source tree.

	\Steve

--

Steve Grägert <steve@graegert.com>
Jabber    xmpp://graegerts@jabber.org
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2007-05-04 12:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-01 11:54 class Q_CORE_EXPORT QFlag Shriramana Sharma
2007-05-04 11:27 ` leslie.polzer
2007-05-04 12:04 ` Steve Graegert [this message]
2007-05-14 18:50   ` Shriramana Sharma
2007-05-15 10:12     ` Shriramana Sharma
2007-05-15 16:54     ` Glynn Clements

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6a00c8d50705040504p4fadca4vd62b074c2696c7e6@mail.gmail.com \
    --to=graegerts@gmail.com \
    --cc=linux-c-programming@vger.kernel.org \
    --cc=samjnaa@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).