diff options
author | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-10-19 12:49:52 +0300 |
---|---|---|
committer | Anton Kudryavtsev <antkudr@mail.ru> | 2016-12-12 11:02:59 +0000 |
commit | 87fefbc08e80119dba24767bfc9b6ecc64be5fcd (patch) | |
tree | 240e69cdc2605c918e8c8e335bb9f16aa1dc25ce /src/plugins/platforms/xcb | |
parent | 101449a4cfa9c0d216332c6dc8ba826e8109e09d (diff) |
Plugins: use QStringBuilder more
Change-Id: I6f026b81fdc403d99d37dfa22ea6a27a95ead347
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection.cpp | 3 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbintegration.cpp | 8 |
2 files changed, 3 insertions, 8 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index 7bd233f387..9e275efa25 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -1996,8 +1996,7 @@ void QXcbConnection::initializeAllAtoms() { Q_ASSERT(i == QXcbAtom::NPredefinedAtoms); - QByteArray settings_atom_name("_QT_SETTINGS_TIMESTAMP_"); - settings_atom_name += m_displayName; + const QByteArray settings_atom_name = "_QT_SETTINGS_TIMESTAMP_" + m_displayName; names[i++] = settings_atom_name; xcb_intern_atom_cookie_t cookies[QXcbAtom::NAtoms]; diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp index f4da7ba033..af9ffab8ae 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.cpp +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp @@ -447,12 +447,8 @@ QByteArray QXcbIntegration::wmClass() const className[0] = className.at(0).toUpper(); } - if (!name.isEmpty() && !className.isEmpty()) { - m_wmClass = name.toLocal8Bit(); - m_wmClass.append('\0'); - m_wmClass.append(className.toLocal8Bit()); - m_wmClass.append('\0'); - } + if (!name.isEmpty() && !className.isEmpty()) + m_wmClass = name.toLocal8Bit() + '\0' + className.toLocal8Bit() + '\0'; } return m_wmClass; } |