Results 1 to 20 of 216

Thread: QCodeEdit

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCodeEdit

    Quote Originally Posted by Usability View Post
    Is there any way of making the editor save its contents under a new name?

    pEditor->setFileName(qsNewFileName);
    pEditor->save();

    Looked tempting, but setFileName is protected. This would seem like basic functionality I would expect to be able to do without subclassing.
    The "protected" visibility of this method stems from early genesis of QCodeEdit when it was not yet fully separated from Edyuk and thus dependent on qmdilib... Fixed.
    Current Qt projects : QCodeEdit, RotiDeCode

  2. The following user says thank you to fullmetalcoder for this useful post:

    Usability (6th November 2007)

  3. #2
    Join Date
    May 2007
    Location
    England
    Posts
    56
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCodeEdit

    Sorted, thanks!

  4. #3
    Join Date
    Sep 2006
    Posts
    339
    Thanks
    15
    Thanked 21 Times in 16 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCodeEdit

    Very confusing
    I go to edyuk.svn.sourceforge.net/svnroot/edyuk/trunk/3rdparty/qcodeedit2 and then how do I download the code. I get a link
    1. "Revision 365: /trunk/3rdparty"
    2. Click on "codeedit2"
    3. another tab appears.

    Is there a way I can download the new version of codeedit?

  5. #4
    Join Date
    May 2007
    Location
    England
    Posts
    56
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCodeEdit

    Quote Originally Posted by vermarajeev View Post
    Very confusing
    Is there a way I can download the new version of codeedit?
    Is there a reason you cannot just run the svn command I posed further up this page? That will create a qcodeedit2 directory containing all the source.
    You do not need a login account or anything, which is something that surprised me the first time I did it.

    This is all you need to download the editor, build the editor and its example program, and run the demo

    Qt Code:
    1. svn checkout http://edyuk.svn.sourceforge.net/svnroot/edyuk/trunk/3rdparty/qcodeedit2
    2. cd qcodeedit2
    3. qmake
    4. make
    5. example/example lib/qcodeedit.cpp
    To copy to clipboard, switch view to plain text mode 

    I think the speed with which this editor is being developed means you have to get into svn.

    The demo is no use as an editor, no save menu for example, its just there to show you how to call the editor from your own code. And its handy for logging bugs

  6. #5
    Join Date
    Sep 2006
    Posts
    339
    Thanks
    15
    Thanked 21 Times in 16 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCodeEdit

    See the attached file.
    I copy the path "http://edyuk.svn.sourceforge.net/svnroot/edyuk/trunk/3rdparty/qcodeedit2" in Mozilla and I get the page as shown in the image attached.
    Attached Images Attached Images

  7. #6
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QCodeEdit

    Go grab yourself a subversion client: http://subversion.tigris.org/ (svn-1.4.5-setup.exe is a good choice for Windows).
    J-P Nurmi

  8. #7
    Join Date
    May 2007
    Location
    England
    Posts
    56
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCodeEdit

    I get the page as shown in the image attached.
    Thats the place. You want all of those files, directories, contents of the directories etc. Download them from the browser if you must.

    Or there is always the single svn command.

  9. #8
    Join Date
    May 2007
    Location
    England
    Posts
    56
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Question Re: QCodeEdit

    I think we had a regression in the find feature in the last build. I notice now that if I do

    example/example lib/qcodeedit.cpp

    then ctrl-f to get the find dialog, then search for "this", it finds the first hit but refuses to find any of the others. Both the next icon, and the return key fail to repeat the find.

  10. #9
    Join Date
    Jun 2007
    Posts
    11
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Re: QCodeEdit

    The QCodeEdit is amazing.
    I would like to use it in my project. I am able to compile it only dynamicly/shared, but I when compiling statically on windows using mingw i get error, because it links -lqtmaind -lqtcored -lqtguid , but in the static-Qt, there are only theese libraries without the "d" at the end of the library names.

    Thanks for help.

  11. #10
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCodeEdit

    Quote Originally Posted by allstar View Post
    The QCodeEdit is amazing.
    I would like to use it in my project. I am able to compile it only dynamicly/shared, but I when compiling statically on windows using mingw i get error, because it links -lqtmaind -lqtcored -lqtguid , but in the static-Qt, there are only theese libraries without the "d" at the end of the library names.

    Thanks for help.
    Trying running "make release" (or "mingw32-make release") instead of just "make"... If it does not work open the project files and make sure the build mode is set to "release" (CONFIG += release)...

    Quote Originally Posted by Usability
    I think we had a regression in the find feature in the last build. I notice now that if I do

    example/example lib/qcodeedit.cpp

    then ctrl-f to get the find dialog, then search for "this", it finds the first hit but refuses to find any of the others. Both the next icon, and the return key fail to repeat the find.
    Right. It comes from the new behavior of QDocumentCursor::clearSelection() which used to leave the column number unchanged while it now sets it back to anchor column (introduced to make column selection consistent...). The fix is fortunately a one-liner and should be committed by the time you read this
    Current Qt projects : QCodeEdit, RotiDeCode

  12. #11
    Join Date
    Jun 2007
    Posts
    11
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCodeEdit

    Quote Originally Posted by fullmetalcoder View Post
    Trying running "make release" (or "mingw32-make release") instead of just "make"... If it does not work open the project files and make sure the build mode is set to "release" (CONFIG += release)...
    Yes, the primary problem was solved, but then I got undefined references to DOM, so I added QT += xml that helped with the xml, but then I got another error:

    Qt Code:
    1. C:\qcodeedit2\example>make release
    2. make -f Makefile.Release
    3. make[1]: Entering directory `C:/qcodeedit2/example'
    4. g++ -static -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-ps
    5. eudo-reloc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o "release\example.exe"
    6. .build\main.o -L"d:\build\qt-win-opensource-src-4.3.2\lib" -lmingw32 -lqtmain -
    7. L.. -lqcodeedit -lQtXml -lQtGui -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -l
    8. winspool -lmsimg32 -lQtCore -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvap
    9. i32 -lws2_32
    10. d:\build\qt-win-opensource-src-4.3.2\lib\libQtGui.a(qcompleter.o):qcompleter.cpp
    11. :(.text$_ZN17QCompletionEngineD0Ev[QCompletionEngine::~QCompletionEngine()]+0x0)
    12. : multiple definition of `QCompletionEngine::~QCompletionEngine()'
    13. ..\libqcodeedit.a(qcompletionengine.o):c:/qcodeedit2/lib/language/qcompletioneng
    14. ine.cpp:50: first defined here
    15. d:\build\qt-win-opensource-src-4.3.2\lib\libQtGui.a(qcompleter.o):qcompleter.cpp
    16. :(.text$_ZN17QCompletionEngineD1Ev[QCompletionEngine::~QCompletionEngine()]+0x0)
    17. : multiple definition of `QCompletionEngine::~QCompletionEngine()'
    18. ..\libqcodeedit.a(qcompletionengine.o):c:/qcodeedit2/lib/language/qcompletioneng
    19. ine.cpp:50: first defined here
    20. .build\main.o:main.cpp:(.text+0x51b): undefined reference to `_imp___ZN14QFormat
    21. FactoryC1ERK7QStringP7QObject'
    22. .build\main.o:main.cpp:(.text+0x564): undefined reference to `_imp___ZN9QDocumen
    23. t16setFormatFactoryEP14QFormatFactory'
    24. .build\main.o:main.cpp:(.text+0x58e): undefined reference to `_imp___ZN20QLineMa
    25. rksInfoCenter8instanceEv'
    26. .build\main.o:main.cpp:(.text+0x5a6): undefined reference to `_imp___ZN20QLineMa
    27. rksInfoCenter13loadMarkTypesERK7QString'
    28. .build\main.o:main.cpp:(.text+0x5ef): undefined reference to `_imp___ZN16QLangua
    29. geFactoryC1EP14QFormatFactoryP7QObject'
    30. .build\main.o:main.cpp:(.text+0x638): undefined reference to `_imp___ZN16QLangua
    31. geFactory17addDefinitionPathERK7QString'
    32. .build\main.o:main.cpp:(.text+0x698): undefined reference to `_imp___ZN9QCodeEdi
    33. tC1EP7QWidget'
    34. .build\main.o:main.cpp:(.text+0x6c4): undefined reference to `_imp___ZN14QLineMa
    35. rkPanelC1EP7QWidget'
    36. .build\main.o:main.cpp:(.text+0x6f9): undefined reference to `_imp___ZN9QCodeEdi
    37. t8addPanelEP6QPanelNS_8PositionE'
    38. .build\main.o:main.cpp:(.text+0x71c): undefined reference to `_imp___ZN16QLineNu
    39. mberPanelC1EP7QWidget'
    40. .build\main.o:main.cpp:(.text+0x751): undefined reference to `_imp___ZN9QCodeEdi
    41. t8addPanelEP6QPanelNS_8PositionE'
    42. .build\main.o:main.cpp:(.text+0x774): undefined reference to `_imp___ZN10QFoldPa
    43. nelC1EP7QWidget'
    44. .build\main.o:main.cpp:(.text+0x7a9): undefined reference to `_imp___ZN9QCodeEdi
    45. t8addPanelEP6QPanelNS_8PositionE'
    46. .build\main.o:main.cpp:(.text+0x7cc): undefined reference to `_imp___ZN12QStatus
    47. PanelC1EP7QWidget'
    48. .build\main.o:main.cpp:(.text+0x804): undefined reference to `_imp___ZN9QCodeEdi
    49. t8addPanelEP6QPanelNS_8PositionE'
    50. .build\main.o:main.cpp:(.text+0x827): undefined reference to `_imp___ZN19QSearch
    51. ReplacePanelC1EP7QWidget'
    52. .build\main.o:main.cpp:(.text+0x85f): undefined reference to `_imp___ZN9QCodeEdi
    53. t8addPanelEP6QPanelNS_8PositionE'
    54. .build\main.o:main.cpp:(.text+0x870): undefined reference to `_imp___ZNK9QCodeEd
    55. it6editorEv'
    56. .build\main.o:main.cpp:(.text+0x898): undefined reference to `_imp___ZNK9QCodeEd
    57. it6editorEv'
    58. .build\main.o:main.cpp:(.text+0x8a8): undefined reference to `_imp___ZN7QEditor7
    59. setTextERK7QString'
    60. .build\main.o:main.cpp:(.text+0x8d5): undefined reference to `_imp___ZNK9QCodeEd
    61. it6editorEv'
    62. collect2: ld returned 1 exit status
    63. make[1]: *** [release\example.exe] Error 1
    64. make[1]: Leaving directory `C:/qcodeedit2/example'
    65. make: *** [release] Error 2
    To copy to clipboard, switch view to plain text mode 

    Please help, if you can.

  13. #12
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCodeEdit

    Quote Originally Posted by allstar View Post
    Please help, if you can.
    All the linking errors (which presumably includes QtXml related ones) come from the fact that you are trying to build QCodeEdit as a static lib... The simplest way to work around this is to add the following line to your project file :

    Qt Code:
    1. DEFINES += _QCODE_EDIT_BUILD_
    To copy to clipboard, switch view to plain text mode 

    Note : the use of this macro was usually intended as a way to allow direct embedding of the sources but AFAIK it should work just as well with static libs...
    Current Qt projects : QCodeEdit, RotiDeCode

  14. #13
    Join Date
    May 2007
    Location
    England
    Posts
    56
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCodeEdit

    Thanks FullMetalCoder, I confirm find is working again.

  15. #14
    Join Date
    Jun 2007
    Posts
    11
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCodeEdit

    Quote Originally Posted by fullmetalcoder View Post
    All the linking errors (which presumably includes QtXml related ones) come from the fact that you are trying to build QCodeEdit as a static lib... The simplest way to work around this is to add the following line to your project file :

    Qt Code:
    1. DEFINES += _QCODE_EDIT_BUILD_
    To copy to clipboard, switch view to plain text mode 

    Note : the use of this macro was usually intended as a way to allow direct embedding of the sources but AFAIK it should work just as well with static libs...
    Thanks. Finally I added it dircetly without the lib and its working. But it was needed to comment QCompletionEngine::~QCompletionEngine() - empty destructor in qcompletionengine.cpp -there was a conflict,( see above).

    Otherwise. There is a problem, that you cannot scroll with mousewheel when the cursor is on linenumberbar.
    Last edited by allstar; 10th November 2007 at 11:21.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.