Compare commits

...

90 Commits

Author SHA1 Message Date
TDE Gitea 11a67c1134 Reset submodule main/core/tdebindings/admin to latest HEAD
2 years ago
Slávek Banko d7d58b6493
Remove cmake submodule since it has now been replaced by cmake-trinity dependency.
3 years ago
TDE Gitea 6b307d84f5 Reset submodule main/core/tdebindings/cmake to latest HEAD
3 years ago
TDE Gitea 5e2183a6df Reset submodule main/core/tdebindings/cmake to latest HEAD
3 years ago
TDE Gitea 858ec93404 Reset submodule main/core/tdebindings/cmake to latest HEAD
3 years ago
TDE Gitea 4431adcac8 Reset submodule main/core/tdebindings/cmake to latest HEAD
3 years ago
TDE Gitea 2baf43bc54 Reset submodule main/core/tdebindings/admin to latest HEAD
3 years ago
TDE Gitea 836611a7f0 Reset submodule main/core/tdebindings/cmake to latest HEAD
3 years ago
TDE Gitea 092aeb93e0 Reset submodule main/core/tdebindings/cmake to latest HEAD
3 years ago
TDE Gitea e40e89b529 Reset submodule main/core/tdebindings/admin to latest HEAD
3 years ago
TDE Gitea 0e5a35ee00 Reset submodule main/tdebindings/cmake to latest HEAD
4 years ago
TDE Gitea 4f776d06ad Reset submodule main/tdebindings/admin to latest HEAD
4 years ago
TDE Gitea 24666926bd Reset submodule main/tdebindings/cmake to latest HEAD
4 years ago
TDE Gitea 484cd22e7a Reset submodule main/tdebindings/admin to latest HEAD
4 years ago
TDE Gitea a09e8e9cbd Reset submodule main/tdebindings/cmake to latest HEAD
4 years ago
TDE Gitea 22955db0e1 Reset submodule main/tdebindings/admin to latest HEAD
4 years ago
TDE Gitea e03f54b432 Reset submodule main/tdebindings/cmake to latest HEAD
4 years ago
TDE Gitea 8267d38f82 Reset submodule main/tdebindings/cmake to latest HEAD
4 years ago
TDE Gitea 469b3ef23f Reset submodule main/tdebindings/cmake to latest HEAD
4 years ago
TDE Gitea bb96cd4627 Reset submodule main/tdebindings/admin to latest HEAD
4 years ago
TDE Gitea 88810e8e19 Reset submodule main/tdebindings/cmake to latest HEAD
4 years ago
TDE Gitea bd414daa3d Reset submodule main/tdebindings/cmake to latest HEAD
4 years ago
TDE Gitea 9816a0eaf0 Reset submodule main/tdebindings/cmake to latest HEAD
4 years ago
TDE Gitea 4d7ce80e10 Reset submodule main/tdebindings/cmake to latest HEAD
4 years ago
TDE Gitea cc83e2ae51 Reset submodule main/tdebindings/admin to latest HEAD
4 years ago
TDE Gitea c9e1864def Reset submodule main/tdebindings/cmake to latest HEAD
4 years ago
TDE Gitea 958373d626 Reset submodule main/tdebindings/cmake to latest HEAD
4 years ago
TDE Gitea b114968319 Reset submodule main/tdebindings/cmake to latest HEAD
4 years ago
TDE Gitea b96a124c60 Reset submodule main/tdebindings/cmake to latest HEAD
4 years ago
TDE Gitea a6aa7d7e22 Reset submodule main/tdebindings/cmake to latest HEAD
4 years ago
TDE Gitea be2d5baef3 Reset submodule main/tdebindings/cmake to latest HEAD
4 years ago
TDE Gitea a6531d7f03 Reset submodule main/tdebindings/cmake to latest HEAD
4 years ago
TDE Gitea eb16bb0447 Reset submodule main/tdebindings/cmake to latest HEAD
4 years ago
TDE Gitea a4abcbefac Reset submodule main/tdebindings/cmake to latest HEAD
4 years ago
Slávek Banko 41cd42072f
Switch all submodules to https.
4 years ago
TDE Gitea ae8d77f34d Reset submodule main/tdebindings/cmake to latest HEAD
5 years ago
TDE Gitea 85aec5b319 Reset submodule main/tdebindings/cmake to latest HEAD
5 years ago
TDE Gitea ca82081784 Reset submodule main/tdebindings/cmake to latest HEAD
5 years ago
TDE Gitea 4a45753c32 Reset submodule main/tdebindings/cmake to latest HEAD
5 years ago
TDE Gitea b169448e51 Reset submodule main/tdebindings/admin to latest HEAD
5 years ago
TDE Gitea 744d629e7a Reset submodule main/tdebindings/cmake to latest HEAD
5 years ago
TDE Gitea 353e904461 Reset submodule main/tdebindings/cmake to latest HEAD
5 years ago
TDE Gitea 85dc54a23d Reset submodule main/tdebindings/cmake to latest HEAD
5 years ago
TDE Gitea 1ccac48f52 Reset submodule main/tdebindings/cmake to latest HEAD
5 years ago
TDE Gitea 6625b79527 Reset submodule main/tdebindings/cmake to latest HEAD
5 years ago
TDE Gitea fd619be0c6 Reset submodule main/tdebindings/cmake to latest HEAD
5 years ago
TDE Gitea a3297e6cbd Reset submodule main/tdebindings/admin to latest HEAD
5 years ago
TDE Gitea 776b49bdaa Reset submodule main/tdebindings/cmake to latest HEAD
5 years ago
TDE Gitea ae1230eed4 Reset submodule main/tdebindings/cmake to latest HEAD
5 years ago
TDE Gitea 13e2eb37f8 Reset submodule main/tdebindings/admin to latest HEAD
6 years ago
Slávek Banko db114ffbd4 Reset submodule main/tdebindings/admin to latest HEAD
6 years ago
Slávek Banko e940f9175b Reset submodule main/tdebindings/admin to latest HEAD
6 years ago
Slávek Banko 080f5089c0 Reset submodule main/tdebindings/admin to latest HEAD
6 years ago
Slávek Banko b5bf5af75a Reset submodule main/tdebindings/cmake to latest HEAD
7 years ago
Slávek Banko 3ea983b61e Reset submodule main/tdebindings/admin to latest HEAD
8 years ago
Slávek Banko a3b0b1d8f1 Reset submodule main/tdebindings/cmake to latest HEAD
8 years ago
Slávek Banko 6a916fec83 Reset submodule main/tdebindings/admin to latest HEAD
8 years ago
Slávek Banko 07aa73dfbb Reset submodule main/tdebindings/admin to latest HEAD
11 years ago
Timothy Pearson efd63ae786 Ensure empty directory is tracked
11 years ago
Slávek Banko ac7e922fd8 Reset submodule main/tdebindings/admin to latest HEAD
11 years ago
Slávek Banko 4be3bf3858 Reset submodule main/tdebindings/cmake to latest HEAD
11 years ago
Slávek Banko 9bdd37a2e8 Reset submodule main/tdebindings/cmake to latest HEAD
11 years ago
Slávek Banko 042b8405f7 Reset submodule main/tdebindings/cmake to latest HEAD
12 years ago
Slávek Banko d4978d1834 Reset submodule main/tdebindings/cmake to latest HEAD
12 years ago
Slávek Banko e37621ed79 Reset submodule main/tdebindings/admin to latest HEAD
12 years ago
Darrell Anderson dc4de2d6d9 Fix references to user profile directory.
12 years ago
Darrell Anderson 7335e1ebea Fix build on Ruby 1.9.x without pkgconfig file.
12 years ago
Slávek Banko 7f39f2b325 Reset submodule main/tdebindings/cmake to latest HEAD
12 years ago
Slávek Banko df8d8ac695 Fix dcopc headers location
12 years ago
Slávek Banko aac8bbed7b Fix build on Ruby 1.9.x without pkgconfig file
12 years ago
Timothy Pearson 0c4cbb697a Fix build on Ruby 1.9.1 and 1.9.2
12 years ago
Timothy Pearson e677cac165 Fix FTBFS on x86 systems
12 years ago
Timothy Pearson 1de311f56c Fix Ruby detection when .pc file is ruby-1.9
12 years ago
Timothy Pearson 208e2511ad Fall back to ruby-1.9 pkgconfig file if needed
12 years ago
Timothy Pearson 591ffa4e6b Fix FTBFS on ruby 1.8.x
12 years ago
Timothy Pearson 7ad4be65ec Fix FTBS on ruby 1.9.x
12 years ago
Timothy Pearson 90e99a3b45 Set HAVE_RUBY_1_9 if ruby 1.9.x installed
12 years ago
Timothy Pearson 22688b624f Use cflags from ruby pc file
12 years ago
Timothy Pearson f6f0d59775 Detect presence of Ruby pkg-config file and adjust directory search accordingly
12 years ago
Slávek Banko 7ad19b98e5 Reset submodule main/tdebindings/cmake to latest HEAD
12 years ago
Slávek Banko fee9e461ff Reset submodule main/tdebindings/admin to latest HEAD
12 years ago
Slávek Banko dffd94ba45 Update final HTML install path so all modules are consistent.
12 years ago
Darrell Anderson 542c5a0066 Update HTML install path references.
12 years ago
Slávek Banko 5bfe96ba7e Update autotools for new DSO linkage style
12 years ago
Timothy Pearson 7d7c5d1dc6 Fix a number of tdebindings build issues
12 years ago
Darrell Anderson 0ef4434057 Fix typos.
12 years ago
Timothy Pearson cf559c4f48 Rename a few stragglers
12 years ago
Timothy Pearson 106d706e3e Fix kalyptus/tqt
12 years ago
Timothy Pearson 79cb7ff953 Modify smoke to handle tqt better
12 years ago
Slávek Banko 2eb60ffe27 Add common directories
12 years ago

3
.gitmodules vendored

@ -0,0 +1,3 @@
[submodule "admin"]
path = admin
url = https://system@scm.trinitydesktop.org/scm/git/tde-common-admin

@ -0,0 +1 @@
Subproject commit 92a6d62b8f8f1836c43b54e3fb13b7ea7bb22e9f

@ -302,4 +302,4 @@ dnl Check if knewstuff is present, if not don't bother..
KDE_CHECK_KNS
dnl remove when fixed
DO_NOT_COMPILE="$DO_NOT_COMPILE dcopjava qtsharp"
DO_NOT_COMPILE="$DO_NOT_COMPILE qtsharp"

@ -9,8 +9,8 @@ libdcopc_la_SOURCES = dcopc.c marshal.c dcopobject.c
libdcopc_la_LIBADD = -lSM -lICE $(GTK2_LIBS) $(GLIB2_LIBS)
libdcopc_la_LDFLAGS = -version-info 1:0 $(X_LDFLAGS) -lICE -no-undefined
include_HEADERS = dcopc.h marshal.h dcopobject.h util.h
includedir = $(prefix)/include/dcopc
dcopcinclude_HEADERS = dcopc.h marshal.h dcopobject.h util.h
dcopcincludedir = $(includedir)/dcopc
noinst_HEADERS = global.h

@ -1,7 +1,3 @@
dnl if test "$GTK_CONFIG" = "no"; then
DO_NOT_COMPILE="$DO_NOT_COMPILE dcopc"
dnl fi
dnl
dnl AC_CHECK_GETHOSTNAME
AC_GTK_2

@ -26,11 +26,11 @@
#undef vform
#endif
#include <qpoint.h>
#include <qrect.h>
#include <qregexp.h>
#include <qsize.h>
#include <qstringlist.h>
#include <tqpoint.h>
#include <tqrect.h>
#include <tqregexp.h>
#include <tqsize.h>
#include <tqstringlist.h>
#include <dcopclient.h>
#include <dcopref.h>

