MessageManager: Remove old API for writing messages

In favor of the more evocative method names.

Fixes: QTCREATORBUG-24430
Change-Id: Iec9bcd4436807bfbf10f8dfa24d09c132706fe62
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Eike Ziller
2020-12-17 10:36:17 +01:00
parent fb64cb12bc
commit 4dc136b75a
2 changed files with 0 additions and 64 deletions

View File

@@ -100,7 +100,6 @@ MessageManager::MessageManager()
{
m_instance = this;
m_messageOutputWindow = nullptr;
qRegisterMetaType<MessageManager::PrintToOutputPaneFlags>();
}
/*!
@@ -215,51 +214,4 @@ void MessageManager::writeDisrupting(const QStringList &messages)
writeDisrupting(messages.join('\n'));
}
/*!
\internal
*/
static void showOutputPaneOld(Core::MessageManager::PrintToOutputPaneFlags flags)
{
QTC_ASSERT(m_messageOutputWindow, return);
if (flags & MessageManager::Flash) {
m_messageOutputWindow->flash();
} else if (flags & MessageManager::Silent) {
// Do nothing
} else {
m_messageOutputWindow->popup(IOutputPane::Flag(int(flags)));
}
}
/*!
\internal
*/
static void doWriteOld(const QString &text, MessageManager::PrintToOutputPaneFlags flags)
{
QTC_ASSERT(m_messageOutputWindow, return);
showOutputPaneOld(flags);
m_messageOutputWindow->append(text + '\n');
}
/*!
\internal
*/
void MessageManager::write(const QString &text, PrintToOutputPaneFlags flags)
{
if (QThread::currentThread() == instance()->thread())
doWriteOld(text, flags);
else
QTimer::singleShot(0, instance(), [text, flags] { doWriteOld(text, flags); });
}
/*!
\internal
*/
void MessageManager::writeWithTime(const QString &text, PrintToOutputPaneFlags flags)
{
const QString timeStamp = QTime::currentTime().toString("HH:mm:ss ");
write(timeStamp + text, flags);
}
} // namespace Core