Sat Apr 3 19:29:08 CEST 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* modular Smoke kdeui
hunk ./TODO 1
-* fix segfault on exit after kde:application has run
rmfile ./TODO
addfile ./cl-smoke.kde.ui.asd
hunk ./kde.mbd 1
-;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
-
-(in-package :sysdef-user)
-
-(define-system :kde ()
- (:version 0 0 1)
- (:documentation "Smoke KDE bindings.")
- (:keywords "GUI" "KDE")
- (:author "Tobias Rautenkranz")
- (:license "GPL with linking exception")
- (:needs :qt)
-; (:uses-macros-from :smoke)
- (:components [_$_]
- ("src" module
- (:components
- "package"
- ("dr-konqi" (:needs "package"))
- ("kde" (:needs "package" "dr-konqi"))
- ("application" (:needs "package" "kde"))
- ("standard-action" (:needs "package" "kde"))))))
rmfile ./kde.mbd
hunk ./util/CMakeLists.txt 1
-find_package(Qt4)
-set(QT_DONT_USE_QTGUI true)
-include(${QT_USE_FILE})
-
-include(CheckCXXCompilerFlag)
-check_cxx_compiler_flag("-fvisibility=hidden" CXX_VISIBILITY)
-if(CXX_VISIBILITY)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
-endif(CXX_VISIBILITY)
-
-add_library(cl-smoke-disable-backtrace SHARED backtrace.cpp)
-target_link_libraries(cl-smoke-disable-backtrace ${QT_LIBRARIES})
-
-#install(TARGETS cl-smoke-disable-backtrace
-# LIBRARY DESTINATION lib)
rmfile ./util/CMakeLists.txt
hunk ./util/backtrace.cpp 1
-#include <QDebug>
-
-#define BT_EXPORT __attribute__((visibility("default")))
-
-extern "C" {
-/** Overwrites backtrace_symbols in execinfo.h and does nothing.
- * Work around segfault in:
- * ~KIconLoader()
- * kRealBacktrace(int)
- * backtrace_symbols
- *
- * ~KIconLoader() is called at exit when an KApplication has been constructed.
- * Somehow a negative number is pased as size to backtrace_symbols:
- * void* trace[256];
- * backtrace_symbols(trace, -1219315128); // => SIGSEGV
- * and segfaults in sysdeps/generic/elf/backtracesyms.c:65
- */
-BT_EXPORT char**
-backtrace_symbols(void* const* buffer, int size)
-{
- qDebug() << "libcl-smoke-disable-backtrace: backtrace_symbols workaround\n"
- << "\tbuffer: " << buffer << "size: " << size;
- return NULL;
-}
-
-// overwriting backtrace(void** buffer, int size) does not work!?
-}
rmfile ./util/backtrace.cpp
rmdir ./util
hunk ./tests/test.lisp 1
-(mb:test :kde.tests)
rmfile ./tests/test.lisp
rmdir ./tests
hunk ./CMakeLists.txt 1
-cmake_minimum_required(VERSION 2.6)
-
-project(cl-smoke.kde)
-
-add_subdirectory(util)
rmfile ./CMakeLists.txt
hunk ./cl-smoke.kde.ui.asd 1
+(defsystem :cl-smoke.kde.ui
+ :name :kde.ui
+ :version (0 0 1)
+ :author "Tobias Rautenkranz"
+ :license "GPL with linking exception"
+ :description "Smoke KDE ui bindings."
+ :depends-on (:cl-smoke.kde.core :cl-smoke.qt.svg)
+ :components
+ ((:module "src" :components
+ ((:file "package")
+ (:file "kde" :depends-on ("package"))
+ (:file "application" :depends-on ("kde"))
+ (:file "standard-action" :depends-on ("kde"))))))
hunk ./src/application.lisp 1
-(in-package :kde)
+(in-package :cl-smoke.kde.ui)
hunk ./src/application.lisp 3
-(declaim (optimize (debug 3)))
-
-;;; FIXME crash on quit, Called from ~KIconLoader():
-;;; CL-USER> (cffi:defcfun (kbacktrace "_Z14kRealBacktracei") :pointer
-;;; (levels :int))
-;;; KBACKTRACE
-;;; CL-USER> (kbacktrace -1)
-;;;
-;;; Unhandled memory fault at #x0.
-
-(defun app ()
- (assert (app-p))
+(defun kde:app ()
+ (assert (kde:app-p))
hunk ./src/application.lisp 7
-(defun app-p ()
+(defun kde:app-p ()
hunk ./src/application.lisp 9
- (typep (qt:app) (find-class 'application))))
+ (typep (qt:app) (find-class 'kde:application))))
hunk ./src/application.lisp 11
-(defun make-aboutdata (app-name program-name version)
+(defun kde:make-aboutdata (app-name program-name version)
hunk ./src/application.lisp 16
- (make-instance 'about-data :args (list app-name catalog-name
- program-name version))))
+ (make-instance 'kde:about-data :args (list app-name catalog-name
+ program-name version))))
hunk ./src/application.lisp 20
- (defun ensure-app (about-data &optional (application 'application)
+ (defun ensure-app (about-data &optional (application 'kde:application)
hunk ./src/application.lisp 25
- (assert (typep (qt:app) (find-class application))
+ (assert (typep (qt:app) (find-class 'kde:application))
hunk ./src/application.lisp 38
- (values (make-instance 'application) t))))
+ (values (make-instance 'kde:application) t))))
hunk ./src/application.lisp 41
- (setf cl-smoke.qt-impl::*widgets* nil)
+ (setf cl-smoke.qt.gui::*widgets* nil)
hunk ./src/application.lisp 43
- (trivial-garbage:cancel-finalization (app))
- (cxx:delete-later (app))
+ (trivial-garbage:cancel-finalization (kde:app))
+ (cxx:delete-later (kde:app))
hunk ./src/application.lisp 46
- (setf (slot-value (app) 'pointer) (null-pointer))))
+ (setf (slot-value (kde:app) 'pointer) (null-pointer))))
hunk ./src/application.lisp 48
-(defmacro with-app (about-data &body body)
- `(cl-smoke.qt-impl::with-application ((ensure-app ,about-data)
+(defmacro kde:with-app (about-data &body body)
+ `(cl-smoke.qt.core::with-application ((ensure-app ,about-data)
hunk ./src/application.lisp 53
-(defmacro with-kde ((app-name program-name version) &body body)
+(defmacro kde:with-kde ((app-name program-name version) &body body)
hunk ./src/application.lisp 55
- `(let ((,about-data (make-aboutdata ,app-name ,program-name ,version)))
- (with-app ,about-data
- ,@body))))
+ `(let ((,about-data (kde:make-aboutdata ,app-name ,program-name ,version)))
+ (kde:with-app ,about-data
+ ,@body))))
hunk ./src/dr-konqi.lisp 1
-(in-package :kde)
-
-(defun disable-dr-konqi ()
- "Disables the Dr Konqi crash manager since it traps signals."
- #+sbcl (sb-posix:putenv "KDE_DEBUG=true")
- #-sbcl (warn "Can not disable Dr. Konqi."))
rmfile ./src/dr-konqi.lisp
hunk ./src/kde.lisp 1
-;;; Copyright (C) 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
+;;; Copyright (C) 2009, 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
hunk ./src/kde.lisp 28
-(in-package :kde)
+(in-package :cl-smoke.kde.ui)
hunk ./src/kde.lisp 30
-(smoke:define-smoke-module :kde libsmokekde
- (*kde-smoke* "kde_Smoke")
- (init-kde-smoke "init_kde_Smoke"))
-
-(eval-when (:load-toplevel :compile-toplevel :execute)
- (disable-dr-konqi))
+(smoke:define-smoke-module :kde libsmokekdeui
+ (*kdeui-smoke* "kdeui_Smoke")
+ (init-kdeui-smoke "init_kdeui_Smoke"))
hunk ./src/package.lisp 1
-(defpackage :kde
+(defpackage :cl-smoke.kde.ui
hunk ./src/package.lisp 3
- (:export #:make-aboutdata
- #:make-standard-action
- #:init-app
- #:with-kde
- #:with-app))
+ (:nicknames :kde.ui))
hunk ./src/standard-action.lisp 1
-(in-package :kde)
+(in-package :cl-smoke.kde.ui)
hunk ./src/standard-action.lisp 3
-(defun make-standard-action (action action-collection &optional slot)
+(defun kde:make-standard-action (action action-collection &optional slot)
hunk ./src/standard-action.lisp 6
- (let ((std-action (standard-action.create action
- (null-pointer)
- (null-pointer)
- action-collection)))
+ (let ((std-action (kde:standard-action.create action
+ (null-pointer)
+ (null-pointer)
+ action-collection)))
changepref test
sh ./test.lisp
Thu Jun 11 21:13:13 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Set package for smoke module
hunk ./src/application.lisp 51
- (setf qt::*widgets* nil)
+ (setf cl-smoke.qt-impl::*widgets* nil)
hunk ./src/application.lisp 59
- `(qt::with-application ((ensure-app ,about-data)
+ `(cl-smoke.qt-impl::with-application ((ensure-app ,about-data)
hunk ./src/kde.lisp 30
-(smoke:define-smoke-module libsmokekde
+(smoke:define-smoke-module :kde libsmokekde
Tue May 26 17:46:14 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Workaround segfault on exit & run test on commit
addfile ./CMakeLists.txt
hunk ./CMakeLists.txt 1
+cmake_minimum_required(VERSION 2.6)
+
+project(cl-smoke.kde)
+
+add_subdirectory(util)
hunk ./src/application.lisp 5
+;;; FIXME crash on quit, Called from ~KIconLoader():
+;;; CL-USER> (cffi:defcfun (kbacktrace "_Z14kRealBacktracei") :pointer
+;;; (levels :int))
+;;; KBACKTRACE
+;;; CL-USER> (kbacktrace -1)
+;;;
+;;; Unhandled memory fault at #x0.
+
addfile ./test.lisp
hunk ./test.lisp 1
+#|
+cmake ./ && make || exit 1
+# LD_PRELOAD causes utf8 decoding errors in sbcl
+# in run-progam used by sysdef.cmake
+sbcl --noinform --noprint --disable-debugger --load $0 --end-toplevel-options -c || exit 1
+LD_PRELOAD=./util/libcl-smoke-disable-backtrace.so exec -a "$0" sbcl --noinform --noprint --disable-debugger --load $0 --end-toplevel-options
+# do not use --script to allow loading mudballs with ${HOME}/.sbclrc
+# Used for testing on darcs record.
+|#
+
+(in-package :sysdef-user)
+
+(defun load-sysdef (pathname system)
+ (load pathname)
+ (setf (mb.sysdef::pathname-of (find-system system)) pathname))
+
+(defun load-sysdef-file (system-name)
+ "Loads a mbd file in the current directory."
+ (load-sysdef (make-pathname :defaults *default-pathname-defaults*
+ :name (string-downcase system-name)
+ :type "mbd")
+ system-name))
+
+(load-sysdef-file :kde)
+(when (= 2 (length sb-ext:*posix-argv*))
+ (mb:load :kde)
+ (sb-ext:quit))
+[_^I_][_$_]
+(mb:test :kde)
+
+(sb-ext:quit)
adddir ./util
addfile ./util/CMakeLists.txt
hunk ./util/CMakeLists.txt 1
+find_package(Qt4)
+set(QT_DONT_USE_QTGUI true)
+include(${QT_USE_FILE})
+
+include(CheckCXXCompilerFlag)
+check_cxx_compiler_flag("-fvisibility=hidden" CXX_VISIBILITY)
+if(CXX_VISIBILITY)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
+endif(CXX_VISIBILITY)
+
+add_library(cl-smoke-disable-backtrace SHARED backtrace.cpp)
+target_link_libraries(cl-smoke-disable-backtrace ${QT_LIBRARIES})
+
+#install(TARGETS cl-smoke-disable-backtrace
+# LIBRARY DESTINATION lib)
addfile ./util/backtrace.cpp
hunk ./util/backtrace.cpp 1
+#include <QDebug>
+
+#define BT_EXPORT __attribute__((visibility("default")))
+
+extern "C" {
+/** Overwrites backtrace_symbols in execinfo.h and does nothing.
+ * Work around segfault in:
+ * ~KIconLoader()
+ * kRealBacktrace(int)
+ * backtrace_symbols
+ *
+ * ~KIconLoader() is called at exit when an KApplication has been constructed.
+ * Somehow a negative number is pased as size to backtrace_symbols:
+ * void* trace[256];
+ * backtrace_symbols(trace, -1219315128); // => SIGSEGV
+ * and segfaults in sysdeps/generic/elf/backtracesyms.c:65
+ */
+BT_EXPORT char**
+backtrace_symbols(void* const* buffer, int size)
+{
+ qDebug() << "libcl-smoke-disable-backtrace: backtrace_symbols workaround\n"
+ << "\tbuffer: " << buffer << "size: " << size;
+ return NULL;
+}
+
+// overwriting backtrace(void** buffer, int size) does not work!?
+}
changepref test
sh ./test.lisp
Sun May 24 23:29:37 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* cleanup: remove static-call
hunk ./src/kde.lisp 37
-(defun static-call (class-name method-name &rest args)
- (apply #'smoke::static-call *kde-smoke* class-name method-name args))
-
hunk ./src/standard-action.lisp 6
- ;; FIXME make overload resolution for standard-action.create work
- (let ((std-action (static-call "KStandardAction" "create$#$#" action
+ (let ((std-action (standard-action.create action
Sun May 24 17:11:10 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* cleanup new
hunk ./src/application.lisp 45
- (cxx:delete-later (app))
hunk ./src/application.lisp 46
- (smoke::delete-pointer (smoke::pointer (app)) (class-of (app)))
+ (cxx:delete-later (app))
+ ;(smoke::delete-pointer (smoke::pointer (app)) (class-of (app)))
hunk ./src/kde.lisp 37
-
-(defun new (class-name method-name &rest args)
- (apply #'new-object (smoke::binding *kde-smoke*) class-name method-name args))
-
hunk ./src/package.lisp 3
- (:export #:new
- #:call
- #:static-call
-
- #:make-aboutdata
+ (:export #:make-aboutdata
hunk ./src/standard-action.lisp 6
+ ;; FIXME make overload resolution for standard-action.create work
Fri May 15 18:09:40 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Fix missing static-call function.
hunk ./src/kde.lisp 37
+
+(defun new (class-name method-name &rest args)
+ (apply #'new-object (smoke::binding *kde-smoke*) class-name method-name args))
+
+(defun static-call (class-name method-name &rest args)
+ (apply #'smoke::static-call *kde-smoke* class-name method-name args))
+
Thu May 14 14:14:47 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Lisp image loading
hunk ./kde.mbd 12
+; (:uses-macros-from :smoke)
hunk ./src/kde.lisp 30
-(eval-when (:load-toplevel :compile-toplevel :execute)
- (define-foreign-library libsmokekde
- (:unix "libsmokekde.so.2")
- (t (:default "libsmokekde")))
-
- (use-foreign-library libsmokekde)
-
- (defcvar ("kde_Smoke" :read-only t) :pointer
- "The Smoke KDE binding")
-
- (defcfun (init-kde-smoke "_Z14init_kde_Smokev") :void)
-
- (defvar *kde-binding* (null-pointer))
+(smoke:define-smoke-module libsmokekde
+ (*kde-smoke* "kde_Smoke")
+ (init-kde-smoke "init_kde_Smoke"))
hunk ./src/kde.lisp 34
- (init-kde-smoke)
- (disable-dr-konqi)
- (setf *kde-binding* (init *kde-smoke*)))
-
-(define-methods *kde-smoke*)
-
-(defun new (class-name method-name &rest args)
- (apply #'new-object *kde-binding* class-name method-name args))
-
-(defun static-call (class-name method-name &rest args)
- (apply #'smoke::static-call *kde-smoke* class-name method-name args))
+(eval-when (:load-toplevel :compile-toplevel :execute)
+ (disable-dr-konqi))
Tue May 12 17:44:24 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Make *kde-smoke* read only
hunk ./src/kde.lisp 32
- (:unix "libsmokekde.so.2")
+ (:unix "libsmokekde.so.2")
hunk ./src/kde.lisp 37
- (defcvar "kde_Smoke" :pointer
+ (defcvar ("kde_Smoke" :read-only t) :pointer