File tree 3 files changed +16
-14
lines changed 3 files changed +16
-14
lines changed Original file line number Diff line number Diff line change 33
33
#ifndef __PythonQtPythonInclude_h
34
34
#define __PythonQtPythonInclude_h
35
35
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
-
41
36
// Undefine Qt keywords that conflict with Python headers
42
37
#ifdef slots
43
38
#undef slots
Original file line number Diff line number Diff line change 42
42
*/
43
43
//----------------------------------------------------------------------------------
44
44
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
51
52
#else
52
- #define PYTHONQT_EXPORT
53
+ #ifdef PYTHONQT_EXPORTS
54
+ #define PYTHONQT_EXPORT __attribute__((__visibility__("default")))
55
+ #else
56
+ #define PYTHONQT_EXPORT
57
+ #endif
53
58
#endif
54
59
60
+
55
61
#endif
56
62
Original file line number Diff line number Diff line change @@ -451,8 +451,9 @@ void PythonQtScriptingConsole::keyPressEvent(QKeyEvent* event) {
451
451
}
452
452
453
453
if (eventHandled) {
454
-
455
- _completer->popup ()->hide ();
454
+ if (_completer != nullptr ) {
455
+ _completer->popup ()->hide ();
456
+ }
456
457
event->accept ();
457
458
458
459
} else {
You can’t perform that action at this time.
0 commit comments