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

QFile gives unhelpful error when resource does not exist

XMLWordPrintable

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

      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).

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes