QObject/Q_OBJECT: remove deprecated old API
Since 5.0, trUtf8(), qFindChild() Change-Id: I7bc0d125f92faebf24a422c1aac528a3f4687434 Reviewed-by: Lars Knoll <lars.knoll@qt.io>bb10
parent
80602ce2b3
commit
67ba2a5db8
|
|
@ -1,6 +1,6 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Copyright (C) 2013 Olivier Goffart <ogoffart@woboq.com>
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
|
|
@ -130,11 +130,7 @@ public:
|
|||
#if defined(QT_NO_TRANSLATION) || defined(Q_CLANG_QDOC)
|
||||
static QString tr(const char *sourceText, const char * = nullptr, int = -1)
|
||||
{ return QString::fromUtf8(sourceText); }
|
||||
#if QT_DEPRECATED_SINCE(5, 0)
|
||||
QT_DEPRECATED static QString trUtf8(const char *sourceText, const char * = nullptr, int = -1)
|
||||
{ return QString::fromUtf8(sourceText); }
|
||||
#endif
|
||||
#endif //QT_NO_TRANSLATION
|
||||
#endif // QT_NO_TRANSLATION
|
||||
|
||||
QString objectName() const;
|
||||
void setObjectName(const QString &name);
|
||||
|
|
@ -439,19 +435,6 @@ inline QMetaObject::Connection QObject::connect(const QObject *asender, const ch
|
|||
const char *amember, Qt::ConnectionType atype) const
|
||||
{ return connect(asender, asignal, this, amember, atype); }
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 0)
|
||||
template<typename T>
|
||||
inline QT_DEPRECATED T qFindChild(const QObject *o, const QString &name = QString())
|
||||
{ return o->findChild<T>(name); }
|
||||
|
||||
template<typename T>
|
||||
inline QT_DEPRECATED QList<T> qFindChildren(const QObject *o, const QString &name = QString())
|
||||
{
|
||||
return o->findChildren<T>(name);
|
||||
}
|
||||
|
||||
#endif //QT_DEPRECATED
|
||||
|
||||
template <class T>
|
||||
inline T qobject_cast(QObject *object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -154,8 +154,6 @@ QT_BEGIN_NAMESPACE
|
|||
// full set of tr functions
|
||||
# define QT_TR_FUNCTIONS \
|
||||
static inline QString tr(const char *s, const char *c = nullptr, int n = -1) \
|
||||
{ return staticMetaObject.tr(s, c, n); } \
|
||||
QT_DEPRECATED static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) \
|
||||
{ return staticMetaObject.tr(s, c, n); }
|
||||
#else
|
||||
// inherit the ones from QObject
|
||||
|
|
|
|||
Loading…
Reference in New Issue