On 2009-02-26 14:34:17 +0100, Martin Dyde <[email protected]> said:
> Thanks, Trenton.
>
>> - Major bug: enabled/disabled states corrupted for sub-menu items of
>> app's main menu bar. Sometimes all items show as enabled, sometimes
>> none are enabled, sometimes arbitrary items seem to be
>> enabled/disabled. Obviously this is potentially a show-stopper, since
>> users either can't do things that they need to do, or can cause crashes
>> etc. by accessing menu functions that they shouldn't.
>> Hmm... I haven't seen this. Do you have an example that reproduces
>> this? Or you can point me to the original mail as well.
> Here's a means to reproduce it
> (qt-all-commercial-src-4.5.0-snapshot-20090224.tar.gz used, built with
> macx-g++ -arch x86_64):
>
> Open $QTDIR/src/examples/mainwindows/application/mainwindow.cpp. Find
> the MainWindow::createActions() fn and edit the start of it to add the
> following line:
>
> void MainWindow::createActions()
> {
> newAct = new QAction(QIcon(":/images/new.png"), tr("&New"), this);
> newAct->setShortcuts(QKeySequence::New);
> newAct->setStatusTip(tr("Create a new file"));
> newAct->setEnabled(false); // ADD THIS LINE
> ...
>
> Compile and run. Click on the File menu. The 'New' item should be
> disabled, but it isn't. Our application is exhibiting the same problem
> under Qt/Cocoa (but works fine on Qt/4.4/Carbon), in that all menu
> items show as enabled when the application launches, even those for
> which QAction::setEnabled(false) has been called.
>
> Now select File | Open from the menu. The file open dlg correctly
> appears. Press the Escape key to dismiss it. Without touching any
> other keys or clicking on any other application, click on the File
> top-level menu again. All items are now incorrectly disabled, even
> though a modal dlg is no longer open.
>
> Press Apple key + Tab twice to switch to any other application and
> back. Now click on the File menu again. All menu items will now
> appear enabled, even the File | New item, which should be disabled.
>
> Please let me know if that's suffcient. I can dig out my original
> mails if needed, but I think the above test case probably shows the
> problem more concisely.
Thanks, Martin, this shows off problem concisly. I'll create a task and
see about fixing it. I'm afraid it won't make it into 4.5.0 at this
stage though, but I'll make sure to get it fixed for 4.5.x (x hopefully
being one ;-).
Thanks again,
-- Trenton
_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback