Fix build with QT_NO_CURSOR.

Just moved applyCursor() and defaultCursor() to a #ifndef block.

Change-Id: I14c21aa509395fb1bd72d389cfc46f0f34ab7649
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
Sérgio Martins 2013-07-31 13:29:17 +01:00 committed by The Qt Project
parent c707bb4414
commit 0ec917123f

View File

@ -1795,6 +1795,7 @@ void QWindowsWindow::getSizeHints(MINMAXINFO *mmi) const
}
#endif // !Q_OS_WINCE
#ifndef QT_NO_CURSOR
// Return the default cursor (Arrow) from QWindowsCursor's cache.
static inline QWindowsWindowCursor defaultCursor(const QWindow *w)
{
@ -1805,6 +1806,24 @@ static inline QWindowsWindowCursor defaultCursor(const QWindow *w)
return QWindowsWindowCursor(Qt::ArrowCursor);
}
// Check whether to apply a new cursor. Either the window in question is
// currently under mouse, or it is the parent of the window under mouse and
// there is no other window with an explicitly set cursor in-between.
static inline bool applyNewCursor(const QWindow *w)
{
const QWindow *underMouse = QWindowsContext::instance()->windowUnderMouse();
if (underMouse == w)
return true;
for (const QWindow *p = underMouse; p ; p = p->parent()) {
if (p == w)
return true;
if (!QWindowsWindow::baseWindowOf(p)->cursor().isNull())
return false;
}
return false;
}
#endif // !QT_NO_CURSOR
/*!
\brief Applies to cursor property set on the window to the global cursor.
@ -1826,23 +1845,6 @@ void QWindowsWindow::applyCursor()
#endif
}
// Check whether to apply a new cursor. Either the window in question is
// currently under mouse, or it is the parent of the window under mouse and
// there is no other window with an explicitly set cursor in-between.
static inline bool applyNewCursor(const QWindow *w)
{
const QWindow *underMouse = QWindowsContext::instance()->windowUnderMouse();
if (underMouse == w)
return true;
for (const QWindow *p = underMouse; p ; p = p->parent()) {
if (p == w)
return true;
if (!QWindowsWindow::baseWindowOf(p)->cursor().isNull())
return false;
}
return false;
}
void QWindowsWindow::setCursor(const QWindowsWindowCursor &c)
{
#ifndef QT_NO_CURSOR