Commit 24ca1e29 authored by Thomas Häber's avatar Thomas Häber

removed assignments to QString::null -> use QString() instead (in return...

removed assignments to QString::null -> use QString() instead (in return values) or str.clear() (with the help of the English Breakfast Network)

svn path=/trunk/KDE/kdemultimedia/juk/; revision=587493
parent 02b59b7d
......@@ -50,7 +50,7 @@ QString CategoryReaderInterface::fixupTrack(const QString &track, int categoryNu
if(emptyAction(trackId) == TagRenamerOptions::UseReplacementValue)
str = emptyText(trackId);
else
return QString::null;
return QString();
}
int minimumWidth = trackWidth(categoryNum);
......
......@@ -288,7 +288,7 @@ void CollectionList::contentsDragMoveEvent(QDragMoveEvent *e)
QString CollectionList::addStringToDict(const QString &value, int column)
{
if(column > m_columnTags.count() || value.stripWhiteSpace().isEmpty())
return QString::null;
return QString();
int *refCountPtr = m_columnTags[column]->find(value);
if(refCountPtr)
......
......@@ -62,7 +62,7 @@ namespace FileHandleProperties
virtual ~Property() {}
virtual QString value(const FileHandle &) const
{
return QString::null;
return QString();
}
};
......@@ -76,7 +76,7 @@ namespace FileHandleProperties
static QString property(const FileHandle &file, const QByteArray &key)
{
return propertyMap.contains(key) ? propertyMap[key]->value(file) : QString::null;
return propertyMap.contains(key) ? propertyMap[key]->value(file) : QString();
}
static QStringList properties()
......
......@@ -149,7 +149,7 @@ ConfigCategoryReader::ConfigCategoryReader() : CategoryReaderInterface(),
QString ConfigCategoryReader::categoryValue(TagType type) const
{
if(!m_currentItem)
return QString::null;
return QString();
Tag *tag = m_currentItem->file().tag();
......@@ -173,7 +173,7 @@ QString ConfigCategoryReader::categoryValue(TagType type) const
return tag->genre();
default:
return QString::null;
return QString();
}
}
......@@ -592,7 +592,7 @@ QString FileRenamerWidget::fileCategoryValue(TagType category) const
return tag->genre();
default:
return QString::null;
return QString();
}
}
......@@ -623,7 +623,7 @@ QString FileRenamerWidget::categoryValue(TagType category) const
return example->m_exampleGenre->text();
default:
return QString::null;
return QString();
}
}
......
......@@ -171,7 +171,7 @@ QStringList PlayerManager::trackProperties()
QString PlayerManager::trackProperty(const QString &property) const
{
if(!playing() && !paused())
return QString::null;
return QString();
return m_file.property(property);
}
......@@ -197,7 +197,7 @@ FileHandle PlayerManager::playingFile() const
QString PlayerManager::playingString() const
{
if(!playing())
return QString::null;
return QString();
QString str = m_file.tag()->artist() + " - " + m_file.tag()->title();
if(m_file.tag()->artist().isEmpty())
......
......@@ -260,12 +260,12 @@ void PlaylistCollection::removeTrack(const QString &playlist, const QStringList
QString PlaylistCollection::playlist() const
{
return visiblePlaylist() ? visiblePlaylist()->name() : QString::null;
return visiblePlaylist() ? visiblePlaylist()->name() : QString();
}
QString PlaylistCollection::playingPlaylist() const
{
return currentPlaylist() && m_playing ? currentPlaylist()->name() : QString::null;
return currentPlaylist() && m_playing ? currentPlaylist()->name() : QString();
}
void PlaylistCollection::setPlaylist(const QString &playlist)
......@@ -289,7 +289,7 @@ QString PlaylistCollection::trackProperty(const QString &file, const QString &pr
CollectionList *l = CollectionList::instance();
CollectionListItem *item = l->lookup(file);
return item ? item->file().property(property) : QString::null;
return item ? item->file().property(property) : QString();
}
QPixmap PlaylistCollection::trackCover(const QString &file, const QString &size) const
......@@ -739,7 +739,7 @@ QString PlaylistCollection::playlistNameDialog(const QString &caption,
forceUnique ? uniquePlaylistName(suggest) : suggest,
&ok);
return ok ? uniquePlaylistName(name) : QString::null;
return ok ? uniquePlaylistName(name) : QString();
}
......
......@@ -106,7 +106,7 @@ const QPixmap *PlaylistItem::pixmap(int column) const
QString PlaylistItem::text(int column) const
{
if(!d->fileHandle.tag())
return QString::null;
return QString();
int offset = playlist()->columnOffset();
......@@ -118,7 +118,7 @@ QString PlaylistItem::text(int column) const
case AlbumColumn:
return d->fileHandle.tag()->album();
case CoverColumn:
return QString::null;
return QString();
case TrackNumberColumn:
return d->fileHandle.tag()->track() > 0
? QString::number(d->fileHandle.tag()->track())
......
......@@ -58,35 +58,35 @@ bool FileNameScheme::matches(const QString &fileName) const
QString FileNameScheme::title() const
{
if(m_titleField == -1)
return QString::null;
return QString();
return m_regExp.capturedTexts()[ m_titleField ];
}
QString FileNameScheme::artist() const
{
if(m_artistField == -1)
return QString::null;
return QString();
return m_regExp.capturedTexts()[ m_artistField ];
}
QString FileNameScheme::album() const
{
if(m_albumField == -1)
return QString::null;
return QString();
return m_regExp.capturedTexts()[ m_albumField ];
}
QString FileNameScheme::track() const
{
if(m_trackField == -1)
return QString::null;
return QString();
return m_regExp.capturedTexts()[ m_trackField ];
}
QString FileNameScheme::comment() const
{
if(m_commentField == -1)
return QString::null;
return QString();
return m_regExp.capturedTexts()[ m_commentField ];
}
......@@ -179,7 +179,7 @@ void TagGuesser::loadSchemes()
void TagGuesser::guess(const QString &absFileName)
{
m_title = m_artist = m_album = m_track = m_comment = QString::null;
m_title = m_artist = m_album = m_track = m_comment.clear();
FileNameScheme::List::ConstIterator it = m_schemes.begin();
FileNameScheme::List::ConstIterator end = m_schemes.end();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment