OSDN Git Service

use single variable assignment in qstring_to_xtp()
authorIvailo Monev <xakepa10@laimg.moc>
Wed, 25 Mar 2020 17:03:40 +0000 (17:03 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Wed, 25 Mar 2020 17:03:40 +0000 (17:03 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
src/gui/kernel/qwidget_x11.cpp

index 3359e8e..011dfc3 100644 (file)
@@ -1337,8 +1337,7 @@ qstring_to_xtp(const QString& s)
 #endif
     }
     if (!mapper || errCode < 0) {
-        static QByteArray qcs;
-        qcs = s.toAscii();
+        static QByteArray qcs = s.toAscii();
         tp.value = (uchar*)qcs.data();
         tp.encoding = XA_STRING;
         tp.format = 8;