keepassxc/tests
Kyle Kneitinger 4d4c839afa Customize buttons on MessageBox and confirm before recycling (#2376)
* Add confirmation prompt before moving groups to the recycling bin

Spawn a yes/no QMessage box when "Delete Group" is selected on a group
that is not already in the recycle bin (note: the prompt for deletion
from the recycle bin was already implemented).  This follows the same
pattern and language as entry deletion.

Fixes #2125

* Make prompts for destructive operations use action words on buttons

Replace yes/no, yes/cancel (and other such buttons on prompts that cause
data to be destroyed) use language that indicates the action that it is
going to take. This makes destructive/unsafe and/or irreversible operations
more clear to the user.

Address feedback on PR #2376

* Refactor MessageBox class to allow for custom buttons

Replaces arguments and return values of type QMessageBox::StandardButton(s)
with MessageBox::Button(s), which reimplements the entire set of
QMessageBox::StandardButton and allows for custom KeePassXC buttons,
such as "Skip". Modifies all calls to MessageBox functions to use
MessageBox::Button(s).

Addresses feedback on #2376

* Remove MessageBox::addButton in favor of map lookup

Replaced the switch statement mechanism in MessageBox::addButton with
a map lookup to address CodeFactor Complex Method issue. This has a
side-effect of a small performance/cleanliness increase, as an
extra QPushButton is no longer created/destroyed (to obtain it's label
text) everytime a MessageBox button based on QMessageBox::StandardButton
is created; now the text is obtained once, at application start up.
2018-12-19 23:14:11 -05:00
..
data CLI: add commands to show and copy TOTP to clipboard (#2454) 2018-11-09 21:58:42 -05:00
gui Customize buttons on MessageBox and confirm before recycling (#2376) 2018-12-19 23:14:11 -05:00
mock Restore correct formatting 2018-11-28 18:29:15 -05:00
util Restore correct formatting 2018-11-28 18:29:15 -05:00
CMakeLists.txt Reformat CMakeLists.txt files 2018-10-19 22:16:44 +02:00
config-keepassx-tests.h.cmake Remove KeePassHttp plugin and qhttp (#1752) 2018-03-31 11:36:18 -04:00
FailDevice.cpp Formatting the code. 2018-03-31 16:01:30 -04:00
FailDevice.h Make C++11 mandatory. 2015-09-12 13:55:50 +02:00
modeltest.cpp 🐛 Fix building with Qt 5.9 (closes #528) 2017-06-01 17:05:07 -04:00
modeltest.h Replace Q_EMIT, Q_SIGNALS and Q_SLOTS macros with MOC keywords 2017-03-10 16:12:02 +01:00
TestAutoType.cpp Customize buttons on MessageBox and confirm before recycling (#2376) 2018-12-19 23:14:11 -05:00
TestAutoType.h Refactor Database and Database widgets (#2491) 2018-11-22 11:47:31 +01:00
TestBase32.cpp Move useful QTest template specializations to global header file 2018-01-24 13:32:37 +01:00
TestBase32.h Add new Base32 implementation 2017-10-21 13:15:02 +02:00
TestCli.cpp Add create command to keepassxc-cli (#2540) 2018-12-19 23:10:46 -05:00
TestCli.h Add create command to keepassxc-cli (#2540) 2018-12-19 23:10:46 -05:00
TestCryptoHash.cpp Restore correct formatting 2018-11-28 18:29:15 -05:00
TestCryptoHash.h Replace Q_EMIT, Q_SIGNALS and Q_SLOTS macros with MOC keywords 2017-03-10 16:12:02 +01:00
TestCsvExporter.cpp Restore correct formatting 2018-11-28 18:29:15 -05:00
TestCsvExporter.h Refactor Database and Database widgets (#2491) 2018-11-22 11:47:31 +01:00
TestCsvParser.cpp Formatting the code. 2018-03-31 16:01:30 -04:00
TestCsvParser.h Formatting the code. 2018-03-31 16:01:30 -04:00
TestDatabase.cpp Refactor Database and Database widgets (#2491) 2018-11-22 11:47:31 +01:00
TestDatabase.h Update and fix copyright headers 2017-06-14 15:54:43 +02:00
TestDeletedObjects.cpp Refactor Database and Database widgets (#2491) 2018-11-22 11:47:31 +01:00
TestDeletedObjects.h Refactor Database and Database widgets (#2491) 2018-11-22 11:47:31 +01:00
TestEntry.cpp Restore correct formatting 2018-11-28 18:29:15 -05:00
TestEntry.h keepassxc-cli show: resolve references in output (#1280) 2017-12-17 10:44:12 -05:00
TestEntryModel.cpp Clean up Entry Model/View code 2018-11-17 08:49:47 -05:00
TestEntryModel.h Replace Q_EMIT, Q_SIGNALS and Q_SLOTS macros with MOC keywords 2017-03-10 16:12:02 +01:00
TestEntrySearcher.cpp Correct logic error in EntrySearcher and add more tests 2018-11-17 09:55:57 -05:00
TestEntrySearcher.h Correct logic error in EntrySearcher and add more tests 2018-11-17 09:55:57 -05:00
TestGlobal.h Restore correct formatting 2018-11-28 18:29:15 -05:00
TestGroup.cpp Fix issues with group functions (#2410) 2018-10-30 08:42:35 -04:00
TestGroup.h Introduce synchronize merge method 2018-09-30 09:36:39 -04:00
TestGroupModel.cpp Formatting the code. 2018-03-31 16:01:30 -04:00
TestGroupModel.h Replace Q_EMIT, Q_SIGNALS and Q_SLOTS macros with MOC keywords 2017-03-10 16:12:02 +01:00
TestHashedBlockStream.cpp Move useful QTest template specializations to global header file 2018-01-24 13:32:37 +01:00
TestHashedBlockStream.h Replace Q_EMIT, Q_SIGNALS and Q_SLOTS macros with MOC keywords 2017-03-10 16:12:02 +01:00
TestKdbx2.cpp Refactor Database and Database widgets (#2491) 2018-11-22 11:47:31 +01:00
TestKdbx2.h Refactor Database and Database widgets (#2491) 2018-11-22 11:47:31 +01:00
TestKdbx3.cpp Refactor Database and Database widgets (#2491) 2018-11-22 11:47:31 +01:00
TestKdbx3.h Refactor Database and Database widgets (#2491) 2018-11-22 11:47:31 +01:00
TestKdbx4.cpp Restore correct formatting 2018-11-28 18:29:15 -05:00
TestKdbx4.h Refactor Database and Database widgets (#2491) 2018-11-22 11:47:31 +01:00
TestKeePass1Reader.cpp Correct checks for containers' emptiness 2018-11-28 18:29:15 -05:00
TestKeePass1Reader.h Refactor Database and Database widgets (#2491) 2018-11-22 11:47:31 +01:00
TestKeePass2Format.cpp Restore correct formatting 2018-11-28 18:29:15 -05:00
TestKeePass2Format.h Refactor Database and Database widgets (#2491) 2018-11-22 11:47:31 +01:00
TestKeePass2RandomStream.cpp Formatting the code. 2018-03-31 16:01:30 -04:00
TestKeePass2RandomStream.h Replace Q_EMIT, Q_SIGNALS and Q_SLOTS macros with MOC keywords 2017-03-10 16:12:02 +01:00
TestKeys.cpp Correct checks for containers' emptiness 2018-11-28 18:29:15 -05:00
TestKeys.h Add MockChallengeResponseKey and additional composite key component test 2018-03-01 19:26:18 -05:00
TestMerge.cpp Restore correct formatting 2018-11-28 18:29:15 -05:00
TestMerge.h Restore correct formatting 2018-11-28 18:29:15 -05:00
TestModified.cpp Restore correct formatting 2018-11-28 18:29:15 -05:00
TestModified.h Introduce synchronize merge method 2018-09-30 09:36:39 -04:00
TestOpenSSHKey.cpp Restore correct formatting 2018-11-28 18:29:15 -05:00
TestOpenSSHKey.h SSH Agent: Expect passphrases to be in UTF-8 2018-07-14 17:07:07 -04:00
TestPasswordGenerator.cpp Restore correct formatting 2018-11-28 18:29:15 -05:00
TestPasswordGenerator.h Restore correct formatting 2018-11-28 18:29:15 -05:00
TestRandom.cpp Formatting the code. 2018-03-31 16:01:30 -04:00
TestRandom.h Replace Q_EMIT, Q_SIGNALS and Q_SLOTS macros with MOC keywords 2017-03-10 16:12:02 +01:00
TestSymmetricCipher.cpp Restore correct formatting 2018-11-28 18:29:15 -05:00
TestSymmetricCipher.h Add CLI tests and improve coding style and i18n 2018-10-19 21:49:54 +02:00
TestTools.cpp Restore correct formatting 2018-11-28 18:29:15 -05:00
TestTools.h Add some unit tests to Tools 2018-05-22 09:28:54 +02:00
TestTotp.cpp Complete refactor of TOTP integration 2018-09-15 12:10:26 -04:00
TestTotp.h Complete refactor of TOTP integration 2018-09-15 12:10:26 -04:00
TestWildcardMatcher.cpp Formatting the code. 2018-03-31 16:01:30 -04:00
TestWildcardMatcher.h Replace Q_EMIT, Q_SIGNALS and Q_SLOTS macros with MOC keywords 2017-03-10 16:12:02 +01:00
TestYkChallengeResponseKey.cpp Formatting the code. 2018-03-31 16:01:30 -04:00
TestYkChallengeResponseKey.h Formatting the code. 2018-03-31 16:01:30 -04:00