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

QFile gives unhelpful error when resource does not exist

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.6.1
    • 5.4.0
    • Core: I/O
    • None
    • b7634f1aa5d91f77151cf92c58d3956e20a4cc6b

    Description

      If I try to load a non-existent Qt resource, e.g.:

      QFile f{":/does/not/exist"};
      f.open(QFile::ReadOnly);
      

      ...it fails, as expected. However, QFile::errorString is set to a not very informative "Unknown error". It would be better if this gave something like "Resource not found" (bonus points for 'resource', but "File not found" would still be an improvement).

      Attachments

        For Gerrit Dashboard: QTBUG-45259
        # Subject Branch Project Status CR V

        Activity

          People

            jefernan Jesus Fernandez
            matthew.woehlke Matthew Woehlke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes