File tree Expand file tree Collapse file tree 3 files changed +16
-14
lines changed Expand file tree Collapse file tree 3 files changed +16
-14
lines changed Original file line number Diff line number Diff line change 3333#ifndef __PythonQtPythonInclude_h
3434#define __PythonQtPythonInclude_h
3535
36- // Undefine macros that Python.h defines to avoid redefinition warning.
37- #undef _POSIX_C_SOURCE
38- #undef _POSIX_THREADS
39- #undef _XOPEN_SOURCE
40-
4136// Undefine Qt keywords that conflict with Python headers
4237#ifdef slots
4338#undef slots
Original file line number Diff line number Diff line change 4242*/
4343//----------------------------------------------------------------------------------
4444
45- #ifdef WIN32
46- #ifdef PYTHONQT_EXPORTS
47- #define PYTHONQT_EXPORT __declspec(dllexport)
48- #else
49- #define PYTHONQT_EXPORT __declspec(dllimport)
50- #endif
45+
46+ #if defined(WIN32 )
47+ #ifdef PYTHONQT_EXPORTS
48+ #define PYTHONQT_EXPORT __declspec(dllexport)
49+ #else
50+ #define PYTHONQT_EXPORT __declspec(dllimport)
51+ #endif
5152#else
52- #define PYTHONQT_EXPORT
53+ #ifdef PYTHONQT_EXPORTS
54+ #define PYTHONQT_EXPORT __attribute__((__visibility__("default")))
55+ #else
56+ #define PYTHONQT_EXPORT
57+ #endif
5358#endif
5459
60+
5561#endif
5662
Original file line number Diff line number Diff line change @@ -451,8 +451,9 @@ void PythonQtScriptingConsole::keyPressEvent(QKeyEvent* event) {
451451 }
452452
453453 if (eventHandled) {
454-
455- _completer->popup ()->hide ();
454+ if (_completer != nullptr ) {
455+ _completer->popup ()->hide ();
456+ }
456457 event->accept ();
457458
458459 } else {
You can’t perform that action at this time.
0 commit comments