Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I also found this very tricky, and remember it took a long while to work out. Eventually in desperation I wrote this handy function:</p> <pre><code>#include &lt;QDebug&gt; #include &lt;QDir&gt; #include &lt;QList&gt; #include &lt;QUrl&gt; #include &lt;sstream&gt; using namespace bb::data; using namespace std; void listContents(QDir &amp;src, int depth=0) { // You app's dirs can be symlinked into libraries, so the depth can go very deep. // We limit it. if (3&lt;depth) return; QListIterator&lt;QFileInfo&gt; entries(src.entryInfoList()); std::stringstream spaces; // If you want to indent files by depth // for (int i=0; i&lt;depth; i++) { // spaces &lt;&lt; ' '; // } while (entries.hasNext()) { QFileInfo entry = entries.next(); QString canpath = entry.canonicalFilePath(); QString relpath = src.relativeFilePath(entry.fileName()); if ((relpath == ".") || (relpath=="..")) { continue; } if (entry.isDir()) { QDir subdir(canpath); if (!(subdir==src)) { listContents(subdir, depth+1); } } else { qDebug() &lt;&lt; spaces.str().c_str() &lt;&lt; canpath.toUtf8().data(); } } } </code></pre> <p>To use it, you must first strip the <code>/data</code> directory from your <code>QDir::homePath()</code>:</p> <pre><code>QString appFolder(QDir::homePath()); qDebug() &lt;&lt; "appFolder = " &lt;&lt; appFolder; appFolder.chop(4); QDir listSource = appFolder + "app/native"; listContents(listSource); </code></pre> <p>Thereafter, just check the logs to find the proper path to your database file.</p> <p>Note though that, if you want to write to the database, you should copy it from the <code>app/native</code> directory to the <code>data</code> directory.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload