Skip to content

feat: support opening source files by clicking them on macOS#849

Merged
coder3101 merged 16 commits intocpeditor:masterfrom
swiftqwq:register-as-file-open-method
Jun 4, 2021
Merged

feat: support opening source files by clicking them on macOS#849
coder3101 merged 16 commits intocpeditor:masterfrom
swiftqwq:register-as-file-open-method

Conversation

@swiftqwq
Copy link
Copy Markdown
Member

@swiftqwq swiftqwq commented Jun 2, 2021

Description

Listen QFileOpenEvent to open files and register as an editor for code files on macOS.

Related Issues / Pull Requests

Closes #846

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate)

Untitled

Checklist

  • If the key of a setting is changed, the old attribute is updated or it is resolved in SettingsUpdater.
  • If there are changes of the text displayed in the UI, they are wrapped in tr() or QCoreApplication::translate().
  • If needed, I have opened a pull request or an issue to update the documentation.
  • If these changes are notable, they are documented in CHANGELOG.md.

Additional text

@coder3101
Copy link
Copy Markdown
Member

From QFileOpenEvent docs

Note: This class is currently supported for macOS only.

I expected some OS macros, how is it being handled in other OS?

@swiftqwq swiftqwq requested a review from sonulohani June 3, 2021 14:07
sonulohani
sonulohani previously approved these changes Jun 4, 2021
Copy link
Copy Markdown
Contributor

@sonulohani sonulohani left a comment

Choose a reason for hiding this comment

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

LGTM. Wait for others also to review the code before merging it into master.

@ouuan ouuan changed the title Associate source files to open in cpeditor on macOS feat: support opening source files by clicking them on macOS Jun 4, 2021
ouuan added 4 commits June 4, 2021 21:11
ouuan
ouuan previously approved these changes Jun 4, 2021
Copy link
Copy Markdown
Member

@ouuan ouuan left a comment

Choose a reason for hiding this comment

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

Now it looks good to me. However, we still need someone to test it on macOS.

@coder3101
Copy link
Copy Markdown
Member

Now it looks good to me. However, we still need someone to test it on macOS.

I will test and let you know.

Copy link
Copy Markdown
Member

@coder3101 coder3101 left a comment

Choose a reason for hiding this comment

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

Looks good and works fine as well.

@coder3101 coder3101 merged commit db967e5 into cpeditor:master Jun 4, 2021
@swiftqwq swiftqwq deleted the register-as-file-open-method branch June 5, 2021 10:07
@swiftqwq
Copy link
Copy Markdown
Member Author

swiftqwq commented Jun 5, 2021

BTW, should we also do this for Windows (by editing the registry files)?

@ouuan
Copy link
Copy Markdown
Member

ouuan commented Jun 5, 2021

BTW, should we also do this for Windows (by editing the registry files)?

Oh, I forgot that this is just a part of #846. We can do it for both Windows and Linux.

@ouuan
Copy link
Copy Markdown
Member

ouuan commented Jun 5, 2021

I think we'd better open a new issue. #846 was two problems mixed into one issue.

@swiftqwq
Copy link
Copy Markdown
Member Author

swiftqwq commented Jun 5, 2021

I think we'd better open a new issue. #846 was two problems mixed into one issue.

I've open #855.

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.

Associate source files to open in cpeditor on macOS

4 participants