equal
deleted
inserted
replaced
657 #ifdef Q_OS_WIN |
657 #ifdef Q_OS_WIN |
658 HMODULE hTempModule = 0; |
658 HMODULE hTempModule = 0; |
659 #endif |
659 #endif |
660 if (!pHnd) { |
660 if (!pHnd) { |
661 #ifdef Q_OS_WIN |
661 #ifdef Q_OS_WIN |
|
662 //avoid 'Bad Image' message box |
|
663 UINT oldmode = SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX); |
662 hTempModule = ::LoadLibraryEx((wchar_t*)QDir::toNativeSeparators(fileName).utf16(), 0, DONT_RESOLVE_DLL_REFERENCES); |
664 hTempModule = ::LoadLibraryEx((wchar_t*)QDir::toNativeSeparators(fileName).utf16(), 0, DONT_RESOLVE_DLL_REFERENCES); |
|
665 SetErrorMode(oldmode); |
663 #else |
666 #else |
664 # if defined(Q_OS_SYMBIAN) |
667 # if defined(Q_OS_SYMBIAN) |
665 //Guard against accidentally trying to load non-plugin libraries by making sure the stub exists |
668 //Guard against accidentally trying to load non-plugin libraries by making sure the stub exists |
666 if (fileinfo.exists()) |
669 if (fileinfo.exists()) |
667 # endif |
670 # endif |
739 return false; |
742 return false; |
740 } |
743 } |
741 |
744 |
742 pluginState = IsNotAPlugin; // be pessimistic |
745 pluginState = IsNotAPlugin; // be pessimistic |
743 |
746 |
744 if ((qt_version > QT_VERSION) || ((QT_VERSION & 0xff0000) > (qt_version & 0xff0000))) { |
747 if ((qt_version & 0x00ff00) > (QT_VERSION & 0x00ff00) || (qt_version & 0xff0000) != (QT_VERSION & 0xff0000)) { |
745 if (qt_debug_component()) { |
748 if (qt_debug_component()) { |
746 qWarning("In %s:\n" |
749 qWarning("In %s:\n" |
747 " Plugin uses incompatible Qt library (%d.%d.%d) [%s]", |
750 " Plugin uses incompatible Qt library (%d.%d.%d) [%s]", |
748 (const char*) QFile::encodeName(fileName), |
751 (const char*) QFile::encodeName(fileName), |
749 (qt_version&0xff0000) >> 16, (qt_version&0xff00) >> 8, qt_version&0xff, |
752 (qt_version&0xff0000) >> 16, (qt_version&0xff00) >> 8, qt_version&0xff, |