[Kde-bindings] branches/work/kdebindings-smoke2
Arno Rehn
kde at arnorehn.de
Mon Sep 3 16:19:40 UTC 2007
SVN commit 708016 by arnorehn:
* Added a seperate directory for QScintilla2.
* Fixed some issues with GCC's visibility features.
* qt_smoke.h and qsci_smoke.h are now installed, too.
* Ported the GCHandle check stuff from original Qyoto.
CCMAIL: kde-bindings at kde.org
M +3 -3 CMakeLists.txt
M +7 -0 ChangeLog
M +1 -3 cmake/modules/FindQScintilla.cmake
M +37 -1 csharp/qyoto/src/handlers.cpp
M +1 -1 kalyptus/kalyptusCxxToSmoke.pm
M +15 -14 smoke/CMakeLists.txt
A smoke/qsci (directory)
A smoke/qsci/CMakeLists.txt
A smoke/qsci/configure.in.in
A smoke/qsci/generate.pl
A smoke/qsci/generate.pl.cmake
A smoke/qsci/generate.pl.in
AM smoke/qsci/generate_makefile_am.pl
A smoke/qsci/header_list
A smoke/qsci/hint_header_list.pl
A smoke/qsci/qsci_smoke.h [License: no copyright]
A smoke/qsci/qscintilla2_header_list
A smoke/qsci/qscintilla_header_list
A smoke/qsci/qtdefines
A smoke/qsci/qtguess.pl
A smoke/qsci/qtguess.pl.cmake
A smoke/qsci/qtguess.pl.in
A smoke/qsci/qwt_header_list
M +5 -13 smoke/qt/CMakeLists.txt
M +4 -4 smoke/qt/qt_smoke.h
M +20 -2 smoke/smoke.h
--- branches/work/kdebindings-smoke2/CMakeLists.txt #708015:708016
@@ -18,8 +18,8 @@
#add_subdirectory(smoke)
macro_optional_add_subdirectory(smoke)
-macro_optional_add_subdirectory(ruby)
-macro_optional_add_subdirectory(python)
-macro_optional_add_subdirectory(csharp)
+# macro_optional_add_subdirectory(ruby)
+# macro_optional_add_subdirectory(python)
+# macro_optional_add_subdirectory(csharp)
macro_display_feature_log()
--- branches/work/kdebindings-smoke2/ChangeLog #708015:708016
@@ -1,5 +1,12 @@
2007-08-09 Arno Rehn <arno at arnorehn.de>
+ * Added a seperate directory for QScintilla2.
+ * Fixed some issues with GCC's visibility features.
+ * qt_smoke.h and qsci_smoke.h are now installed, too.
+ * Ported the GCHandle check stuff from original Qyoto.
+
+2007-08-09 Arno Rehn <arno at arnorehn.de>
+
* idType now returns a normal Index
* Initial port of Qyoto to the new Smoke (only relevant files added)
--- branches/work/kdebindings-smoke2/cmake/modules/FindQScintilla.cmake #708015:708016
@@ -17,9 +17,7 @@
SET(QSCINTILLA_FOUND "NO")
IF(QT4_FOUND)
- FIND_PATH(QSCINTILLA_INCLUDE_DIR qsciglobal.h
- "${QT_INCLUDE_DIR}/Qsci"
- )
+ FIND_PATH(QSCINTILLA_INCLUDE_DIR qsciglobal.h ${QT_INCLUDE_DIR}/Qsci /usr/include /usr/include/Qsci)
SET(QSCINTILLA_NAMES ${QSCINTILLA_NAMES} qscintilla2 libqscintilla2)
FIND_LIBRARY(QSCINTILLA_LIBRARY
--- branches/work/kdebindings-smoke2/csharp/qyoto/src/handlers.cpp #708015:708016
@@ -984,7 +984,7 @@
delete s;
}
- (*FreeGCHandle)(m->var().s_voidp);
+ if (m->var().s_voidp != 0) (*FreeGCHandle)(m->var().s_voidp);
}
break;
case Marshall::ToObject:
@@ -1212,6 +1212,10 @@
switch(m->action()) {
case Marshall::FromObject:
{
+ if (m->var().s_class == 0) {
+ m->item().s_class = 0;
+ return;
+ }
QMap<int, QVariant>* map = (QMap<int, QVariant>*) (*DictionaryToQMap)(m->var().s_voidp, 0);
m->item().s_voidp = (void*) map;
m->next();
@@ -1254,6 +1258,10 @@
switch(m->action()) {
case Marshall::FromObject:
{
+ if (m->var().s_class == 0) {
+ m->item().s_class = 0;
+ return;
+ }
QMap<QString, QString>* map = (QMap<QString, QString>*) (*DictionaryToQMap)(m->var().s_voidp, 1);
m->item().s_voidp = (void*) map;
m->next();
@@ -1296,6 +1304,10 @@
switch(m->action()) {
case Marshall::FromObject:
{
+ if (m->var().s_class == 0) {
+ m->item().s_class = 0;
+ return;
+ }
QMap<QString, QVariant>* map = (QMap<QString, QVariant>*) (*DictionaryToQMap)(m->var().s_voidp, 2);
m->item().s_voidp = (void*) map;
m->next();
@@ -1342,6 +1354,10 @@
switch(m->action()) {
case Marshall::FromObject:
{
+ if (m->var().s_class == 0) {
+ m->item().s_class = 0;
+ return;
+ }
QStringList *stringlist = (QStringList*) (*StringListToQStringList)(m->var().s_voidp);
m->item().s_voidp = (void*) stringlist;
@@ -1387,6 +1403,10 @@
switch(m->action()) {
case Marshall::FromObject:
{
+ if (m->var().s_class == 0) {
+ m->item().s_class = 0;
+ return;
+ }
void* list = m->var().s_voidp;
void* valuelist = (*ListWizardButtonToQListWizardButton)(list);
m->item().s_voidp = valuelist;
@@ -1417,6 +1437,10 @@
switch(m->action()) {
case Marshall::FromObject:
{
+ if (m->var().s_class == 0) {
+ m->item().s_class = 0;
+ return;
+ }
ItemList *cpplist = new ItemList;
QList<void*>* list = (QList<void*>*) (*ListToPointerList)(m->var().s_voidp);
@@ -1491,6 +1515,10 @@
switch(m->action()) {
case Marshall::FromObject:
{
+ if (m->var().s_class == 0) {
+ m->item().s_class = 0;
+ return;
+ }
void* list = m->var().s_voidp;
void* valuelist = (*ListIntToQListInt)(list);
m->item().s_voidp = valuelist;
@@ -1563,6 +1591,10 @@
switch(m->action()) {
case Marshall::FromObject:
{
+ if (m->var().s_class == 0) {
+ m->item().s_class = 0;
+ return;
+ }
ItemList *cpplist = new ItemList;
QList<void*>* list = (QList<void*>*) (*ListToPointerList)(m->var().s_voidp);
@@ -1640,6 +1672,10 @@
switch(m->action()) {
case Marshall::FromObject:
{
+ if (m->var().s_class == 0) {
+ m->item().s_class = 0;
+ return;
+ }
QList<QRgb>* cpplist = (QList<QRgb>*) (*ListUIntToQListQRgb)(m->var().s_voidp);
m->item().s_voidp = cpplist;
m->next();
--- branches/work/kdebindings-smoke2/kalyptus/kalyptusCxxToSmoke.pm #708015:708016
@@ -3010,7 +3010,7 @@
print OUT "\n";
my @modules = keys(%parentModules);
if ($#modules == 0) { # seems like a module without parents, so initialize Smoke::classMap
- print OUT "Smoke::StringSmokeMap Smoke::classMap = Smoke::StringSmokeMap();\n\n"
+ print OUT "std::map<std::string, Smoke*> Smoke::classMap;\n\n"
}
for (my $i = 0; $i < $#modules; $i++) {
print OUT "Smoke *$modules[$i]_Smoke;\n";
--- branches/work/kdebindings-smoke2/smoke/CMakeLists.txt #708015:708016
@@ -1,24 +1,25 @@
OPTION(ENABLE_SMOKE "build Smoke" ON)
-OPTION(ENABLE_SMOKEKDE "build SmokeKDE" ON)
+OPTION(ENABLE_SMOKEQSCI "build SmokeQSci" On)
+OPTION(ENABLE_SMOKEKDE "build SmokeKDE" OFF)
set(SMOKE_ENABLED "no")
-if(ENABLE_SMOKE OR ENABLE_SMOKEKDE)
+
+if(ENABLE_SMOKE OR ENABLE_SMOKEQSCI OR ENABLE_SMOKEKDE)
add_subdirectory(qt)
+ set(SMOKE_ENABLED "yes - Qt")
+
+ if(ENABLE_SMOKEQSCI)
+ add_subdirectory(qsci)
+ set(SMOKE_ENABLED "${SMOKE_ENABLED}, QScintilla")
+ endif(ENABLE_SMOKEQSCI)
+
if(ENABLE_SMOKEKDE)
add_subdirectory(kde)
- set(SMOKE_ENABLED "yes - Qt and KDE")
- else(ENABLE_SMOKEKDE)
- set(SMOKE_ENABLED "yes - Qt only")
+ set(SMOKE_ENABLED "${SMOKE_ENABLED}, KDE")
endif(ENABLE_SMOKEKDE)
-endif(ENABLE_SMOKE OR ENABLE_SMOKEKDE)
-message(STATUS "Build Smoke... " ${SMOKE_ENABLED})
-########### install files ###############
+endif(ENABLE_SMOKE OR ENABLE_SMOKEQSCI OR ENABLE_SMOKEKDE)
-# KDE specific
-#install( FILES smoke.h DESTINATION ${INCLUDE_INSTALL_DIR} )
+message(STATUS "Build Smoke... " ${SMOKE_ENABLED})
-# Qt only
-#install( FILES smoke.h DESTINATION ${INSTALL_DIR}/include )
-
-install( FILES smoke.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include )
+install(FILES smoke.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
** branches/work/kdebindings-smoke2/smoke/qsci/generate_makefile_am.pl #property svn:executable
+ *
--- branches/work/kdebindings-smoke2/smoke/qt/CMakeLists.txt #708015:708016
@@ -1,17 +1,5 @@
+include_directories( ${QT_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR}/../ )
-include(FindQScintilla)
-include(FindQwt5)
-
-include_directories( ${QT_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR}/../ )
-
-if(QSCINTILLA_FOUND)
- include_directories( ${QSCINTILLA_INCLUDE_DIR} )
-endif(QSCINTILLA_FOUND)
-
-if(Qwt5_Qt4_FOUND)
- include_directories( ${Qwt5_INCLUDE_DIR} )
-endif(Qwt5_Qt4_FOUND)
-
IF(NOT PERL_FOUND)
FIND_PACKAGE(PERL REQUIRED)
ENDIF(NOT PERL_FOUND)
@@ -82,6 +70,9 @@
)
# kde4_add_library(smokeqt SHARED ${smokeqt_LIB_SRCS})
+IF(CMAKE_CXX_FLAGS MATCHES "-fvisibility")
+ ADD_DEFINITIONS(-DGCC_VISIBILITY)
+ENDIF(CMAKE_CXX_FLAGS MATCHES "-fvisibility")
add_library(smokeqt SHARED ${smokeqt_LIB_SRCS})
SET(QT_USE_QTNETWORK ${QT_QTNETWORK_FOUND})
@@ -126,6 +117,7 @@
set_target_properties(smokeqt PROPERTIES VERSION 2.0.0 SOVERSION 2 )
install(TARGETS smokeqt DESTINATION ${CMAKE_INSTALL_PREFIX}/lib )
+install(FILES qt_smoke.h DESTINATION include)
configure_file(qtguess.pl.cmake ${CMAKE_CURRENT_BINARY_DIR}/qtguess.pl @ONLY)
configure_file(generate.pl.cmake ${CMAKE_CURRENT_BINARY_DIR}/generate.pl @ONLY )
--- branches/work/kdebindings-smoke2/smoke/qt/qt_smoke.h #708015:708016
@@ -1,11 +1,11 @@
#ifndef QT_SMOKE_H
#define QT_SMOKE_H
-// Don't use kdemacros.h/KDE_EXPORT here as it needs to be free of KDE dependencies
-#include <QtCore/qglobal.h>
+#include <smoke.h>
+
// Defined in smokedata.cpp, initialized by init_qt_Smoke(), used by all .cpp files
-extern Q_DECL_EXPORT Smoke* qt_Smoke;
-extern Q_DECL_EXPORT void init_qt_Smoke();
+extern SMOKE_EXPORT Smoke* qt_Smoke;
+extern SMOKE_EXPORT void init_qt_Smoke();
class QGlobalSpace { };
--- branches/work/kdebindings-smoke2/smoke/smoke.h #708015:708016
@@ -38,6 +38,25 @@
// Modified by Arno Rehn <arno at arnorehn.de>, 2007/07/15
+#ifdef WIN32
+ #define SMOKE_IMPORT __declspec(dllimport)
+ #define SMOKE_EXPORT __declspec(dllexport)
+ #define SMOKE_DLLLOCAL
+ #define SMOKE_DLLPUBLIC
+#else
+ #ifdef GCC_VISIBILITY
+ #define SMOKE_IMPORT __attribute__ ((visibility("default")))
+ #define SMOKE_EXPORT __attribute__ ((visibility("default")))
+ #define SMOKE_DLLLOCAL __attribute__ ((visibility("hidden")))
+ #define SMOKE_DLLPUBLIC __attribute__ ((visibility("default")))
+ #else
+ #define SMOKE_IMPORT
+ #define SMOKE_EXPORT
+ #define SMOKE_DLLLOCAL
+ #define SMOKE_DLLPUBLIC
+ #endif
+#endif
+
class SmokeBinding;
class Smoke {
@@ -45,8 +64,7 @@
const char *module_name;
public:
- typedef std::map<std::string, Smoke*> StringSmokeMap;
- static StringSmokeMap classMap;
+ static SMOKE_EXPORT std::map<std::string, Smoke*> classMap;
union StackItem; // defined below
/**
More information about the Kde-bindings
mailing list