-
1 Attachment(s)
[DevQt] New versions, feature requests and bug reports
Hi boys! Here is the new thread dedicaced to the developpement of a new IDe, written with Qt and providing a build-in support for it!
All suggestions, code snippets, bug reports (and so on...) will be welcomed! :D
Have a look at the last stable version I crafted. It features :
- working GUI :p
- management of .pro files (only variables are handled not conditionals and functions)
- text editing widget with line numbers
- current line highlighting and basis of breakpoints and errors
- syntax highlighting (fast!!!!:cool: )
- find & replace dialogs
-
Re: Bumblebees on the road again!
Some first look comments:
- add an ability to change fonts in the editor... on my system it looks terrible
- find dialog should be not modal -- the user should be able to use the editor while the dialog is open
- some of the icons are smaller than others
- the "Column-row" indicator is messed up sometimes
Looks nice, though :) Waiting for more.
-
Re: Bumblebees on the road again!
Quote:
Originally Posted by wysota
Some first look comments:
- add an ability to change fonts in the editor... on my system it looks terrible
- find dialog should be not modal -- the user should be able to use the editor while the dialog is open
- some of the icons are smaller than others
- the "Column-row" indicator is messed up sometimes
Looks nice, though :) Waiting for more.
Nice to see that you tried my work and liked it!
What do you mean about the font???? It worked flawlessly on my system and I can't figure out what wrong stuff could happen!:confused:
Totally agree with you about find & replace dialogs! I'm working on it.
Icons smaller than others? Hum... well... I don't understand what you mean!!!:p
What mess occurs for the column-row indicator? Do you mean that, sometimes, the numbers given in the status bar don't correspond to the line and/or column pointed by the mouse cursor?
I want your comments! I'm about to post a newer version and I'd like to be able to fix such bugs!
-
Re: Bumblebees on the road again!
Quote:
Originally Posted by fullmetalcoder
What do you mean about the font????
It is ugly, so I want to change it :)
Quote:
It worked flawlessly on my system and I can't figure out what wrong stuff could happen!:confused:
Well... If you want others to use it, it has to work for them too.
Quote:
Icons smaller than others? Hum... well... I don't understand what you mean!!!:p
Exactly the thing I said -- some icons in the toolbar are smaller than other icons in the toolbar.
Quote:
What mess occurs for the column-row indicator? Do you mean that, sometimes, the numbers given in the status bar don't correspond to the line and/or column pointed by the mouse cursor?
No. Often the indicator is not redrawn properly and the app ends up in having two indicators drawn one over the other cluttering themselves (and displaying different data).
-
Re: Bumblebees on the road again!
Quote:
Originally Posted by fullmetalcoder
What mess occurs for the column-row indicator? Do you mean that, sometimes, the numbers given in the status bar don't correspond to the line and/or column pointed by the mouse cursor?
http://www.uusikaupunki.fi/~jpnurmi/mess.jpg
Quote:
Originally Posted by fullmetalcoder
Icons smaller than others? Hum... well... I don't understand what you mean!!!:p
The size of icons differences between "file" and "edit" toolbars.
A couple of ideas:
- Qt specific highlighting =)
- New/close buttons as tabwidget corner widgets (Qt assistant style)? At least close button should be "easier to access".
Nice work buddy!
-
Re: Bumblebees on the road again!
Hi,
I just want to starty by saying - congratulations on a great initiative. A Qt IDE is needed!
A few points:
- I'm not sure about the legal implications, but I think that a copyright needs more than a nickname.
- I get lots of Object::connect: No such slot DevEdit::highlight(QTextCursor) when running the application.
- Are you preparing for being able to integrate Assistant, Designer and Linguist?
- Is there a site or such for the application?
-
Re: Bumblebees on the road again!
Hey, I just checked this out. seems interesting. Although i just usually use Kate (or Visual Studio as editor on Windows) + Qt Designer + command line.
Is there a reason for forcing the style? I think this is bad. Usually you should respect the user's desktop preferences. Also the column/row "mess" jpn pointed out happens because of this. I don't know why. On Windows XP with Qt 4.1 there is that mess. If I comment out the 2 lines that force style in devapp.cpp there is no "mess". I am not sure what's up w/ that. Also, and I know this is all preliminary work but something to keep in mind, is that actions are really a lot more useful with shortcuts and tooltips. Like:
Code:
openAct
= new QAction(QIcon(":/images/open.png"), tr
("&Open..."),
this);
openAct->setShortcut(tr("Ctrl+O"));
openAct->setStatusTip(tr("Open an existing file"));
connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
Shortcurts are especially helpful for Find and alike.
Anyway, pretty nice work.
Bojan
-
Re: Bumblebees on the road again!
Quote:
Originally Posted by wysota
No. Often the indicator is not redrawn properly and the app ends up in having two indicators drawn one over the other cluttering themselves (and displaying different data).
I didn't compile it yet (I was too lazy to get around to updating to 4.x--but doing it now as we speak just for this program!--and it doesn't make on 3.3), but looking at the code from the command line it looks like the column and row strings are painted to the same widget in the status bar. I find it's easier just to create two permanent textLabel widgets to add to the statusbar, then update the text of each textLabel when I need to rather than worry about handling strings and calling the statusbar updater. That way the widget will manage its own growing and shrinking without the two strings overlapping one another or having any "accidents."
An example in your initializer function might be:
QLabel *tlCurrCol = new QLabel( "Column ", this);
QLabel *tlCurrRow = new QLabel( "Row ", this);
statusBar()->addWidget(tlCurrCol, 0, TRUE);
statusBar()->addWidget(tlCurrRow, 0, TRUE);
then in the mouseEvent, rather than concatenating the string "Column " with some number and "Row " with some number then calling statusChanged() I can just do this:
tlCurrCol->setText("Column " + QString::number(x, 10));
tlCurrRow->setText("Row " + QString::number(y, 10));
And because they are widgets rather than a string, the statusbar will automatically reflect the change without me having to do anything else. And I am lazy, so that's always the best solution for me.
Again, sorry if that code isn't valid. It should be (I looked at something similar I did and just changed the variable names). I can't test it before posting because I'm currently building version 4.
-
1 Attachment(s)
Re: Bumblebees on the road again!
This a interesting project, allthough it might not be easy to compete with all the other IDE's allready available as others have mentioned before. I'm currently also creating a IDE, but for script programming with QSA. One may think WTH is that good for because there is allready a IDE included in QSA. Well the original just did not to suit my needs good enough, scripting is a big part of my past and future projects and I will be using the IDE many many hours in the next few years, so I just started creating a "better" one :p
So good luck with this project, maybe I can contribute something in case there is need for help.
-
1 Attachment(s)
Re: Bumblebees on the road again!
Quote:
Originally Posted by Cesar
2 fullmetalcoder:
Maybe you need some help in this project? I'd like to take part in developing :)
It seems you are not interested :(
Anyway, take a look...
- Line numbers and cursor position display fixed
- Did some code cleanup here and there
- Added some tr()'s
- etc.
You could see Changelog...
-
1 Attachment(s)
Re: Bumblebees on the road again!
Yeah, I guess the editor and project manager are what I was referring to. I know it wasn't an IDE in the same sense as MSVC or KDevelop or Borland et cetera. My initial reaction was shock (especially with the undocked windows), but now that I have used it for awhile it seems a lot better without either. For one thing it seems to load twice as fast as 3.3 did (although that is probably due to other improvements as well). And it's not really such a hassle to edit the projects by hand. I mean, I usually had an xterm open simultaneously to run qmake and make anyway, I might as well do the editing there while I'm at it. OK, I like 4.1 after all. So let's pretend my previous post was written by somebody else. :)
PS:
Had some free time this grey afternoon while the wife is sleeping to create a keyword array for the reserved words in Python, which I just know you're going to support now that QT has a Python binding :D Feel free to rename the derivative class "PyHighlighter" (I just took the Cpp off your original class to keep it somewhat uniform). Personally I think "Pylighter" sounds cooler.
const char* PyHighlighter::kwds[PyHighlighter::keywords] =
{
"and", "assert", "break", "class", "continue", "def", "del",
"elif", "else", "except", "exec", "finally", "for", "from",
"global", "if", "import", "in", "is", "lambda", "not", "or",
"pass", "print" "raise", "return", "try", "while", "yield"
};
total keywords (for Options { keywords } ) in the array are 29
PPS:
Some other observations about the highlighter:
Your code is not checking whether hash marks are inside single quotes.
For example, when loading your own devhighlighter.cpp file in the IDE and looking at the line beginning with
"else if ( c=='#' )"
The # and everything to the right of it (the "' )" I mean ) is green. I assume you want strings to be red, so what color are individual
characters inside of single quotes? Also red?
Another problem is when using multiple numbers in variable names. Rather than leaving them black, the IDE ignores the first number, but changes any
others next to it to magenta.
For an example of the above problems, the following screenshot is provided
-
Re: Bumblebees on the road again!
A QT IDE would be great.
I'd say: take the source to the designer and add handling of custom made signals/slots/classes, etc. and it will be great.
-
Re: Bumblebees on the road again!
don't like u way in writing Row/Col counter
take a look this -- it's real work
http://www.qtforum.org/article/14894...e-numbers.html
-
Re: Bumblebees on the road again!
the code i wrote talks about the text cursor.
the numbers you see on this application show the text location of where you mouse has "over"... well, you know what i mean...
these are 2 different things.
but, i do agree, i really don't need to know the positio in which i am puttin the mouse cursor. where the text cursor, that's something useful.:cool: :confused: :mad:
-
Re: Bumblebees on the road again!
Quote:
Originally Posted by elcuco
the code i wrote talks about the text cursor.
the numbers you see on this application show the text location of where you mouse has "over"... well, you know what i mean...
these are 2 different things.
but, i do agree, i really don't need to know the positio in which i am puttin the mouse cursor. where the text cursor, that's something useful.
I'm planning to provide both of them! :p
Quote:
I'm happy you are :) Have you taken a look at my fixed version?
I'm gonna do it ASAP!
MY week is gonna be really busy... :(
I'll have to wait next week for a newer version : holidays he!:D
-
Re: Bumblebees on the road again!
Hi,
I tried to compile your code but it's giving compilation errors. Currently I am using
Qt version 4.0.1. I got this error while building this application,
In file included from devedit.h:31,
from deveditor.h:30,
from devgui.h:32,
from devapp.h:30,
from devapp.cpp:25:
/usr/local/Trolltech/Qt-4.0.1/include/QtGui/qtextobject.h: In static member
function `static BlockData* BlockData::data(const QTextBlock&)':
/usr/local/Trolltech/Qt-4.0.1/include/QtGui/qtextobject.h:240: `
QTextBlockUserData* QTextBlock::userData() const' is private
devhighlighter.h:135: within this context
/usr/local/Trolltech/Qt-4.0.1/include/QtGui/qtextobject.h: In member function
`void BlockData::setToBlock(QTextBlock&)':
/usr/local/Trolltech/Qt-4.0.1/include/QtGui/qtextobject.h:241: `void
QTextBlock::setUserData(QTextBlockUserData*)' is private
devhighlighter.h:137: within this context
-
Re: Bumblebees on the road again!
Great initiative fullmetalcoder
The IDE looks clean and although work-in progress it's easy to see that it is heading in the right direction.
I think your idea is great. An IDE strictly for Qt (if I understood it right) is probably what most C++/Qt coders would like. KDevelop is great, but by making an IDE very dynamic you also make it complex. An easier IDE targeted toward a smaller 'group' could be a hit :D
Some things I miss in KDevelop and would love to see here
Source re-formatting/indenting as in XEmacs (tab re-formatts line, select region + F4). It's good if it's an 'easy reach' key (configurable?), and not only in menu. My opinion is that 'tab' is great for line source formating and I really miss it in KDevelop.
Keep up the good work.
-
Re: Bumblebees on the road again!
But code reformatting is present in KDevelop and you can assign a key shortcut/accelerator to it.
-
Does anybody want to join the aid creating DevQT?
As far as I can see, the idea of this project make much sense to forum people. There were plenty of suggestions, ideas, bug reports, etc, etc...
Quote:
Originally Posted by fullmetalcoder
All suggestions, code snippets, bug reports (and so on...) will be welcomed! :D
2fullmetalcoder: May I suggest people to join the project? You'll become the project leader :D
As I already mentioned, I would be glad to join you and will do my best improving DevQT. If everything will be ok, and we won't leave the project, we could ask wysota to create a special forum for DevQT. ;)
-
Re: Bumblebees on the road again!
Quote:
Originally Posted by wysota
But code reformatting is present in KDevelop and you can assign a key shortcut/accelerator to it.
wysota ooops. I didn't check in the right place :eek: my mistake. Thanks a million!
But it <he he> proves my point that KDevelop is so dynamic that it at, least in this instance was a problem for me, therefore maybe also for other users :rolleyes: A strict Qt IDE will still be attractive to me and others - competition is good
-
Re: Bumblebees on the road again!
Quote:
Originally Posted by I
Quote:
Originally Posted by Cesar
Have you taken a look at my fixed version?
I'm gonna do it ASAP!
Yep I did it! Nice trick for the dialogs!!! I now use it for the replace dialog as well.
I had a look at the Changelog and, well.. it's quite confusing!!!
Where are your fixes of :
- cursor mess
- various memory leak
- ...
:confused:
Anyway, thanks a lot! Dialogs needed not to be modals and I would have never thought to do it as you did (it's the smallest, fastest and the most elegant way possible:) )
Quote:
Originally Posted by Cesar
Consider me joined the team
Hey buddy! What are you doing? Members of a team are supposed to share ideas or to work on the project! :rolleyes: :p
edit:
2 admins : how do you decide to make a thread "sticky"? And why especially this one?
-
Re: Bumblebees on the road again!
Ok guys, next version is coming soon (tomorrow or Saturday actually)
Changes :
- added Insert / Overwrite key handling for the edit widget
- added a corner widget for the tab widget :
- '+' icon creates a new empty editor
- '-' icon closes the current editor
- fixed highlighting troubles (number inside variable names, hash inside single quote, number or letter befor comments)
- improved .pro handling
- changed the behaviour and content of the status bar, 6 widgets :
- general purpose
- text cursor position
- mouse cursor position
- document state (modified or not)
- Insert/Overwrite mode
- number of lines in file
- fixed undo/redo (removed highlighting of errors and breakpoints because bugged undo/redo...)
- and more...
-
Re: Bumblebees on the road again!
-
Re: Bumblebees on the road again!
1. IMHO DevQT is enough. DevQT++ is unnecessary.
2. Wishlist: Code completion, a la VB6 (maybe after that too, never saw it). When an object's name is typed followed by . or ->, bring up a combobox of applicable member functions etc -- you know VB6... If I start typing QVB then it must complete the rest -- QVBoxLayout.
3. It must correct the case itself -- both for classes and variabled -- VB6 does that. (Of course, everyone here realizes that just because something is there in an MS product does not mean it's intrinsically bad...)
4. One particular code completion is, when the user has typed QPushButton quit = new -- the IDE must fill in the next word which is always QPushButton and add a (, perhaps even a () while placing the cursor between the parantheses.
5. I hope to see DevQT develop into a big app soon, though I lack the programming knowledge to contribute to it!
-
Re: Bumblebees on the road again!
Quote:
Originally Posted by jamadagni
2. Wishlist: Code completion, a la VB6 (maybe after that too, never saw it). When an object's name is typed followed by . or ->, bring up a combobox of applicable member functions etc -- you know VB6... If I start typing QVB then it must complete the rest -- QVBoxLayout.
That would be really great :) We're open to suggestions of implementation algorythms :)
Quote:
Originally Posted by jamadagni
3. It must correct the case itself -- both for classes and variabled -- VB6 does that. (Of course, everyone here realizes that just because something is there in an MS product does not mean it's intrinsically bad...)
Won't do. AKAIK, VB is case insensitive, whilst C++ is not. That's why no case correction should take place.
Quote:
Originally Posted by jamadagni
4. One particular code completion is, when the user has typed QPushButton quit = new -- the IDE must fill in the next word which is always QPushButton and add a (, perhaps even a () while placing the cursor between the parantheses.
Won't do. Consider the following example:
Quote:
Originally Posted by jamadagni
5. I hope to see DevQT develop into a big app soon, though I lack the programming knowledge to contribute to it!
Either do I :) Thanks for your feedback!
-
Re: Bumblebees on the road again!
Guys, one remark --- Are you talking about "Qt" or "QT"? Because the latter has nothing to do with this site :) And I see you want to name the application DevQT.
BTW, this is wrong:
Quote:
4. One particular code completion is, when the user has typed QPushButton quit = new -- the IDE must fill in the next word which is always QPushButton and add a (, perhaps even a () while placing the cursor between the parantheses.
What about constructions like the following:
-
Re: Bumblebees on the road again!
Quote:
QPushButton *b = new MyPushButton();
1. Why don't you declare it as MyPushButton *b = new MyPushButton(); ?
2. So long as QPu is autocompleted as QPushButton I don't have a problem with this idea being rejected! ;)
-
1 Attachment(s)
new highlighter
i try rewrite old Qt3 syntaxhighlighter
with new libraries
take a look
-
Re: new highlighter
Quote:
Originally Posted by Hz
i try rewrite old Qt3 syntaxhighlighter
with new libraries
take a look
This is FullMetalCoder 's code, which is borrowed from QSA.
Why do I have the feeling like most codes we see on this thread are "way too similar"?
-
Re: new highlighter
Quote:
Originally Posted by elcuco
This is FullMetalCoder 's code, which is borrowed from QSA.
Why do I have the feeling like most codes we see on this thread are "way too similar"?
its code from qt3 text editor :) - i just correct a little function "process()" in FullMetalCoder 's code
-
Re: Bumblebees on the road again!
Quote:
Originally Posted by jamadagni
1. Why don't you declare it as MyPushButton *b = new MyPushButton(); ?
QPushbutton *b = new MyPushButton(); creates a new QPushbutton called b and assigns it a pointer to memory containing an instance of MyPushButton(). But now it is also possible later to change b to point to an instance of MyOtherPushButton or any other subclass of QPushButton.
If you were to try
Code:
MyPushButton *b = new MyPushButton();
and then later
Code:
b = new MyOtherPushButton();
you would get an "invalid conversion from type x to type y" error. The way you are wanting to write it is fine for most things. But to say the IDE must autocomplete this type of statement would be for it to make unnecessary guesses and handholding for the programmer.
-
Re: new highlighter
Quote:
Originally Posted by elcuco
This is FullMetalCoder 's code, which is borrowed from QSA.
Why do I have the feeling like most codes we see on this thread are "way too similar"?
Becouse this is the best way to implement a highlight. If you use QRegExp like syntaxhighlight exemple your code will be very slow. So its better to use a compiler aproach like in the lex analizers.
By the way, I'm working on a powerfull C++ editor, its not an IDE and I think you guys will like, some features that it will have:
* Multiline edit;
* Persistent selection;
* Split views;
* Icon pannel (with an overview pannel to);
* Line numbers;
* Code collapse (folding);
* Parentesis match;
* Auto complete to open parentesis, quote, brackets, etc.;
Perhaps could be used by FullMetalCoder's IDE ;)
As I'm without computer at home, the development is slow, becouse I can program only here at work after the expedient.
-
1 Attachment(s)
Re: [DevQt] Team & project management
How nice!!! 3 sticky thread dedicaced to our project!!! Thanks a lot to the admins!:D
Here is the new version I was talking about! Check out Changelog.txt
-
Re: new highlighter
Quote:
Originally Posted by Townk
Becouse this is the best way to implement a highlight. If you use QRegExp like syntaxhighlight exemple your code will be very slow. So its better to use a compiler aproach like in the lex analizers.
By the way, I'm working on a powerfull C++ editor, its not an IDE and I think you guys will like, some features that it will have:
* Multiline edit;
* Persistent selection;
* Split views;
* Icon pannel (with an overview pannel to);
* Line numbers;
* Code collapse (folding);
* Parentesis match;
* Auto complete to open parentesis, quote, brackets, etc.;
Perhaps could be used by FullMetalCoder's IDE ;)
As I'm without computer at home, the development is slow, becouse I can program only here at work after the expedient.
oh dear! don't be silly! sharing knowledge is the best way to learn and the philosophy of Open Source is anything but doing 2 similars projects without any connections!:rolleyes:
I don't mean you should join the project rather than starting your own! Actually if you feel better developping you own project alone it's your choice but, as you said, we'll like the features you want your text editor to provide. So the point is : "why not sharing our view about and implementation of them?" :confused:
I hope I managed to convince you...:)
-
Re: [DevQt] New versions, feature requests and bug reports
Two things:
1. There are two bugs in the archive above which prevent the application from working:
a) "class DevWorkSpace;" in devgui.h is missing
b) a segfault on startup occurs, because you create a QMenu object with Editor parent, while Editor (ptr to some object) is still uninitialised. One has to move the statement which assigns an object to Editor before the setupMenu() call.
2. Why is the minimum width of the main window more than the width of my display (which is 1024x768) ? :)
Please test your code before posting it.
-
Re: [DevQt] New versions, feature requests and bug reports
I'm trying to build the latest version on windows using ms visual studio and i get QTextBlock errors b/c userData and setUserData are private members.
I also get a few QTreeWidgetItem problems b/c TreeWidgetItem(QTreeWidget *,int) parameter 1 can't take a QString.
Any ideas why I get these issues.
I am using qt4. Is this in qt3?
-
Re: [DevQt] New versions, feature requests and bug reports
fullmetalcoder,
for next versions, can you put the source in the released zip under a directory called "devqt-VERSION"?
This way, I can unzip all of your versions into one dir.
edit,
I managed to compile the project (the compilation problems are documented on this thread). A few sugestions:
1) The "-" button, should be on the right. As the buttons are too small, one can click the wrong one by mistake. And it shuold use the same pixmap as the toolbar (that X with circle, and not "-").
2) On the "Files" tab, do you really need a top level "Default" item ? this means another click before i can see the project. Another idea, shuold be openning that tree when you load a project.
3) Please add shortcuts to the QActions. Please... otherwise the editor is practically "unusable".
4) The find text should be modaless, I will need to edit text while searching.
5) The Find text dialog. is always on top, which is good. But when the main window looses focus, please hide that window. I am writing on Firefox and the find text from you application is on top :)
6) The main window does not fit my resolution. I am usign 1280x1024. The editor should work also on 800x600 screens. The problem is in devstatus.cpp, DevStatus::DevStatus() - the for loop does l->setFixedWidth().
7) Don't force the usage of Plastique. Respect the desktops settings of users. On MAC, Plastique will look wierd.
8) Goto dialog, please put the buttons on the bottom, not on the side.
9) Dont show the compiler dock by default, until it's usable. It's just taking space on my screen.
10) Session managment needed: please restore the editor configuration when I restart the application.
It does look for for some initial version, but you have a lot of work to do yet :)
Good job!!!
-
Re: [DevQt] New versions, feature requests and bug reports
Quote:
Originally Posted by jnk5y
I'm trying to build the latest version on windows using ms visual studio and i get QTextBlock errors b/c userData and setUserData are private members.
I also get a few QTreeWidgetItem problems b/c TreeWidgetItem(QTreeWidget *,int) parameter 1 can't take a QString.
Any ideas why I get these issues.
I am using qt4. Is this in qt3?
The QTreeWidgetItem problem isn't because she is using Qt3, but rather Qt4.1. The constructor isn't available in 4.0. I would write a diff patch for you, but at the moment I am compiling Firefox 1.5 and my computer is as slow as an 80 year old brontosaurus who was just made Professor Emeritus of Slowness at Oxford University's Department of Slow Moving Things.
IMO if you want this to be popular, you shouldn't only make it work on the brand newest version of Qt. Qt3 already has an editor, so it isn't a big deal. But at least make it portable to all the existing branches of 4.x. Seeing how many people still use 3, I do not think everybody will switch to developing in 4.1 all at once--especially since without an IDE rapid deployment of a new application is much easier in Qt3 than 4.x. So maybe those people using 4.0 (for example, when the next release of KDE comes out, which I think will be using 4) would like to use your IDE, but won't be able to because they can't even compile it.
But then it is not even working yet, so that is probably a problem to worry about a long time from now.
-
Re: new highlighter
Quote:
Originally Posted by Townk
Becouse this is the best way to implement a highlight. If you use QRegExp like syntaxhighlight exemple your code will be very slow. So its better to use a compiler aproach like in the lex analizers.
It depends. I also made a syntax highlighter using regexp strings for practice (I don't know regexp very well and needed an excuse to learn it) with a text editor I made in Qt3 when I first began to learn the library, and when typing code in manually or opening from a file there is no noticable difference in human time from the one I made using while loops and if-else statements. The only trouble is if you be evil and copy a large amount of code into the clipboard and then hold down the Ctrl+V keys for about ten seconds to paste it all over and over again a lot. Then the program freezes for about fifteen seconds before displaying anything :DDDD. Probably for formatting a large input filestream the difference isn't so bad (so it depends if you want easy-to-read code from using the regexp or two hundred lines of loops and if statements--look at devqt's code for highlighting, for example, it works but it's a mess--whereas my regexp highlighter practice was maybe twenty lines, and if there was something wrong with how it was reading it I could just edit the string holding the pattern instead of weaving through all the branches) but for real-time highlighting of keyboard input the lexical analyzation is definitely the way to go. You know, it's funny. Such an awful lot of work for what seems like such a trivial feature of the IDE. You practically have to write half a C++ compiler just to pretty print the code. I'm having similar issues with another project I am working on in my spare time. It is a frontend for editing qmake files. It is no problem when the project file is straightforward, but now I have two lexical analyzers to make. One is to reimplement my syntax highlighter for the scripting style used by qmake (one of the tabs lets you edit the raw file instead of using the interface), the other is to handle all of the nesting and scopes within the project file and display the hierarchies correctly in the frontend's widgets. The first is much much easier (for me, at least) than the second.
-
Re: [DevQt] New versions, feature requests and bug reports
Two bugfixes to your latest version. The first is mentioned already by wysota (but I hadn't read his message so it took me 30 minutes to figure out with gdb why I was getting core dumps on startup before realizing you were trying to run setupMenu() on Editor before initializing it). The second fixes the problem that when you close a file that has been opened, the tab disappears but not the source code. When no files are open the Editor widget shouldn't display anything. Below are my modified lines.
--devgui.cpp---line 51--DevGUI() constructor--
Code:
Editor->setWindowState(Qt::WindowMaximized);
Editor->setContextMenuPolicy(Qt::CustomContextMenu);
setupMenu();
setupFileActions();
setupEditActions();
//setupTextActions();
setupCompiler();
setupExplorer();
--devgui.cpp---line 602--DevGUI::close()--
Code:
//Your old function which removes the tab, but not the actual page Editor->removeTab(pos);
delete Editor->widget(pos);
I'll let you know if I see anything else.
-
Re: [DevQt] New versions, feature requests and bug reports
thanks for your interest! I'll try to fix them all! :D
elcuco's kindness has no limits : he's gonna open a project on SF.net or Berlios because, for some reasons I can't do it on my own. That'll give us a better framework to speed up the developpement process.
I've no code to post today but I'm working on the project handling, damn progress : scopes are now understood and functions skipped
as soon as I'll get the project working I'll start compilation process stuff and post a version with as many fixes as possible.
-
Re: new highlighter
Quote:
Originally Posted by michel
It depends. I also made a syntax highlighter using regexp strings for practice (I don't know regexp very well and needed an excuse to learn it) with a text editor I made in Qt3 when I first began to learn the library, and when typing code in manually or opening from a file there is no noticable difference in human time from the one I made using while loops and if-else statements. The only trouble is if you be evil and copy a large amount of code into the clipboard and then hold down the Ctrl+V keys for about ten seconds to paste it all over and over again a lot. Then the program freezes for about fifteen seconds before displaying anything :DDDD. Probably for formatting a large input filestream the difference isn't so bad (so it depends if you want easy-to-read code from using the regexp or two hundred lines of loops and if statements--look at devqt's code for highlighting, for example, it works but it's a mess--whereas my regexp highlighter practice was maybe twenty lines, and if there was something wrong with how it was reading it I could just edit the string holding the pattern instead of weaving through all the branches) but for real-time highlighting of keyboard input the lexical analyzation is definitely the way to go. You know, it's funny. Such an awful lot of work for what seems like such a trivial feature of the IDE. You practically have to write half a C++ compiler just to pretty print the code. I'm having similar issues with another project I am working on in my spare time. It is a frontend for editing qmake files. It is no problem when the project file is straightforward, but now I have two lexical analyzers to make. One is to reimplement my syntax highlighter for the scripting style used by qmake (one of the tabs lets you edit the raw file instead of using the interface), the other is to handle all of the nesting and scopes within the project file and display the hierarchies correctly in the frontend's widgets. The first is much much easier (for me, at least) than the second.
Ok, as I'm creating a new editor for C++ codes too, I do a lot of tests between RegExp and Lexical aproachs, let me share here what I discovery:
With RegExp proach what the QSyntaxHinghlighter do is to take every RegExp and see if the actual line matches to it, if match, coloring if not, pass to the next RegExp and check the entire text again, no mather if it founds any parts before.
As you can see, a lexical aproach avoid unnecessary check to the actual text and is that the reason that your code freezes a little when you paste a lot of text, and has more, if you had about 10Kloc to highlight (what is not unusual) if your editor has to repaind the entire screen, the highlight with RegExp will make your editor unusable.
Well, at least to me the beneficies of lexical aproach justify the hard work to implement it! :p
-
Re: [DevQt] New versions, feature requests and bug reports
Quote:
Originally Posted by fullmetalcoder
thanks for your interest! I'll try to fix them all! :D
elcuco's kindness has no limits : he's gonna open a project on SF.net or Berlios because, for some reasons I can't do it on my own. That'll give us a better framework to speed up the developpement process.
I've no code to post today but I'm working on the project handling, damn progress : scopes are now understood and functions skipped
as soon as I'll get the project working I'll start compilation process stuff and post a version with as many fixes as possible.
Will your new version fix the syntax highlighter yet? I was going to post a modification to devhighlighter.cpp because the one from your latest zip file doesn't handle backslashes in preprocessor directives, but of course, now that it does handle them, the way your loops are set up it is not easy to check for a line that has both a backslash and a comment. It's rather simple. In your if loop for c=='#' just do an indexOf search for "\\" and if found set the state to preprocessor, and in your switch (previousBlockState()) - case statement at the top of the function put something like
Code:
case preprocessor :
i = text.indexOf("\\");
if (i != -1)
{
setFormat(0, i+1, fmts[preprocessor]);
return preprocessor;
}
setFormat(0, len, fmts[preprocessor]);
return normal;
I haven't done a lot of error checking but it seems to work fine for things like
Code:
#define THIS "that" \
"plus this" \
"plus that"
int main(){ printf(THIS); }....blahblah...
In your old version only the first line would be green whereas all three lines which are part of the preprocessing should be.
Don't know if your comments scanner bothers to check for /* */ comments after the backslash, but it should be easy to implement. And you don't have to worry about the C++ style // comments after a backslash, because afaik they aren't legal to use in this syntax anyway and the compiler will complain about it.
ok going to bed. bbl
-
Re: [DevQt] New versions, feature requests and bug reports
Not really a new release... but...
I have opened a site on berlios for this project. FMC and a few others already have write access to the SVN.
I would like to try the berlios forums for development communication, but IMHO, they are just lame. We will try it for a while, and if it does not work, we can still abuse this site (thanks!) :)
The site for this project is available at:
http://devqt.berlios.de/
We already have some downloads, check the download link on that site.
The development forum is at:
http://developer.berlios.de/forum/fo...forum_id=18460
Thanks for all that have been helping us with this project!
-
Re: [DevQt] New versions, feature requests and bug reports
I downloarded the 0.1.0.zip and compiled.
This is the result on my linux qt 4.1 machine when trying to run it.
Code:
$ ./devqt
Segmentation fault
Dang!
-
Re: [DevQt] New versions, feature requests and bug reports
Quote:
Originally Posted by Morea
I downloarded the 0.1.0.zip and compiled.
This is the result on my linux qt 4.1 machine when trying to run it.
Code:
$ ./devqt
Segmentation fault
Dang!
Wysota has already explained how to get rid of that AFAIK. :rolleyes:
The embarrassing stuff pointed out by that stupid bug is that Qt doesn't behave the same on every system : on my Athlon 1,4GHz, 512Mb SDRAM, GeForce 2 MX400, Win ME (I know my config sucks but that's not the point!) no bug occured.
Anyway it has been removed but, I'm damn sorry, I can't post the last version here because the zipfile is 150kb while the limits set by the admins is 100kb!!! :(
So, if you want to keep updated you've got to visit http://devqt.berlios.de
Due to my 56kb internet connection and the troubles I get building an SVN client I can't post the code on my own so you also have to wait for elcuco doing it (I seny him the source a few minutes ago...)
-
Re: [DevQt] New versions, feature requests and bug reports
Quote:
Originally Posted by fullmetalcoder
The embarrassing stuff pointed out by that stupid bug is that Qt doesn't behave the same on every system : on my Athlon 1,4GHz, 512Mb SDRAM, GeForce 2 MX400, Win ME (I know my config sucks but that's not the point!) no bug occured.
It's not Qt. It's C++ and I can't believe you were able to dereference a random pointer on your system everytime you started the application :)
Quote:
Anyway it has been removed but, I'm damn sorry, I can't post the last version here because the zipfile is 150kb while the limits set by the admins is 100kb!!! :(
AFAIK the limit was changed to 300kB. Besides, you can always send a patch (diff) or only upload modified files. Using some better compressor than zip or reducing the size of icons is also an option.
-
1 Attachment(s)
Re: [DevQt] New versions, feature requests and bug reports
Quote:
Originally Posted by wysota
It's not Qt. It's C++ and I can't believe you were able to dereference a random pointer on your system everytime you started the application :)
As weird as it can seem it worked! And it comes from Qt because it's Qt that used the non initialized pointer, not my app!!!
Quote:
Originally Posted by wysota
AFAIK the limit was changed to 300kB. Besides, you can always send a patch (diff) or only upload modified files. Using some better compressor than zip or reducing the size of icons is also an option.
That's right damn it!!! :D (sorry, private joke...)
I didn't noticed, thanks a lot!!!
What about a better compressor? I tried .rar but it only saved a few kb and not everybody has a decompressor for .rar files
BTW if you know a better, and as universal, compressor please tell me!
-
Re: [DevQt] New versions, feature requests and bug reports
What about putting new versions on berlios.de more often?
Then posting links from here to berlios?
-
Re: [DevQt] New versions, feature requests and bug reports
Well 0.2.1 (or 0.2.0 as the app called it self, or 0 as the resulting file is called:D ) looks promising. :)
One question though, will I be able to compile a single C++ file and run it, like a hello world program or should everything be in projects?
I will try to use it more as soon as I can change the font size in the editing window to something that is 400% larger. (on my linux box)