summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-03-23 14:31:28 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-23 14:31:28 +0100
commit425b38ef95f6f4478ffbd4ada0d3046fae2c95e7 (patch)
tree0347dd701ace8ab022cf6c86edbb61be9795a668 /src/gui/kernel
parent2f2b78321427daa8c7f0702140c297d22b0bf3c8 (diff)
parent3b512ae142017f105f297467f74dc28d3cb9030a (diff)
Merge "Merge master into api_changes" into refs/staging/api_changes
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qevent.cpp2
-rw-r--r--src/gui/kernel/qevent.h4
-rw-r--r--src/gui/kernel/qguiapplication.cpp21
-rw-r--r--src/gui/kernel/qinputmethod.cpp2
-rw-r--r--src/gui/kernel/qinputmethod.h8
-rw-r--r--src/gui/kernel/qpalette.cpp1
-rw-r--r--src/gui/kernel/qscreen.cpp1
-rw-r--r--src/gui/kernel/qwindow.cpp7
-rw-r--r--src/gui/kernel/qwindowsysteminterface_qpa.cpp2
9 files changed, 26 insertions, 22 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index 3e3db64d6f..fd674225ae 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -1698,6 +1698,7 @@ void QInputMethodEvent::setCommitString(const QString &commitString, int replace
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)
{
@@ -1758,6 +1759,7 @@ void QInputMethodEvent::setTentativeCommitString(const QString &tentativeCommitS
Returns the text as which 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
\sa setTentativeCommitString()
*/
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h
index a7dce43f72..1642cd006b 100644
--- a/src/gui/kernel/qevent.h
+++ b/src/gui/kernel/qevent.h
@@ -444,7 +444,7 @@ public:
QInputMethodEvent();
QInputMethodEvent(const QString &preeditText, const QList<Attribute> &attributes);
void setCommitString(const QString &commitString, int replaceFrom = 0, int replaceLength = 0);
- void setTentativeCommitString(const QString &tentativeCommitString);
+ QT_DEPRECATED void setTentativeCommitString(const QString &tentativeCommitString);
inline const QList<Attribute> &attributes() const { return attrs; }
inline const QString &preeditString() const { return preedit; }
@@ -452,7 +452,7 @@ public:
inline const QString &commitString() const { return commit; }
inline int replacementStart() const { return replace_from; }
inline int replacementLength() const { return replace_length; }
- inline const QString &tentativeCommitString() const { return tentativeCommit; }
+ QT_DEPRECATED inline const QString &tentativeCommitString() const { return tentativeCommit; }
QInputMethodEvent(const QInputMethodEvent &other);
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 0fd18e7d2d..9b0973afb2 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -475,7 +475,6 @@ QWindow *QGuiApplication::topLevelAt(const QPoint &pos)
/*!
\property QGuiApplication::platformName
\brief The name of the underlying platform plugin.
- \since 5.0
*/
QString QGuiApplication::platformName()
@@ -503,10 +502,14 @@ static void init_platform(const QString &pluginArgument, const QString &platform
const QString defaultPlatform = QLatin1String("cocoa");
#elif defined (Q_OS_WIN)
const QString defaultPlatform = QLatin1String("windows");
+#elif defined (Q_OS_QNX)
+ const QString defaultPlatform = QLatin1String("qnx");
#elif !defined (QT_NO_XCB)
const QString defaultPlatform = QLatin1String("xcb");
#elif !defined (QT_NO_WAYLAND)
const QString defaultPlatform = QLatin1String("wayland");
+#elif !defined (QT_NO_EGLFS)
+ const QString defaultPlatform = QLatin1String("eglfs");
#else
const QString defaultPlatform = QLatin1String("minimal");
#endif
@@ -1143,14 +1146,21 @@ void QGuiApplicationPrivate::processLeaveEvent(QWindowSystemInterfacePrivate::Le
void QGuiApplicationPrivate::processActivatedEvent(QWindowSystemInterfacePrivate::ActivatedWindowEvent *e)
{
QWindow *previous = QGuiApplicationPrivate::focus_window;
- QGuiApplicationPrivate::focus_window = e->activated.data();
+ QWindow *newFocus = e->activated.data();
- if (previous == QGuiApplicationPrivate::focus_window)
+ if (previous == newFocus)
return;
QObject *previousFocusObject = previous ? previous->focusObject() : 0;
if (previous) {
+ QFocusEvent focusAboutToChange(QEvent::FocusAboutToChange);
+ QCoreApplication::sendSpontaneousEvent(previous, &focusAboutToChange);
+ }
+
+ QGuiApplicationPrivate::focus_window = newFocus;
+
+ if (previous) {
QFocusEvent focusOut(QEvent::FocusOut);
QCoreApplication::sendSpontaneousEvent(previous, &focusOut);
QObject::disconnect(previous, SIGNAL(focusObjectChanged(QObject*)),
@@ -1944,8 +1954,6 @@ void QGuiApplication::restoreOverrideCursor()
#endif// QT_NO_CURSOR
/*!
- \since 5.0
-
Returns the application's style hints.
The style hints encapsulate a set of platform dependent properties
@@ -1999,8 +2007,6 @@ QInputMethod *QGuiApplication::inputMethod() const
}
/*!
- \since 5.0
-
returns the input panel.
The input panel returns properties about the state and position of
@@ -2015,7 +2021,6 @@ QInputPanel *QGuiApplication::inputPanel() const
}
/*!
- \since 4.5
\fn void QGuiApplication::fontDatabaseChanged()
This signal is emitted when application fonts are loaded or removed.
diff --git a/src/gui/kernel/qinputmethod.cpp b/src/gui/kernel/qinputmethod.cpp
index 9e724446ff..23ab8535a0 100644
--- a/src/gui/kernel/qinputmethod.cpp
+++ b/src/gui/kernel/qinputmethod.cpp
@@ -215,7 +215,7 @@ void QInputMethod::hide()
\sa show(), hide()
*/
-bool QInputMethod::visible() const
+bool QInputMethod::isVisible() const
{
Q_D(const QInputMethod);
QPlatformInputContext *ic = d->platformInputContext();
diff --git a/src/gui/kernel/qinputmethod.h b/src/gui/kernel/qinputmethod.h
index 0acddc05e2..92ae016b97 100644
--- a/src/gui/kernel/qinputmethod.h
+++ b/src/gui/kernel/qinputmethod.h
@@ -62,7 +62,7 @@ class Q_GUI_EXPORT QInputMethod : public QObject
Q_PROPERTY(QObject *inputItem READ inputItem WRITE setInputItem NOTIFY inputItemChanged)
Q_PROPERTY(QRectF cursorRectangle READ cursorRectangle NOTIFY cursorRectangleChanged)
Q_PROPERTY(QRectF keyboardRectangle READ keyboardRectangle NOTIFY keyboardRectangleChanged)
- Q_PROPERTY(bool visible READ visible NOTIFY visibleChanged)
+ Q_PROPERTY(bool visible READ isVisible NOTIFY visibleChanged)
Q_PROPERTY(bool animating READ isAnimating NOTIFY animatingChanged)
Q_PROPERTY(QLocale locale READ locale NOTIFY localeChanged)
Q_PROPERTY(Qt::LayoutDirection inputDirection READ inputDirection NOTIFY inputDirectionChanged)
@@ -89,7 +89,11 @@ public:
ContextMenu
};
- bool visible() const;
+#if QT_DEPRECATED_SINCE(5,0)
+ QT_DEPRECATED bool visible() const { return isVisible(); }
+#endif
+
+ bool isVisible() const;
void setVisible(bool visible);
bool isAnimating() const;
diff --git a/src/gui/kernel/qpalette.cpp b/src/gui/kernel/qpalette.cpp
index 9a2eb12e3f..ab62ec0992 100644
--- a/src/gui/kernel/qpalette.cpp
+++ b/src/gui/kernel/qpalette.cpp
@@ -524,6 +524,7 @@ QPalette::QPalette()
} else {
init();
qt_palette_from_color(*this, Qt::black);
+ resolve_mask = 0;
}
}
diff --git a/src/gui/kernel/qscreen.cpp b/src/gui/kernel/qscreen.cpp
index 5d7ffdbc2b..ce26b9dd93 100644
--- a/src/gui/kernel/qscreen.cpp
+++ b/src/gui/kernel/qscreen.cpp
@@ -578,7 +578,6 @@ void QScreenPrivate::updatePrimaryOrientation()
\warning In general, grabbing an area outside the screen is not
safe. This depends on the underlying window system.
- \since 5.0
*/
QPixmap QScreen::grabWindow(WId window, int x, int y, int w, int h) const
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index ab1e8f7601..d72cc991d7 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -224,7 +224,6 @@ QWindow::SurfaceType QWindow::surfaceType() const
/*!
\property QWindow::visible
\brief whether the window is visible or not
- \since 5.0
This property controls the visibility of the window in the windowing system.
@@ -496,7 +495,6 @@ Qt::WindowType QWindow::windowType() const
/*!
\property QWindow::windowTitle
\brief the window's title in the windowing system
- \since 5.0
The window title might appear in the title area of the window decorations,
depending on the windowing system and the window flags. It might also
@@ -625,7 +623,6 @@ bool QWindow::isActive() const
/*!
\property QWindow::contentOrientation
- \since 5.0
\brief the orientation of the window's contents
This is a hint to the window manager in case it needs to display
@@ -945,25 +942,21 @@ void QWindow::setGeometry(const QRect &rect)
/*!
\property QWindow::x
- \since 5.0
\brief the x position of the window's geometry
*/
/*!
\property QWindow::y
- \since 5.0
\brief the y position of the window's geometry
*/
/*!
\property QWindow::width
- \since 5.0
\brief the width of the window's geometry
*/
/*!
\property QWindow::height
- \since 5.0
\brief the height of the window's geometry
*/
diff --git a/src/gui/kernel/qwindowsysteminterface_qpa.cpp b/src/gui/kernel/qwindowsysteminterface_qpa.cpp
index fcffd75b39..bcbf96b2c0 100644
--- a/src/gui/kernel/qwindowsysteminterface_qpa.cpp
+++ b/src/gui/kernel/qwindowsysteminterface_qpa.cpp
@@ -226,7 +226,7 @@ void QWindowSystemInterface::handleWheelEvent(QWindow *w, const QPointF & local,
void QWindowSystemInterface::handleWheelEvent(QWindow *tlw, ulong timestamp, const QPointF & local, const QPointF & global, int d, Qt::Orientation o, Qt::KeyboardModifiers mods)
{
QPoint point = (o == Qt::Vertical) ? QPoint(0, d) : QPoint(d, 0);
- handleWheelEvent(tlw, timestamp, local, global, point, point, mods);
+ handleWheelEvent(tlw, timestamp, local, global, QPoint(), point, mods);
}
void QWindowSystemInterface::handleWheelEvent(QWindow *w, const QPointF & local, const QPointF & global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods)