mirror of https://github.com/KLayout/klayout.git
WIP: some more build fixes
This commit is contained in:
parent
6b49386b67
commit
a0319c4073
|
|
@ -741,11 +741,14 @@ include "QVector3D", [ "<QVector3D>", "<QVector2D>", "<QMatrix4x4>" ]
|
|||
include "QVector4D", [ "<QVector4D>", "<QVector2D>", "<QMatrix4x4>" ]
|
||||
include "QAction", [ "<QAction>", "<QActionGroup>", "<QGraphicsWidget>", "<QMenu>" ]
|
||||
include "QCursor", [ "<QCursor>", "<QScreen>", "<QBitmap>" ]
|
||||
include "QGraphicsItem", [ "<QGraphicsItem>", "<QGraphicsTransform>", "<QGraphicsScene>", "<QStyleOptionGraphicsItem>", "<QGraphicsEffect>", "<QGraphicsWidget>", "<QGraphicsSceneContextMenuEvent>", "<QGraphicsSceneDragDropEvent>", "<QGraphicsSceneHoverEvent>", "<QGraphicsSceneMouseEvent>", "<QGraphicsSceneWheelEvent>" ]
|
||||
include "QGraphicsItem", [ "<QGraphicsItem>", "<QGraphicsTransform>", "<QGraphicsScene>", "<QStyleOptionGraphicsItem>", "<QGraphicsEffect>", "<QGraphicsWidget>", "<QGraphicsSceneContextMenuEvent>", "<QGraphicsSceneDragDropEvent>", "<QGraphicsSceneHoverEvent>", "<QGraphicsSceneMouseEvent>", "<QGraphicsSceneWheelEvent>", "<QPainter>" ]
|
||||
include "QGraphicsScene", [ "<QGraphicsScene>", "<QGraphicsView>", "<QGraphicsItem>", "<QGraphicsWidget>", "<QGraphicsEllipseItem>", "<QGraphicsLineItem>", "<QGraphicsPathItem>", "<QGraphicsPixmapItem>", "<QGraphicsPolygonItem>", "<QGraphicsRectItem>", "<QGraphicsSimpleTextItem>", "<QGraphicsTextItem>", "<QGraphicsProxyWidget>", "<QGraphicsItemGroup>", "<QStyle>", "<QGraphicsSceneContextMenuEvent>", "<QGraphicsSceneDragDropEvent>", "<QGraphicsSceneHelpEvent>", "<QGraphicsSceneMouseEvent>", "<QGraphicsSceneWheelEvent>" ]
|
||||
include "QGuiApplication", [ "<QGuiApplication>", "<QScreen>", "<QSessionManager>", "<QClipboard>", "<QWindow>", "<QStyleHints>" ]
|
||||
include "QApplication", [ "<QApplication>", "<QSessionManager>", "<QStyle>", "<QWindow>", "<QScreen>" ]
|
||||
include "QWindow", [ "<QWindow>", "<QScreen>" ]
|
||||
include "QGuiApplication", [ "<QGuiApplication>", "<QScreen>", "<QSessionManager>", "<QClipboard>", "<QWindow>", "<QStyleHints>", "<QFont>", "<QPalette>" ]
|
||||
include "QApplication", [ "<QApplication>", "<QSessionManager>", "<QStyle>", "<QWindow>", "<QScreen>", "<QFont>", "<QFontMetrics>", "<QWidget>" ]
|
||||
include "QWindow", [ "<QWindow>", "<QScreen>"
|
||||
"<QAccessibleInterface>", "<QCloseEvent>", "<QExposeEvent>", "<QHideEvent>", "<QFocusEvent>",
|
||||
"<QKeyEvent>", "<QMouseEvent>", "<QMoveEvent>", "<QPaintEvent>", "<QResizeEvent>",
|
||||
"<QShowEvent>", "<QTabletEvent>", "<QTouchEvent>", "<QWheelEvent>" ]
|
||||
include "QOffscreenSurface", [ "<QOffscreenSurface>", "<QScreen>" ]
|
||||
include "QScreenOrientationChangeEvent", [ "<QScreenOrientationChangeEvent>", "<QScreen>" ]
|
||||
|
||||
|
|
@ -1148,7 +1151,7 @@ drop_class "QSqlDriverPlugin" # not required ?
|
|||
include "QCamera", [ "<QCamera>", "<QVideoWidget>", "<QGraphicsVideoItem>", "<QMediaCaptureSession>" ]
|
||||
include "QAudioBuffer", [ "<QAudioBuffer>" ]
|
||||
include "QBackingStore", [ "<QBackingStore>" ]
|
||||
include "QMediaPlayer", [ "<QMediaPlayer>", "<QVideoWidget>", "<QGraphicsVideoItem>", "<QMediaMetaData>", "<QAudioOutput>", "<QVideoSink>" ]
|
||||
include "QMediaPlayer", [ "<QMediaPlayer>", "<QVideoWidget>", "<QGraphicsVideoItem>", "<QMediaMetaData>", "<QAudioOutput>", "<QVideoSink>", "<QMediaTimeRange>" ]
|
||||
|
||||
drop_class "QAudioBuffer", /StereoFrameDefault/
|
||||
drop_class "QAudioBuffer", /StereoFrame/
|
||||
|
|
|
|||
|
|
@ -1608,7 +1608,6 @@ END
|
|||
|
||||
ofile.puts("#include \"gsiQt.h\"")
|
||||
ofile.puts("#include \"gsi#{modn}Common.h\"")
|
||||
ofile.puts("#include \"gsiDecl#{modn}TypeTraits.h\"")
|
||||
|
||||
end
|
||||
|
||||
|
|
@ -2396,22 +2395,6 @@ END
|
|||
# forward decl
|
||||
@ext_decls << "#{struct.kind.to_s} #{cls};\n\n"
|
||||
|
||||
if false # @@@ no longer needed
|
||||
# type traits included ...
|
||||
tt = "namespace tl { template <> struct type_traits<#{cls}> : public type_traits<void> {\n"
|
||||
if !conf.has_copy_ctor?(cls) || is_abstract || (eq_op && eq_op.visibility == :private)
|
||||
tt += " typedef tl::false_tag has_copy_constructor;\n"
|
||||
end
|
||||
if !conf.has_default_ctor?(cls) || is_abstract
|
||||
tt += " typedef tl::false_tag has_default_constructor;\n"
|
||||
end
|
||||
if (dtor = struct.get_dtor) && dtor.visibility != :public
|
||||
tt += " typedef tl::false_tag has_public_destructor;\n"
|
||||
end
|
||||
tt += "}; }\n\n"
|
||||
@ext_decls << tt
|
||||
end
|
||||
|
||||
# only for top-level classes external declarations are produced currently
|
||||
@ext_decls << "namespace gsi { GSI_#{modn.upcase}_PUBLIC gsi::Class<#{cls}> &qtdecl_#{clsn} (); }\n\n"
|
||||
|
||||
|
|
@ -2970,161 +2953,6 @@ END
|
|||
|
||||
end
|
||||
|
||||
def produce_ttfile_traits(ttfile, conf, decl_obj)
|
||||
|
||||
(cls, clsn) = make_cls_names(decl_obj)
|
||||
|
||||
struct = decl_obj.struct
|
||||
|
||||
mm = {}
|
||||
struct.collect_all_methods(mm, conf)
|
||||
|
||||
# if one method is abstract, omit ctors for example
|
||||
is_abstract = mm.values.find do |m|
|
||||
m.find { |bd| bd.virtual && bd.type.init == "0" } != nil
|
||||
end
|
||||
|
||||
eq_op = (mm["operator="] || [])[0]
|
||||
|
||||
# Note: right now, there is no way to specify type traits globally for nested
|
||||
# classes because there is no forward declaration of inner classes. In that case we
|
||||
# use the header
|
||||
if cls =~ /^(.*?)::/
|
||||
ttfile.puts("#include <#{$1}>")
|
||||
else
|
||||
ttfile.puts("#{struct.kind.to_s} #{cls};")
|
||||
end
|
||||
|
||||
if false # @@@ no longer needed
|
||||
ttfile.puts("namespace tl {")
|
||||
ttfile.puts "template <> struct type_traits<#{cls}> : public type_traits<void> {"
|
||||
if !conf.has_copy_ctor?(cls) || is_abstract || (eq_op && eq_op.visibility == :private)
|
||||
ttfile.puts " typedef tl::false_tag has_copy_constructor;"
|
||||
end
|
||||
if !conf.has_default_ctor?(cls) || is_abstract
|
||||
ttfile.puts " typedef tl::false_tag has_default_constructor;"
|
||||
end
|
||||
if (dtor = struct.get_dtor) && dtor.visibility != :public
|
||||
ttfile.puts " typedef tl::false_tag has_public_destructor;"
|
||||
end
|
||||
ttfile.puts "};"
|
||||
ttfile.puts "}"
|
||||
ttfile.puts ""
|
||||
end
|
||||
|
||||
if struct.needs_adaptor(conf)
|
||||
|
||||
if false # @@@ no longer needed
|
||||
ttfile.puts("class #{clsn}_Adaptor;")
|
||||
ttfile.puts("namespace tl {")
|
||||
ttfile.puts "template <> struct type_traits<#{clsn}_Adaptor> : public type_traits<void> {"
|
||||
if !conf.has_copy_ctor?(cls) || (eq_op && eq_op.visibility == :private)
|
||||
ttfile.puts " typedef tl::false_tag has_copy_constructor;"
|
||||
end
|
||||
if !conf.has_default_ctor?(cls)
|
||||
ttfile.puts " typedef tl::false_tag has_default_constructor;"
|
||||
end
|
||||
ttfile.puts "};"
|
||||
ttfile.puts "}"
|
||||
ttfile.puts ""
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# walk through the subclasses
|
||||
|
||||
(struct.body_decl || []).each do |bd|
|
||||
if bd.is_a?(CPPStructDeclaration) && bd.visibility == :public && bd.struct.body_decl && bd.myself != "" && !conf.is_class_dropped?(cls, bd.myself)
|
||||
produce_ttfile_traits(ttfile, conf, bd)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def produce_ttfile(conf)
|
||||
|
||||
ttfile_name = "gsiDecl#{modn}TypeTraits.h"
|
||||
ttfile_path = $gen_dir + "/" + ttfile_name
|
||||
|
||||
ttfile_path && File.open(ttfile_path, "w") do |ttfile|
|
||||
|
||||
ttfile.puts(<<"END");
|
||||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2021 Matthias Koefferlein
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
END
|
||||
|
||||
ttfile.puts("/**")
|
||||
ttfile.puts("* @file #{ttfile_path}")
|
||||
ttfile.puts("* @brief Type traits for the Qt binding classes")
|
||||
ttfile.puts("*")
|
||||
ttfile.puts("* DO NOT EDIT THIS FILE. ")
|
||||
ttfile.puts("* This file has been created automatically")
|
||||
ttfile.puts("*/")
|
||||
ttfile.puts("")
|
||||
|
||||
if false # @@@ no longer required
|
||||
ttfile.puts("#ifndef _HDR_gsiDecl#{modn}TypeTraits")
|
||||
ttfile.puts("#define _HDR_gsiDecl#{modn}TypeTraits")
|
||||
ttfile.puts("")
|
||||
ttfile.puts("#include \"gsiTypes.h\"")
|
||||
ttfile.puts("")
|
||||
|
||||
ttfile.puts("")
|
||||
|
||||
prod_list(conf).each do |decl_obj|
|
||||
|
||||
if decl_obj.is_a?(CPPStructDeclaration)
|
||||
|
||||
decl_obj.myself && produce_ttfile_traits(ttfile, conf, decl_obj)
|
||||
|
||||
elsif decl_obj.is_a?(CPPNamespace)
|
||||
|
||||
cls = decl_obj.myself
|
||||
if false # no longer required
|
||||
ttfile.puts("class #{cls}_Namespace;")
|
||||
ttfile.puts("namespace tl {")
|
||||
ttfile.puts "template <> struct type_traits<#{cls}_Namespace> : public type_traits<void> {"
|
||||
ttfile.puts " typedef tl::false_tag has_copy_constructor;"
|
||||
ttfile.puts " typedef tl::false_tag has_default_constructor;"
|
||||
ttfile.puts "};"
|
||||
ttfile.puts("}")
|
||||
ttfile.puts ""
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
ttfile.puts("")
|
||||
ttfile.puts("#endif")
|
||||
end
|
||||
|
||||
puts("#{ttfile_name} written.")
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def produce_externals
|
||||
|
||||
externals_name = "gsiQtExternals.h"
|
||||
|
|
@ -3332,9 +3160,6 @@ end
|
|||
puts("Producing class list")
|
||||
bp.produce_class_list
|
||||
|
||||
puts("Producing type traits file ..")
|
||||
bp.produce_ttfile(conf)
|
||||
|
||||
puts("Producing main source file ..")
|
||||
bp.produce_main_source
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,9 @@
|
|||
|
||||
*/
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
#if QT_VERSION >= 0x060000
|
||||
# include "../qt6/QtCore/gsiQtExternals.h"
|
||||
#elif QT_VERSION >= 0x050000
|
||||
# include "../qt5/QtCore/gsiQtExternals.h"
|
||||
#else
|
||||
# include "../qt4/QtCore/gsiQtExternals.h"
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@
|
|||
|
||||
#if !defined(HAVE_QT_DESIGNER)
|
||||
# define FORCE_LINK_GSI_QTDESIGNER
|
||||
#elif QT_VERSION >= 0x060000
|
||||
// Not present in Qt6
|
||||
# define FORCE_LINK_GSI_QTDESIGNER
|
||||
#elif QT_VERSION >= 0x050000
|
||||
# include "../qt5/QtDesigner/gsiQtExternals.h"
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#if !defined(HAVE_QT_MULTIMEDIA)
|
||||
# define FORCE_LINK_GSI_QTMULTIMEDIA
|
||||
#elif QT_VERSION >= 0x060000
|
||||
# include "../qt6/QtMultimedia/gsiQtExternals.h"
|
||||
#elif QT_VERSION >= 0x050000
|
||||
# include "../qt5/QtMultimedia/gsiQtExternals.h"
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#if !defined(HAVE_QT_NETWORK)
|
||||
# define FORCE_LINK_GSI_QTNETWORK
|
||||
#elif QT_VERSION >= 0x060000
|
||||
# include "../qt6/QtNetwork/gsiQtExternals.h"
|
||||
#elif QT_VERSION >= 0x050000
|
||||
# include "../qt5/QtNetwork/gsiQtExternals.h"
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#if !defined(HAVE_QT_PRINTSUPPORT)
|
||||
# define FORCE_LINK_GSI_QTPRINTSUPPORT
|
||||
#elif QT_VERSION >= 0x060000
|
||||
# include "../qt6/QtPrintSupport/gsiQtExternals.h"
|
||||
#elif QT_VERSION >= 0x050000
|
||||
# include "../qt5/QtPrintSupport/gsiQtExternals.h"
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#if !defined(HAVE_QT_SQL)
|
||||
# define FORCE_LINK_GSI_QTSQL
|
||||
#elif QT_VERSION >= 0x060000
|
||||
# include "../qt6/QtSql/gsiQtExternals.h"
|
||||
#elif QT_VERSION >= 0x050000
|
||||
# include "../qt5/QtSql/gsiQtExternals.h"
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#if !defined(HAVE_QT_SVG)
|
||||
# define FORCE_LINK_GSI_QTSVG
|
||||
#elif QT_VERSION >= 0x060000
|
||||
# include "../qt6/QtSvg/gsiQtExternals.h"
|
||||
#elif QT_VERSION >= 0x050000
|
||||
# include "../qt5/QtSvg/gsiQtExternals.h"
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#if !defined(HAVE_QT_UITOOLS)
|
||||
# define FORCE_LINK_GSI_QTUITOOLS
|
||||
#elif QT_VERSION >= 0x060000
|
||||
# include "../qt6/QtUiTools/gsiQtExternals.h"
|
||||
#elif QT_VERSION >= 0x050000
|
||||
# include "../qt5/QtUiTools/gsiQtExternals.h"
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#if !defined(HAVE_QT_XML)
|
||||
# define FORCE_LINK_GSI_QTXML
|
||||
#elif QT_VERSION >= 0x060000
|
||||
# include "../qt6/QtXml/gsiQtExternals.h"
|
||||
#elif QT_VERSION >= 0x050000
|
||||
# include "../qt5/QtXml/gsiQtExternals.h"
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@
|
|||
|
||||
#if !defined(HAVE_QT_XML)
|
||||
# define FORCE_LINK_GSI_QTXMLPATTERNS
|
||||
#elif QT_VERSION >= 0x060000
|
||||
// Not present in Qt6
|
||||
# define FORCE_LINK_GSI_QTXMLPATTERNS
|
||||
#elif QT_VERSION >= 0x050000
|
||||
# include "../qt5/QtXmlPatterns/gsiQtExternals.h"
|
||||
#else
|
||||
|
|
|
|||
Loading…
Reference in New Issue