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

Port away from deprecated Qt6 methods and constuctors #379

Closed

Conversation

BSDKaffee
Copy link
Contributor

Fixes #375 (part 2)

@@ -371,8 +371,8 @@ void ImageWriter::getSelAreaWidthAndHeight(Schematic *sch, int &wsel, int &hsel,
pd->Bounding(x1,y1,x2,y2);
updateMinMax(xmin,xmax,ymin,ymax,x1,x2,y1,y2);

for (auto& pg: qAsConst(pd->Graphs)) {
for (auto& pm: qAsConst(pg->Markers)) {
for (auto& pg: std::as_const(pd->Graphs)) {
Copy link
Owner

Choose a reason for hiding this comment

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

Need to check if as_const supported by GCC9 from Ubuntu-20.04. This distribution have to be supported.

Copy link
Collaborator

Choose a reason for hiding this comment

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

IMHO

  1. we just need to remove the function qAsConst and use C++ 11 (there are many places in qucs where Graphs iterated without qAsConst)
  2. for setNamedColor we can write single utility function with conditional compilation and use it everywhere instead off many
    #if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0)

Copy link
Owner

Choose a reason for hiding this comment

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

Yes, the wrapper macro or function for setNamedColor() will be better solution. We can put it somewhere in misc.h

@zergud zergud closed this Nov 27, 2023
@ra3xdh
Copy link
Owner

ra3xdh commented Nov 28, 2023

@zergud proposed a better solution #387 Closing this. But anyway, thanks for the contribution.

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.

Build fails with Qt 6.6.0
3 participants