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

Create a new laf-dlgs-proc executable to run the file dialog in a child process #130

Draft
wants to merge 1 commit into
base: beta
Choose a base branch
from

Conversation

dacap
Copy link
Member

@dacap dacap commented Feb 4, 2025

We want to fix aseprite/aseprite#4412 in some way, this is not yet ready because it looks like a child process cannot use IModalWindow::Show with a parent process HWND handle.

Copy link
Collaborator

@aseprite-bot aseprite-bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions


class Delegate : public dlgs::FileDialogDelegate {
public:
void onFolderChange(const std::string& path) override
Copy link
Collaborator

Choose a reason for hiding this comment

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

warning: method 'onFolderChange' can be made static [readability-convert-member-functions-to-static]

Suggested change
void onFolderChange(const std::string& path) override
static void onFolderChange(const std::string& path) override

}

// Initialize COM library.
base::CoInit com;
Copy link
Collaborator

Choose a reason for hiding this comment

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

warning: variable 'com' of type 'base::CoInit' can be declared 'const' [misc-const-correctness]

Suggested change
base::CoInit com;
base::CoInit const com;

WerSetFlags(WER_FAULT_REPORTING_NO_UI);

Delegate delegate;
dlgs::FileDialog::Spec spec;
Copy link
Collaborator

Choose a reason for hiding this comment

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

warning: variable 'spec' of type 'dlgs::FileDialog::Spec' can be declared 'const' [misc-const-correctness]

Suggested change
dlgs::FileDialog::Spec spec;
dlgs::FileDialog::Spec const spec;

if (result == dlgs::FileDialog::Result::Error)
return 1;
else if (result == dlgs::FileDialog::Result::Cancel)
return 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

warning: do not use 'else' after 'return' [readability-else-after-return]

Suggested change
return 0;
if (result == dlgs::FileDialog::Result::Cancel)
return 0;

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