Results 1 to 2 of 2

Thread: inline function in qdatetime.h

  1. #1
    Join Date
    Jan 2006
    Location
    11 N 78 E
    Posts
    110
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default inline function in qdatetime.h

    In qt-x11-opensource-src-4.2.2/src/corelib/tools/qdatetime.h, line 40 has
    Qt Code:
    1. bool isNull() const { return jd == 0; }
    To copy to clipboard, switch view to plain text mode 
    and line 101 has
    Qt Code:
    1. inline int toJulianDay() const { return jd; }
    To copy to clipboard, switch view to plain text mode 
    As I understand it, all functions defined inside a class definition are automatically inline. Then why does line 101 have the inline keyword while line 40 does not? Is there any special meaning?
    Penguin #395953 using Qt for open-source development on X11 using C++ and
    Python via PyQt

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,716
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: inline function in qdatetime.h

    my guess is that the two functions were not written by the same person or/and at the same time.
    There is no difference between the two declerations from the compilers perspective.

Similar Threads

  1. Link Errors
    By magikalpnoi in forum Qt Programming
    Replies: 5
    Last Post: 25th September 2006, 22:04
  2. use qpsql
    By raphaelf in forum Installation and Deployment
    Replies: 34
    Last Post: 22nd August 2006, 12:52
  3. Qt 4.1.4 plugin QPSQL
    By jcr in forum Installation and Deployment
    Replies: 4
    Last Post: 22nd June 2006, 22:55
  4. I got two problems when I used static compiled library of QT4
    By qintm in forum Installation and Deployment
    Replies: 8
    Last Post: 20th April 2006, 08:52
  5. Replies: 25
    Last Post: 15th January 2006, 00:53

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.