-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cumulative updates to secret service integration #4009
Cumulative updates to secret service integration #4009
Conversation
d269f94
to
cca0e1d
Compare
53ab99b
to
bb583d8
Compare
|
Added two more small bug fixes. |
- Use proper model for database and session in settings page - Fix button text (unlock/lock) not changed according to the database locking status - Fix button icons not present on icon themes other than Breeze - Fix the disconnect button may got clipped when new session opens
Rebased on latest |
databaseAdded(dbWidget, false); | ||
} | ||
// connect signals | ||
connect(m_dbTabs, &DatabaseTabWidget::databaseOpened, this, [this](DatabaseWidget* db) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not like this because it is the exact opposite of how signal/slots should be used. The Settings Model should be created, then the signals connected from the parent. The settings model should have no knowledge of the db tab widget.
I keep it as-is for now, but this would be a good upgrade for 2.6.0 to break some hard dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll keep that in mind. In general, I'm also thinking about removing dependencies on db tab widget.
(Or even better, don't depend on any GUI classes at all. But that's quite difficult for now, given the db widget is the only one keeping the filename and lock state).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The filename is located in the Database class. You can determine if its locked by checking to see if it has a key associated with it. We should make a convenience function that returns that state...
Thanks for reviewing! |
Ah yes. But a locked db is basically a new object. The db widget is still
the one emiting db replaced signal that I need to catch to reconnect
signals on the db.
And btw since we are on the topic, the db tab widget is the only source of
truth about currently opened dbs, is that correct?
…On Fri, Dec 27, 2019, 21:04 Jonathan White ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/fdosecrets/widgets/SettingsModels.cpp
<#4009 (comment)>
:
> + }
+
+ void SettingsDatabaseModel::populateModel()
+ {
+ beginResetModel();
+
+ m_dbs.clear();
+
+ if (m_dbTabs) {
+ // Add existing database tabs
+ for (int idx = 0; idx != m_dbTabs->count(); ++idx) {
+ auto dbWidget = m_dbTabs->databaseWidgetFromIndex(idx);
+ databaseAdded(dbWidget, false);
+ }
+ // connect signals
+ connect(m_dbTabs, &DatabaseTabWidget::databaseOpened, this, [this](DatabaseWidget* db) {
The filename is located in the Database class. You can determine if its
locked by checking to see if it has a key associated with it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4009?email_source=notifications&email_token=AALTBD4SKY3PNB4XCU7KZE3Q22X25A5CNFSM4JZWGXRKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCQKKGHY#discussion_r361770455>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALTBDY3FBETU67XJHMUVCLQ22X25ANCNFSM4JZWGXRA>
.
|
Yes that is correct |
Added - Browser: Show UI warning when entering invalid URLs [#3912] - Browser: Option to use an entry only for HTTP auth [#3927] Changed - Disable the user interface when merging or saving the database [#3991] - Ability to hide protected attribute after reveal [#3877] - Remove mention of "snaps" in Windows and macOS [#3879] - CLI: Merge parameter for source database key file (--key-file-from) [#3961] - Improve GUI tests reliability on Hi-DPI displays [#4075] - Disable deprecation warnings to allow building with Qt 5.14+ [#4075] - OPVault: Use 'otp' attribute for TOTP field imports [#4075] Fixed - Fix crashes when saving a database to cloud storage [#3991] - Fix crash when pressing enter twice while opening database [#3885] - Fix handling of HTML when displayed in the entry preview panel [#3910] - Fix start minimized to tray on Linux [#3899] - Fix Auto Open with key file only databases [#4075] - Fix escape key closing the standalone password generator [#3892] - macOS: Fix monospace font usage in password field and notes [#4075] - macOS: Fix building on macOS 10.9 to 10.11 [#3946] - Fix TOTP setup dialog not closing on database lock [#4075] - Browser: Fix condition where additional URLs are ignored [#4033] - Browser: Fix subdomain matching to return only relevant site entries [#3854] - Secret Service: Fix multiple crashes and incompatibilities [#3871, #4009, #4074] - Secret Service: Fix searching of entries [#4008, #4036] - Secret Service: Fix behavior when exposed group is recycled [#3914] - CLI: Release the database instance before exiting interactive mode [#3889] - Fix (most) memory leaks in tests [#3922]
Type of change
Description and Context
This PR contains multiple fixes and refactor. I just think they're not worth separate PRs. But @droidmonkey, if you prefer, I can also do that.
Update:
(Checking PID for existing services is saved for targeting 2.6.0 due to translation freeze).
Testing strategy
Test manually.
Checklist:
-DWITH_ASAN=ON
. [REQUIRED]