bugGNU Octave - Bugs: bug #49643, questdlg returns incorrect string...

 
 

bug #49643: questdlg returns incorrect string with ampersand embedded in it (Qt5.4 only)

Submitted by:  Rik <rik5>
Submitted on:  Fri 18 Nov 2016 02:27:12 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Regression
Status: InvalidAssigned to: None
Originator Name: Open/Closed: Closed
Release: 4.2.0Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Fri 18 Nov 2016 11:28:01 PM UTC, comment #8:

I'm running 5.4.2. I'm willing to say this is a Qt bug. The report I mentioned says that they were having trouble with both 5.4.1 and 5.4.2 which coincides with my experience. I'm going to mark this as invalid and close.

Rik <rik5>
Project Administrator
Fri 18 Nov 2016 11:00:29 PM UTC, comment #7:

Also, I am building with Qt 5.6.1, and I don't see these extraneous ampersand characters in the example you posted here. Maybe it was a regression in an earlier version of Qt 5?

Mike Miller <mtmiller>
Project Administrator
Fri 18 Nov 2016 10:57:59 PM UTC, comment #6:

Currently, if you pass in a string containing a double ampersand, e.g. "This && That", Qt represents it as a single ampersand instead of as an escape designating the shortcut key for the button.

I guess if we want to be Matlab compatible we have to escape ampersands before passing the string to Qt, and unescape on the way back. The Matlab help pages do not mention any special behavior for ampersands that I can see.

Mike Miller <mtmiller>
Project Administrator
Fri 18 Nov 2016 10:46:47 PM UTC, comment #5:

Apparently it was Qt that changed. Someone running the PyQt bindings ran into exactly the same issue (http://python.6.x6.nabble.com/QPushButton-text-ampersand-issue-td5173745.html). They took the simple option of removing any ampersand in the return text, which might work, but what if someone wants an '&' on their button?

Rik <rik5>
Project Administrator
Fri 18 Nov 2016 04:31:03 PM UTC, comment #4:

Okay, I re-compiled and this works fine with Qt4. I've added the fact that this is a problem only with Qt5 to the title of the bug report.

Rik <rik5>
Project Administrator
Fri 18 Nov 2016 04:28:38 PM UTC, comment #3:

I am using Qt 4.8.6. I open another bug report concerning the button order.

Guillaume <gyom>
Fri 18 Nov 2016 04:16:59 PM UTC, comment #2:

I am testing with Qt5. I will try reverting to Qt4 and see if that fixes the problem.

As for button order, could you file a "Matlab compatibility" bug report about that? It should be easy to fix.

Rik <rik5>
Project Administrator
Fri 18 Nov 2016 03:04:42 PM UTC, comment #1:

I don't reproduce what you are describing: which version of Qt are you using? Do you think it might relate to bug #48214 ?

Also, it displays the buttons in reverse order, ie BTN3 then BTN2 then BTN1, which is different than Matlab's behavior.

I also tried to add '&' as keyboard shortcuts:

and they work in Octave (the next letter is underlined and the corresponding button responds to alt-) but Matlab disregards them and displays '&' in the buttons' name.

Guillaume <gyom>
Fri 18 Nov 2016 02:27:12 PM UTC, original submission:

The questdlg function doesn't return the name of the button pressed. Rather, it returns the name of the button with an ampersand embedded in it. This is a regression from 4.0

Sample code:

The '&' is likely there to represent the keyboard shortcut in Qt. I haven't checked but other dialogs are probably affected.

Rik <rik5>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by gyom (Posted a comment)
  • -unavailable- added by rik5 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 18 Nov 2016 11:28:01 PM UTCrik5StatusConfirmed=>Invalid
      Open/ClosedOpen=>Closed
      Summaryquestdlg returns incorrect string with ampersand embedded in it (Qt5 only)=>questdlg returns incorrect string with ampersand embedded in it (Qt5.4 only)
    Fri 18 Nov 2016 04:31:03 PM UTCrik5StatusNone=>Confirmed
      Summaryquestdlg returns incorrect string with ampersand embedded in it=>questdlg returns incorrect string with ampersand embedded in it (Qt5 only)

    Back to the top


    Powered by Savane 3.1-cleanup1