Commit bcdf866c authored by Laurent Montel's avatar Laurent Montel 😁

Minor optimization

parent 86c83fa5
......@@ -22,7 +22,7 @@
#include <KLocalizedString>
#include <QLineEdit>
#include <QMessageBox>
#include <KMessageBox>
#include <kcheckableproxymodel.h>
#include <QListView>
#include "changerecorder.h"
......@@ -80,12 +80,6 @@ TagEditWidget::Private::Private(Akonadi::TagModel *model, QWidget *parent)
: QObject()
, d(parent)
, m_model(model)
, m_tagsView(nullptr)
, m_checkableProxy(nullptr)
, m_newTagButton(nullptr)
, m_newTagEdit(nullptr)
, m_deleteButton(nullptr)
, m_deleteButtonTimer(nullptr)
{
}
......@@ -182,7 +176,7 @@ void TagEditWidget::Private::deleteTag()
"Do you really want to remove the tag <resource>%1</resource>?",
tag.name());
const QString caption = i18nc("@title", "Delete tag");
if (QMessageBox::question(d, caption, text, i18nc("@action:button", "Delete"), i18nc("@action:button", "Cancel")) == 0) {
if (KMessageBox::questionYesNo(d, caption, text, KStandardGuiItem::del(), KStandardGuiItem::cancel()) == KMessageBox::Yes) {
new Akonadi::TagDeleteJob(tag, this);
}
}
......
......@@ -35,8 +35,7 @@ using namespace Akonadi;
struct Q_DECL_HIDDEN TagManagementDialog::Private {
Private(QDialog *parent)
: d(parent),
buttonBox(nullptr)
: d(parent)
{
}
void writeConfig();
......
......@@ -37,8 +37,6 @@ class Q_DECL_HIDDEN TagSelectionDialog::Private
public:
Private(QDialog *parent)
: d(parent)
, mTagWidget(nullptr)
, mButtonBox(nullptr)
{
}
void writeConfig();
......
......@@ -41,8 +41,7 @@ public:
void TagSelectWidget::Private::init()
{
QHBoxLayout *mainLayout = new QHBoxLayout;
mParent->setLayout(mainLayout);
QHBoxLayout *mainLayout = new QHBoxLayout(mParent);
Monitor *monitor = new Monitor(mParent);
monitor->setObjectName(QStringLiteral("TagSelectWidgetMonitor"));
......
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