mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-27 23:07:11 -05:00
Rework About dialog
This commit is contained in:
parent
a58700c78f
commit
1d79d342c0
@ -23,15 +23,17 @@
|
|||||||
#include "core/FilePath.h"
|
#include "core/FilePath.h"
|
||||||
#include "crypto/Crypto.h"
|
#include "crypto/Crypto.h"
|
||||||
|
|
||||||
|
#include <QClipboard>
|
||||||
|
#include <QSysInfo>
|
||||||
|
|
||||||
AboutDialog::AboutDialog(QWidget* parent)
|
AboutDialog::AboutDialog(QWidget* parent)
|
||||||
: QDialog(parent)
|
: QDialog(parent),
|
||||||
, m_ui(new Ui::AboutDialog())
|
m_ui(new Ui::AboutDialog())
|
||||||
{
|
{
|
||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
|
|
||||||
m_ui->nameLabel->setText(m_ui->nameLabel->text() + " " + KEEPASSX_VERSION);
|
m_ui->nameLabel->setText(m_ui->nameLabel->text() + " " + KEEPASSX_VERSION);
|
||||||
QFont nameLabelFont = m_ui->nameLabel->font();
|
QFont nameLabelFont = m_ui->nameLabel->font();
|
||||||
nameLabelFont.setBold(true);
|
|
||||||
nameLabelFont.setPointSize(nameLabelFont.pointSize() + 4);
|
nameLabelFont.setPointSize(nameLabelFont.pointSize() + 4);
|
||||||
m_ui->nameLabel->setFont(nameLabelFont);
|
m_ui->nameLabel->setFont(nameLabelFont);
|
||||||
|
|
||||||
@ -45,37 +47,55 @@ AboutDialog::AboutDialog(QWidget* parent)
|
|||||||
commitHash = DIST_HASH;
|
commitHash = DIST_HASH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString debugInfo = "KeePassXC - ";
|
||||||
|
debugInfo.append(tr("Version %1\n").arg(KEEPASSX_VERSION));
|
||||||
if (!commitHash.isEmpty()) {
|
if (!commitHash.isEmpty()) {
|
||||||
QString labelText = tr("Revision").append(": ").append(commitHash);
|
debugInfo.append(tr("Revision: %1").arg(commitHash).append("\n\n"));
|
||||||
m_ui->label_git->setText(labelText);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString libs = QString("%1\n- Qt %2\n- %3")
|
debugInfo.append(QString("%1\n- Qt %2\n- %3\n\n")
|
||||||
.arg(m_ui->label_libs->text())
|
.arg(tr("Libraries:"))
|
||||||
.arg(QString::fromLocal8Bit(qVersion()))
|
.arg(QString::fromLocal8Bit(qVersion()))
|
||||||
.arg(Crypto::backendVersion());
|
.arg(Crypto::backendVersion()));
|
||||||
m_ui->label_libs->setText(libs);
|
|
||||||
|
debugInfo.append(tr("Operating system: %1 (version: %2)\nCPU architecture: %3\nKernel: %4 %5")
|
||||||
|
.arg(QSysInfo::prettyProductName())
|
||||||
|
.arg(QSysInfo::productVersion())
|
||||||
|
.arg(QSysInfo::currentCpuArchitecture())
|
||||||
|
.arg(QSysInfo::kernelType())
|
||||||
|
.arg(QSysInfo::kernelVersion()));
|
||||||
|
|
||||||
|
debugInfo.append("\n\n");
|
||||||
|
|
||||||
QString extensions;
|
QString extensions;
|
||||||
#ifdef WITH_XC_HTTP
|
#ifdef WITH_XC_HTTP
|
||||||
extensions += "- KeePassHTTP\n";
|
extensions += "\n- KeePassHTTP";
|
||||||
#endif
|
#endif
|
||||||
#ifdef WITH_XC_AUTOTYPE
|
#ifdef WITH_XC_AUTOTYPE
|
||||||
extensions += "- Autotype\n";
|
extensions += "\n- Auto-Type";
|
||||||
#endif
|
#endif
|
||||||
#ifdef WITH_XC_YUBIKEY
|
#ifdef WITH_XC_YUBIKEY
|
||||||
extensions += "- Yubikey\n";
|
extensions += "\n- YubiKey";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (extensions.isEmpty())
|
if (extensions.isEmpty())
|
||||||
extensions = "None";
|
extensions = " None";
|
||||||
|
|
||||||
m_ui->label_features->setText(m_ui->label_features->text() + extensions);
|
debugInfo.append(tr("Enabled extensions:").append(extensions));
|
||||||
|
|
||||||
|
m_ui->debugInfo->setPlainText(debugInfo);
|
||||||
|
|
||||||
setAttribute(Qt::WA_DeleteOnClose);
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
connect(m_ui->buttonBox, SIGNAL(rejected()), SLOT(close()));
|
connect(m_ui->buttonBox, SIGNAL(rejected()), SLOT(close()));
|
||||||
|
connect(m_ui->copyToClipboard, SIGNAL(clicked()), SLOT(copyToClipboard()));
|
||||||
}
|
}
|
||||||
|
|
||||||
AboutDialog::~AboutDialog()
|
AboutDialog::~AboutDialog()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AboutDialog::copyToClipboard()
|
||||||
|
{
|
||||||
|
QClipboard* clipboard = QApplication::clipboard();
|
||||||
|
clipboard->setText(m_ui->debugInfo->toPlainText());
|
||||||
|
}
|
||||||
|
@ -33,6 +33,9 @@ public:
|
|||||||
explicit AboutDialog(QWidget* parent = nullptr);
|
explicit AboutDialog(QWidget* parent = nullptr);
|
||||||
~AboutDialog();
|
~AboutDialog();
|
||||||
|
|
||||||
|
protected slots:
|
||||||
|
void copyToClipboard();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QScopedPointer<Ui::AboutDialog> m_ui;
|
QScopedPointer<Ui::AboutDialog> m_ui;
|
||||||
};
|
};
|
||||||
|
@ -6,20 +6,23 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>455</width>
|
<width>479</width>
|
||||||
<height>266</height>
|
<height>488</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>About KeePassXC</string>
|
<string>About KeePassXC</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<property name="sizeConstraint">
|
|
||||||
<enum>QLayout::SetFixedSize</enum>
|
|
||||||
</property>
|
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<property name="topMargin">
|
||||||
|
<number>15</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>20</number>
|
||||||
|
</property>
|
||||||
|
<item alignment="Qt::AlignVCenter">
|
||||||
<widget class="QLabel" name="iconLabel">
|
<widget class="QLabel" name="iconLabel">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
@ -27,9 +30,21 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>48</width>
|
||||||
|
<height>48</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>48</width>
|
||||||
|
<height>48</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item alignment="Qt::AlignVCenter">
|
||||||
<widget class="QLabel" name="nameLabel">
|
<widget class="QLabel" name="nameLabel">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
@ -37,6 +52,12 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true"> KeePassXC</string>
|
<string notr="true"> KeePassXC</string>
|
||||||
</property>
|
</property>
|
||||||
@ -45,15 +66,20 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="sizePolicy">
|
<property name="currentIndex">
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
<number>0</number>
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
</property>
|
||||||
|
<widget class="QWidget" name="tab">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>About</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true"><a href="https://keepassxc.org/">https://keepassxc.org/</a></string>
|
<string notr="true"><html><head/><body><p>Website: <a href="https://keepassxc.org/"><span style=" text-decoration: underline; color:#007af4;">https://keepassxc.org/</span></a></p></body>
|
||||||
|
Report bugs at: <a href="https://github.com/keepassxreboot/keepassxc/issues">https://github.com/</a></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="openExternalLinks">
|
<property name="openExternalLinks">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@ -62,12 +88,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>KeePassXC is distributed under the terms of the GNU General Public License (GPL) version 2 or (at your option) version 3.</string>
|
<string>KeePassXC is distributed under the terms of the GNU General Public License (GPL) version 2 or (at your option) version 3.</string>
|
||||||
</property>
|
</property>
|
||||||
@ -77,36 +97,80 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_git">
|
<spacer name="verticalSpacer_2">
|
||||||
<property name="text">
|
<property name="orientation">
|
||||||
<string/>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="textInteractionFlags">
|
<property name="sizeType">
|
||||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>10</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="text">
|
||||||
|
<string><html><head/><body><div>Main contributors:
|
||||||
|
<ul>
|
||||||
|
<li>debfx (KeePassX)</li>
|
||||||
|
<li>droidmonkey</li>
|
||||||
|
<li>louib</li>
|
||||||
|
<li>phoerious<li>
|
||||||
|
<li>thezero</li>
|
||||||
|
</div></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_libs">
|
<spacer name="verticalSpacer">
|
||||||
<property name="text">
|
<property name="orientation">
|
||||||
<string>Using:</string>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="textInteractionFlags">
|
<property name="sizeHint" stdset="0">
|
||||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab_2">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Debug Info</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Include the following information whenever you report a bug:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_features">
|
<widget class="QPlainTextEdit" name="debugInfo">
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="copyToClipboard">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Extensions:
|
<string>Copy to clipboard</string>
|
||||||
</string>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="standardButtons">
|
<property name="standardButtons">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user