Cocoa: Add window debug output
Add logging for setGeometry/setVisible/propagateSizeHints. Change-Id: I3590caed586d36f789dd67b1951e8152f923a407 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
This commit is contained in:
parent
3b2d99a5c8
commit
f295ef1a4b
@ -66,3 +66,6 @@ contains(QT_CONFIG,release):CONFIG -= debug
|
|||||||
# Acccessibility debug support
|
# Acccessibility debug support
|
||||||
# DEFINES += QT_COCOA_ENABLE_ACCESSIBILITY_INSPECTOR
|
# DEFINES += QT_COCOA_ENABLE_ACCESSIBILITY_INSPECTOR
|
||||||
# include ($$PWD/../../../../util/accessibilityinspector/accessibilityinspector.pri)
|
# include ($$PWD/../../../../util/accessibilityinspector/accessibilityinspector.pri)
|
||||||
|
|
||||||
|
# Window debug support
|
||||||
|
#DEFINES += QT_COCOA_ENABLE_WINDOW_DEBUG
|
||||||
|
@ -118,6 +118,9 @@ void QCocoaWindow::setGeometry(const QRect &rect)
|
|||||||
{
|
{
|
||||||
if (geometry() == rect)
|
if (geometry() == rect)
|
||||||
return;
|
return;
|
||||||
|
#ifdef QT_COCOA_ENABLE_WINDOW_DEBUG
|
||||||
|
qDebug() << "QCocoaWindow::setGeometry" << this << rect;
|
||||||
|
#endif
|
||||||
QPlatformWindow::setGeometry(rect);
|
QPlatformWindow::setGeometry(rect);
|
||||||
|
|
||||||
NSRect bounds = qt_mac_flipRect(rect, window());
|
NSRect bounds = qt_mac_flipRect(rect, window());
|
||||||
@ -130,6 +133,9 @@ void QCocoaWindow::setGeometry(const QRect &rect)
|
|||||||
void QCocoaWindow::setVisible(bool visible)
|
void QCocoaWindow::setVisible(bool visible)
|
||||||
{
|
{
|
||||||
QCocoaAutoReleasePool pool;
|
QCocoaAutoReleasePool pool;
|
||||||
|
#ifdef QT_COCOA_ENABLE_WINDOW_DEBUG
|
||||||
|
qDebug() << "QCocoaWindow::setVisible" << this << visible;
|
||||||
|
#endif
|
||||||
if (visible) {
|
if (visible) {
|
||||||
// The parent window might have moved while this window was hidden,
|
// The parent window might have moved while this window was hidden,
|
||||||
// update the window geometry if there is a parent.
|
// update the window geometry if there is a parent.
|
||||||
@ -172,6 +178,13 @@ void QCocoaWindow::propagateSizeHints()
|
|||||||
[m_nsWindow setMinSize : qt_mac_toNSSize(window()->minimumSize())];
|
[m_nsWindow setMinSize : qt_mac_toNSSize(window()->minimumSize())];
|
||||||
[m_nsWindow setMaxSize : qt_mac_toNSSize(window()->maximumSize())];
|
[m_nsWindow setMaxSize : qt_mac_toNSSize(window()->maximumSize())];
|
||||||
|
|
||||||
|
#ifdef QT_COCOA_ENABLE_WINDOW_DEBUG
|
||||||
|
qDebug() << "QCocoaWindow::propagateSizeHints" << this;
|
||||||
|
qDebug() << " min/max " << window()->minimumSize() << window()->maximumSize();
|
||||||
|
qDebug() << " basesize" << window()->baseSize();
|
||||||
|
qDebug() << " geometry" << geometry();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!window()->sizeIncrement().isNull())
|
if (!window()->sizeIncrement().isNull())
|
||||||
[m_nsWindow setResizeIncrements : qt_mac_toNSSize(window()->sizeIncrement())];
|
[m_nsWindow setResizeIncrements : qt_mac_toNSSize(window()->sizeIncrement())];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user