Skip to content

Commit

Permalink
Address PR Review Comments
Browse files Browse the repository at this point in the history
* Also perform `make format`
  • Loading branch information
droidmonkey committed Aug 21, 2019
1 parent 3b8a1f6 commit 229527e
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/browser/BrowserService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include <QCheckBox>
#include <QInputDialog>
#include <QJsonArray>
#include <QMessageBox>
#include <QProgressDialog>
#include <QUuid>
#include <QCheckBox>

#include "BrowserAccessControlDialog.h"
#include "BrowserEntryConfig.h"
Expand Down
4 changes: 2 additions & 2 deletions src/core/Translator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void Translator::installTranslators()
/**
* Install KeePassXC translator.
*
* @param languages priority ordered list of languages
* @param languages priority-ordered list of languages
* @param path absolute search path
* @return true on success
*/
Expand All @@ -94,7 +94,7 @@ bool Translator::installTranslator(const QStringList& languages, const QString&
* Install Qt5 base translator from the specified local search path or the default system path
* if no qtbase_* translations were found at the local path.
*
* @param languages priority ordered list of languages
* @param languages priority-ordered list of languages
* @param path absolute search path
* @return true on success
*/
Expand Down
7 changes: 6 additions & 1 deletion src/gui/ApplicationSettingsWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ class ApplicationSettingsWidget::ExtraPage
QWidget* widget;
};

/**
* Helper class to ignore mouse wheel events on non-focused widgets
* NOTE: The widget must NOT have a focus policy of "WHEEL"
*/
class MouseWheelEventFilter : public QObject
{
public:
Expand Down Expand Up @@ -114,6 +118,7 @@ ApplicationSettingsWidget::ApplicationSettingsWidget(QWidget* parent)
// clang-format on

// Disable mouse wheel grab when scrolling
// This prevents combo box and spinner values from changing without explicit focus
auto mouseWheelFilter = new MouseWheelEventFilter(this);
m_generalUi->faviconTimeoutSpinBox->installEventFilter(mouseWheelFilter);
m_generalUi->toolButtonStyleComboBox->installEventFilter(mouseWheelFilter);
Expand Down Expand Up @@ -367,7 +372,7 @@ void ApplicationSettingsWidget::resetSettings()
tr("Reset Settings?"),
tr("Are you sure you want to reset all general and security settings to default?"),
MessageBox::Reset | MessageBox::Cancel,
MessageBox::Reset);
MessageBox::Cancel);
if (ans == MessageBox::Cancel) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/ApplicationSettingsWidgetGeneral.ui
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@
<enum>Qt::StrongFocus</enum>
</property>
<property name="accessibleName">
<string>Favorite icon download timeout seconds</string>
<string>Website icon download timeout in seconds</string>
</property>
<property name="suffix">
<string comment="Seconds"> sec</string>
Expand Down
2 changes: 1 addition & 1 deletion src/gui/MessageBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

#include "MessageBox.h"

#include <QWindow>
#include <QCheckBox>
#include <QWindow>

QWindow* MessageBox::m_overrideParent(nullptr);

