mirror of https://github.com/KLayout/klayout.git
WIP: pymod tests work for Qt4 now too.
This commit is contained in:
parent
f3f6e2e7ba
commit
98256ebc66
|
|
@ -12,6 +12,9 @@ DEPENDPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
|
|||
|
||||
LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_qtbasic
|
||||
|
||||
# because QQbject is used as base class for many classes, we need this:
|
||||
LIBS += -lklayout_QtCore
|
||||
|
||||
SOURCES += \
|
||||
gsiDeclQtNetworkAdd.cc
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
*/
|
||||
|
||||
|
||||
#include "gsiQt.h"
|
||||
|
||||
#include <QPair>
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@ DEPENDPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
|
|||
|
||||
LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_qtbasic
|
||||
|
||||
# because QAsbtractTableModel is used as base class, we need this:
|
||||
LIBS += -lklayout_QtCore
|
||||
|
||||
SOURCES += \
|
||||
|
||||
HEADERS += \
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ SUBDIRS = \
|
|||
QtNetwork \
|
||||
QtDesigner
|
||||
|
||||
# This is weired, but true: because QSignalMapper (inside QtCore) has a QWidget
|
||||
# argument, we need to enforce linking of QtCore against QtGui so this GSI declaration
|
||||
# is available there
|
||||
# TODO:
|
||||
QtCore.depends += QtGui
|
||||
QtGui.depends += QtCore
|
||||
QtNetwork.depends += QtCore
|
||||
QtSql.depends += QtCore
|
||||
QtDesigner.depends += QtCore
|
||||
QtXml.depends += QtCore
|
||||
|
|
|
|||
|
|
@ -2280,13 +2280,13 @@ PythonModule::init (const char *mod_name, const char *description)
|
|||
module = Py_InitModule3 (m_mod_name.c_str (), module_methods, m_mod_description.c_str ());
|
||||
#else
|
||||
|
||||
static struct PyModuleDef mod_def = {
|
||||
struct PyModuleDef mod_def = {
|
||||
PyModuleDef_HEAD_INIT,
|
||||
m_mod_name.c_str (),
|
||||
NULL, // module documentation
|
||||
-1, // size of per-interpreter state of the module,
|
||||
// if the module keeps state in global variables.
|
||||
module_methods
|
||||
NULL
|
||||
};
|
||||
|
||||
tl_assert (! mp_mod_def);
|
||||
|
|
|
|||
|
|
@ -8,4 +8,8 @@ SOURCES = \
|
|||
|
||||
HEADERS += \
|
||||
|
||||
LIBS += -lklayout_QtCore -lklayout_QtGui -lklayout_QtWidgets
|
||||
LIBS += -lklayout_QtCore -lklayout_QtGui
|
||||
|
||||
equals(HAVE_QT5, "1") {
|
||||
LIBS += -lklayout_QtWidgets
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,4 +11,8 @@ HEADERS += \
|
|||
LIBS += -lklayout_QtCore -lklayout_QtXml
|
||||
|
||||
# Because of stupid dependency of QtCore on QtGui and this on QtWidgets:
|
||||
LIBS += -lklayout_QtGui -lklayout_QtWidgets
|
||||
LIBS += -lklayout_QtGui
|
||||
|
||||
equals(HAVE_QT5, "1") {
|
||||
LIBS += -lklayout_QtWidgets
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ class BasicTest(unittest.TestCase):
|
|||
self.assertEqual("QFormBuilder" in QtDesigner.__all__, True)
|
||||
|
||||
def test_2(self):
|
||||
app = QtCore.QCoreApplication([ "appname" ])
|
||||
q = QtDesigner.QFormBuilder()
|
||||
|
||||
# run unit tests
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@
|
|||
|
||||
import pykl.QtCore
|
||||
import pykl.QtGui
|
||||
import pykl.QtWidgets
|
||||
if not "QApplication" in pykl.QtGui.__all__:
|
||||
import pykl.QtWidgets # Qt5
|
||||
import pykl.lay as lay
|
||||
import unittest
|
||||
import sys
|
||||
|
|
|
|||
Loading…
Reference in New Issue