Feature #1992

IconDes: Line endings support for image designer

Added by Sender Ghost over 4 years ago. Updated over 4 years ago.

Status:ApprovedStart date:10/09/2019
Priority:NormalDue date:
Assignee:Sender Ghost% Done:

0%

Category:IconDesSpent time:-
Target version:-

Description

Similar to the current (at 13633 revision) TheIDE's layout designer, the image designer uses "\r\n" line endings to save *.iml file(s) by default. As a consequence, this may affect creation of patches for *.iml file(s), which may include changes for line endings, among other things. There was a need to convert affected *.iml file(s) to previous line endings state to fix this.

Some examples of LF ("\n") *.iml files:
uppsrc/CodeEditor/CodeEditor.iml
uppsrc/CtrlCore/Ctrl.iml
uppsrc/IconDes/IconDes.iml
uppsrc/ide/ide.iml
uppsrc/ide/LayDes/LayDes.iml

Some examples of CRLF ("\r\n") *.iml files:
uppsrc/CtrlCore/CtrlCore.iml
uppsrc/TabBar/TabBar.iml
uppsrc/XmlView/XmlView.iml
uppsrc/ide/MacroManager/MacroManager.iml
uppsrc/urepo/urepo.iml

I propose to detect known line endings for TheIDE's image designer, which are used to save *.iml file(s).

uppsrc_IconDes.diff Magnifier - Proposed patch for uppsrc/IconDes files (since 13633 revision) (2.93 KB) Sender Ghost, 10/09/2019 04:53 AM

GetLineEndings.cpp Magnifier - Some example for GetLineEndings function (842 Bytes) Sender Ghost, 10/09/2019 07:43 AM

uppsrc_merged.diff Magnifier - Proposed merged patch for layout and image designers (since 13633 revision) (6.75 KB) Sender Ghost, 10/09/2019 07:43 AM

History

#1 Updated by Sender Ghost over 4 years ago

  • File deleted (uppsrc_IconDes.diff)

#2 Updated by Sender Ghost over 4 years ago

#3 Updated by Sender Ghost over 4 years ago

  • File GetLineEndings.cpp added

Overall, I guess, that possible to create some (template) function to get/detect line endings. For example, GetLineEndings. Attached some example.
This way possible to use the same algorithm for layout and image designers.

#4 Updated by Sender Ghost over 4 years ago

  • File uppsrc_merged.diff added

Attached merged patch for layout and image designers with using GetLineEndings function.
Based on changes in this and related #1990 issue.

#5 Updated by Sender Ghost over 4 years ago

  • File deleted (GetLineEndings.cpp)

#6 Updated by Sender Ghost over 4 years ago

Looks like, template is not needed for such GetLineEndings function, because ReverseFind method available for String only.

#7 Updated by Sender Ghost over 4 years ago

  • File deleted (uppsrc_merged.diff)

#8 Updated by Sender Ghost over 4 years ago

#9 Updated by Sender Ghost over 4 years ago

  • Status changed from Patch ready to Approved
  • Assignee changed from Miroslav Fidler to Sender Ghost

Improved changes was committed at 13635 revision.

Also available in: Atom PDF