From cd34da54269e6cd7fa5c18242d982736f022a14a Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Mon, 22 Oct 2012 12:47:34 +0200 Subject: Rename all QWindow properties that have "window" in them MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit windowTitle, windowModality, windowIcon and so on are named that way to be similar to the ones in QWidget. However QQuickWindow inherits all of the declared properties, and we would like to have shorter property names in QML. If you are working with a Window then it's obvious the title property is the window title. Unfortunately, there must be patches in many other modules which depend on this one. In order to avoid the need to merge them all at the same time, there is also patch https://codereview.qt-project.org/#change,39001 which temporarily adds backwards-compatible accessors, which can be removed after the other modules are able to build without them. We should not rename windowState to state, because in QML, state usually drives the state machine for animation transitions etc. (although QWindow is not an Item, a user might get confused about it). Related patches are https://codereview.qt-project.org/#change,39001 https://codereview.qt-project.org/#change,37764 https://codereview.qt-project.org/#change,37765 https://codereview.qt-project.org/#change,37766 https://codereview.qt-project.org/#change,37762 Change-Id: Ie4424ec15fbdef6b29b137f90a2ae33f173edd21 Reviewed-by: Samuel Rødal --- src/plugins/platforms/xcb/qxcbdrag.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/plugins/platforms/xcb/qxcbdrag.cpp') diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp b/src/plugins/platforms/xcb/qxcbdrag.cpp index 27a926eca2..cd7237e4b4 100644 --- a/src/plugins/platforms/xcb/qxcbdrag.cpp +++ b/src/plugins/platforms/xcb/qxcbdrag.cpp @@ -396,7 +396,7 @@ void QXcbDrag::move(const QMouseEvent *me) QXcbWindow *w = 0; if (target) { w = connection()->platformWindowFromId(target); - if (w && (w->window()->windowType() == Qt::Desktop) /*&& !w->acceptDrops()*/) + if (w && (w->window()->type() == Qt::Desktop) /*&& !w->acceptDrops()*/) w = 0; } else { w = 0; @@ -507,7 +507,7 @@ void QXcbDrag::drop(const QMouseEvent *event) QXcbWindow *w = connection()->platformWindowFromId(current_proxy_target); - if (w && (w->window()->windowType() == Qt::Desktop) /*&& !w->acceptDrops()*/) + if (w && (w->window()->type() == Qt::Desktop) /*&& !w->acceptDrops()*/) w = 0; Transaction t = { @@ -722,7 +722,7 @@ void QXcbDrag::handle_xdnd_position(QWindow *w, const xcb_client_message_event_t p -= geometry.topLeft(); - if (!w || (w->windowType() == Qt::Desktop)) + if (!w || (w->type() == Qt::Desktop)) return; if (e->data.data32[0] != xdnd_dragsource) { @@ -912,7 +912,7 @@ void QXcbDrag::send_leave() QXcbWindow *w = connection()->platformWindowFromId(current_proxy_target); - if (w && (w->window()->windowType() == Qt::Desktop) /*&& !w->acceptDrops()*/) + if (w && (w->window()->type() == Qt::Desktop) /*&& !w->acceptDrops()*/) w = 0; if (w) @@ -1157,7 +1157,7 @@ bool QXcbDrag::dndEnable(QXcbWindow *w, bool on) DNDDEBUG << "xdndEnable" << w << on; if (on) { QXcbWindow *xdnd_widget = 0; - if ((w->window()->windowType() == Qt::Desktop)) { + if ((w->window()->type() == Qt::Desktop)) { if (desktop_proxy) // *WE* already have one. return false; @@ -1191,7 +1191,7 @@ bool QXcbDrag::dndEnable(QXcbWindow *w, bool on) return false; } } else { - if ((w->window()->windowType() == Qt::Desktop)) { + if ((w->window()->type() == Qt::Desktop)) { xcb_delete_property(xcb_connection(), w->xcb_window(), atom(QXcbAtom::XdndProxy)); delete desktop_proxy; desktop_proxy = 0; @@ -1225,7 +1225,7 @@ QVariant QXcbDropData::xdndObtainData(const QByteArray &format, QVariant::Type r QXcbConnection *c = drag->connection(); QXcbWindow *xcb_window = c->platformWindowFromId(drag->xdnd_dragsource); - if (xcb_window && drag->currentDrag() && xcb_window->window()->windowType() != Qt::Desktop) { + if (xcb_window && drag->currentDrag() && xcb_window->window()->type() != Qt::Desktop) { QMimeData *data = drag->currentDrag()->mimeData(); if (data->hasFormat(QLatin1String(format))) result = data->data(QLatin1String(format)); -- cgit v1.2.3