-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Autodesk: Make Hydra Scene Browser source files usable in independent builds #2689
Autodesk: Make Hydra Scene Browser source files usable in independent builds #2689
Conversation
Filed as internal issue #USD-8704 |
@@ -56,7 +57,7 @@ class Hdui_ValueItemModel : public QAbstractItemModel | |||
if (index.column() == 0) { | |||
std::ostringstream buffer; | |||
buffer << _value; | |||
return QVariant(buffer.str().data()); | |||
return QVariant(QLatin1String(buffer.str().data())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use a string type that supports UTF-8 identifiers? Tagging @erslavin for thoughts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point; in fact it turns out that using UTF-8 strings is actually what Qt5 is doing under the hood in those cases (see the Qt5 documentation for QVariant, confirmed by a Qt employee). We've changed it to do the same, just explicitly, so that it works for both Qt5 and Qt6, and regardless of whether QT_NO_CAST_FROM_ASCII
is set or not.
Looks like the build failed and seems unrelated to our changes. Any way to re-trigger, or should it be investigated further? |
Hi @jesschimein or is there another person I should tag? Any update on this PR? We've a shipping product that's looking to incorporate this work. Let us know if there's anything on our end we can do to help this along. |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
Hey all, internal feedback is that the API tags should go on (non-inlined) methods rather than classes. Can you update the PR accordingly? Other than that, this looks good. |
@tcauchois Unfortunately these files use the |
We talked this through a bunch and while we don't want to make a general exception (class-based exports have caused tons of issues on other projects), we're adding a specific exception for subclasses of Qt classes, since the consensus matches your PR. For code-search purposes, could you add a new macro HDUI_API_CLASS that's a synonym of HDUI_API (should only be needed for hdui/api.h) and use that instead? Thanks! |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
Description of Change(s)
This PR makes the Hydra Scene Browser source files suitable for compiling into independent builds/libraries. Specifically, the changes are :
Fixes Issue(s)