Results 1 to 11 of 11

Thread: qPEditor - the editor for the programmer.

  1. #1
    Join Date
    Jan 2007
    Posts
    12
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default qPEditor - the editor for the programmer.

    qPEditor - the editor for the programmer.

    He is the powerful editor with the open code under license GPL.

    Features:
    Cross - platform;
    It is written completely on Qt. Minimal requirements Qt 4.2.x;
    Adjustment of styles of allocation for various programming languages;
    Folding the text;
    Support undo/redo.
    Use in Qt Designer as a plugin.

    www.AnyQSoft.com

  2. #2
    Join Date
    Jan 2007
    Posts
    12
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qPEditor - the editor for the programmer.

    Version qPEditor is updated to 1.0.1.
    This is a bug-fix release.

    http://www.anyqsoft.com/qPEditor?Lang=Eng

  3. #3
    Join Date
    Jan 2006
    Posts
    368
    Thanks
    14
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qPEditor - the editor for the programmer.

    Did not compile for me on Linux.

    Man, it's hard for someone to release an open source application... because then n00bs on the internet start telling how messy your code is... and bla bla bla...

    wait, at least let me explain:

    1) your code is a mess of upper case and lower case classnames or file names. please be consistant

    2) the compilation is VERY messy, lots of warnings (please put a new line in the end of each file for example).

    3) the compilation creates a library directly in $(QTDIR)/lib which is bad!!!! in most situations you will not be able to write that file, since its in /usr/lib. you were lucky and i tested in my local 4.4 build - so the make utility was able to create the file.

    THAT IS VERY RUDE! installing libs is part of the "install" rule, not the "make". please don't so such things in the future, now my $QTDIR is infected with some library which I probably not use, what else is installed?

    4) the libs directive did not work for me, I have to completely modify it. not using a strict path (and library name!) was helpful to me.

    5) a lot of runtime warnings, please fix then (hint, QPainter::end() is a good idea).

    6) The syntax definition file ... why do you put the language definition and (for while) and the display definition (blue with font size 12) on the same file? i find this very limiting.

    7) the code contains 2 style.def for "qt/qs cpp"... bad... bad...

    I still need to see how this scales up (did you try loading a 12kb-25kb file?).

    Hey, it looks better then other software I looked !

    I am attaching here a diff, for you to fix and for Linux/Unix developers to apply if they want to use it.
    Attached Files Attached Files

  4. #4
    Join Date
    Jan 2007
    Posts
    12
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qPEditor - the editor for the programmer.

    elcuco

    Thanks. I shall necessarily look your offers and I shall make editing. With the register and the ends of lines it completely agree.

  5. #5
    Join Date
    Jan 2007
    Posts
    12
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qPEditor - the editor for the programmer.

    Updated qPEditor up to version 1.0.2.
    Tested for Linux.

  6. #6
    Join Date
    Jan 2006
    Posts
    368
    Thanks
    14
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qPEditor - the editor for the programmer.

    Works perfectly now, THANKS!
    (horrible colors, but na...)

    2 things:
    it's possible to run the example without installing, here:
    Qt Code:
    1. [elcuco@localhost qPEditor]$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/elcuco/src/2/qPEditor/qPEditorLib/
    2. [elcuco@localhost qPEditor]$ ./examples/DesignerExample/DesignerExample
    To copy to clipboard, switch view to plain text mode 

    and, please, next time export the source before you package, you will save ~50% of the size of the download
    Qt Code:
    1. [elcuco@localhost qPEditor]$ svn info
    2. Path: .
    3. URL: file:///C:/Portable/Repository/qPEditor/trunk
    4. Repository Root: file:///C:/Portable/Repository/qPEditor
    5. Repository UUID: 92c12e8a-2a66-6e4e-8df9-10d1464c7f38
    6. Revision: 92
    7. Node Kind: directory
    8. Schedule: normal
    9. Last Changed Author: Mike
    10. Last Changed Rev: 92
    11. Last Changed Date: 2008-05-15 13:22:00 +0300 (Thu, 15 May 2008)
    To copy to clipboard, switch view to plain text mode 

  7. #7
    Join Date
    Jan 2007
    Posts
    12
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qPEditor - the editor for the programmer.

    All can be adjusted colors.
    1. In the Designer or in a code: color of a background, color of a current line, color of panels аnd others colors - look properties qPEditor.
    2. Color allocation of a code in the editor is adjusted in dialogue of styles. In an example on Style in ToolBar.

    It agree. So it is possible to start an example.

    Next time it is indispensable export the source before you package

  8. #8
    Join Date
    Jan 2006
    Posts
    368
    Thanks
    14
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qPEditor - the editor for the programmer.

    I see the way to modify the colors in a single touch. What I did in my text editor widget is to define a language definition and colors definitions in different XML files. This way the colors and syntax are easy to change.

    If you want to check my code, or at least the ideas I used, feel free to do it:
    http://code.google.com/p/qtedit4/wiki/QsvEditorBeta

  9. #9
    Join Date
    Jan 2007
    Posts
    12
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qPEditor - the editor for the programmer.

    Version qPEditor is updated to 1.1.0
    The added panel bookmark and marketed separation fresh bracket.

  10. #10
    Join Date
    Jan 2006
    Posts
    368
    Thanks
    14
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qPEditor - the editor for the programmer.

    Version 1.1.0 does not compile here (Mandriva 2008.1, Qt4.4.0)

    Qt Code:
    1. g++ -c -pipe -g -D_REENTRANT -Wall -W -fPIC -DEDITORPLUGIN -DQT_PLUGIN -DQT_SCRIPT_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS -DQT_SHARED -I../../../../qt-44/mkspecs/linux-g++ -I. -I../../../../qt-44/include/QtDesigner -I../../../../qt-44/include/QtCore -I../../../../qt-44/include/QtCore -I../../../../qt-44/include/QtGui -I../../../../qt-44/include/QtGui -I../../../../qt-44/include/QtXml -I../../../../qt-44/include/QtXml -I../../../../qt-44/include/QtScript -I../../../../qt-44/include/QtScript -I../../../../qt-44/include -I../src -I../src/StyleDialog -Irelease -Irelease -o release/textedit.o ../src/textedit.cpp
    2. In file included from ../src/textedit.h:28,
    3. from ../src/textedit.cpp:22:
    4. ../src/userblockdata.h: In constructor ‘QBlockData::QBlockData()’:
    5. ../src/userblockdata.h:58: warning: ‘QBlockData::collapsedBlock’ will be initialized after
    6. ../src/userblockdata.h:55: warning: ‘bool QBlockData::marked’
    7. ../src/userblockdata.h:43: warning: when initialized here
    8. ../src/textedit.cpp: In member function ‘virtual void TextEdit::paintEvent(QPaintEvent*)’:
    9. ../src/textedit.cpp:83: error: no matching function for call to ‘TextEdit::paintBracketForward(QTextCursor&, int&, QChar, QChar)’
    10. ../src/textedit.h:75: note: candidates are: void TextEdit::paintBracketForward(QTextCursor&, int, QChar&, QChar&)
    11. ../src/textedit.cpp:87: error: no matching function for call to ‘TextEdit::paintBracketBack(QTextCursor&, int&, QChar, QChar)’
    12. ../src/textedit.h:76: note: candidates are: void TextEdit::paintBracketBack(QTextCursor&, int, QChar&, QChar&)
    13. ../src/textedit.cpp:91: error: no matching function for call to ‘TextEdit::paintBracketForward(QTextCursor&, int&, QChar, QChar)’
    14. ../src/textedit.h:75: note: candidates are: void TextEdit::paintBracketForward(QTextCursor&, int, QChar&, QChar&)
    15. ../src/textedit.cpp:95: error: no matching function for call to ‘TextEdit::paintBracketBack(QTextCursor&, int&, QChar, QChar)’
    16. ../src/textedit.h:76: note: candidates are: void TextEdit::paintBracketBack(QTextCursor&, int, QChar&, QChar&)
    17. ../src/textedit.cpp:99: error: no matching function for call to ‘TextEdit::paintBracketForward(QTextCursor&, int&, QChar, QChar)’
    18. ../src/textedit.h:75: note: candidates are: void TextEdit::paintBracketForward(QTextCursor&, int, QChar&, QChar&)
    19. ../src/textedit.cpp:103: error: no matching function for call to ‘TextEdit::paintBracketBack(QTextCursor&, int&, QChar, QChar)’
    20. ../src/textedit.h:76: note: candidates are: void TextEdit::paintBracketBack(QTextCursor&, int, QChar&, QChar&)
    21. ../src/textedit.cpp: At global scope:
    22. ../src/textedit.cpp:109: warning: unused parameter ‘end’
    23. make[1]: *** [release/textedit.o] Error 1
    24. make[1]: Leaving directory `/home/elcuco/src/qeditor/qPEditor/qPEditorPlugin'
    25. make: *** [sub-qPEditorPlugin-make_default] Error 2
    26. [elcuco@localhost qPEditor]$
    To copy to clipboard, switch view to plain text mode 

    Edit:

    You are passing a QChar() to a function which needs a reference. The workaround is simple:
    Qt Code:
    1. if ( CurrentLineVisible && CurrentLineColor.isValid() )
    2. {
    3. QChar c1 = '{';
    4. QChar c2 = '}';
    5. ...
    6. switch ( cc )
    7. {
    8. case '{':
    9. if ( !exists( pos )) break;
    10. paintBracketForward( cur, pos , c1=QChar( '{' ), c2=QChar( '}' ) );
    11. break;
    To copy to clipboard, switch view to plain text mode 

    Note what that I just added, c1=QChar() statements in all the cases. Now it compiles and works.
    Last edited by elcuco; 8th July 2008 at 21:12. Reason: found the bug

  11. #11
    Join Date
    Jan 2007
    Posts
    12
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qPEditor - the editor for the programmer.

    Quote Originally Posted by elcuco View Post
    Version 1.1.0 does not compile here (Mandriva 2008.1, Qt4.4.0)

    Qt Code:
    1. g++ -c -pipe -g -D_REENTRANT -Wall -W -fPIC -DEDITORPLUGIN -DQT_PLUGIN -DQT_SCRIPT_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS -DQT_SHARED -I../../../../qt-44/mkspecs/linux-g++ -I. -I../../../../qt-44/include/QtDesigner -I../../../../qt-44/include/QtCore -I../../../../qt-44/include/QtCore -I../../../../qt-44/include/QtGui -I../../../../qt-44/include/QtGui -I../../../../qt-44/include/QtXml -I../../../../qt-44/include/QtXml -I../../../../qt-44/include/QtScript -I../../../../qt-44/include/QtScript -I../../../../qt-44/include -I../src -I../src/StyleDialog -Irelease -Irelease -o release/textedit.o ../src/textedit.cpp
    2. In file included from ../src/textedit.h:28,
    3. from ../src/textedit.cpp:22:
    4. ../src/userblockdata.h: In constructor ‘QBlockData::QBlockData()’:
    5. ../src/userblockdata.h:58: warning: ‘QBlockData::collapsedBlock’ will be initialized after
    6. ../src/userblockdata.h:55: warning: ‘bool QBlockData::marked’
    7. ../src/userblockdata.h:43: warning: when initialized here
    8. ../src/textedit.cpp: In member function ‘virtual void TextEdit::paintEvent(QPaintEvent*)’:
    9. ../src/textedit.cpp:83: error: no matching function for call to ‘TextEdit::paintBracketForward(QTextCursor&, int&, QChar, QChar)’
    10. ../src/textedit.h:75: note: candidates are: void TextEdit::paintBracketForward(QTextCursor&, int, QChar&, QChar&)
    11. ../src/textedit.cpp:87: error: no matching function for call to ‘TextEdit::paintBracketBack(QTextCursor&, int&, QChar, QChar)’
    12. ../src/textedit.h:76: note: candidates are: void TextEdit::paintBracketBack(QTextCursor&, int, QChar&, QChar&)
    13. ../src/textedit.cpp:91: error: no matching function for call to ‘TextEdit::paintBracketForward(QTextCursor&, int&, QChar, QChar)’
    14. ../src/textedit.h:75: note: candidates are: void TextEdit::paintBracketForward(QTextCursor&, int, QChar&, QChar&)
    15. ../src/textedit.cpp:95: error: no matching function for call to ‘TextEdit::paintBracketBack(QTextCursor&, int&, QChar, QChar)’
    16. ../src/textedit.h:76: note: candidates are: void TextEdit::paintBracketBack(QTextCursor&, int, QChar&, QChar&)
    17. ../src/textedit.cpp:99: error: no matching function for call to ‘TextEdit::paintBracketForward(QTextCursor&, int&, QChar, QChar)’
    18. ../src/textedit.h:75: note: candidates are: void TextEdit::paintBracketForward(QTextCursor&, int, QChar&, QChar&)
    19. ../src/textedit.cpp:103: error: no matching function for call to ‘TextEdit::paintBracketBack(QTextCursor&, int&, QChar, QChar)’
    20. ../src/textedit.h:76: note: candidates are: void TextEdit::paintBracketBack(QTextCursor&, int, QChar&, QChar&)
    21. ../src/textedit.cpp: At global scope:
    22. ../src/textedit.cpp:109: warning: unused parameter ‘end’
    23. make[1]: *** [release/textedit.o] Error 1
    24. make[1]: Leaving directory `/home/elcuco/src/qeditor/qPEditor/qPEditorPlugin'
    25. make: *** [sub-qPEditorPlugin-make_default] Error 2
    26. [elcuco@localhost qPEditor]$
    To copy to clipboard, switch view to plain text mode 

    Edit:

    You are passing a QChar() to a function which needs a reference. The workaround is simple:
    Qt Code:
    1. if ( CurrentLineVisible && CurrentLineColor.isValid() )
    2. {
    3. QChar c1 = '{';
    4. QChar c2 = '}';
    5. ...
    6. switch ( cc )
    7. {
    8. case '{':
    9. if ( !exists( pos )) break;
    10. paintBracketForward( cur, pos , c1=QChar( '{' ), c2=QChar( '}' ) );
    11. break;
    To copy to clipboard, switch view to plain text mode 

    Note what that I just added, c1=QChar() statements in all the cases. Now it compiles and works.
    Version qPEditor is updated to 1.1.1
    Removal mistake.

    elcuco

    We ask to check the amendable version and report the result.

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.