Switch to the new connect() API
ClosedPublic

Authored by sdepiets on Aug 15 2018, 8:09 AM.

Details

Summary

Switch to the new connect API with removal of the SIGNAL and SLOT calls

This required the following changes

  • Replace the optional parameters slots by explicit ones to manage the overload conflicts
  • Additional disconnects in destructors for LokalizeMainWindow and TranslationUnitTextEdit

Diff Detail

Repository
R456 Lokalize
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sdepiets requested review of this revision.Aug 15 2018, 8:09 AM
sdepiets created this revision.
sdepiets added inline comments.Aug 15 2018, 8:31 AM
src/lokalizemainwindow.cpp
147

Had to add this section to prevent segfault on exit

src/xlifftextedit.cpp
111

Had to add this in the destructor to prevent segfault on exit

sdepiets edited the summary of this revision. (Show Details)Aug 15 2018, 8:34 AM
sdepiets added a project: Localization.
broulik added inline comments.
src/alttransview.cpp
83

When you can use lambdas, you also don't really need QSignalMapper since you can just capture the actual QAction. But this could/should be done in a separate patch.

sdepiets updated this revision to Diff 39765.Aug 15 2018, 8:43 AM

Mapping newly created signal

aacid added inline comments.Aug 15 2018, 9:39 AM
src/lokalizemainwindow.cpp
324

You can also move the singleshots to new signal

QTimer::singleShot(0, this, &LokalizeMainWindow::blabla);

sdepiets updated this revision to Diff 39782.Aug 15 2018, 10:01 AM

Amended singleShot calls

sdepiets updated this revision to Diff 39783.Aug 15 2018, 10:03 AM

Amended singleShot calls 2

sdepiets marked an inline comment as done.Aug 15 2018, 10:04 AM
sdepiets updated this revision to Diff 39819.Aug 16 2018, 1:17 AM

Cleanup of spacing

This revision was not accepted when it landed; it landed in state Needs Review.Aug 16 2018, 2:58 AM
This revision was automatically updated to reflect the committed changes.