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

const'ify

parent 47295e05
Pipeline #36489 failed with stage
in 66 minutes and 48 seconds
......@@ -18,8 +18,12 @@ DateParser::~DateParser()
QDateTime DateParser::parse(const QString &dateStr) const
{
int year, month, day, hour, minute, second;
year = month = day = hour = minute = second = 0;
int year = 0;
int month = 0;
int day = 0;
int hour = 0;
int minute = 0;
int second = 0;
int currPos = 0;
for (int i = 0; i < mPattern.length(); ++i) {
......
......@@ -21,8 +21,8 @@ class QCsvReader::Private
public:
Private(QCsvBuilderInterface *builder)
: mBuilder(builder)
, mCodec(QTextCodec::codecForLocale())
{
mCodec = QTextCodec::codecForLocale();
}
void emitBeginLine(uint row);
......
......@@ -191,7 +191,7 @@ public:
}
private:
QIcon mIcon;
const QIcon mIcon;
};
TemplateSelectionDialog::TemplateSelectionDialog(QWidget *parent)
......
......@@ -42,7 +42,7 @@ Akonadi::Item::List SearchPotentialDuplicateContactJob::checkList(const Akonadi:
Akonadi::Item::List notDuplicate;
Akonadi::Item::List lst;
if (!lstItem.isEmpty()) {
Akonadi::Item firstItem = lstItem.at(0);
const Akonadi::Item firstItem = lstItem.at(0);
const int numberOfItems(lstItem.count());
for (int j = 1; j < numberOfItems; ++j) {
const Akonadi::Item nextItem = lstItem.at(j);
......
......@@ -35,7 +35,7 @@ private:
void finishJob();
void fetchItem(const Akonadi::Item &item);
void fetchNextItem();
Akonadi::Item::List mListItem;
const Akonadi::Item::List mListItem;
Akonadi::Item::List mItemToFetch;
QStringList mEmailAddresses;
int mFetchJobCount = 0;
......
......@@ -35,7 +35,7 @@ private:
void createTemporaryFile(const QByteArray &data, const QString &filename);
void createTemporaryDir();
void jobFinished();
Akonadi::Item::List mListItem;
const Akonadi::Item::List mListItem;
MimeTreeParser::AttachmentTemporaryFilesDirs *mAttachmentTemporary = nullptr;
QTemporaryDir *mTempDir = nullptr;
KContacts::VCardConverter::Version mVersion = KContacts::VCardConverter::v3_0;
......
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