mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
Fix dbus assert when hostname contains non-Latin characters
This commit is contained in:
@@ -73,7 +73,7 @@ namespace BlackMiscTest
|
||||
void CTestIdentifier::dbusObjectPath()
|
||||
{
|
||||
QObject q;
|
||||
q.setObjectName("!@#$%^&*()_+");
|
||||
q.setObjectName(QString::fromUtf16(u"!@#$%^&*()_+\u263a"));
|
||||
CTestIdentifiable id(&q);
|
||||
QString s(id.identifier().toDBusObjectPath());
|
||||
QVERIFY2(id.identifier() == CIdentifier::fromDBusObjectPath(s), "Conversion from dbus object path and back compares equal");
|
||||
|
||||
@@ -129,12 +129,17 @@ namespace BlackMiscTest
|
||||
//! ctor
|
||||
Server()
|
||||
{
|
||||
QObject::connect(&m_process, qOverload<int, QProcess::ExitStatus>(&QProcess::finished), [](int code, QProcess::ExitStatus status)
|
||||
{
|
||||
qDebug() << "Server process exited" << (status ? "abnormally" : "normally") << "with exit code" << code;
|
||||
});
|
||||
m_process.start("sharedstatetestserver", QStringList());
|
||||
m_process.waitForStarted();
|
||||
}
|
||||
//! dtor
|
||||
~Server()
|
||||
{
|
||||
m_process.disconnect();
|
||||
m_process.kill();
|
||||
m_process.waitForFinished();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user