mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 15:45:42 +08:00
Minor fixes, formatting, static const
This commit is contained in:
@@ -14,17 +14,17 @@ namespace BlackMisc
|
||||
{
|
||||
CConnectionGuard::CConnectionGuard(const QMetaObject::Connection &connection)
|
||||
{
|
||||
this->m_connections.append(connection);
|
||||
m_connections.append(connection);
|
||||
}
|
||||
|
||||
void CConnectionGuard::append(const QMetaObject::Connection &connection)
|
||||
{
|
||||
this->m_connections.append(connection);
|
||||
m_connections.append(connection);
|
||||
}
|
||||
|
||||
void CConnectionGuard::append(const QList<QMetaObject::Connection> &connections)
|
||||
{
|
||||
this->m_connections.append(connections);
|
||||
m_connections.append(connections);
|
||||
}
|
||||
|
||||
CConnectionGuard::~CConnectionGuard()
|
||||
@@ -34,13 +34,13 @@ namespace BlackMisc
|
||||
|
||||
int CConnectionGuard::disconnectAll()
|
||||
{
|
||||
if (this->m_connections.isEmpty()) { return 0; }
|
||||
if (m_connections.isEmpty()) { return 0; }
|
||||
int c = 0;
|
||||
for (const QMetaObject::Connection &con : as_const(this->m_connections))
|
||||
for (const QMetaObject::Connection &con : as_const(m_connections))
|
||||
{
|
||||
if (QObject::disconnect(con)) { c++; }
|
||||
}
|
||||
this->m_connections.clear();
|
||||
m_connections.clear();
|
||||
return c;
|
||||
}
|
||||
} // ns
|
||||
|
||||
@@ -173,7 +173,7 @@ namespace BlackMisc
|
||||
|
||||
const QString &CDirectoryUtils::staticDbFilesDirectory()
|
||||
{
|
||||
static QString s(getSwiftStaticDbFilesDirImpl());
|
||||
static const QString s(getSwiftStaticDbFilesDirImpl());
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@ namespace BlackMisc
|
||||
|
||||
const QString &CDirectoryUtils::soundFilesDirectory()
|
||||
{
|
||||
static QString s(getSoundFilesDirImpl());
|
||||
static const QString s(getSoundFilesDirImpl());
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ namespace BlackMisc
|
||||
|
||||
const QString &CDirectoryUtils::stylesheetsDirectory()
|
||||
{
|
||||
static QString s(getStylesheetsDirImpl());
|
||||
static const QString s(getStylesheetsDirImpl());
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace BlackMisc
|
||||
{
|
||||
QString s(string.trimmed().toLower());
|
||||
if (s.isEmpty()) { return false; }
|
||||
QChar c = s.at(0);
|
||||
const QChar c = s.at(0);
|
||||
|
||||
// explicit values
|
||||
if (c == '1' || c == 't' || c == 'y' || c == 'x') { return true; }
|
||||
|
||||
Reference in New Issue
Block a user