Describe the bug :
When trying to copy a selected text. The clipboard is not updated with that string
To Reproduce :
Open PDF, select text, try to copy via cntrl+c, clipboard is not updated
Expected behavior :
A description of what you expected to happen.
The clipboard should update with a clean string version of the same output form copy selected file,
which come as a continuous string and maybe add a check for the end of each copied line for an Uppercase letter after a dot. to signify paragraph splitting. I think that in py that would be something like
copied_text = "Hello world.\nThis is a test\nKeep this.\nJoin this \nand this."
copied_text_split = copied_text.split("\n")
final_output = []
for i, item in enumerate(copied_text_split):
pattern = r"^" + re.escape(item) + r"$\n.+"
has_newline_after = re.search(pattern, copied_text, re.MULTILINE) is not None
if has_newline_after:
if item.endswith("."):
final_output.append(item + "\n")
else:
item_new= item + " " # adds space to avoid "likethis"
if [" "] in item_new: #Checks for double space
item_new=item_new.replace(" ", " ") # Replace double space with space
final_output.append(item_new)
else:
# If it's the very last line (no newline after it in the original),
# just add it as-is.
final_output.append(item)
clipboard_text = "".join(final_output)
send_to_clipboard(clipboard_text)
Screenshots :
If applicable, add screenshots that helps to explain your problem.
Desktop (please complete the following information):
- OS: Ubuntu 26.04
- Version: Running from source beta 4.0.
Additional context :
Add any other context about the problem here.
Added
if sys.platform in ["linux", "bsd"]:
QtWidgets.QApplication.setDesktopFileName("QualCoder")
Right after def gui() on main, it should not influence that behaviour but code soetimes does magic. This code is only supposed to show the icon.
Describe the bug :
When trying to copy a selected text. The clipboard is not updated with that string
To Reproduce :
Open PDF, select text, try to copy via cntrl+c, clipboard is not updated
Expected behavior :
A description of what you expected to happen.
The clipboard should update with a clean string version of the same output form copy selected file,
which come as a continuous string and maybe add a check for the end of each copied line for an Uppercase letter after a dot. to signify paragraph splitting. I think that in py that would be something like
Screenshots :
If applicable, add screenshots that helps to explain your problem.
Desktop (please complete the following information):
Additional context :
Add any other context about the problem here.
Added
Right after def gui() on main, it should not influence that behaviour but code soetimes does magic. This code is only supposed to show the icon.