summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp6
-rw-r--r--tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp8
-rw-r--r--tools/qml/loggerwidget.cpp4
-rw-r--r--tools/qml/loggerwidget.h3
-rw-r--r--tools/qml/main.cpp3
5 files changed, 13 insertions, 11 deletions
diff --git a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp
index aee8ef1..a19c2c2 100644
--- a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp
+++ b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp
@@ -74,13 +74,13 @@ private slots:
void tst_QDeclarativeDebugClient::initTestCase()
{
- QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 3768...");
+ QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 3770...");
- qputenv("QML_DEBUG_SERVER_PORT", "3768");
+ qputenv("QML_DEBUG_SERVER_PORT", "3770");
new QDeclarativeEngine(this);
m_conn = new QDeclarativeDebugConnection(this);
- m_conn->connectToHost("127.0.0.1", 3768);
+ m_conn->connectToHost("127.0.0.1", 3770);
QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Connection established");
bool ok = m_conn->waitForConnected();
diff --git a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp
index f07f0ca..9ebbbaf 100644
--- a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp
+++ b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp
@@ -76,12 +76,12 @@ private slots:
void tst_QDeclarativeDebugService::initTestCase()
{
- QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 3768...");
- qputenv("QML_DEBUG_SERVER_PORT", "3768");
+ QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 3769...");
+ qputenv("QML_DEBUG_SERVER_PORT", "3769");
new QDeclarativeEngine(this);
m_conn = new QDeclarativeDebugConnection(this);
- m_conn->connectToHost("127.0.0.1", 3768);
+ m_conn->connectToHost("127.0.0.1", 3769);
QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Connection established");
bool ok = m_conn->waitForConnected();
@@ -154,7 +154,7 @@ void tst_QDeclarativeDebugService::idForObject()
int idB = QDeclarativeDebugService::idForObject(objB);
QVERIFY(idB != idA);
QCOMPARE(QDeclarativeDebugService::objectForId(idB), objB);
-
+
delete objA;
delete objB;
}
diff --git a/tools/qml/loggerwidget.cpp b/tools/qml/loggerwidget.cpp
index c5548b7..015d1b0 100644
--- a/tools/qml/loggerwidget.cpp
+++ b/tools/qml/loggerwidget.cpp
@@ -53,9 +53,9 @@ LoggerWidget::LoggerWidget(QWidget *parent) :
setWindowTitle(tr("Qt Declarative UI Viewer - Logger"));
}
-void LoggerWidget::append(QtMsgType /*type*/, const char *msg)
+void LoggerWidget::append(const QString &msg)
{
- appendPlainText(QString::fromAscii(msg));
+ appendPlainText(msg);
if (!m_keepClosed && !isVisible())
setVisible(true);
diff --git a/tools/qml/loggerwidget.h b/tools/qml/loggerwidget.h
index 938431c..5c4a701 100644
--- a/tools/qml/loggerwidget.h
+++ b/tools/qml/loggerwidget.h
@@ -50,7 +50,8 @@ class LoggerWidget : public QPlainTextEdit {
Q_OBJECT
public:
LoggerWidget(QWidget *parent=0);
- void append(QtMsgType type, const char *msg);
+public slots:
+ void append(const QString &msg);
protected:
void closeEvent(QCloseEvent *event);
private:
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index a79e1b1..e90d729 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -93,7 +93,8 @@ void showWarnings()
void myMessageOutput(QtMsgType type, const char *msg)
{
if (!logger.isNull()) {
- logger.data()->append(type, msg);
+ QString strMsg = QString::fromAscii(msg);
+ QMetaObject::invokeMethod(logger.data(), "append", Q_ARG(QString, strMsg));
} else {
warnings += msg;
warnings += QLatin1Char('\n');