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

Qt: Allow to build without exceptions enabled #35

Merged
merged 1 commit into from
Mar 4, 2022
Merged

Conversation

TheOneRing
Copy link
Contributor

No description provided.

Copy link
Member

@dschmidt dschmidt left a comment

Choose a reason for hiding this comment

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

Hum ... exceptions are catchable, this isn't ... can we return an error instead?

@TheOneRing
Copy link
Contributor Author

Hum ... exceptions are catchable, this isn't ... can we return an error instead?

We could, however the issue occurs in code we don't even use, it the client code I'd like to get rid of.
This is the only throw in the code -> no one expects a throw here, we would crash anyhow.
This changes fixes a build issue if we build the code with the KDE settings(as part of the owncloud client itself), which disable exceptions by default.
(Exceptions can mess with Qt)

src/libsync/libregraphapisrc-src/client/OAIServerConfiguration.h:61:21: error: cannot use 'throw' with exceptions disabled
                    throw std::runtime_error(QString("The variable " + name + " in the server URL has invalid value " + value + ".").toUtf8());

@dschmidt
Copy link
Member

dschmidt commented Mar 4, 2022

yeah ... well ...

@TheOneRing TheOneRing merged commit 3471dbb into main Mar 4, 2022
@delete-merged-branch delete-merged-branch bot deleted the work/no_throw branch March 4, 2022 12:31
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