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

Const'ify++

parent 24561b1b
Pipeline #174228 passed with stage
in 7 minutes and 39 seconds
......@@ -81,7 +81,7 @@ NewMailNotifierAgent::NewMailNotifierAgent(const QString &id)
changeRecorder()->ignoreSession(Akonadi::Session::defaultSession());
changeRecorder()->collectionFetchScope().setAncestorRetrieval(Akonadi::CollectionFetchScope::All);
changeRecorder()->setCollectionMonitored(Collection::root(), true);
mTimer.setInterval(5 * 1000);
mTimer.setInterval(5000); // 5secondes
connect(&mTimer, &QTimer::timeout, this, &NewMailNotifierAgent::slotShowNotifications);
if (isActive()) {
......
......@@ -44,7 +44,7 @@ private Q_SLOTS:
private:
void processCollection();
QStringList mMimeTypeFilter;
const QStringList mMimeTypeFilter;
Akonadi::Collection::List mCollections;
};
......
......@@ -28,28 +28,28 @@ enum {
bool InfoDialog::mError = false;
InfoDialog::InfoDialog(bool closeWhenDone)
: mCloseWhenDone(closeWhenDone)
: mButtonBox(new QDialogButtonBox(QDialogButtonBox::Close, this))
, mList(new QListWidget(this))
, mStatusLabel(new QLabel(this))
, mProgressBar(new QProgressBar(this))
, mCloseWhenDone(closeWhenDone)
{
setAttribute(Qt::WA_DeleteOnClose);
auto mainLayout = new QVBoxLayout(this);
mList = new QListWidget(this);
mList->setMinimumWidth(640);
mainLayout->addWidget(mList);
auto statusLayout = new QHBoxLayout;
mainLayout->addLayout(statusLayout);
mStatusLabel = new QLabel(this);
mStatusLabel->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred);
statusLayout->addWidget(mStatusLabel);
mProgressBar = new QProgressBar(this);
mProgressBar->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
mProgressBar->setMinimumWidth(200);
statusLayout->addWidget(mProgressBar);
mButtonBox = new QDialogButtonBox(QDialogButtonBox::Close, this);
connect(mButtonBox, &QDialogButtonBox::accepted, this, &InfoDialog::accept);
connect(mButtonBox, &QDialogButtonBox::rejected, this, &InfoDialog::reject);
mButtonBox->button(QDialogButtonBox::Close)->setEnabled(false);
......
......@@ -48,10 +48,10 @@ private:
void scrollBarMoved(int value);
QEventLoopLocker eventLoopLocker;
QDialogButtonBox *mButtonBox = nullptr;
QListWidget *mList = nullptr;
QLabel *mStatusLabel = nullptr;
QProgressBar *mProgressBar = nullptr;
QDialogButtonBox *const mButtonBox;
QListWidget *const mList;
QLabel *const mStatusLabel;
QProgressBar *const mProgressBar;
int mMigratorCount = 0;
static bool mError;
bool mChange = false;
......
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