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

PLSParser fails if strings are localized

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.3.1
    • 5.3.0
    • Multimedia
    • None
    • 364258abfcc438f79908e8c47fd0fd68cfecee36

      This concerns the file src/multimedia/playback/playlistfileparser.cpp in qtmultimedia repository. The affected class is PLSParser and the relevant lines are 310-312 which contain:

      m_fileName = QString(tr("File%1")).arg(count);
      m_titleName = QString(tr("Title%1")).arg(count);
      m_lengthName = QString(tr("Length%1")).arg(count);

      The strings on those lines are translatable and they have been translated to at least some languages. But if I read the code correctly the variables m_fileName etc. are used to parse a PLS file which as far as I understand is NOT going to contain translated strings. Instead PLS files always contain lines starting with "File", "Title" and "Length" regardless of the user's locale.

      Effectively translating those strings breaks the PLSParser.

      I suggest removing the tr() functions from those lines in the code.

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

            ylopes Yoann Lopes
            gormio Aki Koskinen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes