X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fsettingspages%2Fidentitiessettingspage.h;h=7dc31bf8903ed29e7f02bdc7fefc2a1fb2d3291e;hb=3640250eae6a30c7fb040c5aa5559b5b5107e661;hp=e931d70167a782b7178237a8d0a3327ec2d76e85;hpb=39328183a6a87c6eb10a9dbbffcd5d65bf154a1f;p=quassel.git diff --git a/src/qtui/settingspages/identitiessettingspage.h b/src/qtui/settingspages/identitiessettingspage.h index e931d701..7dc31bf8 100644 --- a/src/qtui/settingspages/identitiessettingspage.h +++ b/src/qtui/settingspages/identitiessettingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2018 by the Quassel Project * + * Copyright (C) 2005-2019 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -21,12 +21,11 @@ #pragma once #include "clientidentity.h" -#include "settingspage.h" - #include "identityeditwidget.h" +#include "settingspage.h" -#include "ui_identitiessettingspage.h" #include "ui_createidentitydlg.h" +#include "ui_identitiessettingspage.h" #include "ui_saveidentitiesdlg.h" class QAbstractItemModel; @@ -36,11 +35,11 @@ class IdentitiesSettingsPage : public SettingsPage Q_OBJECT public: - IdentitiesSettingsPage(QWidget *parent = nullptr); + IdentitiesSettingsPage(QWidget* parent = nullptr); - virtual inline bool needsCoreConnection() const { return true; } + inline bool needsCoreConnection() const override { return true; } - bool aboutToSave(); + bool aboutToSave() override; public slots: void save() final override; @@ -67,29 +66,28 @@ private slots: private: Ui::IdentitiesSettingsPage ui; - QHash identities; + QHash identities; IdentityId currentId; - QList changedIdentities; // for setting the widget changed state + QList changedIdentities; // for setting the widget changed state QList deletedIdentities; - bool _editSsl; + bool _editSsl{false}; - void insertIdentity(CertIdentity *identity); - void removeIdentity(Identity *identity); - void renameIdentity(IdentityId id, const QString &newName); + void insertIdentity(CertIdentity* identity); + void removeIdentity(Identity* identity); + void renameIdentity(IdentityId id, const QString& newName); #ifdef HAVE_SSL - QSslKey keyByFilename(const QString &filename); - void showKeyState(const QSslKey &key); - QSslCertificate certByFilename(const QString &filename); - void showCertState(const QSslCertificate &cert); + QSslKey keyByFilename(const QString& filename); + void showKeyState(const QSslKey& key); + QSslCertificate certByFilename(const QString& filename); + void showCertState(const QSslCertificate& cert); #endif bool testHasChanged(); }; - // ============================== // Various Dialogs // ============================== @@ -98,25 +96,27 @@ class CreateIdentityDlg : public QDialog Q_OBJECT public: - CreateIdentityDlg(QAbstractItemModel *model, QWidget *parent = nullptr); + CreateIdentityDlg(QAbstractItemModel* model, QWidget* parent = nullptr); QString identityName() const; IdentityId duplicateId() const; private slots: - void on_identityName_textChanged(const QString &text); + void on_identityName_textChanged(const QString& text); private: Ui::CreateIdentityDlg ui; }; - class SaveIdentitiesDlg : public QDialog { Q_OBJECT public: - SaveIdentitiesDlg(const QList &toCreate, const QList &toUpdate, const QList &toRemove, QWidget *parent = nullptr); + SaveIdentitiesDlg(const QList& toCreate, + const QList& toUpdate, + const QList& toRemove, + QWidget* parent = nullptr); private slots: void clientEvent();