Dear all,
I would like to check my project that it is not using functions shown in the Qt documentation as deprecated and no longer recommended for future development. I tried using QT_DISABLE_DEPRECATED_BEFORE, but it does not work, as the attached project still compiles. How can I proceed?
######################################################################
# Automatically generated by qmake (3.0) Sun Nov 23 20:09:27 2014
######################################################################
TEMPLATE = app
TARGET = t
INCLUDEPATH += .
# Input
SOURCES += main.cpp
QT += xml
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x050302
DEFINES += QT_DISABLE_DEPRECATED_BEFORE="0x050302"
######################################################################
# Automatically generated by qmake (3.0) Sun Nov 23 20:09:27 2014
######################################################################
TEMPLATE = app
TARGET = t
INCLUDEPATH += .
# Input
SOURCES += main.cpp
QT += xml
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x050302
DEFINES += QT_DISABLE_DEPRECATED_BEFORE="0x050302"
To copy to clipboard, switch view to plain text mode
//#define QT_DISABLE_DEPRECATED_BEFORE 0x050302
#include <QObject>
#include <QtGlobal>
#include <QtXml>
#include <iostream>
using namespace std;
int main()
{
//cout<<QABS(-5)<<endl;
cout<<qPrintable
(QObject::trUtf8("text"))<<endl;
return 0;
}
//#define QT_DISABLE_DEPRECATED_BEFORE 0x050302
#include <QObject>
#include <QtGlobal>
#include <QtXml>
QDomDocument dom;
#include <iostream>
using namespace std;
int main()
{
//cout<<QABS(-5)<<endl;
cout<<qPrintable(QObject::trUtf8("text"))<<endl;
return 0;
}
To copy to clipboard, switch view to plain text mode
Bookmarks