summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt18
m---------admin0
-rw-r--r--config.h.cmake10
-rw-r--r--configure.in.bot8
-rw-r--r--dcop/dcopclient.cpp2
-rw-r--r--interfaces/tdescript/scriptinterface.h2
-rw-r--r--interfaces/terminal/kde_terminal_interface.h2
-rw-r--r--kate/data/rust.xml9
-rw-r--r--kate/data/update-files.xml2
-rw-r--r--kimgio/jp2.cpp91
-rw-r--r--kimgio/psd.h2
-rw-r--r--kimgio/tiffr.cpp35
-rw-r--r--kjs/CMakeLists.txt6
-rw-r--r--kjs/Makefile.am6
-rw-r--r--kjs/configure.in.in51
-rw-r--r--kjs/global.h.in4
-rw-r--r--kjs/regexp.cpp230
-rw-r--r--kjs/regexp.h21
-rw-r--r--libtdemid/player.h2
-rw-r--r--networkstatus/networkstatus.cpp2
-rw-r--r--networkstatus/networkstatusindicator.h2
-rw-r--r--tdeabc/resourceselectdialog.h2
-rw-r--r--tdecore/CMakeLists.txt2
-rw-r--r--tdecore/Mainpage.dox2
-rw-r--r--tdecore/Makefile.am2
-rw-r--r--tdecore/configure.in.in2
-rw-r--r--tdecore/kglobalaccel_x11.cpp2
-rw-r--r--tdecore/libtdecore.nmcheck2
-rw-r--r--tdecore/netsupp.cpp2
-rw-r--r--tdecore/tdeapplication.h2
-rw-r--r--tdecore/tdeglobal.cpp17
-rw-r--r--tdecore/tdeglobal.h20
-rw-r--r--tdecore/tdehw/tdestoragedevice.h2
-rw-r--r--tdecore/tdelibs_export.h2
-rw-r--r--tdecore/tdemacros.h.cmake (renamed from tdecore/kdemacros.h.cmake)14
-rw-r--r--tdecore/tdemacros.h.in (renamed from tdecore/kdemacros.h.in)10
-rw-r--r--tdehtml/css/css_base.h2
-rw-r--r--tdehtml/dom/css_value.h2
-rw-r--r--tdehtml/dom/html_form.h2
-rw-r--r--tdehtml/dom/html_image.h2
-rw-r--r--tdehtml/dom/html_object.h2
-rw-r--r--tdehtml/misc/htmlattrs.h2
-rw-r--r--tdehtml/misc/makeattrs2
-rw-r--r--tdehtml/rendering/render_replaced.cpp2
-rw-r--r--tdehtml/tdehtml_ext.cpp2
-rw-r--r--tdehtml/tdehtml_part.cpp2
-rw-r--r--tdehtml/tdehtml_part.h2
-rw-r--r--tdehtml/testtdehtml.cpp4
-rw-r--r--tdeinit/autostart.cpp32
-rw-r--r--tdeio/bookmarks/kbookmarkimporter_crash.h2
-rw-r--r--tdeio/bookmarks/kbookmarkimporter_ie.h2
-rw-r--r--tdeio/bookmarks/kbookmarkimporter_ns.h2
-rw-r--r--tdeio/kssl/ksslcertchain.h2
-rw-r--r--tdeio/kssl/ksslutils.h2
-rw-r--r--tdeio/tdefile/kicondialog.cpp6
-rw-r--r--tdeio/tdefile/kpropertiesdialog.h2
-rw-r--r--tdeio/tdeio/posixacladdons.cpp2
-rw-r--r--tdeio/tdeio/scheduler.cpp12
-rw-r--r--tdenewstuff/knewstuff.h2
-rw-r--r--tdeparts/browserinterface.cpp2
-rw-r--r--tdeprint/kprinter.h2
-rw-r--r--tdeprint/tools/escputil/escpwidget.cpp2
-rw-r--r--tdestyles/plastik/config/plastikconf.cpp2
-rw-r--r--tdeutils/tdecmoduleinfo.cpp5
-rw-r--r--win/kdemacros.h1
-rw-r--r--win/tdemacros.h1
66 files changed, 415 insertions, 280 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d03faf8aa..41a4ed3ad 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -111,7 +111,7 @@ option( WITH_OPENEXR "Enable openexr support" ${WITH_ALL_OPTIONS} )
option( WITH_UTEMPTER "Use utempter for utmp management" ${WITH_ALL_OPTIONS} )
option( WITH_AVAHI "Enable AVAHI support" ${WITH_ALL_OPTIONS} )
option( WITH_ELFICON "Enable ELF embedded icon support" ${WITH_ALL_OPTIONS} )
-option( WITH_PCRE "Enable pcre regex support for kjs" ON )
+option( WITH_PCRE2 "Enable pcre2 regex support for kjs" ON )
option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
option( WITH_INOTIFY "Enable inotify support for tdeio" ON )
option( WITH_GAMIN "Enable FAM/GAMIN support" ${WITH_ALL_OPTIONS} )
@@ -1223,14 +1223,14 @@ if( WITH_ELFICON )
endif( )
-##### check for pcre ###########################
+##### check for pcre2 ###########################
-if( WITH_PCRE )
- pkg_search_module( LIBPCRE libpcre )
- if( NOT LIBPCRE_FOUND )
- message(FATAL_ERROR "\npcre support are requested, but not found on your system" )
- endif( NOT LIBPCRE_FOUND )
- set( HAVE_PCREPOSIX 1 )
+if( WITH_PCRE2 )
+ pkg_check_modules( LIBPCRE2 libpcre2-8 libpcre2-posix )
+ if( NOT LIBPCRE2_FOUND )
+ tde_message_fatal( "pcre2 support was requested, but not found on your system" )
+ endif( )
+ set( HAVE_PCRE2POSIX 1 )
endif( )
@@ -1400,7 +1400,7 @@ endif()
##### write configure files #####################
configure_file( config.h.cmake config.h )
-configure_file( tdecore/kdemacros.h.cmake tdecore/kdemacros.h )
+configure_file( tdecore/tdemacros.h.cmake tdecore/tdemacros.h )
configure_file( kjs/global.h.in kjs/global.h )
configure_file( tdeio/kssl/ksslconfig.h.cmake tdeio/kssl/ksslconfig.h )
configure_file( kdoctools/checkXML.cmake kdoctools/checkXML )
diff --git a/admin b/admin
-Subproject 34c35e11fbc7237f94ec8ede61ef0c8c9b6c58b
+Subproject 9e0d473a4d6a27fdd3b91e86e1a6358ac233290
diff --git a/config.h.cmake b/config.h.cmake
index 17a871252..fa6580cf3 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -186,9 +186,6 @@
/* Defined if you have elficon support. */
#cmakedefine HAVE_ELFICON 1
-/* Defined if you have fvisibility and fvisibility-inlines-hidden support. */
-#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
-
/* Define is posix_fadvise is supported */
#cmakedefine HAVE_FADVISE
@@ -420,8 +417,8 @@
/* Define to 1 if you have the <paths.h> header file. */
#cmakedefine HAVE_PATHS_H 1
-/* Define if you have pcreposix libraries and header files. */
-#cmakedefine HAVE_PCREPOSIX 1
+/* Define if you have pcre2 libraries and header files. */
+#cmakedefine HAVE_PCRE2POSIX 1
/* Define to 1 if you have the `poll' function. */
#cmakedefine HAVE_POLL 1
@@ -1182,9 +1179,6 @@ int snprintf(char *str, size_t n, char const *fmt, ...);
/* execprefix or NONE if not set, for libloading */
#undef __KDE_EXECPREFIX
-/* define to 1 if -fvisibility is supported */
-#undef __KDE_HAVE_GCC_VISIBILITY
-
/* path to su */
#cmakedefine __PATH_SU "@__PATH_SU@"
diff --git a/configure.in.bot b/configure.in.bot
index 4383af879..290343112 100644
--- a/configure.in.bot
+++ b/configure.in.bot
@@ -23,12 +23,12 @@ if test -z "$LIBART_CONFIG"; then
all_tests=bad
fi
-if test -z "$LIBPCRE"; then
+if test -z "$LIBPCRE2"; then
echo ""
- echo "You're missing libpcre."
+ echo "You're missing libpcre2."
echo "Some web pages (using regular expressions in Javascript code) will not "
- echo "work correctly, the regexp support being limited without libpcre. "
- echo "If you plan to use Konqueror as a Web Browser, download libpcre from "
+ echo "work correctly, the regexp support being limited without libpcre2. "
+ echo "If you plan to use Konqueror as a Web Browser, download libpcre2 from "
echo "http://www.pcre.org or find a binary package for your platform."
echo ""
all_tests=bad
diff --git a/dcop/dcopclient.cpp b/dcop/dcopclient.cpp
index 8965b6062..1533b802c 100644
--- a/dcop/dcopclient.cpp
+++ b/dcop/dcopclient.cpp
@@ -62,7 +62,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <tqsocketnotifier.h>
#include <tqregexp.h>
-#include <tqucomextra_p.h>
+#include <private/tqucomextra_p.h>
#include <dcopglobal.h>
#include <dcopclient.h>
diff --git a/interfaces/tdescript/scriptinterface.h b/interfaces/tdescript/scriptinterface.h
index 1d5ce6b97..d52c0f85a 100644
--- a/interfaces/tdescript/scriptinterface.h
+++ b/interfaces/tdescript/scriptinterface.h
@@ -29,7 +29,7 @@
#define __scriptinterface_h__
#include <tqvariant.h>
#include <tqobject.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
//#include <scripclientinterface.h>
class TQString;
diff --git a/interfaces/terminal/kde_terminal_interface.h b/interfaces/terminal/kde_terminal_interface.h
index 6b6c465b1..ff0dcb80c 100644
--- a/interfaces/terminal/kde_terminal_interface.h
+++ b/interfaces/terminal/kde_terminal_interface.h
@@ -22,7 +22,7 @@
class TQString;
class TQStrList;
-#include <kdemacros.h>
+#include <tdemacros.h>
/**
* TerminalInterface is an interface implemented by KonsolePart to
diff --git a/kate/data/rust.xml b/kate/data/rust.xml
index 10bf247b0..0dd82f86c 100644
--- a/kate/data/rust.xml
+++ b/kate/data/rust.xml
@@ -34,7 +34,7 @@
<!ENTITY rustIdent "[a-zA-Z_][a-zA-Z_0-9]*">
<!ENTITY rustIntSuf "([iu](8|16|32|64)?)?">
]>
-<language name="Rust" version="1.0" kateversion="2.4" section="Sources" extensions="*.rs" mimetype="text/rust" priority="15">
+<language name="Rust" version="1.1" kateversion="2.4" section="Sources" extensions="*.rs" mimetype="text/rust" priority="15">
<highlighting>
<list name="fn">
<item> fn </item>
@@ -323,10 +323,14 @@
<RegExpr String="U[0-9a-fA-F]{8}" attribute="CharEscape" context="#pop"/>
<RegExpr String="." attribute="Error" context="#pop"/>
</context>
- <context attribute="Comment" lineEndContext="#pop" name="Commentar 1"/>
+ <context attribute="Comment" lineEndContext="#pop" name="Commentar 1">
+ <LineContinue attribute="Comment" context="#stay"/>
+ <IncludeRules context="##Alerts" />
+ </context>
<context attribute="Comment" lineEndContext="#stay" name="Commentar 2">
<DetectSpaces/>
<Detect2Chars char="*" char1="/" attribute="Comment" context="#pop" endRegion="Comment"/>
+ <IncludeRules context="##Alerts" />
</context>
</contexts>
<itemDatas>
@@ -348,6 +352,7 @@
<itemData name="Macro" defStyleNum="dsOthers"/>
<itemData name="Attribute" defStyleNum="dsOthers"/>
<itemData name="Lifetime" defStyleNum="dsOthers" bold="1"/>
+ <itemData name="Alert" defStyleNum="dsAlert" spellChecking="false"/>
<itemData name="Error" defStyleNum="dsError"/>
</itemDatas>
</highlighting>
diff --git a/kate/data/update-files.xml b/kate/data/update-files.xml
index 12924302b..e57c63ada 100644
--- a/kate/data/update-files.xml
+++ b/kate/data/update-files.xml
@@ -205,7 +205,7 @@
<Definition name="RSI IDL" url="http://git.trinitydesktop.org/cgit/tdelibs/plain/kate/data/rsiidl.xml" version="3"/>
<Definition name="Rich Text Format" url="http://git.trinitydesktop.org/cgit/tdelibs/plain/kate/data/rtf.xml" version="2"/>
<Definition name="Ruby" url="http://git.trinitydesktop.org/cgit/tdelibs/plain/kate/data/ruby.xml" version="1.27"/>
-<Definition name="Rust" url="http://git.trinitydesktop.org/cgit/tdelibs/plain/kate/data/rust.xml" version="1.0"/>
+<Definition name="Rust" url="http://git.trinitydesktop.org/cgit/tdelibs/plain/kate/data/rust.xml" version="1.1"/>
<Definition name="R Script" url="http://git.trinitydesktop.org/cgit/tdelibs/plain/kate/data/r.xml" version="3-1"/>
<Definition name="Sather" url="http://git.trinitydesktop.org/cgit/tdelibs/plain/kate/data/sather.xml" version="2"/>
<Definition name="Scala" url="http://git.trinitydesktop.org/cgit/tdelibs/plain/kate/data/scala.xml" version="6"/>
diff --git a/kimgio/jp2.cpp b/kimgio/jp2.cpp
index ff64f9263..7cd6879b1 100644
--- a/kimgio/jp2.cpp
+++ b/kimgio/jp2.cpp
@@ -15,6 +15,7 @@
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
+#include <kdebug.h>
#include <tdetempfile.h>
#include <tqcolor.h>
#include <tqcstring.h>
@@ -57,7 +58,7 @@ read_image( const TQImageIO* io )
tempf = new KTempFile();
if( tempf->status() != 0 ) {
delete tempf;
- return 0;
+ return nullptr;
} // if
tempf->setAutoDelete( true );
TQFile* out = tempf->file();
@@ -76,7 +77,7 @@ read_image( const TQImageIO* io )
} // else
if( !in ) {
delete tempf;
- return 0;
+ return nullptr;
} // if
jas_image_t* image = jas_image_decode( in, -1, 0 );
@@ -148,16 +149,77 @@ render_view( gs_t& gs, TQImage& qti )
return true;
} // render_view
+static bool initializeJasper()
+{
+#if defined(JAS_VERSION_MAJOR) && (JAS_VERSION_MAJOR >= 3)
+ jas_conf_clear();
+
+ // Limit JasPer memory usage to at most 512 MB
+ size_t memoryLimit = (512 * 1024) * 1024;
+ size_t jasperTotalMemory = jas_get_total_mem_size();
+ if (!jasperTotalMemory)
+ {
+ jasperTotalMemory = JAS_DEFAULT_MAX_MEM_USAGE;
+ }
+ memoryLimit = memoryLimit < jasperTotalMemory ? memoryLimit : jasperTotalMemory;
+ jas_conf_set_max_mem_usage(memoryLimit);
+
+ if (jas_init_library())
+ {
+ return false;
+ }
+
+ if (jas_init_thread())
+ {
+ jas_cleanup_library();
+ return false;
+ }
+
+#else
+ if (jas_init())
+ {
+ return false;
+ }
+#endif // defined(JAS_VERSION_MAJOR) && (JAS_VERSION_MAJOR >= 3)
+
+ return true;
+}
+
+static void cleanupJasper()
+{
+#if defined(JAS_VERSION_MAJOR) && (JAS_VERSION_MAJOR >= 3)
+ jas_cleanup_thread();
+ jas_cleanup_library();
+#endif
+}
+
+
TDE_EXPORT void
kimgio_jp2_read( TQImageIO* io )
{
- if( jas_init() ) return;
+ if (!initializeJasper())
+ {
+ kdError(399) << "Failed to initialize JasPer library" << endl;
+ return;
+ }
gs_t gs;
- if( !(gs.image = read_image( io )) ) return;
+ gs.image = read_image(io);
- if( !convert_colorspace( gs ) ) return;
+ if (!gs.image)
+ {
+ kdError(399) << "Failed to read JP2 image from IO." << endl;
+ cleanupJasper();
+ return;
+ }
+
+ if (!convert_colorspace(gs))
+ {
+ kdError(399) << "Could not convert JP2 colorspace." << endl;
+ cleanupJasper();
+ return;
+ }
TQImage image;
render_view( gs, image );
@@ -165,6 +227,8 @@ kimgio_jp2_read( TQImageIO* io )
if( gs.image ) jas_image_destroy( gs.image );
if( gs.altimage ) jas_image_destroy( gs.altimage );
+ cleanupJasper();
+
io->setImage( image );
io->setStatus( 0 );
} // kimgio_jp2_read
@@ -236,7 +300,11 @@ write_components( jas_image_t* ji, const TQImage& qi )
TDE_EXPORT void
kimgio_jp2_write( TQImageIO* io )
{
- if( jas_init() ) return;
+ if (!initializeJasper())
+ {
+ kdError(399) << "Failed to initialize JasPer library." << endl;
+ return;
+ }
// open the stream. we write directly to the file if possible, to a
// temporary file otherwise.
@@ -255,12 +323,19 @@ kimgio_jp2_write( TQImageIO* io )
// by here, a jas_stream_t is open
- if( !stream ) return;
+ if (!stream)
+ {
+ kdError(399)
+ << "Failed to create a stream to write JP2 image" << endl;
+ cleanupJasper();
+ return;
+ }
jas_image_t* ji = create_image( io->image() );
if( !ji ) {
delete ktempf;
jas_stream_close( stream );
+ cleanupJasper();
return;
} // if
@@ -268,6 +343,7 @@ kimgio_jp2_write( TQImageIO* io )
delete ktempf;
jas_stream_close( stream );
jas_image_destroy( ji );
+ cleanupJasper();
return;
} // if
@@ -292,6 +368,7 @@ kimgio_jp2_write( TQImageIO* io )
jas_image_destroy( ji );
jas_stream_close( stream );
+ cleanupJasper();
if( i != 0 ) { delete ktempf; return; }
diff --git a/kimgio/psd.h b/kimgio/psd.h
index 14733ad68..fa21bf081 100644
--- a/kimgio/psd.h
+++ b/kimgio/psd.h
@@ -10,7 +10,7 @@
#ifndef KIMG_PSD_H
#define KIMG_PSD_H
-#include <kdemacros.h>
+#include <tdemacros.h>
class TQImageIO;
diff --git a/kimgio/tiffr.cpp b/kimgio/tiffr.cpp
index 7f7b13ea6..2678d537e 100644
--- a/kimgio/tiffr.cpp
+++ b/kimgio/tiffr.cpp
@@ -6,12 +6,20 @@
#include <tiffio.h>
+#include <kdebug.h>
#include <tqimage.h>
#include <tqfile.h>
#include <tdelibs_export.h>
#include <assert.h>
+#if (TIFFLIB_VERSION >= 20210416)
+#undef uint16
+#define uint16 uint16_t
+#undef uint32
+#define uint32 uint32_t
+#endif
+
#include "tiffr.h"
static tsize_t tiff_read( thandle_t handle, tdata_t buf, tsize_t size )
@@ -66,6 +74,9 @@ TDE_EXPORT void kimgio_tiff_read( TQImageIO *io )
uint32 width, height;
uint32 *data;
+ uint16 extra_samples_count;
+ uint16 *extra_samples;
+
// FIXME: use qdatastream
// open file
@@ -79,9 +90,12 @@ TDE_EXPORT void kimgio_tiff_read( TQImageIO *io )
}
// create image with loaded dimensions
- if( TIFFGetField( tiff, TIFFTAG_IMAGEWIDTH, &width ) != 1
- || TIFFGetField( tiff, TIFFTAG_IMAGELENGTH, &height ) != 1 )
- return;
+ if ((TIFFGetField(tiff, TIFFTAG_IMAGEWIDTH, &width) != 1) ||
+ (TIFFGetField(tiff, TIFFTAG_IMAGELENGTH, &height) != 1))
+ {
+ TIFFClose(tiff);
+ return;
+ }
TQImage image( width, height, 32 );
if( image.isNull()) {
@@ -128,6 +142,21 @@ TDE_EXPORT void kimgio_tiff_read( TQImageIO *io )
// swap rows
}
+ // Extra Samples
+ if (TIFFGetField(tiff, TIFFTAG_EXTRASAMPLES, &extra_samples_count, &extra_samples) == 1)
+ {
+ kdDebug(399) << "TIFF image has " << extra_samples_count << " extra sample(s)." << endl;
+ for (uint16 i = 0; i < extra_samples_count; i++)
+ {
+ if ((extra_samples[i] == EXTRASAMPLE_ASSOCALPHA) ||
+ (extra_samples[i] == EXTRASAMPLE_UNASSALPHA))
+ {
+ image.setAlphaBuffer(true);
+ break;
+ }
+ }
+ }
+
// set channel order to Qt order
// FIXME: Right now they are the same, but will it change?
diff --git a/kjs/CMakeLists.txt b/kjs/CMakeLists.txt
index 8e9b16849..c74bf1d5b 100644
--- a/kjs/CMakeLists.txt
+++ b/kjs/CMakeLists.txt
@@ -15,12 +15,12 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/tdecore
- ${LIBPCRE_INCLUDEDIR}
+ ${LIBPCRE2_INCLUDEDIR}
)
link_directories(
${TDECORE_LIBRARY_DIRS}
- ${LIBPCRE_LIBDIR}
+ ${LIBPCRE2_LIBDIR}
)
@@ -62,6 +62,6 @@ tde_add_library( ${target} SHARED
SOURCES ${${target}_SRCS}
VERSION 1.2.0
LINK tdecore-shared
- LINK_PRIVATE ${LIBPCRE_LIBRARIES}
+ LINK_PRIVATE ${LIBPCRE2_LIBRARIES}
DESTINATION ${LIB_INSTALL_DIR}
)
diff --git a/kjs/Makefile.am b/kjs/Makefile.am
index 89f937906..8dc05f656 100644
--- a/kjs/Makefile.am
+++ b/kjs/Makefile.am
@@ -17,7 +17,7 @@
# Boston, MA 02110-1301, USA.
YACC = bison
-INCLUDES = $(PCRECFLAGS) $(all_includes)
+INCLUDES = $(PCRE2CFLAGS) $(all_includes)
lib_LTLIBRARIES = libkjs.la
@@ -50,7 +50,7 @@ endif
libkjs_la_LDFLAGS = -version-info 3:0:2 -no-undefined $(VSCRIPT) \
$(USER_LDFLAGS) $(all_libraries)
-libkjs_la_LIBADD = -lm $(LIBPCRE)
+libkjs_la_LIBADD = -lm $(LIBPCRE2)
EXTRA_DIST = grammar.y
@@ -93,7 +93,7 @@ CLEANFILES = $(LUT_FILES)
## test program (in one program for easier profiling/memory debugging)
EXTRA_PROGRAMS = testkjs_static
testkjs_static_SOURCES = testkjs.cpp
-testkjs_static_LDADD = $(LIBPCRE) libkjs.la
+testkjs_static_LDADD = $(LIBPCRE2) libkjs.la
testkjs_static_LDFLAGS = -static
## test program (linked to libkjs)
diff --git a/kjs/configure.in.in b/kjs/configure.in.in
index 1c4d3ac52..4e6bd9742 100644
--- a/kjs/configure.in.in
+++ b/kjs/configure.in.in
@@ -2,52 +2,55 @@ dnl KDE JavaScript specific configure tests
AC_CHECK_HEADERS(ieeefp.h float.h)
-AC_DEFUN([AC_CHECK_PCREPOSIX],
+AC_DEFUN(AC_CHECK_PCRE2POSIX],
[
- dnl define the configure option that disables pcre
- AC_ARG_ENABLE(pcre,AC_HELP_STRING([--disable-pcre],[don't require libpcre (poor RegExp support in Javascript)]),
- with_pcre=$enableval, with_pcre=yes)
+ dnl define the configure option that disables pcre2
+ AC_ARG_ENABLE(pcre2,AC_HELP_STRING([--disable-pcre],[don't require libpcre (poor RegExp support in Javascript)]),
+ with_pcre2=$enableval, with_pcre2=yes)
- if test "$with_pcre" = "yes"; then
+ if test "$with_pcre2" = "yes"; then
- KDE_FIND_PATH(pcre-config, PCRE_CONFIG, [${exec_prefix}/bin ${prefix}/bin], [PCRE_CONFIG="" ])
- if test -n "$PCRE_CONFIG" && $PCRE_CONFIG --libs >/dev/null 2>&1; then
- LIBPCRE=`$PCRE_CONFIG --libs-posix | sed -e "s,-L/usr/lib ,," -e "s,[\b-].\+pcreposix[^[:space:]]*\b,,"`
- PCRECFLAGS=`$PCRE_CONFIG --cflags`
+ KDE_FIND_PATH(pcre2-config, PCRE2_CONFIG, [${exec_prefix}/bin ${prefix}/bin], [PCRE2_CONFIG="" ])
+ if test -n "$PCRE2_CONFIG" && $PCRE2_CONFIG --libs8 >/dev/null 2>&1; then
+ LIBPCRE2=`$PCRE2_CONFIG --libs-posix | sed -e "s,-L/usr/lib ,," -e "s,[\b-].\+pcreposix[^[:space:]]*\b,,"`
+ PCRE2CFLAGS=`$PCRE2_CONFIG --cflags`
else
- LIBPCRE="-lpcre"
- PCRECFLAGS=
+ LIBPCRE2="-lpcre2-8"
+ PCRE2CFLAGS=
fi
- AC_CACHE_VAL(ac_cv_have_pcreposix, [
+ AC_CACHE_VAL(ac_cv_have_pcre2posix, [
ac_save_libs="$LIBS"
- LIBS="$LIBPCRE"
+ LIBS="$LIBPCRE2"
ac_CPPFLAGS_save="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $PCRECFLAGS $all_includes"
+ CPPFLAGS="$CPPFLAGS $PCRE2CFLAGS $all_includes"
ac_LDFLAGS_save="$LDFLAGS"
LDFLAGS="$LDFLAGS $all_libraries"
AC_TRY_LINK(
- [#include <pcre.h>],
- [regfree(0);],
- [ac_cv_have_pcreposix="yes"],
- [ac_cv_have_pcreposix="no"]
+ [
+ #define PCRE2_CODE_UNIT_WIDTH 8
+ #include <pcre2.h>
+ ],
+ [pcre2_regfree(0);],
+ [ac_cv_have_pcre2posix="yes"],
+ [ac_cv_have_pcre2posix="no"]
)
LIBS="$ac_save_libs"
LDFLAGS="$ac_LDFLAGS_save"
CPPFLAGS="$ac_CPPFLAGS_save"
])
- if test "$ac_cv_have_pcreposix" = "yes"; then
- AC_DEFINE(HAVE_PCREPOSIX, 1, [Define if you have pcreposix libraries and header files.])
+ if test "$ac_cv_have_pcre2posix" = "yes"; then
+ AC_DEFINE(HAVE_PCRE2POSIX, 1, [Define if you have pcre2posix libraries and header files.])
else
AC_MSG_ERROR([You're missing libpcre.
-Download libpcre from http://www.pcre.org or find a binary package for your platform.
+Download libpcre2 from http://www.pcre.org or find a binary package for your platform.
Alternatively, you can specify --disable-pcre, but some web pages - using regular
expressions in Javascript code - will not work correctly, the regexp support being
quite limited if libpcre isn't present.])
fi
fi
])
-AC_CHECK_PCREPOSIX
-AC_SUBST(LIBPCRE)
-AC_SUBST(PCRECFLAGS)
+AC_CHECK_PCRE2POSIX
+AC_SUBST(LIBPCRE2)
+AC_SUBST(PCRE2CFLAGS)
AM_CONFIG_HEADER([kjs/global.h])
diff --git a/kjs/global.h.in b/kjs/global.h.in
index 59655fbf1..a9efbfc8e 100644
--- a/kjs/global.h.in
+++ b/kjs/global.h.in
@@ -33,9 +33,9 @@
#define KJS_PACKED
#endif
-#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
+#cmakedefine __TDE_HAVE_GCC_VISIBILITY 1
-#ifdef __KDE_HAVE_GCC_VISIBILITY
+#ifdef __TDE_HAVE_GCC_VISIBILITY
#define KJS_EXPORT __attribute__ ((visibility("default")))
#else
#define KJS_EXPORT
diff --git a/kjs/regexp.cpp b/kjs/regexp.cpp
index 0c2675588..c92a69d6a 100644
--- a/kjs/regexp.cpp
+++ b/kjs/regexp.cpp
@@ -30,21 +30,17 @@
using namespace KJS;
-#ifdef PCRE_CONFIG_UTF8
RegExp::UTF8SupportState RegExp::utf8Support = RegExp::Unknown;
-#endif
RegExp::RegExp(const UString &p, int f)
: pat(p), flgs(f), m_notEmpty(false), valid(true), buffer(0), originalPos(0)
{
// Determine whether libpcre has unicode support if need be..
-#ifdef PCRE_CONFIG_UTF8
if (utf8Support == Unknown) {
- int supported;
- pcre_config(PCRE_CONFIG_UTF8, (void*)&supported);
- utf8Support = supported ? Supported : Unsupported;
+ uint32_t supported;
+ pcre2_config(PCRE2_CONFIG_COMPILED_WIDTHS, (void*)&supported);
+ utf8Support = (supported & 0x0001) ? Supported : Unsupported;
}
-#endif
nrSubPatterns = 0; // determined in match() with POSIX regex.
@@ -63,33 +59,33 @@ RegExp::RegExp(const UString &p, int f)
escape = false;
// we only care about \u
if (c == 'u') {
- // standard unicode escape sequence looks like \uxxxx but
- // other browsers also accept less then 4 hex digits
- unsigned short u = 0;
- int j = 0;
- for (j = 0; j < 4; ++j) {
- if (i + 1 < p.size() && Lexer::isHexDigit(p[i + 1].unicode())) {
- u = (u << 4) + Lexer::convertHex(p[i + 1].unicode());
- ++i;
- } else {
- // sequence incomplete. restore index.
- // TODO: cleaner way to propagate warning
- fprintf(stderr, "KJS: saw %d digit \\u sequence.\n", j);
- i -= j;
- break;
- }
- }
- if (j < 4) {
- // sequence was incomplete. treat \u as u which IE always
- // and FF sometimes does.
- intern.append(UString('u'));
- } else {
+ // standard unicode escape sequence looks like \uxxxx but
+ // other browsers also accept less then 4 hex digits
+ unsigned short u = 0;
+ int j = 0;
+ for (j = 0; j < 4; ++j) {
+ if (i + 1 < p.size() && Lexer::isHexDigit(p[i + 1].unicode())) {
+ u = (u << 4) + Lexer::convertHex(p[i + 1].unicode());
+ ++i;
+ } else {
+ // sequence incomplete. restore index.
+ // TODO: cleaner way to propagate warning
+ fprintf(stderr, "KJS: saw %d digit \\u sequence.\n", j);
+ i -= j;
+ break;
+ }
+ }
+ if (j < 4) {
+ // sequence was incomplete. treat \u as u which IE always
+ // and FF sometimes does.
+ intern.append(UString('u'));
+ } else {
c = UChar(u);
switch (u) {
case 0:
- // Make sure to encode 0, to avoid terminating the string
- intern += UString(nil);
- break;
+ // Make sure to encode 0, to avoid terminating the string
+ intern += UString(nil);
+ break;
case '^':
case '$':
case '\\':
@@ -101,13 +97,13 @@ RegExp::RegExp(const UString &p, int f)
case '{': case '}':
case '[': case ']':
case '|':
- // escape pattern characters have to remain escaped
- intern.append(UString('\\'));
- // intentional fallthrough
+ // escape pattern characters have to remain escaped
+ intern.append(UString('\\'));
+ // intentional fallthrough
default:
- intern += UString(&c, 1);
- break;
- }
+ intern += UString(&c, 1);
+ break;
+ }
}
continue;
}
@@ -126,45 +122,47 @@ RegExp::RegExp(const UString &p, int f)
intern = p;
}
-#ifdef HAVE_PCREPOSIX
- int pcreflags = 0;
- const char *perrormsg;
- int errorOffset;
+#ifdef HAVE_PCRE2POSIX
+ uint32_t pcre2flags = 0;
+ int errorCode;
+ PCRE2_SIZE errorOffset;
if (flgs & IgnoreCase)
- pcreflags |= PCRE_CASELESS;
+ pcre2flags |= PCRE2_CASELESS;
if (flgs & Multiline)
- pcreflags |= PCRE_MULTILINE;
+ pcre2flags |= PCRE2_MULTILINE;
-#ifdef PCRE_CONFIG_UTF8
if (utf8Support == Supported)
- pcreflags |= (PCRE_UTF8 | PCRE_NO_UTF8_CHECK);
-#endif
+ pcre2flags |= (PCRE2_UTF | PCRE2_NO_UTF_CHECK);
// Fill our buffer with an encoded version, whether utf-8, or,
// if PCRE is incapable, truncated.
prepareMatch(intern);
- pcregex = pcre_compile(buffer, pcreflags,
- &perrormsg, &errorOffset, NULL);
+ pcregex = pcre2_compile(buffer, PCRE2_ZERO_TERMINATED, pcre2flags,
+ &errorCode, &errorOffset, NULL);
doneMatch(); // Cleanup buffers
if (!pcregex) {
#ifndef NDEBUG
- fprintf(stderr, "KJS: pcre_compile() failed with '%s'\n", perrormsg);
+ PCRE2_UCHAR errorMsg[256];
+ pcre2_get_error_message(errorCode, errorMsg, sizeof(errorMsg));
+ fprintf(stderr, "KJS: pcre_compile() failed with '%s'\n", errorMsg);
#endif
+ match_data = nullptr;
valid = false;
return;
}
-#ifdef PCRE_INFO_CAPTURECOUNT
// Get number of subpatterns that will be returned
- int rc = pcre_fullinfo( pcregex, NULL, PCRE_INFO_CAPTURECOUNT, &nrSubPatterns);
+ int rc = pcre2_pattern_info(pcregex, PCRE2_INFO_CAPTURECOUNT, &nrSubPatterns);
if (rc != 0)
-#endif
+ {
nrSubPatterns = 0; // fallback. We always need the first pair of offsets.
+ }
-#else /* HAVE_PCREPOSIX */
+ match_data = pcre2_match_data_create_from_pattern(pcregex, NULL);
+#else
int regflags = 0;
#ifdef REG_EXTENDED
@@ -195,9 +193,15 @@ RegExp::RegExp(const UString &p, int f)
RegExp::~RegExp()
{
doneMatch(); // Be 100% sure buffers are freed
-#ifdef HAVE_PCREPOSIX
+#ifdef HAVE_PCRE2POSIX
+ if (match_data)
+ {
+ pcre2_match_data_free(match_data);
+ }
if (pcregex)
- pcre_free(pcregex);
+ {
+ pcre2_code_free(pcregex);
+ }
#else
/* TODO: is this really okay after an error ? */
regfree(&preg);
@@ -208,7 +212,7 @@ void RegExp::prepareUtf8(const UString& s)
{
// Allocate a buffer big enough to hold all the characters plus \0
const int length = s.size();
- buffer = new char[length * 3 + 1];
+ buffer = new buftype_t[length * 3 + 1];
// Also create buffer for positions. We need one extra character in there,
// even past the \0 since the non-empty handling may jump one past the end
@@ -217,7 +221,7 @@ void RegExp::prepareUtf8(const UString& s)
// Convert to runs of 8-bit characters, and generate indeces
// Note that we do NOT combine surrogate pairs here, as
// regexps operate on them as separate characters
- char *p = buffer;
+ buftype_t *p = buffer;
int *posOut = originalPos;
const UChar *d = s.data();
for (int i = 0; i != length; ++i) {
@@ -225,16 +229,16 @@ void RegExp::prepareUtf8(const UString& s)
int sequenceLen;
if (c < 0x80) {
- *p++ = (char)c;
+ *p++ = (buftype_t)c;
sequenceLen = 1;
} else if (c < 0x800) {
- *p++ = (char)((c >> 6) | 0xC0); // C0 is the 2-byte flag for UTF-8
- *p++ = (char)((c | 0x80) & 0xBF); // next 6 bits, with high bit set
+ *p++ = (buftype_t)((c >> 6) | 0xC0); // C0 is the 2-byte flag for UTF-8
+ *p++ = (buftype_t)((c | 0x80) & 0xBF); // next 6 bits, with high bit set
sequenceLen = 2;
} else {
- *p++ = (char)((c >> 12) | 0xE0); // E0 is the 3-byte flag for UTF-8
- *p++ = (char)(((c >> 6) | 0x80) & 0xBF); // next 6 bits, with high bit set
- *p++ = (char)((c | 0x80) & 0xBF); // next 6 bits, with high bit set
+ *p++ = (buftype_t)((c >> 12) | 0xE0); // E0 is the 3-byte flag for UTF-8
+ *p++ = (buftype_t)(((c >> 6) | 0x80) & 0xBF); // next 6 bits, with high bit set
+ *p++ = (buftype_t)((c | 0x80) & 0xBF); // next 6 bits, with high bit set
sequenceLen = 3;
}
@@ -262,7 +266,7 @@ void RegExp::prepareASCII (const UString& s)
// when we don't have utf 8 available -- use
// truncated version, and pray for the best
CString truncated = s.cstring();
- buffer = new char[truncated.size() + 1];
+ buffer = new buftype_t[truncated.size() + 1];
memcpy(buffer, truncated.c_str(), truncated.size());
buffer[truncated.size()] = '\0'; // For _compile use
bufferSize = truncated.size();
@@ -272,11 +276,9 @@ void RegExp::prepareMatch(const UString &s)
{
delete[] originalPos; // Just to be sure..
delete[] buffer;
-#ifdef PCRE_CONFIG_UTF8
if (utf8Support == Supported)
prepareUtf8(s);
else
-#endif
prepareASCII(s);
#ifndef NDEBUG
@@ -308,17 +310,16 @@ UString RegExp::match(const UString &s, int i, int *pos, int **ovector)
if (i > s.size() || s.isNull())
return UString::null;
-#ifdef HAVE_PCREPOSIX
- int ovecsize = (nrSubPatterns+1)*3; // see pcre docu
- if (ovector) *ovector = new int[ovecsize];
- if (!pcregex)
+#ifdef HAVE_PCRE2POSIX
+ if (!pcregex || !match_data)
+ return UString::null;
+ if (!ovector)
return UString::null;
int startPos;
int nextPos;
-
-#ifdef PCRE_CONFIG_UTF8
- if (utf8Support == Supported) {
+ if (utf8Support == Supported)
+ {
startPos = i;
while (originalPos[startPos] < i)
++startPos;
@@ -328,53 +329,59 @@ UString RegExp::match(const UString &s, int i, int *pos, int **ovector)
while (originalPos[nextPos] < (i + 1))
++nextPos;
}
- } else
-#endif
+ }
+ else
{
startPos = i;
nextPos = i + (i < s.size() ? 1 : 0);
}
- int baseFlags =
-#ifdef PCRE_CONFIG_UTF8
- utf8Support == Supported ? PCRE_NO_UTF8_CHECK :
-#endif
- 0;
- int numMatches = pcre_exec(pcregex, NULL, buffer, bufferSize, startPos,
- m_notEmpty ? (PCRE_NOTEMPTY | PCRE_ANCHORED | baseFlags) : baseFlags, // see man pcretest
- ovector ? *ovector : 0L, ovecsize);
- if (numMatches < 0)
+ uint32_t baseFlags = (utf8Support == Supported ? PCRE2_NO_UTF_CHECK : 0);
+ if (m_notEmpty)
+ {
+ baseFlags |= PCRE2_NOTEMPTY | PCRE2_ANCHORED;
+ }
+ int numMatches = pcre2_match(pcregex, buffer, PCRE2_ZERO_TERMINATED, startPos, baseFlags, match_data, NULL);
+ if (numMatches <= 0)
{
// Failed to match.
- if (numMatches == PCRE_ERROR_NOMATCH && (flgs & Global) && m_notEmpty && ovector && startPos < nextPos)
+ if (numMatches == PCRE2_ERROR_NOMATCH && (flgs & Global) && m_notEmpty && startPos < nextPos)
{
// We set m_notEmpty ourselves, to look for a non-empty match
- // (see man pcretest or pcretest.c for details).
// So we don't stop here, we want to try again at i+1.
#ifdef KJS_VERBOSE
fprintf(stderr, "No match after m_notEmpty. +1 and keep going.\n");
#endif
m_notEmpty = 0;
- numMatches = pcre_exec(pcregex, NULL, buffer, bufferSize, nextPos, baseFlags,
- ovector ? *ovector : 0L, ovecsize);
- if (numMatches < 0)
+ baseFlags = (utf8Support == Supported ? PCRE2_NO_UTF_CHECK : 0);
+ numMatches = pcre2_match(pcregex, buffer, PCRE2_ZERO_TERMINATED, nextPos, baseFlags, match_data, NULL);
+ if (numMatches <= 0)
return UString::null;
}
- else // done
+ else
return UString::null;
}
- // Got a match, proceed with it.
- // But fix up the ovector if need be..
- if (ovector && originalPos) {
- for (unsigned c = 0; c < 2 * TQMIN((unsigned)numMatches, nrSubPatterns+1); ++c) {
- if ((*ovector)[c] != -1)
- (*ovector)[c] = originalPos[(*ovector)[c]];
+ PCRE2_SIZE *pcre2_ovector = pcre2_get_ovector_pointer(match_data);
+ if (!pcre2_ovector)
+ return UString::null;
+
+ uint32_t pcre2_ovecCount = pcre2_get_ovector_count(match_data);
+ *ovector = new int[pcre2_ovecCount * 2];
+ if (originalPos)
+ {
+ for (size_t c = 0; c < 2 * pcre2_ovecCount; ++c)
+ {
+ (*ovector)[c] = (pcre2_ovector[c] != -1) ? originalPos[pcre2_ovector[c]] : -1;
+ }
+ }
+ else
+ {
+ for (size_t c = 0; c < 2 * pcre2_ovecCount; ++c)
+ {
+ (*ovector)[c] = pcre2_ovector[c];
}
}
-
- if (!ovector)
- return UString::null; // don't rely on the return value if you pass ovector==0
#else
const uint maxMatch = 10;
regmatch_t rmatch[maxMatch];
@@ -419,28 +426,3 @@ UString RegExp::match(const UString &s, int i, int *pos, int **ovector)
}
return s.substr((*ovector)[0], (*ovector)[1] - (*ovector)[0]);
}
-
-#if 0 // unused
-bool RegExp::test(const UString &s, int)
-{
-#ifdef HAVE_PCREPOSIX
- int ovector[300];
- CString buffer(s.cstring());
-
- if (s.isNull() ||
- pcre_exec(pcregex, NULL, buffer.c_str(), buffer.size(), 0,
- 0, ovector, 300) == PCRE_ERROR_NOMATCH)
- return false;
- else
- return true;
-
-#else
-
- char *str = strdup(s.ascii());
- int r = regexec(&preg, str, 0, 0, 0);
- free(str);
-
- return r == 0;
-#endif
-}
-#endif
diff --git a/kjs/regexp.h b/kjs/regexp.h
index 88851260e..e731eb714 100644
--- a/kjs/regexp.h
+++ b/kjs/regexp.h
@@ -25,13 +25,16 @@
#include "config.h"
-#ifdef HAVE_PCREPOSIX
-#include <pcre.h>
+#ifdef HAVE_PCRE2POSIX
+#define PCRE2_CODE_UNIT_WIDTH 8
+#include <pcre2.h>
+typedef PCRE2_UCHAR8 buftype_t;
#else // POSIX regex - not so good...
extern "C" { // bug with some libc5 distributions
#include <regex.h>
+typedef char buftype_t;
}
-#endif //HAVE_PCREPOSIX
+#endif
#include "ustring.h"
@@ -61,7 +64,7 @@ namespace KJS {
bool valid;
// Cached encoding info...
- char* buffer;
+ buftype_t *buffer;
int* originalPos;
int bufferSize;
@@ -71,22 +74,20 @@ namespace KJS {
UString originalS; // the original string, used for sanity-checking
#endif
-#ifndef HAVE_PCREPOSIX
+#ifndef HAVE_PCRE2POSIX
regex_t preg;
#else
- pcre *pcregex;
+ pcre2_code *pcregex;
+ pcre2_match_data *match_data;
enum UTF8SupportState {
Unknown,
Supported,
Unsupported
};
-
-#ifdef PCRE_CONFIG_UTF8
static UTF8SupportState utf8Support;
#endif
-#endif
- unsigned int nrSubPatterns;
+ uint32_t nrSubPatterns;
RegExp();
};
diff --git a/libtdemid/player.h b/libtdemid/player.h
index 5a6a46a95..c0ada8b1c 100644
--- a/libtdemid/player.h
+++ b/libtdemid/player.h
@@ -29,7 +29,7 @@
#include <libtdemid/deviceman.h>
#include <libtdemid/track.h>
#include <libtdemid/notearray.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
/**
* This struct stores text, lyrics and change tempo events among others.
diff --git a/networkstatus/networkstatus.cpp b/networkstatus/networkstatus.cpp
index 98ea086b6..7937a52d6 100644
--- a/networkstatus/networkstatus.cpp
+++ b/networkstatus/networkstatus.cpp
@@ -34,7 +34,7 @@
#include "network.h"
#include <tdeversion.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
extern "C" {
TDE_EXPORT KDEDModule* create_networkstatus( const TQCString& obj )
diff --git a/networkstatus/networkstatusindicator.h b/networkstatus/networkstatusindicator.h
index e88a41f17..e7778027e 100644
--- a/networkstatus/networkstatusindicator.h
+++ b/networkstatus/networkstatusindicator.h
@@ -24,7 +24,7 @@
#define KDE_NETWORKSTATUS_INDICATOR_H
#include <tqhbox.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
#include <networkstatuscommon.h>
class StatusBarNetworkStatusIndicator : public TQHBox
diff --git a/tdeabc/resourceselectdialog.h b/tdeabc/resourceselectdialog.h
index b8df436ac..4536c7ece 100644
--- a/tdeabc/resourceselectdialog.h
+++ b/tdeabc/resourceselectdialog.h
@@ -24,7 +24,7 @@
#include <tqmap.h>
#include <kdialog.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
class TDEListBox;
diff --git a/tdecore/CMakeLists.txt b/tdecore/CMakeLists.txt
index c794a8039..24348088e 100644
--- a/tdecore/CMakeLists.txt
+++ b/tdecore/CMakeLists.txt
@@ -73,7 +73,7 @@ install( FILES
kmanagerselection.h kmountpoint.h kuser.h klockfile.h
kidna.h ktempdir.h kshell.h fixx11h.h kxerrorhandler.h
tdelibs_export.h kde_file.h ktimezones.h
- ${CMAKE_CURRENT_BINARY_DIR}/kdemacros.h
+ ${CMAKE_CURRENT_BINARY_DIR}/tdemacros.h
DESTINATION ${INCLUDE_INSTALL_DIR} )
diff --git a/tdecore/Mainpage.dox b/tdecore/Mainpage.dox
index c275aa84e..4a74d242a 100644
--- a/tdecore/Mainpage.dox
+++ b/tdecore/Mainpage.dox
@@ -37,5 +37,5 @@ Some helper utilities: @gpl
*/
// DOXYGEN_EXCLUDE = malloc kde_file.h
-// DOXYGEN_SET_INPUT += @topdir@/kdemacros.h.cmake
+// DOXYGEN_SET_INPUT += @topdir@/tdemacros.h.cmake
// DOXYGEN_SET_PROJECT_NAME = TrinityCore
diff --git a/tdecore/Makefile.am b/tdecore/Makefile.am
index 58e74a010..1bc47e379 100644
--- a/tdecore/Makefile.am
+++ b/tdecore/Makefile.am
@@ -59,7 +59,7 @@ include_HEADERS = tdeconfig.h tdeconfigskeleton.h \
kcalendarsystem.h kcalendarsystemfactory.h kmacroexpander.h \
kmanagerselection.h kmountpoint.h kuser.h klockfile.h \
kidna.h ktempdir.h kshell.h fixx11h.h kxerrorhandler.h tdelibs_export.h \
- kdemacros.h kde_file.h ktimezones.h
+ tdemacros.h kde_file.h ktimezones.h
libtdefakes_la_SOURCES = fakes.c vsnprintf.c
libtdefakes_la_LDFLAGS = -version-info 6:0:2
diff --git a/tdecore/configure.in.in b/tdecore/configure.in.in
index d7ef1cd08..7ecda35e7 100644
--- a/tdecore/configure.in.in
+++ b/tdecore/configure.in.in
@@ -169,7 +169,7 @@ AC_CHECK_HEADERS(sys/mount.h)
dnl AC_OUTPUT(tdecore/tde-config.cpp)
-AM_CONFIG_HEADER(tdecore/kdemacros.h)
+AM_CONFIG_HEADER(tdecore/tdemacros.h)
SVGICONS=
diff --git a/tdecore/kglobalaccel_x11.cpp b/tdecore/kglobalaccel_x11.cpp
index d76b8cdac..41e58b959 100644
--- a/tdecore/kglobalaccel_x11.cpp
+++ b/tdecore/kglobalaccel_x11.cpp
@@ -30,7 +30,7 @@
#include <tqregexp.h>
#include <tqwidget.h>
#include <tqmetaobject.h>
-#include <tqucomextra_p.h>
+#include <private/tqucomextra_p.h>
#include <tdeapplication.h>
#include <kdebug.h>
#include <kkeynative.h>
diff --git a/tdecore/libtdecore.nmcheck b/tdecore/libtdecore.nmcheck
index 7c017a6e4..92ec3ff8f 100644
--- a/tdecore/libtdecore.nmcheck
+++ b/tdecore/libtdecore.nmcheck
@@ -44,6 +44,8 @@ operator>>
operator<<
qt_qclipboard_bailout_hack
kasciistricmp
+kasciitolower
+kasciitoupper
# from libtldl
lt_dl*
diff --git a/tdecore/netsupp.cpp b/tdecore/netsupp.cpp
index 397005183..0ea43178d 100644
--- a/tdecore/netsupp.cpp
+++ b/tdecore/netsupp.cpp
@@ -49,7 +49,7 @@
extern int h_errno;
#endif
-#include <kdemacros.h>
+#include <tdemacros.h>
#if !defined(kde_sockaddr_in6)
/*
diff --git a/tdecore/tdeapplication.h b/tdecore/tdeapplication.h
index f90e8a42b..7a3dff0cf 100644
--- a/tdecore/tdeapplication.h
+++ b/tdecore/tdeapplication.h
@@ -30,8 +30,6 @@ class KCharsets;
class DCOPClient;
class DCOPObject;
-#include <tqtglobaldefines.h>
-
typedef unsigned long Atom;
#if !defined(TQ_WS_X11)
typedef void Display;
diff --git a/tdecore/tdeglobal.cpp b/tdecore/tdeglobal.cpp
index 09f496034..aeac6f744 100644
--- a/tdecore/tdeglobal.cpp
+++ b/tdecore/tdeglobal.cpp
@@ -282,3 +282,20 @@ int kasciistricmp( const char *str1, const char *str2 )
return *s1 ? res : (*s2 ? -1 : 0);
}
+char* kasciitolower( char *s )
+{
+ if ( !s )
+ return 0;
+ for ( unsigned char *p = (unsigned char *) s; *p; ++p )
+ *p = ( *p >= 'A' && *p <= 'Z' ) ? (*p - 'A' + 'a') : *p;
+ return s;
+}
+
+char* kasciitoupper( char *s )
+{
+ if ( !s )
+ return 0;
+ for ( unsigned char *p = (unsigned char *) s; *p; ++p )
+ *p = ( *p >= 'a' && *p <= 'z' ) ? (*p - 'a' + 'A') : *p;
+ return s;
+}
diff --git a/tdecore/tdeglobal.h b/tdecore/tdeglobal.h
index 1269c36a9..d604a4244 100644
--- a/tdecore/tdeglobal.h
+++ b/tdecore/tdeglobal.h
@@ -234,7 +234,25 @@ inline const T& kClamp( const T& x, const T& low, const T& high )
* tqstricmp fails with e.g. the Turkish locale where 'I'.lower() != 'i'
* @since 3.4
*/
-int TDECORE_EXPORT kasciistricmp( const char *str1, const char *str2 );
+TDECORE_EXPORT int kasciistricmp( const char *str1, const char *str2 );
+
+/**
+ Locale-independent function to convert ASCII strings to lower case ASCII
+ strings. This means that it affects @em only the ASCII characters A-Z.
+
+ @param str pointer to the string which should be converted to lower case
+ @return pointer to the converted string (same as @a str)
+*/
+TDECORE_EXPORT char* kasciitolower( char *str );
+
+/**
+ Locale-independent function to convert ASCII strings to upper case ASCII
+ strings. This means that it affects @em only the ASCII characters a-z.
+
+ @param str pointer to the string which should be converted to upper case
+ @return pointer to the converted string (same as @a str)
+*/
+TDECORE_EXPORT char* kasciitoupper( char *str );
/**
diff --git a/tdecore/tdehw/tdestoragedevice.h b/tdecore/tdehw/tdestoragedevice.h
index 891b31573..ad0468ed9 100644
--- a/tdecore/tdehw/tdestoragedevice.h
+++ b/tdecore/tdehw/tdestoragedevice.h
@@ -22,7 +22,7 @@
#include "tdegenericdevice.h"
#include "tqvariant.h"
-#include "kdemacros.h"
+#include "tdemacros.h"
struct crypt_device;
diff --git a/tdecore/tdelibs_export.h b/tdecore/tdelibs_export.h
index bfe07b0e3..78f129f89 100644
--- a/tdecore/tdelibs_export.h
+++ b/tdecore/tdelibs_export.h
@@ -21,7 +21,7 @@
#define _TDELIBS_EXPORT_H
/* needed for TDE_EXPORT macros */
-#include <kdemacros.h>
+#include <tdemacros.h>
/* needed, because e.g. Q_OS_UNIX is so frequently used */
#include <tqglobal.h>
diff --git a/tdecore/kdemacros.h.cmake b/tdecore/tdemacros.h.cmake
index 1c652176a..34c945872 100644
--- a/tdecore/kdemacros.h.cmake
+++ b/tdecore/tdemacros.h.cmake
@@ -1,5 +1,5 @@
-/* This file is part of the KDE libraries
- Copyright (c) 2002-2003 KDE Team
+/* This file is part of the TDE libraries
+ Copyright (c) 2002-2003 TDE Team
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -17,12 +17,12 @@
Boston, MA 02110-1301, USA.
*/
-#ifndef _KDE_MACROS_H_
-#define _KDE_MACROS_H_
+#ifndef _TDE_MACROS_H_
+#define _TDE_MACROS_H_
/* Set by configure */
#cmakedefine __TDE_HAVE_TDEHWLIB 1
-#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
+#cmakedefine __TDE_HAVE_GCC_VISIBILITY 1
/**
* The TDE_NO_EXPORT macro marks the symbol of the given variable
@@ -38,7 +38,7 @@
* \end
*/
-#ifdef __KDE_HAVE_GCC_VISIBILITY
+#ifdef __TDE_HAVE_GCC_VISIBILITY
#define TDE_NO_EXPORT __attribute__ ((visibility("hidden")))
#define TDE_EXPORT __attribute__ ((visibility("default")))
#elif defined(TQ_WS_WIN)
@@ -183,4 +183,4 @@
#define TDE_WEAK_SYMBOL
#endif
-#endif /* _KDE_MACROS_H_ */
+#endif /* _TDE_MACROS_H_ */
diff --git a/tdecore/kdemacros.h.in b/tdecore/tdemacros.h.in
index 571d5fafe..9df1a77ab 100644
--- a/tdecore/kdemacros.h.in
+++ b/tdecore/tdemacros.h.in
@@ -17,11 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#ifndef _KDE_MACROS_H_
-#define _KDE_MACROS_H_
+#ifndef _TDE_MACROS_H_
+#define _TDE_MACROS_H_
/* Set by configure */
-#undef __KDE_HAVE_GCC_VISIBILITY
+#undef __TDE_HAVE_GCC_VISIBILITY
/**
* The TDE_NO_EXPORT macro marks the symbol of the given variable
@@ -37,7 +37,7 @@
* \end
*/
-#ifdef __KDE_HAVE_GCC_VISIBILITY
+#ifdef __TDE_HAVE_GCC_VISIBILITY
#define TDE_NO_EXPORT __attribute__ ((visibility("hidden")))
#define TDE_EXPORT __attribute__ ((visibility("default")))
#elif defined(TQ_WS_WIN)
@@ -182,4 +182,4 @@
#define TDE_WEAK_SYMBOL
#endif
-#endif /* _KDE_MACROS_H_ */
+#endif /* _TDE_MACROS_H_ */
diff --git a/tdehtml/css/css_base.h b/tdehtml/css/css_base.h
index db0700a35..d39d5e94d 100644
--- a/tdehtml/css/css_base.h
+++ b/tdehtml/css/css_base.h
@@ -29,7 +29,7 @@
#include "dom/dom_misc.h"
#include "xml/dom_nodeimpl.h"
#include "misc/shared.h"
-#include <kdemacros.h>
+#include <tdemacros.h>
#include <tqdatetime.h>
#include <tqptrlist.h>
diff --git a/tdehtml/dom/css_value.h b/tdehtml/dom/css_value.h
index 6e3d89717..563d09cd1 100644
--- a/tdehtml/dom/css_value.h
+++ b/tdehtml/dom/css_value.h
@@ -31,7 +31,7 @@
#include <tqcolor.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
namespace DOM {
diff --git a/tdehtml/dom/html_form.h b/tdehtml/dom/html_form.h
index 63c626356..7533a29de 100644
--- a/tdehtml/dom/html_form.h
+++ b/tdehtml/dom/html_form.h
@@ -33,7 +33,7 @@
#include <dom/html_element.h>
#include <dom/html_misc.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
namespace DOM {
diff --git a/tdehtml/dom/html_image.h b/tdehtml/dom/html_image.h
index f6f25b0d6..ec2ab819e 100644
--- a/tdehtml/dom/html_image.h
+++ b/tdehtml/dom/html_image.h
@@ -31,7 +31,7 @@
#include <dom/html_element.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
namespace DOM {
diff --git a/tdehtml/dom/html_object.h b/tdehtml/dom/html_object.h
index 6161f8ef2..22d5b002b 100644
--- a/tdehtml/dom/html_object.h
+++ b/tdehtml/dom/html_object.h
@@ -34,7 +34,7 @@
#include <dom/html_element.h>
#include <dom/html_form.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
namespace DOM {
diff --git a/tdehtml/misc/htmlattrs.h b/tdehtml/misc/htmlattrs.h
index 7f28a5081..eabe89cd2 100644
--- a/tdehtml/misc/htmlattrs.h
+++ b/tdehtml/misc/htmlattrs.h
@@ -6,7 +6,7 @@ htmlattrs.in by makeattrs, do not edit */
#define HTML_ATTRS_H
#include "dom/dom_string.h"
-#include <kdemacros.h>
+#include <tdemacros.h>
using namespace DOM;
#define ATTR_ACCEPT_CHARSET 1
diff --git a/tdehtml/misc/makeattrs b/tdehtml/misc/makeattrs
index 1ed890c2c..b981b285f 100644
--- a/tdehtml/misc/makeattrs
+++ b/tdehtml/misc/makeattrs
@@ -36,7 +36,7 @@ print out "%{\n/* This file is automatically generated from
print out "struct attrs {\n int name;\n int id;\n};\n%%\n";
print header "/* This file is automatically generated from
-htmlattrs.in by makeattrs, do not edit */\n/* Copyright 1999 Lars Knoll */\n\n#ifndef HTML_ATTRS_H\n#define HTML_ATTRS_H\n\n#include \"dom/dom_string.h\"\n#include <kdemacros.h>\nusing namespace DOM;\n\n";
+htmlattrs.in by makeattrs, do not edit */\n/* Copyright 1999 Lars Knoll */\n\n#ifndef HTML_ATTRS_H\n#define HTML_ATTRS_H\n\n#include \"dom/dom_string.h\"\n#include <tdemacros.h>\nusing namespace DOM;\n\n";
my %amap = ();
my $last_ci_attr = 0;
diff --git a/tdehtml/rendering/render_replaced.cpp b/tdehtml/rendering/render_replaced.cpp
index 103cad9e8..0e5666b9d 100644
--- a/tdehtml/rendering/render_replaced.cpp
+++ b/tdehtml/rendering/render_replaced.cpp
@@ -439,7 +439,7 @@ void RenderWidget::paint(PaintInfo& paintInfo, int _tx, int _ty)
paintWidget(paintInfo, m_widget, xPos, yPos);
}
-#include <tqinternal_p.h>
+#include <private/tqinternal_p.h>
// The PaintBuffer class provides a shared buffer for widget painting.
//
diff --git a/tdehtml/tdehtml_ext.cpp b/tdehtml/tdehtml_ext.cpp
index 16f60d277..63b4bc91b 100644
--- a/tdehtml/tdehtml_ext.cpp
+++ b/tdehtml/tdehtml_ext.cpp
@@ -39,7 +39,7 @@
#include <tqpopupmenu.h>
#include <tqurl.h>
#include <tqmetaobject.h>
-#include <tqucomextra_p.h>
+#include <private/tqucomextra_p.h>
#include <tqdragobject.h>
#include <kdebug.h>
diff --git a/tdehtml/tdehtml_part.cpp b/tdehtml/tdehtml_part.cpp
index 712bbe764..1b74c5388 100644
--- a/tdehtml/tdehtml_part.cpp
+++ b/tdehtml/tdehtml_part.cpp
@@ -110,7 +110,7 @@ using namespace DOM;
#include <tqfile.h>
#include <tqtooltip.h>
#include <tqmetaobject.h>
-#include <tqucomextra_p.h>
+#include <private/tqucomextra_p.h>
#include "tdehtmlpart_p.h"
#include "kpassivepopup.h"
diff --git a/tdehtml/tdehtml_part.h b/tdehtml/tdehtml_part.h
index 7d3f01312..a67cb28ab 100644
--- a/tdehtml/tdehtml_part.h
+++ b/tdehtml/tdehtml_part.h
@@ -30,7 +30,7 @@
#include <tdeparts/part.h>
#include <tdeparts/browserextension.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
#include <kfinddialog.h>
#include <tqregexp.h>
diff --git a/tdehtml/testtdehtml.cpp b/tdehtml/testtdehtml.cpp
index 6c3d1506e..272c04fb5 100644
--- a/tdehtml/testtdehtml.cpp
+++ b/tdehtml/testtdehtml.cpp
@@ -48,7 +48,7 @@ int main(int argc, char *argv[])
::exit( 1 );
}
-#ifndef __KDE_HAVE_GCC_VISIBILITY
+#ifndef __TDE_HAVE_GCC_VISIBILITY
TDEHTMLFactory *fac = new TDEHTMLFactory(true);
#endif
@@ -130,7 +130,7 @@ int main(int argc, char *argv[])
int ret = a.exec();
-#ifndef __KDE_HAVE_GCC_VISIBILITY
+#ifndef __TDE_HAVE_GCC_VISIBILITY
fac->deref();
#endif
return ret;
diff --git a/tdeinit/autostart.cpp b/tdeinit/autostart.cpp
index 3f49dfc1d..abc3c2ef3 100644
--- a/tdeinit/autostart.cpp
+++ b/tdeinit/autostart.cpp
@@ -118,17 +118,20 @@ AutoStart::loadAutoStartList()
TQStringList kdefiles = TDEGlobal::dirs()->findAllResources("autostart", "*.desktop", false, true);
files += kdefiles;
- for(TQStringList::ConstIterator it = files.begin();
- it != files.end();
- ++it)
+ for(TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it)
{
+ // Explicitly skip autostart files from KDE
+ if ((*it).contains("org.kde") || (*it).startsWith("/etc/kde/xdg/autostart"))
+ {
+ continue;
+ }
KDesktopFile config(*it, true);
if (config.hasKey("X-TDE-autostart-condition")) {
if (!startCondition(config.readEntry("X-TDE-autostart-condition")))
continue;
}
- else {
- if (!startCondition(config.readEntry("X-TDE-autostart-condition")))
+ else if (config.hasKey("X-KDE-autostart-condition")) {
+ if (!startCondition(config.readEntry("X-KDE-autostart-condition")))
continue;
}
if (!config.tryExec())
@@ -178,23 +181,14 @@ AutoStart::loadAutoStartList()
if (config.hasKey("OnlyShowIn"))
{
-#ifdef WITH_OLD_XDG_STD
- if ((!config.readListEntry("OnlyShowIn", ';').contains("TDE")) && (!config.readListEntry("OnlyShowIn", ';').contains("KDE")))
- continue;
-#else
if (!config.readListEntry("OnlyShowIn", ';').contains("TDE"))
continue;
-#endif
}
if (config.hasKey("NotShowIn"))
{
-#ifdef WITH_OLD_XDG_STD
- if ((config.readListEntry("NotShowIn", ';').contains("TDE")) || (config.readListEntry("NotShowIn", ';').contains("KDE")))
+ if (config.readListEntry("NotShowIn", ';').contains("TDE") ||
+ config.readListEntry("NotShowIn", ';').contains("KDE"))
continue;
-#else
- if (config.readListEntry("NotShowIn", ';').contains("TDE"))
- continue;
-#endif
}
AutoStartItem *item = new AutoStartItem;
@@ -203,13 +197,13 @@ AutoStart::loadAutoStartList()
if (config.hasKey("X-TDE-autostart-after"))
item->startAfter = config.readEntry("X-TDE-autostart-after");
else
- item->startAfter = config.readEntry("X-TDE-autostart-after");
+ item->startAfter = config.readEntry("X-KDE-autostart-after");
if( m_newStartup )
{
if (config.hasKey("X-TDE-autostart-phase"))
item->phase = config.readNumEntry("X-TDE-autostart-phase", 2);
else
- item->phase = config.readNumEntry("X-TDE-autostart-phase", 2);
+ item->phase = config.readNumEntry("X-KDE-autostart-phase", 2);
if (item->phase < 0)
item->phase = 0;
}
@@ -218,7 +212,7 @@ AutoStart::loadAutoStartList()
if (config.hasKey("X-TDE-autostart-phase"))
item->phase = config.readNumEntry("X-TDE-autostart-phase", 1);
else
- item->phase = config.readNumEntry("X-TDE-autostart-phase", 1);
+ item->phase = config.readNumEntry("X-KDE-autostart-phase", 1);
if (item->phase < 1)
item->phase = 1;
}
diff --git a/tdeio/bookmarks/kbookmarkimporter_crash.h b/tdeio/bookmarks/kbookmarkimporter_crash.h
index 007dcf86a..d6bc81a12 100644
--- a/tdeio/bookmarks/kbookmarkimporter_crash.h
+++ b/tdeio/bookmarks/kbookmarkimporter_crash.h
@@ -24,7 +24,7 @@
#include <tqstringlist.h>
#include <tqmap.h>
#include <ksimpleconfig.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
#include "kbookmarkimporter.h"
diff --git a/tdeio/bookmarks/kbookmarkimporter_ie.h b/tdeio/bookmarks/kbookmarkimporter_ie.h
index d0707cefb..70f4ee0b6 100644
--- a/tdeio/bookmarks/kbookmarkimporter_ie.h
+++ b/tdeio/bookmarks/kbookmarkimporter_ie.h
@@ -23,7 +23,7 @@
#include <tqcstring.h>
#include <tqstringlist.h>
#include <ksimpleconfig.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
#include <kbookmarkimporter.h>
diff --git a/tdeio/bookmarks/kbookmarkimporter_ns.h b/tdeio/bookmarks/kbookmarkimporter_ns.h
index 4ccee6fa3..d765bd7db 100644
--- a/tdeio/bookmarks/kbookmarkimporter_ns.h
+++ b/tdeio/bookmarks/kbookmarkimporter_ns.h
@@ -23,7 +23,7 @@
#include <tqcstring.h>
#include <tqstringlist.h>
#include <ksimpleconfig.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
#include "kbookmarkimporter.h"
#include "kbookmarkexporter.h"
diff --git a/tdeio/kssl/ksslcertchain.h b/tdeio/kssl/ksslcertchain.h
index bf9c66cc3..960bcfbb4 100644
--- a/tdeio/kssl/ksslcertchain.h
+++ b/tdeio/kssl/ksslcertchain.h
@@ -23,7 +23,7 @@
#include <tqglobal.h>
#include <tqptrlist.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
class TQString;
class TQCString;
diff --git a/tdeio/kssl/ksslutils.h b/tdeio/kssl/ksslutils.h
index eca012b9b..5fa05a023 100644
--- a/tdeio/kssl/ksslutils.h
+++ b/tdeio/kssl/ksslutils.h
@@ -20,7 +20,7 @@
#ifndef _INCLUDE_KSSLUTILS_H
#define _INCLUDE_KSSLUTILS_H
-#include <kdemacros.h>
+#include <tdemacros.h>
#ifdef TQ_WS_WIN
#include "ksslconfig_win.h"
diff --git a/tdeio/tdefile/kicondialog.cpp b/tdeio/tdefile/kicondialog.cpp
index de3401947..ba54383a0 100644
--- a/tdeio/tdefile/kicondialog.cpp
+++ b/tdeio/tdefile/kicondialog.cpp
@@ -180,7 +180,7 @@ void TDEIconCanvas::slotLoadFiles()
TQPixmap pm;
pm.convertFromImage(img);
TQFileInfo fi(*it);
- TQIconViewItem *item = new TQIconViewItem(this, fi.baseName(), pm);
+ TQIconViewItem *item = new TQIconViewItem(this, fi.baseName(true), pm);
item->setKey(*it);
item->setDragEnabled(false);
item->setDropEnabled(false);
@@ -510,7 +510,7 @@ TQString TDEIconDialog::openDialog()
if (name.isEmpty() || (mType == 1))
return name;
TQFileInfo fi(name);
- return fi.baseName();
+ return fi.baseName(true);
}
return TQString::null;
}
@@ -535,7 +535,7 @@ void TDEIconDialog::slotOk()
if (!name.isEmpty() && (mType != 1))
{
TQFileInfo fi(name);
- name = fi.baseName();
+ name = fi.baseName(true);
}
}
diff --git a/tdeio/tdefile/kpropertiesdialog.h b/tdeio/tdefile/kpropertiesdialog.h
index 61fc22a6b..8fa1a5880 100644
--- a/tdeio/tdefile/kpropertiesdialog.h
+++ b/tdeio/tdefile/kpropertiesdialog.h
@@ -31,7 +31,7 @@
#include <tqstring.h>
#include <tqptrlist.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
#include <kurl.h>
#include <tdefileitem.h>
#include <kdialogbase.h>
diff --git a/tdeio/tdeio/posixacladdons.cpp b/tdeio/tdeio/posixacladdons.cpp
index 1e4d9bec0..c4d4ca555 100644
--- a/tdeio/tdeio/posixacladdons.cpp
+++ b/tdeio/tdeio/posixacladdons.cpp
@@ -21,7 +21,7 @@
#if defined(USE_POSIX_ACL) && !defined(HAVE_NON_POSIX_ACL_EXTENSIONS)
-#include <kdemacros.h>
+#include <tdemacros.h>
#include <errno.h>
#include <sys/stat.h>
diff --git a/tdeio/tdeio/scheduler.cpp b/tdeio/tdeio/scheduler.cpp
index 30c2d8375..abc631284 100644
--- a/tdeio/tdeio/scheduler.cpp
+++ b/tdeio/tdeio/scheduler.cpp
@@ -796,6 +796,18 @@ Scheduler::_assignJobToSlave(TDEIO::Slave *slave, SimpleJob *job)
{
// kdDebug(7006) << "_assignJobToSlave( " << job << ", " << slave << ")" << endl;
TQString dummy;
+ if (!job)
+ {
+ kdDebug(7006) << "_assignJobToSlave(): ERROR, non-existing job." << endl;
+ return false;
+ }
+ if (!slave)
+ {
+ kdDebug(7006) << "_assignJobToSlave(): ERROR, non-existing slave." << endl;
+ job->kill();
+ return false;
+ }
+
if ((slave->slaveProtocol() != KProtocolManager::slaveProtocol( job->url(), dummy ))
||
(!newJobs.removeRef(job)))
diff --git a/tdenewstuff/knewstuff.h b/tdenewstuff/knewstuff.h
index e76b6603b..9477a593d 100644
--- a/tdenewstuff/knewstuff.h
+++ b/tdenewstuff/knewstuff.h
@@ -22,7 +22,7 @@
#include <tqstring.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
class TQObject;
class TQWidget;
diff --git a/tdeparts/browserinterface.cpp b/tdeparts/browserinterface.cpp
index 46c89e348..0b46751fc 100644
--- a/tdeparts/browserinterface.cpp
+++ b/tdeparts/browserinterface.cpp
@@ -4,7 +4,7 @@
#include <tqmetaobject.h>
#include <config.h>
-#include <tqucomextra_p.h>
+#include <private/tqucomextra_p.h>
using namespace KParts;
diff --git a/tdeprint/kprinter.h b/tdeprint/kprinter.h
index 695025aab..3b31666a5 100644
--- a/tdeprint/kprinter.h
+++ b/tdeprint/kprinter.h
@@ -27,7 +27,7 @@
#include <tqstring.h>
#include <tqstringlist.h>
#include <tqvaluelist.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
#include <tdelibs_export.h>
#include <tdeprint/kpreloadobject.h>
diff --git a/tdeprint/tools/escputil/escpwidget.cpp b/tdeprint/tools/escputil/escpwidget.cpp
index e2d899e3c..8d51332e4 100644
--- a/tdeprint/tools/escputil/escpwidget.cpp
+++ b/tdeprint/tools/escputil/escpwidget.cpp
@@ -24,7 +24,7 @@
#include <tqlabel.h>
#include <tqcheckbox.h>
#include <tqaccel.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
#include <tdelocale.h>
#include <tdemessagebox.h>
#include <kstandarddirs.h>
diff --git a/tdestyles/plastik/config/plastikconf.cpp b/tdestyles/plastik/config/plastikconf.cpp
index 5da07beb1..6fbeb74a1 100644
--- a/tdestyles/plastik/config/plastikconf.cpp
+++ b/tdestyles/plastik/config/plastikconf.cpp
@@ -33,7 +33,7 @@ DEALINGS IN THE SOFTWARE.
#include <tdeglobal.h>
#include <tdelocale.h>
#include <kcolorbutton.h>
-#include <kdemacros.h>
+#include <tdemacros.h>
#include "plastikconf.h"
diff --git a/tdeutils/tdecmoduleinfo.cpp b/tdeutils/tdecmoduleinfo.cpp
index 9eeac6585..b94603601 100644
--- a/tdeutils/tdecmoduleinfo.cpp
+++ b/tdeutils/tdecmoduleinfo.cpp
@@ -227,8 +227,11 @@ TDECModuleInfo::isHiddenByDefault() const
return _isHiddenByDefault;
}
-bool TDECModuleInfo::needsTest() const
+bool TDECModuleInfo::needsTest() const
{
+ if (!_allLoaded)
+ const_cast<TDECModuleInfo*>(this)->loadAll();
+
return d->testModule;
}
diff --git a/win/kdemacros.h b/win/kdemacros.h
deleted file mode 100644
index c8c017b02..000000000
--- a/win/kdemacros.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <kdemacros.h.in>
diff --git a/win/tdemacros.h b/win/tdemacros.h
new file mode 100644
index 000000000..da23cd9b4
--- /dev/null
+++ b/win/tdemacros.h
@@ -0,0 +1 @@
+#include <tdemacros.h.in>