summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2012-04-30 14:26:41 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-02 11:14:09 +0200
commit36b3a6ad3818b6c8d0849d5e5d63de22c2a2a430 (patch)
tree209a6267ce8ca7a05ae5f9a46b37e6c8255cfbc9 /src/widgets
parentbcd477e0bc48bb028193d7707d1ecfbd61b5bdc1 (diff)
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>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/kernel/qapplication.cpp14
-rw-r--r--src/widgets/kernel/qapplication.h14
2 files changed, 14 insertions, 14 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index 99500998db..385c5caccc 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -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)
{
diff --git a/src/widgets/kernel/qapplication.h b/src/widgets/kernel/qapplication.h
index 206692e6d4..4aac97aece 100644
--- a/src/widgets/kernel/qapplication.h
+++ b/src/widgets/kernel/qapplication.h
@@ -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 *);