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:
parent
c707bb4414
commit
0ec917123f
@ -1795,6 +1795,7 @@ void QWindowsWindow::getSizeHints(MINMAXINFO *mmi) const
|
|||||||
}
|
}
|
||||||
#endif // !Q_OS_WINCE
|
#endif // !Q_OS_WINCE
|
||||||
|
|
||||||
|
#ifndef QT_NO_CURSOR
|
||||||
// Return the default cursor (Arrow) from QWindowsCursor's cache.
|
// Return the default cursor (Arrow) from QWindowsCursor's cache.
|
||||||
static inline QWindowsWindowCursor defaultCursor(const QWindow *w)
|
static inline QWindowsWindowCursor defaultCursor(const QWindow *w)
|
||||||
{
|
{
|
||||||
@ -1805,6 +1806,24 @@ static inline QWindowsWindowCursor defaultCursor(const QWindow *w)
|
|||||||
return QWindowsWindowCursor(Qt::ArrowCursor);
|
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.
|
\brief Applies to cursor property set on the window to the global cursor.
|
||||||
|
|
||||||
@ -1826,23 +1845,6 @@ void QWindowsWindow::applyCursor()
|
|||||||
#endif
|
#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)
|
void QWindowsWindow::setCursor(const QWindowsWindowCursor &c)
|
||||||
{
|
{
|
||||||
#ifndef QT_NO_CURSOR
|
#ifndef QT_NO_CURSOR
|
||||||
|
Loading…
x
Reference in New Issue
Block a user