Commit 441ea1a3 authored by Laurent Montel's avatar Laurent Montel 😁

Minor clean up

parent 4e2fce0c
......@@ -317,7 +317,8 @@ bool FilterEdit::correctName(const QString &newText)
mNegativeBackground = QStringLiteral("QLineEdit{ background-color:%1 }").arg(bgBrush.brush(mNameLineEdit).color().name());
}
if (!newText.isEmpty()) {
for (int i = 0; i < mRulesList->count(); ++i) {
const int val = mRulesList->count();
for (int i = 0; i < val; ++i) {
QListWidgetItem *item = mRulesList->item(i);
if (item && (mRulesList->currentItem() != item)) {
if (newText == item->text()) {
......
......@@ -37,10 +37,10 @@
#include "korganizer_debug.h"
KOrganizerIfaceImpl::KOrganizerIfaceImpl(ActionManager *actionManager,
QObject *parent, const char *name)
QObject *parent, const QString &name)
: QObject(parent), mActionManager(actionManager)
{
setObjectName(QLatin1String(name));
setObjectName(name);
new KorganizerAdaptor(this);
QDBusConnection::sessionBus().registerObject(
QStringLiteral("/Korganizer"), this, QDBusConnection::ExportAdaptors);
......
......@@ -44,7 +44,7 @@ class KORGANIZERPRIVATE_EXPORT KOrganizerIfaceImpl : public QObject
Q_OBJECT
public:
explicit KOrganizerIfaceImpl(ActionManager *mActionManager,
QObject *parent = nullptr, const char *name = nullptr);
QObject *parent = nullptr, const QString &name = QString());
~KOrganizerIfaceImpl();
public Q_SLOTS:
......
......@@ -61,7 +61,7 @@ KOrganizer::KOrganizer() : KParts::MainWindow(), KOrg::MainWindow()
setCentralWidget(mCalendarView);
mActionManager = new ActionManager(this, mCalendarView, this, this, false, menuBar());
(void)new KOrganizerIfaceImpl(mActionManager, this, "IfaceImpl");
(void)new KOrganizerIfaceImpl(mActionManager, this, QStringLiteral("IfaceImpl"));
}
KOrganizer::~KOrganizer()
......
......@@ -65,7 +65,7 @@ KOrganizerPart::KOrganizerPart(QWidget *parentWidget, QObject *parent, const QVa
mView = new CalendarView(canvas);
mActionManager = new ActionManager(this, mView, this, this, true);
(void)new KOrganizerIfaceImpl(mActionManager, this, "IfaceImpl");
(void)new KOrganizerIfaceImpl(mActionManager, this, QStringLiteral("IfaceImpl"));
mActionManager->createCalendarAkonadi();
setHasDocument(false);
......
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