Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
137 user(s) are online (124 user(s) are browsing Forums)

Members: 0
Guests: 137

more...

Support us!

Headlines

 
  Register To Post  

QScintilla2
Amigans Defender
Amigans Defender


See User information
I have a weird problem with my port of QScintilla2:

Resized Image

The first line gets repeated all the way down the editor. I'm not sure about the odd placement of the 2nd line there, that happened randomly whilst I was doing something else. Some attempts to highlight sometimes show the correct line, sometimes don't. Scrolling down just causes the new top line to repeat down the page.

It seems unlikely that such a bug would be present in the library, and all I've done is replaced every occurance of Point, Window and Menu with QSPoint, QSWindow and QSMenu (to avoid clashes with graphics and intuition libraries).

It also isn't an application problem, as the example application, JuffEd and QSciTE all exhibit exactly the same behaviour. JuffEd and QSciTE show line numbers icons down the side and those seem to be OK, however I'm not sure if these are part of QScintilla or an addition by the application.

So I'm left with thinking it might be an obscure bug in Qt's text routines, but as normal text editing is fine I am very confused.

QScintilla is here if anybody wants to examine it:
http://homepage.ntlworld.com/cdyoung/tmp/qscintilla.lha
Copy the library out of Qt4 and into Qt:lib
Run the example from Qt4-example

Go to top
Re: QScintilla2
Just can't stay away
Just can't stay away


See User information
@chris

So have you actually succeed in fixing the other issue with CMake??

I will take a look at this problem as soon as I get home. Looks very mysterious indeed...

EDIT: Also another thought: The problem you reported with hanging file requesters from the conversion program, did they disappear with the new release?? Very interested to see, if I actually managed to fix the problem!

Go to top
Re: QScintilla2
Amigans Defender
Amigans Defender


See User information
Quote:

alfkil wrote:

So have you actually succeed in fixing the other issue with CMake??


No, I gave up and cross-compiled it

Quote:

I will take a look at this problem as soon as I get home. Looks very mysterious indeed...


It probably doesn't help that QScintilla is built on top of Scintilla - finding anything in the code is a nightmare, I haven't yet been able to locate where it prints the text on the screen. The only cause I can think of is that it isn't progressing through the lines properly when it puts them on screen (or some off-screen buffer not updating, but that seems unlikely given the symptoms), but I don't know why that would be!

Quote:

EDIT: Also another thought: The problem you reported with hanging file requesters from the conversion program, did they disappear with the new release?? Very interested to see, if I actually managed to fix the problem!


When I was playing around with JuffEd the freezing requesters were happening very frequently, so it isn't fixed, unfortunately.

Go to top
Re: QScintilla2
Just can't stay away
Just can't stay away


See User information
Quote:
When I was playing around with JuffEd the freezing requesters were happening very frequently, so it isn't fixed, unfortunately.


Damn... I was so sure I found the problem... Hardly ever happens here, so this is also a very big mystery!

Go to top
Re: QScintilla2
Just can't stay away
Just can't stay away


See User information
@chris

I have taken a quick look, and first of all I don't get quite the same behavior as you with the test application. I type in a line, and then when I type in another line, it is replaced by the first line when I hit enter.

I don't know how scintilla is supposed to work, so I will have to study the documentation a bit before I come up with any more comments...

Go to top
Re: QScintilla2
Amigans Defender
Amigans Defender


See User information
@alfkil

Yes, that's what I see here - but if you load a file it repeats all the way down as per my screenshot.

Go to top
Re: QScintilla2
Just can't stay away
Just can't stay away


See User information
@chris

In Qt4/qscintilla.pro try and replace the line

DEFINES = blabla

with

DEFINES += blabla

Delete all your object files (and moc files) and run qmake -> gmake.

See if that helps.

EDIT: Nah, on second thought, don't bother. I just tried, and it didn't work... Sorry.


Edited by alfkil on 2011/11/22 16:50:01
Go to top
Re: QScintilla2
Just can't stay away
Just can't stay away


See User information
@chris

Hehe, I didn't exactly solve the problem, but I found a cure:

In "scr/Editor.cpp" go to line 118 and replace the two times "true" with "false", like this:

bufferedDraw false;
twoPhaseDraw false;


This probably slows down the screen update, but at least it works.

Go to top
Re: QScintilla2
Amigans Defender
Amigans Defender


See User information
So it does! Thank you!

There might be a bug in Qt's redrawing functions somewhere then?

Go to top
Re: QScintilla2
Just can't stay away
Just can't stay away


See User information
@chris

Possibly. But the scintilla code is a little too complex that I want to get deep into it right now. Will take up the thread later if need be.

Go to top
Re: QScintilla2
Amigans Defender
Amigans Defender


See User information
Quote:

Possibly. But the scintilla code is a little too complex that I want to get deep into it right now.


No kidding, I don't blame you!

Go to top
Re: QScintilla2
Amigans Defender
Amigans Defender


See User information
I've been playing around with QScintilla, JuffEd and QSciTE a bit. JuffEd is quite a nice editor, but the overhead of Qt makes it a bit too slow for my SAM, I'm sure it will be fine on an X1000 though (and hopefully OK when we get OpenGL).

When I choose "Save as" I get the original Qt requester, rather than the replacement ASL? I guess this could be intentional because it is asking which format I want to save in, but it was unexpected.

QSciTE is slower than JuffEd, I won't be bothering to inflict this on anybody, however I did get a borderless window when selecting the "Text Display" menu item:

Resized Image

Go to top
Re: QScintilla2
Just can't stay away
Just can't stay away


See User information
@Chris

About the non-native file dialog: I have only made it so that the static members QFileDIalog::getOpenFileName() etc are redirected to native functions. If a program uses QFileDialog manually, it is very hard to replace it.

About the borderless window: This is probably because the widget type is one of the types that gets a borderless window eg. menu, splash or the like. I would have to look at it to see how to determine the non-borderlessness of this particular instance.

All in all very good work! It is nice to see Qt being used for real after all .

EDIT: Part of why it is so slow is probably the hack I did to solve the problems with QScintilla. Once a proper solution comes up, it should be much better.

Go to top
Re: QScintilla2
Amigans Defender
Amigans Defender


See User information
there are a lot of interesting software made with QT.. i would help you also to fix all QT problems but as i told you i cannot compile it.. :(

i'm really tired...
Go to top
Re: QScintilla2
Just can't stay away
Just can't stay away


See User information
@afxgroup

Please describe to me the problems that arise, when you try to cross compile, and I might be able to walk you through it.

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project