Fix compilation of public headers with QT_NO_DEPRECATED defined
Put the functions in QT_DEPRECATED_SINCE if possible QPluginLoader::staticInstances is not documented as deprecated, and do not reference any alternative use. So I unmarked it as deprecated. Change-Id: I556c3f3657fb0490dd5543fcc56718fe9bd394e7 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>bb10
parent
bcd477e0bc
commit
36b3a6ad38
|
|
@ -69,7 +69,7 @@ public:
|
|||
|
||||
QObject *instance();
|
||||
|
||||
QT_DEPRECATED static QObjectList staticInstances();
|
||||
static QObjectList staticInstances();
|
||||
|
||||
bool load();
|
||||
bool unload();
|
||||
|
|
|
|||
|
|
@ -641,18 +641,11 @@ void QAccessible::setRootObject(QObject *object)
|
|||
}
|
||||
|
||||
/*!
|
||||
\fn void QAccessible::updateAccessibility(QObject *object, int child, Event reason)
|
||||
\deprecated
|
||||
|
||||
Use the version with a single \l QAccessibleEvent paremeter instead.
|
||||
*/
|
||||
void QAccessible::updateAccessibility(QObject *object, int child, Event reason)
|
||||
{
|
||||
Q_ASSERT(object);
|
||||
|
||||
QAccessibleEvent ev(object, reason);
|
||||
ev.setChild(child);
|
||||
updateAccessibility(&ev);
|
||||
}
|
||||
|
||||
/*!
|
||||
Notifies about a change that might be relevant for accessibility clients.
|
||||
|
|
|
|||
|
|
@ -342,8 +342,9 @@ public:
|
|||
static RootObjectHandler installRootObjectHandler(RootObjectHandler);
|
||||
|
||||
static QAccessibleInterface *queryAccessibleInterface(QObject *);
|
||||
|
||||
QT_DEPRECATED static void updateAccessibility(QObject *object, int child, Event reason);
|
||||
#if QT_DEPRECATED_SINCE(5, 0)
|
||||
QT_DEPRECATED static inline void updateAccessibility(QObject *object, int child, Event reason);
|
||||
#endif
|
||||
static void updateAccessibility(QAccessibleEvent *event);
|
||||
|
||||
static bool isActive();
|
||||
|
|
@ -626,6 +627,17 @@ Q_GUI_EXPORT QDebug operator<<(QDebug d, const QAccessibleInterface *iface);
|
|||
Q_GUI_EXPORT QDebug operator<<(QDebug d, const QAccessibleEvent &ev);
|
||||
#endif
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 0)
|
||||
inline void QAccessible::updateAccessibility(QObject *object, int child, Event reason)
|
||||
{
|
||||
Q_ASSERT(object);
|
||||
|
||||
QAccessibleEvent ev(object, reason);
|
||||
ev.setChild(child);
|
||||
updateAccessibility(&ev);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -1672,16 +1672,13 @@ void QInputMethodEvent::setCommitString(const QString &commitString, int replace
|
|||
}
|
||||
|
||||
/*!
|
||||
Sets the tentative commit string to \a tentativeCommitString.
|
||||
\fn void QInputMethodEvent::setTentativeCommitString(const QString &string)
|
||||
Sets the tentative commit string to \a string.
|
||||
|
||||
The tentative commit string is what the preedit string is expected to be committed as.
|
||||
The string can be used within the editor to trigger code that reacts on text changes such as validators.
|
||||
\deprecated
|
||||
*/
|
||||
void QInputMethodEvent::setTentativeCommitString(const QString &tentativeCommitString)
|
||||
{
|
||||
tentativeCommit = tentativeCommitString;
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn const QList<Attribute> &QInputMethodEvent::attributes() const
|
||||
|
|
|
|||
|
|
@ -458,15 +458,18 @@ public:
|
|||
QInputMethodEvent();
|
||||
QInputMethodEvent(const QString &preeditText, const QList<Attribute> &attributes);
|
||||
void setCommitString(const QString &commitString, int replaceFrom = 0, int replaceLength = 0);
|
||||
QT_DEPRECATED void setTentativeCommitString(const QString &tentativeCommitString);
|
||||
|
||||
inline const QList<Attribute> &attributes() const { return attrs; }
|
||||
inline const QString &preeditString() const { return preedit; }
|
||||
|
||||
inline const QString &commitString() const { return commit; }
|
||||
inline int replacementStart() const { return replace_from; }
|
||||
inline int replacementLength() const { return replace_length; }
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 0)
|
||||
QT_DEPRECATED inline void setTentativeCommitString(const QString &string)
|
||||
{ tentativeCommit = string; }
|
||||
QT_DEPRECATED inline const QString &tentativeCommitString() const { return tentativeCommit; }
|
||||
#endif
|
||||
|
||||
QInputMethodEvent(const QInputMethodEvent &other);
|
||||
|
||||
|
|
|
|||
|
|
@ -2163,18 +2163,17 @@ QInputMethod *QGuiApplication::inputMethod() const
|
|||
}
|
||||
|
||||
/*!
|
||||
\fn QInputPanel *QGuiApplication::inputPanel() const
|
||||
returns the input panel.
|
||||
|
||||
The input panel returns properties about the state and position of
|
||||
the virtual keyboard. It also provides information about the position of the
|
||||
current focused input element.
|
||||
|
||||
\sa QInputPanel
|
||||
\obsolete
|
||||
|
||||
\sa inputMethod()
|
||||
*/
|
||||
QInputPanel *QGuiApplication::inputPanel() const
|
||||
{
|
||||
return inputMethod();
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn void QGuiApplication::fontDatabaseChanged()
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ public:
|
|||
|
||||
static QWindow *modalWindow();
|
||||
|
||||
#ifdef QT_DEPRECATED
|
||||
#if QT_DEPRECATED_SINCE(5, 0)
|
||||
static QT_DEPRECATED QWindow *activeWindow() { return focusWindow(); }
|
||||
#endif
|
||||
static QWindow *focusWindow();
|
||||
|
|
@ -130,7 +130,9 @@ public:
|
|||
static void setDesktopSettingsAware(bool on);
|
||||
static bool desktopSettingsAware();
|
||||
|
||||
QT_DEPRECATED QInputPanel *inputPanel() const;
|
||||
#if QT_DEPRECATED_SINCE(5, 0)
|
||||
QT_DEPRECATED QInputPanel *inputPanel() const { return inputMethod(); }
|
||||
#endif
|
||||
QInputMethod *inputMethod() const;
|
||||
|
||||
static QPlatformNativeInterface *platformNativeInterface();
|
||||
|
|
|
|||
|
|
@ -69,11 +69,13 @@ class Q_GUI_EXPORT QInputMethod : public QObject
|
|||
|
||||
Q_ENUMS(Action)
|
||||
public:
|
||||
#ifdef QT_DEPRECATED
|
||||
QT_DEPRECATED QObject *inputItem() const;
|
||||
QT_DEPRECATED void setInputItem(QObject *inputItemChanged);
|
||||
|
||||
// the window containing the editor
|
||||
QT_DEPRECATED QWindow *inputWindow() const;
|
||||
#endif
|
||||
|
||||
QTransform inputItemTransform() const;
|
||||
void setInputItemTransform(const QTransform &transform);
|
||||
|
|
|
|||
|
|
@ -265,13 +265,10 @@ void QWindow::setVisible(bool visible)
|
|||
}
|
||||
|
||||
/*!
|
||||
\fn bool QWindow::visible() const
|
||||
Returns true if the window is set to visible.
|
||||
\obsolete
|
||||
*/
|
||||
bool QWindow::visible() const
|
||||
{
|
||||
return isVisible();
|
||||
}
|
||||
|
||||
bool QWindow::isVisible() const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -102,7 +102,9 @@ public:
|
|||
void setSurfaceType(SurfaceType surfaceType);
|
||||
SurfaceType surfaceType() const;
|
||||
|
||||
QT_DEPRECATED bool visible() const;
|
||||
#if QT_DEPRECATED_SINCE(5, 0)
|
||||
QT_DEPRECATED inline bool visible() const { return isVisible(); }
|
||||
#endif
|
||||
|
||||
bool isVisible() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -1954,13 +1954,11 @@ bool QApplication::event(QEvent *e)
|
|||
}
|
||||
|
||||
/*!
|
||||
\fn void QApplication::syncX()
|
||||
Was used to synchronize with the X server in 4.x, here for source compatibility.
|
||||
\internal
|
||||
\obsolete
|
||||
*/
|
||||
void QApplication::syncX()
|
||||
{
|
||||
}
|
||||
|
||||
void QApplicationPrivate::notifyLayoutDirectionChange()
|
||||
{
|
||||
|
|
@ -4247,26 +4245,20 @@ int QApplication::keyboardInputInterval()
|
|||
*/
|
||||
|
||||
/*!
|
||||
\fn QLocale QApplication::keyboardInputLocale()
|
||||
\since 4.2
|
||||
\obsolete
|
||||
|
||||
Returns the current keyboard input locale. Replaced with QInputMethod::locale()
|
||||
*/
|
||||
QLocale QApplication::keyboardInputLocale()
|
||||
{
|
||||
return qApp ? qApp->inputMethod()->locale() : QLocale::c();
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn Qt::LayoutDirection QApplication::keyboardInputDirection()*
|
||||
\since 4.2
|
||||
\obsolete
|
||||
|
||||
Returns the current keyboard input direction. Replaced with QInputMethod::inputDirection()
|
||||
*/
|
||||
Qt::LayoutDirection QApplication::keyboardInputDirection()
|
||||
{
|
||||
return qApp ? qApp->inputMethod()->inputDirection() : Qt::LeftToRight;
|
||||
}
|
||||
|
||||
bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -97,7 +97,9 @@ class Q_WIDGETS_EXPORT QApplication : public QGuiApplication
|
|||
public:
|
||||
|
||||
QApplication(int &argc, char **argv, int = ApplicationFlags);
|
||||
#ifdef QT_DEPRECATED
|
||||
QT_DEPRECATED QApplication(int &argc, char **argv, bool GUIenabled, int = ApplicationFlags);
|
||||
#endif
|
||||
QApplication(int &argc, char **argv, Type, int = ApplicationFlags);
|
||||
virtual ~QApplication();
|
||||
|
||||
|
|
@ -145,7 +147,9 @@ public:
|
|||
static QWidget *topLevelAt(const QPoint &p);
|
||||
static inline QWidget *topLevelAt(int x, int y) { return topLevelAt(QPoint(x, y)); }
|
||||
|
||||
QT_DEPRECATED static void syncX();
|
||||
#if QT_DEPRECATED_SINCE(5, 0)
|
||||
QT_DEPRECATED static inline void syncX() {}
|
||||
#endif
|
||||
static void beep();
|
||||
static void alert(QWidget *widget, int duration = 0);
|
||||
|
||||
|
|
@ -182,8 +186,12 @@ public:
|
|||
virtual void saveState(QSessionManager& sm);
|
||||
#endif
|
||||
|
||||
QT_DEPRECATED static QLocale keyboardInputLocale();
|
||||
QT_DEPRECATED static Qt::LayoutDirection keyboardInputDirection();
|
||||
#if QT_DEPRECATED_SINCE(5, 0)
|
||||
QT_DEPRECATED static QLocale keyboardInputLocale()
|
||||
{ return qApp ? qApp->inputMethod()->locale() : QLocale::c(); }
|
||||
QT_DEPRECATED static Qt::LayoutDirection keyboardInputDirection()
|
||||
{ return qApp ? qApp->inputMethod()->inputDirection() : Qt::LeftToRight; }
|
||||
#endif
|
||||
|
||||
static int exec();
|
||||
bool notify(QObject *, QEvent *);
|
||||
|
|
|
|||
Loading…
Reference in New Issue