Revision: 6177
Author: nogu.dev
Date: Sat Feb 27 15:03:15 2010
Log: * qt4/candwin/qt4.cpp
  - (CandidateWindow::activateCand, CandidateWindow::setPageCandidates):
    Use QLatin1String for efficiency.
http://code.google.com/p/uim/source/detail?r=6177

Modified:
 /trunk/qt4/candwin/qt4.cpp

=======================================
--- /trunk/qt4/candwin/qt4.cpp  Sat Feb 27 15:03:01 2010
+++ /trunk/qt4/candwin/qt4.cpp  Sat Feb 27 15:03:15 2010
@@ -135,14 +135,16 @@

     // get charset and create codec
     QTextCodec *codec = 0;
-    if ( !list[ 1 ].isEmpty() && list[ 1 ].startsWith( "charset" ) )
+    if ( !list[ 1 ].isEmpty()
+        && list[ 1 ].startsWith( QLatin1String( "charset" ) ) )
     {
         const QStringList l = QStringList::split( "=", list[ 1 ] );
         codec = QTextCodec::codecForName( l[ 1 ] );
     }

     // get display_limit
-    if ( !list[ 2 ].isEmpty() && list[ 2 ].startsWith( "display_limit" ) )
+    if ( !list[ 2 ].isEmpty()
+        && list[ 2 ].startsWith( QLatin1String( "display_limit" ) ) )
     {
         const QStringList l = QStringList::split( "=", list[ 2 ] );
         displayLimit = l[ 1 ].toInt();
@@ -298,14 +300,16 @@

     // get charset and create codec
     QTextCodec *codec = 0;
-    if ( !list[ 1 ].isEmpty() && list[ 1 ].startsWith( "charset" ) )
+    if ( !list[ 1 ].isEmpty()
+        && list[ 1 ].startsWith( QLatin1String( "charset" ) ) )
     {
         const QStringList l = QStringList::split( "=", list[ 1 ] );
         codec = QTextCodec::codecForName( l[ 1 ] );
     }

     // get page
-    if ( !list[ 2 ].isEmpty() && list[ 2 ].startsWith( "page" ) )
+    if ( !list[ 2 ].isEmpty()
+        && list[ 2 ].startsWith( QLatin1String( "page" ) ) )
     {
         const QStringList l = QStringList::split( "=", list[ 2 ] );
         page = l[ 1 ].toInt();

Reply via email to