-
Notifications
You must be signed in to change notification settings - Fork 168
New FontData Constructor to create a deep copy #2128
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
base: master
Are you sure you want to change the base?
New FontData Constructor to create a deep copy #2128
Conversation
Test Results104 files - 441 104 suites - 441 6s ⏱️ - 27m 37s Results for commit 3a3deb9. ± Comparison against base commit d2cb26d. This pull request removes 4333 tests.
♻️ This comment has been updated with latest results. |
0441bce
to
d32fe1c
Compare
c7a5291
to
46cfcee
Compare
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.
Having a proper copy constructor for FontData sounds reasonable to me.
However, the implementations are no proper copy constructors. They seem to be copies of the String-based constructors which is only able to copy the data present in the string, while a proper copy constructor can simply deep-copy all the data from the existing FontData object.
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/FontData.java
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/FontData.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/FontData.java
Outdated
Show resolved
Hide resolved
14a9e9c
to
6174057
Compare
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.
In general, this now looks fine to me. I only have some minor comments regarding code style.
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java
Outdated
Show resolved
Hide resolved
2d5c93f
to
aee6314
Compare
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.
This looks good now. Before merging we will just need to ensure that the @since
tags are updated to 3.131 (you could already do that now) and that the necessary version bump to 3.131 is applied (if not yet done by then).
[win32] Introducing new FontData Constructor to create a deep copy This change will give us a chance to use proper channel to create a deep copy of FontData object instead of using FontData(fd.toString)
e337898
to
3a3deb9
Compare
This change will give us a chance to use proper channel to create a deep copy of FontData object instead of using FontData(fd.toString)