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 to new style signal slot syntax #77

Merged
merged 3 commits into from
Jul 10, 2024

Conversation

alexfikl
Copy link
Contributor

@alexfikl alexfikl commented Jul 7, 2024

As described in https://wiki.qt.io/New_Signal_Slot_Syntax.

There are still a few places that use the old syntax that I was planning to leave for a future PR. They are:

  1. common/utils/standardaction.cpp: This forwards some slots as a const char * and requires some more refactoring to make it work with the new style.
  2. common/utils/zoomaction.cpp: There's a disconnect in there that isn't ported because I couldn't make it work when compiled with KF5. The signal is deprecated and it doesn't like something.. Oops, this was just a misunderstanding on my side.. apparently disconnect doesn't work for lambas!
  3. app/mainwindow.cpp: The new syntax is confused by TikzEditorViewAbstract not having a contentsChanged signal. This also seems like it requires some refactoring.

Otherwise, the porting is pretty straightforward. Some places are a bit less pretty because the new syntax requires explicit casting for overloaded functions, but it's not too bad.

@alexfikl alexfikl marked this pull request as ready for review July 7, 2024 12:21
@jfmcarreira
Copy link
Collaborator

Thanks for the contribution. Modern code is better code :) I hope.

@jfmcarreira jfmcarreira merged commit fe1e34c into fhackenberger:master Jul 10, 2024
4 checks passed
@alexfikl alexfikl deleted the new-style-connect branch July 11, 2024 04:36
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