Commit 109005e4 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port to QVector. A QLinkedList is not necessary for a list of element.

We don't insert/remove element.

QLinkedList is deprecated in qt5.15
parent c0507540
......@@ -81,7 +81,7 @@ Sweeper::~Sweeper()
void Sweeper::load()
{
QLinkedList<PrivacyAction*>::iterator itr;
QVector<PrivacyAction*>::iterator itr;
for (itr = checklist.begin(); itr != checklist.end(); ++itr) {
(*itr)->setCheckState(0, m_privacyConfGroup.readEntry((*itr)->configKey(), true) ? Qt::Checked : Qt::Unchecked);
......@@ -90,7 +90,7 @@ void Sweeper::load()
void Sweeper::save()
{
QLinkedList<PrivacyAction*>::iterator itr;
QVector<PrivacyAction*>::iterator itr;
for (itr = checklist.begin(); itr != checklist.end(); ++itr) {
m_privacyConfGroup.writeEntry((*itr)->configKey(), (*itr)->checkState(0) == Qt::Checked);
......@@ -101,7 +101,7 @@ void Sweeper::save()
void Sweeper::selectAll()
{
QLinkedList<PrivacyAction*>::iterator itr;
QVector<PrivacyAction*>::iterator itr;
for (itr = checklist.begin(); itr != checklist.end(); ++itr) {
(*itr)->setCheckState(0, Qt::Checked);
......@@ -111,7 +111,7 @@ void Sweeper::selectAll()
void Sweeper::selectNone()
{
QLinkedList<PrivacyAction*>::iterator itr;
QVector<PrivacyAction*>::iterator itr;
for (itr = checklist.begin(); itr != checklist.end(); ++itr) {
(*itr)->setCheckState(0, Qt::Unchecked);
......@@ -131,7 +131,7 @@ void Sweeper::cleanup()
ui.statusTextEdit->clear();
ui.statusTextEdit->setText(i18n("Starting cleanup..."));
QLinkedList<PrivacyAction*>::iterator itr;
QVector<PrivacyAction*>::iterator itr;
for (itr = checklist.begin(); itr != checklist.end(); ++itr) {
if((*itr)->checkState(0) == Qt::Checked) {
......
......@@ -22,7 +22,7 @@
#include <KConfigGroup>
#include <KXmlGuiWindow>
#include <QLinkedList>
#include <QVector>
#include "ui_sweeperdialog.h"
......@@ -58,7 +58,7 @@ class Sweeper: public KXmlGuiWindow
*/
Ui::SweeperDialog ui;
QLinkedList<PrivacyAction*> checklist;
QVector<PrivacyAction*> checklist;
QTreeWidgetItem *generalCLI;
QTreeWidgetItem *webbrowsingCLI;
......
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