Commit 6dc9d6e0 authored by Jonathan Marten's avatar Jonathan Marten
Browse files

Port deprecated QList::toSet() -> QSet(begin,end)

parent ec01ff6c
......@@ -616,7 +616,8 @@ QStringList K3b::MetaItemModel::mimeTypes() const
for( QList<Place>::const_iterator it = d->places.constBegin();
it != d->places.constEnd(); ++it )
{
types += it->model()->mimeTypes().toSet();
const QStringList &mimeTypes = it->model()->mimeTypes();
types += QSet<QString>(mimeTypes.begin(), mimeTypes.end());
}
return types.values();
}
......
......@@ -89,7 +89,7 @@ void ExternalBinPermissionModel::Private::buildProgramList()
programs += it.value()->bins();
}
}
selectedPrograms = programs.toSet();
selectedPrograms = QSet<const ExternalBin *>(programs.begin(), programs.end());
}
......@@ -363,7 +363,8 @@ void ExternalBinPermissionModel::update()
{
beginResetModel();
d->buildProgramList();
d->selectedPrograms.intersect( d->programs.toSet() );
d->selectedPrograms.intersect( QSet<const ExternalBin *>(d->programs.begin(), d->programs.end() ));
endResetModel();
}
......
......@@ -218,7 +218,9 @@ bool MassAudioEncodingJob::run()
d->overallBytesToRead = 0;
d->lengths.clear();
Q_FOREACH( const QString& filename, d->tracks.keys().toSet() ) {
const QStringList tracksKeys = d->tracks.keys();
const QSet<QString> fileNames = QSet<QString>(tracksKeys.begin(), tracksKeys.end());
Q_FOREACH( const QString& filename, fileNames ) {
d->lengths.insert( filename, 0 );
Q_FOREACH( int trackNumber, d->tracks.values( filename ) ) {
const Msf length = trackLength( trackNumber );
......@@ -459,7 +461,9 @@ bool MassAudioEncodingJob::writePlaylist()
bool MassAudioEncodingJob::writeCueFile()
{
bool success = true;
Q_FOREACH( const QString& filename, d->tracks.keys().toSet() ) {
const QStringList tracksKeys = d->tracks.keys();
const QSet<QString> fileNames = QSet<QString>(tracksKeys.begin(), tracksKeys.end());
Q_FOREACH( const QString& filename, fileNames ) {
CueFileWriter cueWriter;
// create a new toc and cd-text
......
Supports Markdown
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