Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build/common.prf
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ isEmpty(PYTHONQT_GENERATED_PATH) {
}

VERSION = 3.2.0
greaterThan(QT_MAJOR_VERSION, 5) | greaterThan(QT_MINOR_VERSION, 9): CONFIG += c++17 c++11
win32: CONFIG += skip_target_version_ext
gcc|win32-clang-msvc:QMAKE_CXXFLAGS += -Wno-deprecated-declarations -Wuninitialized -Winit-self -pedantic
win32-clang-msvc:QMAKE_CXXFLAGS += -Wno-unused-command-line-argument
Expand Down
7 changes: 3 additions & 4 deletions build/python.prf
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,10 @@ contains(PKGCONFIG, "python.*"){
isEmpty(PYTHON_PATH):PYTHON_PATH=$(PYTHON_PATH)
isEmpty(PYTHON_PATH)|!exists("$$PYTHON_PATH\\include") | !exists("$$PYTHON_PATH\\libs\\") {
error("PYTHON_PATH must be set to correct folder with \\libs and \\include subfolders ")
}

INCLUDEPATH += $$shell_path($${PYTHON_PATH}/include)
}
INCLUDEPATH += $${PYTHON_PATH}/include

LIBS += $$shell_path(-L$${PYTHON_PATH}/libs)
LIBS += -L$${PYTHON_PATH}/libs
LIBS += -lpython$${PYTHON_VERSION_MAJOR}$${PYTHON_VERSION_MINOR}$${DEBUG_EXT}

# Hack for "CONFIG+=testcase" and 'make check' to add python's dll to PATH
Expand Down
18 changes: 18 additions & 0 deletions src/PythonQt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2643,6 +2643,24 @@ PythonQtClassInfo* PythonQtPrivate::getClassInfo( const QByteArray& className )
}
}
}

if (!result) {
bool ambiguity = false;
for(auto &&key: _knownClassInfos.keys()) {
if (key.indexOf(QByteArray("::") + className) >= 0) {
if (!result) {
result = _knownClassInfos.value(key);
} else {
ambiguity = true;
std::cerr << "Multiple candidates found" << std::endl;
}
}
}
if (ambiguity) {
return nullptr;
}
}

return result;
}

Expand Down
2 changes: 1 addition & 1 deletion src/src.pri
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ DEFINES += PYTHONQT_EXPORTS

INCLUDEPATH += $$PWD

CONFIG += c++11
CONFIG += c++11 c++17

gcc:!no_warn:!clang:QMAKE_CXXFLAGS += -Wno-error=missing-field-initializers
*-clang*:!no_warn:QMAKE_CXXFLAGS += -Wno-error=sometimes-uninitialized
Expand Down