@ -4,7 +4,7 @@ use Config;
# the contents of the Makefile that is written.
print "Trying to find some configuration information...\n";
my $kde_dirs = $ENV{KDEDIRS} || '/usr/local/kde';
my $kde_dirs = $ENV{KDEDIRS} || '/opt/trinity';
my $qt_dir = $ENV{QTDIR} || '/usr/lib/qt';
my $kde_inc = "$kde_dirs/include";
my $kde_lib = "$kde_dirs/lib";
@ -26,7 +26,7 @@ chomp $input, $kde_lib = $input if (($input = <>) =~ /\S/);
WriteMakefile(
NAME => 'DCOP',
VERSION_FROM => 'DCOP.pm',
INC => "-I$qt_inc -I$kde_inc",
INC => "-I$qt_inc -I$kde_inc -I/usr/include/tqt",
LIBS => "-L$qt_lib -lqt-mt -L$kde_lib -lkdecore -lDCOP",
XS => {'DCOP.xs' => 'DCOP.cpp'},
XSOPT => '-C++',

@ -8,11 +8,11 @@ my $kde_inc = "@kde_includes@";
my $kde_lib = "@kde_libraries@";
my $qt_inc = "@qt_includes@";
my $qt_lib = "@qt_libraries@";
WriteMakefile(
NAME => 'DCOP',
VERSION_FROM => '@srcdir@/DCOP.pm',
INC => "-I$qt_inc -I$kde_inc",
INC => "-I$qt_inc -I$kde_inc -I/usr/include/tqt",
LIBS => "-L$qt_lib -lqt-mt -L$kde_lib -lkdecore -lDCOP",
XS => {'DCOP.xs' => 'DCOP.cpp'},
XSOPT => '-C++',

@ -859,6 +859,7 @@ sub identifyDecl
# Class/Struct
elsif ( $decl =~ /^\s*((?:template\s*<.*>)?) # 1 template
\s*(class|struct|union|namespace) # 2 struct type
(?:\s*TQ[A-Z_]*EXPORT[A-Z_]*)?
(?:\s*Q[A-Z_]*EXPORT[A-Z_]*)?
(?:\s*Q_PACKED)?
(?:\s*Q_REFCOUNT)?
@ -1090,9 +1091,13 @@ sub identifyDecl
$skipBlock = 1;
}
# explicit template instantiation, or friend template
elsif ( $decl =~ /(template|friend)\s+class\s+(?:Q[A-Z_]*EXPORT[A-Z_]*\s*)?\w+\s*<.*>\s*;/x ) {
elsif ( $decl =~ /(template|friend)\s+class\s+(?:TQ[A-Z_]*EXPORT[A-Z_]*\s*)?\w+\s*<.*>\s*;/x ) {
# Nothing to be done with those.
}
# explicit template instantiation, or friend template
elsif ( $decl =~ /(template|friend)\s+class\s+(?:Q[A-Z_]*EXPORT[A-Z_]*\s*)?\w+\s*<.*>\s*;/x ) {
# Nothing to be done with those (same as above, but for QT not TQT).
}
else {
## decl is unidentified.
@ -1600,6 +1605,7 @@ sub newMethod
$flags .= "n";
}
$retType =~ s/TQM?_EXPORT[_A-Z]*\s*//;
$retType =~ s/QM?_EXPORT[_A-Z]*\s*//;
$retType =~ s/inline\s+//;
$retType =~ s/extern\s+//;

@ -80,7 +80,7 @@ install_location=
type=DATA
[Workspace_1]
browser_file=file:/opt/trinity/share/doc/HTML/default/kdevelop/about/intro.html
browser_file=file:/opt/trinity/share/doc/tde/HTML/default/kdevelop/about/intro.html
cpp_file=/local/src/kde/kdebindings/kdejava/koala/kdejava/KKeyChooser.cpp
header_file=Untitled.h
openfiles=Untitled.h,Untitled.cpp,/local/src/kde/kdebindings/kdejava/koala/main.cpp,/local/src/kde/kdebindings/kdejava/koala/kdejava/KIO.cpp,/local/src/kde/kdebindings/kdejava/koala/kdejava/KKeyChooser.cpp

@ -33,6 +33,6 @@ noinst_HEADERS = KDESupport.h KDEJavaSlot.h
libkdejava_la_LDFLAGS = $(all_libraries) -no-undefined -version-info $(SOMAJOR):$(SOMINOR):$(SOSUBMINOR)
libkdejava_la_LIBADD = $(top_builddir)/qtjava/javalib/qtjava/libqtjavasupport.la -lkmdi $(LIB_KHTML) $(LIB_KSPELL) $(LIB_KIO)
libkdejava_la_LIBADD = $(top_builddir)/qtjava/javalib/qtjava/libqtjavasupport.la -lkmdi $(LIB_KHTML) $(LIB_KSPELL) $(LIB_KIO) $(LIB_KDECORE) $(LIB_KPARTS) $(LIB_KDEUI) $(LIB_KUTILS) $(LIB_KDEPRINT) -lDCOP -lkdefx
KDE_OPTIONS = qtonly nofinal

@ -144,7 +144,7 @@ public class KEditToolbarWidget extends QWidget implements KXMLGUIClientInterfac
public native KActionCollection actionCollection();
/**
Save any changes the user made. The file will be in the user's
local directory (usually $HOME/.kde/share/apps/\<appname\>). The
local directory (usually $HOME/.trinity/share/apps/\<appname\>). The
filename will be the one specified in the constructor.. or the
made up one if the filename was NULL.
@return The status of whether or not the save succeeded.

@ -23,17 +23,17 @@ import java.util.ArrayList;
The main idea behind KStandardDirs is that there are several
toplevel prefixes below which the files lie. One of these prefixes is
the one where the user installed kdelibs, one is where the
application was installed, and one is $HOME/.kde, but there
application was installed, and one is $HOME/.trinity, but there
may be even more. Under these prefixes there are several well
defined suffixes where specific resource types are to be found.
For example, for the resource type "html" the suffixes could be
share/doc/HTML and share/doc/kde/HTML.
share/doc/HTML and share/doc/tde/HTML.
So the search algorithm basically appends to each prefix each registered
suffix and tries to locate the file there.
To make the thing even more complex, it's also possible to register
absolute paths that KStandardDirs looks up after not finding anything
in the former steps. They can be useful if the user wants to provide
specific directories that aren't in his $HOME/.kde directory for,
specific directories that aren't in his $HOME/.trinity directory for,
for example, icons.
<li><b>Standard resources that kdelibs allocates are:</b></li>
@ -153,13 +153,13 @@ import java.util.ArrayList;
<li>
KDEHOME: The directory where changes are saved to. This directory is
used to search for resources first. If KDEHOME is not
specified it defaults to "$HOME/.kde"
specified it defaults to "$HOME/.trinity"
</li>
<li>
KDEROOTHOME: Like KDEHOME, but used for the root user.
If KDEROOTHOME is not set it defaults to the .kde directory in the
home directory of root, usually "/root/.kde".
home directory of root, usually "/root/.trinity".
Note that the setting of $HOME is ignored in this case.
</li>
@author Stephan Kulow <coolo@kde.org> and Sirtaj Singh Kang <taj@kde.org>
@ -312,7 +312,7 @@ public class KStandardDirs implements QtSupport {
</li>
<li>
/home/joe/.kde/share/applnk/Settings/
/home/joe/.trinity/share/applnk/Settings/
</li>
Note that it appends / to the end of the directories,
so you can use this right away as directory names.
@ -478,7 +478,7 @@ public class KStandardDirs implements QtSupport {
public native String kfsstnd_xdg_data_prefixes();
/**
Returns the toplevel directory in which KStandardDirs
will store things. Most likely $HOME/.kde
will store things. Most likely $HOME/.trinity
Don't use this function if you can use locateLocal
@return the toplevel directory
@ -571,7 +571,7 @@ public class KStandardDirs implements QtSupport {
</li>
<li>
html - share/doc/HTML
html - share/doc/tde/HTML
</li>
<li>

@ -1,4 +1,4 @@
INCLUDES = $(all_includes) -I$(RUBY_ARCHDIR)
INCLUDES = $(all_includes) -I$(RUBY_ARCHDIR) $(RUBY_CFLAGS)
bin_PROGRAMS = krubyinit
krubyinit_LDFLAGS = -module $(all_libraries) -version-info 0:0:0 -L$(top_srcdir)/smoke/kde/ -L$(RUBY_LIBDIR) -lkmdi -lknewstuff

@ -1,5 +1,15 @@
#include <ruby.h>
#define HAVE_STRLCAT_PROTO 1
#define HAVE_STRLCPY_PROTO 1
#include "config.h"
#ifndef HAVE_RUBY_1_9
#define RARRAY_LEN(x) (RARRAY(x)->len)
#define RSTRING_LEN(x) (RSTRING(x)->len)
#define rb_str_catf_1 rb_str_catf
#endif
/***************************************************************************
krubyinit - makes use of kdeinit_wrapper possible for ruby programs
-------------------
@ -17,13 +27,18 @@
* *
***************************************************************************/
// this name can be used to allow apps
// this name can be used to allow apps
// to detect what they were started with
static const char* script_name = "krubyinit_app";
int main(int argc, char **argv) {
ruby_init();
ruby_script((char*)script_name);
ruby_options(argc, argv);
#ifdef HAVE_RUBY_1_9
void* node = ruby_options(argc, argv);
ruby_run_node(node);
#else // HAVE_RUBY_1_9
ruby_options(argc, argv);
ruby_run();
#endif // HAVE_RUBY_1_9
}

@ -40,6 +40,16 @@
#include <smokeruby.h>
#include <smoke.h>
#define HAVE_STRLCAT_PROTO 1
#define HAVE_STRLCPY_PROTO 1
#include "config.h"
#ifndef HAVE_RUBY_1_9
#define RARRAY_LEN(x) (RARRAY(x)->len)
#define RSTRING_LEN(x) (RSTRING(x)->len)
#define rb_str_catf_1 rb_str_catf
#endif
extern "C" {
extern VALUE qt_internal_module;
extern VALUE kconfigskeleton_class;
@ -805,7 +815,7 @@ public:
// isn't in the Smoke runtime
TQValueList<DCOPRef> windowList;
for (long i = 0; i < RARRAY(result)->len; i++) {
for (long i = 0; i < RARRAY_LEN(result); i++) {
VALUE item = rb_ary_entry(result, i);
smokeruby_object *o = value_obj_info(item);
if( !o || !o->ptr)
@ -822,7 +832,7 @@ public:
// And special case this type too
TQValueList<TQCString> propertyList;
for (long i = 0; i < RARRAY(result)->len; i++) {
for (long i = 0; i < RARRAY_LEN(result); i++) {
VALUE item = rb_ary_entry(result, i);
propertyList.append(TQCString(StringValuePtr(item)));
}
@ -836,7 +846,7 @@ public:
// Convert the ruby hash to an array of key/value arrays
VALUE temp = rb_funcall(result, rb_intern("to_a"), 0);
for (long i = 0; i < RARRAY(temp)->len; i++) {
for (long i = 0; i < RARRAY_LEN(temp); i++) {
VALUE action = rb_ary_entry(rb_ary_entry(temp, i), 0);
VALUE item = rb_ary_entry(rb_ary_entry(temp, i), 1);
@ -926,7 +936,7 @@ k_dcop_signal(int argc, VALUE * argv, VALUE self)
{
VALUE dcopObject = rb_funcall(kde_module, rb_intern("createDCOPObject"), 1, self);
TQString signalname(rb_id2name(rb_frame_last_func()));
TQString signalname(rb_id2name(rb_frame_this_func()));
VALUE args = getdcopinfo(self, signalname);
if(args == Qnil) return Qfalse;
@ -1020,7 +1030,7 @@ new_kde(int argc, VALUE * argv, VALUE klass)
if (rb_funcall(kde_module, rb_intern("hasDCOPSignals"), 1, klass) == Qtrue) {
VALUE signalNames = rb_funcall(kde_module, rb_intern("getDCOPSignalNames"), 1, klass);
for (long index = 0; index < RARRAY(signalNames)->len; index++) {
for (long index = 0; index < RARRAY_LEN(signalNames); index++) {
VALUE signal = rb_ary_entry(signalNames, index);
rb_define_method(klass, StringValuePtr(signal), (VALUE (*) (...)) k_dcop_signal, -1);
}
@ -1088,9 +1098,9 @@ konsole_part_startprogram(VALUE self, VALUE value_program, VALUE value_args)
TQStrList *args = new TQStrList;
if (value_args != Qnil) {
for (long i = 0; i < RARRAY(value_args)->len; i++) {
for (long i = 0; i < RARRAY_LEN(value_args); i++) {
VALUE item = rb_ary_entry(value_args, i);
args->append(TQString::fromLatin1(StringValuePtr(item), RSTRING(item)->len));
args->append(TQString::fromLatin1(StringValuePtr(item), RSTRING_LEN(item)));
}
}

@ -1,4 +1,4 @@
INCLUDES = -I$(top_srcdir)/smoke -I$(top_srcdir)/qtruby/rubylib/qtruby $(all_includes) -I$(RUBY_ARCHDIR)
INCLUDES = -I$(top_srcdir)/smoke -I$(top_srcdir)/qtruby/rubylib/qtruby $(all_includes) -I$(RUBY_ARCHDIR) $(RUBY_CFLAGS)
rubylibdir = $(RUBY_ARCHDIR)
rubylib_LTLIBRARIES = korundum.la

@ -1,17 +1,75 @@
KDE_FIND_PATH(pkg-config, PKGCONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
AC_MSG_WARN([Could not find pkg-config])
])
AC_CHECK_PROG(RUBY, ruby, ruby)
if test -z "$RUBY"; then
DO_NOT_COMPILE="$DO_NOT_COMPILE korundum"
else
AC_MSG_CHECKING(for ruby dirs)
RUBY_ARCHDIR=`ruby -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"archdir"@:>@)'`
RUBY_SITEARCHDIR=`ruby -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitearchdir"@:>@)'`
RUBY_SITEDIR=`ruby -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitelibdir"@:>@)'`
RUBY_RUBYLIBDIR=`ruby -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubylibdir"@:>@)'`
AC_MSG_RESULT([archdir $RUBY_ARCHDIR, sitearchdir $RUBY_SITEARCHDIR, sitedir $RUBY_SITEDIR])
# Note: pkgconfig file exists only for ruby >= 1.9.3
if test -n "$PKGCONFIG"; then
RUBY_VERSION=`$PKGCONFIG ruby --modversion 2>/dev/null`
if test -n "$RUBY_VERSION"; then
RUBY_CFLAGS=`$PKGCONFIG ruby --cflags`
fi
if test -z "$RUBY_VERSION"; then
RUBY_VERSION=`$PKGCONFIG ruby-1.9 --modversion 2>/dev/null`
if test -n "$RUBY_VERSION"; then
RUBY_CFLAGS=`$PKGCONFIG ruby-1.9 --cflags`
fi
fi
if test -z "$RUBY_VERSION"; then
# pkgconfig file does not exist but might be 1.9.1: RUBY_VERSION defined in ruby/version.h
if test -n "$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubyhdrdir"@:>@)'"; then
# rubyhdrdir parameter works only in >=1.9.1; this is 1.9.1
RUBY_MAJOR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"['MAJOR']"@:>@)'`
RUBY_MINOR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"['MINOR']"@:>@)'`
RUBY_TEENY=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"['TEENY']"@:>@)'`
if test "$RUBY_MAJOR" == "1" && test "$RUBY_MINOR" == "9"; then
RUBY_VERSION="$RUBY_MAJOR.$RUBY_MINOR.$RUBY_TEENY"
RUBY_CFLAGS="-I`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubyhdrdir"@:>@)'`"
RUBY_CFLAGS="$RUBY_CFLAGS/`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"arch"@:>@)'` $RUBY_CFLAGS"
fi
fi
fi
if test -n "$RUBY_VERSION"; then
RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"archdir"@:>@)'`
RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"sitearchdir"@:>@)'`
RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"sitelibdir"@:>@)'`
RUBY_RUBYLIBDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubylibdir"@:>@)'`
RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"libdir"@:>@)'`
RUBY_INCLUDEDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubyhdrdir"@:>@)'`
RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'`
AC_DEFINE_UNQUOTED(HAVE_RUBY_1_9, 1, [Defines if your system has Ruby 1.9.x])
fi
fi
if test -z "$RUBY_VERSION"; then
RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"archdir"@:>@)'`
RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitearchdir"@:>@)'`
RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitelibdir"@:>@)'`
RUBY_RUBYLIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubylibdir"@:>@)'`
RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"libdir"@:>@)'`
RUBY_INCLUDEDIR=$RUBY_ARCHDIR
RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'`
fi
AC_MSG_RESULT([
archdir $RUBY_ARCHDIR,
sitearchdir $RUBY_SITEARCHDIR,
sitedir $RUBY_SITEDIR,
rubylibdir $RUBY_RUBYLIBDIR,
libdir $RUBY_LIBDIR,
includedir $RUBY_INCLUDEDIR,
librubyarg $RUBY_LIBRUBYARG,
cflags $RUBY_CFLAGS])
AC_SUBST(RUBY_ARCHDIR)
AC_SUBST(RUBY_SITEARCHDIR)
AC_SUBST(RUBY_RUBYLIBDIR)
AC_SUBST(RUBY_SITEDIR)
AC_SUBST(RUBY_RUBYLIBDIR)
AC_SUBST(RUBY_LIBDIR)
AC_SUBST(RUBY_INCLUDEDIR)
AC_SUBST(RUBY_LIBRUBYARG)
AC_SUBST(RUBY_CFLAGS)
fi

@ -52,6 +52,16 @@
#include <dom/dom_string.h>
#include <dom/html_element.h>
#define HAVE_STRLCAT_PROTO 1
#define HAVE_STRLCPY_PROTO 1
#include "config.h"
#ifndef HAVE_RUBY_1_9
#define RARRAY_LEN(x) (RARRAY(x)->len)
#define RSTRING_LEN(x) (RSTRING(x)->len)
#define rb_str_catf_1 rb_str_catf
#endif
extern "C" {
extern VALUE set_obj_info(const char * className, smokeruby_object * o);
};
@ -122,7 +132,7 @@ void marshall_QCStringList(Marshall *m) {
break;
}
int count = RARRAY(list)->len;
int count = RARRAY_LEN(list);
QCStringList *stringlist = new QCStringList;
for(long i = 0; i < count; i++) {
@ -131,7 +141,7 @@ void marshall_QCStringList(Marshall *m) {
stringlist->append(TQCString());
continue;
}
stringlist->append(TQCString(StringValuePtr(item), RSTRING(item)->len + 1));
stringlist->append(TQCString(StringValuePtr(item), RSTRING_LEN(item) + 1));
}
m->item().s_voidp = stringlist;
@ -184,19 +194,19 @@ void marshall_KCmdLineOptions(Marshall *m) {
VALUE optionslist = *(m->var());
if (optionslist == Qnil
|| TYPE(optionslist) != T_ARRAY
|| RARRAY(optionslist)->len == 0 )
|| RARRAY_LEN(optionslist) == 0 )
{
m->item().s_voidp = 0;
break;
}
// Allocate 'length + 1' entries, to include an all NULLs last entry
KCmdLineOptions *cmdLineOptions = (KCmdLineOptions *) calloc( RARRAY(optionslist)->len + 1,
KCmdLineOptions *cmdLineOptions = (KCmdLineOptions *) calloc( RARRAY_LEN(optionslist) + 1,
sizeof(struct KCmdLineOptions) );
VALUE options;
long i;
for(i = 0; i < RARRAY(optionslist)->len; i++) {
for(i = 0; i < RARRAY_LEN(optionslist); i++) {
options = rb_ary_entry(optionslist, i);
VALUE temp = rb_ary_entry(options, 0);
cmdLineOptions[i].name = StringValuePtr(temp);
@ -244,7 +254,7 @@ void marshall_WIdList(Marshall *m) {
m->item().s_voidp = 0;
break;
}
int count = RARRAY(list)->len;
int count = RARRAY_LEN(list);
TQValueList<WId> *valuelist = new TQValueList<WId>;
long i;
for(i = 0; i < count; i++) {
@ -815,7 +825,7 @@ void marshall_KURLList(Marshall *m) {
m->item().s_voidp = 0;
break;
}
int count = RARRAY(list)->len;
int count = RARRAY_LEN(list);
KURL::List *kurllist = new KURL::List;
long i;
for(i = 0; i < count; i++) {
@ -916,11 +926,11 @@ void marshall_UDSEntryList(Marshall *m) {
KIO::UDSEntryList *cpplist = new KIO::UDSEntryList;
for(long i = 0; i < RARRAY(list)->len; i++) {
for(long i = 0; i < RARRAY_LEN(list); i++) {
VALUE item = rb_ary_entry(list, i);
KIO::UDSEntry *cppsublist = new KIO::UDSEntry;
for (int j = 0; j < RARRAY(item)->len; j++) {
for (int j = 0; j < RARRAY_LEN(item); j++) {
VALUE subitem = rb_ary_entry(item, j);
smokeruby_object *o = value_obj_info(subitem);
if(!o || !o->ptr)
@ -998,7 +1008,7 @@ void marshall_ItemList(Marshall *m) {
m->item().s_voidp = 0;
break;
}
int count = RARRAY(list)->len;
int count = RARRAY_LEN(list);
ItemList *cpplist = new ItemList;
long i;
for(i = 0; i < count; i++) {
@ -1103,7 +1113,7 @@ void marshall_ValueItemList(Marshall *m) {
m->item().s_voidp = 0;
break;
}
int count = RARRAY(list)->len;
int count = RARRAY_LEN(list);
ItemList *cpplist = new ItemList;
long i;
for(i = 0; i < count; i++) {
@ -1211,7 +1221,7 @@ void marshall_Map(Marshall *m) {
// Convert the ruby hash to an array of key/value arrays
VALUE temp = rb_funcall(hash, rb_intern("to_a"), 0);
for (long i = 0; i < RARRAY(temp)->len; i++) {
for (long i = 0; i < RARRAY_LEN(temp); i++) {
VALUE key = rb_ary_entry(rb_ary_entry(temp, i), 0);
VALUE value = rb_ary_entry(rb_ary_entry(temp, i), 1);
@ -1316,7 +1326,7 @@ void marshall_QMapQCStringDCOPRef(Marshall *m) {
// Convert the ruby hash to an array of key/value arrays
VALUE temp = rb_funcall(hash, rb_intern("to_a"), 0);
for (long i = 0; i < RARRAY(temp)->len; i++) {
for (long i = 0; i < RARRAY_LEN(temp); i++) {
VALUE key = rb_ary_entry(rb_ary_entry(temp, i), 0);
VALUE value = rb_ary_entry(rb_ary_entry(temp, i), 1);

@ -294,7 +294,7 @@
<xsl:value-of select="$nlIndent8"/>
<xsl:value-of select="concat($object, '.', $method,
'( new QSize( ', kde:if(width, width, 0), ', '
, kde:if(heigth, heigth, 0),
, kde:if(height, height, 0),
' ) );')"/>
</xsl:template>

@ -80,7 +80,7 @@ install_location=
type=DATA
[Workspace_1]
browser_file=file:/opt/kde2/share/doc/HTML/default/kdevelop/about/intro.html
browser_file=file:/opt/kde2/share/doc/tde/HTML/default/kdevelop/about/intro.html
cpp_file=Untitled.cpp
header_file=/local/src/kde/kdebindings/qtjava/javalib/qtjava/Makefile.am
openfiles=Untitled.h,Untitled.cpp,/local/src/kde/kdebindings/qtjava/javalib/org/kde/qt/Makefile.am,/local/src/kde/kdebindings/qtjava/javalib/qtjava/Makefile.am

@ -103,7 +103,7 @@ the other widget (called the QLabel's "buddy"). Example:
(the <a href="tqlineedit.html">TQLineEdit</a>) when the user presses <dfn>Alt-P.</dfn> You can also
use the <a href="#191701">setBuddy</a>() function to accomplish the same.
<p>
<p>See also <a href="tqlineedit.html">TQLineEdit</a>, <a href="tqtextview.html">TQTextView</a>, <a href="tqpixmap.html">TQPixmap</a>, <a href="tqmovie.html">TQMovie</a> and <a href="guibooks.html#fowler">GUI Design Handbook: Label</a>
<p>See also <a href="tqlineedit.html">TQLineEdit</a>, <a href="textview.html">TQTextView</a>, <a href="tqpixmap.html">TQPixmap</a>, <a href="tqmovie.html">TQMovie</a> and <a href="guibooks.html#fowler">GUI Design Handbook: Label</a>
<p>Examples:
<a href="cursor-cursor-cpp.html#TQLabel">cursor/cursor.cpp</a>
<a href="layout-layout-cpp.html#TQLabel">layout/layout.cpp</a>
@ -208,7 +208,7 @@ Enables auto-resizing if <em>enable</em> is TRUE, or disables it if <em>enable</
<p>When auto-resizing is enabled, the label will resize itself to fit
the contents whenever the contents change. The top left corner is
not moved. This is useful for TQLabel widgets that are not managed by
a <a href="tqlayout.html">TQLayout</a> (e.g. top-level widgets).
a <a href="layout.html">TQLayout</a> (e.g. top-level widgets).
<p>Auto-resizing is disabled by default.
<p>See also <a href="#75b2a1">autoResize</a>(), <a href="tqwidget.html#ab3108">adjustSize</a>() and <a href="#614dd5">sizeHint</a>().
<h3 class="fn">void <a name="191701"></a>TQLabel::setBuddy ( <a href="tqwidget.html">TQWidget</a> * buddy ) <code>[virtual]</code></h3>
@ -294,7 +294,7 @@ the format of <em>text.</em>
the buddy accelerator key is updated from the new text.
<p>The label resizes itself if auto-resizing is enabled.
<p>Note that Qlabel is well suited to display small rich text documents
only. For large documents, use <a href="tqtextview.html">TQTextView</a> instead. It will flicker
only. For large documents, use <a href="textview.html">TQTextView</a> instead. It will flicker
less on resize and can also provide a scrollbar if necessary.
<p>See also <a href="#72cf09">text</a>(), <a href="#5de3f9">setTextFormat</a>(), <a href="#191701">setBuddy</a>() and <a href="#1f406e">setAlignment</a>().
<p>Examples:

@ -1,4 +1,4 @@
INCLUDES = $(all_includes) -I$(RUBY_ARCHDIR)
INCLUDES = $(all_includes) -I$(RUBY_ARCHDIR) $(RUBY_CFLAGS)
bin_PROGRAMS = qtrubyinit
qtrubyinit_LDFLAGS = -module $(all_libraries) -version-info 0:0:0 -L$(top_srcdir)/smoke/qt/ -L$(RUBY_LIBDIR)

@ -1,5 +1,15 @@
#include <ruby.h>
#define HAVE_STRLCAT_PROTO 1
#define HAVE_STRLCPY_PROTO 1
#include "config.h"
#ifndef HAVE_RUBY_1_9
#define RARRAY_LEN(x) (RARRAY(x)->len)
#define RSTRING_LEN(x) (RSTRING(x)->len)
#define rb_str_catf_1 rb_str_catf
#endif
/***************************************************************************
qrubyinit - makes use of kdeinit_wrapper possible for ruby programs
-------------------
@ -17,13 +27,18 @@ qrubyinit - makes use of kdeinit_wrapper possible for ruby programs
* *
***************************************************************************/
// this name can be used to allow apps
// this name can be used to allow apps
// to detect what they were started with
static const char* script_name = "qrubyinit_app";
int main(int argc, char **argv) {
ruby_init();
ruby_script((char*)script_name);
ruby_options(argc, argv);
#ifdef HAVE_RUBY_1_9
void* node = ruby_options(argc, argv);
ruby_run_node(node);
#else // HAVE_RUBY_1_9
ruby_options(argc, argv);
ruby_run();
#endif // HAVE_RUBY_1_9
}

@ -1,7 +1,7 @@
INCLUDES = -I$(top_srcdir)/smoke -I$(top_srcdir)/qtruby/rubylib/qtruby $(all_includes) -I$(RUBY_ARCHDIR)
INCLUDES = -I$(top_srcdir)/smoke -I$(top_srcdir)/qtruby/rubylib/qtruby $(all_includes) -I$(RUBY_ARCHDIR) $(RUBY_CFLAGS)
rubylibdir = $(RUBY_ARCHDIR)
rubylib_LTLIBRARIES = qui.la
qui_la_SOURCES = qui.cpp
qui_la_LDFLAGS = -module -export-dynamic $(all_libraries) -version-info 0:0:0
qui_la_LIBADD = -lqui
qui_la_LIBADD = -lqui

@ -1,4 +1,4 @@
INCLUDES = -I$(top_srcdir)/smoke $(all_includes) -I$(RUBY_ARCHDIR)
INCLUDES = -I$(top_srcdir)/smoke $(all_includes) -I$(RUBY_ARCHDIR) $(RUBY_CFLAGS)
noinst_HEADERS = qtruby.h marshall.h smokeruby.h extconf.rb

@ -60,6 +60,16 @@
#include "smokeruby.h"
#include "smoke.h"
#define HAVE_STRLCAT_PROTO 1
#define HAVE_STRLCPY_PROTO 1
#include "config.h"
#ifndef HAVE_RUBY_1_9
#define RARRAY_LEN(x) (RARRAY(x)->len)
#define RSTRING_LEN(x) (RSTRING(x)->len)
#define rb_str_catf_1 rb_str_catf
#endif
// #define DEBUG
#define QTRUBY_VERSION "1.0.13"
@ -110,7 +120,7 @@ bool application_terminated = false;
};
#define logger logger_backend
void rb_str_catf(VALUE self, const char *format, ...) __attribute__ ((format (printf, 2, 3)));
void rb_str_catf_1(VALUE self, const char *format, ...) __attribute__ ((format (printf, 2, 3)));
static VALUE (*_new_kde)(int, VALUE *, VALUE) = 0;
static VALUE (*_kconfigskeletonitem_immutable)(VALUE) = 0;
@ -820,7 +830,7 @@ public:
}
};
void rb_str_catf(VALUE self, const char *format, ...)
void rb_str_catf_1(VALUE self, const char *format, ...)
{
va_list ap;
va_start(ap, format);
@ -985,16 +995,16 @@ VALUE prettyPrintMethod(Smoke::Index id)
VALUE r = rb_str_new2("");
Smoke::Method &meth = qt_Smoke->methods[id];
const char *tname = qt_Smoke->types[meth.ret].name;
if(meth.flags & Smoke::mf_static) rb_str_catf(r, "static ");
rb_str_catf(r, "%s ", (tname ? tname:"void"));
rb_str_catf(r, "%s::%s(", qt_Smoke->classes[meth.classId].className, qt_Smoke->methodNames[meth.name]);
if(meth.flags & Smoke::mf_static) rb_str_catf_1(r, "static ");
rb_str_catf_1(r, "%s ", (tname ? tname:"void"));
rb_str_catf_1(r, "%s::%s(", qt_Smoke->classes[meth.classId].className, qt_Smoke->methodNames[meth.name]);
for(int i = 0; i < meth.numArgs; i++) {
if(i) rb_str_catf(r, ", ");
if(i) rb_str_catf_1(r, ", ");
tname = qt_Smoke->types[qt_Smoke->argumentList[meth.args+i]].name;
rb_str_catf(r, "%s", (tname ? tname:"void"));
rb_str_catf_1(r, "%s", (tname ? tname:"void"));
}
rb_str_catf(r, ")");
if(meth.flags & Smoke::mf_const) rb_str_catf(r, " const");
rb_str_catf_1(r, ")");
if(meth.flags & Smoke::mf_const) rb_str_catf_1(r, " const");
return r;
}
@ -1177,7 +1187,7 @@ inspect_qobject(VALUE self)
// Start with #<Qt::HBoxLayout:0x30139030> from the original inspect() call
// Drop the closing '>'
VALUE inspect_str = rb_call_super(0, 0);
rb_str_resize(inspect_str, RSTRING(inspect_str)->len - 1);
rb_str_resize(inspect_str, RSTRING_LEN(inspect_str) - 1);
smokeruby_object * o = 0;
Data_Get_Struct(self, smokeruby_object, o);
@ -1220,7 +1230,7 @@ pretty_print_qobject(VALUE self, VALUE pp)
// Start with #<Qt::HBoxLayout:0x30139030>
// Drop the closing '>'
VALUE inspect_str = rb_funcall(self, rb_intern("to_s"), 0, 0);
rb_str_resize(inspect_str, RSTRING(inspect_str)->len - 1);
rb_str_resize(inspect_str, RSTRING_LEN(inspect_str) - 1);
rb_funcall(pp, rb_intern("text"), 1, inspect_str);
rb_funcall(pp, rb_intern("breakable"), 0);
@ -1236,7 +1246,7 @@ pretty_print_qobject(VALUE self, VALUE pp)
VALUE obj = getPointerObject(qobject->parent());
if (obj != Qnil) {
VALUE parent_inspect_str = rb_funcall(obj, rb_intern("to_s"), 0, 0);
rb_str_resize(parent_inspect_str, RSTRING(parent_inspect_str)->len - 1);
rb_str_resize(parent_inspect_str, RSTRING_LEN(parent_inspect_str) - 1);
parentInspectString = StringValuePtr(parent_inspect_str);
} else {
parentInspectString.sprintf("#<%s:0x0", qobject->parent()->className());
@ -1382,7 +1392,7 @@ static Smoke::Index new_qvariant_qmap = 0;
return *(c.var());
} else if ( argc == 1
&& TYPE(argv[0]) == T_ARRAY
&& RARRAY(argv[0])->len > 0
&& RARRAY_LEN(argv[0]) > 0
&& TYPE(rb_ary_entry(argv[0], 0)) != T_STRING )
{
_current_method = new_qvariant_qlist;
@ -1741,7 +1751,7 @@ new_qapplication(int argc, VALUE * argv, VALUE klass)
VALUE * local_argv = (VALUE *) calloc(argc + 1, sizeof(VALUE));
VALUE temp = rb_ary_dup(argv[0]);
rb_ary_unshift(temp, rb_gv_get("$0"));
local_argv[0] = INT2NUM(RARRAY(temp)->len);
local_argv[0] = INT2NUM(RARRAY_LEN(temp));
local_argv[1] = temp;
result = new_qt(2, local_argv, klass);
free(local_argv);
@ -1772,7 +1782,7 @@ qapplication_argv(VALUE /*self*/)
VALUE
getmetainfo(VALUE self, int &offset, int &index)
{
const char * signalname = rb_id2name(rb_frame_last_func());
const char * signalname = rb_id2name(rb_frame_this_func());
VALUE metaObject_value = rb_funcall(qt_internal_module, rb_intern("getMetaObject"), 1, self);
smokeruby_object *ometa = value_obj_info(metaObject_value);
@ -1862,7 +1872,7 @@ qt_invoke(int /*argc*/, VALUE * argv, VALUE self)
// Now, I need to find out if this means me
int index;
char *slotname;
bool isSignal = qstrcmp(rb_id2name(rb_frame_last_func()), "qt_emit") == 0;
bool isSignal = qstrcmp(rb_id2name(rb_frame_this_func()), "qt_emit") == 0;
VALUE mocArgs = getslotinfo(self, id, slotname, index, isSignal);
if(mocArgs == Qnil) {
// No ruby slot/signal found, assume the target is a C++ one
@ -2009,7 +2019,7 @@ qbytearray_setRawData(VALUE self, VALUE data)
return Qnil;
}
TQByteArray * dataArray = (TQByteArray*) o->ptr;
dataArray->setRawData(StringValuePtr(data), RSTRING(data)->len);
dataArray->setRawData(StringValuePtr(data), RSTRING_LEN(data));
return self;
}
@ -2195,7 +2205,7 @@ make_QUMethod(VALUE /*self*/, VALUE name_value, VALUE params)
m->name = new char[strlen(name) + 1]; // this too
strcpy((char*)m->name, name);
m->parameters = 0;
m->count = RARRAY(params)->len;
m->count = RARRAY_LEN(params);
if (m->count > 0) {
m->parameters = new QUParameter[m->count];
@ -2213,7 +2223,7 @@ make_QUMethod(VALUE /*self*/, VALUE name_value, VALUE params)
static VALUE
make_QMetaData_tbl(VALUE /*self*/, VALUE list)
{
long count = RARRAY(list)->len;
long count = RARRAY_LEN(list);
QMetaData *m = new QMetaData[count];
for (long i = 0; i < count; i++) {
@ -2281,7 +2291,7 @@ add_metaobject_methods(VALUE self, VALUE klass)
static VALUE
add_signal_methods(VALUE self, VALUE klass, VALUE signalNames)
{
for (long index = 0; index < RARRAY(signalNames)->len; index++) {
for (long index = 0; index < RARRAY_LEN(signalNames); index++) {
VALUE signal = rb_ary_entry(signalNames, index);
rb_define_method(klass, StringValuePtr(signal), (VALUE (*) (...)) qt_signal, -1);
}
@ -2597,28 +2607,28 @@ dumpCandidates(VALUE /*self*/, VALUE rmeths)
{
VALUE errmsg = rb_str_new2("");
if(rmeths != Qnil) {
int count = RARRAY(rmeths)->len;
int count = RARRAY_LEN(rmeths);
for(int i = 0; i < count; i++) {
rb_str_catf(errmsg, "\t");
rb_str_catf_1(errmsg, "\t");
int id = NUM2INT(rb_ary_entry(rmeths, i));
Smoke::Method &meth = qt_Smoke->methods[id];
const char *tname = qt_Smoke->types[meth.ret].name;
if(meth.flags & Smoke::mf_enum) {
rb_str_catf(errmsg, "enum ");
rb_str_catf(errmsg, "%s::%s", qt_Smoke->classes[meth.classId].className, qt_Smoke->methodNames[meth.name]);
rb_str_catf(errmsg, "\n");
rb_str_catf_1(errmsg, "enum ");
rb_str_catf_1(errmsg, "%s::%s", qt_Smoke->classes[meth.classId].className, qt_Smoke->methodNames[meth.name]);
rb_str_catf_1(errmsg, "\n");
} else {
if(meth.flags & Smoke::mf_static) rb_str_catf(errmsg, "static ");
rb_str_catf(errmsg, "%s ", (tname ? tname:"void"));
rb_str_catf(errmsg, "%s::%s(", qt_Smoke->classes[meth.classId].className, qt_Smoke->methodNames[meth.name]);
rb_str_catf_1(errmsg, "%s ", (tname ? tname:"void"));
rb_str_catf_1(errmsg, "%s::%s(", qt_Smoke->classes[meth.classId].className, qt_Smoke->methodNames[meth.name]);
for(int i = 0; i < meth.numArgs; i++) {
if(i) rb_str_catf(errmsg, ", ");
if(i) rb_str_catf_1(errmsg, ", ");
tname = qt_Smoke->types[qt_Smoke->argumentList[meth.args+i]].name;
rb_str_catf(errmsg, "%s", (tname ? tname:"void"));
rb_str_catf_1(errmsg, "%s", (tname ? tname:"void"));
}
rb_str_catf(errmsg, ")");
if(meth.flags & Smoke::mf_const) rb_str_catf(errmsg, " const");
rb_str_catf(errmsg, "\n");
rb_str_catf_1(errmsg, ")");
if(meth.flags & Smoke::mf_const) rb_str_catf_1(errmsg, " const");
rb_str_catf_1(errmsg, "\n");
}
}
}

@ -1,21 +1,75 @@
KDE_FIND_PATH(pkg-config, PKGCONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
AC_MSG_WARN([Could not find pkg-config])
])
AC_CHECK_PROG(RUBY, ruby, ruby)
if test -z "$RUBY"; then
DO_NOT_COMPILE="$DO_NOT_COMPILE qtruby"
else
AC_MSG_CHECKING(for ruby dirs)
RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"archdir"@:>@)'`
RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitearchdir"@:>@)'`
RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitelibdir"@:>@)'`
RUBY_RUBYLIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubylibdir"@:>@)'`
RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"libdir"@:>@)'`
RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'`
AC_MSG_RESULT([archdir $RUBY_ARCHDIR, sitearchdir $RUBY_SITEARCHDIR, sitedir $RUBY_SITEDIR, libdir $RUBY_LIBDIR, librubyarg $RUBY_LIBRUBYARG])
# Note: pkgconfig file exists only for ruby >= 1.9.3
if test -n "$PKGCONFIG"; then
RUBY_VERSION=`$PKGCONFIG ruby --modversion 2>/dev/null`
if test -n "$RUBY_VERSION"; then
RUBY_CFLAGS=`$PKGCONFIG ruby --cflags`
fi
if test -z "$RUBY_VERSION"; then
RUBY_VERSION=`$PKGCONFIG ruby-1.9 --modversion 2>/dev/null`
if test -n "$RUBY_VERSION"; then
RUBY_CFLAGS=`$PKGCONFIG ruby-1.9 --cflags`
fi
fi
if test -z "$RUBY_VERSION"; then
# pkgconfig file does not exist but might be 1.9.1: RUBY_VERSION defined in ruby/version.h
if test -n "$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubyhdrdir"@:>@)'"; then
# rubyhdrdir parameter works only in >=1.9.1; this is 1.9.1
RUBY_MAJOR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"['MAJOR']"@:>@)'`
RUBY_MINOR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"['MINOR']"@:>@)'`
RUBY_TEENY=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"['TEENY']"@:>@)'`
if test "$RUBY_MAJOR" == "1" && test "$RUBY_MINOR" == "9"; then
RUBY_VERSION="$RUBY_MAJOR.$RUBY_MINOR.$RUBY_TEENY"
RUBY_CFLAGS="-I`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubyhdrdir"@:>@)'`"
RUBY_CFLAGS="$RUBY_CFLAGS/`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"arch"@:>@)'` $RUBY_CFLAGS"
fi
fi
fi
if test -n "$RUBY_VERSION"; then
RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"archdir"@:>@)'`
RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"sitearchdir"@:>@)'`
RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"sitelibdir"@:>@)'`
RUBY_RUBYLIBDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubylibdir"@:>@)'`
RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"libdir"@:>@)'`
RUBY_INCLUDEDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubyhdrdir"@:>@)'`
RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'`
AC_DEFINE_UNQUOTED(HAVE_RUBY_1_9, 1, [Defines if your system has Ruby 1.9.x])
fi
fi
if test -z "$RUBY_VERSION"; then
RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"archdir"@:>@)'`
RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitearchdir"@:>@)'`
RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitelibdir"@:>@)'`
RUBY_RUBYLIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubylibdir"@:>@)'`
RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"libdir"@:>@)'`
RUBY_INCLUDEDIR=$RUBY_ARCHDIR
RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'`
fi
AC_MSG_RESULT([
archdir $RUBY_ARCHDIR,
sitearchdir $RUBY_SITEARCHDIR,
sitedir $RUBY_SITEDIR,
rubylibdir $RUBY_RUBYLIBDIR,
libdir $RUBY_LIBDIR,
includedir $RUBY_INCLUDEDIR,
librubyarg $RUBY_LIBRUBYARG,
cflags $RUBY_CFLAGS])
AC_SUBST(RUBY_ARCHDIR)
AC_SUBST(RUBY_SITEARCHDIR)
AC_SUBST(RUBY_SITEDIR)
AC_SUBST(RUBY_RUBYLIBDIR)
AC_SUBST(RUBY_LIBDIR)
AC_SUBST(RUBY_INCLUDEDIR)
AC_SUBST(RUBY_LIBRUBYARG)
AC_SUBST(RUBY_CFLAGS)
fi

@ -47,6 +47,16 @@
#define HINT_BYTES HINT_BYTE
#endif
#define HAVE_STRLCAT_PROTO 1
#define HAVE_STRLCPY_PROTO 1
#include "config.h"
#ifndef HAVE_RUBY_1_9
#define RARRAY_LEN(x) (RARRAY(x)->len)
#define RSTRING_LEN(x) (RSTRING(x)->len)
#define rb_str_catf_1 rb_str_catf
#endif
extern "C" {
extern VALUE set_obj_info(const char * className, smokeruby_object * o);
extern VALUE qt_internal_module;
@ -755,7 +765,7 @@ static void marshall_charP(Marshall *m) {
break;
}
int len = RSTRING(rv)->len;
int len = RSTRING_LEN(rv);
char* mem = (char*) malloc(len+1);
memcpy(mem, StringValuePtr(rv), len);
mem[len] ='\0';
@ -788,7 +798,7 @@ void marshall_ucharP(Marshall *m) {
m->item().s_voidp = 0;
break;
}
int len = RSTRING(rv)->len;
int len = RSTRING_LEN(rv);
char* mem = (char*) malloc(len+1);
memcpy(mem, StringValuePtr(rv), len);
mem[len] ='\0';
@ -824,7 +834,7 @@ qstringFromRString(VALUE rstring) {
TQString * s;
if (qstrcmp(KCODE, "UTF8") == 0)
s = new TQString(TQString::fromUtf8(StringValuePtr(rstring), RSTRING(rstring)->len));
s = new TQString(TQString::fromUtf8(StringValuePtr(rstring), RSTRING_LEN(rstring)));
else if (qstrcmp(KCODE, "EUC") == 0)
s = new TQString(codec->toUnicode(StringValuePtr(rstring)));
else if (qstrcmp(KCODE, "SJIS") == 0)
@ -832,7 +842,7 @@ qstringFromRString(VALUE rstring) {
else if(qstrcmp(KCODE, "NONE") == 0)
s = new TQString(TQString::fromLatin1(StringValuePtr(rstring)));
else
s = new TQString(TQString::fromLocal8Bit(StringValuePtr(rstring), RSTRING(rstring)->len));
s = new TQString(TQString::fromLocal8Bit(StringValuePtr(rstring), RSTRING_LEN(rstring)));
return s;
}
@ -944,7 +954,7 @@ static void marshall_QCString(Marshall *m) {
s = new TQCString();
} else {
// Add 1 to the ruby string length to allow for a TQCString '\0' terminator
s = new TQCString(StringValuePtr(*(m->var())), RSTRING(*(m->var()))->len + 1);
s = new TQCString(StringValuePtr(*(m->var())), RSTRING_LEN(*(m->var())) + 1);
}
m->item().s_voidp = s;
@ -1007,7 +1017,7 @@ static void marshall_QCOORD_array(Marshall *m) {
m->item().s_voidp = 0;
break;
}
int count = RARRAY(av)->len;
int count = RARRAY_LEN(av);
QCOORD *coord = new QCOORD[count + 2];
for(long i = 0; i < count; i++) {
VALUE svp = rb_ary_entry(av, i);
@ -1167,15 +1177,15 @@ static void marshall_charP_array(Marshall *m) {
VALUE arglist = *(m->var());
if (arglist == Qnil
|| TYPE(arglist) != T_ARRAY
|| RARRAY(arglist)->len == 0 )
|| RARRAY_LEN(arglist) == 0 )
{
m->item().s_voidp = 0;
break;
}
char **argv = new char *[RARRAY(arglist)->len + 1];
char **argv = new char *[RARRAY_LEN(arglist) + 1];
long i;
for(i = 0; i < RARRAY(arglist)->len; i++) {
for(i = 0; i < RARRAY_LEN(arglist); i++) {
VALUE item = rb_ary_entry(arglist, i);
char *s = StringValuePtr(item);
argv[i] = new char[strlen(s) + 1];
@ -1207,7 +1217,7 @@ void marshall_QStringList(Marshall *m) {
break;
}
int count = RARRAY(list)->len;
int count = RARRAY_LEN(list);
TQStringList *stringlist = new QStringList;
for(long i = 0; i < count; i++) {
@ -1269,7 +1279,7 @@ void marshall_QStrList(Marshall *m) {
break;
}
int count = RARRAY(list)->len;
int count = RARRAY_LEN(list);
TQStrList *stringlist = new QStrList;
for(long i = 0; i < count; i++) {
@ -1278,7 +1288,7 @@ void marshall_QStrList(Marshall *m) {
stringlist->append(TQString());
continue;
}
stringlist->append(TQString::fromUtf8(StringValuePtr(item), RSTRING(item)->len));
stringlist->append(TQString::fromUtf8(StringValuePtr(item), RSTRING_LEN(item)));
}
m->item().s_voidp = stringlist;
@ -1331,7 +1341,7 @@ void marshall_ItemList(Marshall *m) {
m->item().s_voidp = 0;
break;
}
int count = RARRAY(list)->len;
int count = RARRAY_LEN(list);
ItemList *cpplist = new ItemList;
long i;
for(i = 0; i < count; i++) {
@ -1421,7 +1431,7 @@ void marshall_QValueListInt(Marshall *m) {
m->item().s_voidp = 0;
break;
}
int count = RARRAY(list)->len;
int count = RARRAY_LEN(list);
TQValueList<int> *valuelist = new TQValueList<int>;
long i;
for(i = 0; i < count; i++) {
@ -1513,7 +1523,7 @@ void marshall_QMapQStringQString(Marshall *m) {
// Convert the ruby hash to an array of key/value arrays
VALUE temp = rb_funcall(hash, rb_intern("to_a"), 0);
for (long i = 0; i < RARRAY(temp)->len; i++) {
for (long i = 0; i < RARRAY_LEN(temp); i++) {
VALUE key = rb_ary_entry(rb_ary_entry(temp, i), 0);
VALUE value = rb_ary_entry(rb_ary_entry(temp, i), 1);
(*map)[TQString(StringValuePtr(key))] = TQString(StringValuePtr(value));
@ -1569,7 +1579,7 @@ void marshall_QMapQStringQVariant(Marshall *m) {
// Convert the ruby hash to an array of key/value arrays
VALUE temp = rb_funcall(hash, rb_intern("to_a"), 0);
for (long i = 0; i < RARRAY(temp)->len; i++) {
for (long i = 0; i < RARRAY_LEN(temp); i++) {
VALUE key = rb_ary_entry(rb_ary_entry(temp, i), 0);
VALUE value = rb_ary_entry(rb_ary_entry(temp, i), 1);
@ -1673,7 +1683,7 @@ void marshall_QRgb_array(Marshall *m) {
m->item().s_voidp = 0;
break;
}
int count = RARRAY(list)->len;
int count = RARRAY_LEN(list);
QRgb *rgb = new QRgb[count + 2];
long i;
for(i = 0; i < count; i++) {
@ -1702,7 +1712,7 @@ void marshall_QPairintint(Marshall *m) {
case Marshall::FromVALUE:
{
VALUE list = *(m->var());
if (TYPE(list) != T_ARRAY || RARRAY(list)->len != 2) {
if (TYPE(list) != T_ARRAY || RARRAY_LEN(list) != 2) {
m->item().s_voidp = 0;
break;
}
@ -1770,7 +1780,7 @@ void marshall_ValueItemList(Marshall *m) {
m->item().s_voidp = 0;
break;
}
int count = RARRAY(list)->len;
int count = RARRAY_LEN(list);
ItemList *cpplist = new ItemList;
long i;
for(i = 0; i < count; i++) {

@ -226,7 +226,7 @@ namespace QtCSharp {
{
if (check)
return "\n\n\t\t\tif ((qparent = parent) != null)\n" +
"\t\t\t\parent.AddChild (this);\n";
"\t\t\tparent.AddChild (this);\n";
else
return "";
}

@ -9,7 +9,7 @@ EXTRA_DIST=generate.pl.in qtguess.pl.in qt_smoke.h Makefile.am
libsmokekde_la_LDFLAGS = -version-info 3:2:2 -no-undefined $(all_libraries) $(GLINC) $(KDE_RPATH)
# the libraries to link against.
libsmokekde_la_LIBADD = $(LIB_KHTML) -lkjs -lfontconfig $(LIB_KMDI) $(LIB_KNS) $(LIB_KSPELL) $(LIB_KUTILS) $(LIB_KDEPRINT) $(GLLIB)
libsmokekde_la_LIBADD = $(LIB_KHTML) -lkjs -lfontconfig $(LIB_KMDI) $(LIB_KNS) $(LIB_KSPELL) $(LIB_KUTILS) $(LIB_KDEPRINT) $(GLLIB) $(LIB_QT) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_KIO) $(LIB_KPARTS) -lDCOP -lkdefx
x_sources = x_1.cpp x_2.cpp x_3.cpp x_4.cpp x_5.cpp x_6.cpp x_7.cpp \
x_8.cpp x_9.cpp x_10.cpp x_11.cpp x_12.cpp x_13.cpp x_14.cpp x_15.cpp \

@ -1 +1 @@
DO_NOT_COMPILE="$DO_NOT_COMPILE xparts"
# DO_NOT_COMPILE="$DO_NOT_COMPILE xparts"

@ -5,7 +5,7 @@ lib_LTLIBRARIES = libkdexparts.la
libkdexparts_la_SOURCES = xparthost_kpart.cpp xparthost.skel xpart.stub \
kbrowsersignals.cpp xbrowsersignals.skel xbrowserextension.stub
libkdexparts_la_LIBADD = $(LIB_KPARTS)
libkdexparts_la_LIBADD = $(LIB_KPARTS) $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) -lDCOP
libkdexparts_la_LDFLAGS = $(all_libraries) -no-undefined -version-info 1:0
xpart_DIR=$(srcdir)/../interfaces

Loading…
Cancel
Save