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. SQLite plugin: Any way to set the SQLITE_CONFIG_xxx options through the Qt functions?

SQLite plugin: Any way to set the SQLITE_CONFIG_xxx options through the Qt functions?

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 295 Views 2 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.
  • R Online
    R Online
    Robert Hairgrove
    wrote on last edited by
    #1

    I know that I can call the SQLite C function sqlite3_config() directly, but I'm not sure about when it would be safe to do so. The SQLite docs say that this function should only be called "prior to library initialization using sqlite3_initialize() or after shutdown by sqlite3_shutdown()." But I cannot find (using grep -R sqlite3_, etc.) anyplace in the source code for the SQLite plugin where these functions are called.

    Is there any way to retrieve the native SQLite configuration options used by Qt as compiled into the plugin?

    What I am trying to do is to execute a long-running procedure which accesses a regular file database in a worker thread (using QThread and related examples using signal and slot connections for inter-thread communication). My application would make sure that the connection is only added (calling QSqlDatabase::addDatabase() with a unique connection name) once the worker object is moved to the thread and removed again when the worker object is destroyed.

    But perhaps I don't even need any of these options for what I am trying to do?

    1 Reply Last reply
    0
    • R Online
      R Online
      Robert Hairgrove
      wrote on last edited by
      #2

      Everything seems to work OK without doing anything special as long as I am careful not to mix up which connection is used by which thread, so I am marking this as "solved".

      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