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

uic3 -extract generates invalid xpm files

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 4.7.0
    • 4.6.2
    • Tools: Designer
    • None
    • Solaris, Linux
    • c7d39e1335775979d43833d0b7f6c32cef898424

    Description

      If a Qt3 .ui file contained a large image encoded as XPM.GZ, the extraction done by uic3 -extract leads to an xpm file where long lines are splitted over multiple lines. However, no XPM reader out there supports this: gimp breaks on it, xemacs breaks on it, qt3 breaks on it, and qt4 breaks on it too

      The bug is in src/tools/uic/cpp/cppwriteicondata.cpp line 148, the block saying
      if (column++ >= 511 && inQuote)

      { output << "\"\n\""; // be nice with MSVC & Co. column = 1; }

      This might fix compilation with msvc, but at the expense of making the xpm file uneditable by any image editing tool.
      I think this block should be removed (presumably newer versions of MSVC accept long lines?).

      After removing the block, I get valid xpm files.

      Can't provide a testcase in a public bug tracker (customer files), but surely you have a testcase from when this code was added.

      Attachments

        1. QTBUG9207.patch
          7 kB
        2. qtbug9207.tgz
          33 kB
        3. uic.patch
          3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            dfaure David Faure (Private)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes