MessageManager: Replace early return with QTC_ASSERT

Change-Id: I54545365c71bed41eb12ec4d1e2e626bd39cd27d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Andre Hartmann
2019-03-18 17:56:22 +01:00
committed by André Hartmann
parent 1b56fe716f
commit 198b1f5fa5

View File

@@ -40,8 +40,8 @@ MessageManager *MessageManager::instance()
void MessageManager::showOutputPane(Core::MessageManager::PrintToOutputPaneFlags flags) void MessageManager::showOutputPane(Core::MessageManager::PrintToOutputPaneFlags flags)
{ {
if (!m_messageOutputWindow) QTC_ASSERT(m_messageOutputWindow, return);
return;
if (flags & Flash) { if (flags & Flash) {
m_messageOutputWindow->flash(); m_messageOutputWindow->flash();
} else if (flags & Silent) { } else if (flags & Silent) {
@@ -75,8 +75,8 @@ void MessageManager::init()
void MessageManager::write(const QString &text, PrintToOutputPaneFlags flags) void MessageManager::write(const QString &text, PrintToOutputPaneFlags flags)
{ {
if (!m_messageOutputWindow) QTC_ASSERT(m_messageOutputWindow, return);
return;
showOutputPane(flags); showOutputPane(flags);
m_messageOutputWindow->append(text + QLatin1Char('\n')); m_messageOutputWindow->append(text + QLatin1Char('\n'));
} }