Revise string literal usage

PR #16703.
This commit is contained in:
Chocobo1
2022-03-26 11:53:50 +08:00
committed by GitHub
parent e1abcc684a
commit 4ca6de2b54
55 changed files with 485 additions and 472 deletions

View File

@@ -94,12 +94,12 @@ const char ACK[] = "ack";
QtLocalPeer::QtLocalPeer(const QString &path, QObject *parent)
: QObject(parent)
, m_socketName(path + QLatin1String("/ipc-socket"))
, m_socketName(path + u"/ipc-socket")
, m_server(new QLocalServer(this))
{
m_server->setSocketOptions(QLocalServer::UserAccessOption);
m_lockFile.setFileName(path + QLatin1String("/lockfile"));
m_lockFile.setFileName(path + u"/lockfile");
m_lockFile.open(QIODevice::ReadWrite);
}

View File

@@ -80,7 +80,7 @@ Qt::HANDLE QtLockedFile::getMutexHandle(const int idx, const bool doCreate)
if (m_mutexName.isEmpty())
{
QFileInfo fi(*this);
m_mutexName = QString::fromLatin1("QtLockedFile mutex ") + fi.absoluteFilePath().toLower();
m_mutexName = u"QtLockedFile mutex " + fi.absoluteFilePath().toLower();
}
QString mname = m_mutexName;