Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTemporaryDir reasons for not valid/fail to create?
Forum Updated to NodeBB v4.3 + New Features

QTemporaryDir reasons for not valid/fail to create?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 419 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pmh4514
    wrote on last edited by pmh4514
    #1

    Using Qt 5.12 MSVC 2015 on Windows10 Pro 64bit.

    I've been debugging an intermittent issue in my app.

    99.9% of the time it seems, QTemporaryDir successfully creates a directory in the user's temp folder (c:\users\user\AppData\local\Temp<unique name> on construction.

    When my failure hits, it's because it doesn't.. I've found now the isValid() check, which I will begin using, but what if isValid returns false? Why did it fail? Do I simply make a new QTemporaryDir construction and try to use that? What are some reasons why the temporary dir would fail to create on an intermittent basis? (ie. not a permissions or lack of disc space problem.)

    Thanks

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You can use the errorString method to get the reason of the failure.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved