diff --git a/ktnef/src/qwmf.cpp b/ktnef/src/qwmf.cpp index 5c1d0de06..98aca0bb2 100644 --- a/ktnef/src/qwmf.cpp +++ b/ktnef/src/qwmf.cpp @@ -1085,7 +1085,7 @@ QColor QWinMetaFile::color(short *parm) green = (colorRef >> 8) & 255; blue = (colorRef >> 16) & 255; - return QColor(red, green, blue); + return {red, green, blue}; } //----------------------------------------------------------------------------- diff --git a/ktnef/src/wmfstruct.h b/ktnef/src/wmfstruct.h index 778325d8e..eee900ac7 100644 --- a/ktnef/src/wmfstruct.h +++ b/ktnef/src/wmfstruct.h @@ -6,10 +6,10 @@ #ifndef wmfstruct_h #define wmfstruct_h -typedef short WORD; -typedef int DWORD; -typedef qint32 LONG; -typedef void *_HANDLE; +using WORD = short; +using DWORD = int; +using LONG = qint32; +using _HANDLE = void *; typedef struct _RECT { WORD left; diff --git a/src/configuredialog/configagentdelegate.cpp b/src/configuredialog/configagentdelegate.cpp index 299c4003b..8aa272e40 100644 --- a/src/configuredialog/configagentdelegate.cpp +++ b/src/configuredialog/configagentdelegate.cpp @@ -153,7 +153,7 @@ QSize ConfigAgentDelegate::sizeHint(const QStyleOptionViewItem &option, const QM const int iconHeight = KIconLoader::global()->currentSize(KIconLoader::Desktop) + (s_delegatePaddingSize * 2); //icon height + padding either side const int textHeight = option.fontMetrics.height() + qMax(option.fontMetrics.height(), 16) + (s_delegatePaddingSize * 2); //height of text + icon/text + padding either side - return QSize(1, qMax(iconHeight, textHeight)); //any width,the view will give us the whole thing in list mode + return {1, qMax(iconHeight, textHeight)}; //any width,the view will give us the whole thing in list mode } QWidget *ConfigAgentDelegate::createEditor(QWidget *, const QStyleOptionViewItem &, const QModelIndex &) const diff --git a/src/configuredialog/configureaccountpage.cpp b/src/configuredialog/configureaccountpage.cpp index 862f37709..77dec81af 100644 --- a/src/configuredialog/configureaccountpage.cpp +++ b/src/configuredialog/configureaccountpage.cpp @@ -358,7 +358,7 @@ void AccountsPage::ReceivingTab::slotEditNotifications() { const auto instance = Akonadi::AgentManager::self()->instance(QStringLiteral("akonadi_newmailnotifier_agent")); if (instance.isValid()) { - std::unique_ptr(new Akonadi::AgentConfigurationDialog(instance, this))->exec(); + std::make_unique(instance, this)->exec(); } else { KMessageBox::error(this, i18n("New Mail Notifier Agent not registered. Please contact your administrator.")); } diff --git a/src/configuredialog/configureaccountpage.h b/src/configuredialog/configureaccountpage.h index 95d838633..c41c5fa5d 100644 --- a/src/configuredialog/configureaccountpage.h +++ b/src/configuredialog/configureaccountpage.h @@ -109,8 +109,8 @@ public: QString helpAnchor() const override; // hrmpf. moc doesn't like nested classes with slots/signals...: - typedef AccountsPageSendingTab SendingTab; - typedef AccountsPageReceivingTab ReceivingTab; + using SendingTab = AccountsPageSendingTab; + using ReceivingTab = AccountsPageReceivingTab; Q_SIGNALS: void accountListChanged(const QStringList &); diff --git a/src/configuredialog/configureappearancepage.h b/src/configuredialog/configureappearancepage.h index 515ee8afd..95328e10d 100644 --- a/src/configuredialog/configureappearancepage.h +++ b/src/configuredialog/configureappearancepage.h @@ -35,7 +35,7 @@ class ThemeComboBox; namespace MailCommon { class Tag; -typedef QSharedPointer TagPtr; +using TagPtr = QSharedPointer; } namespace MailCommon { @@ -264,12 +264,12 @@ public: QString helpAnchor() const override; // hrmpf. moc doesn't like nested classes with slots/signals...: - typedef AppearancePageFontsTab FontsTab; - typedef AppearancePageColorsTab ColorsTab; - typedef AppearancePageLayoutTab LayoutTab; - typedef AppearancePageHeadersTab HeadersTab; - typedef AppearancePageGeneralTab ReaderTab; - typedef AppearancePageMessageTagTab MessageTagTab; + using FontsTab = AppearancePageFontsTab; + using ColorsTab = AppearancePageColorsTab; + using LayoutTab = AppearancePageLayoutTab; + using HeadersTab = AppearancePageHeadersTab; + using ReaderTab = AppearancePageGeneralTab; + using MessageTagTab = AppearancePageMessageTagTab; }; #endif // CONFIGUREAPPEARANCEPAGE_H diff --git a/src/configuredialog/configurecomposerpage.h b/src/configuredialog/configurecomposerpage.h index eeec2ac8c..e2bac9166 100644 --- a/src/configuredialog/configurecomposerpage.h +++ b/src/configuredialog/configurecomposerpage.h @@ -235,15 +235,15 @@ public: QString helpAnchor() const override; // hrmpf. moc doesn't like nested classes with slots/signals...: - typedef ComposerPageGeneralTab GeneralTab; - typedef ComposerPageTemplatesTab TemplatesTab; - typedef ComposerPageCustomTemplatesTab CustomTemplatesTab; - typedef ComposerPageSubjectTab SubjectTab; - typedef ComposerPageCharsetTab CharsetTab; - typedef ComposerPageHeadersTab HeadersTab; - typedef ComposerPageAttachmentsTab AttachmentsTab; - typedef ComposerPageAutoCorrectionTab AutoCorrectionTab; - typedef ComposerPageAutoImageResizeTab AutoImageResizeTab; + using GeneralTab = ComposerPageGeneralTab; + using TemplatesTab = ComposerPageTemplatesTab; + using CustomTemplatesTab = ComposerPageCustomTemplatesTab; + using SubjectTab = ComposerPageSubjectTab; + using CharsetTab = ComposerPageCharsetTab; + using HeadersTab = ComposerPageHeadersTab; + using AttachmentsTab = ComposerPageAttachmentsTab; + using AutoCorrectionTab = ComposerPageAutoCorrectionTab; + using AutoImageResizeTab = ComposerPageAutoImageResizeTab; }; #endif // CONFIGURECOMPOSERPAGE_H diff --git a/src/configuredialog/configuredialog.cpp b/src/configuredialog/configuredialog.cpp index 198de5fa2..5f8fee8f1 100644 --- a/src/configuredialog/configuredialog.cpp +++ b/src/configuredialog/configuredialog.cpp @@ -44,7 +44,7 @@ QSize ConfigureDialog::sizeHint() const { const int width = KMailSettings::self()->configureDialogWidth(); const int height = KMailSettings::self()->configureDialogHeight(); - return QSize(width, height); + return {width, height}; } void ConfigureDialog::hideEvent(QHideEvent *ev) diff --git a/src/configuredialog/configuremiscpage.h b/src/configuredialog/configuremiscpage.h index fee6326bd..d47924ddd 100644 --- a/src/configuredialog/configuremiscpage.h +++ b/src/configuredialog/configuremiscpage.h @@ -59,8 +59,8 @@ public: explicit MiscPage(QWidget *parent = nullptr); QString helpAnchor() const override; - typedef MiscPageFolderTab FolderTab; - typedef MiscPageInviteTab InviteTab; + using FolderTab = MiscPageFolderTab; + using InviteTab = MiscPageInviteTab; }; class MiscPagePrintingTab : public ConfigModuleTab diff --git a/src/configuredialog/configuresecuritypage.h b/src/configuredialog/configuresecuritypage.h index e06bdfd8c..162fe6df8 100644 --- a/src/configuredialog/configuresecuritypage.h +++ b/src/configuredialog/configuresecuritypage.h @@ -138,11 +138,11 @@ public: QString helpAnchor() const override; - typedef SecurityPageGeneralTab ReadingTab; - typedef SecurityPageMDNTab MDNTab; - typedef SecurityPageComposerCryptoTab ComposerCryptoTab; - typedef SecurityPageWarningTab WarningTab; - typedef SecurityPageSMimeTab SMimeTab; + using ReadingTab = SecurityPageGeneralTab; + using MDNTab = SecurityPageMDNTab; + using ComposerCryptoTab = SecurityPageComposerCryptoTab; + using WarningTab = SecurityPageWarningTab; + using SMimeTab = SecurityPageSMimeTab; }; #endif // CONFIGURESECURITYPAGE_H diff --git a/src/editor/composer.h b/src/editor/composer.h index 6e21681a4..5f4387c36 100644 --- a/src/editor/composer.h +++ b/src/editor/composer.h @@ -42,7 +42,7 @@ public: HDR_DICTIONARY = 0x800, HDR_ALL = 0xfff }; - typedef QFlags VisibleHeaderFlags; + using VisibleHeaderFlags = QFlags; struct AttachmentInfo { QString comment; diff --git a/src/kmmainwidget.h b/src/kmmainwidget.h index 98830168e..0c9348b18 100644 --- a/src/kmmainwidget.h +++ b/src/kmmainwidget.h @@ -88,7 +88,7 @@ class KMAIL_EXPORT KMMainWidget : public QWidget Q_OBJECT public: - typedef QList PtrList; + using PtrList = QList; KMMainWidget(QWidget *parent, KXMLGUIClient *aGUIClient, KActionCollection *actionCollection, const KSharedConfig::Ptr &config = KMKernel::self()->config()); ~KMMainWidget() override;