fix No such signal QNetworkReply::error in Macro (Repository) Browser #3448
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes following in txs 4.7.2 current dev:
Disconnect from network
Open Macro Editor
Press
Browse
button to connect to repository. No data can be retrieved and expected message isn't shown:Debug shows following message indicating why expected error message is missing:
Looking at Qt’s online documentation for versions 5 and 6 we find the signal’s right name:
void errorOccurred(QNetworkReply::NetworkError code)
The connect is coded in macrobrowserui.cpp. A code search finds following in updatechecker.cpp:
From Qt’s information I would conclude that the else path would suffice, but I keep it as is, since I can’t test Qt<6. So let’s see what update checker (from Config) shows:
Start changing macrobrowserui.cpp in a similar way:
The slots are used without arguments because it is declared in that way in
macrobrowserui.h
. On running this fix the expected message appears:Be aware of the missing space after the colon. After adding a line break the text looks the same as for the update checker (s. above, no change of translations):
Press
OK
to close the message,Cancel
to close Macro Browser and againCancel
to close Macro Editor. Now debug shows following message:QCoreApplication::postEvent: Unexpected null receiver
This message appears only when the repository couldn’t be found. This is fixed in the destructor of the Macro Browser.