Changeset 1152 for trunk/src/corelib/plugin/qlibrary.cpp
- Timestamp:
- Jun 17, 2013, 11:11:39 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/corelib/plugin/qlibrary.cpp
r1151 r1152 582 582 QByteArray key; 583 583 bool success = false; 584 584 585 585 586 #if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) … … 662 663 if (fileinfo.exists()) 663 664 # endif 664 temporary_load = load_sys(); 665 # if defined(Q_OS_OS2) 666 APIRET rc = load_sys_rc(); 667 temporary_load = rc == NO_ERROR; 668 temporary_failure = rc == ERROR_FILE_NOT_FOUND; 669 # else 670 temporary_load = load_sys(); 671 # endif 665 672 #endif 666 673 } … … 698 705 qt_version = 0; 699 706 key = "unknown"; 700 if (temporary_load)701 unload_sys();702 707 } else { 703 708 success = true; … … 709 714 hTempModule = 0; 710 715 } 711 712 716 } 717 718 719 713 720 #endif 714 721 } … … 718 725 719 726 #ifndef QT_NO_SETTINGS 720 QStringList queried; 721 queried << QString::number(qt_version,16) 722 << QString::number((int)debug) 723 << QLatin1String(key) 724 << lastModified; 725 settings->setValue(regkey, queried); 727 // Loading may fail due to a temporary failure like missing dependencies. 728 // Do not caches such failures since in this case the plugin will be 729 // ignored by Qt forever - even when these failures are fixed later. 730 if (!temporary_failure) { 731 QStringList queried; 732 queried << QString::number(qt_version,16) 733 << QString::number((int)debug) 734 << QLatin1String(key) 735 << lastModified; 736 settings->setValue(regkey, queried); 737 } 726 738 #endif 727 739 } … … 734 746 errorString = QLibrary::tr("The file '%1' is not a valid Qt plugin.").arg(fileName); 735 747 } 748 736 749 return false; 737 750 }
Note:
See TracChangeset
for help on using the changeset viewer.