MessageManager: General cleanup.

Apply 'static' pattern, rename 'printToOutputPane' to 'write'

Change-Id: I6f31f1a8c914661e2a2182c0b6256b41ead28de7
Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
hjk
2013-09-05 01:52:17 +02:00
parent aadb6f16af
commit 527046acc2
18 changed files with 83 additions and 96 deletions

View File

@@ -253,8 +253,7 @@ static QString qmldumpFailedMessage(const QString &libraryPath, const QString &e
static void printParseWarnings(const QString &libraryPath, const QString &warning)
{
Core::MessageManager *messageManager = Core::MessageManager::instance();
messageManager->printToOutputPane(
Core::MessageManager::write(
PluginDumper::tr("Warnings while parsing qmltypes information of %1:\n"
"%2").arg(libraryPath, warning),
Core::MessageManager::Flash);
@@ -314,9 +313,8 @@ void PluginDumper::qmlPluginTypeDumpDone(int exitCode)
LibraryInfo libraryInfo = snapshot.libraryInfo(libraryPath);
if (exitCode != 0) {
Core::MessageManager *messageManager = Core::MessageManager::instance();
const QString errorMessages = qmlPluginDumpErrorMessage(process);
messageManager->printToOutputPane(qmldumpErrorMessage(libraryPath, errorMessages),
Core::MessageManager::write(qmldumpErrorMessage(libraryPath, errorMessages),
Core::MessageManager::Flash);
libraryInfo.setPluginTypeInfoStatus(LibraryInfo::DumpError, qmldumpFailedMessage(libraryPath, errorMessages));
}
@@ -356,9 +354,8 @@ void PluginDumper::qmlPluginTypeDumpError(QProcess::ProcessError)
if (libraryPath.isEmpty())
return;
Core::MessageManager *messageManager = Core::MessageManager::instance();
const QString errorMessages = qmlPluginDumpErrorMessage(process);
messageManager->printToOutputPane(qmldumpErrorMessage(libraryPath, errorMessages),
Core::MessageManager::write(qmldumpErrorMessage(libraryPath, errorMessages),
Core::MessageManager::Flash);
if (!libraryPath.isEmpty()) {
const Snapshot snapshot = m_modelManager->snapshot();