Mac OSX Read all file not defined... Is this a bug? in qt5.9



  • This produce some error..

    QTextStream out(stdout,QIODevice::WriteOnly);
    /* inside qmake file pro
    macx:DEFINES += MACOSX_ROOT
    win32:DEFINES += WINOSX_ROOT
    unix:DEFINES += LINUXOSX_ROOT
    QMake version 3.1
    Using Qt version 5.9.1 in /Users/dev/Applications/qt5.9.1/lib
     */
    
    #ifdef MACOSX_ROOT
    out << "Hi MAC OSX User: " << __DATE__ << endl; /// mac play this
    #endif
    
    #ifdef WINOSX_ROOT
    out << "Hi Window User: " << __DATE__ << endl;
    #endif
    
    #ifndef Q_WS_MAC
    #ifdef LINUXOSX_ROOT
       out << "Hi Linux User: " << __DATE__ << endl; /// mac play this??
    #endif
    #endif
    

    Out play:

    Hi MAC OSX User: Aug 5 2017
    Hi Linux User: Aug 5 2017

    Is this my error?
    ps: 2cm place to write new post in chrome.


  • Lifetime Qt Champion

    Hi,

    Because Q_WS_MAC is a Qt 4 era define that is not anymore in Qt 5 and the unix scope you use in your .pro file includes also macOS.



  • @SGaist said in Mac OSX Read all file not defined... Is this a bug? in qt5.9:

    Q_WS_MAC
    Ok... tanks.... so many different variable in the last 10 years... uauu... other DEV-T to all QT oldtimer guy...
    I set now new my pro file...

    DEFINES += DEF-T
    message( "DEV-T - Developed Unnecessary Traffic you find all new inside QT5" )
    
    
    

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.