Clean up QWindowsSessionManager.
Fix spelling error in method name and inline simple functions. Change-Id: I7f2a67fb1951b58874b09002ee57e15e75561727 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
This commit is contained in:
parent
450d3efcb1
commit
d1870d9036
@ -844,7 +844,7 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
|
||||
case QtWindows::InputMethodKeyDownEvent:
|
||||
case QtWindows::KeyboardLayoutChangeEvent:
|
||||
#if !defined(Q_OS_WINCE) && !defined(QT_NO_SESSIONMANAGER)
|
||||
return platformSessionManager()->isInterractionBlocked() ? true : d->m_keyMapper.translateKeyEvent(platformWindow->window(), hwnd, msg, result);
|
||||
return platformSessionManager()->isInteractionBlocked() ? true : d->m_keyMapper.translateKeyEvent(platformWindow->window(), hwnd, msg, result);
|
||||
#else
|
||||
return d->m_keyMapper.translateKeyEvent(platformWindow->window(), hwnd, msg, result);
|
||||
#endif
|
||||
@ -868,7 +868,7 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
|
||||
case QtWindows::NonClientMouseEvent:
|
||||
if (platformWindow->frameStrutEventsEnabled())
|
||||
#if !defined(Q_OS_WINCE) && !defined(QT_NO_SESSIONMANAGER)
|
||||
return platformSessionManager()->isInterractionBlocked() ? true : d->m_mouseHandler.translateMouseEvent(platformWindow->window(), hwnd, et, msg, result);
|
||||
return platformSessionManager()->isInteractionBlocked() ? true : d->m_mouseHandler.translateMouseEvent(platformWindow->window(), hwnd, et, msg, result);
|
||||
#else
|
||||
return d->m_mouseHandler.translateMouseEvent(platformWindow->window(), hwnd, et, msg, result);
|
||||
#endif
|
||||
@ -888,13 +888,13 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
|
||||
case QtWindows::MouseEvent:
|
||||
case QtWindows::LeaveEvent:
|
||||
#if !defined(Q_OS_WINCE) && !defined(QT_NO_SESSIONMANAGER)
|
||||
return platformSessionManager()->isInterractionBlocked() ? true : d->m_mouseHandler.translateMouseEvent(platformWindow->window(), hwnd, et, msg, result);
|
||||
return platformSessionManager()->isInteractionBlocked() ? true : d->m_mouseHandler.translateMouseEvent(platformWindow->window(), hwnd, et, msg, result);
|
||||
#else
|
||||
return d->m_mouseHandler.translateMouseEvent(platformWindow->window(), hwnd, et, msg, result);
|
||||
#endif
|
||||
case QtWindows::TouchEvent:
|
||||
#if !defined(Q_OS_WINCE) && !defined(QT_NO_SESSIONMANAGER)
|
||||
return platformSessionManager()->isInterractionBlocked() ? true : d->m_mouseHandler.translateTouchEvent(platformWindow->window(), hwnd, et, msg, result);
|
||||
return platformSessionManager()->isInteractionBlocked() ? true : d->m_mouseHandler.translateTouchEvent(platformWindow->window(), hwnd, et, msg, result);
|
||||
#else
|
||||
return d->m_mouseHandler.translateTouchEvent(platformWindow->window(), hwnd, et, msg, result);
|
||||
#endif
|
||||
|
@ -52,10 +52,6 @@ QWindowsSessionManager::QWindowsSessionManager(const QString &id, const QString
|
||||
{
|
||||
}
|
||||
|
||||
QWindowsSessionManager::~QWindowsSessionManager()
|
||||
{
|
||||
}
|
||||
|
||||
bool QWindowsSessionManager::allowsInteraction()
|
||||
{
|
||||
m_blockUserInput = false;
|
||||
@ -68,16 +64,6 @@ bool QWindowsSessionManager::allowsErrorInteraction()
|
||||
return true;
|
||||
}
|
||||
|
||||
void QWindowsSessionManager::blocksInteraction()
|
||||
{
|
||||
m_blockUserInput = true;
|
||||
}
|
||||
|
||||
bool QWindowsSessionManager::isInterractionBlocked() const
|
||||
{
|
||||
return m_blockUserInput;
|
||||
}
|
||||
|
||||
void QWindowsSessionManager::release()
|
||||
{
|
||||
if (m_isActive)
|
||||
@ -89,24 +75,4 @@ void QWindowsSessionManager::cancel()
|
||||
m_canceled = true;
|
||||
}
|
||||
|
||||
void QWindowsSessionManager::clearCancellation()
|
||||
{
|
||||
m_canceled = false;
|
||||
}
|
||||
|
||||
bool QWindowsSessionManager::wasCanceled() const
|
||||
{
|
||||
return m_canceled;
|
||||
}
|
||||
|
||||
void QWindowsSessionManager::setActive(bool active)
|
||||
{
|
||||
m_isActive = active;
|
||||
}
|
||||
|
||||
bool QWindowsSessionManager::isActive() const
|
||||
{
|
||||
return m_isActive;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -60,22 +60,21 @@ class QWindowsSessionManager : public QPlatformSessionManager
|
||||
{
|
||||
public:
|
||||
explicit QWindowsSessionManager(const QString &id, const QString &key);
|
||||
virtual ~QWindowsSessionManager();
|
||||
|
||||
bool allowsInteraction() Q_DECL_OVERRIDE;
|
||||
bool allowsErrorInteraction() Q_DECL_OVERRIDE;
|
||||
|
||||
void blocksInteraction();
|
||||
bool isInterractionBlocked() const;
|
||||
void blocksInteraction() { m_blockUserInput = true; }
|
||||
bool isInteractionBlocked() const { return m_blockUserInput; }
|
||||
|
||||
void release() Q_DECL_OVERRIDE;
|
||||
|
||||
void cancel() Q_DECL_OVERRIDE;
|
||||
void clearCancellation();
|
||||
bool wasCanceled() const;
|
||||
void clearCancellation() { m_canceled = false; }
|
||||
bool wasCanceled() const { return m_canceled; }
|
||||
|
||||
void setActive(bool active);
|
||||
bool isActive() const;
|
||||
void setActive(bool active) { m_isActive = active; }
|
||||
bool isActive() const { return m_isActive;}
|
||||
|
||||
private:
|
||||
bool m_isActive;
|
||||
|
Loading…
Reference in New Issue
Block a user