Changeset 1155 for trunk/src


Ignore:
Timestamp:
Jun 18, 2013, 12:52:07 AM (12 years ago)
Author:
Dmitry A. Kuminov
Message:

core: Cache error string on plugin load failure.

This makes sure that QPluginLoader::load() will give a real error message for cached
failures instead of a default one (which may not match the real failure at all).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/corelib/plugin/qlibrary.cpp

    r1154 r1155  
    635635    reg = settings->value(regkey).toStringList();
    636636#endif
    637     if (reg.count() == 5 && lastModified == reg.at(3) && fileinfo.size() == reg.at(4).toLongLong()) {
     637    if (reg.count() && lastModified == reg.at(3) && fileinfo.size() == reg.at(4).toLongLong()) {
    638638        qt_version = reg.at(0).toUInt(0, 16);
    639639        debug = bool(reg.at(1).toInt());
    640640        key = reg.at(2).toLatin1();
    641641        success = qt_version != 0;
     642
     643
    642644    } else {
    643645#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(Q_OS_SYMBIAN)
     
    705707                qt_version = 0;
    706708                key = "unknown";
     709
     710
    707711            } else {
    708712                success = true;
     
    735739                    << lastModified
    736740                    << QString::number(fileinfo.size());
     741
     742
    737743            settings->setValue(regkey, queried);
    738744        }
Note: See TracChangeset for help on using the changeset viewer.