PDA

View Full Version : Showing warnings/errors for functions/modules deprecated for Qt 5.3.2 at compile time



lalesculiviu
23rd November 2014, 20:05
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"



//#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;
}