[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kdecore/services
From:       John Layt <john () layt ! net>
Date:       2009-12-10 10:31:08
Message-ID: 1260441068.283494.16456.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1060927 by jlayt:

krazy fixes


 M  +2 -2      kmimetype.cpp  
 M  +1 -1      kmimetypefactory.cpp  
 M  +4 -4      kservice.cpp  
 M  +1 -1      kservicegroup.cpp  
 M  +2 -2      kservicetype.cpp  


--- trunk/KDE/kdelibs/kdecore/services/kmimetype.cpp #1060926:1060927
@@ -576,7 +576,7 @@
         useFavIcons = cg.readEntry("EnableFavicon", true);
     }
 
-    if ( url.isLocalFile() || !url.protocol().startsWith("http")
+    if ( url.isLocalFile() || !url.protocol().startsWith(QLatin1String("http"))
          || !useFavIcons )
         return QString();
 
@@ -778,7 +778,7 @@
      Q_FOREACH(const QString& pattern, d->m_lstPatterns) {
         // Skip if if looks like: README or *. or *.*
         // or *.JP*G or *.JP?
-        if (pattern.startsWith("*.") &&
+        if (pattern.startsWith(QLatin1String("*.")) &&
             pattern.length() > 2 &&
             pattern.indexOf('*', 2) < 0 && pattern.indexOf('?', 2) < 0) {
             return pattern.mid(1);
--- trunk/KDE/kdelibs/kdecore/services/kmimetypefactory.cpp #1060926:1060927
@@ -290,7 +290,7 @@
             KMimeType *newMimeType = createEntry( op.offset );
             assert (newMimeType && newMimeType->isType( KST_KMimeType ));
             matchingMimeTypes.push_back( KMimeType::Ptr( newMimeType ) );
-            if (op.pattern.startsWith("*."))
+            if (op.pattern.startsWith(QLatin1String("*.")))
                 foundExt = op.pattern.mid(2);
         }
     }
--- trunk/KDE/kdelibs/kdecore/services/kservice.cpp #1060926:1060927
@@ -592,7 +592,7 @@
     // Prefer kde4-konsole over kde-konsole, if both are available
     QString name = _name.toLower();
     KService::Ptr s;
-    if (!_name.startsWith("kde4-"))
+    if (!_name.startsWith(QLatin1String("kde4-")))
         s = KServiceFactory::self()->findServiceByDesktopName( "kde4-" + name );
     if (!s)
         s = KServiceFactory::self()->findServiceByDesktopName( name );
@@ -621,10 +621,10 @@
     QString tmp = _storageId;
     tmp = tmp.mid(tmp.lastIndexOf('/')+1); // Strip dir
 
-    if (tmp.endsWith(".desktop"))
+    if (tmp.endsWith(QLatin1String(".desktop")))
         tmp.truncate(tmp.length()-8);
 
-    if (tmp.endsWith(".kdelnk"))
+    if (tmp.endsWith(QLatin1String(".kdelnk")))
         tmp.truncate(tmp.length()-7);
 
     service = KService::serviceByDesktopName(tmp);
@@ -754,7 +754,7 @@
 QString KService::locateLocal() const
 {
     Q_D(const KService);
-    if (d->menuId.isEmpty() || entryPath().startsWith(".hidden") ||
+    if (d->menuId.isEmpty() || entryPath().startsWith(QLatin1String(".hidden")) ||
         (QDir::isRelativePath(entryPath()) && d->categories.isEmpty()))
         return KDesktopFile::locateLocal(entryPath());
 
--- trunk/KDE/kdelibs/kdecore/services/kservicegroup.cpp #1060926:1060927
@@ -603,7 +603,7 @@
                         const QString &nextItem =
                             (it == sortOrder.constEnd()) ? QString() : *it;
 
-                        if ( nextItem.startsWith( ":O" ) )
+                        if ( nextItem.startsWith( QLatin1String(":O") ) )
                         {
                             QString tmp( nextItem );
                             tmp = tmp.remove(":O");
--- trunk/KDE/kdelibs/kdecore/services/kservicetype.cpp #1060926:1060927
@@ -78,7 +78,7 @@
     QStringList::const_iterator gIt = tmpList.begin();
 
     for( ; gIt != tmpList.end(); ++gIt ) {
-        if ( (*gIt).startsWith( "Property::" ) ) {
+        if ( (*gIt).startsWith( QLatin1String("Property::") ) ) {
             KConfigGroup cg(config, *gIt );
             QVariant v = QVariant::nameToType( cg.readEntry( "Type" \
).toLatin1().constData() );  v = cg.readEntry( "Value", v );
@@ -90,7 +90,7 @@
 
     gIt = tmpList.begin();
     for( ; gIt != tmpList.end(); ++gIt ) {
-        if( (*gIt).startsWith( "PropertyDef::" ) ) {
+        if( (*gIt).startsWith( QLatin1String("PropertyDef::") ) ) {
             KConfigGroup cg(config, *gIt);
             m_mapPropDefs.insert( (*gIt).mid( 13 ),
                                   QVariant::nameToType( cg.readEntry( "Type" \
).toLatin1().constData() ) );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic