Commit d3fb2123 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

modernize code

parent 6de855df
Pipeline #178491 passed with stage
in 22 minutes and 19 seconds
......@@ -33,9 +33,7 @@ OpenUrlWithConfigureCreateDialog::OpenUrlWithConfigureCreateDialog(QWidget *pare
});
}
OpenUrlWithConfigureCreateDialog::~OpenUrlWithConfigureCreateDialog()
{
}
OpenUrlWithConfigureCreateDialog::~OpenUrlWithConfigureCreateDialog() = default;
OpenUrlWithConfigureCreateWidget::OpenUrlWithInfo OpenUrlWithConfigureCreateDialog::info() const
{
......
......@@ -60,9 +60,7 @@ OpenUrlWithConfigureCreateWidget::OpenUrlWithConfigureCreateWidget(QWidget *pare
connect(mExecutable->lineEdit(), &QLineEdit::textChanged, this, &OpenUrlWithConfigureCreateWidget::slotInfoChanged);
}
OpenUrlWithConfigureCreateWidget::~OpenUrlWithConfigureCreateWidget()
{
}
OpenUrlWithConfigureCreateWidget::~OpenUrlWithConfigureCreateWidget() = default;
void OpenUrlWithConfigureCreateWidget::slotLinkClicked(const QString &link)
{
......
......@@ -126,7 +126,7 @@ void OpenUrlWithConfigureWidget::writeSettings()
{
QVector<MessageViewer::OpenWithUrlInfo> rules;
for (int i = 0, total = mListWidget->count(); i < total; ++i) {
OpenUrlWithConfigureItem *item = static_cast<OpenUrlWithConfigureItem *>(mListWidget->item(i));
auto item = static_cast<OpenUrlWithConfigureItem *>(mListWidget->item(i));
const MessageViewer::OpenWithUrlInfo r = item->info();
rules.append(r);
}
......@@ -146,7 +146,7 @@ void OpenUrlWithConfigureWidget::slotAddRule()
r.setUrl(info.url);
for (int i = 0, total = mListWidget->count(); i < total; ++i) {
OpenUrlWithConfigureItem *item = static_cast<OpenUrlWithConfigureItem *>(mListWidget->item(i));
auto item = static_cast<OpenUrlWithConfigureItem *>(mListWidget->item(i));
const MessageViewer::OpenWithUrlInfo openInfo = item->info();
if (openInfo == r) {
KMessageBox::information(this, i18n("Rule already exists."), i18n("Duplicate Rule"));
......@@ -163,7 +163,7 @@ void OpenUrlWithConfigureWidget::slotAddRule()
void OpenUrlWithConfigureWidget::slotEditRule()
{
OpenUrlWithConfigureItem *item = dynamic_cast<OpenUrlWithConfigureItem *>(mListWidget->currentItem());
auto item = dynamic_cast<OpenUrlWithConfigureItem *>(mListWidget->currentItem());
if (item) {
QPointer<OpenUrlWithConfigureCreateDialog> dlg = new OpenUrlWithConfigureCreateDialog(this);
OpenUrlWithConfigureCreateWidget::OpenUrlWithInfo info;
......
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