Ticket #246: qmlpluginfix.diff
File qmlpluginfix.diff, 3.0 KB (added by , 13 years ago) |
---|
-
src/declarative/qml/qdeclarativeimport.cpp
878 878 << QLatin1String("d.dll") // try a qmake-style debug build first 879 879 # endif 880 880 << QLatin1String(".dll")); 881 881 882 #elif defined(Q_OS_SYMBIAN) 882 883 return resolvePlugin(qmldirPath, qmldirPluginPath, baseName, 883 884 QStringList() 884 885 << QLatin1String(".dll") 885 886 << QLatin1String(".qtplugin")); 886 #else887 887 888 # if defined(Q_OS_DARWIN) 889 888 #elif defined(Q_OS_DARWIN) 890 889 return resolvePlugin(qmldirPath, qmldirPluginPath, baseName, 891 890 QStringList() 892 891 # ifdef QT_DEBUG … … 899 898 << QLatin1String(".so") 900 899 << QLatin1String(".bundle"), 901 900 QLatin1String("lib")); 901 902 #elif defined(Q_OS_OS2) 903 QString newBaseName; 904 # ifdef QT_DEBUG 905 QFile pluginLink(qmldirPath.absoluteFilePath(baseName + QLatin1Char('d'))); 906 # else 907 QFile pluginLink(qmldirPath.absoluteFilePath(baseName)); 908 # endif 909 910 if (pluginLink.open(QIODevice::ReadOnly)) { 911 QTextStream in(&pluginLink); 912 newBaseName = in.readLine().trimmed(); 913 pluginLink.close(); 914 } 915 916 if (newBaseName.isEmpty()) 917 newBaseName = baseName; 918 919 return resolvePlugin(qmldirPath, qmldirPluginPath, newBaseName, 920 QStringList() << QLatin1String(".dll")); 921 902 922 # else // Generic Unix 903 923 QStringList validSuffixList; 904 924 … … 922 942 // libfoo.so 923 943 924 944 return resolvePlugin(qmldirPath, qmldirPluginPath, baseName, validSuffixList, QLatin1String("lib")); 925 # endif926 945 927 946 #endif 928 947 } -
src/imports/qimportbase.pri
2 2 TEMPLATE = lib 3 3 CONFIG += qt plugin 4 4 5 win32|mac:!wince*:!win32-msvc:!macx-xcode:CONFIG += debug_and_release5 os2|win32|mac:!wince*:!win32-msvc:!macx-xcode:CONFIG += debug_and_release 6 6 7 7 isEmpty(TARGETPATH) { 8 8 error("qimportbase.pri: You must provide a TARGETPATH!") … … 26 26 !isEmpty(TARGET_SHORT):TARGET_SHORT = $$qtLibraryTarget($$TARGET_SHORT) 27 27 contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols 28 28 29 os2:!isEmpty(TARGET_SHORT) { 30 FOUR = 4 31 PLUGINNAME = $$TARGET_SHORT 32 PLUGINLINK = $$QT_BUILD_TREE/imports/$$TARGETPATH/$$TARGET 33 34 createlink.target = $$PLUGINLINK 35 createlink.commands = echo $$PLUGINNAME$$FOUR > $$PLUGINLINK 36 createlink.depends = $$QMLDIRFILE 37 QMAKE_EXTRA_TARGETS += createlink 38 QMAKE_DISTCLEAN += $$PLUGINLINK 39 PRE_TARGETDEPS += $$PLUGINLINK 40 41 pluginlink.path = /imports/$$TARGETPATH 42 pluginlink.files = $$PLUGINLINK 43 INSTALLS += pluginlink 44 } 45 29 46 include(../qt_targets.pri) 30 47 31 48 wince*:LIBS += $$QMAKE_LIBS_GUI