File indexing completed on 2024-05-19 04:59:08
0001 /* ============================================================ 0002 * Falkon - Qt web browser 0003 * Copyright (C) 2010-2014 David Rosca <nowrep@gmail.com> 0004 * 0005 * This program is free software: you can redistribute it and/or modify 0006 * it under the terms of the GNU General Public License as published by 0007 * the Free Software Foundation, either version 3 of the License, or 0008 * (at your option) any later version. 0009 * 0010 * This program is distributed in the hope that it will be useful, 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0013 * GNU General Public License for more details. 0014 * 0015 * You should have received a copy of the GNU General Public License 0016 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0017 * ============================================================ */ 0018 #ifndef CERTIFICATEINFOWIDGET_H 0019 #define CERTIFICATEINFOWIDGET_H 0020 0021 #include <QWidget> 0022 0023 #include "qzcommon.h" 0024 0025 namespace Ui 0026 { 0027 class CertificateInfoWidget; 0028 } 0029 0030 class QSslCertificate; 0031 0032 class FALKON_EXPORT CertificateInfoWidget : public QWidget 0033 { 0034 public: 0035 explicit CertificateInfoWidget(const QSslCertificate &cert, QWidget* parent = nullptr); 0036 ~CertificateInfoWidget(); 0037 0038 // Qt5 compatibility 0039 // QSslCertificate::subjectInfo returns: 0040 // QString in Qt 4 0041 // QStringList in Qt 5 0042 // 0043 static QString showCertInfo(const QString &string); 0044 static QString showCertInfo(const QStringList &stringList); 0045 static QString clearCertSpecialSymbols(const QString &string); 0046 static QString clearCertSpecialSymbols(const QStringList &stringList); 0047 0048 static QString certificateItemText(const QSslCertificate &cert); 0049 0050 private: 0051 Ui::CertificateInfoWidget* ui; 0052 }; 0053 0054 #endif // CERTIFICATEINFOWIDGET_H