Skip to content

fix qdatetime for qt5/6#426

Merged
j2doll merged 1 commit intoQtExcel:j2doll/sax_readerfrom
j2doll:j2doll/sax_reader
Dec 24, 2025
Merged

fix qdatetime for qt5/6#426
j2doll merged 1 commit intoQtExcel:j2doll/sax_readerfrom
j2doll:j2doll/sax_reader

Conversation

@j2doll
Copy link
Member

@j2doll j2doll commented Dec 24, 2025

No description provided.

@j2doll j2doll requested a review from Copilot December 24, 2025 06:10
@j2doll j2doll merged commit 8bffb66 into QtExcel:j2doll/sax_reader Dec 24, 2025
4 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 QTimeZone header 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.

Comment on lines +23 to 24
int ret = 0;

Copy link

Copilot AI Dec 24, 2025

Choose a reason for hiding this comment

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

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.

Suggested change
int ret = 0;

Copilot uses AI. Check for mistakes.
extern int readStyle();
extern int pages();

extern int testReadSax(); // new feature
Copy link

Copilot AI Dec 24, 2025

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
worksheetoperations();
pages();

testReadSax(); // testing new feature
Copy link

Copilot AI Dec 24, 2025

Choose a reason for hiding this comment

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

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.

Suggested change
testReadSax(); // testing new feature
testReadSax();

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants