mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-28 08:49:42 -05:00
Attach console in debug mode on Windows
This commit is contained in:
parent
3d10f31211
commit
c6bd22aa12
@ -30,6 +30,14 @@ WinUtils* WinUtils::instance()
|
|||||||
{
|
{
|
||||||
if (!m_instance) {
|
if (!m_instance) {
|
||||||
m_instance = new WinUtils(qApp);
|
m_instance = new WinUtils(qApp);
|
||||||
|
|
||||||
|
#ifdef QT_DEBUG
|
||||||
|
// Attach console to enable debug output
|
||||||
|
if (AttachConsole(ATTACH_PARENT_PROCESS)) {
|
||||||
|
freopen("CONOUT$", "w", stdout);
|
||||||
|
freopen("CONOUT$", "w", stderr);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_instance;
|
return m_instance;
|
||||||
|
Loading…
Reference in New Issue
Block a user