This commit addresses a bug where the search functionality would not
work when the editor content was empty. The following changes were made:
- Changed the `channelData` type to `std::optional<QString>` to
handle cases where there may not be any data to send.
These changes ensure that the search operation can gracefully handle
empty input, improving the overall robustness of the search feature.
Log: Fix search issue when editor content is empty
Bug: https://pms.uniontech.com/bug-view-298499.html
Refactored notification item delegate to use direct painting instead of widget-based
approach for better performance and visual consistency. Key changes include:
- Removed widget-based item delegate implementation
- Added custom paint methods for background, icon, text and buttons
- Implemented mouse event handling for close button and action buttons
- Added text layout handling with proper wrapping and elision
- Introduced constants for layout metrics and spacing
- Added new roles and data structure for action button info
The new implementation provides smoother scrolling and consistent styling while
reducing memory usage by eliminating widget creation for each item.
Log: Refactor notification item delegate to use paint-based rendering
Bug: https://pms.uniontech.com/bug-view-272445.html
Enhance session management UX by automatically closing the session dialog
when user switches to a different session. This improvement streamlines
the workflow by:
- Adding new sessionSwitched signal in SessionListView
- Connecting dialog close action to session switch event
- Maintaining clean state transitions during session changes
Log: Add auto-close behavior to session dialog after session switch
Bug: https://pms.uniontech.com/bug-view-298077.html
Refactored directory parsing implementation to improve performance and
maintainability. Major changes include:
- Replaced manual directory traversal with QDirIterator for better performance
- Added proper sorting of items (directories first, then case-insensitive)
- Implemented expand state persistence for project tree nodes
- Improved file monitoring and dynamic updates
- Cleaned up role definitions and moved them to Project namespace
- Streamlined signal/slot connections for item updates
Log: Refactored directory parsing and project tree management
Enhance search result handling and display in multiple aspects:
- Add content truncation for large search results to prevent parsing issues
- Optimize search result text display with proper trimming and formatting
- Improve regex pattern for parsing search results with non-greedy matching
- Add content side length limit for better readability
- Refactor result model to handle data updates more efficiently
The changes focus on improving stability and user experience when handling large search results, while maintaining performance.
Log: fix search result display and parsing issues
Refactored project tree icon loading mechanism and parsing process to improve
performance and maintainability:
- Moved icon loading from individual items to ProjectModel data() method
- Added ProjectItemRole enum for icon name and file path roles
- Replaced direct icon setting with role-based data storage
- Implemented stop mechanism for cmake async parsing
- Moved cmake parser to separate thread for better responsiveness
- Unified parsing state role usage across project types
- Removed redundant icon loading code from various parsers
- Added sorting capability to project tree
Log: Optimize project tree icon loading and parsing mechanism
Fixed font selection and display issues in FontColorWidget by:
- Making font combo box non-editable to prevent invalid font selections
- Using currentText() instead of currentFont().family() for more reliable
font name retrieval
- Ensuring consistent font name handling across the widget
The changes improve font selection reliability and prevent potential
issues with font family name mismatches.
Log: Fix font selection and display issues in FontColorWidget
Add encoding detection and conversion functionality to the editor, including:
- Integrate chardet/uchardet/icu libraries for encoding detection
- Add GB18030-2022 encoding support with special character handling
- Implement encoding conversion between different character sets
- Add encoding selection UI in status bar
- Support reload file with different encodings
- Add encoding configuration file with supported encoding list
The changes improve text file handling by:
- Automatically detecting file encodings on open
- Supporting manual encoding selection via UI
- Preserving encoding when saving files
- Handling special cases for Chinese encodings
- Providing better user feedback about current encoding
Log: Add encoding detection and conversion support to editor
Refactored the toolchain detection mechanism by replacing the shell script
with a Python implementation for better maintainability and extensibility.
- Replaced toolchain.sh with main.py as the detection script
- Updated file paths and script execution logic in toolchain.cpp
Log: refactor toolchain detection implementation
- Fix session clone operation by using correct cloneSession instead of rename
- Improve session deletion handling with keyboard support
- Optimize session list widget removal logic
- Add session created signal and connection
- Change project tree clear method name to closeAllProjects for clarity
- Add UI switch to edit mode when loading session
- Only save session when not in default virgin state
Log: fix session management issues and enhance user interaction
Refactored recent display widget to use a unified list view for both projects and documents, improving code organization and reducing duplication. Major changes include:
- Combined project and document views into single RecentListView
- Improved session management with dirty state tracking
- Refactored session item widget to use animation for expand/collapse
- Updated session service interface for better state handling
- Simplified recent display widget UI layout and event handling
Log: Refactor recent module UI components and session management
Implement session management functionality to persist and restore workspace
state across IDE sessions. This includes:
- Add SessionManager class to handle session operations
- Save/restore opened files and current file in editor
- Save/restore breakpoints with conditions in debugger
- Save/restore project list and active project
- Add session events for coordination between components
- Integrate session loading/saving with core components
The session manager provides a centralized way to persist workspace state
and restore it when reopening projects.
Log: add session manager to save and restore workspace state