Replace forever with Q_FOREVER
This commit is contained in:
@@ -1897,9 +1897,9 @@ void Playlist::RemoveItemsNotInQueue() {
|
||||
}
|
||||
|
||||
int start = 0;
|
||||
forever {
|
||||
Q_FOREVER {
|
||||
// Find a place to start - first row that isn't in the queue
|
||||
forever {
|
||||
Q_FOREVER {
|
||||
if (start >= rowCount()) return;
|
||||
if (!queue_->ContainsSourceRow(start) && current_row() != start) break;
|
||||
start++;
|
||||
@@ -1907,7 +1907,7 @@ void Playlist::RemoveItemsNotInQueue() {
|
||||
|
||||
// Figure out how many rows to remove - keep going until we find a row that is in the queue
|
||||
int count = 1;
|
||||
forever {
|
||||
Q_FOREVER {
|
||||
if (start + count >= rowCount()) break;
|
||||
if (queue_->ContainsSourceRow(start + count) || current_row() == start + count) break;
|
||||
count++;
|
||||
|
||||
@@ -256,7 +256,7 @@ void PlaylistManager::SaveWithUI(const int id, const QString &playlist_name) {
|
||||
QString filename = last_save_path + QLatin1Char('/') + suggested_filename.remove(QRegularExpression(QLatin1String(kProblematicCharactersRegex), QRegularExpression::CaseInsensitiveOption)) + QLatin1Char('.') + last_save_extension;
|
||||
|
||||
QFileInfo fileinfo;
|
||||
forever {
|
||||
Q_FOREVER {
|
||||
filename = QFileDialog::getSaveFileName(nullptr, tr("Save playlist", "Title of the playlist save dialog."), filename, parser()->filters(PlaylistParser::Type::Save), &last_save_filter);
|
||||
if (filename.isEmpty()) return;
|
||||
fileinfo.setFile(filename);
|
||||
|
||||
Reference in New Issue
Block a user