/***************************************************************************
- * Copyright (C) 2005-2014 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 *
#include "ui_nickeditdlg.h"
#ifdef HAVE_SSL
-#include <QSslCertificate>
-#include <QSslKey>
+# include <QSslCertificate>
+# include <QSslKey>
#endif
#include "clientidentity.h"
Q_OBJECT
public:
- IdentityEditWidget(QWidget *parent = 0);
+ IdentityEditWidget(QWidget* parent = nullptr);
- enum SslState {
+ enum SslState
+ {
NoSsl,
UnsecureSsl,
AllowSsl
};
- void displayIdentity(CertIdentity *id, CertIdentity *saveId = 0);
- void saveToIdentity(CertIdentity *id);
+ void displayIdentity(CertIdentity* id, CertIdentity* saveId = nullptr);
+ void saveToIdentity(CertIdentity* id);
public slots:
void setSslState(SslState state);
protected:
#ifdef HAVE_SSL
- virtual bool eventFilter(QObject *watched, QEvent *event);
+ bool eventFilter(QObject* watched, QEvent* event) override;
#endif
signals:
void setWidgetStates();
#ifdef HAVE_SSL
- void sslDragEnterEvent(QDragEnterEvent *event);
- void sslDropEvent(QDropEvent *event, bool isCert);
+ void sslDragEnterEvent(QDragEnterEvent* event);
+ void sslDropEvent(QDropEvent* event, bool isCert);
#endif
private:
bool _editSsl;
#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();
};
-
class NickEditDlg : public QDialog
{
Q_OBJECT
public:
- NickEditDlg(const QString &oldnick, const QStringList &existing = QStringList(), QWidget *parent = 0);
+ NickEditDlg(const QString& oldnick, QStringList existing = QStringList(), QWidget* parent = nullptr);
QString nick() const;
private slots:
- void on_nickEdit_textChanged(const QString &);
+ void on_nickEdit_textChanged(const QString&);
private:
Ui::NickEditDlg ui;
QStringList existing;
};
-
-#endif //IDENTITYEDITWIDGET_H
+#endif // IDENTITYEDITWIDGET_H