summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <dangelog@gmail.com>2011-12-14 23:35:12 +0000
committerQt by Nokia <qt-info@nokia.com>2011-12-15 05:48:27 +0100
commitbe6b29f001eb56f1f8c963e9fcd1ad17d92eb0d7 (patch)
tree1e1de8b0ef40071ef2b75da8345fb6af91f4c2cb
parentd936fe085894f58451a6f36c46377ac507f09170 (diff)
Fix typos in QObject::(dis)connect warnings
For some strange reason "Object::method ..." was printed, without the leading Q. Change-Id: I10b99e8aa8730e4020d15b3e04a01004bade76c3 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
-rw-r--r--src/corelib/kernel/qobject.cpp22
-rw-r--r--tests/auto/corelib/kernel/qobject/tst_qobject.cpp2
2 files changed, 12 insertions, 12 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index da06fc6433..7c1b340e80 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -1947,10 +1947,10 @@ static bool check_signal_macro(const QObject *sender, const char *signal,
int sigcode = extract_code(signal);
if (sigcode != QSIGNAL_CODE) {
if (sigcode == QSLOT_CODE)
- qWarning("Object::%s: Attempt to %s non-signal %s::%s",
+ qWarning("QObject::%s: Attempt to %s non-signal %s::%s",
func, op, sender->metaObject()->className(), signal+1);
else
- qWarning("Object::%s: Use the SIGNAL macro to %s %s::%s",
+ qWarning("QObject::%s: Use the SIGNAL macro to %s %s::%s",
func, op, sender->metaObject()->className(), signal);
return false;
}
@@ -1961,7 +1961,7 @@ static bool check_method_code(int code, const QObject *object,
const char *method, const char *func)
{
if (code != QSLOT_CODE && code != QSIGNAL_CODE) {
- qWarning("Object::%s: Use the SLOT or SIGNAL macro to "
+ qWarning("QObject::%s: Use the SLOT or SIGNAL macro to "
"%s %s::%s", func, func, object->metaObject()->className(), method);
return false;
}
@@ -1978,11 +1978,11 @@ static void err_method_notfound(const QObject *object,
}
const char *loc = extract_location(method);
if (strchr(method,')') == 0) // common typing mistake
- qWarning("Object::%s: Parentheses expected, %s %s::%s%s%s",
+ qWarning("QObject::%s: Parentheses expected, %s %s::%s%s%s",
func, type, object->metaObject()->className(), method+1,
loc ? " in ": "", loc ? loc : "");
else
- qWarning("Object::%s: No such %s %s::%s%s%s",
+ qWarning("QObject::%s: No such %s %s::%s%s%s",
func, type, object->metaObject()->className(), method+1,
loc ? " in ": "", loc ? loc : "");
@@ -1996,9 +1996,9 @@ static void err_info_about_objects(const char * func,
QString a = sender ? sender->objectName() : QString();
QString b = receiver ? receiver->objectName() : QString();
if (!a.isEmpty())
- qWarning("Object::%s: (sender name: '%s')", func, a.toLocal8Bit().data());
+ qWarning("QObject::%s: (sender name: '%s')", func, a.toLocal8Bit().data());
if (!b.isEmpty())
- qWarning("Object::%s: (receiver name: '%s')", func, b.toLocal8Bit().data());
+ qWarning("QObject::%s: (receiver name: '%s')", func, b.toLocal8Bit().data());
}
/*!
@@ -2578,7 +2578,7 @@ bool QObject::disconnect(const QObject *sender, const char *signal,
const QObject *receiver, const char *method)
{
if (sender == 0 || (receiver == 0 && method != 0)) {
- qWarning("Object::disconnect: Unexpected null parameter");
+ qWarning("QObject::disconnect: Unexpected null parameter");
return false;
}
@@ -2703,12 +2703,12 @@ bool QObject::disconnect(const QObject *sender, const QMetaMethod &signal,
const QObject *receiver, const QMetaMethod &method)
{
if (sender == 0 || (receiver == 0 && method.mobj != 0)) {
- qWarning("Object::disconnect: Unexpected null parameter");
+ qWarning("QObject::disconnect: Unexpected null parameter");
return false;
}
if (signal.mobj) {
if(signal.methodType() != QMetaMethod::Signal) {
- qWarning("Object::%s: Attempt to %s non-signal %s::%s",
+ qWarning("QObject::%s: Attempt to %s non-signal %s::%s",
"disconnect","unbind",
sender->metaObject()->className(), signal.signature());
return false;
@@ -4160,7 +4160,7 @@ bool QObject::disconnect(const QMetaObject::Connection &connection)
bool QObject::disconnectImpl(const QObject *sender, void **signal, const QObject *receiver, void **slot, const QMetaObject *senderMetaObject)
{
if (sender == 0 || (receiver == 0 && slot != 0)) {
- qWarning("Object::disconnect: Unexpected null parameter");
+ qWarning("QObject::disconnect: Unexpected null parameter");
return false;
}
diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
index 05b9229c3d..225e06a552 100644
--- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
+++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
@@ -3999,7 +3999,7 @@ void tst_QObject::disconnectNotSignalMetaMethod()
QMetaMethod slot = s.metaObject()->method(
s.metaObject()->indexOfMethod("aPublicSlot()"));
- QTest::ignoreMessage(QtWarningMsg,"Object::disconnect: Attempt to unbind non-signal SenderObject::aPublicSlot()");
+ QTest::ignoreMessage(QtWarningMsg,"QObject::disconnect: Attempt to unbind non-signal SenderObject::aPublicSlot()");
QVERIFY(!QObject::disconnect(&s, slot, &r, QMetaMethod()));
}