Bug 281334 - Qt plugins cannot be found.
Summary: Qt plugins cannot be found.
Status: RESOLVED FIXED
Alias: None
Product: kde-windows
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Microsoft Windows Microsoft Windows
: NOR crash
Target Milestone: ---
Assignee: KDE-Windows
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-04 18:21 UTC by Patrick Spendrin
Modified: 2019-10-20 17:48 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Spendrin 2011-09-04 18:21:06 UTC
Version:           unspecified (using KDE 4.7.0) 
OS:                MS Windows

When opening an application which requires Qt plugins (e.g. database plugins) it fails to load those plugins because they are seemingly at the wrong location.

Reproducible: Didn't try

Steps to Reproduce:
open digikam

Actual Results:  
fails due to missing database plugins

Expected Results:  
digikam loads the available plugins

work around: copying the plugins from %KDEROOT%\plugins\sqldrivers\* to %KDEROOT%\bin\sqldrivers will make it work. This is none-sense though, since the plugin destination hasn't changed.
Comment 1 Pau Garcia i Quiles 2011-09-04 18:28:20 UTC
Maybe the parameters to 'configure' when building Qt are different? This can be solved easily by providing a qt.conf

http://doc.qt.nokia.com/latest/qt-conf.html
Comment 2 Patrick Spendrin 2011-09-04 18:57:30 UTC
hm, actually we already provide a qt.conf ... but this might be the issue. Thanks for providing this info.
Comment 3 Ralf Habacker 2011-09-07 07:20:54 UTC
qt sqldrivers are installed into <root>/plugins/sqldrivers, but they are expected at <root>/bin/sqldrivers. 
I encountered this problem also in another project using qt 4.7.0 without a qt.conf
Comment 4 Patrick Spendrin 2011-09-07 08:37:45 UTC
well, I checked it, and qt.conf is at the correct place but isn't read at all (checked with procmon)...
I probably need to read the qt code again when the search for qt.conf is suppressed.
Comment 5 Patrick Spendrin 2011-09-07 08:40:59 UTC
*** Bug 281493 has been marked as a duplicate of this bug. ***
Comment 6 Patrick Spendrin 2011-09-07 09:00:34 UTC
ok, I am pretty sure this is the issue: https://bugreports.qt.nokia.com//browse/QTSDK-630
I will rebuild Qt and update it to 4.7.4 this week, and as a hotfix also change the default path. This won't help in the future though, since this definitely breaks our builds - we need to find out which global static object breaks this.
Comment 7 Ralf Habacker 2011-09-07 09:23:32 UTC
in qlibraryinfo.cpp there is the following code: 

QSettings *QLibraryInfoPrivate::findConfiguration()
{
    QString qtconfig = QLatin1String(":/qt/etc/qt.conf");
#ifdef BOOTSTRAPPING
    if(!QFile::exists(qtconfig))
        qtconfig = qmake_libraryInfoFile();
#else
    if (!QFile::exists(qtconfig) && QCoreApplication::instance()) {


It looks to me, that defining -DBOOTSTRAPPING should reenbale the known behavior.
Comment 8 Patrick Spendrin 2011-09-10 21:50:04 UTC
Ok, I added debug packages to our Qt now, and what I found is this: the first call of the findConfiguration function has this backtrace:

QtCore4!QLibraryInfoPrivate::findConfiguration+0x44
QtCore4!QLibrarySettings::QLibrarySettings+0x2b
QtCore4!qt_library_settings+0x5c
QtCore4!QLibraryInfo::location+0x61
QtCore4!QCoreApplication::libraryPaths+0xa3
QtCore4!QCoreApplication::addLibraryPath+0x65
kdecore!KComponentDataPrivate::lazyInit+0x163
kdecore!KComponentData::dirs+0xc
kdecore!KConfigPrivate::KConfigPrivate+0x12c
kdecore!KConfig::KConfig+0x73
kdecore!KSharedConfig::KSharedConfig+0x4b
kdecore!KSharedConfig::openConfig+0x138
kdecore!KComponentDataPrivate::configInit+0x1b6
kdecore!KComponentDataPrivate::lazyInit+0xfd
kdecore!KComponentData::KComponentData+0x7a
kdeui!KUniqueApplication::Private::initHack+0x43
kdeui!KUniqueApplication::KUniqueApplication+0x3a
skgbasegui!SKGUniqueApplication::SKGUniqueApplication+0x33
skrooge!main+0x787
skrooge!WinMain+0x105

This means especially that the QCoreApplication instance which would be added *after* the initHack of the KUniqueApplication::Private will not be there. This also means that the code for the external qt.conf will never be called.
Comment 9 Christoph Cullmann 2019-10-20 17:48:58 UTC
Qt plugins work fine with current craft build stuff.