[Development] Modify QLibraryInfo to support any default location of qt.conf

Maximilian Hrabowski hrabowski at clausmark.com
Thu Jan 28 10:47:21 CET 2016


our application has an auto-update feature that allows to download and install a new version of the application. The update package includes everything, also Qt. The only permanent files are a launcher executable and a config file that points to the real application folder. The folder which contains the launcher is usually not writable by the user so the this application folder can be located anywhere on the system. The primary target platform is windows.

Our application uses qt plugins, qt webengine etc. so we need to rely on a proper qt.conf file so any plugins and especially the QWebEngineProcess.exe is found.

Since on Windows qt.conf is looked up in
1. :/qt/etc/qt.conf
2. applicationDirPath()+/qt.conf
it is not found since the applicationDirPath() points to the folder of the launcher.

What we need is a way to look up the qt.conf at another location as well. Of course i could patch Qt myself to do what i like but i target a solution that would qualify to become part of qt and i would be willing to contribute this feature.

However, before do this i would like to discuss how this could be achieved and if there is any chance this feature could be accepted in qt.

I thought about the following ways (order gives my personal opinion’s priority):

1. Add a new public API: static void QLibraryInfo::setQtConfFilePath( const QString& filePath) which defaults to ":/qt/etc/qt.conf“ and is used in QSettings *QLibraryInfoPrivate::findConfiguration() instead of the hard-coded path.
2. Also lookup qt.conf in all of QLibraryInfo::libraryPaths() (this is how we got the plugins found)
3. introduce an environment variable that points to the qt.conf similar to the one of QWebEngineProcess.exe

Please comment.


Maximilian Hrabowski <hrabowski at clausmark.com>
Clausmark GmbH
Tel: +49 (721) 98963941
Clausmark - The creators of BeeCore and Bee4IT

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20160128/6b36d2ea/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4293 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20160128/6b36d2ea/attachment.bin>

More information about the Development mailing list