Results 1 to 2 of 2

Thread: Problems after porting to Qt 4.4.0

  1. #1
    Join Date
    May 2007
    Location
    Lublin, Poland
    Posts
    345
    Thanks
    40
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Problems after porting to Qt 4.4.0

    Hi guys,

    I have a strange problem. When I compile my application using Qt 4.3.4
    and read double values from a file it works fine(let's say 10 doubles);
    When I compile using Qt 4.4.0 the doubles are read wrong, but when I replace '.' with a ',' in doubles it read 10 doubles(ok).
    What is strange is that, I do not use a QString or any Qt classes to read doubles from a file. I use simple C code, like:
    Qt Code:
    1. ...
    2. while (fscanf(fp, "%lf %lf %lf %d %d %d\n",
    3. &latitude, &longitude, &sog,
    4. &mode, &seconds, &connect ) != EOF)
    5. { .... }
    To copy to clipboard, switch view to plain text mode 

    Any idea what can be wrong? I understand that setting different locale for QString can have different effect, but can Qt lib (locale settings) effect C code reading?

    Thanks for any help,

    Kacper
    Qt allows you to use everything you want
    wysota
    --------------------------------------------------------------------------------
    #if defined(Q_OS_UNIX) && defined(QT_DEBUG)
    abort(); // trap; generates core dump
    #else
    exit(1); // goodbye cruel world
    #endif

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problems after porting to Qt 4.4.0

    Quote Originally Posted by maverick_pol View Post
    can Qt lib (locale settings) effect C code reading?
    Yes, Qt does call setlocale() in a few places.

Similar Threads

  1. problems going from 4.3.x to 4.4.0
    By Ovis in forum Installation and Deployment
    Replies: 4
    Last Post: 26th June 2008, 19:22

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
  •  
Qt is a trademark of The Qt Company.