Replace foreach (deprecated) with range-for

The code compiles and konsole seems to work as bofore.
This commit is contained in:
Ahmad Samir
2019-12-01 13:35:37 +02:00
parent 686a14da0d
commit 5f60bc5a6f
16 changed files with 102 additions and 78 deletions

View File

@@ -76,7 +76,8 @@ void SaveHistoryTask::execute()
// iterate over each session in the task and display a dialog to allow the user to choose where
// to save that session's history.
// then start a KIO job to transfer the data from the history to the chosen URL
foreach(const auto& session, sessions()) {
const QList<QPointer<Session>> sessionsList = sessions();
for (const auto &session : sessionsList) {
dialog->setWindowTitle(i18n("Save Output From %1", session->title(Session::NameRole)));
int result = dialog->exec();