Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-10695

OSX QMessageBox uses Windows icons when setDesktopSettingsAware is false [regression]

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • Some future release
    • 4.6.2, 4.6.3
    • GUI: Look'n'Feel
    • None
    • OSX
    • macOS

    Description

      On OSX, I expect the following code to display a message box with the current application's icon (like it used to in 4.4.3).
      However the following code displays a windows icon when compiled on OSX with Qt 4.6.2.

      #include <QApplication>
      #include <QMessageBox>
      
      int main(int argc, char **argv)
      {
      QApplication::setDesktopSettingsAware(false);
      QApplication app(argc, argv);
      
      QMessageBox::warning( 0, "test", "test" );
      
      return 0;
      }
      
      

      This is a bug in QCommonStyle. I fixed it with the following change to qcommonstyle.cpp line 5660:
      -if (QApplication::desktopSettingsAware() ) {
      +if (QApplication::desktopSettingsAware() || inherits("QMacStyle") ) {

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            bachewii Jens
            xcm Martin Petersson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes