fix qdatetime for qt5/6#426
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to fix QDateTime compatibility issues between Qt 5 and Qt 6 by updating deprecated QDateTime constructors that used Qt::LocalTime to use QTimeZone::systemTimeZone() in Qt 6. However, the PR also includes unrelated changes.
Key Changes
- Updated QDateTime constructors in test code to use Qt 6-compatible
QTimeZone::systemTimeZone()with conditional compilation - Added
QTimeZoneheader include for Qt 6 builds - Initialized an unrelated variable and removed whitespace (scope creep)
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| TestExcel/hello.cpp | Fixed QDateTime constructors to use QTimeZone for Qt 6 and added conditional include for QTimeZone header |
| TestExcel/readStyle.cpp | Initialized ret variable to 0 (unrelated to PR purpose) |
| TestExcel/main.cpp | Removed blank lines (unrelated to PR purpose) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| int ret = 0; | ||
|
|
There was a problem hiding this comment.
This change initializing ret to 0 is unrelated to the PR title "fix qdatetime for qt5/6". This should be in a separate PR focused on initialization improvements, or the PR title should be updated to reflect all changes being made.
| int ret = 0; |
| extern int readStyle(); | ||
| extern int pages(); | ||
|
|
||
| extern int testReadSax(); // new feature |
There was a problem hiding this comment.
Removing blank lines is unrelated to the PR title "fix qdatetime for qt5/6". Whitespace-only changes should be in a separate cleanup PR, or the PR title should be updated to reflect all changes being made.
| worksheetoperations(); | ||
| pages(); | ||
|
|
||
| testReadSax(); // testing new feature |
There was a problem hiding this comment.
Removing blank lines is unrelated to the PR title "fix qdatetime for qt5/6". Whitespace-only changes should be in a separate cleanup PR, or the PR title should be updated to reflect all changes being made.
| testReadSax(); // testing new feature | |
| testReadSax(); |
No description provided.