replace "concatenate 'string" with "x:cc"

This commit is contained in:
polos 2017-04-21 11:13:49 +02:00
parent afd381467d
commit daeb7545ae
3 changed files with 24 additions and 26 deletions

View file

@ -222,7 +222,7 @@
(caaar x))
(defun l2q-name (name)
(concatenate 'string "Q" (subseq name 1)))
(x:cc "Q" (subseq name 1)))
(defun sub-class-name (x)
(let ((sub (copy-seq (class-name* x))))
@ -268,19 +268,18 @@
(not (find #\< type)))))
(unless (and enum-as-int
(find* type +special-typedefs-and-classes+))
(concatenate 'string
(if (and (const-p arg)
(or (not return)
(not (string= "int" (first arg)))))
"const "
"")
(if enum-as-int "int" type)
(cond ((and (not return)
(reference-p arg))
"&")
((pointer-p arg)
"*")
(t ""))))))))
(x:cc (if (and (const-p arg)
(or (not return)
(not (string= "int" (first arg)))))
"const "
"")
(if enum-as-int "int" type)
(cond ((and (not return)
(reference-p arg))
"&")
((pointer-p arg)
"*")
(t ""))))))))
(when (and return
(search "QList" argc)
(search "::" argc))
@ -304,14 +303,13 @@
(error (format nil "No C null value defined for ~S" arg))))))
(defun arg-to-simple-c (arg)
(concatenate 'string
(if (and (const-p arg)
(pointer-p arg)
(string= "char" (first arg)))
"const "
"")
(first arg)
(if (pointer-p arg) "*" "")))
(x:cc (if (and (const-p arg)
(pointer-p arg)
(string= "char" (first arg)))
"const "
"")
(first arg)
(if (pointer-p arg) "*" "")))
(defun default-to-c (arg &optional enum-class)
(if-it (default-value arg)

View file

@ -22,7 +22,7 @@
(write-sequence (x:string-to-bytes (qlocal8bit (|toPlainText| *web-frame*)))
s))
(let ((file-name (file-namestring (probe-file *file*))))
(rename-file file-name (concatenate 'string "html/" file-name)))))
(rename-file file-name (x:cc "html/" file-name)))))
(defun html-loaded (ok)
(if ok

View file

@ -274,11 +274,11 @@
(when (find #\( x:it)
;; special default values
(x:when-it* (search " = QRect( QPoint( 0, 0 ), QSize( -1, -1 ) )" x:it)
(setf x:it (concatenate 'string (subseq x:it 0 x:it*) " = QRect_DEFAULT)")))
(setf x:it (x:cc (subseq x:it 0 x:it*) " = QRect_DEFAULT)")))
(x:when-it* (search " = QMarginsF( 0, 0, 0, 0 )" x:it)
(setf x:it (concatenate 'string (subseq x:it 0 x:it*) " = QMarginsF_DEFAULT)")))
(setf x:it (x:cc (subseq x:it 0 x:it*) " = QMarginsF_DEFAULT)")))
(x:when-it* (search " = QPageLayout( QPageSize( QPageSize::A4 ), QPageLayout::Portrait, QMarginsF() )" x:it)
(setf x:it (concatenate 'string (subseq x:it 0 x:it*) " = QPageLayout_DEFAULT)")))
(setf x:it (x:cc (subseq x:it 0 x:it*) " = QPageLayout_DEFAULT)")))
(let* ((fun (tokenize x:it))
(new (and (not static)
(x:starts-with (format nil "~A (" class) fun)))