fix No such signal QNetworkReply::error in Macro (Repository) Browser#3448
Merged
sunderme merged 1 commit intotexstudio-org:masterfrom Dec 24, 2023
Merged
fix No such signal QNetworkReply::error in Macro (Repository) Browser#3448sunderme merged 1 commit intotexstudio-org:masterfrom
sunderme merged 1 commit intotexstudio-org:masterfrom
Conversation
in Macro Browser
Member
|
Thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Browsebutton 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
OKto close the message,Cancelto close Macro Browser and againCancelto close Macro Editor. Now debug shows following message:QCoreApplication::postEvent: Unexpected null receiverThis message appears only when the repository couldn’t be found. This is fixed in the destructor of the Macro Browser.