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

QTemporaryFile: file not being created in Qt 5.11

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 5.11.3, 5.12.6
    • Core: I/O
    • None
    • Linux/X11

    Description

      We have some tests implemented which use QTemporaryFile. We've found that some tests fail when upgrading from Qt 5.9.8 to Qt 5.11.3, if QTemporaryFile#fileName() doesn't get called after calling QTemporaryFile#open(). We use Xubuntu 16.04 for development.

      Basically, this is the simplest test case:

      TEST(tempFileTest, test1) 
      { 
        QTemporaryFile temp; 
        ASSERT_TRUE(temp.open()); 
        ASSERT_TRUE(temp.exists()); //Fails here 
      } 
      TEST(tempFileTest, test2) 
      { 
        QTemporaryFile temp; 
        ASSERT_TRUE(temp.open()); 
        temp.fileName(); 
        ASSERT_TRUE(temp.exists()); //Passes 
      }

      Attachments

        Issue Links

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

          Activity

            People

              thiago Thiago Macieira
              aritz aritz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes