QShortcutMap: enable extra debugging when Dump_QShortcutMap is defined

Dump_QShortcutMap is already made available in qshortcutmap_p.h, and if
set, "void dumpMap() const;" will be available to help debugging.
But unless QDebug &operator<< in qshortcutmap.cpp is also defined, the
dumpMap output will be pretty useless.

Change-Id: If8d535998ec01686eca25da73c2220062820a927
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
This commit is contained in:
Richard Moe Gustavsen 2015-09-03 14:28:18 +02:00 committed by Jędrzej Nowacki
parent 361a4c1994
commit 0a00782608

View File

@ -84,7 +84,7 @@ struct QShortcutEntry
QShortcutMap::ContextMatcher contextMatcher;
};
#if 0 //ndef QT_NO_DEBUG_STREAM
#ifdef Dump_QShortcutMap
/*! \internal
QDebug operator<< for easy debug output of the shortcut entries.
*/
@ -99,7 +99,7 @@ static QDebug &operator<<(QDebug &dbg, const QShortcutEntry *se)
<< "), owner(" << se->owner << ')';
return dbg;
}
#endif // QT_NO_DEBUGSTREAM
#endif // Dump_QShortcutMap
/* \internal
Private data for QShortcutMap