mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-26 15:59:50 -05:00
Various minor bug fixes / enhancements
* Fix issues when Config options were renamed * Fix compile issues when using clang 10 * Rearrange database menu icons and import database menu icons * Set minimum size of MainWindow to 800 to prevent search bar from hiding * Fix not saving password generator options when closing the standalone generator * Add headers to health check reports * Don't show hidden content dots when notes are hidden but empty. * Fix saving new database files in SMB shares on Windows, fixes #4809 * Gracefully handle duplicate attachments : Instead of bailing out with an error, prepend a random string to the name of duplicate attachment records. This prevents data loss from other programs that mishandled KDBX XML writing. Fixes #2493 * Properly handle blocked import of signed KeeShare database, fixes #4413
This commit is contained in:
parent
e36cba703e
commit
c830f85c09
@ -75,7 +75,7 @@ static const QHash<Config::ConfigKey, ConfigDirective> configStrings = {
|
||||
{Config::GlobalAutoTypeModifiers,{QS("GlobalAutoTypeModifiers"), Roaming, 0}},
|
||||
{Config::TrackNonDataChanges,{QS("TrackNonDataChanges"), Roaming, false}},
|
||||
{Config::FaviconDownloadTimeout,{QS("FaviconDownloadTimeout"), Roaming, 10}},
|
||||
{Config::UpdateCheckMessageShown,{QS("UpdateCheckMessageShown"), Roaming, true}},
|
||||
{Config::UpdateCheckMessageShown,{QS("UpdateCheckMessageShown"), Roaming, false}},
|
||||
{Config::UseTouchID,{QS("UseTouchID"), Roaming, false}},
|
||||
|
||||
{Config::LastDatabases, {QS("LastDatabases"), Local, {}}},
|
||||
@ -102,6 +102,7 @@ static const QHash<Config::ConfigKey, ConfigDirective> configStrings = {
|
||||
{Config::GUI_MonospaceNotes, {QS("GUI/MonospaceNotes"), Roaming, false}},
|
||||
{Config::GUI_ApplicationTheme, {QS("GUI/ApplicationTheme"), Roaming, QS("auto")}},
|
||||
{Config::GUI_CheckForUpdates, {QS("GUI/CheckForUpdates"), Roaming, true}},
|
||||
{Config::GUI_CheckForUpdatesNextCheck, {QS("GUI/CheckForUpdatesNextCheck"), Local, 0}},
|
||||
{Config::GUI_CheckForUpdatesIncludeBetas, {QS("GUI/CheckForUpdatesIncludeBetas"), Roaming, false}},
|
||||
|
||||
{Config::GUI_MainWindowGeometry, {QS("GUI/MainWindowGeometry"), Local, {}}},
|
||||
@ -111,7 +112,6 @@ static const QHash<Config::ConfigKey, ConfigDirective> configStrings = {
|
||||
{Config::GUI_SplitterState, {QS("GUI/SplitterState"), Local, {}}},
|
||||
{Config::GUI_PreviewSplitterState, {QS("GUI/PreviewSplitterState"), Local, {}}},
|
||||
{Config::GUI_AutoTypeSelectDialogSize, {QS("GUI/AutoTypeSelectDialogSize"), Local, QSize(600, 250)}},
|
||||
{Config::GUI_CheckForUpdatesNextCheck, {QS("GUI/AutoTypeSelectDialogSize"), Local, 0}},
|
||||
|
||||
// Security
|
||||
{Config::Security_ClearClipboard, {QS("Security/ClearClipboard"), Roaming, true}},
|
||||
@ -185,13 +185,13 @@ static const QHash<Config::ConfigKey, ConfigDirective> configStrings = {
|
||||
{Config::PasswordGenerator_EASCII, {QS("PasswordGenerator/EASCII"), Roaming, false}},
|
||||
{Config::PasswordGenerator_AdvancedMode, {QS("PasswordGenerator/AdvancedMode"), Roaming, false}},
|
||||
{Config::PasswordGenerator_SpecialChars, {QS("PasswordGenerator/SpecialChars"), Roaming, true}},
|
||||
{Config::PasswordGenerator_AdditionalChars, {QS("PasswordGenerator/AdditionalChars"), Roaming, true}},
|
||||
{Config::PasswordGenerator_Braces, {QS("PasswordGenerator/Braces"), Roaming, false}},
|
||||
{Config::PasswordGenerator_Punctuation, {QS("PasswordGenerator/Punctuation"), Roaming, false}},
|
||||
{Config::PasswordGenerator_Quotes, {QS("PasswordGenerator/Quotes"), Roaming, false}},
|
||||
{Config::PasswordGenerator_Dashes, {QS("PasswordGenerator/Dashes"), Roaming, false}},
|
||||
{Config::PasswordGenerator_Math, {QS("PasswordGenerator/Math"), Roaming, false}},
|
||||
{Config::PasswordGenerator_Logograms, {QS("PasswordGenerator/Logograms"), Roaming, false}},
|
||||
{Config::PasswordGenerator_AdditionalChars, {QS("PasswordGenerator/AdditionalChars"), Roaming, {}}},
|
||||
{Config::PasswordGenerator_ExcludedChars, {QS("PasswordGenerator/ExcludedChars"), Roaming, {}}},
|
||||
{Config::PasswordGenerator_ExcludeAlike, {QS("PasswordGenerator/ExcludeAlike"), Roaming, true}},
|
||||
{Config::PasswordGenerator_EnsureEvery, {QS("PasswordGenerator/EnsureEvery"), Roaming, true}},
|
||||
|
@ -251,12 +251,13 @@ bool Database::saveAs(const QString& filePath, QString* error, bool atomic, bool
|
||||
setReadOnly(false);
|
||||
m_fileWatcher->stop();
|
||||
|
||||
auto& canonicalFilePath = QFileInfo::exists(filePath) ? QFileInfo(filePath).canonicalFilePath() : filePath;
|
||||
bool ok = AsyncTask::runAndWaitForFuture([&] { return performSave(canonicalFilePath, error, atomic, backup); });
|
||||
QFileInfo fileInfo(filePath);
|
||||
auto realFilePath = fileInfo.exists() ? fileInfo.canonicalFilePath() : fileInfo.absoluteFilePath();
|
||||
bool ok = AsyncTask::runAndWaitForFuture([&] { return performSave(realFilePath, error, atomic, backup); });
|
||||
if (ok) {
|
||||
markAsClean();
|
||||
setFilePath(filePath);
|
||||
m_fileWatcher->start(canonicalFilePath, 30, 1);
|
||||
m_fileWatcher->start(realFilePath, 30, 1);
|
||||
} else {
|
||||
// Saving failed, don't rewatch file since it does not represent our database
|
||||
markAsModified();
|
||||
|
@ -142,7 +142,7 @@ QSharedPointer<PasswordHealth> HealthChecker::evaluate(const Entry* entry) const
|
||||
for (int i = 0; i < used.size(); ++i) {
|
||||
health->addScoreDetails(used[i]);
|
||||
if (i == 19) {
|
||||
health->addScoreDetails(QStringLiteral("..."));
|
||||
health->addScoreDetails("…");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ bcrypt_hash(const quint8* sha2pass, const quint8* sha2salt, quint8* out)
|
||||
cdata[i] = Blowfish_stream2word(ciphertext, sizeof(ciphertext),
|
||||
&j);
|
||||
for (i = 0; i < 64; i++)
|
||||
blf_enc(&state, cdata, sizeof(cdata) / sizeof(uint64_t));
|
||||
blf_enc(&state, cdata, BCRYPT_WORDS / 2);
|
||||
|
||||
/* copy out */
|
||||
for (i = 0; i < BCRYPT_WORDS; i++) {
|
||||
|
@ -875,11 +875,13 @@ QPair<QString, QString> KdbxXmlReader::parseEntryBinary(Entry* entry)
|
||||
}
|
||||
|
||||
if (keySet && valueSet) {
|
||||
if (entry->attachments()->hasKey(key)) {
|
||||
raiseError(tr("Duplicate attachment found"));
|
||||
} else {
|
||||
entry->attachments()->set(key, value);
|
||||
if (entry->attachments()->hasKey(key) && entry->attachments()->value(key) != value) {
|
||||
// NOTE: This only impacts KDBX 3.x databases
|
||||
// Prepend a random string to the key to make it unique and prevent data loss
|
||||
key = key.prepend(QUuid::createUuid().toString().mid(1, 8) + "_");
|
||||
qWarning("Duplicate attachment name found, renamed to: %s", qPrintable(key));
|
||||
}
|
||||
entry->attachments()->set(key, value);
|
||||
} else {
|
||||
raiseError(tr("Entry binary key or value missing"));
|
||||
}
|
||||
|
@ -333,7 +333,7 @@ MainWindow::MainWindow()
|
||||
m_ui->actionDatabaseSaveBackup->setIcon(resources()->icon("document-save-copy"));
|
||||
m_ui->actionDatabaseClose->setIcon(resources()->icon("document-close"));
|
||||
m_ui->actionReports->setIcon(resources()->icon("reports"));
|
||||
m_ui->actionChangeDatabaseSettings->setIcon(resources()->icon("document-edit"));
|
||||
m_ui->actionDatabaseSettings->setIcon(resources()->icon("document-edit"));
|
||||
m_ui->actionChangeMasterKey->setIcon(resources()->icon("database-change-key"));
|
||||
m_ui->actionLockDatabases->setIcon(resources()->icon("database-lock"));
|
||||
m_ui->actionQuit->setIcon(resources()->icon("application-exit"));
|
||||
@ -413,7 +413,7 @@ MainWindow::MainWindow()
|
||||
connect(m_ui->actionDatabaseMerge, SIGNAL(triggered()), m_ui->tabWidget, SLOT(mergeDatabase()));
|
||||
connect(m_ui->actionChangeMasterKey, SIGNAL(triggered()), m_ui->tabWidget, SLOT(changeMasterKey()));
|
||||
connect(m_ui->actionReports, SIGNAL(triggered()), m_ui->tabWidget, SLOT(changeReports()));
|
||||
connect(m_ui->actionChangeDatabaseSettings, SIGNAL(triggered()), m_ui->tabWidget, SLOT(changeDatabaseSettings()));
|
||||
connect(m_ui->actionDatabaseSettings, SIGNAL(triggered()), m_ui->tabWidget, SLOT(changeDatabaseSettings()));
|
||||
connect(m_ui->actionImportCsv, SIGNAL(triggered()), m_ui->tabWidget, SLOT(importCsv()));
|
||||
connect(m_ui->actionImportKeePass1, SIGNAL(triggered()), m_ui->tabWidget, SLOT(importKeePass1Database()));
|
||||
connect(m_ui->actionImportOpVault, SIGNAL(triggered()), m_ui->tabWidget, SLOT(importOpVaultDatabase()));
|
||||
@ -456,8 +456,11 @@ MainWindow::MainWindow()
|
||||
m_actionMultiplexer.connect(m_ui->actionGroupDownloadFavicons, SIGNAL(triggered()), SLOT(downloadAllFavicons()));
|
||||
|
||||
connect(m_ui->actionSettings, SIGNAL(toggled(bool)), SLOT(switchToSettings(bool)));
|
||||
connect(m_ui->actionPasswordGenerator, SIGNAL(toggled(bool)), SLOT(switchToPasswordGen(bool)));
|
||||
connect(m_ui->passwordGeneratorWidget, SIGNAL(closePasswordGenerator()), SLOT(closePasswordGen()));
|
||||
connect(m_ui->actionPasswordGenerator, SIGNAL(toggled(bool)), SLOT(togglePasswordGenerator(bool)));
|
||||
connect(m_ui->passwordGeneratorWidget, &PasswordGeneratorWidget::closed, this, [this] {
|
||||
togglePasswordGenerator(false);
|
||||
});
|
||||
m_ui->passwordGeneratorWidget->setStandaloneMode(true);
|
||||
|
||||
connect(m_ui->welcomeWidget, SIGNAL(newDatabase()), SLOT(switchToNewDatabase()));
|
||||
connect(m_ui->welcomeWidget, SIGNAL(openDatabase()), SLOT(switchToOpenDatabase()));
|
||||
@ -719,7 +722,7 @@ void MainWindow::setMenuActionState(DatabaseWidget::Mode mode)
|
||||
&& !recycleBinSelected);
|
||||
m_ui->actionChangeMasterKey->setEnabled(true);
|
||||
m_ui->actionReports->setEnabled(true);
|
||||
m_ui->actionChangeDatabaseSettings->setEnabled(true);
|
||||
m_ui->actionDatabaseSettings->setEnabled(true);
|
||||
m_ui->actionDatabaseSave->setEnabled(m_ui->tabWidget->canSave());
|
||||
m_ui->actionDatabaseSaveAs->setEnabled(true);
|
||||
m_ui->actionDatabaseSaveBackup->setEnabled(true);
|
||||
@ -775,7 +778,7 @@ void MainWindow::setMenuActionState(DatabaseWidget::Mode mode)
|
||||
|
||||
m_ui->actionChangeMasterKey->setEnabled(false);
|
||||
m_ui->actionReports->setEnabled(false);
|
||||
m_ui->actionChangeDatabaseSettings->setEnabled(false);
|
||||
m_ui->actionDatabaseSettings->setEnabled(false);
|
||||
m_ui->actionDatabaseSave->setEnabled(false);
|
||||
m_ui->actionDatabaseSaveAs->setEnabled(false);
|
||||
m_ui->actionDatabaseSaveBackup->setEnabled(false);
|
||||
@ -804,7 +807,7 @@ void MainWindow::setMenuActionState(DatabaseWidget::Mode mode)
|
||||
|
||||
m_ui->actionChangeMasterKey->setEnabled(false);
|
||||
m_ui->actionReports->setEnabled(false);
|
||||
m_ui->actionChangeDatabaseSettings->setEnabled(false);
|
||||
m_ui->actionDatabaseSettings->setEnabled(false);
|
||||
m_ui->actionDatabaseSave->setEnabled(false);
|
||||
m_ui->actionDatabaseSaveAs->setEnabled(false);
|
||||
m_ui->actionDatabaseSaveBackup->setEnabled(false);
|
||||
@ -990,24 +993,18 @@ void MainWindow::switchToSettings(bool enabled)
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::switchToPasswordGen(bool enabled)
|
||||
void MainWindow::togglePasswordGenerator(bool enabled)
|
||||
{
|
||||
if (enabled) {
|
||||
m_ui->passwordGeneratorWidget->loadSettings();
|
||||
m_ui->passwordGeneratorWidget->regeneratePassword();
|
||||
m_ui->stackedWidget->setCurrentIndex(PasswordGeneratorScreen);
|
||||
m_ui->passwordGeneratorWidget->setStandaloneMode(true);
|
||||
} else {
|
||||
m_ui->passwordGeneratorWidget->saveSettings();
|
||||
switchToDatabases();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::closePasswordGen()
|
||||
{
|
||||
switchToPasswordGen(false);
|
||||
}
|
||||
|
||||
void MainWindow::switchToNewDatabase()
|
||||
{
|
||||
m_ui->tabWidget->newDatabase();
|
||||
|
@ -104,14 +104,13 @@ private slots:
|
||||
void openKeyboardShortcuts();
|
||||
void switchToDatabases();
|
||||
void switchToSettings(bool enabled);
|
||||
void switchToPasswordGen(bool enabled);
|
||||
void togglePasswordGenerator(bool enabled);
|
||||
void switchToNewDatabase();
|
||||
void switchToOpenDatabase();
|
||||
void switchToDatabaseFile(const QString& file);
|
||||
void switchToKeePass1Database();
|
||||
void switchToOpVaultDatabase();
|
||||
void switchToCsvImport();
|
||||
void closePasswordGen();
|
||||
void databaseStatusChanged(DatabaseWidget* dbWidget);
|
||||
void databaseTabChanged(int tabIndex);
|
||||
void openRecentDatabase(QAction* action);
|
||||
|
@ -13,6 +13,12 @@
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>800</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string notr="true">KeePassXC</string>
|
||||
</property>
|
||||
@ -229,9 +235,9 @@
|
||||
<property name="title">
|
||||
<string>&Import</string>
|
||||
</property>
|
||||
<addaction name="actionImportKeePass1"/>
|
||||
<addaction name="actionImportOpVault"/>
|
||||
<addaction name="actionImportCsv"/>
|
||||
<addaction name="actionImportOpVault"/>
|
||||
<addaction name="actionImportKeePass1"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuExport">
|
||||
<property name="title">
|
||||
@ -248,9 +254,9 @@
|
||||
<addaction name="actionDatabaseSaveBackup"/>
|
||||
<addaction name="actionDatabaseClose"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionChangeMasterKey"/>
|
||||
<addaction name="actionReports"/>
|
||||
<addaction name="actionChangeDatabaseSettings"/>
|
||||
<addaction name="actionDatabaseSettings"/>
|
||||
<addaction name="actionChangeMasterKey"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionDatabaseMerge"/>
|
||||
<addaction name="menuImport"/>
|
||||
@ -381,9 +387,9 @@
|
||||
<addaction name="actionEntryCopyURL"/>
|
||||
<addaction name="actionEntryAutoType"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionPasswordGenerator"/>
|
||||
<addaction name="actionLockDatabases"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionPasswordGenerator"/>
|
||||
<addaction name="actionSettings"/>
|
||||
<addaction name="separator"/>
|
||||
</widget>
|
||||
@ -550,7 +556,7 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Reports...</string>
|
||||
<string>&Database Reports...</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Statistics, health check, etc.</string>
|
||||
@ -559,7 +565,7 @@
|
||||
<enum>QAction::NoRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionChangeDatabaseSettings">
|
||||
<action name="actionDatabaseSettings">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@ -711,7 +717,7 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Export to CSV File…</string>
|
||||
<string>&CSV File…</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionExportHtml">
|
||||
@ -719,7 +725,7 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Export to HTML File…</string>
|
||||
<string>&HTML File…</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionImportKeePass1">
|
||||
|
@ -44,6 +44,14 @@ PasswordGeneratorWidget::PasswordGeneratorWidget(QWidget* parent)
|
||||
m_ui->buttonCopy->setIcon(resources()->icon("clipboard-text"));
|
||||
m_ui->buttonClose->setShortcut(Qt::Key_Escape);
|
||||
|
||||
m_ui->clearInclude->setIcon(resources()->icon("edit-clear-locationbar-rtl"));
|
||||
m_ui->editAdditionalChars->addAction(m_ui->clearInclude, QLineEdit::TrailingPosition);
|
||||
m_ui->clearInclude->setVisible(false);
|
||||
|
||||
m_ui->clearExclude->setIcon(resources()->icon("edit-clear-locationbar-rtl"));
|
||||
m_ui->editExcludedChars->addAction(m_ui->clearExclude, QLineEdit::TrailingPosition);
|
||||
m_ui->clearExclude->setVisible(false);
|
||||
|
||||
connect(m_ui->editNewPassword, SIGNAL(textChanged(QString)), SLOT(updateButtonsEnabled(QString)));
|
||||
connect(m_ui->editNewPassword, SIGNAL(textChanged(QString)), SLOT(updatePasswordStrength(QString)));
|
||||
connect(m_ui->buttonAdvancedMode, SIGNAL(toggled(bool)), SLOT(setAdvancedMode(bool)));
|
||||
@ -53,7 +61,9 @@ PasswordGeneratorWidget::PasswordGeneratorWidget(QWidget* parent)
|
||||
connect(m_ui->buttonApply, SIGNAL(clicked()), SLOT(applyPassword()));
|
||||
connect(m_ui->buttonCopy, SIGNAL(clicked()), SLOT(copyPassword()));
|
||||
connect(m_ui->buttonGenerate, SIGNAL(clicked()), SLOT(regeneratePassword()));
|
||||
connect(m_ui->buttonClose, SIGNAL(clicked()), SIGNAL(closePasswordGenerator()));
|
||||
connect(m_ui->buttonClose, SIGNAL(clicked()), SIGNAL(closed()));
|
||||
connect(m_ui->clearInclude, SIGNAL(triggered(bool)), m_ui->editAdditionalChars, SLOT(clear()));
|
||||
connect(m_ui->clearExclude, SIGNAL(triggered(bool)), m_ui->editExcludedChars, SLOT(clear()));
|
||||
|
||||
connect(m_ui->sliderLength, SIGNAL(valueChanged(int)), SLOT(passwordLengthChanged(int)));
|
||||
connect(m_ui->spinBoxLength, SIGNAL(valueChanged(int)), SLOT(passwordLengthChanged(int)));
|
||||
@ -110,7 +120,7 @@ PasswordGeneratorWidget* PasswordGeneratorWidget::popupGenerator(QWidget* parent
|
||||
pwGenerator->setWindowFlags(Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint);
|
||||
pwGenerator->setStandaloneMode(false);
|
||||
|
||||
connect(pwGenerator, SIGNAL(closePasswordGenerator()), pwGenerator, SLOT(deleteLater()));
|
||||
connect(pwGenerator, SIGNAL(closed()), pwGenerator, SLOT(deleteLater()));
|
||||
|
||||
pwGenerator->show();
|
||||
pwGenerator->raise();
|
||||
@ -180,6 +190,7 @@ void PasswordGeneratorWidget::saveSettings()
|
||||
config()->set(Config::PasswordGenerator_Dashes, m_ui->checkBoxDashes->isChecked());
|
||||
config()->set(Config::PasswordGenerator_Math, m_ui->checkBoxMath->isChecked());
|
||||
config()->set(Config::PasswordGenerator_Logograms, m_ui->checkBoxLogograms->isChecked());
|
||||
config()->set(Config::PasswordGenerator_AdditionalChars, m_ui->editAdditionalChars->text());
|
||||
config()->set(Config::PasswordGenerator_ExcludedChars, m_ui->editExcludedChars->text());
|
||||
config()->set(Config::PasswordGenerator_ExcludeAlike, m_ui->checkBoxExcludeAlike->isChecked());
|
||||
config()->set(Config::PasswordGenerator_EnsureEvery, m_ui->checkBoxEnsureEvery->isChecked());
|
||||
@ -220,15 +231,6 @@ QString PasswordGeneratorWidget::getGeneratedPassword()
|
||||
return m_ui->editNewPassword->text();
|
||||
}
|
||||
|
||||
void PasswordGeneratorWidget::keyPressEvent(QKeyEvent* e)
|
||||
{
|
||||
if (e->key() == Qt::Key_Escape && m_standalone) {
|
||||
emit closePasswordGenerator();
|
||||
} else {
|
||||
e->ignore();
|
||||
}
|
||||
}
|
||||
|
||||
void PasswordGeneratorWidget::regeneratePassword()
|
||||
{
|
||||
if (m_ui->tabWidget->currentIndex() == Password) {
|
||||
@ -273,7 +275,7 @@ void PasswordGeneratorWidget::applyPassword()
|
||||
{
|
||||
saveSettings();
|
||||
emit appliedPassword(m_ui->editNewPassword->text());
|
||||
emit closePasswordGenerator();
|
||||
emit closed();
|
||||
}
|
||||
|
||||
void PasswordGeneratorWidget::copyPassword()
|
||||
@ -534,6 +536,9 @@ void PasswordGeneratorWidget::updateGenerator()
|
||||
} else {
|
||||
m_ui->buttonGenerate->setEnabled(false);
|
||||
}
|
||||
|
||||
m_ui->clearInclude->setVisible(!m_ui->editAdditionalChars->text().isEmpty());
|
||||
m_ui->clearExclude->setVisible(!m_ui->editExcludedChars->text().isEmpty());
|
||||
} else {
|
||||
m_dicewareGenerator->setWordCase(
|
||||
static_cast<PassphraseGenerator::PassphraseWordCase>(m_ui->wordCaseComboBox->currentData().toInt()));
|
||||
|
@ -64,7 +64,7 @@ public slots:
|
||||
|
||||
signals:
|
||||
void appliedPassword(const QString& password);
|
||||
void closePasswordGenerator();
|
||||
void closed();
|
||||
|
||||
private slots:
|
||||
void updateButtonsEnabled(const QString& password);
|
||||
@ -87,9 +87,6 @@ private:
|
||||
const QScopedPointer<PasswordGenerator> m_passwordGenerator;
|
||||
const QScopedPointer<PassphraseGenerator> m_dicewareGenerator;
|
||||
const QScopedPointer<Ui::PasswordGeneratorWidget> m_ui;
|
||||
|
||||
protected:
|
||||
void keyPressEvent(QKeyEvent* e) override;
|
||||
};
|
||||
|
||||
#endif // KEEPASSX_PASSWORDGENERATORWIDGET_H
|
||||
|
@ -870,9 +870,6 @@ QProgressBar::chunk {
|
||||
<property name="accessibleName">
|
||||
<string>Additional characters</string>
|
||||
</property>
|
||||
<property name="clearButtonEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
@ -895,9 +892,6 @@ QProgressBar::chunk {
|
||||
<property name="accessibleName">
|
||||
<string>Excluded characters</string>
|
||||
</property>
|
||||
<property name="clearButtonEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
@ -1152,6 +1146,9 @@ QProgressBar::chunk {
|
||||
<property name="text">
|
||||
<string>Close</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Esc</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@ -1159,6 +1156,9 @@ QProgressBar::chunk {
|
||||
<property name="text">
|
||||
<string>Apply Password</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+S</string>
|
||||
</property>
|
||||
<property name="default">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@ -1183,6 +1183,22 @@ QProgressBar::chunk {
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
<action name="clearInclude">
|
||||
<property name="text">
|
||||
<string>Clear</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Clear</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="clearExclude">
|
||||
<property name="text">
|
||||
<string>Clear</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Clear</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
@ -185,14 +185,16 @@ QVariant EntryModel::data(const QModelIndex& index, int role) const
|
||||
}
|
||||
return result;
|
||||
case Notes:
|
||||
// Display only first line of notes in simplified format if not hidden
|
||||
if (config()->get(Config::Security_HideNotes).toBool()) {
|
||||
result = EntryModel::HiddenContentDisplay;
|
||||
} else {
|
||||
result = entry->notes().section("\n", 0, 0).simplified();
|
||||
}
|
||||
if (attr->isReference(EntryAttributes::NotesKey)) {
|
||||
result.prepend(tr("Ref: ", "Reference abbreviation"));
|
||||
if (!entry->notes().isEmpty()) {
|
||||
if (config()->get(Config::Security_HideNotes).toBool()) {
|
||||
result = EntryModel::HiddenContentDisplay;
|
||||
} else {
|
||||
// Display only first line of notes in simplified format if not hidden
|
||||
result = entry->notes().section("\n", 0, 0).simplified();
|
||||
}
|
||||
if (attr->isReference(EntryAttributes::NotesKey)) {
|
||||
result.prepend(tr("Ref: ", "Reference abbreviation"));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
case Expires:
|
||||
|
@ -126,8 +126,9 @@ ReportsWidgetHealthcheck::ReportsWidgetHealthcheck(QWidget* parent)
|
||||
m_ui->healthcheckTableView->setModel(m_referencesModel.data());
|
||||
m_ui->healthcheckTableView->setSelectionMode(QAbstractItemView::NoSelection);
|
||||
m_ui->healthcheckTableView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
|
||||
connect(m_ui->healthcheckTableView, SIGNAL(customContextMenuRequested(QPoint)), SLOT(customMenuRequested(QPoint)));
|
||||
m_ui->healthcheckTableView->setSortingEnabled(true);
|
||||
|
||||
connect(m_ui->healthcheckTableView, SIGNAL(customContextMenuRequested(QPoint)), SLOT(customMenuRequested(QPoint)));
|
||||
connect(m_ui->healthcheckTableView, SIGNAL(doubleClicked(QModelIndex)), SLOT(emitEntryActivated(QModelIndex)));
|
||||
connect(m_ui->showKnownBadCheckBox, SIGNAL(stateChanged(int)), this, SLOT(calculateHealth()));
|
||||
}
|
||||
|
@ -43,9 +43,6 @@
|
||||
<property name="sortingEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
|
@ -56,6 +56,7 @@ ReportsWidgetHibp::ReportsWidgetHibp(QWidget* parent)
|
||||
m_ui->hibpTableView->setModel(m_referencesModel.data());
|
||||
m_ui->hibpTableView->setSelectionMode(QAbstractItemView::NoSelection);
|
||||
m_ui->hibpTableView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
|
||||
m_ui->hibpTableView->setSortingEnabled(true);
|
||||
|
||||
connect(m_ui->hibpTableView, SIGNAL(doubleClicked(QModelIndex)), SLOT(emitEntryActivated(QModelIndex)));
|
||||
connect(m_ui->hibpTableView, SIGNAL(customContextMenuRequested(QPoint)), SLOT(customMenuRequested(QPoint)));
|
||||
|
@ -157,9 +157,6 @@
|
||||
<property name="sortingEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
|
@ -233,8 +233,8 @@ namespace
|
||||
return {};
|
||||
}
|
||||
default:
|
||||
Q_ASSERT(false);
|
||||
return {reference.path, ShareObserver::Result::Error, ShareImport::tr("Unexpected error")};
|
||||
qWarning("Prevented untrusted import of signed KeeShare database %s", qPrintable(reference.path));
|
||||
return {reference.path, ShareObserver::Result::Warning, ShareImport::tr("Untrusted import prevented")};
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@ -323,7 +323,7 @@ namespace
|
||||
return {};
|
||||
}
|
||||
default:
|
||||
qWarning("Prevent untrusted import");
|
||||
qWarning("Prevented untrusted import of unsigned KeeShare database %s", qPrintable(reference.path));
|
||||
return {reference.path, ShareObserver::Result::Warning, ShareImport::tr("Untrusted import prevented")};
|
||||
}
|
||||
#endif
|
||||
|
@ -387,7 +387,7 @@ bool SSHAgent::checkIdentity(const OpenSSHKey& key, bool& loaded)
|
||||
|
||||
loaded = false;
|
||||
|
||||
for (const auto it : list) {
|
||||
for (const auto& it : list) {
|
||||
if (*it == key) {
|
||||
loaded = true;
|
||||
break;
|
||||
|
@ -189,7 +189,7 @@ void TestGui::testSettingsDefaultTabOrder()
|
||||
QTest::keyClick(settingsWidget, Qt::Key::Key_Escape);
|
||||
|
||||
// check database settings default tab order
|
||||
triggerAction("actionChangeDatabaseSettings");
|
||||
triggerAction("actionDatabaseSettings");
|
||||
auto* dbSettingsWidget = m_mainWindow->findChild<DatabaseSettingsDialog*>();
|
||||
QVERIFY(dbSettingsWidget->isVisible());
|
||||
QCOMPARE(dbSettingsWidget->findChild<CategoryListWidget*>("categoryList")->currentCategory(), 0);
|
||||
@ -1257,7 +1257,7 @@ void TestGui::testSave()
|
||||
void TestGui::testDatabaseSettings()
|
||||
{
|
||||
m_db->metadata()->setName("testDatabaseSettings");
|
||||
triggerAction("actionChangeDatabaseSettings");
|
||||
triggerAction("actionDatabaseSettings");
|
||||
auto* dbSettingsDialog = m_dbWidget->findChild<QWidget*>("databaseSettingsDialog");
|
||||
auto* transformRoundsSpinBox = dbSettingsDialog->findChild<QSpinBox*>("transformRoundsSpinBox");
|
||||
auto advancedToggle = dbSettingsDialog->findChild<QCheckBox*>("advancedSettingsToggle");
|
||||
|
Loading…
Reference in New Issue
Block a user