Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 45e8256e authored by Laurent Montel's avatar Laurent Montel 😁

Fix some clazy warning

parent 1f848639
......@@ -25,6 +25,7 @@
class GearyAddressBook : public LibImportWizard::AbstractAddressBook
{
Q_OBJECT
public:
explicit GearyAddressBook(const QString &filename);
~GearyAddressBook();
......
......@@ -52,8 +52,8 @@ EventSelectorDialog::EventSelectorDialog(QWidget *parent, Qt::WindowFlags f)
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
mainLayout->addWidget(mainWidget);
mainLayout->addWidget(buttonBox);
......
......@@ -44,16 +44,16 @@ QModelIndex ItemSelection::index() const
void ItemSelection::connectSignals()
{
connect(m_selModel1, SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SLOT(modelSelectionChanged()));
connect(m_selModel2, SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SLOT(modelSelectionChanged()));
connect(m_selModel3, SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SLOT(modelSelectionChanged()));
connect(m_selModel1, &QItemSelectionModel::selectionChanged, this, &ItemSelection::modelSelectionChanged);
connect(m_selModel2, &QItemSelectionModel::selectionChanged, this, &ItemSelection::modelSelectionChanged);
connect(m_selModel3, &QItemSelectionModel::selectionChanged, this, &ItemSelection::modelSelectionChanged);
}
void ItemSelection::disconnectSignals()
{
disconnect(m_selModel1, SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(modelSelectionChanged()));
disconnect(m_selModel2, SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(modelSelectionChanged()));
disconnect(m_selModel3, SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(modelSelectionChanged()));
disconnect(m_selModel1, &QItemSelectionModel::selectionChanged, this, &ItemSelection::modelSelectionChanged);
disconnect(m_selModel2, &QItemSelectionModel::selectionChanged, this, &ItemSelection::modelSelectionChanged);
disconnect(m_selModel3, &QItemSelectionModel::selectionChanged, this, &ItemSelection::modelSelectionChanged);
}
void ItemSelection::modelSelectionChanged()
......
......@@ -57,7 +57,7 @@ ItemViewerWidget::ItemViewerWidget(ItemSelection *itemSelection, QWidget *parent
m_widgetStack->addWidget(m_noteViewer);
m_widgetStack->addWidget(m_incidenceViewer);
connect(itemSelection, SIGNAL(selectionChanged(QModelIndex)), SLOT(selectionChanged(QModelIndex)));
connect(itemSelection, &ItemSelection::selectionChanged, this, &ItemViewerWidget::selectionChanged);
}
void ItemViewerWidget::selectionChanged(const QModelIndex &selectedIndex)
......
......@@ -76,7 +76,7 @@ NoteViewer::NoteViewer(QWidget *parent, Qt::WindowFlags f)
void NoteViewer::setIndex(const QPersistentModelIndex &index)
{
m_persistentIndex = index;
connect(m_persistentIndex.model(), SIGNAL(dataChanged(QModelIndex,QModelIndex)), SLOT(dataChanged(QModelIndex,QModelIndex)));
connect(m_persistentIndex.model(), &QAbstractItemModel::dataChanged, this, &NoteViewer::dataChanged);
populateWidget(m_persistentIndex);
}
......
......@@ -27,14 +27,14 @@ QMLListSelectionModel::QMLListSelectionModel(QItemSelectionModel *selectionModel
: QObject(parent)
, m_selectionModel(selectionModel)
{
connect(m_selectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SIGNAL(selectionChanged()));
connect(m_selectionModel, &QItemSelectionModel::selectionChanged, this, &QMLListSelectionModel::selectionChanged);
}
QMLListSelectionModel::QMLListSelectionModel(QAbstractItemModel *model, QObject *parent)
: QObject(parent)
, m_selectionModel(new QItemSelectionModel(model, this))
{
connect(m_selectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SIGNAL(selectionChanged()));
connect(m_selectionModel, &QItemSelectionModel::selectionChanged, this, &QMLListSelectionModel::selectionChanged);
}
QItemSelectionModel *QMLListSelectionModel::selectionModel() const
......
......@@ -26,8 +26,8 @@
StackedWidgetView::StackedWidgetView(int widgetRole, QWidget *parent)
: QStackedWidget(parent)
, m_model(0)
, m_selectionModel(0)
, m_model(nullptr)
, m_selectionModel(nullptr)
, m_widgetRole(widgetRole)
{
}
......@@ -38,16 +38,16 @@ void StackedWidgetView::setModel(QAbstractItemModel *model)
refill();
connect(model, SIGNAL(modelReset()), SLOT(refill()));
connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), SLOT(insertRows(QModelIndex,int,int)));
connect(model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), SLOT(removeRows(QModelIndex,int,int)));
connect(model, &QAbstractItemModel::modelReset, this, &StackedWidgetView::refill);
connect(model, &QAbstractItemModel::rowsInserted, this, &StackedWidgetView::insertRows);
connect(model, &QAbstractItemModel::rowsAboutToBeRemoved, this, &StackedWidgetView::removeRows);
}
void StackedWidgetView::setSelectionModel(QItemSelectionModel *selectionModel)
{
m_selectionModel = selectionModel;
connect(m_selectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SLOT(updateCurrentWidget()));
connect(m_selectionModel, &QItemSelectionModel::selectionChanged, this, &StackedWidgetView::updateCurrentWidget);
}
void StackedWidgetView::refill()
......
......@@ -38,7 +38,7 @@ void TodoCheckableProxyModel::setSourceModel(QAbstractItemModel *sourceModel)
QItemSelectionModel *selectionModel = new QItemSelectionModel(sourceModel, this);
setSelectionModel(selectionModel);
connect(selectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(selectionChanged(QItemSelection,QItemSelection)));
connect(selectionModel, &QItemSelectionModel::selectionChanged, this, &TodoCheckableProxyModel::selectionChanged);
}
void TodoCheckableProxyModel::selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
......
......@@ -42,7 +42,7 @@ Trip::Trip(const QPersistentModelIndex &index, Akonadi::Monitor *monitor, TripCo
, m_monitor(monitor)
{
QAbstractItemModel *model = const_cast<QAbstractItemModel *>(m_index.model());
connect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), SLOT(dataChanged(QModelIndex,QModelIndex)));
connect(model, &QAbstractItemModel::dataChanged, this, &Trip::dataChanged);
connect(model, &QAbstractItemModel::modelReset, this, &Trip::modelReset);
connect(model, &QAbstractItemModel::layoutChanged, this, &Trip::layoutChanged);
connect(model, &QAbstractItemModel::rowsRemoved, this, &Trip::rowsRemoved);
......
......@@ -48,9 +48,9 @@ TripModel::TripModel(Akonadi::Monitor *monitor, QObject *parent)
Trip *create = new Trip(createIndex(0, 0), monitor, &factory);
m_createWidget = new CreateTripWidget(create, monitor);
QTimer::singleShot(0, this, SLOT(repopulate()));
QTimer::singleShot(0, this, &TripModel::repopulate);
connect(this, SIGNAL(modelReset()), SLOT(thisModelReset()));
connect(this, &QAbstractItemModel::modelReset, this, &TripModel::thisModelReset);
}
QModelIndex TripModel::index(int row, int column, const QModelIndex &parent) const
......
......@@ -42,7 +42,7 @@ CollectionMonitoredWidget::CollectionMonitoredWidget(QWidget *parent, Qt::Window
m_etw = new EntityTreeWidget(splitter);
m_etw->init();
connect(m_etw->view()->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SLOT(selectionChanged(QItemSelection,QItemSelection)));
connect(m_etw->view()->selectionModel(), &QItemSelectionModel::selectionChanged, this, &CollectionMonitoredWidget::selectionChanged);
m_oneCollectionChangeRecorder = new Akonadi::Monitor(this);
......
......@@ -47,7 +47,7 @@ DescTabWidget::DescTabWidget(QWidget *parent, Qt::WindowFlags f)
m_descView = new QTreeView(splitter);
QTimer::singleShot(5000, this, SLOT(connectProxy()));
QTimer::singleShot(5000, this, &DescTabWidget::connectProxy);
}
void DescTabWidget::connectProxy()
......
......@@ -120,7 +120,7 @@ void EntityTreeWidget::init()
m_etm = getETM();
connectTreeToModel(m_treeView, m_etm);
connect(m_typeComboBox, SIGNAL(currentIndexChanged(int)), SLOT(mimeTypesChoiceChanged(int)));
connect(m_typeLineEdit, SIGNAL(textChanged(QString)), SLOT(mimeTypesChanged(QString)));
connect(m_typeLineEdit, &QLineEdit::textChanged, this, &EntityTreeWidget::mimeTypesChanged);
}
Akonadi::Monitor *EntityTreeWidget::monitor() const
......
......@@ -52,7 +52,7 @@ ItemViewerWidget::ItemViewerWidget(QItemSelectionModel *itemSelectionModel, QWid
m_widgetStack->addWidget(m_contactViewer);
m_widgetStack->addWidget(m_noteViewer);
connect(itemSelectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SLOT(selectionChanged(QItemSelection,QItemSelection)));
connect(itemSelectionModel, &QItemSelectionModel::selectionChanged, this, &ItemViewerWidget::selectionChanged);
}
void ItemViewerWidget::selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
......
......@@ -76,7 +76,7 @@ NoteViewer::NoteViewer(QWidget *parent, Qt::WindowFlags f)
void NoteViewer::setIndex(const QPersistentModelIndex &index)
{
m_persistentIndex = index;
connect(m_persistentIndex.model(), SIGNAL(dataChanged(QModelIndex,QModelIndex)), SLOT(dataChanged(QModelIndex,QModelIndex)));
connect(m_persistentIndex.model(), &QAbstractItemModel::dataChanged, this, &NoteViewer::dataChanged);
populateWidget(m_persistentIndex);
}
......
......@@ -83,7 +83,7 @@ Tab2_5Widget::Tab2_5Widget(QWidget *parent, Qt::WindowFlags f)
ItemViewerWidget *viewerWidget = new ItemViewerWidget(m_itemView->selectionModel(), rhsContainer);
connect(m_etw->view(), SIGNAL(activated(QModelIndex)), SLOT(setMappedRootIndex(QModelIndex)));
connect(m_etw->view(), &QAbstractItemView::activated, this, &Tab2_5Widget::setMappedRootIndex);
}
void Tab2_5Widget::setMappedRootIndex(const QModelIndex &index)
......
......@@ -78,7 +78,7 @@ Tab2Widget::Tab2Widget(QWidget *parent, Qt::WindowFlags f)
ItemViewerWidget *viewerWidget = new ItemViewerWidget(m_itemView->selectionModel(), rhsContainer);
connect(m_etw->view(), SIGNAL(activated(QModelIndex)), SLOT(setMappedRootIndex(QModelIndex)));
connect(m_etw->view(), &QAbstractItemView::activated, this, &Tab2Widget::setMappedRootIndex);
}
void Tab2Widget::setMappedRootIndex(const QModelIndex &index)
......
......@@ -83,7 +83,7 @@ UnreadMailsInCollectionsWidget::UnreadMailsInCollectionsWidget(QWidget *parent,
{
QVBoxLayout *layout = new QVBoxLayout(this);
QPushButton *configureButton = new QPushButton(QStringLiteral("Configure"));
connect(configureButton, SIGNAL(clicked(bool)), SLOT(configure()));
connect(configureButton, &QAbstractButton::clicked, this, &UnreadMailsInCollectionsWidget::configure);
layout->addWidget(configureButton);
QSplitter *splitter = new QSplitter;
......
......@@ -197,7 +197,7 @@ CSVImportDialog::CSVImportDialog(QWidget *parent)
connect(mDelimiterEdit, QOverload<>::of(&QLineEdit::returnPressed), this, [this]() {
customDelimiterChanged();
});
connect(mDelimiterEdit, QOverload<const QString &>::of(&QLineEdit::textChanged), [this](const QString &str) {
connect(mDelimiterEdit, QOverload<const QString &>::of(&QLineEdit::textChanged), this, [this](const QString &str) {
customDelimiterChanged(str);
});
connect(mComboQuote, QOverload<const QString &>::of(&KComboBox::activated), this, [this](const QString &str) {
......
......@@ -119,12 +119,12 @@ QCsvModel::QCsvModel(QObject *parent)
{
mParser = new CsvParser(this);
connect(mParser, SIGNAL(columnCountChanged(int)),
this, SLOT(columnCountChanged(int)), Qt::QueuedConnection);
connect(mParser, SIGNAL(rowCountChanged(int)),
this, SLOT(rowCountChanged(int)), Qt::QueuedConnection);
connect(mParser, SIGNAL(dataChanged(QString,int,int)),
this, SLOT(fieldChanged(QString,int,int)), Qt::QueuedConnection);
connect(mParser, &CsvParser::columnCountChanged,
this, &QCsvModel::columnCountChanged, Qt::QueuedConnection);
connect(mParser, &CsvParser::rowCountChanged,
this, &QCsvModel::rowCountChanged, Qt::QueuedConnection);
connect(mParser, &CsvParser::dataChanged,
this, &QCsvModel::fieldChanged, Qt::QueuedConnection);
connect(mParser, &CsvParser::ended, this, &QCsvModel::finishedLoading);
}
......
......@@ -152,6 +152,7 @@ private:
class TemplateSelectionDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
explicit TemplateSelectionDelegate(QObject *parent = nullptr)
: QStyledItemDelegate(parent)
......
......@@ -23,7 +23,8 @@
using namespace KABMergeContacts;
using namespace KContacts;
MergeContactsTest::MergeContactsTest()
MergeContactsTest::MergeContactsTest(QObject *parent)
: QObject(parent)
{
}
......
......@@ -26,7 +26,7 @@ class MergeContactsTest : public QObject
{
Q_OBJECT
public:
MergeContactsTest();
explicit MergeContactsTest(QObject *parent = nullptr);
private Q_SLOTS:
void shouldReturnDefaultAddressWhenNoListItem();
......
......@@ -24,6 +24,7 @@
class SendMailPluginInterface : public PimCommon::GenericPluginInterface
{
Q_OBJECT
public:
explicit SendMailPluginInterface(QObject *parent = nullptr);
~SendMailPluginInterface() override;
......
......@@ -36,9 +36,6 @@ public:
QString description() const override;
bool canWorkOnHtml() const override;
bool hasStatusBarSupport() const override;
Q_SIGNALS:
void configChanged();
};
#endif // MARKDOWNPLUGIN_H
......@@ -47,8 +47,9 @@ SelectMailWidget::~SelectMailWidget()
QStringList SelectMailWidget::selectedEmails() const
{
QStringList lst;
lst.reserve(mView->selectedAddresses().count());
for (const Akonadi::EmailAddressSelection &selection : mView->selectedAddresses()) {
const auto selectedAddress = mView->selectedAddresses();
lst.reserve(selectedAddress.count());
for (const Akonadi::EmailAddressSelection &selection : selectedAddress) {
lst.append(selection.email());
}
return lst;
......
......@@ -536,7 +536,7 @@ void AntiSpamWizard::checkToolAvailability()
const KConfigGroup grp = resourceFile.group(QStringLiteral("network"));
if (grp.isValid()) {
const QString host = grp.readEntry(QStringLiteral("ImapServer"));
if (host.toLower().contains(pattern.toLower())) {
if (host.contains(pattern.toLower(), Qt::CaseInsensitive)) {
mInfoPage->addAvailableTool((*it).getVisibleName());
found = true;
}
......@@ -546,7 +546,7 @@ void AntiSpamWizard::checkToolAvailability()
const KConfigGroup grp = resourceFile.group(QStringLiteral("General"));
if (grp.isValid()) {
const QString host = grp.readEntry(QStringLiteral("host"));
if (host.toLower().contains(pattern.toLower())) {
if (host.contains(pattern.toLower(), Qt::CaseInsensitive)) {
mInfoPage->addAvailableTool((*it).getVisibleName());
found = true;
}
......
......@@ -38,7 +38,7 @@
#ifndef Q_OS_WIN
void initLocale()
{
setenv("KDEHOME", QFile::encodeName(QDir::homePath() + QString::fromLatin1(
setenv("KDEHOME", QFile::encodeName(QDir::homePath() + QLatin1String(
"/.qttest")).constData(), 1);
setenv("LC_ALL", "en_US.utf-8", 1);
setenv("TZ", "UTC", 1);
......
......@@ -40,7 +40,7 @@
#ifndef Q_OS_WIN
void initLocale()
{
setenv("KDEHOME", QFile::encodeName(QDir::homePath() + QString::fromLatin1(
setenv("KDEHOME", QFile::encodeName(QDir::homePath() + QLatin1String(
"/.qttest")).constData(), 1);
setenv("LC_ALL", "en_US.utf-8", 1);
setenv("TZ", "UTC", 1);
......
......@@ -1259,7 +1259,7 @@ public:
// If the bodypart does not have a charset specified, we need to fall back to utf8,
// not the KMail fallback encoding, so get the contents as binary and decode explicitly.
QString iCal;
if (!part->content()->contentType()->hasParameter(QLatin1String("charset"))) {
if (!part->content()->contentType()->hasParameter(QStringLiteral("charset"))) {
const QByteArray &ba = part->content()->decodedContent();
iCal = QString::fromUtf8(ba);
} else {
......@@ -1396,7 +1396,7 @@ public:
}
QString iCal;
if (!part->content()->contentType()->hasParameter(QLatin1String("charset"))) {
if (!part->content()->contentType()->hasParameter(QStringLiteral("charset"))) {
const QByteArray &ba = part->content()->decodedContent();
iCal = QString::fromUtf8(ba);
} else {
......
......@@ -82,28 +82,28 @@ public:
const auto dir = mp->nodeHelper()->createTempDir(QStringLiteral("pkpass"));
const auto logo = pass->logo();
if (!logo.isNull()) {
const auto fileName = dir + QStringLiteral("/logo.png");
const QString fileName = dir + QStringLiteral("/logo.png");
logo.save(fileName);
pass->setProperty("logoUrl", QUrl::fromLocalFile(fileName));
mp->nodeHelper()->addTempFile(fileName);
}
const auto strip = pass->strip();
if (!strip.isNull()) {
const auto fileName = dir + QStringLiteral("/strip.png");
const QString fileName = dir + QStringLiteral("/strip.png");
strip.save(fileName);
pass->setProperty("stripUrl", QUrl::fromLocalFile(fileName));
mp->nodeHelper()->addTempFile(fileName);
}
const auto background = pass->background();
if (!background.isNull()) {
const auto fileName = dir + QStringLiteral("/background.png");
const QString fileName = dir + QStringLiteral("/background.png");
background.save(fileName);
pass->setProperty("backgroundUrl", QUrl::fromLocalFile(fileName));
mp->nodeHelper()->addTempFile(fileName);
}
const auto footer = pass->footer();
if (!footer.isNull()) {
const auto fileName = dir + QStringLiteral("/footer.png");
const QString fileName = dir + QStringLiteral("/footer.png");
footer.save(fileName);
pass->setProperty("footerUrl", QUrl::fromLocalFile(fileName));
mp->nodeHelper()->addTempFile(fileName);
......@@ -128,7 +128,7 @@ public:
code->setData(barcode.message());
code->toImage(code->minimumSize()); // minimumSize is only available after we rendered once...
const auto fileName = dir + QStringLiteral("/barcode.png");
const QString fileName = dir + QStringLiteral("/barcode.png");
code->toImage(code->minimumSize()).save(fileName);
pass->setProperty("barcodeUrl", QUrl::fromLocalFile(fileName));
......
......@@ -234,7 +234,7 @@ bool SemanticUrlHandler::handleContextMenuRequest(MimeTreeParser::Interface::Bod
for (const QString &deviceId : reply.value()) {
QDBusInterface deviceIface(QStringLiteral("org.kde.kdeconnect"), QStringLiteral("/modules/kdeconnect/devices/") + deviceId, QStringLiteral("org.kde.kdeconnect.device"));
QDBusReply<bool> pluginReply = deviceIface.call(QLatin1String("hasPlugin"), QLatin1String("kdeconnect_share"));
QDBusReply<bool> pluginReply = deviceIface.call(QStringLiteral("hasPlugin"), QLatin1String("kdeconnect_share"));
if (pluginReply.value()) {
action = menu.addAction(QIcon::fromTheme(QStringLiteral("kdeconnect")), i18n("Send to %1", deviceIface.property("name").toString()));
......
......@@ -174,8 +174,7 @@ QString FancyHeaderStyle::format(KMime::Message *message) const
if (!str.isEmpty()) {
headerStr.append(QStringLiteral("<tr><th>%1</th>\n"
"<td>%2</td></tr>\n")
.arg(i18n("BCC: "))
.arg(str));
.arg(i18n("BCC: "), str));
}
}
......@@ -203,10 +202,7 @@ QString FancyHeaderStyle::format(KMime::Message *message) const
}
headerStr.append(QStringLiteral("<tr><th>%1</th>\n"
"<td>%2/%3, <strong>%4</strong></td></tr>\n")
.arg(i18n("Bugzilla: "))
.arg(mHeaderStyleUtil.strToHtml(product))
.arg(mHeaderStyleUtil.strToHtml(component))
.arg(mHeaderStyleUtil.strToHtml(status)));
.arg(i18n("Bugzilla: "), mHeaderStyleUtil.strToHtml(product), mHeaderStyleUtil.strToHtml(component), mHeaderStyleUtil.strToHtml(status)));
}
}
......@@ -215,8 +211,7 @@ QString FancyHeaderStyle::format(KMime::Message *message) const
const QString to = hrd->asUnicodeString();
headerStr.append(QStringLiteral("<tr><th>%1</th>\n"
"<td>%2</tr>\n")
.arg(i18n("MDN To: "))
.arg(mHeaderStyleUtil.strToHtml(to)));
.arg(i18n("MDN To: "), mHeaderStyleUtil.strToHtml(to)));
}
}
......
......@@ -41,7 +41,8 @@ namespace MessageViewer {
extern MESSAGEVIEWER_EXPORT QAbstractItemModel *_k_eventEditStubModel;
}
EventEditTest::EventEditTest()
EventEditTest::EventEditTest(QObject *parent)
: QObject(parent)
{
qRegisterMetaType<Akonadi::Collection>();
qRegisterMetaType<KMime::Message::Ptr>();
......
......@@ -25,7 +25,7 @@ class EventEditTest : public QObject
{
Q_OBJECT
public:
EventEditTest();
explicit EventEditTest(QObject *parent = nullptr);
private Q_SLOTS:
void shouldHaveDefaultValuesOnCreation();
......
......@@ -45,9 +45,6 @@ AkonadiPimDataSource::AkonadiPimDataSource(QObject *parent)
mCalendar = new EventModel(this);
const auto config = KSharedConfig::openConfig();
const auto group = config->group("PIMEventsPlugin");
const QList<qint64> calendars = group.readEntry(QStringLiteral("calendars"), QList<qint64>());
onSettingsChanged();
// Would be nice to have a proper API to read KOrganizer calendar colors...
......
......@@ -25,7 +25,7 @@
class QWebEngineView;
namespace AdBlock {
class AdblockManager;
class AdBlockResult;
struct AdBlockResult;
}
class AdblockInterceptorInterface : public WebEngineViewer::NetworkPluginUrlInterceptorInterface
{
......
......@@ -81,7 +81,7 @@ void AdblockManager::loadSubscriptions()
QDir(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation)).mkdir(QStringLiteral("adblock"));
}
for (const QString &fileName : adblockDir.entryList(QStringList() << QLatin1String("*.txt"), QDir::Files)) {
for (const QString &fileName : adblockDir.entryList(QStringList() << QStringLiteral("*.txt"), QDir::Files)) {
if (fileName == QLatin1String("customlist.txt")) {
continue;
}
......
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