Skip to content
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

Support tearing off tags menu #11652

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Conversation

droidmonkey
Copy link
Member

  • Closes Tags multiselect right click context menu #11649 - tags menu can be torn off to set and unset tags without having to dive into the context menu every time.

  • Tags menu will hide when database is locked or view is switched away from the main database view (eg, settings)

Screenshots

See #11649

Testing strategy

Tested on windows manually

Type of change

  • ✅ New feature (change that adds functionality)

@droidmonkey droidmonkey added feature: Tags pr: new feature Pull request that adds a new feature labels Jan 12, 2025
@droidmonkey droidmonkey added this to the v2.7.10 milestone Jan 12, 2025
Copy link

codecov bot commented Jan 12, 2025

Codecov Report

Attention: Patch coverage is 12.50000% with 7 lines in your changes missing coverage. Please review.

Project coverage is 63.68%. Comparing base (6494cdb) to head (b946aca).
Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
src/gui/MainWindow.cpp 12.50% 7 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #11652      +/-   ##
===========================================
- Coverage    63.69%   63.68%   -0.00%     
===========================================
  Files          366      366              
  Lines        38513    38527      +14     
===========================================
+ Hits         24528    24535       +7     
- Misses       13985    13992       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xboxones1
Copy link
Contributor

@droidmonkey, In Linux, clicking on a tag from the context menu results in a segmentation fault.

@varjolintu
Copy link
Member

varjolintu commented Jan 13, 2025

I'm also having Exception: EXC_BAD_ACCESS (code=1, address=0x9) with macOS:

if (!databaseUnlocked) {
m_ui->menuTags->hideTearOffMenu();
} else {
updateSetTagsMenu();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you remove this line, everything works just fine. I think this function is already called via signal/slot in line 257?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is necessary to update the tags list when you change your entry selection choices. Saw no crashes on Windows so that's weird.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found the problem, please re-test on your end

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it, it works without errors

Copy link
Member

@varjolintu varjolintu Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still crashes for me. Sometimes the tearoff menu works, sometimes enabling it will crash directly, sometimes setting a tag crashes:

KeePassXC[94447:7219921] IOSurface creation failed: e00002bd parentID: 00000000 properties: {
    IOSurfaceAllocSize = 0;
    IOSurfaceBytesPerElement = 4;
    IOSurfaceBytesPerRow = 0;
    IOSurfaceHeight = 0;
    IOSurfaceName = "libqcocoa.dylib";
    IOSurfacePixelFormat = 1111970369;
    IOSurfaceWidth = 0;
}
KeePassXC[94447:7219921] IOSurface creation failed: e00002bd parentID: 00000000 property: IOSurfaceWidth
KeePassXC[94447:7219921] IOSurface creation failed: e00002bd parentID: 00000000 property: IOSurfaceBytesPerElementKeePassXC[94447:7219921] IOSurface creation failed: e00002bd parentID: 00000000 property: IOSurfacePixelFormat
KeePassXC[94447:7219921] IOSurface creation failed: e00002bd parentID: 00000000 property: IOSurfaceBytesPerRow
KeePassXC[94447:7219921] IOSurface creation failed: e00002bd parentID: 00000000 property: IOSurfaceHeight
KeePassXC[94447:7219921] IOSurface creation failed: e00002bd parentID: 00000000 property: IOSurfaceAllocSize
KeePassXC[94447:7219921] IOSurface creation failed: e00002bd parentID: 00000000 property: IOSurfaceName
KeePassXC[94447:7219921] [qt.qpa.backingstore.iosurface] Failed to lock QIOSurfaceGraphicsBuffer(0x6000011e9c80, surface=0x0, size=QSize(0, 0), isLocked=false, isInUse=false) -536870206
Exception: EXC_BREAKPOINT (code=1, subcode=0x19c67cdcc)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be a major bug in qt5 macos when it comes to tear off menus.

* Closes #11649 - tags menu can be torn off to set and unset tags without having to dive into the context menu every time.

* Tags menu will hide when database is locked or view is switched away from the main database view (eg, settings)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: Tags pr: new feature Pull request that adds a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tags multiselect right click context menu
3 participants