diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2012-09-13 15:30:32 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-09-26 15:48:22 +0200 |
commit | c1055700b2e1a67ff29324ede8f1be61e35c2b67 (patch) | |
tree | 526010a08c098cf8fd8aef5bb3432f3a81a029d8 /tools | |
parent | 8cd216f52b9ed29cc4faeafd3237f6ca86af4fb7 (diff) |
Tools: Use qInstallMessageHandler()
qInstallMsgHandler got deprecated in Qt 5.
Change-Id: Ibff2c3124440e8d9572536167c1c89a05cc20816
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testcon/mainwindow.cpp | 8 | ||||
-rw-r--r-- | tools/testcon/mainwindow.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tools/testcon/mainwindow.cpp b/tools/testcon/mainwindow.cpp index dab8846..9b28558 100644 --- a/tools/testcon/mainwindow.cpp +++ b/tools/testcon/mainwindow.cpp @@ -56,10 +56,10 @@ QAxObject *ax_mainWindow = 0; static QTextEdit *debuglog = 0; -static void redirectDebugOutput(QtMsgType type, const char*msg) +static void redirectDebugOutput(QtMsgType type, const QMessageLogContext &, const QString &msg) { Q_UNUSED(type); - debuglog->append(QLatin1String(msg)); + debuglog->append(msg); } QT_END_NAMESPACE @@ -80,7 +80,7 @@ MainWindow::MainWindow(QWidget *parent) dlgAmbient = 0; scripts = 0; debuglog = logDebug; - oldDebugHandler = qInstallMsgHandler(redirectDebugOutput); + oldDebugHandler = qInstallMessageHandler(redirectDebugOutput); QHBoxLayout *layout = new QHBoxLayout(Workbase); mdiArea = new QMdiArea(Workbase); layout->addWidget(mdiArea); @@ -92,7 +92,7 @@ MainWindow::MainWindow(QWidget *parent) MainWindow::~MainWindow() { - qInstallMsgHandler(oldDebugHandler); + qInstallMessageHandler(oldDebugHandler); debuglog = 0; } diff --git a/tools/testcon/mainwindow.h b/tools/testcon/mainwindow.h index 2a3799c..5a659a8 100644 --- a/tools/testcon/mainwindow.h +++ b/tools/testcon/mainwindow.h @@ -94,7 +94,7 @@ private: QAxScriptManager *scripts; QMdiArea *mdiArea; - QtMsgHandler oldDebugHandler; + QtMessageHandler oldDebugHandler; private slots: void updateGUI(); |