Update the error codes in QtDBus
Change the old com.trolltech ones to org.qtproject and introduce Use the alternate domain name for the Qt Project because the dash character is not valid in interface and error names. Task-number: QTBUG-23274 Change-Id: Iac1699e70525d67f983c10560932acff6b2ecde6 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>bb10
parent
51fecf80b7
commit
65e75acd05
|
|
@ -93,12 +93,12 @@ org.freedesktop.DBus.Error.UnknownMethod
|
|||
org.freedesktop.DBus.Error.TimedOut
|
||||
org.freedesktop.DBus.Error.InvalidSignature
|
||||
org.freedesktop.DBus.Error.UnknownInterface
|
||||
com.trolltech.QtDBus.Error.InternalError
|
||||
org.freedesktop.DBus.Error.UnknownObject
|
||||
com.trolltech.QtDBus.Error.InvalidService
|
||||
com.trolltech.QtDBus.Error.InvalidObjectPath
|
||||
com.trolltech.QtDBus.Error.InvalidInterface
|
||||
com.trolltech.QtDBus.Error.InvalidMember
|
||||
org.qtproject.QtDBus.Error.InternalError
|
||||
org.qtproject.QtDBus.Error.InvalidService
|
||||
org.qtproject.QtDBus.Error.InvalidObjectPath
|
||||
org.qtproject.QtDBus.Error.InvalidInterface
|
||||
org.qtproject.QtDBus.Error.InvalidMember
|
||||
*/
|
||||
|
||||
// in the same order as KnownErrors!
|
||||
|
|
@ -122,19 +122,19 @@ static const char errorMessages_string[] =
|
|||
"org.freedesktop.DBus.Error.TimedOut\0"
|
||||
"org.freedesktop.DBus.Error.InvalidSignature\0"
|
||||
"org.freedesktop.DBus.Error.UnknownInterface\0"
|
||||
"com.trolltech.QtDBus.Error.InternalError\0"
|
||||
"org.freedesktop.DBus.Error.UnknownObject\0"
|
||||
"com.trolltech.QtDBus.Error.InvalidService\0"
|
||||
"com.trolltech.QtDBus.Error.InvalidObjectPath\0"
|
||||
"com.trolltech.QtDBus.Error.InvalidInterface\0"
|
||||
"com.trolltech.QtDBus.Error.InvalidMember\0"
|
||||
"org.qtproject.QtDBus.Error.InternalError\0"
|
||||
"org.qtproject.QtDBus.Error.InvalidService\0"
|
||||
"org.qtproject.QtDBus.Error.InvalidObjectPath\0"
|
||||
"org.qtproject.QtDBus.Error.InvalidInterface\0"
|
||||
"org.qtproject.QtDBus.Error.InvalidMember\0"
|
||||
"\0";
|
||||
|
||||
static const int errorMessages_indices[] = {
|
||||
0, 6, 40, 76, 118, 153, 191, 231,
|
||||
273, 313, 349, 384, 421, 461, 501, 540,
|
||||
581, 617, 661, 705, 746, 787, 829, 874,
|
||||
918, 0
|
||||
0, 6, 40, 76, 118, 153, 191, 231,
|
||||
273, 313, 349, 384, 421, 461, 501, 540,
|
||||
581, 617, 661, 705, 746, 787, 829, 874,
|
||||
918, -1
|
||||
};
|
||||
|
||||
static const int errorMessages_count = sizeof errorMessages_indices /
|
||||
|
|
@ -226,9 +226,12 @@ static inline QDBusError::ErrorType get(const char *name)
|
|||
(\c org.freedesktop.DBus.Error.TimedOut)
|
||||
\value InvalidSignature The type signature is not valid or compatible
|
||||
(\c org.freedesktop.DBus.Error.InvalidSignature)
|
||||
\value UnknownInterface The interface is not known
|
||||
\value UnknownInterface The interface is not known in this object
|
||||
(\c org.freedesktop.DBus.Error.UnknownInterface)
|
||||
\value UnknownObject The object path points to an object that does not exist
|
||||
(\c org.freedesktop.DBus.Error.UnknownObject)
|
||||
|
||||
\value InternalError An internal error occurred
|
||||
(\c com.trolltech.QtDBus.Error.InternalError)
|
||||
|
||||
\value InvalidObjectPath The object path provided is invalid.
|
||||
|
||||
|
|
@ -237,8 +240,6 @@ static inline QDBusError::ErrorType get(const char *name)
|
|||
\value InvalidMember The member is invalid.
|
||||
|
||||
\value InvalidInterface The interface is invalid.
|
||||
|
||||
\value UnknownObject The remote object could not be found.
|
||||
*/
|
||||
|
||||
#ifndef QT_BOOTSTRAPPED
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@ public:
|
|||
TimedOut,
|
||||
InvalidSignature,
|
||||
UnknownInterface,
|
||||
InternalError,
|
||||
UnknownObject,
|
||||
InternalError,
|
||||
InvalidService,
|
||||
InvalidObjectPath,
|
||||
InvalidInterface,
|
||||
|
|
|
|||
|
|
@ -1034,9 +1034,9 @@ void tst_QDBusAbstractInterface::createErrors_data()
|
|||
QTest::addColumn<QString>("path");
|
||||
QTest::addColumn<QString>("errorName");
|
||||
|
||||
QTest::newRow("invalid-service") << "this isn't valid" << "/" << "com.trolltech.QtDBus.Error.InvalidService";
|
||||
QTest::newRow("invalid-service") << "this isn't valid" << "/" << "org.qtproject.QtDBus.Error.InvalidService";
|
||||
QTest::newRow("invalid-path") << QDBusConnection::sessionBus().baseService() << "this isn't valid"
|
||||
<< "com.trolltech.QtDBus.Error.InvalidObjectPath";
|
||||
<< "org.qtproject.QtDBus.Error.InvalidObjectPath";
|
||||
}
|
||||
|
||||
void tst_QDBusAbstractInterface::createErrors()
|
||||
|
|
@ -1055,7 +1055,7 @@ void tst_QDBusAbstractInterface::createErrorsPeer_data()
|
|||
QTest::addColumn<QString>("path");
|
||||
QTest::addColumn<QString>("errorName");
|
||||
|
||||
QTest::newRow("invalid-path") << "this isn't valid" << "com.trolltech.QtDBus.Error.InvalidObjectPath";
|
||||
QTest::newRow("invalid-path") << "this isn't valid" << "org.qtproject.QtDBus.Error.InvalidObjectPath";
|
||||
}
|
||||
|
||||
void tst_QDBusAbstractInterface::createErrorsPeer()
|
||||
|
|
@ -1071,10 +1071,10 @@ void tst_QDBusAbstractInterface::createErrorsPeer()
|
|||
void tst_QDBusAbstractInterface::callErrors_data()
|
||||
{
|
||||
createErrors_data();
|
||||
QTest::newRow("service-wildcard") << QString() << "/" << "com.trolltech.QtDBus.Error.InvalidService";
|
||||
QTest::newRow("service-wildcard") << QString() << "/" << "org.qtproject.QtDBus.Error.InvalidService";
|
||||
QTest::newRow("path-wildcard") << QDBusConnection::sessionBus().baseService() << QString()
|
||||
<< "com.trolltech.QtDBus.Error.InvalidObjectPath";
|
||||
QTest::newRow("full-wildcard") << QString() << QString() << "com.trolltech.QtDBus.Error.InvalidService";
|
||||
<< "org.qtproject.QtDBus.Error.InvalidObjectPath";
|
||||
QTest::newRow("full-wildcard") << QString() << QString() << "org.qtproject.QtDBus.Error.InvalidService";
|
||||
}
|
||||
|
||||
void tst_QDBusAbstractInterface::callErrors()
|
||||
|
|
@ -1113,7 +1113,7 @@ void tst_QDBusAbstractInterface::asyncCallErrors()
|
|||
void tst_QDBusAbstractInterface::callErrorsPeer_data()
|
||||
{
|
||||
createErrorsPeer_data();
|
||||
QTest::newRow("path-wildcard") << QString() << "com.trolltech.QtDBus.Error.InvalidObjectPath";
|
||||
QTest::newRow("path-wildcard") << QString() << "org.qtproject.QtDBus.Error.InvalidObjectPath";
|
||||
}
|
||||
|
||||
void tst_QDBusAbstractInterface::callErrorsPeer()
|
||||
|
|
|
|||
|
|
@ -928,26 +928,26 @@ void tst_QDBusMarshall::sendCallErrors_data()
|
|||
<< "Method \"ping\" with signature \"\" on interface \"com.trolltech.autotests.qpong\" doesn't exist\n" << (const char*)0;
|
||||
|
||||
QTest::newRow("invalid-service") << "this isn't valid" << objectPath << interfaceName << "ping" << QVariantList()
|
||||
<< "com.trolltech.QtDBus.Error.InvalidService"
|
||||
<< "org.qtproject.QtDBus.Error.InvalidService"
|
||||
<< "Invalid service name: this isn't valid" << "";
|
||||
|
||||
QTest::newRow("empty-path") << serviceName << "" << interfaceName << "ping" << QVariantList()
|
||||
<< "com.trolltech.QtDBus.Error.InvalidObjectPath"
|
||||
<< "org.qtproject.QtDBus.Error.InvalidObjectPath"
|
||||
<< "Object path cannot be empty" << "";
|
||||
QTest::newRow("invalid-path") << serviceName << "//" << interfaceName << "ping" << QVariantList()
|
||||
<< "com.trolltech.QtDBus.Error.InvalidObjectPath"
|
||||
<< "org.qtproject.QtDBus.Error.InvalidObjectPath"
|
||||
<< "Invalid object path: //" << "";
|
||||
|
||||
// empty interfaces are valid
|
||||
QTest::newRow("invalid-interface") << serviceName << objectPath << "this isn't valid" << "ping" << QVariantList()
|
||||
<< "com.trolltech.QtDBus.Error.InvalidInterface"
|
||||
<< "org.qtproject.QtDBus.Error.InvalidInterface"
|
||||
<< "Invalid interface class: this isn't valid" << "";
|
||||
|
||||
QTest::newRow("empty-method") << serviceName << objectPath << interfaceName << "" << QVariantList()
|
||||
<< "com.trolltech.QtDBus.Error.InvalidMember"
|
||||
<< "org.qtproject.QtDBus.Error.InvalidMember"
|
||||
<< "method name cannot be empty" << "";
|
||||
QTest::newRow("invalid-method") << serviceName << objectPath << interfaceName << "this isn't valid" << QVariantList()
|
||||
<< "com.trolltech.QtDBus.Error.InvalidMember"
|
||||
<< "org.qtproject.QtDBus.Error.InvalidMember"
|
||||
<< "Invalid method name: this isn't valid" << "";
|
||||
|
||||
QTest::newRow("invalid-variant1") << serviceName << objectPath << interfaceName << "ping"
|
||||
|
|
|
|||
Loading…
Reference in New Issue