[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Texmacs-dev] a test for the Qt crash under X11
From: |
Alvaro Tejero Cantero |
Subject: |
Re: [Texmacs-dev] a test for the Qt crash under X11 |
Date: |
Wed, 22 Apr 2009 11:10:51 +0200 |
Hi,
I just compiled menu-test. No crash whatsoever.
With freshest TeXmacs-qt from SVN I don't have problems either. I
didn't try oxygen (I don't have KDE) but I tried several qt themes
accesible through qtconfig-qt4: cleanlooks, motif, windows and
plastique. If there is interest, I can download KDE and try the oxygen
theme.
My system here is Ubuntu 8.10 64 bit.
Linux eco 2.6.27-9-generic #1 SMP Thu Nov 20 22:15:32 UTC 2008 x86_64 GNU/Linux
My QT4 libraries are version 4.4.3, e.g.
ii libqtcore4 4.4.3-0ubuntu1.1
Qt 4 core module
Keep up the good work!
Álvaro.
On Tue, Apr 21, 2009 at 18:08, Norbert Nemec <address@hidden> wrote:
> Thanks, Gubinelli, for your effort!
>
> The test program does *not* crash on my machine independent of the KDE style
> I am using.
>
> TeXmacs continues to crash under Oxygen but not under Plastique.
>
> Greetings,
> Norbert
>
>
>
>
> Gubinelli Massimiliano wrote:
>>
>> Dear list, (only for people familiar to build programs under linux)
>> I'm experimenting to track down the reported crashes of TeXmacs/Qt/X11
>> under linux. I've written a small test program which I would like you to try
>> (especially if you already experienced crashes of TeXmacs/Qt/X11 when
>> opening menus).
>>
>> Instructions to test follows.
>>
>> There are two sources: main.cpp and lazymenu.h. Put these files in a new
>> directory (lets say "menu-test"). Run "qmake -project" and then "qmake"
>> followed by "make".
>> At this point the executable should be present in the directory. Run the
>> program. Open the "Test" menu and try to follow any sequence of nested
>> submenu (the hierachy is infinite). Report to me if it crashes or not.
>>
>> I'm sorry but at the moment I do not have a linux machine to try it
>> myself.
>>
>> Best,
>> Massimiliano
>>
>> PS: sources follows.
>>
>> ------- lazymenu.h -------------------
>>
>> #include <QMenu>
>>
>> class LazyMenu: public QMenu {
>> Q_OBJECT
>> bool forced;
>>
>> public:
>> inline LazyMenu (QString title)
>> : QMenu(title), forced (false) {
>> QObject::connect (this, SIGNAL (aboutToShow ()), this, SLOT (force
>> ()));
>> }
>>
>> public slots:
>> void force();
>> };
>>
>> ------- main.cpp -------------------
>>
>> #include <iostream>
>> #include <QApplication>
>> #include <QMainWindow>
>> #include <QAction>
>> #include <QMenu>
>> #include <QMenuBar>
>>
>> //#include <QtGui>
>>
>> #include "lazymenu.h"
>>
>> using namespace std;
>>
>> void
>> replaceActions (QWidget* dest) {
>> QList<QAction *> list = dest->actions();
>> while (!list.isEmpty()) {
>> QAction* a= list.takeFirst();
>> dest->removeAction (a);
>> delete a;
>> }
>> for (int i = 1; i<=10; i++) {
>> QAction* a= new QAction("Action", dest);
>> a->setMenu(new LazyMenu("A lazy menu"));
>> dest->addAction (a);
>> }
>> }
>>
>>
>> void LazyMenu::force()
>> {
>> if (!forced) {
>> forced = true;
>> cout << "forced\n";
>> replaceActions(this);
>> }
>> }
>>
>>
>> int main(int argc, char *argv[])
>> {
>> QApplication app(argc, argv);
>> QMainWindow window;
>> window.menuBar()->addMenu(new LazyMenu("Test"));
>> window.show();
>> return app.exec();
>> }
>>
>>
>>
>> _______________________________________________
>> Texmacs-dev mailing list
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/texmacs-dev
>>
>
>
>
> _______________________________________________
> Texmacs-dev mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/texmacs-dev
>