Commit 5a6d9560 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Clean up code

parent f14098db
Pipeline #26061 passed with stage
in 10 minutes and 23 seconds
......@@ -68,9 +68,6 @@ public:
Private(EventView *eventView, Agenda *agenda)
: mEventView(eventView)
, mAgenda(agenda)
, mTimer(nullptr)
, mTimeBox(nullptr)
, mOldTodayCol(-1)
{
}
......@@ -82,7 +79,7 @@ public:
QTimer *mTimer = nullptr;
QLabel *mTimeBox = nullptr; // Label showing the current time
QDateTime mOldDateTime;
int mOldTodayCol;
int mOldTodayCol = -1;
};
int MarcusBains::Private::todayColumn() const
......
......@@ -75,7 +75,6 @@ enum {
class Q_DECL_HIDDEN EventIndicator::Private
{
EventIndicator *const q;
public:
Private(EventIndicator *parent, EventIndicator::Location loc)
......@@ -118,6 +117,8 @@ public:
Location mLocation;
QPixmap mPixmap;
QVector<bool> mEnabled;
private:
EventIndicator *const q;
};
EventIndicator::EventIndicator(Location loc, QWidget *parent)
......
......@@ -51,7 +51,7 @@ public Q_SLOTS:
protected:
void resizeEvent(QResizeEvent *) override;
virtual void squeezeTextToLabel();
bool mTextTypeFixed;
bool mTextTypeFixed = false;
QString mShortText, mLongText, mExtensiveText;
private:
......
......@@ -32,7 +32,6 @@ using namespace EventViews;
DecorationLabel::DecorationLabel(CalendarDecoration::Element *e, QWidget *parent)
: QLabel(parent)
, mAutomaticSqueeze(true)
, mDecorationElement(e)
, mShortText(e->shortText())
, mLongText(e->longText())
......@@ -57,7 +56,6 @@ DecorationLabel::DecorationLabel(CalendarDecoration::Element *e, QWidget *parent
DecorationLabel::DecorationLabel(const QString &shortText, const QString &longText, const QString &extensiveText, const QPixmap &pixmap, const QUrl &url, QWidget *parent)
: QLabel(parent)
, mAutomaticSqueeze(true)
, mShortText(shortText)
, mLongText(longText)
, mExtensiveText(extensiveText)
......
......@@ -56,7 +56,7 @@ protected:
void resizeEvent(QResizeEvent *) override;
void mouseReleaseEvent(QMouseEvent *) override;
virtual void squeezeContentsToLabel();
bool mAutomaticSqueeze;
bool mAutomaticSqueeze = true;
EventViews::CalendarDecoration::Element *mDecorationElement = nullptr;
QString mShortText, mLongText, mExtensiveText;
QPixmap mPixmap;
......
......@@ -49,7 +49,6 @@ using namespace EventViews;
JournalDateView::JournalDateView(const Akonadi::ETMCalendar::Ptr &calendar, QWidget *parent)
: QFrame(parent)
, mCalendar(calendar)
, mChanger(nullptr)
{
auto layout = new QVBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
......
......@@ -38,7 +38,6 @@
using namespace EventViews;
JournalView::JournalView(QWidget *parent) : EventView(parent)
, mChanger(nullptr)
{
QVBoxLayout *topLayout = new QVBoxLayout(this);
topLayout->setContentsMargins(0, 0, 0, 0);
......
......@@ -38,7 +38,7 @@ using namespace EventViews;
void WhatsNextTextBrowser::setSource(const QUrl &name)
{
QString uri = name.toString();
const QString uri = name.toString();
if (uri.startsWith(QLatin1String("event:"))) {
Q_EMIT showIncidence(uri);
} else if (uri.startsWith(QLatin1String("todo:"))) {
......
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