Essentially this is a Qt/C++ variant of the question here :
How do I programmatically locate my Google Drive folder using C#?
What I have tried so far is given below
QString gDrivePath = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
gDrivePath += "\\Google\\Drive\\sync_config.db";
bool result = QFile::copy(gDrivePath, "gdrive.db");
QFile gdrivefile("gdrive.db");
if(!gdrivefile.open(QIODevice::ReadOnly | QIODevice::Text)) {
QMessageBox::information(0, "Google Drive path read error", gdrivefile.errorString());
}
QTextStream gin(&gdrivefile);
gin.setCodec("ASCII");
while(!gin.atEnd()) {
qDebug() << gin.readLine().toLocal8Bit();
}
gdrivefile.close();
Like given in the question linked to above, the code makes a copy of the db file and tries to read it line by line. The only problem being that it is skipping a chunk of data from the file which contains the required "local_sync_root_pathvalue"
Any ideas ?