Recent

Author Topic: [Solved]Open Project fails miserably in Lazarus 3.0, QT5...KIO  (Read 5264 times)

cdbc

  • Hero Member
  • *****
  • Posts: 1496
    • http://www.cdbc.dk
Re: Open Project fails miserably in Lazarus 3.0, QT5...
« Reply #15 on: January 31, 2024, 02:58:05 pm »
Hi
PCLinuxOS fully updated, x11, kwin, kde - qt 5.15.6, healthy system.
@Juha:
Quote
@cdbc, I don't understand how <OtherUnitFiles... etc./> setting in a project info file (*.lpi) could affect KDE's KIO system. Do you mean you cannot change it because of the KIO problem?
I mean: I have an existing project latest touched by 2.2.6 where everything is fine, in 'project options'->'paths'->'other unit files' the different unit locations are listed properly. (btw. I have both installed side by side, 2.2.6 & 3.0)
Then I open the project in 3.0: 'project options'->'open project'->[KIO error].
Then I do: 'project options'->'close project'->'small open project form'->'open project'-> project opens, but cannot compile, because it can't find used units. Then 'project options'->'paths'->'other unit files' = '' ->[...]->KIO error.
I had a look at the lpi file before in 'kate', it was fine... and after 'kio-choke' in 3.0 the section mentioned is simply missing.
When I get a project compiled in 3.0 and run it, there are just the problems reported => slow(>3 secs) and cpu-usage-peak, but no KIO error.
I've removed all samba & nfs connections, but the problem persists in lazarus...
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

cdbc

  • Hero Member
  • *****
  • Posts: 1496
    • http://www.cdbc.dk
Re: Open Project fails miserably in Lazarus 3.0, QT5...
« Reply #16 on: January 31, 2024, 03:19:40 pm »
Hi
In the attached screenshot, one can see some anomalies, with regard to text - codepage  - utf16 - utf8 or something, tried to make an arrow  :D
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

dsiders

  • Hero Member
  • *****
  • Posts: 1206
Re: Open Project fails miserably in Lazarus 3.0, QT5...
« Reply #17 on: January 31, 2024, 03:34:15 pm »
Hi
In the attached screenshot, one can see some anomalies, with regard to text - codepage  - utf16 - utf8 or something, tried to make an arrow  :D
Regards Benny

The font does not have glyphs for '(' or ')'? Really? They appear in the window title bar...
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

zeljko

  • Hero Member
  • *****
  • Posts: 1632
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Open Project fails miserably in Lazarus 3.0, QT5...
« Reply #18 on: January 31, 2024, 08:26:11 pm »
Yeah, that's pretty wierd  :o

dbannon

  • Hero Member
  • *****
  • Posts: 2993
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Open Project fails miserably in Lazarus 3.0, QT5...
« Reply #19 on: January 31, 2024, 09:12:05 pm »
dbannon, windows postitions are about wayland implementation in qt5, that should be much better with Qt6 wayland.
KIO error raises only under KDE plasma, not under Gnome, Cinnamon etc.

Yes, zeliko, I agree with both points. And I don't use KDE myself. And my own app, tomboy-ng seems to behave quite well under KDE using Qt5.

All the same, KDE is widely used, we cannot just say it does not work well under KDE. And if these problems start appearing in apps made using LCLqt5, its going to be serious.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4508
  • I like bugs.
Re: Open Project fails miserably in Lazarus 3.0, QT5...
« Reply #20 on: February 01, 2024, 10:15:12 am »
I mean: I have an existing project latest touched by 2.2.6 where everything is fine, in 'project options'->'paths'->'other unit files' the different unit locations are listed properly. (btw. I have both installed side by side, 2.2.6 & 3.0)
Then I open the project in 3.0: 'project options'->'open project'->[KIO error].
Then I do: 'project options'->'close project'->'small open project form'->'open project'-> project opens, but cannot compile, because it can't find used units. Then 'project options'->'paths'->'other unit files' = '' ->[...]->KIO error.
I had a look at the lpi file before in 'kate', it was fine... and after 'kio-choke' in 3.0 the section mentioned is simply missing.
It means the project was saved at some point with an empty "other unit files" value. Strange. It should not be saved when you just open it.
Or, did the IDE ask if you want to save a changed project and then you clicked "Yes"?
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

cdbc

  • Hero Member
  • *****
  • Posts: 1496
    • http://www.cdbc.dk
Re: Open Project fails miserably in Lazarus 3.0, QT5...
« Reply #21 on: February 01, 2024, 12:20:41 pm »
Hi Juha
Nope, no asking, no saving; it just chokes on the kio and you can click cancel.
You cannot use any dialog to fill in values in the IDE and in addition, the clipboard is broken, if I copy text from, say a backup lpi to insert in the 'other units' field, I get nothing; I have to type in the unit-locations by hand, then I can work with and compile the project?!? "Here be dragons" springs to mind ...or "Gremlins". If I get this far, compilation that is, the application runs fine and the dialogs, if any, work fine, looking different but ok.fine...
It's like the IDE just throws in a blank lpi...
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

Josh

  • Hero Member
  • *****
  • Posts: 1320
Re: Open Project fails miserably in Lazarus 3.0, QT5...
« Reply #22 on: February 01, 2024, 12:54:50 pm »
just an idea, probably will not doing anything.

in 2.2.6 version can you set project compatibilty to maximum, then save project, and then try to open in laz 3.99, does it help?

The best way to get accurate information on the forum is to post something wrong and wait for corrections.

cdbc

  • Hero Member
  • *****
  • Posts: 1496
    • http://www.cdbc.dk
Re: Open Project fails miserably in Lazarus 3.0, QT5...
« Reply #23 on: February 01, 2024, 02:37:29 pm »
Hi
@Josh: It was a good idea, but sadly... No Dice!
It's like the IDE only reads the lpr file... No meta-data.
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

cdbc

  • Hero Member
  • *****
  • Posts: 1496
    • http://www.cdbc.dk
Re: Open Project fails miserably in Lazarus 3.0, QT5...
« Reply #24 on: February 01, 2024, 02:42:12 pm »
Hi
@zeljko & @Juha: Is it possible to swap 'dialogs.pp'? e.g.: take the one in 2.2.6 and put it in 3.0, since the 3.0 is in a writable directory...?
And the recompile Lazarus?!?
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4508
  • I like bugs.
Re: Open Project fails miserably in Lazarus 3.0, QT5...
« Reply #25 on: February 01, 2024, 02:55:55 pm »
@zeljko & @Juha: Is it possible to swap 'dialogs.pp'? e.g.: take the one in 2.2.6 and put it in 3.0, since the 3.0 is in a writable directory...?
And the recompile Lazarus?!?
I don't know. You can try. :)
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

zeljko

  • Hero Member
  • *****
  • Posts: 1632
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Open Project fails miserably in Lazarus 3.0, QT5...
« Reply #26 on: February 01, 2024, 06:35:44 pm »
Hi
@zeljko & @Juha: Is it possible to swap 'dialogs.pp'? e.g.: take the one in 2.2.6 and put it in 3.0, since the 3.0 is in a writable directory...?
And the recompile Lazarus?!?
Regards Benny

Don't do that. Open lcl/interfaces/qt5/qtwsdialogs and inside
TQtWSFileDialog.CreateHandle() change:

  QFileDialog_setOption(QFileDialogH(FileDialog.Widget),
    QFileDialogDontUseNativeDialog, False);

to

  QFileDialog_setOption(QFileDialogH(FileDialog.Widget),
    QFileDialogDontUseNativeDialog, True);

Do same thing inside TQtWSSelectDirectoryDialog.CreateHandle(), set bool to True.
Now rebuild and it'll work ok with normal Qt5 dialogs.


zeljko

  • Hero Member
  • *****
  • Posts: 1632
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Open Project fails miserably in Lazarus 3.0, QT5...
« Reply #27 on: February 01, 2024, 06:39:38 pm »
I've lost about 3hrs and could not find anything in Lazarus or LCL what can trigger KIO error.  It's just random and just inside IDE.
Used QT_DEBUG_PLUGINS=1 ./lazarus to check if there's something wrong in some of plugins, found exactly nothing.
Googling about such problem give me nothing .... so if anyone have any idea what's the problem here pls write.
Important thing: KIO error is written in console imediatelly after creation of QFileDialog handle, so later procs like UpdateProperties() etc does not have anything with this error.

zeljko

  • Hero Member
  • *****
  • Posts: 1632
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Open Project fails miserably in Lazarus 3.0, QT5...
« Reply #28 on: February 01, 2024, 07:29:04 pm »
I've found where is problem !
IDE options -> Window

Uncheck all checkboxes which caption starts with "IDE title...".
Now save, try to open Open or Save dialog from IDE under KDE.
It is something about changing x11 window title (but that's what Qt does, not LCL)   >:(
There's even bug somewhere which was opened by Alexey Torgashin about changing window titles under x11.

zeljko

  • Hero Member
  • *****
  • Posts: 1632
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Open Project fails miserably in Lazarus 3.0, QT5...
« Reply #29 on: February 01, 2024, 08:05:29 pm »
Actually unchecking "IDE title shows project directory" fixes problem. That have something to do with KDE and it's file dialogs which uses title of app to check if it contains valid filename or path  :(

 

TinyPortal © 2005-2018