From 8aa7acde0b5386cb13fbb22b9e243f3f293bc662 Mon Sep 17 00:00:00 2001 From: Kurt Hindenburg Date: Sun, 12 Apr 2009 02:02:20 +0000 Subject: [PATCH] Use QLatin1String instread of const char * svn path=/trunk/KDE/kdebase/apps/konsole/; revision=952497 --- src/ColorScheme.cpp | 10 +++++----- src/SessionManager.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ColorScheme.cpp b/src/ColorScheme.cpp index c8bcb2d21..c07561323 100644 --- a/src/ColorScheme.cpp +++ b/src/ColorScheme.cpp @@ -433,12 +433,12 @@ ColorScheme* KDE3ColorSchemeReader::read() if ( line.isEmpty() ) continue; - if ( line.startsWith("color") ) + if ( line.startsWith(QLatin1String("color")) ) { if (!readColorLine(line,scheme)) kWarning() << "Failed to read KDE 3 color scheme line" << line; } - else if ( line.startsWith("title") ) + else if ( line.startsWith(QLatin1String("title")) ) { if (!readTitleLine(line,scheme)) kWarning() << "Failed to read KDE 3 color scheme title line" << line; @@ -488,7 +488,7 @@ bool KDE3ColorSchemeReader::readColorLine(const QString& line,ColorScheme* schem } bool KDE3ColorSchemeReader::readTitleLine(const QString& line,ColorScheme* scheme) { - if( !line.startsWith("title") ) + if( !line.startsWith(QLatin1String("title")) ) return false; int spacePos = line.indexOf(' '); @@ -556,7 +556,7 @@ QList ColorSchemeManager::allColorSchemes() bool ColorSchemeManager::loadKDE3ColorScheme(const QString& filePath) { QFile file(filePath); - if (!filePath.endsWith(".schema") || !file.open(QIODevice::ReadOnly)) + if (!filePath.endsWith(QLatin1String(".schema")) || !file.open(QIODevice::ReadOnly)) return false; KDE3ColorSchemeReader reader(&file); @@ -596,7 +596,7 @@ void ColorSchemeManager::addColorScheme(ColorScheme* scheme) } bool ColorSchemeManager::loadColorScheme(const QString& filePath) { - if ( !filePath.endsWith(".colorscheme") || !QFile::exists(filePath) ) + if ( !filePath.endsWith(QLatin1String(".colorscheme")) || !QFile::exists(filePath) ) return false; QFileInfo info(filePath); diff --git a/src/SessionManager.cpp b/src/SessionManager.cpp index 0edf0edd8..00ba68d4f 100644 --- a/src/SessionManager.cpp +++ b/src/SessionManager.cpp @@ -146,7 +146,7 @@ Profile::Ptr SessionManager::loadProfile(const QString& shortPath) // load the profile ProfileReader* reader = 0; - if ( path.endsWith(".desktop") ) + if ( path.endsWith(QLatin1String(".desktop")) ) reader = 0; // new KDE3ProfileReader; else reader = new KDE4ProfileReader;