summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2012-09-12 09:56:51 +0200
committerQt by Nokia <qt-info@nokia.com>2012-09-14 15:23:15 +0200
commit823e119fa810081d1a9db30ff0c96c6f1cb97667 (patch)
tree770022c0f66226d18d3b333a49d54d04f66b62ed /src/widgets/dialogs
parent1dd4790aeef17f056840bfea6c438075adbaaa03 (diff)
QErrorMessage: Use qInstallMessageHandler instead of qInstallMsgHandler
qInstallMsgHandler got deprecated in Qt 5. Use qInstallMessageHandler instead. Change-Id: Ie1156ca11eb6be555c681007ddc230978211d029 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r--src/widgets/dialogs/qerrormessage.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/widgets/dialogs/qerrormessage.cpp b/src/widgets/dialogs/qerrormessage.cpp
index 664fd8b423..bdc14f5983 100644
--- a/src/widgets/dialogs/qerrormessage.cpp
+++ b/src/widgets/dialogs/qerrormessage.cpp
@@ -153,7 +153,7 @@ QSize QErrorMessageTextView::sizeHint() const
connecting signals to it.
The static qtHandler() function installs a message handler
- using qInstallMsgHandler() and creates a QErrorMessage that displays
+ using qInstallMessageHandler() and creates a QErrorMessage that displays
qDebug(), qWarning() and qFatal() messages. This is most useful in
environments where no console is available to display warnings and
error messages.
@@ -184,7 +184,7 @@ static void deleteStaticcQErrorMessage() // post-routine
static bool metFatal = false;
-static void jump(QtMsgType t, const char * m)
+static void jump(QtMsgType t, const QMessageLogContext & /*context*/, const QString &m)
{
if (!qtMessageHandler)
return;
@@ -203,7 +203,7 @@ static void jump(QtMsgType t, const char * m)
rich = QErrorMessage::tr("Fatal Error:");
}
rich = QString::fromLatin1("<p><b>%1</b></p>").arg(rich);
- rich += Qt::convertFromPlainText(QLatin1String(m), Qt::WhiteSpaceNormal);
+ rich += Qt::convertFromPlainText(m, Qt::WhiteSpaceNormal);
// ### work around text engine quirk
if (rich.endsWith(QLatin1String("</p>")))
@@ -273,10 +273,10 @@ QErrorMessage::~QErrorMessage()
{
if (this == qtMessageHandler) {
qtMessageHandler = 0;
- QtMsgHandler tmp = qInstallMsgHandler(0);
+ QtMessageHandler tmp = qInstallMessageHandler(0);
// in case someone else has later stuck in another...
if (tmp != jump)
- qInstallMsgHandler(tmp);
+ qInstallMessageHandler(tmp);
}
}
@@ -314,7 +314,7 @@ QErrorMessage * QErrorMessage::qtHandler()
qtMessageHandler = new QErrorMessage(0);
qAddPostRoutine(deleteStaticcQErrorMessage); // clean up
qtMessageHandler->setWindowTitle(QApplication::applicationName());
- qInstallMsgHandler(jump);
+ qInstallMessageHandler(jump);
}
return qtMessageHandler;
}