Expand Down
20 changes: 10 additions & 10 deletions src/gui/PasswordGeneratorWidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,10 @@ QProgressBar::chunk {
<enum>Qt::StrongFocus</enum>
</property>
<property name="toolTip">
<string>Upper Case Letters</string>
<string>Upper-case letters</string>
</property>
<property name="accessibleName">
<string>Upper Case Letters</string>
<string>Upper-case letters</string>
</property>
<property name="accessibleDescription">
<string/>
Expand Down Expand Up @@ -293,10 +293,10 @@ QProgressBar::chunk {
<enum>Qt::StrongFocus</enum>
</property>
<property name="toolTip">
<string>Lower Case Letters</string>
<string>Lower-case letters</string>
</property>
<property name="accessibleName">
<string>Lower Case Letters</string>
<string>Lower-case letters</string>
</property>
<property name="accessibleDescription">
<string/>
Expand Down Expand Up @@ -358,10 +358,10 @@ QProgressBar::chunk {
<enum>Qt::StrongFocus</enum>
</property>
<property name="toolTip">
<string>Special Characters</string>
<string>Special characters</string>
</property>
<property name="accessibleName">
<string>Special Characters</string>
<string>Special characters</string>
</property>
<property name="text">
<string notr="true">/*_&amp; ...</string>
Expand Down Expand Up @@ -480,10 +480,10 @@ QProgressBar::chunk {
<enum>Qt::StrongFocus</enum>
</property>
<property name="toolTip">
<string>Upper Case Letters</string>
<string>Upper-case letters</string>
</property>
<property name="accessibleName">
<string>Upper Case Letters</string>
<string>Upper-case letters</string>
</property>
<property name="text">
<string>A-Z</string>
Expand All @@ -508,10 +508,10 @@ QProgressBar::chunk {
<enum>Qt::StrongFocus</enum>
</property>
<property name="toolTip">
<string>Lower Case Letters</string>
<string>Lower-case letters</string>
</property>
<property name="accessibleName">
<string>Lower Case Letters</string>
<string>Lower-case letters</string>
</property>
<property name="text">
<string>a-z</string>
Expand Down
10 changes: 5 additions & 5 deletions src/gui/entry/EditEntryWidgetAutoType.ui
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<bool>false</bool>
</property>
<property name="accessibleName">
<string>Custom auto-type sequence</string>
<string>Custom Auto-Type sequence</string>
</property>
</widget>
</item>
Expand All @@ -97,7 +97,7 @@
<string>Open Auto-Type help webpage</string>
</property>
<property name="accessibleName">
<string>Open auto-type help webpage</string>
<string>Open Auto-Type help webpage</string>
</property>
<property name="text">
<string/>
Expand Down Expand Up @@ -220,13 +220,13 @@
<item>
<widget class="WindowSelectComboBox" name="windowTitleCombo">
<property name="toolTip">
<string>You can use wildcard characters to expand the search space</string>
<string>You can use an asterisk (*) to match everything</string>
</property>
<property name="accessibleName">
<string>Set the window association title</string>
</property>
<property name="accessibleDescription">
<string>You can use wildcard characters to expand the search space</string>
<string>You can use an asterisk to match everything</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -277,7 +277,7 @@
<bool>false</bool>
</property>
<property name="accessibleName">
<string>Custom auto-type sequence for this window</string>
<string>Custom Auto-Type sequence for this window</string>
</property>
</widget>
</item>
Expand Down
2 changes: 1 addition & 1 deletion src/gui/entry/EditEntryWidgetSSHAgent.ui
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<item>
<widget class="QSpinBox" name="lifetimeSpinBox">
<property name="accessibleName">
<string>Remove key from agent seconds</string>
<string>Remove key from agent after specified seconds</string>
</property>
<property name="suffix">
<string> seconds</string>
Expand Down
10 changes: 5 additions & 5 deletions src/gui/entry/EntryView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,22 +152,22 @@ void EntryView::keyPressEvent(QKeyEvent* event)

int last = m_model->rowCount() - 1;
if (last > 0) {
QAccessibleEvent acEvent(this, QAccessible::PageChanged);
QAccessibleEvent accessibleEvent(this, QAccessible::PageChanged);
if (event->key() == Qt::Key_Up && currentIndex().row() == 0) {
QModelIndex index = m_sortModel->mapToSource(m_sortModel->index(last, 0));
setCurrentEntry(m_model->entryFromIndex(index));
QAccessible::updateAccessibility(&acEvent);
QAccessible::updateAccessibility(&accessibleEvent);
return;
}

if (event->key() == Qt::Key_Down && currentIndex().row() == last) {
QModelIndex index = m_sortModel->mapToSource(m_sortModel->index(0, 0));
setCurrentEntry(m_model->entryFromIndex(index));
QAccessible::updateAccessibility(&acEvent);
QAccessible::updateAccessibility(&accessibleEvent);
return;
}
}

QTreeView::keyPressEvent(event);
}

Expand Down
2 changes: 1 addition & 1 deletion src/keeshare/SettingsWidgetKeeShare.ui
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@
<item>
<widget class="QPushButton" name="askImportedCertificateButton">
<property name="accessibleName">
<string>Ask trust for selected certificate</string>
<string>Ask whether to trust the selected certificate every time</string>
</property>
<property name="text">
<string>Ask</string>
Expand Down

0 comments on commit 229527e

Please sign in to comment.