From 96f2365cf4cebc074c3171878dcd25ce19ee7486 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Sat, 18 Feb 2012 23:16:24 +0100 Subject: Rename QMetaMethod::signature() to methodSignature() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In Qt5 the meta-data format will be changed to not store the method signature string explicitly; the signature will be reconstructed on demand from the method name and parameter type information. The QMetaMethod::signature() method returns a const char pointer. Changing the return type to QByteArray can lead to silent bugs due to the implicit conversion to char *. Even though it's a source- incompatible change, it's therefore better to introduce a new function, methodSignature(), and remove the old signature(). Task-number: QTBUG-24154 Change-Id: Ib3579dedd27a3c7c8914d5f1b231947be2cf4027 Reviewed-by: Olivier Goffart Reviewed-by: Lars Knoll Reviewed-by: Thiago Macieira Reviewed-by: João Abecasis --- tests/benchmarks/corelib/kernel/qmetaobject/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/benchmarks/corelib') diff --git a/tests/benchmarks/corelib/kernel/qmetaobject/main.cpp b/tests/benchmarks/corelib/kernel/qmetaobject/main.cpp index ab26158f9a..6d7c5c3853 100644 --- a/tests/benchmarks/corelib/kernel/qmetaobject/main.cpp +++ b/tests/benchmarks/corelib/kernel/qmetaobject/main.cpp @@ -174,7 +174,7 @@ void tst_qmetaobject::indexOfMethod_data() const QMetaObject *mo = &QTreeView::staticMetaObject; for (int i = 0; i < mo->methodCount(); ++i) { QMetaMethod method = mo->method(i); - QByteArray sig = method.signature(); + QByteArray sig = method.methodSignature(); QTest::newRow(sig) << sig; } } @@ -197,7 +197,7 @@ void tst_qmetaobject::indexOfSignal_data() QMetaMethod method = mo->method(i); if (method.methodType() != QMetaMethod::Signal) continue; - QByteArray sig = method.signature(); + QByteArray sig = method.methodSignature(); QTest::newRow(sig) << sig; } } @@ -220,7 +220,7 @@ void tst_qmetaobject::indexOfSlot_data() QMetaMethod method = mo->method(i); if (method.methodType() != QMetaMethod::Slot) continue; - QByteArray sig = method.signature(); + QByteArray sig = method.methodSignature(); QTest::newRow(sig) << sig; } } -- cgit v1.2.3