extragear/multimedia/amarok/src
Kevin Funk
krf at gmx.de
Sat Aug 16 17:57:35 CEST 2008
SVN commit 848013 by kfunk:
Fix some double quote strings where single quote strings could be used. Amarok devs, please take care of this because we had about 100 doublequote issues on EBN again :)
When doing svn blame it showed random ids, so this isnt caused by a special person.
CCMAIL: amarok-devel at kde.org
M +2 -2 App.cpp
M +1 -1 browsers/filebrowser/FileBrowser.cpp
M +1 -1 browsers/playlistbrowser/DynamicModel.cpp
M +1 -1 browsers/servicebrowser/jamendo/JamendoXmlParser.cpp
M +1 -1 browsers/servicebrowser/lastfm/meta/LastFmMeta.cpp
M +2 -2 browsers/servicebrowser/magnatunestore/MagnatuneStore.cpp
M +1 -1 browsers/servicebrowser/magnatunestore/MagnatuneXmlParser.cpp
M +1 -1 browsers/servicebrowser/mp3tunes/Mp3tunesConfig.cpp
M +1 -1 browsers/servicebrowser/mp3tunes/harmonydaemon/Mp3tunesHarmonyDaemon.cpp
M +1 -1 browsers/servicebrowser/scriptableservice/ScriptableServiceQueryMaker.cpp
M +2 -2 collection/ipodcollection/handler/IpodHandler.cpp
M +1 -1 collection/mtpcollection/handler/MtpHandler.cpp
M +1 -1 collection/sqlcollection/OrganizeCollectionDialog.cpp
M +1 -1 collectionscanner/CollectionScanner.cpp
M +2 -2 context/engines/wikipedia/WikipediaEngine.cpp
M +2 -2 cuefile.cpp
M +1 -1 dialogs/CollectionSetup.cpp
M +1 -1 dialogs/EditFilterDialog.cpp
M +2 -2 dialogs/ScriptManager.cpp
M +1 -1 mediabrowser.cpp
M +2 -2 mediadevice/generic/genericmediadevice.cpp
M +1 -1 mediadevice/ipod/ipodmediadevice.cpp
M +1 -1 mediadevice/mtp/mtpmediadevice.cpp
M +1 -1 mediadevice/njb/playlist.cpp
M +1 -1 meta/stream/Stream.cpp
M +1 -1 statusbar/progressBar.cpp
--- trunk/extragear/multimedia/amarok/src/App.cpp #848012:848013
@@ -735,8 +735,8 @@
*/
QString escapeHTMLAttr( const QString &s )
{
- return QString(s).replace( "%", "%25" ).replace( "'", "%27" ).replace( "\"", "%22" ).
- replace( "#", "%23" ).replace( "?", "%3F" );
+ return QString(s).replace( '%', "%25" ).replace( '\'', "%27" ).replace( '"', "%22" ).
+ replace( '#', "%23" ).replace( '?', "%3F" );
}
QString unescapeHTMLAttr( const QString &s )
{
--- trunk/extragear/multimedia/amarok/src/browsers/filebrowser/FileBrowser.cpp #848012:848013
@@ -322,7 +322,7 @@
}
else
{
- f = "*" + f + "*"; // add regexp matches surrounding the filter
+ f = '*' + f + '*'; // add regexp matches surrounding the filter
m_dir->setNameFilter( f );
lastFilter = f;
m_btnFilter->setToolTip( i18n("Clear filter") );
--- trunk/extragear/multimedia/amarok/src/browsers/playlistbrowser/DynamicModel.cpp #848012:848013
@@ -210,7 +210,7 @@
case Qt::DisplayRole:
case Qt::EditRole:
if( i.row() == m_activePlaylist && m_activeUnsaved )
- return item->title() + " (" + i18n("modified") + ")";
+ return item->title() + " (" + i18n("modified") + ')';
else
return item->title();
default:
--- trunk/extragear/multimedia/amarok/src/browsers/servicebrowser/jamendo/JamendoXmlParser.cpp #848012:848013
@@ -223,7 +223,7 @@
//we use tags instad of genres for creating genres in the database, as the
//Jamendo.com genres are messy at best
else if ( currentChildElement.tagName() == "tags" )
- tags = currentChildElement.text().split(" ", QString::SkipEmptyParts);
+ tags = currentChildElement.text().split(' ', QString::SkipEmptyParts);
else if ( currentChildElement.tagName() == "Covers" )
coverUrl = getCoverUrl( currentChildElement, 100 );
else if ( currentChildElement.tagName() == "P2PLinks" )
--- trunk/extragear/multimedia/amarok/src/browsers/servicebrowser/lastfm/meta/LastFmMeta.cpp #848012:848013
@@ -323,7 +323,7 @@
{
// parse the url to get a name if we don't have a track name (ie we're not playing the station)
// do it as name rather than prettyname so it shows up nice in the playlist.
- QStringList elements = d->lastFmUri.split( "/", QString::SkipEmptyParts );
+ QStringList elements = d->lastFmUri.split( '/', QString::SkipEmptyParts );
if( elements.size() >= 2 && elements[0] == "lastfm:" )
{
QString customPart = elements[2];
--- trunk/extragear/multimedia/amarok/src/browsers/servicebrowser/magnatunestore/MagnatuneStore.cpp #848012:848013
@@ -437,7 +437,7 @@
weights << map.value( key );
QString escapedKey = key;
- escapedKey.replace( " ", "%20" );
+ escapedKey.replace( ' ', "%20" );
QVariantMap action;
action["component"] = "/ServicePluginManager";
action["function"] = "sendMessage";
@@ -564,7 +564,7 @@
QString MagnatuneStore::sendMessage( const QString & message )
{
- QStringList args = message.split( " ", QString::SkipEmptyParts );
+ QStringList args = message.split( ' ', QString::SkipEmptyParts );
if ( args.size() < 1 ) {
return i18n( "ERROR: No arguments supplied" );
--- trunk/extragear/multimedia/amarok/src/browsers/servicebrowser/magnatunestore/MagnatuneXmlParser.cpp #848012:848013
@@ -181,7 +181,7 @@
albumCode = childElement.text();
else if ( sElementName == "magnatunegenres" )
- magnatuneGenres = childElement.text().split(",", QString::SkipEmptyParts);
+ magnatuneGenres = childElement.text().split(',', QString::SkipEmptyParts);
else if ( sElementName == "launchdate" )
{
--- trunk/extragear/multimedia/amarok/src/browsers/servicebrowser/mp3tunes/Mp3tunesConfig.cpp #848012:848013
@@ -56,7 +56,7 @@
{
QString addr = iface.hardwareAddress();
if( addr != "00:00:00:00:00:00" ) {
- addr.remove( ":" );
+ addr.remove( ':' );
kDebug( 14310 ) << "Using iface \"" << iface.name() << " addr: " << addr;
setIdentifier( addr + m_partnerToken );
save();
--- trunk/extragear/multimedia/amarok/src/browsers/servicebrowser/mp3tunes/harmonydaemon/Mp3tunesHarmonyDaemon.cpp #848012:848013
@@ -105,7 +105,7 @@
reversedDomain.prepend(s);
}
const QString pidSuffix = QString::number( applicationPid() ).prepend( QLatin1String("-") );
- const QString serviceName = reversedDomain + this->applicationName().remove( " " ) + pidSuffix;
+ const QString serviceName = reversedDomain + this->applicationName().remove( ' ' ) + pidSuffix;
if ( bus->registerService(serviceName) == QDBusConnectionInterface::ServiceNotRegistered ) {
qDebug() << "FATAL: Couldn't register name '" << serviceName << "' with DBUS - another process owns it already!" << endl;;
::exit(126);
--- trunk/extragear/multimedia/amarok/src/browsers/servicebrowser/scriptableservice/ScriptableServiceQueryMaker.cpp #848012:848013
@@ -447,7 +447,7 @@
if ( value == valTitle )
{
d->filter += filter + ' ';
- d->filter = d->filter.replace( " ", "%20" );
+ d->filter = d->filter.replace( ' ', "%20" );
}
int level = 0;
--- trunk/extragear/multimedia/amarok/src/collection/ipodcollection/handler/IpodHandler.cpp #848012:848013
@@ -354,7 +354,7 @@
{
QDir curDir( mountPoint() );
QString curPath = mountPoint();
- QStringList components = ipodPath.split( ":" );
+ QStringList components = ipodPath.split( ':' );
bool found = false;
QStringList::iterator it = components.begin();
@@ -1072,7 +1072,7 @@
track->setBpm( ipodtrack->BPM );
track->setFileSize( ipodtrack->size );
- QString path = QString( ipodtrack->ipod_path ).split( ":" ).join( "/" );
+ QString path = QString( ipodtrack->ipod_path ).split( ':' ).join( '/' );
path = m_mountPoint + path;
track->setPlayableUrl( path );
--- trunk/extragear/multimedia/amarok/src/collection/mtpcollection/handler/MtpHandler.cpp #848012:848013
@@ -467,7 +467,7 @@
genreName = genre->prettyName();
uint32_t parent_id = getDefaultParentId();
- QStringList folders = m_folderStructure.split( "/" ); // use slash as a dir separator
+ QStringList folders = m_folderStructure.split( '/' ); // use slash as a dir separator
QString completePath;
for( QStringList::Iterator it = folders.begin(); it != folders.end(); ++it )
{
--- trunk/extragear/multimedia/amarok/src/collection/sqlcollection/OrganizeCollectionDialog.cpp #848012:848013
@@ -293,7 +293,7 @@
if( ui->vfatCheck->isChecked() )
result = Amarok::vfatPath( result );
- result.replace( "/", "-" );
+ result.replace( '/', '-' );
return result;
}
--- trunk/extragear/multimedia/amarok/src/collectionscanner/CollectionScanner.cpp #848012:848013
@@ -119,7 +119,7 @@
QTextStream folderStream;
folderStream.setDevice(&folderFile);
folderStream.setCodec( QTextCodec::codecForName( "UTF-8" ) );
- entries = folderStream.readAll().split( "\n" );
+ entries = folderStream.readAll().split( '\n' );
}
for( int count = entries.indexOf( lastFile ) + 1; count; --count )
--- trunk/extragear/multimedia/amarok/src/context/engines/wikipedia/WikipediaEngine.cpp #848012:848013
@@ -206,8 +206,8 @@
debug() << "Even better";
//remove the new-lines and tabs(replace with spaces IS needed).
- m_wiki.replace( "\n", " " );
- m_wiki.replace( "\t", " " );
+ m_wiki.replace( '\n', ' ' );
+ m_wiki.replace( '\t', ' ' );
m_wikiLanguages.clear();
// Get the available language list
--- trunk/extragear/multimedia/amarok/src/cuefile.cpp #848012:848013
@@ -167,7 +167,7 @@
if( indexNo == 1 )
{
QString splitMe = line.section( ' ', -1, -1 );
- QStringList time = splitMe.split( ":", QString::SkipEmptyParts );
+ QStringList time = splitMe.split( ':', QString::SkipEmptyParts );
index = time[0].toLong()*60*1000 + time[1].toLong()*1000 + time[2].toLong()*1000/75; //75 frames per second
@@ -186,7 +186,7 @@
else if( indexNo == 0 ) // gap, use to calc prev track length
{
QString splitMe = line.section( ' ', -1, -1 );
- QStringList time = splitMe.split( ":", QString::SkipEmptyParts );
+ QStringList time = splitMe.split( ':', QString::SkipEmptyParts );
length = time[0].toLong()*60*1000 + time[1].toLong()*1000 + time[2].toLong()*1000/75; //75 frames per second
--- trunk/extragear/multimedia/amarok/src/dialogs/CollectionSetup.cpp #848012:848013
@@ -194,7 +194,7 @@
Model::isForbiddenPath( const QString &path ) const
{
// we need the trailing slash otherwise we could forbid "/dev-music" for example
- QString _path = path.endsWith( "/" ) ? path : path + "/";
+ QString _path = path.endsWith( '/' ) ? path : path + '/';
return _path.startsWith( "/proc/" ) || _path.startsWith( "/dev/" ) || _path.startsWith( "/sys/" );
}
--- trunk/extragear/multimedia/amarok/src/dialogs/EditFilterDialog.cpp #848012:848013
@@ -702,7 +702,7 @@
if (m_checkOR->isChecked())
m_filterText += "OR ";
}
- QStringList list = m_editKeyword->text().split( " " );
+ QStringList list = m_editKeyword->text().split( ' ' );
const QString key = m_vector[m_selectedIndex];
if( m_selectedIndex == 0 )
{
--- trunk/extragear/multimedia/amarok/src/dialogs/ScriptManager.cpp #848012:848013
@@ -412,8 +412,8 @@
if ( m_scripts[name].engine->hasUncaughtException() )
{
- error() << "Script Error:" << time.currentTime().toString() + " " + m_scripts[name].engine->uncaughtException().toString() + " on Line: " + QString::number( m_scripts[name].engine->uncaughtExceptionLineNumber() );
- m_scripts[name].log += time.currentTime().toString() + " " + m_scripts[name].engine->uncaughtException().toString() + " on Line: " + QString::number( m_scripts[name].engine->uncaughtExceptionLineNumber() ) + '\n';
+ error() << "Script Error:" << time.currentTime().toString() + ' ' + m_scripts[name].engine->uncaughtException().toString() + " on Line: " + QString::number( m_scripts[name].engine->uncaughtExceptionLineNumber() );
+ m_scripts[name].log += time.currentTime().toString() + ' ' + m_scripts[name].engine->uncaughtException().toString() + " on Line: " + QString::number( m_scripts[name].engine->uncaughtExceptionLineNumber() ) + '\n';
m_scripts[name].engine->clearExceptions();
slotStopScript( name );
if ( !silent )
--- trunk/extragear/multimedia/amarok/src/mediabrowser.cpp #848012:848013
@@ -1150,7 +1150,7 @@
return 0;
}
- QStringList sl = udi.split( "|" );
+ QStringList sl = udi.split( '|' );
name = sl[1];
mountPoint = sl[2];
}
--- trunk/extragear/multimedia/amarok/src/mediadevice/generic/genericmediadevice.cpp #848012:848013
@@ -672,7 +672,7 @@
QString path = buildDestination( m_songLocation, track);
KUrl url( path );
url.adjustPath( KUrl::RemoveTrailingSlash );
- QStringList directories = url.directory().split( "/", QString::SkipEmptyParts );
+ QStringList directories = url.directory().split( '/', QString::SkipEmptyParts );
Q3ListViewItem *it = view()->firstChild();
for( QStringList::Iterator directory = directories.begin();
@@ -1040,7 +1040,7 @@
if( m_actuallyVfat || m_vfatTextOnly )
result = Amarok::vfatPath( result );
- result.replace( "/", "-" );
+ result.replace( '/', '-' );
return result;
}
--- trunk/extragear/multimedia/amarok/src/mediadevice/ipod/ipodmediadevice.cpp #848012:848013
@@ -2608,7 +2608,7 @@
{
QDir curDir( mountPoint() );
QString curPath = mountPoint();
- QStringList components = QStringList::split( ":", ipodPath );
+ QStringList components = QStringList::split( ':', ipodPath );
bool found = false;
QStringList::iterator it = components.begin();
--- trunk/extragear/multimedia/amarok/src/mediadevice/mtp/mtpmediadevice.cpp #848012:848013
@@ -577,7 +577,7 @@
genreName = genre->prettyName();
m_critical_mutex.lock();
uint32_t parent_id = getDefaultParentId();
- QStringList folders = m_folderStructure.split( "/" ); // use slash as a dir separator
+ QStringList folders = m_folderStructure.split( '/' ); // use slash as a dir separator
QString completePath;
for( QStringList::Iterator it = folders.begin(); it != folders.end(); ++it )
{
--- trunk/extragear/multimedia/amarok/src/mediadevice/njb/playlist.cpp #848012:848013
@@ -127,7 +127,7 @@
{
QString result = _in;
- result.replace("/","%2f");
+ result.replace('/',"%2f");
return result;
}
--- trunk/extragear/multimedia/amarok/src/meta/stream/Stream.cpp #848012:848013
@@ -52,7 +52,7 @@
Track::name() const
{
if( d->title.isEmpty() )
- return i18n( "Stream (" ) + d->url.url() + ")";
+ return i18n( "Stream (" ) + d->url.url() + ')';
else
return d->title;
}
--- trunk/extragear/multimedia/amarok/src/statusbar/progressBar.cpp #848012:848013
@@ -64,7 +64,7 @@
ProgressBar&
ProgressBar::setStatus( const QString &text )
{
- const QString s = m_description + " [" + text + "]";
+ const QString s = m_description + " [" + text + ']';
m_label->setText( s );
parentWidget()->adjustSize();
More information about the Amarok-devel
mailing list