Commit 0c620780 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use auto vs auto * where it's possible

parent f5187645
Pipeline #49678 failed with stage
in 11 minutes and 38 seconds
......@@ -38,9 +38,9 @@ NotesAgentAlarmDialog::NotesAgentAlarmDialog(QWidget *parent)
setWindowTitle(i18nc("@title:window", "Alarm"));
setWindowIcon(QIcon::fromTheme(QStringLiteral("knotes")));
setAttribute(Qt::WA_DeleteOnClose);
auto *mainLayout = new QVBoxLayout(this);
auto mainLayout = new QVBoxLayout(this);
auto *vbox = new QVBoxLayout;
auto vbox = new QVBoxLayout;
mainLayout->addLayout(vbox);
mCurrentDateTime = new QLabel(this);
......@@ -84,7 +84,7 @@ void NotesAgentAlarmDialog::slotCustomContextMenuRequested(const QPoint &pos)
return;
}
Q_UNUSED(pos)
auto *entriesContextMenu = new QMenu(this);
auto entriesContextMenu = new QMenu(this);
QAction *removeAlarm = new QAction(QIcon::fromTheme(QStringLiteral("edit-delete")), i18n("Remove Alarm"), entriesContextMenu);
connect(removeAlarm, &QAction::triggered, this, &NotesAgentAlarmDialog::slotRemoveAlarm);
QAction *showNote = new QAction(i18n("Show Note..."), entriesContextMenu);
......@@ -134,7 +134,7 @@ void NotesAgentAlarmDialog::slotShowNote()
// deleted on close
const Akonadi::Item::Id id = mListWidget->currentItemId();
if (id != -1) {
auto *dlg = new NotesAgentNoteDialog;
auto dlg = new NotesAgentNoteDialog;
dlg->setNoteId(id);
dlg->show();
}
......@@ -146,7 +146,7 @@ void NotesAgentAlarmDialog::slotRemoveAlarm()
const Akonadi::Item::Id id = mListWidget->currentItemId();
if (id != -1) {
Akonadi::Item item(id);
auto *job = new Akonadi::ItemFetchJob(item, this);
auto job = new Akonadi::ItemFetchJob(item, this);
job->fetchScope().fetchAttribute<NoteShared::NoteAlarmAttribute>();
connect(job, &Akonadi::ItemFetchJob::result, this, &NotesAgentAlarmDialog::slotFetchItem);
}
......@@ -159,12 +159,12 @@ void NotesAgentAlarmDialog::slotFetchItem(KJob *job)
qCDebug(NOTESAGENT_LOG) << "fetch item failed " << job->errorString();
return;
}
auto *itemFetchJob = static_cast<Akonadi::ItemFetchJob *>(job);
auto itemFetchJob = static_cast<Akonadi::ItemFetchJob *>(job);
Akonadi::Item::List items = itemFetchJob->items();
if (!items.isEmpty()) {
Akonadi::Item item = items.first();
item.removeAttribute<NoteShared::NoteAlarmAttribute>();
auto *modify = new Akonadi::ItemModifyJob(item);
auto modify = new Akonadi::ItemModifyJob(item);
connect(modify, &Akonadi::ItemModifyJob::result, this, &NotesAgentAlarmDialog::slotModifyItem);
}
}
......@@ -182,7 +182,7 @@ void NotesAgentAlarmDialog::slotModifyAlarm()
Akonadi::Item::Id id = mListWidget->currentItemId();
if (id != -1) {
Akonadi::Item item(id);
auto *job = new Akonadi::ItemFetchJob(item, this);
auto job = new Akonadi::ItemFetchJob(item, this);
job->fetchScope().fetchFullPayload(true);
job->fetchScope().fetchAttribute<NoteShared::NoteAlarmAttribute>();
connect(job, &Akonadi::ItemFetchJob::result, this, &NotesAgentAlarmDialog::slotFetchAlarmItem);
......@@ -195,7 +195,7 @@ void NotesAgentAlarmDialog::slotFetchAlarmItem(KJob *job)
qCDebug(NOTESAGENT_LOG) << "fetch item failed " << job->errorString();
return;
}
auto *itemFetchJob = static_cast<Akonadi::ItemFetchJob *>(job);
auto itemFetchJob = static_cast<Akonadi::ItemFetchJob *>(job);
Akonadi::Item::List items = itemFetchJob->items();
if (!items.isEmpty()) {
Akonadi::Item item = items.first();
......@@ -221,7 +221,7 @@ void NotesAgentAlarmDialog::slotFetchAlarmItem(KJob *job)
} else {
item.removeAttribute<NoteShared::NoteAlarmAttribute>();
}
auto *modify = new Akonadi::ItemModifyJob(item);
auto modify = new Akonadi::ItemModifyJob(item);
connect(modify, &Akonadi::ItemModifyJob::result, this, &NotesAgentAlarmDialog::slotModifyItem);
}
delete dlg;
......
......@@ -26,7 +26,7 @@
NotesAgentNoteDialog::NotesAgentNoteDialog(QWidget *parent)
: QDialog(parent)
{
auto *mainLayout = new QVBoxLayout(this);
auto mainLayout = new QVBoxLayout(this);
setAttribute(Qt::WA_DeleteOnClose);
setWindowIcon(QIcon::fromTheme(QStringLiteral("knotes")));
......@@ -53,7 +53,7 @@ NotesAgentNoteDialog::~NotesAgentNoteDialog()
void NotesAgentNoteDialog::setNoteId(Akonadi::Item::Id id)
{
Akonadi::Item item(id);
auto *job = new Akonadi::ItemFetchJob(item, this);
auto job = new Akonadi::ItemFetchJob(item, this);
job->fetchScope().fetchFullPayload(true);
job->fetchScope().fetchAttribute<NoteShared::NoteDisplayAttribute>();
connect(job, &Akonadi::ItemFetchJob::result, this, &NotesAgentNoteDialog::slotFetchItem);
......@@ -65,7 +65,7 @@ void NotesAgentNoteDialog::slotFetchItem(KJob *job)
qCDebug(NOTESAGENT_LOG) << "fetch item failed " << job->errorString();
return;
}
auto *itemFetchJob = static_cast<Akonadi::ItemFetchJob *>(job);
auto itemFetchJob = static_cast<Akonadi::ItemFetchJob *>(job);
const Akonadi::Item::List lstItem = itemFetchJob->items();
if (!lstItem.isEmpty()) {
const Akonadi::Item item = lstItem.first();
......
......@@ -28,7 +28,7 @@ NotesAgentSettingsDialog::NotesAgentSettingsDialog(QWidget *parent)
{
setWindowTitle(i18nc("@title:window", "Configure Notes Agent"));
setWindowIcon(QIcon::fromTheme(QStringLiteral("knotes")));
auto *mainLayout = new QVBoxLayout(this);
auto mainLayout = new QVBoxLayout(this);
setModal(true);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help, this);
......@@ -38,7 +38,7 @@ NotesAgentSettingsDialog::NotesAgentSettingsDialog(QWidget *parent)
connect(buttonBox, &QDialogButtonBox::rejected, this, &NotesAgentSettingsDialog::reject);
connect(okButton, &QPushButton::clicked, this, &NotesAgentSettingsDialog::slotOkClicked);
auto *tab = new QTabWidget(this);
auto tab = new QTabWidget(this);
mNotify = new KNotifyConfigWidget(this);
mNotify->setApplication(QStringLiteral("akonadi_notes_agent"));
......@@ -64,7 +64,7 @@ NotesAgentSettingsDialog::NotesAgentSettingsDialog(QWidget *parent)
QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("knotes")));
aboutData.setTranslator(i18nc("NAME OF TRANSLATORS", "Your names"), i18nc("EMAIL OF TRANSLATORS", "Your emails"));
auto *helpMenu = new KHelpMenu(this, aboutData, true);
auto helpMenu = new KHelpMenu(this, aboutData, true);
// Initialize menu
QMenu *menu = helpMenu->menu();
helpMenu->action(KHelpMenu::menuAboutApp)->setIcon(QIcon::fromTheme(QStringLiteral("knotes")));
......
......@@ -162,7 +162,7 @@ void NotesManager::slotAcceptConnection()
QTcpSocket *s = mListener->nextPendingConnection();
if (s) {
auto *recv = new NoteShared::NotesNetworkReceiver(s);
auto recv = new NoteShared::NotesNetworkReceiver(s);
connect(recv, &NoteShared::NotesNetworkReceiver::sigNoteReceived, this, &NotesManager::slotNewNote);
}
}
......@@ -176,7 +176,7 @@ void NotesManager::slotNewNote(const QString &name, const QString &text)
nullptr,
KNotification::CloseOnTimeout,
QStringLiteral("akonadi_notes_agent"));
auto *job = new NoteShared::CreateNewNoteJob(this, nullptr);
auto job = new NoteShared::CreateNewNoteJob(this, nullptr);
// For the moment it doesn't support richtext.
job->setRichText(false);
job->setNote(name, text);
......
......@@ -39,7 +39,7 @@ void NoteEditorUtilsTest::testAddCheckmark()
const QString checkMark = QString::fromRawData(unicode, size);
NoteShared::NoteEditorUtils noteUtils;
auto *document = new QTextDocument(this);
auto document = new QTextDocument(this);
document->setPlainText(input);
QTextCursor textCursor(document);
if (position < 1) {
......
......@@ -40,20 +40,20 @@ NoteAlarmDialog::NoteAlarmDialog(const QString &caption, QWidget *parent)
, d(new NoteShared::NoteAlarmDialogPrivate)
{
setWindowTitle(caption);
auto *mainLayout = new QVBoxLayout(this);
auto mainLayout = new QVBoxLayout(this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
connect(buttonBox, &QDialogButtonBox::rejected, this, &NoteAlarmDialog::reject);
QWidget *page = new QWidget(this);
auto *pageVBoxLayout = new QVBoxLayout(page);
auto pageVBoxLayout = new QVBoxLayout(page);
pageVBoxLayout->setContentsMargins(0, 0, 0, 0);
d->m_buttons = new QButtonGroup(this);
QGroupBox *group = new QGroupBox(i18n("Scheduled Alarm"), page);
pageVBoxLayout->addWidget(group);
auto *layout = new QVBoxLayout;
auto layout = new QVBoxLayout;
QRadioButton *none = new QRadioButton(i18n("&No alarm"));
layout->addWidget(none);
d->m_buttons->addButton(none, 0);
......@@ -61,7 +61,7 @@ NoteAlarmDialog::NoteAlarmDialog(const QString &caption, QWidget *parent)
group->setLayout(layout);
QWidget *at = new QWidget;
auto *atHBoxLayout = new QHBoxLayout(at);
auto atHBoxLayout = new QHBoxLayout(at);
atHBoxLayout->setContentsMargins(0, 0, 0, 0);
QRadioButton *label_at = new QRadioButton(i18n("Alarm &at:"), at);
atHBoxLayout->addWidget(label_at);
......
......@@ -20,7 +20,7 @@ NoteAlarmAttribute::~NoteAlarmAttribute()
NoteAlarmAttribute *NoteAlarmAttribute::clone() const
{
auto *attr = new NoteAlarmAttribute();
auto attr = new NoteAlarmAttribute();
attr->setDateTime(dateTime());
return attr;
}
......
......@@ -40,7 +40,7 @@ NoteDisplayAttribute::~NoteDisplayAttribute()
NoteDisplayAttribute *NoteDisplayAttribute::clone() const
{
auto *attr = new NoteDisplayAttribute();
auto attr = new NoteDisplayAttribute();
attr->setBackgroundColor(backgroundColor());
attr->setForegroundColor(foregroundColor());
attr->setSize(size());
......
......@@ -17,13 +17,13 @@ using namespace NoteShared;
NoteActionConfig::NoteActionConfig(QWidget *parent)
: KCModule(parent)
{
auto *layout = new QGridLayout(this);
auto layout = new QGridLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
QLabel *label_MailAction = new QLabel(i18n("&Mail action:"), this);
layout->addWidget(label_MailAction, 0, 0);
auto *kcfg_MailAction = new QLineEdit(this);
auto kcfg_MailAction = new QLineEdit(this);
kcfg_MailAction->setObjectName(QStringLiteral("kcfg_MailAction"));
label_MailAction->setBuddy(kcfg_MailAction);
layout->addWidget(kcfg_MailAction, 0, 1);
......
......@@ -35,11 +35,11 @@ NoteNetworkConfigWidget::NoteNetworkConfigWidget(QWidget *parent)
: QWidget(parent)
, d(new NoteShared::NoteNetworkConfigWidgetPrivate)
{
auto *layout = new QVBoxLayout(this);
auto layout = new QVBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
QGroupBox *incoming = new QGroupBox(i18n("Incoming Notes"));
auto *tmpLayout = new QHBoxLayout;
auto tmpLayout = new QHBoxLayout;
d->mTmpChkB = new QCheckBox(i18n("Accept incoming notes"));
d->mTmpChkB->setObjectName(QStringLiteral("kcfg_ReceiveNotes"));
......@@ -99,9 +99,9 @@ void NoteNetworkConfigWidget::load()
NoteNetworkConfig::NoteNetworkConfig(QWidget *parent)
: KCModule(parent)
{
auto *lay = new QVBoxLayout(this);
auto lay = new QVBoxLayout(this);
lay->setContentsMargins(0, 0, 0, 0);
auto *noteNetworkConfigWidget = new NoteNetworkConfigWidget(this);
auto noteNetworkConfigWidget = new NoteNetworkConfigWidget(this);
lay->addWidget(noteNetworkConfigWidget);
addConfig(NoteShared::NoteSharedGlobalConfig::self(), noteNetworkConfigWidget);
load();
......
......@@ -100,7 +100,7 @@ void CreateNewNoteJob::createFetchCollectionJob(bool useSettings)
col = Akonadi::Collection(id);
}
NoteShared::NoteSharedGlobalConfig::self()->save();
auto *fetchCollection = new Akonadi::CollectionFetchJob(col, Akonadi::CollectionFetchJob::Base);
auto fetchCollection = new Akonadi::CollectionFetchJob(col, Akonadi::CollectionFetchJob::Base);
connect(fetchCollection, &Akonadi::CollectionFetchJob::result, this, &CreateNewNoteJob::slotFetchCollection);
}
......@@ -116,7 +116,7 @@ void CreateNewNoteJob::slotFetchCollection(KJob *job)
}
return;
}
auto *fetchCollection = qobject_cast<Akonadi::CollectionFetchJob *>(job);
auto fetchCollection = qobject_cast<Akonadi::CollectionFetchJob *>(job);
if (fetchCollection->collections().isEmpty()) {
qCDebug(NOTESHARED_LOG) << "No collection fetched";
if (KMessageBox::Yes
......@@ -134,7 +134,7 @@ void CreateNewNoteJob::slotFetchCollection(KJob *job)
== KMessageBox::warningYesNo(nullptr,
i18n("Collection is hidden. New note will be stored but not displayed. Do you want to show collection?"))) {
col.addAttribute(new NoteShared::ShowFolderNotesAttribute());
auto *job = new Akonadi::CollectionModifyJob(col);
auto job = new Akonadi::CollectionModifyJob(col);
connect(job, &Akonadi::CollectionModifyJob::result, this, &CreateNewNoteJob::slotCollectionModifyFinished);
}
}
......@@ -168,12 +168,12 @@ void CreateNewNoteJob::slotFetchCollection(KJob *job)
newItem.setPayload(newPage);
auto *eda = new Akonadi::EntityDisplayAttribute();
auto eda = new Akonadi::EntityDisplayAttribute();
eda->setIconName(QStringLiteral("text-plain"));
newItem.addAttribute(eda);
auto *job = new Akonadi::ItemCreateJob(newItem, col, this);
auto job = new Akonadi::ItemCreateJob(newItem, col, this);
connect(job, &Akonadi::ItemCreateJob::result, this, &CreateNewNoteJob::slotNoteCreationFinished);
} else {
deleteLater();
......
......@@ -29,7 +29,7 @@ NoteHostDialog::NoteHostDialog(const QString &caption, QWidget *parent)
{
setWindowTitle(caption);
auto *mainLayout = new QVBoxLayout(this);
auto mainLayout = new QVBoxLayout(this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
mOkButton = buttonBox->button(QDialogButtonBox::Ok);
......
......@@ -71,7 +71,7 @@ void NoteUtils::sendToNetwork(QWidget *parent, const QString &title, const QStri
// Send the note
auto socket = new QSslSocket;
socket->connectToHost(host, port);
auto *sender = new NoteShared::NotesNetworkSender(socket);
auto sender = new NoteShared::NotesNetworkSender(socket);
sender->setSenderId(NoteShared::NoteSharedGlobalConfig::senderID());
sender->setNote(title, message); // FIXME: plainText ??
}
......
......@@ -50,7 +50,7 @@ void LocalResourceCreator::createInstance()
{
Akonadi::AgentType notesType = Akonadi::AgentManager::self()->type(akonadiNotesInstanceName());
auto *job = new Akonadi::AgentInstanceCreateJob(notesType);
auto job = new Akonadi::AgentInstanceCreateJob(notesType);
connect(job, &Akonadi::AgentInstanceCreateJob::result, this, &LocalResourceCreator::slotInstanceCreated);
job->start();
......@@ -64,7 +64,7 @@ void LocalResourceCreator::slotInstanceCreated(KJob *job)
return;
}
auto *createJob = qobject_cast<Akonadi::AgentInstanceCreateJob *>(job);
auto createJob = qobject_cast<Akonadi::AgentInstanceCreateJob *>(job);
Akonadi::AgentInstance instance = createJob->instance();
instance.setName(i18nc("Default name for resource holding notes", "Local Notes"));
......@@ -79,7 +79,7 @@ void LocalResourceCreator::slotInstanceCreated(KJob *job)
}
instance.reconfigure();
auto *syncJob = new Akonadi::ResourceSynchronizationJob(instance, this);
auto syncJob = new Akonadi::ResourceSynchronizationJob(instance, this);
connect(syncJob, &Akonadi::ResourceSynchronizationJob::result, this, &LocalResourceCreator::slotSyncDone);
syncJob->start();
}
......
......@@ -68,7 +68,7 @@ void NoteListWidget::createItem(const Akonadi::Item &note)
if (!noteMessage) {
return;
}
auto *item = new QListWidgetItem(this);
auto item = new QListWidgetItem(this);
const KMime::Headers::Subject *const subject = noteMessage->subject(false);
if (subject) {
......
......@@ -74,7 +74,7 @@ KNotesApp::KNotesApp(QWidget *parent)
mDebugAkonadiSearch = !qEnvironmentVariableIsEmpty("KDEPIM_DEBUGGING");
if (KNotesGlobalConfig::self()->autoCreateResourceOnStart()) {
auto *creator = new NoteShared::LocalResourceCreator(this);
auto creator = new NoteShared::LocalResourceCreator(this);
creator->createIfMissing();
}
......@@ -243,7 +243,7 @@ void KNotesApp::slotDeleteSelectedNotes()
if (dlg->exec()) {
const Akonadi::Item::List lst = dlg->selectedNotes();
if (!lst.isEmpty()) {
auto *deleteJob = new Akonadi::ItemDeleteJob(lst, this);
auto deleteJob = new Akonadi::ItemDeleteJob(lst, this);
connect(deleteJob, &KJob::result, this, &KNotesApp::slotNoteDeleteFinished);
}
}
......@@ -293,7 +293,7 @@ void KNotesApp::slotRowInserted(const QModelIndex &parent, int start, int end)
void KNotesApp::createNote(const Akonadi::Item &item)
{
if (item.hasPayload<KMime::Message::Ptr>() && !mNotes.contains(item.id())) {
auto *note = new KNote(m_noteGUI, item, mDebugAkonadiSearch);
auto note = new KNote(m_noteGUI, item, mDebugAkonadiSearch);
mNotes.insert(item.id(), note);
connect(note, &KNote::sigShowNextNote, this, &KNotesApp::slotWalkThroughNotes);
connect(note, &KNote::sigRequestNewNote, this, [this] {
......@@ -314,7 +314,7 @@ void KNotesApp::updateSystray()
void KNotesApp::newNote(const QString &name, const QString &text)
{
auto *job = new NoteShared::CreateNewNoteJob(this, this);
auto job = new NoteShared::CreateNewNoteJob(this, this);
job->setRichText(KNotesGlobalConfig::self()->richText());
job->setNote(name, text);
job->start();
......@@ -677,7 +677,7 @@ void KNotesApp::slotOpenFindDialog()
void KNotesApp::fetchNotesFromCollection(const Akonadi::Collection &col)
{
auto *job = new Akonadi::ItemFetchJob(col);
auto job = new Akonadi::ItemFetchJob(col);
job->fetchScope().fetchFullPayload(true);
job->fetchScope().fetchAttribute<NoteShared::NoteLockAttribute>();
job->fetchScope().fetchAttribute<NoteShared::NoteDisplayAttribute>();
......@@ -693,7 +693,7 @@ void KNotesApp::slotItemFetchFinished(KJob *job)
return;
}
auto *fetchJob = qobject_cast<Akonadi::ItemFetchJob *>(job);
auto fetchJob = qobject_cast<Akonadi::ItemFetchJob *>(job);
const Akonadi::Item::List items = fetchJob->items();
for (const Akonadi::Item &item : items) {
......
......@@ -89,14 +89,14 @@ QHash<Akonadi::Collection, bool> KNoteCollectionDisplayProxyModel::displayCollec
KNoteCollectionConfigWidget::KNoteCollectionConfigWidget(QWidget *parent)
: QWidget(parent)
{
auto *mainLayout = new QHBoxLayout(this);
auto mainLayout = new QHBoxLayout(this);
mainLayout->setContentsMargins(0, 0, 0, 0);
auto *tabWidget = new QTabWidget;
auto tabWidget = new QTabWidget;
mainLayout->addWidget(tabWidget);
QWidget *collectionWidget = new QWidget;
auto *vbox = new QVBoxLayout;
auto vbox = new QVBoxLayout;
collectionWidget->setLayout(vbox);
tabWidget->addTab(collectionWidget, i18n("Folders"));
......@@ -113,7 +113,7 @@ KNoteCollectionConfigWidget::KNoteCollectionConfigWidget(QWidget *parent)
// Set the model to show only collections, not items.
mModel->setItemPopulationStrategy(Akonadi::EntityTreeModel::NoItemPopulation);
auto *mimeTypeProxy = new Akonadi::CollectionFilterProxyModel(this);
auto mimeTypeProxy = new Akonadi::CollectionFilterProxyModel(this);
mimeTypeProxy->setExcludeVirtualCollections(true);
mimeTypeProxy->addMimeTypeFilters(QStringList() << Akonadi::NoteUtils::noteMimeType());
mimeTypeProxy->setSourceModel(mModel);
......@@ -130,7 +130,7 @@ KNoteCollectionConfigWidget::KNoteCollectionConfigWidget(QWidget *parent)
mCollectionFilter->setDynamicSortFilter(true);
mCollectionFilter->setFilterCaseSensitivity(Qt::CaseInsensitive);
auto *searchLine = new QLineEdit(this);
auto searchLine = new QLineEdit(this);
searchLine->setPlaceholderText(i18n("Search..."));
searchLine->setClearButtonEnabled(true);
connect(searchLine, &QLineEdit::textChanged, this, &KNoteCollectionConfigWidget::slotSetCollectionFilter);
......@@ -146,7 +146,7 @@ KNoteCollectionConfigWidget::KNoteCollectionConfigWidget(QWidget *parent)
mFolderView->setModel(mCollectionFilter);
connect(mFolderView->selectionModel(), &QItemSelectionModel::selectionChanged, this, &KNoteCollectionConfigWidget::slotUpdateButtons);
auto *hbox = new QHBoxLayout;
auto hbox = new QHBoxLayout;
vbox->addLayout(hbox);
QPushButton *button = new QPushButton(i18n("&Select All"), this);
......@@ -176,10 +176,10 @@ KNoteCollectionConfigWidget::KNoteCollectionConfigWidget(QWidget *parent)
vbox->addWidget(mDefaultSaveFolder);
QWidget *accountWidget = new QWidget;
auto *vboxAccountWidget = new QVBoxLayout;
auto vboxAccountWidget = new QVBoxLayout;
accountWidget->setLayout(vboxAccountWidget);
auto *manageAccountWidget = new Akonadi::ManageAccountWidget(this);
auto manageAccountWidget = new Akonadi::ManageAccountWidget(this);
manageAccountWidget->setDescriptionLabelText(i18n("Notes accounts"));
vboxAccountWidget->addWidget(manageAccountWidget);
......@@ -226,7 +226,7 @@ void KNoteCollectionConfigWidget::slotRenameCollection()
col.setName(name);
}
auto *job = new Akonadi::CollectionModifyJob(col, this);
auto job = new Akonadi::CollectionModifyJob(col, this);
connect(job, &Akonadi::CollectionModifyJob::result, this, &KNoteCollectionConfigWidget::slotCollectionModifyFinished);
job->start();
}
......@@ -314,7 +314,7 @@ void KNoteCollectionConfigWidget::updateCollectionsRecursive()
void KNoteCollectionConfigWidget::slotModifyJobDone(KJob *job)
{
auto *modifyJob = qobject_cast<Akonadi::CollectionModifyJob *>(job);
auto modifyJob = qobject_cast<Akonadi::CollectionModifyJob *>(job);
if (modifyJob && job->error()) {
if (job->property("AttributeAdded").toBool()) {
qCWarning(KNOTES_MODULES_LOG) << "Failed to append ShowFolderNotesAttribute to collection" << modifyJob->collection().id() << ":"
......
......@@ -21,7 +21,7 @@
KNoteDisplayConfigWidget::KNoteDisplayConfigWidget(bool defaults, QWidget *parent)
: QWidget(parent)
{
auto *layout = new QGridLayout(this);
auto layout = new QGridLayout(this);
QLabel *label_FgColor = new QLabel(i18n("&Text color:"), this);
label_FgColor->setObjectName(QStringLiteral("label_FgColor"));
......
......@@ -18,7 +18,7 @@
KNoteEditorConfigWidget::KNoteEditorConfigWidget(QWidget *parent)
: QWidget(parent)
{
auto *layout = new QGridLayout(this);
auto layout = new QGridLayout(this);
QLabel *label_TabSize = new QLabel(i18n("&Tab size:"), this);
layout->addWidget(label_TabSize, 0, 0, 1, 2);
......
......@@ -25,7 +25,7 @@
KNoteSimpleConfigDialog::KNoteSimpleConfigDialog(const QString &title, QWidget *parent)
: QDialog(parent)
{
auto *mainLayout = new QVBoxLayout(this);
auto mainLayout = new QVBoxLayout(this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
......
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