Initial conversion to TDE

pull/1/head
Timothy Pearson 9 years ago
parent 2706f30ee0
commit 79c22a7d09

@ -7,12 +7,12 @@ databases in to native Kexi databases.
Requirements:
To compile the following software is needed:
* the kdelibs development files;
* the tdelibs development files;
* the kexi development files;
* GLib 2.0 development files; and
* g++, gcc, make, ...
These will may be packaged for your distribution with names
similar to kdelibs-devel, libkexi-devel and libglib2.0-devel.
similar to tdelibs-devel, libkexi-devel and libglib2.0-devel.
You should not need the libkexi-devel package if you have compiled
and installed Kexi from source.

@ -23,8 +23,8 @@ dnl IMPORTANT NOTE:
dnl Please do not modify this file unless you expect your modifications to be
dnl carried into every other module in the repository.
dnl
dnl Single-module modifications are best placed in configure.in for kdelibs
dnl and kdebase or configure.in.in if present.
dnl Single-module modifications are best placed in configure.in for tdelibs
dnl and tdebase or configure.in.in if present.
# KDE_PATH_X_DIRECT
dnl Internal subroutine of AC_PATH_X.
@ -103,41 +103,41 @@ ac_x_libraries=],
[LIBS="$ac_save_LIBS"
# First see if replacing the include by lib works.
# Check X11 before X11Rn because it is often a symlink to the current release.
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \
/usr/X11/lib${kdelibsuff} \
/usr/X11R6/lib${kdelibsuff} \
/usr/X11R5/lib${kdelibsuff} \
/usr/X11R4/lib${kdelibsuff} \
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${tdelibsuff}/` \
/usr/X11/lib${tdelibsuff} \
/usr/X11R6/lib${tdelibsuff} \
/usr/X11R5/lib${tdelibsuff} \
/usr/X11R4/lib${tdelibsuff} \
\
/usr/lib${kdelibsuff}/X11 \
/usr/lib${kdelibsuff}/X11R6 \
/usr/lib${kdelibsuff}/X11R5 \
/usr/lib${kdelibsuff}/X11R4 \
/usr/lib${tdelibsuff}/X11 \
/usr/lib${tdelibsuff}/X11R6 \
/usr/lib${tdelibsuff}/X11R5 \
/usr/lib${tdelibsuff}/X11R4 \
\
/usr/local/X11/lib${kdelibsuff} \
/usr/local/X11R6/lib${kdelibsuff} \
/usr/local/X11R5/lib${kdelibsuff} \
/usr/local/X11R4/lib${kdelibsuff} \
/usr/local/X11/lib${tdelibsuff} \
/usr/local/X11R6/lib${tdelibsuff} \
/usr/local/X11R5/lib${tdelibsuff} \
/usr/local/X11R4/lib${tdelibsuff} \
\
/usr/local/lib${kdelibsuff}/X11 \
/usr/local/lib${kdelibsuff}/X11R6 \
/usr/local/lib${kdelibsuff}/X11R5 \
/usr/local/lib${kdelibsuff}/X11R4 \
/usr/local/lib${tdelibsuff}/X11 \
/usr/local/lib${tdelibsuff}/X11R6 \
/usr/local/lib${tdelibsuff}/X11R5 \
/usr/local/lib${tdelibsuff}/X11R4 \
\
/usr/X386/lib${kdelibsuff} \
/usr/x386/lib${kdelibsuff} \
/usr/XFree86/lib${kdelibsuff}/X11 \
/usr/X386/lib${tdelibsuff} \
/usr/x386/lib${tdelibsuff} \
/usr/XFree86/lib${tdelibsuff}/X11 \
\
/usr/lib${kdelibsuff} \
/usr/local/lib${kdelibsuff} \
/usr/unsupported/lib${kdelibsuff} \
/usr/athena/lib${kdelibsuff} \
/usr/local/x11r5/lib${kdelibsuff} \
/usr/lpp/Xamples/lib${kdelibsuff} \
/lib/usr/lib${kdelibsuff}/X11 \
/usr/lib${tdelibsuff} \
/usr/local/lib${tdelibsuff} \
/usr/unsupported/lib${tdelibsuff} \
/usr/athena/lib${tdelibsuff} \
/usr/local/x11r5/lib${tdelibsuff} \
/usr/lpp/Xamples/lib${tdelibsuff} \
/lib/usr/lib${tdelibsuff}/X11 \
\
/usr/openwin/lib${kdelibsuff} \
/usr/openwin/share/lib${kdelibsuff} \
/usr/openwin/lib${tdelibsuff} \
/usr/openwin/share/lib${tdelibsuff} \
; \
do
dnl Don't even attempt the hair of trying to link an X program!
@ -371,24 +371,24 @@ AC_DEFUN([KDE_1_CHECK_PATHS],
fi
AC_MSG_CHECKING([for KDE libraries installed])
ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -lkdecore $LIBQT $KDE_TEST_RPATH 1>&5'
ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -ltdecore $LIBQT $KDE_TEST_RPATH 1>&5'
if AC_TRY_EVAL(ac_link) && test -s conftest; then
AC_MSG_RESULT(yes)
else
AC_MSG_ERROR([your system fails at linking a small KDE application!
Check, if your compiler is installed correctly and if you have used the
same compiler to compile Qt and kdelibs as you did use now.
same compiler to compile Qt and tdelibs as you did use now.
For more details about this problem, look at the end of config.log.])
fi
if eval `KDEDIR= ./conftest 2>&5`; then
if eval `TDEDIR= ./conftest 2>&5`; then
kde_result=done
else
kde_result=problems
fi
KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
TDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
kde_have_all_paths=yes
KDE_SET_PATHS($kde_result)
@ -547,11 +547,11 @@ Please check whether you installed aRts correctly or use
AC_DEFUN([KDE_SET_DEFAULT_BINDIRS],
[
kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
if test -n "$KDEDIRS"; then
test -n "$TDEDIR" && kde_default_bindirs="$TDEDIR/bin $kde_default_bindirs"
if test -n "$TDEDIRS"; then
kde_save_IFS=$IFS
IFS=:
for dir in $KDEDIRS; do
for dir in $TDEDIRS; do
kde_default_bindirs="$dir/bin $kde_default_bindirs "
done
IFS=$kde_save_IFS
@ -602,18 +602,18 @@ AC_DEFUN([KDE_SUBST_PROGRAMS],
fi
if test -n "$kde32ornewer"; then
KDE_FIND_PATH(kconfig_compiler, KCONFIG_COMPILER, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kconfig_compiler)])
KDE_FIND_PATH(tdeconfig_compiler, KCONFIG_COMPILER, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(tdeconfig_compiler)])
KDE_FIND_PATH(dcopidlng, DCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
fi
if test -n "$kde33ornewer"; then
KDE_FIND_PATH(makekdewidgets, MAKEKDEWIDGETS, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(makekdewidgets)])
AC_SUBST(MAKEKDEWIDGETS)
KDE_FIND_PATH(maketdewidgets, MAKETDEWIDGETS, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(maketdewidgets)])
AC_SUBST(MAKETDEWIDGETS)
fi
KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin], [XMLLINT=""])
if test -n "$MEINPROC" -a "$MEINPROC" != "compiled"; then
kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
test -n "$TDEDIR" && kde_sharedirs="$TDEDIR/share $kde_sharedirs"
AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
if test "$KDE_XSL_STYLESHEET" = "NO"; then
KDE_XSL_STYLESHEET=""
@ -710,7 +710,7 @@ AC_SUBST(kde_templatesdir)
AC_SUBST(kde_servicesdir)
AC_SUBST(kde_servicetypesdir)
AC_SUBST(kde_moduledir)
AC_SUBST(kdeinitdir, '$(kde_moduledir)')
AC_SUBST(tdeinitdir, '$(kde_moduledir)')
AC_SUBST(kde_styledir)
AC_SUBST(kde_widgetdir)
if test "$kde_qtver" = 1; then
@ -937,7 +937,7 @@ mips-sgi-irix6*)
ac_x_includes="."
fi
if test -z "$ac_x_libraries"; then
ac_x_libraries="/usr/lib${kdelibsuff}"
ac_x_libraries="/usr/lib${tdelibsuff}"
fi
esac
#from now on we use our own again
@ -1060,7 +1060,7 @@ elif test "$kde_use_qt_emb" = "yes"; then
x_includes=""
x_libraries=""
elif test "$kde_use_qt_mac" = "yes"; then
dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
dnl We're using QT/Mac (I use QT_MAC so that ntqglobal.h doesn't *have* to
dnl be included to get the information) --Sam
CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
@ -1092,19 +1092,19 @@ AC_DEFUN([KDE_PRINT_QT_PROGRAM],
AC_REQUIRE([KDE_USE_QT])
cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <qglobal.h>
#include <qapplication.h>
#include <ntqglobal.h>
#include <ntqapplication.h>
EOF
if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <<EOF
#include <qevent.h>
#include <qstring.h>
#include <qstyle.h>
#include <ntqevent.h>
#include <ntqstring.h>
#include <ntqstyle.h>
EOF
if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <<EOF
#if QT_VERSION < 210
#if TQT_VERSION < 210
#error 1
#endif
EOF
@ -1113,8 +1113,8 @@ fi
if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF
#include <qcursor.h>
#include <qstylefactory.h>
#include <ntqcursor.h>
#include <ntqstylefactory.h>
#include <private/qucomextra_p.h>
EOF
fi
@ -1201,22 +1201,22 @@ fi
if test -z "$3"; then
if test $kde_qtver = 3; then
if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000"
kde_qt_verstring="TQT_VERSION >= 0x03@VER@00 && TQT_VERSION < 0x040000"
qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
else
kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000"
kde_qt_verstring="TQT_VERSION >= 300 && TQT_VERSION < 0x040000"
fi
fi
if test $kde_qtver = 2; then
if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 222"
kde_qt_verstring="TQT_VERSION >= 222"
else
kde_qt_verstring="QT_VERSION >= 200"
kde_qt_verstring="TQT_VERSION >= 200"
fi
fi
if test $kde_qtver = 1; then
kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
kde_qt_verstring="TQT_VERSION >= 142 && TQT_VERSION < 200"
fi
else
kde_qt_verstring="$3"
@ -1325,7 +1325,7 @@ AC_ARG_ENABLE(
USING_QT_MT=""
dnl ------------------------------------------------------------------------
dnl If we not get --disable-qt-mt then adjust some vars for the host.
dnl If we not get --disable-tqt-mt then adjust some vars for the host.
dnl ------------------------------------------------------------------------
KDE_MT_LDFLAGS=
@ -1383,7 +1383,7 @@ dnl ------------------------------------------------------------
fi
dnl ------------------------------------------------------------------------
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
dnl If we got --enable-tqt-mt then adjust the Qt library name for the host.
dnl ------------------------------------------------------------------------
if test "x$kde_use_qt_mt" = "xyes"; then
@ -1418,7 +1418,7 @@ qt_includes=""
AC_ARG_WITH(qt-dir,
AC_HELP_STRING([--with-qt-dir=DIR],[where the root of Qt is installed ]),
[ ac_qt_includes="$withval"/include
ac_qt_libraries="$withval"/lib${kdelibsuff}
ac_qt_libraries="$withval"/lib${tdelibsuff}
ac_qt_bindir="$withval"/bin
])
@ -1449,9 +1449,9 @@ if test ! "$ac_qt_includes" = "NO"; then
fi
if test "$kde_qtver" != "1"; then
kde_qt_header=qstyle.h
kde_qt_header=ntqstyle.h
else
kde_qt_header=qglobal.h
kde_qt_header=ntqglobal.h
fi
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
@ -1459,7 +1459,7 @@ ac_qt_includes="$qt_incdir"
qt_libdirs=""
for dir in $kde_qt_dirs; do
qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
qt_libdirs="$qt_libdirs $dir/lib${tdelibsuff} $dir"
done
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
if test ! "$ac_qt_libraries" = "NO"; then
@ -1644,11 +1644,11 @@ rm -f actest.ui actest.cpp
AC_MSG_RESULT([$kde_cv_uic_plugins])
if test "$kde_cv_uic_plugins" != yes; then
AC_MSG_ERROR([
you need to install kdelibs first.
you need to install tdelibs first.
If you did install kdelibs, then the Qt version that is picked up by
this configure is not the same version you used to compile kdelibs.
The Qt Plugin installed by kdelibs is *ONLY* loadable if it is the
If you did install tdelibs, then the Qt version that is picked up by
this configure is not the same version you used to compile tdelibs.
The Qt Plugin installed by tdelibs is *ONLY* loadable if it is the
_same Qt version_, compiled with the _same compiler_ and the same Qt
configuration settings.
])
@ -1785,16 +1785,16 @@ AC_CACHE_VAL(ac_cv_have_kde,
if test "$kde_qtver" = 1; then
kde_check_header="ksock.h"
kde_check_lib="libkdecore.la"
kde_check_lib="libtdecore.la"
else
kde_check_header="ksharedptr.h"
kde_check_lib="libkio.la"
kde_check_lib="libtdeio.la"
fi
if test -z "$1"; then
kde_incdirs="$kde_libs_prefix/include /usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
kde_incdirs="$kde_libs_prefix/include /usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/tde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
test -n "$TDEDIR" && kde_incdirs="$TDEDIR/include $TDEDIR/include/tde $TDEDIR $kde_incdirs"
kde_incdirs="$ac_kde_includes $kde_incdirs"
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
ac_kde_includes="$kde_incdir"
@ -1805,15 +1805,15 @@ in the prefix, you've chosen, are no KDE headers installed. This will fail.
So, check this please and use another prefix!])
fi
kde_libdirs="$kde_libs_prefix/lib${kdelibsuff} /usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
kde_libdirs="$kde_libs_prefix/lib${tdelibsuff} /usr/lib/kde/lib${tdelibsuff} /usr/local/kde/lib${tdelibsuff} /usr/kde/lib${tdelibsuff} /usr/lib${tdelibsuff}/kde /usr/lib${tdelibsuff}/kde3 /usr/lib${tdelibsuff} /usr/X11R6/lib${tdelibsuff} /usr/local/lib${tdelibsuff} /opt/kde3/lib${tdelibsuff} /opt/kde/lib${tdelibsuff} /usr/X11R6/kde/lib${tdelibsuff}"
test -n "$TDEDIR" && kde_libdirs="$TDEDIR/lib${tdelibsuff} $TDEDIR $kde_libdirs"
kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
ac_kde_libraries="$kde_libdir"
kde_widgetdir=NO
dnl this might be somewhere else
AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
AC_FIND_FILE("kde3/plugins/designer/tdewidgets.la", $kde_libdirs, kde_widgetdir)
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
AC_MSG_ERROR([
@ -1821,10 +1821,10 @@ in the prefix, you've chosen, are no KDE libraries installed. This will fail.
So, check this please and use another prefix!])
fi
if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/tdewidgets.la"; then
AC_MSG_ERROR([
I can't find the designer plugins. These are required and should have been installed
by kdelibs])
by tdelibs])
fi
if test -n "$kde_widgetdir"; then
@ -1839,7 +1839,7 @@ else
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
fi
else dnl test -z $1, e.g. from kdelibs
else dnl test -z $1, e.g. from tdelibs
ac_cv_have_kde="have_kde=no"
@ -1979,20 +1979,20 @@ cat > conftest.$ac_ext <<EOF
#include <kapp.h>
int main() {
printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
printf("kde_htmldir=\\"%s\\"\n", TDEApplication::kde_htmldir().data());
printf("kde_appsdir=\\"%s\\"\n", TDEApplication::kde_appsdir().data());
printf("kde_icondir=\\"%s\\"\n", TDEApplication::kde_icondir().data());
printf("kde_sounddir=\\"%s\\"\n", TDEApplication::kde_sounddir().data());
printf("kde_datadir=\\"%s\\"\n", TDEApplication::kde_datadir().data());
printf("kde_locale=\\"%s\\"\n", TDEApplication::kde_localedir().data());
printf("kde_cgidir=\\"%s\\"\n", TDEApplication::kde_cgidir().data());
printf("kde_confdir=\\"%s\\"\n", TDEApplication::kde_configdir().data());
printf("kde_mimedir=\\"%s\\"\n", TDEApplication::kde_mimedir().data());
printf("kde_toolbardir=\\"%s\\"\n", TDEApplication::kde_toolbardir().data());
printf("kde_wallpaperdir=\\"%s\\"\n",
KApplication::kde_wallpaperdir().data());
printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
TDEApplication::kde_wallpaperdir().data());
printf("kde_bindir=\\"%s\\"\n", TDEApplication::kde_bindir().data());
printf("kde_partsdir=\\"%s\\"\n", TDEApplication::kde_partsdir().data());
printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
printf("kde_moduledir=\\"/tmp/dummy\\"\n");
@ -2030,11 +2030,11 @@ AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
kde_cxxflags_safe="$CXXFLAGS"
LIBS="-lkde-qt-addon $LIBQT $LIBS"
CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/tde $all_includes"
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
AC_TRY_LINK([
#include <qdom.h>
#include <ntqdom.h>
],
[
QDomDocument doc;
@ -2064,48 +2064,48 @@ AC_DEFUN([KDE_CREATE_LIBS_ALIASES],
if test $kde_qtver = 3; then
case $host in
*cygwin*) lib_kded="-lkdeinit_kded" ;;
*cygwin*) lib_kded="-ltdeinit_kded" ;;
*) lib_kded="" ;;
esac
AC_SUBST(LIB_KDED, $lib_kded)
AC_SUBST(LIB_KDECORE, "-lkdecore")
AC_SUBST(LIB_KDEUI, "-lkdeui")
AC_SUBST(LIB_KIO, "-lkio")
AC_SUBST(LIB_TDECORE, "-ltdecore")
AC_SUBST(LIB_TDEUI, "-ltdeui")
AC_SUBST(LIB_TDEIO, "-ltdeio")
AC_SUBST(LIB_KJS, "-lkjs")
AC_SUBST(LIB_SMB, "-lsmb")
AC_SUBST(LIB_KAB, "-lkab")
AC_SUBST(LIB_KABC, "-lkabc")
AC_SUBST(LIB_KHTML, "-lkhtml")
AC_SUBST(LIB_KSPELL, "-lkspell")
AC_SUBST(LIB_KPARTS, "-lkparts")
AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
AC_SUBST(LIB_KUTILS, "-lkutils")
AC_SUBST(LIB_KDEPIM, "-lkdepim")
AC_SUBST(LIB_KIMPROXY, "-lkimproxy")
AC_SUBST(LIB_KABC, "-ltdeabc")
AC_SUBST(LIB_TDEHTML, "-ltdehtml")
AC_SUBST(LIB_TDESPELL, "-ltdespell")
AC_SUBST(LIB_TDEPARTS, "-ltdeparts")
AC_SUBST(LIB_TDEPRINT, "-ltdeprint")
AC_SUBST(LIB_TDEUTILS, "-ltdeutils")
AC_SUBST(LIB_TDEPIM, "-ltdepim")
AC_SUBST(LIB_TDEIMPROXY, "-ltdeimproxy")
AC_SUBST(LIB_KNEWSTUFF, "-lknewstuff")
AC_SUBST(LIB_KDNSSD, "-lkdnssd")
AC_SUBST(LIB_KUNITTEST, "-lkunittest")
AC_SUBST(LIB_TDEDNSSD, "-ltdednssd")
AC_SUBST(LIB_TDEUNITTEST, "-ltdeunittest")
# these are for backward compatibility
AC_SUBST(LIB_KSYCOCA, "-lkio")
AC_SUBST(LIB_KFILE, "-lkio")
AC_SUBST(LIB_TDESYCOCA, "-ltdeio")
AC_SUBST(LIB_KFILE, "-ltdeio")
elif test $kde_qtver = 2; then
AC_SUBST(LIB_KDECORE, "-lkdecore")
AC_SUBST(LIB_KDEUI, "-lkdeui")
AC_SUBST(LIB_KIO, "-lkio")
AC_SUBST(LIB_KSYCOCA, "-lksycoca")
AC_SUBST(LIB_TDECORE, "-ltdecore")
AC_SUBST(LIB_TDEUI, "-ltdeui")
AC_SUBST(LIB_TDEIO, "-ltdeio")
AC_SUBST(LIB_TDESYCOCA, "-ltdesycoca")
AC_SUBST(LIB_SMB, "-lsmb")
AC_SUBST(LIB_KFILE, "-lkfile")
AC_SUBST(LIB_KFILE, "-ltdefile")
AC_SUBST(LIB_KAB, "-lkab")
AC_SUBST(LIB_KHTML, "-lkhtml")
AC_SUBST(LIB_KSPELL, "-lkspell")
AC_SUBST(LIB_KPARTS, "-lkparts")
AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
AC_SUBST(LIB_TDEHTML, "-ltdehtml")
AC_SUBST(LIB_TDESPELL, "-ltdespell")
AC_SUBST(LIB_TDEPARTS, "-ltdeparts")
AC_SUBST(LIB_TDEPRINT, "-ltdeprint")
else
AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
AC_SUBST(LIB_TDECORE, "-ltdecore -lXext $(LIB_QT)")
AC_SUBST(LIB_TDEUI, "-ltdeui $(LIB_TDECORE)")
AC_SUBST(LIB_KFM, "-lkfm $(LIB_TDECORE)")
AC_SUBST(LIB_KFILE, "-ltdefile $(LIB_KFM) $(LIB_TDEUI)")
AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_TDECORE)")
fi
])
@ -2170,7 +2170,7 @@ if test "x$kde_cv_func_$1" = xyes; then
else
case "$1" in
setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
kde_cv_proto_$1="yes - in libkdefakes"
kde_cv_proto_$1="yes - in libtdefakes"
;;
*)
kde_cv_proto_$1=unknown
@ -2489,7 +2489,7 @@ if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
else
AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
AC_MSG_ERROR(You need giflib30. Please install the tdesupport package)
fi
])
@ -2547,7 +2547,7 @@ AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
test "x$jpeg_incdir" = xNO && jpeg_incdir=
dnl if headers _and_ libraries are missing, this is no error, and we
dnl continue with a warning (the user will get no jpeg support in khtml)
dnl continue with a warning (the user will get no jpeg support in tdehtml)
dnl if only one is missing, it means a configuration error, but we still
dnl only warn
if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
@ -2595,7 +2595,7 @@ LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
AC_TRY_LINK(
[#include <qapplication.h>],
[#include <ntqapplication.h>],
[
int argc;
char** argv;
@ -3439,7 +3439,7 @@ AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY],
AC_TRY_COMPILE(
[
#include <qglobal.h>
#include <ntqglobal.h>
#if Q_EXPORT - 0 != 0
/* if this compiles, then Q_EXPORT is undefined */
/* if Q_EXPORT is nonempty, this will break compilation */
@ -3489,7 +3489,7 @@ LIBTOOL_SHELL="/bin/sh ./libtool"
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
AC_SUBST(KDE_PLUGIN)
# This hack ensures that libtool creates shared libs for kunittest plugins. By default check_LTLIBRARIES makes static libs.
# This hack ensures that libtool creates shared libs for tdeunittest plugins. By default check_LTLIBRARIES makes static libs.
KDE_CHECK_PLUGIN="\$(KDE_PLUGIN) -rpath \$(libdir)"
AC_SUBST(KDE_CHECK_PLUGIN)
@ -3502,9 +3502,9 @@ AC_DEFUN([KDE_CHECK_LIB64],
AC_ARG_ENABLE(libsuffix,
AC_HELP_STRING([--enable-libsuffix],
[/lib directory suffix (64,32,none,auto[=default])]),
kdelibsuff=$enableval, kdelibsuff="auto")
tdelibsuff=$enableval, tdelibsuff="auto")
if test "$kdelibsuff" = "auto"; then
if test "$tdelibsuff" = "auto"; then
cat > conftest.c << EOF
#include <stdio.h>
@ -3512,26 +3512,26 @@ int main() {
return 0;
}
EOF
kdelibsuff=`$CC conftest.c -o conftest.out; ldd conftest.out |sed -ne '/libc.so/{
tdelibsuff=`$CC conftest.c -o conftest.out; ldd conftest.out |sed -ne '/libc.so/{
s,.*/lib\([[^\/]]*\)/.*,\1,
p
}'`
rm -rf conftest.*
fi
if test "$kdelibsuff" = "no" || test "$kdelibsuff" = "none"; then
kdelibsuff=
if test "$tdelibsuff" = "no" || test "$tdelibsuff" = "none"; then
tdelibsuff=
fi
if test -z "$kdelibsuff"; then
if test -z "$tdelibsuff"; then
AC_MSG_RESULT([not using lib directory suffix])
AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
else
if test "$libdir" = '${exec_prefix}/lib'; then
libdir="$libdir${kdelibsuff}"
libdir="$libdir${tdelibsuff}"
AC_SUBST([libdir], ["$libdir"]) dnl ugly hack for lib64 platforms
fi
AC_DEFINE_UNQUOTED(KDELIBSUFF, ["${kdelibsuff}"], Suffix for lib directories)
AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
AC_DEFINE_UNQUOTED(KDELIBSUFF, ["${tdelibsuff}"], Suffix for lib directories)
AC_MSG_RESULT([using lib directory suffix $tdelibsuff])
fi
])
@ -3549,7 +3549,7 @@ AC_CANONICAL_SYSTEM
AC_ARG_PROGRAM
AM_INIT_AUTOMAKE($1, $2)
AM_DISABLE_LIBRARIES
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
AC_PREFIX_DEFAULT(${TDEDIR:-/usr/local/kde})
AC_CHECK_COMPILERS
KDE_PROG_LIBTOOL
AM_KDE_WITH_NLS
@ -4556,7 +4556,7 @@ fi
PYTHONINC=-I$python_incdir
python_libdirs="$ac_python_dir/lib$kdelibsuff /usr/lib$kdelibsuff /usr/local /usr/lib$kdelibsuff $kde_extra_libs"
python_libdirs="$ac_python_dir/lib$tdelibsuff /usr/lib$tdelibsuff /usr/local /usr/lib$tdelibsuff $kde_extra_libs"
AC_FIND_FILE(libpython$version.so, $python_libdirs, python_libdir)
if test ! -r $python_libdir/libpython$version.so; then
AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
@ -4689,7 +4689,7 @@ CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
AC_TRY_RUN(dnl
[
#include <qimageio.h>
#include <qstring.h>
#include <ntqstring.h>
int main() {
QString t = "hallo";
t.fill('t');
@ -4946,14 +4946,14 @@ AC_DEFUN([KDE_CONF_FILES],
AC_SUBST(CONF_FILES)
])dnl
dnl This sets the prefix, for arts and kdelibs
dnl This sets the prefix, for arts and tdelibs
dnl Do NOT use in any other module.
dnl It only looks at --prefix, KDEDIR and falls back to /usr/local/kde
dnl It only looks at --prefix, TDEDIR and falls back to /usr/local/kde
AC_DEFUN([KDE_SET_PREFIX_CORE],
[
unset CDPATH
dnl make $KDEDIR the default for the installation
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
dnl make $TDEDIR the default for the installation
AC_PREFIX_DEFAULT(${TDEDIR:-/usr/local/kde})
if test "x$prefix" = "xNONE"; then
prefix=$ac_default_prefix
@ -4977,25 +4977,25 @@ AC_DEFUN([KDE_SET_PREFIX],
unset CDPATH
dnl We can't give real code to that macro, only a value.
dnl It only matters for --help, since we set the prefix in this function anyway.
AC_PREFIX_DEFAULT(${KDEDIR:-the kde prefix})
AC_PREFIX_DEFAULT(${TDEDIR:-the kde prefix})
KDE_SET_DEFAULT_BINDIRS
if test "x$prefix" = "xNONE"; then
dnl no prefix given: look for kde-config in the PATH and deduce the prefix from it
KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
dnl no prefix given: look for tde-config in the PATH and deduce the prefix from it
KDE_FIND_PATH(tde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(tde-config)], [], prepend)
else
dnl prefix given: look for kde-config, preferrably in prefix, otherwise in PATH
dnl prefix given: look for tde-config, preferrably in prefix, otherwise in PATH
kde_save_PATH="$PATH"
PATH="$exec_prefix/bin:$prefix/bin:$PATH"
KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
KDE_FIND_PATH(tde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(tde-config)], [], prepend)
PATH="$kde_save_PATH"
fi
kde_libs_prefix=`$KDECONFIG --prefix`
if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for tdelibs.
This means it has been moved since you installed it.
This won't work. Please recompile kdelibs for the new prefix.
This won't work. Please recompile tdelibs for the new prefix.
])
fi
kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
@ -5003,7 +5003,7 @@ AC_DEFUN([KDE_SET_PREFIX],
AC_MSG_CHECKING([where to install])
if test "x$prefix" = "xNONE"; then
prefix=$kde_libs_prefix
AC_MSG_RESULT([$prefix (as returned by kde-config)])
AC_MSG_RESULT([$prefix (as returned by tde-config)])
else
dnl --prefix was given. Compare prefixes and warn (in configure.in.bot.end) if different
given_prefix=$prefix
@ -5533,7 +5533,7 @@ if test "${with_qt_dir+set}" = set; then
kde_qtdir="$with_qt_dir"
fi
AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR)
AC_FIND_FILE(ntqsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR)
AC_MSG_RESULT($QTDOCDIR)
AC_SUBST(QTDOCDIR)
@ -5554,7 +5554,7 @@ AC_SUBST(DOXYGEN_PROJECT_NAME)
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
KDE_HAS_DOXYGEN=no
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/ntqsql.html; then
KDE_HAS_DOXYGEN=yes
fi
AC_SUBST(KDE_HAS_DOXYGEN)
@ -5660,7 +5660,7 @@ ssl_includes=""
AC_ARG_WITH(ssl-dir,
AC_HELP_STRING([--with-ssl-dir=DIR],[where the root of OpenSSL is installed]),
[ ac_ssl_includes="$withval"/include
ac_ssl_libraries="$withval"/lib$kdelibsuff
ac_ssl_libraries="$withval"/lib$tdelibsuff
])
want_ssl=yes
@ -5680,7 +5680,7 @@ AC_CACHE_VAL(ac_cv_have_ssl,
AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
ac_ssl_includes="$ssl_incdir"
ssl_libdirs="/usr/lib$kdelibsuff /usr/local/lib$kdelibsuff /usr/ssl/lib$kdelibsuff /usr/local/ssl/lib$kdelibsuff $libdir $prefix/lib$kdelibsuff $exec_prefix/lib$kdelibsuff $kde_extra_libs"
ssl_libdirs="/usr/lib$tdelibsuff /usr/local/lib$tdelibsuff /usr/ssl/lib$tdelibsuff /usr/local/ssl/lib$tdelibsuff $libdir $prefix/lib$tdelibsuff $exec_prefix/lib$tdelibsuff $kde_extra_libs"
if test ! "$ac_ssl_libraries" = "NO"; then
ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
fi
@ -5917,9 +5917,9 @@ dnl defines KSTUFF_LIBS, KSTUFF_CFLAGS, see pkg-config man page
dnl also defines KSTUFF_PKG_ERRORS on error
AC_DEFUN([KDE_PKG_CHECK_MODULES], [
PKG_CONFIG_PATH="$prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH"
PKG_CONFIG_PATH="$prefix/lib${tdelibsuff}/pkgconfig:$PKG_CONFIG_PATH"
if test "$prefix" != "$kde_libs_prefix"; then
PKG_CONFIG_PATH="$kde_libs_prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH"
PKG_CONFIG_PATH="$kde_libs_prefix/lib${tdelibsuff}/pkgconfig:$PKG_CONFIG_PATH"
fi
export PKG_CONFIG_PATH
PKG_CHECK_MODULES([$1],[$2],[$3],[$4])

@ -1,18 +1,18 @@
dnl ======================================================================
dnl Configure checks for KexiDB
dnl
dnl This ought to be simple - use kde-config to find headers and libraries
dnl This ought to be simple - use tde-config to find headers and libraries
dnl and link against them:
dnl `kde-config --prefix`/include
dnl However, kde-config doesn't return the expected directory on Debian
dnl `tde-config --prefix`/include
dnl However, tde-config doesn't return the expected directory on Debian
dnl (for one), which installs kde headers to /usr/include/kde.
dnl
dnl So the plan for headers is to check:
dnl `kde-config --prefix`/include,
dnl `kde-config --prefix`/kde/include,
dnl `tde-config --prefix`/include,
dnl `tde-config --prefix`/kde/include,
dnl any other place we might find them
dnl Then for libraries, check
dnl `kde-config --prefix`/include,
dnl `tde-config --prefix`/include,
dnl any other place we might find them
dnl ======================================================================
@ -29,20 +29,20 @@ AC_HELP_STRING([--with-kexidb-libraries=DIR],
[ac_kexidb_libdir=$withval],
ac_kexidb_libdir="")
# Find kde-config
# Find tde-config
if test "$ac_kexidb_incdir" = "" -o "$ac_kexidb_libdir" = "" ; then
KDE_FIND_PATH(kde_config,KDE_CONFIG,
[${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin /usr/bin
/opt/kde/bin ],
[AC_MSG_ERROR([Could not find kde-config anywhere])])
[AC_MSG_ERROR([Could not find tde-config anywhere])])
kde_prefix=`$KDE_CONFIG --prefix`
fi
# Find include dir
if test "$ac_kexidb_incdir" = "" ; then
AC_MSG_CHECKING([for KexiDB headers])
kexidb_incdirs="$kde_prefix/include $kde_prefix/include/kde /usr/include /usr/include/kde /usr/local/include /opt/kde/include"
kexidb_incdirs="$kde_prefix/include $kde_prefix/include/tde /usr/include /usr/include/tde /usr/local/include /opt/kde/include"
AC_FIND_FILE("kexidb/driver.h", $kexidb_incdirs, kexidb_incdir)
if test ! -r $kexidb_incdir/kexidb/driver.h; then
AC_MSG_RESULT([Could not find the required KexiDB HEADER files.])

@ -11,10 +11,10 @@ Name[pt]=Controlador de Migração do MS Access (MDB) para o Kexi
Name[pt_BR]=Controlador de Migração do MS Access (MDB) para o Kexi
Name[sv]=MS Access (MDB) överföringsdrivrutin för Kexi
Name[xx]=xxMS Access (MDB) Migration Driver for Kexixx
X-KDE-Library=keximigrate_mdb
ServiceTypes=Kexi/MigrationDriver
X-TDE-Library=keximigrate_mdb
X-TDE-ServiceTypes=Kexi/MigrationDriver
Type=Service
InitialPreference=8
X-TDE-InitialPreference=8
X-Kexi-MigrationDriverName=Access
X-Kexi-MigrationDriverType=File
X-Kexi-FileDBDriverMime=application/x-msaccess

@ -20,13 +20,13 @@
#include "mdbmigrate.h"
#include <qstring.h>
#include <qcstring.h>
#include <qregexp.h>
#include <qfile.h>
#include <qvariant.h>
#include <qdatetime.h>
#include <qvaluelist.h>
#include <ntqstring.h>
#include <ntqcstring.h>
#include <ntqregexp.h>
#include <ntqfile.h>
#include <ntqvariant.h>
#include <ntqdatetime.h>
#include <ntqvaluelist.h>
#include <kdebug.h>
#include <kexiutils/identifier.h>
@ -35,21 +35,21 @@ using namespace KexiMigration;
/* This is the implementation for the MDB file import routines. */
KEXIMIGRATE_DRIVER_INFO( MDBMigrate, mdb );
static QCString isNonUnicodePropId( "source_database_has_nonunicode_encoding" );
static QCString nonUnicodePropId( "source_database_nonunicode_encoding" );
static TQCString isNonUnicodePropId( "source_database_has_nonunicode_encoding" );
static TQCString nonUnicodePropId( "source_database_nonunicode_encoding" );
/* ************************************************************************** */
MDBMigrate::MDBMigrate(QObject *parent, const char *name,
const QStringList &args) :
MDBMigrate::MDBMigrate(TQObject *parent, const char *name,
const TQStringList &args) :
KexiMigrate(parent, name, args)
{
/*! @todo invert the sense of values, then remove "Non-" from these strings */
m_properties[ isNonUnicodePropId ] = QVariant( true, 1 );
m_properties[ isNonUnicodePropId ] = TQVariant( true, 1 );
m_propertyCaptions[ isNonUnicodePropId ] =
i18n("Source Database Has Non-Unicode Encoding");
m_properties[ nonUnicodePropId ] = QVariant("");
m_properties[ nonUnicodePropId ] = TQVariant("");
m_propertyCaptions[ nonUnicodePropId ]
= i18n("Source Database Non-Unicode Encoding");
@ -66,7 +66,7 @@ MDBMigrate::~MDBMigrate() {
void MDBMigrate::initBackend() {
mdb_init();
// Date format associated with Qt::ISODate: YYYY-MM-DDTHH:MM:SS
// Date format associated with TQt::ISODate: YYYY-MM-DDTHH:MM:SS
// (where T is a literal). The following is equivalent to %FT%T, but
// backards compatible with old/Windows C libraries.
// See strftime documentation for more info.
@ -79,10 +79,10 @@ void MDBMigrate::releaseBackend() {
/* ************************************************************************** */
/*! Properties */
QVariant MDBMigrate::propertyValue( const QCString& propName )
TQVariant MDBMigrate::propertyValue( const TQCString& propName )
{
if ( propName == isNonUnicodePropId ) {
m_properties[ isNonUnicodePropId ] = QVariant(false, 0);
m_properties[ isNonUnicodePropId ] = TQVariant(false, 0);
// Costly, but we need this to get this property from file...
drv_connect();
@ -99,7 +99,7 @@ bool MDBMigrate::drv_connect() {
KexiDB::ConnectionData *data = m_migrateData->source;
// mdb_open takes a char*, not const char*, hence this nonsense.
char *filename = qstrdup(QFile::encodeName(data->fileName()));
char *filename = tqstrdup(TQFile::encodeName(data->fileName()));
m_mdb = mdb_open (filename, MDB_NOFLAGS);
delete [] filename;
@ -110,7 +110,7 @@ bool MDBMigrate::drv_connect() {
// Setting source encoding
if ( !m_properties[ nonUnicodePropId ].toCString().isEmpty() ) {
QCString encoding = m_properties[ nonUnicodePropId ].toCString();
TQCString encoding = m_properties[ nonUnicodePropId ].toCString();
mdb_set_encoding( m_mdb, (const char*) encoding );
kdDebug() << "non-unicode encoding set to \""
@ -119,7 +119,7 @@ bool MDBMigrate::drv_connect() {
}
// Supports setting source encoding
m_properties[ isNonUnicodePropId ] = QVariant( IS_JET3(m_mdb), 1 );
m_properties[ isNonUnicodePropId ] = TQVariant( IS_JET3(m_mdb), 1 );
return true;
}
@ -139,7 +139,7 @@ bool MDBMigrate::drv_disconnect()
with.
\return the table definition, or null if no matching table was found
*/
MdbTableDef* MDBMigrate::getTableDef(const QString& tableName)
MdbTableDef* MDBMigrate::getTableDef(const TQString& tableName)
{
MdbTableDef *tableDef = 0;
@ -150,7 +150,7 @@ MdbTableDef* MDBMigrate::getTableDef(const QString& tableName)
// ... for a table with the given name
if (dbObject->object_type == MDB_TABLE) {
QString dbObjectName = QString::fromUtf8(dbObject->object_name);
TQString dbObjectName = TQString::fromUtf8(dbObject->object_name);
if (dbObjectName.lower() == tableName.lower()) {
tableDef = mdb_read_table(dbObject);
break;
@ -163,7 +163,7 @@ MdbTableDef* MDBMigrate::getTableDef(const QString& tableName)
/* ************************************************************************** */
/*! Get the types and properties for each column. */
bool MDBMigrate::drv_readTableSchema( const QString& originalName,
bool MDBMigrate::drv_readTableSchema( const TQString& originalName,
KexiDB::TableSchema& tableSchema )
{
//! Get the column meta-data
@ -184,11 +184,11 @@ bool MDBMigrate::drv_readTableSchema( const QString& originalName,
col = (MdbColumn*) g_ptr_array_index(tableDef->columns, i);
// Field name
QString fldName = QString::fromUtf8(col->name);
TQString fldName = TQString::fromUtf8(col->name);
kdDebug() << "MDBMigrate::drv_readTableSchema: got column "
<< fldName << "\"" << col->name << endl;
QString fldID( KexiUtils::string2Identifier(fldName) );
TQString fldID( KexiUtils::string2Identifier(fldName) );
// Field type
KexiDB::Field *fld =
@ -210,7 +210,7 @@ bool MDBMigrate::drv_readTableSchema( const QString& originalName,
/*! Get a list of tables and put into the supplied string list */
bool MDBMigrate::drv_tableNames(QStringList& tableNames)
bool MDBMigrate::drv_tableNames(TQStringList& tableNames)
{
// Try to read the catalogue of database objects
if (!mdb_read_catalog (m_mdb, MDB_ANY)) {
@ -224,7 +224,7 @@ bool MDBMigrate::drv_tableNames(QStringList& tableNames)
(MdbCatalogEntry*)(g_ptr_array_index (m_mdb->catalog, i));
if (dbObject->object_type == MDB_TABLE) {
QString dbObjectName = QString::fromUtf8(dbObject->object_name);
TQString dbObjectName = TQString::fromUtf8(dbObject->object_name);
if (!dbObjectName.startsWith("MSys")) {
kdDebug() << "MDBMigrate::drv_tableNames: " << dbObjectName << endl;
@ -235,43 +235,43 @@ bool MDBMigrate::drv_tableNames(QStringList& tableNames)
return true;
}
QVariant MDBMigrate::toQVariant(const char* data, unsigned int len, int type) {
TQVariant MDBMigrate::toTQVariant(const char* data, unsigned int len, int type) {
if(len == 0) {
// Null ptr => null value
return QVariant();
return TQVariant();
} else {
switch (type) {
case MDB_TEXT:
case MDB_MEMO:
return QVariant( QString::fromUtf8(data, len) );
return TQVariant( TQString::fromUtf8(data, len) );
case MDB_BOOL: //! @todo use &bool!
case MDB_BYTE:
return QString::fromUtf8(data, len).toShort();
return TQString::fromUtf8(data, len).toShort();
case MDB_SDATETIME:
return QDateTime::fromString(data, Qt::ISODate);
return TQDateTime::fromString(data, TQt::ISODate);
case MDB_INT:
case MDB_LONGINT:
return QString::fromUtf8(data, len).toLongLong();
return TQString::fromUtf8(data, len).toLongLong();
case MDB_FLOAT:
return QString::fromUtf8(data, len).toFloat();
return TQString::fromUtf8(data, len).toFloat();
case MDB_DOUBLE:
case MDB_MONEY: //! @todo
case MDB_NUMERIC: //! @todo
return QString::fromUtf8(data, len).toDouble();
return TQString::fromUtf8(data, len).toDouble();
case MDB_OLE:
case MDB_REPID:
default:
return QVariant(QString::fromUtf8(data, len));
return TQVariant(TQString::fromUtf8(data, len));
}
}
}
/*! Copy MDB table to KexiDB database */
bool MDBMigrate::drv_copyTable( const QString& srcTable,
bool MDBMigrate::drv_copyTable( const TQString& srcTable,
KexiDB::Connection *destConn,
KexiDB::TableSchema* dstTable)
{
QString kdLoc = "MDBMigrate::drv_copyTable: ";
TQString kdLoc = "MDBMigrate::drv_copyTable: ";
MdbTableDef *tableDef = getTableDef(srcTable);
if(!tableDef) {
kdDebug() << kdLoc << srcTable << endl;
@ -296,12 +296,12 @@ bool MDBMigrate::drv_copyTable( const QString& srcTable,
kdDebug() << kdLoc << "Fetching " << tableDef->num_rows << " rows" << endl;
#ifdef KEXI_MIGRATION_MAX_ROWS_TO_IMPORT
Q_ULLONG rows=0;
TQ_ULLONG rows=0;
#endif
bool ok = true;
while(mdb_fetch_row(tableDef)) {
QValueList<QVariant> vals = QValueList<QVariant>();
TQValueList<TQVariant> vals = TQValueList<TQVariant>();
// kdDebug() << kdLoc << "Copying " << tableDef->num_cols << " cols" << endl;
for (unsigned int i = 0; i < tableDef->num_cols; i++) {
@ -312,7 +312,7 @@ bool MDBMigrate::drv_copyTable( const QString& srcTable,
}
//! @todo: How to import binary data?
QVariant var = toQVariant(columnData[i], columnDataLength[i],
TQVariant var = toTQVariant(columnData[i], columnDataLength[i],
col->col_type);
vals << var;
}
@ -404,7 +404,7 @@ KexiDB::Field::Type MDBMigrate::type(int type)
bool MDBMigrate::getPrimaryKey( KexiDB::TableSchema* table,
MdbTableDef* tableDef ) {
QString kdLoc = "MDBMigrate::getPrimaryKey: ";
TQString kdLoc = "MDBMigrate::getPrimaryKey: ";
MdbIndex *idx;
if (!tableDef) {
@ -417,7 +417,7 @@ bool MDBMigrate::getPrimaryKey( KexiDB::TableSchema* table,
bool foundIdx = false;
for (unsigned int i = 0; i < tableDef->num_idxs; i++) {
idx = (MdbIndex*) g_ptr_array_index (tableDef->indices, i);
QString fldName = QString::fromUtf8(idx->name);
TQString fldName = TQString::fromUtf8(idx->name);
if (!strcmp(idx->name, "PrimaryKey")) {
idx = (MdbIndex*) g_ptr_array_index (tableDef->indices, i);
@ -436,7 +436,7 @@ bool MDBMigrate::getPrimaryKey( KexiDB::TableSchema* table,
kdDebug() << kdLoc << "num_keys " << idx->num_keys << endl;
//! Create the KexiDB IndexSchema ...
QByteArray key_col_num(idx->num_keys);
TQByteArray key_col_num(idx->num_keys);
// MDBTools counts columns from 1 - subtract 1 where necessary
KexiDB::IndexSchema* p_idx = new KexiDB::IndexSchema(table);
@ -467,7 +467,7 @@ bool MDBMigrate::getPrimaryKey( KexiDB::TableSchema* table,
return true;
}
bool MDBMigrate::drv_getTableSize(const QString& table, Q_ULLONG& size) {
bool MDBMigrate::drv_getTableSize(const TQString& table, TQ_ULLONG& size) {
//! Get the column meta-data, which contains the table size
MdbTableDef *tableDef = getTableDef(table);
if(!tableDef) {
@ -475,7 +475,7 @@ bool MDBMigrate::drv_getTableSize(const QString& table, Q_ULLONG& size) {
<< table << endl;
return false;
}
size = (Q_ULLONG)(tableDef->num_rows);
size = (TQ_ULLONG)(tableDef->num_rows);
mdb_free_tabledef(tableDef);
return true;
}

@ -36,36 +36,36 @@ namespace KexiMigration
KEXIMIGRATION_DRIVER
public:
MDBMigrate(QObject *parent, const char *name, const QStringList& args = QStringList());
MDBMigrate(TQObject *parent, const char *name, const TQStringList& args = TQStringList());
virtual ~MDBMigrate();
KexiDB::Field::Type type(int type);
MdbTableDef* getTableDef(const QString& tableName);
QVariant toQVariant(const char* data, unsigned int len, int type);
MdbTableDef* getTableDef(const TQString& tableName);
TQVariant toTQVariant(const char* data, unsigned int len, int type);
bool getPrimaryKey(KexiDB::TableSchema* table, MdbTableDef* tableDef);
//! Reimplemented to add support for "sourceDatabaseHasNonUnicodeEncoding" property
//! @todo this should be in Connection class but Migration framework has no such yet!
virtual QVariant propertyValue( const QCString& propName );
virtual TQVariant propertyValue( const TQCString& propName );
protected:
//Driver specific function to return table names
virtual bool drv_tableNames(QStringList& tablenames);
virtual bool drv_tableNames(TQStringList& tablenames);
//Driver specific implementation to read a table schema
virtual bool drv_readTableSchema(
const QString& originalName, KexiDB::TableSchema& tableSchema);
const TQString& originalName, KexiDB::TableSchema& tableSchema);
//Driver specific connection implementation
virtual bool drv_connect();
virtual bool drv_disconnect();
virtual bool drv_copyTable(const QString& srcTable,
virtual bool drv_copyTable(const TQString& srcTable,
KexiDB::Connection *destConn,
KexiDB::TableSchema* dstTable);
virtual bool drv_progressSupported() { return true; }
virtual bool drv_getTableSize(const QString& table, Q_ULLONG& size);
virtual bool drv_getTableSize(const TQString& table, TQ_ULLONG& size);
private:
void initBackend();

Loading…
Cancel
Save