Compare commits

..

13 Commits

Author SHA1 Message Date
Slávek Banko 81d4481ade Update buildkey for GCC 6
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit b099185b90)
9 years ago
Timothy Pearson fcdfc20774 Fix invalid headers in PNG files and optimize for size
(cherry picked from commit e834adf078)
9 years ago
Timothy Pearson 5ed17bc483 Properly implement MySQL reconnect support
(cherry picked from commit 709f7e70b0)
9 years ago
Timothy Pearson 9c08980957 Properly handle MySQL reconnection option
(cherry picked from commit 9fe256ac6c)
9 years ago
Michele Calgaro dc2dea07f7 Fixed (again) search algorithm for iconview widget. This resolves (again) bug 420.
(cherry picked from commit d27f4e2fc3)
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
10 years ago
Michele Calgaro 8eefba828f Added safety harness for currentThreadObject() usage.
currentThreadObject() returns a null pointer if the
current thread was not started using the QThread API.
This relates to bug 1748.

(cherry picked from commit dad70b4c52)
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
10 years ago
Michele Calgaro d1fd5b9b23 Fixed search algorithm for iconview widget. This resolves bug 420.
(cherry picked from commit d6867cf92e)
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
10 years ago
Slávek Banko 6b9213a69c Update buildkey for GCC 5
[taken from RedHat Qt3 patches]
(cherry picked from commit 0d96f74958)
10 years ago
Slávek Banko d3f640f17c Fix security issue CVE-2015-1860
[taken from RedHat Qt3 patches]
(cherry picked from commit 538d6a2440)
10 years ago
Slávek Banko a0008cd747 Fix security issue CVE-2015-0295
[taken from RedHat Qt3 patches]
(cherry picked from commit b3037160f2)
10 years ago
Slávek Banko 5184b53b9b Fix security issue CVE-2014-0190
[taken from RedHat Qt3 patches]
(cherry picked from commit ad74a11abf)
10 years ago
Slávek Banko 2383ee57b0 Fix security issue CVE-2013-4549
[taken from RedHat Qt3 patches]
(cherry picked from commit 73584365f8)
10 years ago
Michele Calgaro cdabaf42b0 Fixed Multicolumn view filtering item arrangement. This relates to bug 146.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>

(cherry picked from commit 9655b0b845)

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
11 years ago

@ -0,0 +1,259 @@
#!/usr/bin/perl -w
#
# in sh/bash/zsh:
# make 2>&1 | .../qt/bin/qt20fix
# in csh/tcsh
# make |& .../qt/bin/qt20fix
#
# repeat as long as qt20fix says to. if your make supports the -k
# flag, that speeds up the process a bit.
#
# qt20fix tends to fix a bit over half of the remaining problems in
# each run.
#
# if you don't use gcc, you will need to change parseline.
#
# this function must accept one line, which is presumed to be an error
# message, and return an array of three strings: the file name, the
# line number and the variable that is undefined.
#
# it may also return an empty list, if the line isn't an error message.
#
# the function is called on each line in turn and only once on each
# line, so it's possible to save state.
#
sub parseline{
my( $line ) = @_;
chomp $line;
if ( $line =~ m%^([-a-zA-Z0-9_\./]+\.[a-zA-Z]+):(\d+):\s*\`(.+)\' undeclared% ) {
@r = ($1,$2,$3);
$r[0] = $currentdir . $r[0] if ( defined($currentdir) &&
$r[0] =~ m%^[^/]% );
return @r;
} elsif ( $line =~ m%^([-a-zA-Z0-9_\./]+\.[a-zA-Z]+):(\d+):\s*\`(.+)\' was not declared% ) {
@r = ($1,$2,$3);
$r[0] = $currentdir . $r[0] if ( defined($currentdir) &&
$r[0] =~ m%^[^/]% );
return @r;
} elsif ( $line =~ m%^g?make\[(\d+)\]: Entering directory \`(.*)\'% ) {
# make[1]: Entering directory `/home/agulbra/2x/src/ui'
my( $l, $c ) = ( $1, $2 );
$c =~ s-/?$-/-;
$dirs[$l] = $c;
$currentdir = $c;
print "$line\n";
} elsif ( $line =~ m%make\[(\d+)\]: Leaving directory \`.*\'$% ) {
# make[1]: Leaving directory `/home/agulbra/2x/src/ui'
$currentdir = defined( $dirs[$1 - 1] ) ? $dirs[$1 - 1] : "";
print "$line\n";
} elsif ( $line =~ m%^\S+:(?:\d+:)?\s+\S% ) {
# other compiler message - skip it
} else {
print "$line\n";
}
return ();
}
#
# this is the big array of globals and their replacements. add stuff
# at will.
#
%globals =
(
"Event_None" => "QEvent::None",
"Event_Timer" => "QEvent::Timer",
"Event_MouseButtonPress" => "QEvent::MouseButtonPress",
"Event_MouseButtonRelease" => "QEvent::MouseButtonRelease",
"Event_MouseButtonDblClick" => "QEvent::MouseButtonDblClick",
"Event_MouseMove" => "QEvent::MouseMove",
"Event_KeyPress" => "QEvent::KeyPress",
"Event_KeyRelease" => "QEvent::KeyRelease",
"Event_FocusIn" => "QEvent::FocusIn",
"Event_FocusOut" => "QEvent::FocusOut",
"Event_Enter" => "QEvent::Enter",
"Event_Leave" => "QEvent::Leave",
"Event_Paint" => "QEvent::Paint",
"Event_Move" => "QEvent::Move",
"Event_Resize" => "QEvent::Resize",
"Event_Create" => "QEvent::Create",
"Event_Destroy" => "QEvent::Destroy",
"Event_Show" => "QEvent::Show",
"Event_Hide" => "QEvent::Hide",
"Event_Close" => "QEvent::Close",
"Event_Quit" => "QEvent::Quit",
"Event_Accel" => "QEvent::Accel",
"Event_Clipboard" => "QEvent::Clipboard",
"Event_SockAct" => "QEvent::SockAct",
"Event_DragEnter" => "QEvent::DragEnter",
"Event_DragMove" => "QEvent::DragMove",
"Event_DragLeave" => "QEvent::DragLeave",
"Event_Drop" => "QEvent::Drop",
"Event_DragResponse" => "QEvent::DragResponse",
"Event_ChildInserted" => "QEvent::ChildInserted",
"Event_ChildRemoved" => "QEvent::ChildRemoved",
"Event_LayoutHint" => "QEvent::LayoutHint",
"Event_User" => "QEvent::User",
"color0" => "Qt::color0",
"color1" => "Qt::color1",
"black" => "Qt::black",
"white" => "Qt::white",
"darkGray" => "Qt::darkGray",
"gray" => "Qt::gray",
"lightGray" => "Qt::lightGray",
"red" => "Qt::red",
"green" => "Qt::green",
"blue" => "Qt::blue",
"cyan" => "Qt::cyan",
"magenta" => "Qt::magenta",
"yellow" => "Qt::yellow",
"darkRed" => "Qt::darkRed",
"darkGreen" => "Qt::darkGreen",
"darkBlue" => "Qt::darkBlue",
"darkCyan" => "Qt::darkCyan",
"darkMagenta" => "Qt::darkMagenta",
"darkYellow" => "Qt::darkYellow",
"AlignLeft" => "Qt::AlignLeft",
"AlignRight" => "Qt::AlignRight",
"AlignHCenter" => "Qt::AlignHCenter",
"AlignTop" => "Qt::AlignTop",
"AlignBottom" => "Qt::AlignBottom",
"AlignVCenter" => "Qt::AlignVCenter",
"AlignCenter" => "Qt::AlignCenter",
"SingleLine" => "Qt::SingleLine",
"DontClip" => "Qt::DontClip",
"ExpandTabs" => "Qt::ExpandTabs",
"ShowPrefix" => "Qt::ShowPrefix",
"WordBreak" => "Qt::WordBreak",
"DontPrint" => "Qt::DontPrint",
"TransparentMode" => "Qt::TransparentMode",
"OpaqueMode" => "Qt::OpaqueMode",
"PixelUnit" => "Qt::PixelUnit",
"LoMetricUnit" => "Qt::LoMetricUnit",
"HiMetricUnit" => "Qt::HiMetricUnit",
"LoEnglishUnit" => "Qt::LoEnglishUnit",
"HiEnglishUnit" => "Qt::HiEnglishUnit",
"TwipsUnit" => "Qt::TwipsUnit",
"WindowsStyle" => "Qt::WindowsStyle",
"MotifStyle" => "Qt::MotifStyle",
"Horizontal" => "Qt::Horizontal",
"Vertical" => "Qt::Vertical",
"PenStyle" => "Qt::PenStyle",
"NoPen" => "Qt::NoPen",
"SolidLine" => "Qt::SolidLine",
"DashLine" => "Qt::DashLine",
"DotLine" => "Qt::DotLine",
"DashDotLine" => "Qt::DashDotLine",
"DashDotDotLine" => "Qt::DashDotDotLine",
"BrushStyle" => "Qt::BrushStyle",
"NoBrush" => "Qt::NoBrush",
"SolidPattern" => "Qt::SolidPattern",
"Dense1Pattern" => "Qt::Dense1Pattern",
"Dense2Pattern" => "Qt::Dense2Pattern",
"Dense3Pattern" => "Qt::Dense3Pattern",
"Dense4Pattern" => "Qt::Dense4Pattern",
"Dense5Pattern" => "Qt::Dense5Pattern",
"Dense6Pattern" => "Qt::Dense6Pattern",
"Dense7Pattern" => "Qt::Dense7Pattern",
"HorPattern" => "Qt::HorPattern",
"VerPattern" => "Qt::VerPattern",
"CrossPattern" => "Qt::CrossPattern",
"BDiagPattern" => "Qt::BDiagPattern",
"FDiagPattern" => "Qt::FDiagPattern",
"DiagCrossPattern" => "Qt::DiagCrossPattern",
"CustomPattern" => "Qt::CustomPattern",
"arrowCursor" => "Qt::arrowCursor",
"upArrowCursor" => "Qt::upArrowCursor",
"crossCursor" => "Qt::crossCursor",
"waitCursor" => "Qt::waitCursor",
"ibeamCursor" => "Qt::ibeamCursor",
"sizeVerCursor" => "Qt::sizeVerCursor",
"sizeHorCursor" => "Qt::sizeHorCursor",
"sizeBDiagCursor" => "Qt::sizeBDiagCursor",
"sizeFDiagCursor" => "Qt::sizeFDiagCursor",
"sizeAllCursor" => "Qt::sizeAllCursor",
"blankCursor" => "Qt::blankCursor",
"splitVCursor" => "Qt::splitVCursor",
"splitHCursor" => "Qt::splitHCursor",
"pointingHandCursor" => "Qt::pointingHandCursor"
);
if ( defined( $ENV{"QTDIR"} ) &&
open( I, "< ". $ENV{"QTDIR"} . "/src/kernel/q1xcompatibility.h" ) ) {
while( <I> ) {
if ( /\#define\s+([a-zA-Z0-9_]+)\s+(\S+)/ ) {
if ( !defined( $globals{$1} ) ) {
$globals{$1} = $2;
} elsif ( $globals{$1} ne $2 ) {
#print "conflict: $1 is mapped to $2 and $globals{$1}\n";
}
}
}
close I;
}
#
# do the do
#
while( <STDIN> ) {
@r = parseline($_);
next unless @r;
($file, $line, $variable) = @r;
if ( defined( $variable ) && defined($globals{$variable}) ) {
if ( !defined($lastfile) || ($file ne $lastfile) ) {
$lastfile = undef if ( !$changes );
if ( defined( $lastfile ) ) {
open( O, "> $lastfile" ) ||
die "cannot write to $lastfile, stopped";
print "qt20fix: writing $lastfile (changes: $changes)\n";
print O @currentfile;
close O;
}
open( I, "< $file" ) || die "cannot read $file, stopped";
@currentfile = <I>;
close I;
$lastfile = $file;
$changes = 0;
}
next unless ( defined( $currentfile[$line-1] ) );
next unless ( $currentfile[$line-1] =~ /\b$variable\b/ );
if ( $currentfile[$line-1] =~ s/([^a-zA-Z0-9])::$variable\b/$1$globals{$variable}/ ||
$currentfile[$line-1] =~ s/([^a-zA-Z0-9:])$variable\b/$1$globals{$variable}/ ) {
print "$file:$line:replaced \`$variable\' with \`$globals{$variable}\'\n";
$changes++;
$totalchanges++
}
} elsif ( defined( $variable ) ) {
print "$file:$line: unknown undefined variable $variable\n";
}
}
if ( defined( $changes) && $changes > 0 && defined( $lastfile ) ) {
open( O, "> $lastfile" ) ||
die "cannot write to $lastfile, stopped";
print "qt20fix: writing $lastfile (changes: $changes)\n";
print O @currentfile;
close O;
}
if ( defined( $totalchanges) && $totalchanges > 0 ) {
print "qt20fix: total changes: $totalchanges\nqt20fix: rerun recommended\n";
}

@ -116,5 +116,7 @@ s/\bqobjdefs\./qobjectdefs./g if /#include/;
s/\bQOBJDEFS_H\b/QOBJECTDEFS_H/g if /#if/; s/\bQOBJDEFS_H\b/QOBJECTDEFS_H/g if /#if/;
s/\bqpaintd\./qpaintdevice./g if /#include/; s/\bqpaintd\./qpaintdevice./g if /#include/;
s/\bQPAINTD_H\b/QPAINTDEVICE_H/g if /#if/; s/\bQPAINTD_H\b/QPAINTDEVICE_H/g if /#if/;
s/\bqpaintdc\./qpaintdevicedefs./g if /#include/;
s/\bQPAINTDC_H\b/QPAINTDEVICEDEFS_H/g if /#if/;
s/\bqwindefs\./qwindowdefs./g if /#include/; s/\bqwindefs\./qwindowdefs./g if /#include/;
s/\bQWINDEFS_H\b/QWINDOWDEFS_H/g if /#if/; s/\bQWINDEFS_H\b/QWINDOWDEFS_H/g if /#if/;

@ -45,7 +45,7 @@ else
done done
if [ -z "$F" ]; then if [ -z "$F" ]; then
CUPS=no CUPS=no
[ "$VERBOSE" = "yes" ] && echo " Could not find CUPS lib anywhere in $LIBDIRS" [ "VERBOSE" = "yes" ] && echo " Could not find CUPS lib anywhere in $LIBDIRS"
fi fi
done done
fi fi

@ -50,7 +50,7 @@ else
done done
if [ -z "$F" ]; then if [ -z "$F" ]; then
NIS=no NIS=no
[ "$VERBOSE" = "yes" ] && echo " Could not find NIS lib anywhere in $LIBDIRS" [ "VERBOSE" = "yes" ] && echo " Could not find NIS lib anywhere in $LIBDIRS"
fi fi
done done
fi fi

@ -39,7 +39,7 @@ for LIBDIR in $LIBDIRS; do
done done
if [ -z "$F" ]; then if [ -z "$F" ]; then
XINPUT=no XINPUT=no
[ "$VERBOSE" = "yes" ] && echo " Could not find XInput lib anywhere in $LIBDIRS" [ "VERBOSE" = "yes" ] && echo " Could not find XInput lib anywhere in $LIBDIRS"
fi fi
# check for XInput.h and the IRIX wacom.h # check for XInput.h and the IRIX wacom.h

@ -43,28 +43,28 @@ if [ -z "$F" ]; then
fi fi
# check for Xrandr.h and randr.h # check for Xrandr.h and randr.h
XRANDR_H=
RANDR_H= RANDR_H=
if [ "$XRANDR" = "yes" ]; then if [ "$XRANDR" = "yes" ]; then
INCS="X11/extensions/Xrandr.h X11/extensions/randr.h" INC="X11/extensions/Xrandr.h"
INC2="X11/extensions/randr.h"
XDIRS=`sed -n -e '/^QMAKE_INCDIR_X11[ ]*=/ { s/[^=]*=[ ]*//; s/-I/ /g; p; }' $XCONFIG` XDIRS=`sed -n -e '/^QMAKE_INCDIR_X11[ ]*=/ { s/[^=]*=[ ]*//; s/-I/ /g; p; }' $XCONFIG`
INCDIRS="$IN_INCDIRS $XDIRS /usr/include /include" INCDIRS="$IN_INCDIRS $XDIRS /usr/include /include"
for INC in $INCS; do F=
F= for INCDIR in $INCDIRS; do
for INCDIR in $INCDIRS; do if [ -f $INCDIR/$INC -a -f $INCDIR/$INC2 ]; then
if [ -f $INCDIR/$INC ]; then F=yes
F=yes XRANDR_H=$INCDIR/$INC
[ "$INC" = "X11/extensions/randr.h" ] && RANDR_H=$INCDIR/$INC RANDR_H=$INCDIR/$INC2
[ "$VERBOSE" = "yes" ] && echo " Found $INC in $INCDIR" [ "$VERBOSE" = "yes" ] && echo " Found $INC in $INCDIR"
break break
fi
done
if [ -z "$F" ]
then
XRANDR=no
[ "$VERBOSE" = "yes" ] && echo " Could not find $INC anywhere in $INCDIRS"
break;
fi fi
done done
if [ -z "$F" ]
then
XRANDR=no
[ "$VERBOSE" = "yes" ] && echo " Could not find $INC anywhere in $INCDIRS"
fi
fi fi
# verify that we are using XRandR 1.x >= 1.1 # verify that we are using XRandR 1.x >= 1.1

29
configure vendored

@ -171,7 +171,7 @@ QT_INSTALL_PLUGINS=
QT_INSTALL_DATA= QT_INSTALL_DATA=
QT_INSTALL_TRANSLATIONS= QT_INSTALL_TRANSLATIONS=
QT_INSTALL_SYSCONF= QT_INSTALL_SYSCONF=
QT_INSTALL_SHARE=
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# check SQL drivers and styles available in this package # check SQL drivers and styles available in this package
@ -241,7 +241,7 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_ARG=yes UNKNOWN_ARG=yes
fi fi
;; ;;
-prefix|-sysshare|-docdir|-headerdir|-plugindir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey) -prefix|-docdir|-headerdir|-plugindir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey)
VAR=`echo $1 | sed "s,^-\(.*\),\1,"` VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
shift shift
VAL=$1 VAL=$1
@ -371,9 +371,6 @@ while [ "$#" -gt 0 ]; do
sysconfdir) sysconfdir)
QT_INSTALL_SYSCONF="$VAL" QT_INSTALL_SYSCONF="$VAL"
;; ;;
sysshare)
QT_INSTALL_SHARE="$VAL"
;;
qconfig) qconfig)
CFG_QCONFIG="$VAL" CFG_QCONFIG="$VAL"
;; ;;
@ -943,8 +940,6 @@ done
[ -z "$QT_INSTALL_TRANSLATIONS" ] && QT_INSTALL_TRANSLATIONS=$QT_INSTALL_PREFIX/translations [ -z "$QT_INSTALL_TRANSLATIONS" ] && QT_INSTALL_TRANSLATIONS=$QT_INSTALL_PREFIX/translations
# default PREFIX/etc/settings # default PREFIX/etc/settings
[ -z "$QT_INSTALL_SYSCONF" ] && QT_INSTALL_SYSCONF=$QT_INSTALL_PREFIX/etc/settings [ -z "$QT_INSTALL_SYSCONF" ] && QT_INSTALL_SYSCONF=$QT_INSTALL_PREFIX/etc/settings
# default PREFIX/share
[ -z "$QT_INSTALL_SHARE" ] && QT_INSTALL_SHARE=$QT_INSTALL_PREFIX/share
# generate qconfig.cpp # generate qconfig.cpp
[ -d $outpath/src/tools ] || mkdir -p $outpath/src/tools [ -d $outpath/src/tools ] || mkdir -p $outpath/src/tools
@ -961,7 +956,6 @@ static const char QT_INSTALL_PLUGINS [267] = "qt_plgpath=$QT_INSTALL_PLUGINS
static const char QT_INSTALL_DATA [267] = "qt_datpath=$QT_INSTALL_DATA"; static const char QT_INSTALL_DATA [267] = "qt_datpath=$QT_INSTALL_DATA";
static const char QT_INSTALL_TRANSLATIONS[267] = "qt_trnpath=$QT_INSTALL_TRANSLATIONS"; static const char QT_INSTALL_TRANSLATIONS[267] = "qt_trnpath=$QT_INSTALL_TRANSLATIONS";
static const char QT_INSTALL_SYSCONF [267] = "qt_cnfpath=$QT_INSTALL_SYSCONF"; static const char QT_INSTALL_SYSCONF [267] = "qt_cnfpath=$QT_INSTALL_SYSCONF";
static const char QT_INSTALL_SHARE [267] = "qt_shapath=$QT_INSTALL_SHARE";
/* strlen( "qt_xxxpath=" ) == 11 */ /* strlen( "qt_xxxpath=" ) == 11 */
const char *qInstallPath() { return QT_INSTALL_PREFIX + 11; } const char *qInstallPath() { return QT_INSTALL_PREFIX + 11; }
@ -973,7 +967,6 @@ const char *qInstallPathPlugins() { return QT_INSTALL_PLUGINS + 11; }
const char *qInstallPathData() { return QT_INSTALL_DATA + 11; } const char *qInstallPathData() { return QT_INSTALL_DATA + 11; }
const char *qInstallPathTranslations() { return QT_INSTALL_TRANSLATIONS + 11; } const char *qInstallPathTranslations() { return QT_INSTALL_TRANSLATIONS + 11; }
const char *qInstallPathSysconf() { return QT_INSTALL_SYSCONF + 11; } const char *qInstallPathSysconf() { return QT_INSTALL_SYSCONF + 11; }
const char *qInstallPathShare() { return QT_INSTALL_SHARE + 11; }
EOF EOF
# avoid unecessary rebuilds by copying only if qconfig.cpp has changed # avoid unecessary rebuilds by copying only if qconfig.cpp has changed
@ -1858,7 +1851,7 @@ if [ "$OPT_HELP" = "yes" ]; then
cat <<EOF cat <<EOF
Usage: $relconf [-prefix dir] [-buildkey key] [-docdir dir] [-headerdir dir] Usage: $relconf [-prefix dir] [-buildkey key] [-docdir dir] [-headerdir dir]
[-libdir dir] [-bindir dir] [-plugindir dir ] [-datadir dir] [-sysshare dir] [-libdir dir] [-bindir dir] [-plugindir dir ] [-datadir dir]
[-translationdir dir] [-sysconfdir dir] [-debug] [-release] [-translationdir dir] [-sysconfdir dir] [-debug] [-release]
[-no-gif] [-qt-gif] [-no-sm] [-sm] [-qt-zlib] [-system-zlib] [-no-gif] [-qt-gif] [-no-sm] [-sm] [-qt-zlib] [-system-zlib]
[-qt-libpng] [-system-libpng] [-qt-libpng] [-system-libpng]
@ -1893,8 +1886,6 @@ Installation options:
(default PREFIX/translations) (default PREFIX/translations)
-sysconfdir dir ... Settings used by Qt programs will be looked for in dir -sysconfdir dir ... Settings used by Qt programs will be looked for in dir
(default PREFIX/etc/settings) (default PREFIX/etc/settings)
-sysshare dir ..... System shared data will be installed in dir
(default PREFIX/share)
You may use these options to turn on strict plugin loading. You may use these options to turn on strict plugin loading.
@ -2761,7 +2752,6 @@ QMAKE_VARS="$QMAKE_VARS \"libs.path=${QT_INSTALL_LIBS}\""
QMAKE_VARS="$QMAKE_VARS \"bins.path=${QT_INSTALL_BINS}\"" QMAKE_VARS="$QMAKE_VARS \"bins.path=${QT_INSTALL_BINS}\""
QMAKE_VARS="$QMAKE_VARS \"data.path=${QT_INSTALL_DATA}\"" QMAKE_VARS="$QMAKE_VARS \"data.path=${QT_INSTALL_DATA}\""
QMAKE_VARS="$QMAKE_VARS \"translations.path=${QT_INSTALL_TRANSLATIONS}\"" QMAKE_VARS="$QMAKE_VARS \"translations.path=${QT_INSTALL_TRANSLATIONS}\""
QMAKE_VARS="$QMAKE_VARS \"share.path=${QT_INSTALL_SHARE}\""
# turn off exceptions for the compilers that support it # turn off exceptions for the compilers that support it
COMPILER=`echo $PLATFORM | cut -f 2- -d-` COMPILER=`echo $PLATFORM | cut -f 2- -d-`
@ -2828,7 +2818,7 @@ g++*)
3.*) 3.*)
COMPILER_VERSION="3.*" COMPILER_VERSION="3.*"
;; ;;
[1-9][0-9]|[1-9][0-9].*|[7-9]|[4-9].*) 6.*|5.*|4.*)
COMPILER_VERSION="4.*" COMPILER_VERSION="4.*"
;; ;;
*) *)
@ -2836,17 +2826,6 @@ g++*)
esac esac
[ ! -z "$COMPILER_VERSION" ] && COMPILER="g++-${COMPILER_VERSION}" [ ! -z "$COMPILER_VERSION" ] && COMPILER="g++-${COMPILER_VERSION}"
;; ;;
clang)
# Clang
QMAKE_CONF_COMPILER=`grep "QMAKE_CXX[^_A-Z0-9a-z]" $QMAKESPEC/qmake.conf | sed "s,.* *= *\(.*\)$,\1,"`
COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null | sed 's,^[^0-9]*,,g'`
case "$COMPILER_VERSION" in
*)
# Consider clang as compatible with g++-4.x and therefore the same build-key is used
COMPILER="g++-4.*"
;;
esac
;;
*) *)
# #
;; ;;

@ -95,7 +95,7 @@ void poly()
int head = 0; int head = 0;
int tail = -maxcurves + 2; int tail = -maxcurves + 2;
<a href="qpointarray.html">QPointArray</a> *a = new <a href="qpointarray.html">QPointArray</a>[ maxcurves ]; <a href="qpointarray.html">QPointArray</a> *a = new <a href="qpointarray.html">QPointArray</a>[ maxcurves ];
QPointArray *p; register QPointArray *p;
<a name="x1760"></a> <a href="qrect.html">QRect</a> r = d-&gt;<a href="qwidget.html#rect">rect</a>(); // desktop rectangle <a name="x1760"></a> <a href="qrect.html">QRect</a> r = d-&gt;<a href="qwidget.html#rect">rect</a>(); // desktop rectangle
int i; int i;

@ -63,6 +63,7 @@
"Font Displayer" qfd-example.html "Font Displayer" qfd-example.html
"Fonts in Qt/Embedded" emb-fonts.html "Fonts in Qt/Embedded" emb-fonts.html
"Format of the QDataStream Operators" datastreamformat.html "Format of the QDataStream Operators" datastreamformat.html
"Functions removed in Qt 2.0" removed20.html
"GNU General Public License" gpl.html "GNU General Public License" gpl.html
"Getting Started" motif-walkthrough-1.html "Getting Started" motif-walkthrough-1.html
"Grapher Plugin" grapher-nsplugin-example.html "Grapher Plugin" grapher-nsplugin-example.html
@ -118,6 +119,7 @@
"Pictures of Most Qt Widgets" pictures.html "Pictures of Most Qt Widgets" pictures.html
"Play Tetrix!" qaxserver-demo-tetrax.html "Play Tetrix!" qaxserver-demo-tetrax.html
"Popup Widgets" popup-example.html "Popup Widgets" popup-example.html
"Porting to Qt 2.x" porting2.html
"Porting to Qt 3.x" porting.html "Porting to Qt 3.x" porting.html
"Porting your applications to Qt/Embedded" emb-porting.html "Porting your applications to Qt/Embedded" emb-porting.html
"Preparing to Migrate the User Interface" motif-walkthrough-2.html "Preparing to Migrate the User Interface" motif-walkthrough-2.html

@ -217,9 +217,12 @@ previously disabled, please check these macro variables:
<li> <tt>CHECK_NULL</tt> becomes <tt>QT_CHECK_NULL</tt> <li> <tt>CHECK_NULL</tt> becomes <tt>QT_CHECK_NULL</tt>
<li> <tt>CHECK_MATH</tt> becomes <tt>QT_CHECK_MATH</tt> <li> <tt>CHECK_MATH</tt> becomes <tt>QT_CHECK_MATH</tt>
</ul> </ul>
<p> The name of some debugging macro functions has been changed: <p> The name of some debugging macro functions has been changed as well
but source compatibility should not be affected if the macro variable
<tt>QT_CLEAN_NAMESPACE</tt> is not defined:
<p> <ul> <p> <ul>
<li> <tt>ASSERT</tt> becomes <tt>Q_ASSERT</tt> <li> <tt>ASSERT</tt> becomes <tt>Q_ASSERT</tt>
<li> <tt>CHECK_PTR</tt> becomes <tt>Q_CHECK_PTR</tt>
</ul> </ul>
<p> For the record, undocumented macro variables that are not part of the API <p> For the record, undocumented macro variables that are not part of the API
have been changed: have been changed:

@ -0,0 +1,965 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/doc/porting2.doc:36 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Porting to Qt 2.x</title>
<style type="text/css"><!--
fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; }
--></style>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#E5E5E5">
<td valign=center>
<a href="index.html">
<font color="#004faf">Home</font></a>
| <a href="classes.html">
<font color="#004faf">All&nbsp;Classes</font></a>
| <a href="mainclasses.html">
<font color="#004faf">Main&nbsp;Classes</font></a>
| <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
| <a href="groups.html">
<font color="#004faf">Grouped&nbsp;Classes</font></a>
| <a href="functions.html">
<font color="#004faf">Functions</font></a>
</td>
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>Porting to Qt 2.x</h1>
<p> <p>
You're probably looking at this page because you want to port
your application from Qt 1.x to Qt 2.x, but to be sure, let's
review the good reasons to do this:
<ul>
<li>To get access to all the new Qt 2.x features like the rich text
HTML subset for formatted labels, tooltips, online help etc.
and the much easier to use layout classes and widgets.
<li>To make your application truly international, with support
for Unicode and translations for the languages of the world.
<li>To allow your application to fit into the new look of the
Unix desktop with configurable, very powerful "themes". The
extended style system also integrates Qt applications better
on MS-Windows desktops. Qt will automatically chose the right
colors and fonts and obey global system setting changes.
<li>To stay up-to-date with the version of Qt that gets all the
new features and bug-fixes.
<li>To get more speed and smoother widgets display with all the
new anti-flicker changes in Qt.
<li>Most of all though, you want to port to Qt 2.x
so that your Wheel Mouse works!
</ul>
<p> <p>
The Qt 2.x series is not binary compatible with the 1.x series.
This means programs compiled for Qt 1.x must be recompiled to work
with Qt 2.x. Qt 2.x is also not completely <em>source</em> compatible
with 1.x, however all points of incompatibility cause
compiler errors (rather than mysterious results), or produce run-time
messages. The result is that Qt 2.x includes many additional features,
discards obsolete functionality that is easily converted to use the new
features, and that porting an application from Qt 1.x to Qt 2.x is
a simple task well worth the amount of effort required.
<p> To port code using Qt 1.x to use Qt 2.x:
<p> <ul>
<li> Briefly read the porting notes below to get an idea of what to expect.
<li> Be sure your code compiles and runs well on all your target platforms with Qt 1.x.
<li> Recompile with Qt 2.x. For each error, search below for related
identifiers (eg. function names, class names) - this documented is
structured to mention all relevant identifiers to facilitate such
searching, even if that makes it a little verbose.
<li> If you get stuck, ask on the qt-interest mailing list, or
Trolltech Technical Support if you're a Professional Edition
licensee.
</ul>
<p> Many very major projects, such as <a href="http://www.kde.org/">KDE</a>
have been port, so there is plenty of expertise in the collective conscious
that is the Qt Developer Community!
</p>
<p> <hr>
<p> <h2 align=center>The Porting Notes</h2>
<p> <ul>
<li><b><a href="#Namespace">Namespace</a></b>
<li><b><a href="#Virtual">Virtual Functions</a></b>
<li><b><a href="#Collection">Collection classes</a></b>
<li><b><a href="#DefaultParent">No Default 0 Parent Widget</a></b>
<li><b><a href="#DebugVsRelease">Debug vs. Release</a></b>
<li><b><a href="#QApplication">QApplication</a></b>
<li><b><a href="#QClipboard">QClipboard</a></b>
<li><b><a href="#QColor">QColor</a></b>
<li><b><a href="#QDataStream">QDataStream</a></b>
<li><b><a href="#QDialog">QDialog</a></b>
<li><b><a href="#QDropSite">QDropSite</a></b>
<li><b><a href="#QEvent">QEvent</a></b>
<li><b><a href="#QFile">QFile</a></b>
<li><b><a href="#QFontMetrics">QFontMetrics</a></b>
<li><b><a href="#QIODevice">QIODevice</a></b>
<li><b><a href="#QLabel">QLabel</a></b>
<li><b><a href="#QLayout">QLayout</a></b>
<li><b><a href="#QListView">QListView</a></b>
<li><b><a href="#QMenuData">QMenuData</a></b>
<li><b><a href="#QMenuData">QPopupMenu</a></b>
<li><b><a href="#QMultiLineEdit">QMultiLineEdit</a></b>
<li><b><a href="#QPainter">QPainter</a></b>
<li><b><a href="#QPicture">QPicture</a></b>
<li><b><a href="#QPoint">QPoint, <a href="qpointarray.html">QPointArray</a>, <a href="qsize.html">QSize</a> and <a href="qrect.html">QRect</a></a></b>
<li><b><a href="#QPixmap">QPixmap</a></b>
<li><b><a href="#QRgb">QRgb</a></b>
<li><b><a href="#QScrollView">QScrollView</a></b>
<li><b><a href="#QStrList">QStrList</a></b>
<li><b><a href="#QString">QString</a></b>
<li><b><a href="#QTextStream">QTextStream</a></b>
<li><b><a href="#QUriDrag">QUriDrag / QUrlDrag</a></b>
<li><b><a href="#QValidator">QComboBox</a></b>
<li><b><a href="#QValidator">QLineEdit</a></b>
<li><b><a href="#QValidator">QSpinBox</a></b>
<li><b><a href="#QValidator">QValidator</a></b>
<li><b><a href="#QWidget">QWidget</a></b>
<li><b><a href="#QWindow">QWindow</a></b>
</ul>
<p> <hr>
<p> <h3><a name="Namespace">Namespace</a></h3>
<p> <p> Qt 2.x is namespace-clean, unlike 1.x. Qt now uses very few
global identifiers. Identifiers like <code>red, blue, LeftButton,
AlignRight, Key_Up, Key_Down, NoBrush</code> etc. are now part of a
special class <code>Qt</code> (defined in qnamespace.h),
which is inherited by
most Qt classes. Member functions of classes that inherit from <a href="qwidget.html">QWidget</a>,
etc. are totally unaffected, but code that is
<em>not</em> in functions of classes inherited from <code>Qt</code>,
you must qualify these identifiers like this: <code>Qt::red,
Qt::LeftButton, Qt::AlignRight</code>, etc.
<p> <p>The <code>qt/bin/qt20fix</code> script helps to fix the code that
needs adaption, though most code does not need changing.
<p> Compiling with -DQT1COMPATIBILITY will help you get going with Qt 2.x
- it allows all the old "dirty namespace" identifiers from Qt 1.x to
continue working. Without it, you'll get compile errors that can
easily be fixed by searching this page for the clean identifiers.
<p> <h3><a name="DefaultParent">No Default 0 Parent Widget</a></h3>
<p> In Qt 1.x, all widget constructors were defined with a default value
of 0 for the parent widget. However, only the main window of the
application should be created with a 0 parent, all other widgets
should have parents. Having the 0 default made it too simple to create
bugs by forgetting to specify the parent of non-mainwindow
widgets. Such widgets would typically never be deleted (causing memory
leaks), and they would become top-level widgets, confusing the window
managers. Therefore, in Qt 2.x the 0 default parent has been removed
for the widget classes that are not likely to be used as main windows.
<p> Note also that programs no longer need (or should) use 0 parent just
to indicate that a widget should be top-level. See
<pre> QWidget::isTopLevel() </pre>
for details. See also the notes about
<a href="#QMenuData">QPopupMenu</a> and <a href="#QDialog">QDialog</a>
below.
<p> <h3><a name="Virtual">Virtual Functions</a></h3>
<p> <p> Some virtual functions have changed signature in Qt 2.x.
If you override them in derived classes, you must change the signature
of your functions accordingly.
<p> <!-- warwick can check for additions to this with his qt-2-report -->
<ul>
<li><pre> QWidget::setStyle(GUIStyle)</pre>
<li><pre> QListView::addColumn(const char *, int)</pre>
<li><pre> QListView::setColumnText(int, const char *)</pre>
<li><pre> QListViewItem::setText(int, const char *)</pre>
<li><pre> QMultiLineEdit::insertLine(const char *, int)</pre>
<li><pre> QMultiLineEdit::insertAt(const char *, int, int, bool)</pre>
<li><pre> QSpinBox::setPrefix(const char *)</pre>
<li><pre> QSpinBox::setSuffix(const char *)</pre>
<li><pre> QToolButton::setTextLabel(const char *, bool)</pre>
<li><pre> QDoubleValidator::validate(QString &amp;, int &amp;)</pre>
<li><pre> QIntValidator::validate(QString &amp;, int &amp;)</pre>
<li><pre> QValidator::fixup(QString &amp;)</pre>
<li><pre> QSlider::paintSlider(QPainter *, const <a href="qrect.html">QRect</a> &amp;)</pre>
</ul>
<p> This is one class of changes that are
not detected by the compiler,
so you should mechanically search for each of
these function names in your header files, eg.
<p> <pre>
egrep -w 'setStyle|addColumn|setColumnText|setText...' *.h
</pre>
<p> Of course, you'll get a few false positives (eg. if you have a setText
function that is not in a subclass of <a href="qlistviewitem.html">QListViewItem</a>).
<p> <h3><a name="Collection">Collection classes</a></h3>
<p> <p> The <a href="collection.html#collection-classes">collection classes</a> include generic
classes such as QGDict, QGList, and
the subclasses such as <a href="qdict.html">QDict</a> and QList.
<p> <p> The macro-based Qt collection classes are obsolete; use the
template-based classes instead. Simply remove includes of qgeneric.h and
replace e.g. Q_DECLARE(<a href="qcache.html">QCache</a>,QPixmap) with QCache<QPixmap>.
<p> <p> The GCI global typedef is replaced by QCollection::Item. Only if you
make your own subclasses of the undocumented generic collection classes
will you have GCI in your code.
This change has been made to avoid collisions with other namespaces.
<p> <p> The GCF global typedef is removed (it was not used in Qt).
<p> <h3><a name="DebugVsRelease">Debug vs. Release</a></h3>
<p> <p>The Q_ASSERT macro is now a null expression if the QT_CHECK_STATE flag
is not set (i.e. if the QT_NO_CHECK flag is defined).
<p> <p>The debug() function now outputs nothing if Qt was compiled with
the QT_NO_DEBUG macro defined.
<p> <h3><a name="QString">QString</a></h3>
<p> <a href="qstring.html">QString</a> has undergone major changes internally, and although it is highly
backward compatible, it is worth studying in detail when porting to Qt 2.x.
The Qt 1.x QString class has been renamed to <a href="qcstring.html">QCString</a> in Qt 2.x, though if
you use that you will incur a performance penalty since all Qt functions
that took const char* now take const QString&.
<p> <p>
To take full advantage of the new <a href="i18n.html#internationalization">Internationalization</a>
functionality in Qt 2.x, the following steps are required:
<p> <ul>
<li> Start converting all uses of "const char*" in parameters to
"const QString&" - this can often be done mechanically, eg.
using Perl. Convert usage of char[] for temporary string
building to QString (much software already uses QString for
this purpose as it offers many more facilities).
<p> If you find that you are mixing usage of QCString, QString,
and <a href="qbytearray.html">QByteArray</a>, this causes lots of unnecessary copying and
might indicate that the true nature of the data you are
dealing with is uncertain. If the data is NUL-terminated
8-bit data, use QCString; if it is unterminated (ie.
contains NULs) 8-bit data, use QByteArray; if it is text,
use <a href="qstring.html">QString</a>.
</p>
<li> Put a breakpoint in <pre> QString::latin1()</pre>
to catch places where
Unicode information is being converted to ASCII (loosing
information if your user in not using Latin1). Qt has
a small number of calls to this - ignore those. As a stricter
alternative, compile your code with QT_NO_ASCII_CAST defined,
which hides the automatic conversion of QString to const char*,
so you can catch problems at compile time.
</p>
<li> See the Qt <a href="i18n.html">Internationalization page</a>
for information about the full process of internationalizing
your software.
</ul>
<p> <p>
Points to note about the new QString are:
<p> <dl compact>
<dt><b>Unicode</b></dt>
<dd>
Qt now uses Unicode throughout.
data() now returns a <em>const</em> reference to an ASCII version
of the string - you cannot directly access the
string as an array of bytes, because it isn't one. Often, latin1() is
what you want rather than data(), or just leave it to convert to
const char* automatically. data() is only used now to aide porting to Qt 2.x,
and ideally you'll only need latin1() or implicit conversion when interfacing
to facilities that do not have Unicode support.
<p> <dt><b>Automatic-expanding</b></dt>
<dd>
A big advantage of the new <a href="qstring.html">QString</a> is that it automatically expands
when you write to an indexed position.
<p> <dt><b>QChar and <a href="qcharref.html">QCharRef</a></b></dt>
<dd>
<a href="qchar.html">QChar</a> are the Unicode characters that make up a QString. A QCharRef is
a temporary reference to a QChar in a QString that when assigned to
ensures that the <a href="shclass.html#implicit-sharing">implicit sharing</a> semantics of the QString are maintained.
You are unlikely to use QCharRef in your own code - but so that you
understand compiler error messages, just know that <tt>mystring[123]</tt>
is a QCharRef whenever <tt>mystring</tt> is not a constant string. A QCharRef
has basically the same functionality as a QChar, except it is more restricted
in what you can assign to it and cast it to (to avoid programming errors).
<p> <dt><b>Use QString</b></dt>
<dd>
Try to always use QString. If you <em>must</em>, use <a href="qcstring.html">QCString</a> which is the
old implementation from Qt 1.x.
<p> <dt><b>Unicode vs. ASCII</b></dt>
<dd>
Every conversion to and from ASCII is wasted time, so try to use <a href="qstring.html">QString</a>
as much as possible rather than const char*. This also ensures you have
full 16-bit support.
<p> <dt><b>Convertion to ASCII</b></dt>
<dd>
The return value from operator const char*() is transient - don't expect
it to remain valid while you make deep function calls.
It is valid for as long as you don't modify or destroy the QString.
<p> <dt><b>QString is simpler</b></dt>
<dd>
Expect your code to become simpler with the new QString, especially
places where you have used a char* to wander over the string rather
than using indexes into the string.
<p> <dt><b>Some hacks don't work</b></dt>
<dd>
This hack:
use_sub_string( &my_string[index] )
should be replaced by:
use_sub_string( my_string.mid(index) )
<p> <dt><b>QString(const char*, int) is removed</b></dt>
<dd>
The QString constructor taking a const char* and an integer is removed.
Use of this constructor was error-prone, since the length included the
'&#92;0' terminator. Use <a href="qstring.html#left">QString::left</a>(int) or <a href="qstring.html#fromLatin1">QString::fromLatin1</a>( const char*,
int ) -- in both cases the int parameter signifies the number of characters.
<p> <dt><b>QString(int) is private</b></dt>
<dd>
The <a href="qstring.html">QString</a> constructor taking an integer is now private. This function
is not meaningful anymore, since QString does all space allocation
automatically. 99% of cases can simple be changed to use the
default constructor, QString().
<p>
In Qt 1.x the constructor was used in two ways: accidentally,
by attempting to convert a char to a QString (the char converts to int!) -
giving strange bugs, and as a way to make a QString big enough prior to
calling <pre> QString::sprintf()</pre>
. In Qt 2.x, the accidental bug case is
prevented (you will get a compilation error) and QString::sprintf has
been made safe - you no longer need to pre-allocate space (though for
other reasons, sprintf is still a poor choice - eg. it doesn't pass Unicode).
The only remaining common case is conversion of 0 (NULL) to QString, which
would usually give expected results in Qt 1.x. For Qt 2.x the correct
syntax is to use <a href="qstring.html#QString-null">QString::null</a>, though note that
the default constructor, QString(), creates a null string too.
Assignment of 0 to a <a href="qstring.html">QString</a> is ambiguous - assign
QString::null; you'll mainly find these in code that has been converted
from const char* types to QString.
This also prevents a common error case from Qt 1.x - in
that version, mystr = 'X' would <em>not</em> produce the expected
results and was always a programming error; in Qt 2.x, it works - making
a single-character string.
<p> <p>
Also see <a href="#QStrList">QStrList</a>.
<p> <dt><b>Signals and Slots</b></dt>
<dd>
Many signal/slots have changed from const char* to QString. You will
get run-time errors when you try to <pre> QObject::connect()</pre>
to the old
signals and slots, usually with a message indicating the const QString&
replacement signal/slot.
<p> <dt><b>Optimize with Q2HELPER</b></dt>
<dd>
In qt/src/tools/qstring.cpp there is a Q2HELPER - define it for some
extra debugging/optimizing features (don't leave it it - it kills performance).
You'll get an extra function, qt_qstring_stats(), which will print a
summary of how much your application is doing Unicode and ASCII
back-and-forth conversions.
<p> <dt><b>QString::detach() is obsolete and removed</b></dt>
<dd>
Since <a href="qstring.html">QString</a> is now always shared, this function does nothing.
Remove calls to QString::detach().
<p> <dt><b>QString::resize(int size) is obsolete and removed</b></dt>
<dd>
Code using this to truncate a string should use
<a href="qstring.html#truncate">truncate(size-1)</a>.
Code using qstr.resize(0) should use qstr = QString::null.
Code calling resize(n) prior to using
<a href="qstring.html#operator[]">operator[]</a> up to n just remove
the resize(n) completely.
<p> <dt><b>QString::size() is obsolete and removed</b></dt>
<dd>
Calls to this function must be replaced by
<a href="qstring.html#length">length()</a>+1.
<p> <dt><b>QString::setStr(const char*) is removed</b></dt>
<dd>Try to understand why you were using this.
If you just meant assignment, use that. Otherwise,
you are probably using QString as an array of bytes, in which case use
<a href="qbytearray.html">QByteArray</a> or <a href="qcstring.html">QCString</a> instead.
<p> <dt><b>QString is not an array of bytes</b></dt>
<dd>
Code that uses <a href="qstring.html">QString</a> as an array of bytes should use QByteArray
or a char[], <em>then</em> convert that to a QString if needed.
<p> <dt><b>"string = 0"</b></dt>
<dd>
Assigning 0 to a QString should be assigning the null string,
ie. string = QString::null.
<p> <dt><b>System functions</b></dt>
<dd>
You may find yourself needing latin1() for passing to the operating system
or other libraries, and be tempted to use QCString to save the conversion,
but you are better off using Unicode throughout, then when the operating
system supports Unicode, you'll be prepared. Some Unix operating systems
are now beginning to have basic Unicode support, and Qt will be tracking
these improvements as they become more widespread.
<p> <dt><b>Bugs removed</b></dt>
<dd>
toShort() returns 0 (and sets *ok to false) on error.
toUInt() now works for big valid unsigned integers.
insert() now works into the same string.
<p> <dt><b>NULL pointers</b></dt>
<dd>
When converting "const char*" usage to QString in order to make your
application fully Unicode-aware, use QString::null for the null value
where you would have used 0 with char pointers.
<p> <dt><b>QString is not null terminated</b></dt>
<dd>
This means that inserting a 0-character
in the middle of the string does <em>not</em> change the length(). ie.
<pre>
<a href="qstring.html">QString</a> s = "fred";
s[1] = '\0';
// s.<a href="qstring.html#length">length</a>() == 4
// s == "f\0ed"
// s.<a href="qstring.html#latin1">latin1</a>() == "f"
s[1] = 'r';
// s == "fred"
// s.<a href="qstring.html#latin1">latin1</a>() == "fred"
</pre>
Especially look out for this type of code:
<pre>
<a href="qstring.html">QString</a> s(2);
s[0] = '?';
s[1] = 0;
</pre>
This creates a string 2 characters long.
To find these problems while converting, you might like to
add <a href="qapplication.html#Q_ASSERT">Q_ASSERT</a>(strlen(d->ascii)==d->len) inside
<pre> QString::latin1()</pre>
.
<p> <dt><b>QString or Standard C++ string?</b></dt>
<dd>
<p>
The Standard C++ Library string is not Unicode. Nor is wstring defined
to be so (for the small number of platforms where it is defined at all).
This is the same mistake made over and over
in the history of C - only when non-8-bit characters are <em>the norm</em>
do programmers find them usable. Though it is possible to convert between
string and <a href="qstring.html">QString</a>, it is less efficient than using QString throughout.
For example, when using:
<pre>
QLabel::<a href="qlabel.html#setText">setText</a>( const <a href="qstring.html">QString</a>&amp; )
</pre>
if you use string, like this:
<pre>
void myclass::dostuffwithtext( const string&amp; str )
{
mylabel.setText( QString(str.c_str()) );
}
</pre>
that will create a (ASCII only) copy of str, stored in mylabel.
But this:
<pre>
void myclass::dostuffwithtext( const <a href="qstring.html">QString</a>&amp; str )
{
mylabel.setText( str );
}
</pre>
will make an <a href="shclass.html#implicitly-shared">implicitly shared</a> reference to str in the <a href="qlabel.html">QLabel</a> - no copying
at all. This function might be 10 nested function calls away from something
like this:
<pre>
void toplevelclass::initializationstuff()
{
doStuff( tr("Okay") );
}
</pre>
At this point, in Qt 2.x, the tr() does a very fast dictionary lookup
through memory-mapped message files, returning some Unicode <a href="qstring.html">QString</a> for
the appropriate language (the default being to just make a QString out
of the text, of course - you're not <em>forced</em> to use any of these
features), and that <em>same</em> memory mapped Unicode will be passed
though the system. All occurrences of the translation of "Okay" can
potentially be shared.
<p> </dl>
<p> <h3><a name="QApplication">QApplication</a></h3>
<p> In the function <pre> QApplication::setColorSpec()</pre>
,
PrivateColor and TrueColor are obsolete. Use ManyColor instead.
<p> <h3><a name="QColor">QColor</a></h3>
<p> <p>
All colors
(color0,
color1,
black,
white,
darkGray,
gray,
lightGray,
red,
green,
blue,
cyan,
magenta,
yellow,
darkRed,
darkGreen,
darkBlue,
darkCyan,
darkMagenta,
and
darkYellow)
are in the Qt namespace.
In members of classes that inherit the Qt namespace-class (eg. <a href="qwidget.html">QWidget</a>
subclasses), you can use the unqualified names as before, but in global
functions (eg. main()), you need to qualify them: Qt::red, Qt::white, etc.
See also the <a href="#QRgb">QRgb</a> section below.
<p> <h3><a name="QRgb">QRgb</a></h3>
<p> In QRgb (a typedef of long), the order of the RGB channels has changed to
be in the more efficient order (for typical contemporary hardware). If your
code made assumptions about the order, you will get blue where you expect
red and vice versa (you'll not notice the problem if you use shades of
gray, green, or magenta). You should port your code to use the
creator function <a href="qcolor.html#qRgb">qRgb</a>(int r,int g,int b) and the
access functions <a href="qcolor.html#qRed">qRed</a>(QRgb), <a href="qcolor.html#qBlue">qBlue</a>(QRgb), and <a href="qcolor.html#qGreen">qGreen</a>(QRgb).
If you are using the alpha channel, it hasn't moved, but you should use
the functions <a href="qcolor.html#qRgba">qRgba</a>(int,int,int,int) and <a href="qcolor.html#qAlpha">qAlpha</a>(QRgb). Note also that
<a href="qcolor.html#pixel">QColor::pixel</a>() does <i>not</i> return a QRgb (it never did on all platforms,
but your code may have assumed so on your platform) - this may also produce
strange color results - use <a href="qcolor.html#rgb">QColor::rgb</a>() if you want a QRgb.
<p> <h3><a name="QDataStream">QDataStream</a></h3>
<p> <p>The QDatastream serialization format of most Qt classes is changed
in Qt 2.x. Use <pre> QDataStream::setVersion( 1 )</pre>
to get a
datastream object that can read and write Qt 1.x format data streams.
<p> <p>If you want to write Qt 1.x format datastreams, note the following
compatibility issues:
<ul>
<li>QString: Qt 1.x has no Unicode support, so strings will be
serialized by writing the classic C string returned by <pre>
QString::<a href="qstring.html#latin1">latin1</a>().</pre>
<li><a href="#QPoint">QPoint & al.</a>: Coordinates will be
truncated to the Qt 1.x 16 bit format.
</ul>
<p> <h3><a name="QWidget">QWidget</a></h3>
<p> <h4>QWidget::recreate()</h4>
<p>
This function is now called <a href="qwidget.html#reparent">reparent()</a>.
<p> <h4>QWidget::setAcceptFocus(bool)</h4>
<p>
This function is removed.
Calls like QWidget::setAcceptFocus(TRUE) should be replaced by
<pre> QWidget::setFocusPolicy(StrongFocus)</pre>
, and
calls like QWidget::setAcceptFocus(FALSE) should be replaced by
<pre> QWidget::setFocusPolicy(NoFocus)</pre>
.
Additional policies are TabFocus and ClickFocus.
<p> <h4>QWidget::paintEvent()</h4>
<p>
paintEvent(0) is not permitted - subclasses need not check for
a null event, and might crash.
Never pass 0 as the argument to paintEvent(). You probably
just want repaint() or update() instead.
<p>
When processing a paintEvent, painting is only permitted within
the update region specified in the event. Any painting outside will be
clipped away. This shouldn't break any code (it was always like this
on MS-Windows) but makes many explicit calls to
<a href="qpainter.html#setClipRegion">QPainter::setClipRegion</a>() superfluous. Apart from the improved
consistency, the change is likely to reduce flicker and to make Qt
event slightly faster.
<p> <h3><a name="QIODevice">QIODevice</a></h3>
<p>
The protected member QIODevice::index is renamed to QIODevice::ioIndex
to avoid warnings and to allow compilation with bad C libraries that
#define index to strchr. If you have made a subclass of <a href="qiodevice.html">QIODevice</a>,
check every occurrence of the string "index" in the implementation, since
a compiler will not always catch cases like <pre>(uint)index</pre>
that need to be changed.
<p> <h3><a name="QLabel">QLabel</a></h3>
<p> <h4><pre> QLabel::setMargin()</pre>
</h4>
<p>
<pre> QLabel::setMargin()</pre>
and<pre> QLabel::margin()</pre>
have been renamed to <pre> QLabel::setIndent()</pre>
and
<pre> QLabel::indent()</pre>
, respectively. This was done to avoid
collision with <a href="qframe.html#setMargin">QFrame::setMargin</a>(), which is now virtual.
<p> <h4><pre> QLabel::setMovie()</pre>
</h4>
<p>
Previously, setting a movie on a label cleared the value of text().
Now it doesn't. If you somehow used <tt>QLabel::text()</tt>
to detect if a
movie was set, you might have trouble. This is unlikely.
<p> <h3><a name="QDialog">QDialog</a></h3>
<p> <p> The semantics of the parent pointer changed for modeless dialogs:
In Qt-2.x, dialogs are always top level windows. The parent, however,
takes the ownership of the dialog, i.e. it will delete the dialog at
destruction if it has not been explicitly deleted
already. Furthermore, the window system will be able to tell that both
the dialog and the parent belong together. Some X11 window managers
will for instance provide a common taskbar entry in that case.
<p> <p>
If the dialog belongs to a top level main window
of your application, pass this main window as parent to the dialog's
constructor. Old code (with 0 pointer) will still run. Old code that
included QDialogs as child widgets will no longer work (it never really did).
If you think you might be doing this, put a breakpoint in
<a href="qdialog.html#QDialog">QDialog::QDialog</a>() conditional on parent not being 0.
<p> <h3><a name="QStrList">QStrList</a></h3>
<p> Many methods that took a <a href="qstrlist.html">QStrList</a> can now instead take a <a href="qstringlist.html">QStringList</a>,
which is a real list of <a href="qstring.html">QString</a> values.
<p> To use QStringList rather than QStrList, change loops that look like this:
<pre>
<a href="qstrlist.html">QStrList</a> list = ...;
const char* s;
for ( s = list.<a href="qptrlist.html#first">first</a>(); s; s = list.<a href="qptrlist.html#next">next</a>() ) {
process(s);
}
</pre>
to be like this:
<pre>
<a href="qstringlist.html">QStringList</a> list = ...;
QStringList::ConstIterator i;
for ( i = list.<a href="qvaluelist.html#begin">begin</a>(); i != list.<a href="qvaluelist.html#end">end</a>(); ++i ) {
process(*i);
}
</pre>
<p> In general, the QStrList functions are less efficient, building a temporary QStringList.
<p> The following functions now use QStringList rather than QStrList
for return types/parameters.
<p> <ul>
<li><tt>void <a href="qfiledialog.html#setFilters">QFileDialog::setFilters</a>(const <a href="qstrlist.html">QStrList</a>&)</tt>
becomes <tt>void QFileDialog::setFilters(const <a href="qstringlist.html">QStringList</a>&)</tt>
<li><tt>QStrList <a href="qfiledialog.html#getOpenFileNames">QFileDialog::getOpenFileNames</a>(...)</tt>
becomes <tt>QStringList QFileDialog::getOpenFileNames(...)</tt>
<li><tt>bool QUrlDrag::decodeLocalFiles(<a href="qmimesource.html">QMimeSource</a>*, QStrList&)</tt>
becomes <tt>bool <a href="quridrag.html#decodeLocalFiles">QUriDrag::decodeLocalFiles</a>(QMimeSource*, QStringList&)</tt>
<li><tt>const QStrList *QDir::entryList(...) const</tt>
becomes <tt>QStringList <a href="qdir.html#entryList">QDir::entryList</a>(...) const</tt>
(note that the return type is no longer a pointer). You may also
choose to use encodedEntryList().
</ul>
<p> The following functions are added:
<ul>
<li><tt>QComboBox::insertStringList(const QStringList &, int index=-1)</tt>
<li><tt>QListBox::insertStringList(const QStringList &,int index=-1)</tt>
</ul>
<p> The rarely used static function <tt>void
QFont::listSubstitutions(<a href="qstrlist.html">QStrList</a>*)</tt> is replaced by <tt>QStringList
<a href="qfont.html#substitutions">QFont::substitutions</a>()</tt>.
<p> <h3><a name="QLayout">QLayout</a></h3>
<p> <p> Calling resize(0,0) or resize(1,1) will no longer work magically.
Remove all such calls. The default size of top level widgets will be their
<a href="qwidget.html#sizeHint">sizeHint()</a>.
<p> <p> The default implementation of <a href="qwidget.html#sizeHint">QWidget::sizeHint</a>() will no longer
return just an invalid size; if the widget has a layout, it will return
the layout's preferred size.
<p> <p> The special maximum MaximumHeight/Width is now QWIDGETSIZE_MAX,
not QCOORD_MAX.
<p> <p> <a href="qboxlayout.html#addWidget">QBoxLayout::addWidget()</a>
now interprets the <em>alignment</em> parameter more aggressively. A
non-default alignment now indicates that the widget should not grow to
fill the available space, but should be sized according to sizeHint().
If a widget is too small, set the alignment to 0. (Zero indicates no
alignment, and is the default.)
<p> <p> The class QGManager is removed. Subclasses of <a href="qlayout.html">QLayout</a> need to be rewritten
to use the new, much simpler <a href="qlayout.html">QLayout API</a>.
<p> <p> For typical layouts, all use of
<a href="qwidget.html#setMinimumSize">setMinimumSize()</a>
and
<a href="qwidget.html#setFixedSize">setFixedSize()</a>
can be removed.
<a href="qlayout.html#activate">activate()</a> is no longer necessary.
<p> <p>
You might like to look at the <a href="qgrid.html">QGrid</a>, <a href="qvbox.html">QVBox</a>, and <a href="qhbox.html">QHBox</a> widgets - they offer
a simple way to build nested widget structures.
<p> <h3><a name="QListView">QListView</a></h3>
<p> <p>In Qt 1.x mouse events to the viewport where redirected to the
event handlers for the listview; in Qt 2.x, this functionality is
in <a href="qscrollview.html">QScrollView</a> where mouse (and other position-oriented) events are
redirected to viewportMousePressEvent() etc, which in turn translate
the event to the coordinate system of the contents and call
contentsMousePressEvent() etc, thus providing events in the most
convenient coordinate system. If you overrode QListView::MouseButtonPress(),
<a href="qwidget.html#mouseDoubleClickEvent">QListView::mouseDoubleClickEvent</a>(), <a href="qwidget.html#mouseMoveEvent">QListView::mouseMoveEvent</a>(), or
<a href="qwidget.html#mouseReleaseEvent">QListView::mouseReleaseEvent</a>() you must instead override
viewportMousePressEvent(),
viewportMouseDoubleClickEvent(), viewportMouseMoveEvent(), or
viewportMouseReleaseEvent() respectively. New code will usually override
contentsMousePressEvent() etc.
<p> <p>The signal <a href="qlistview.html#selectionChanged">QListView::selectionChanged</a>(<a href="qlistviewitem.html">QListViewItem</a> *) can now be
emitted with a null pointer as parameter. Programs that use the
argument without checking for 0, may crash.
<p> <h3><a name="QMultiLineEdit">QMultiLineEdit</a></h3>
<p> <p>
The protected function
<pre> QMultiLineEdit::textWidth(QString*)</pre>
changed to
<pre> QMultiLineEdit::textWidth(const <a href="qstring.html">QString</a>&amp;)</pre>
.
This is unlikely to be a problem, and you'll get a compile error
if you called it.
<p> <h3><a name="QClipboard">QClipboard</a></h3>
<p> <p>
<pre> QClipboard::pixmap()</pre>
now returns a <a href="qpixmap.html">QPixmap</a>, not a QPixmap*.
The pixmap
will be <a href="qpixmap.html#isNull">null</a> if no pixmap is on the
clipboard. <a href="qclipboard.html">QClipboard</a> now offers powerful MIME-based types on the
clipboard, just like drag-and-drop (in fact, you can reuse most of your
drag-and-drop code with clipboard operations).
<p> <h3><a name="QDropSite">QDropSite</a></h3>
<p> <P>
QDropSite is obsolete. If you simply passed <tt>this</tt>, just remove
the inheritance of QDropSite and call
<a href="qwidget.html#setAcceptDrops">setAcceptDrops(TRUE)</a> in the class
constructor.
If you passed something other than <tt>this</tt>,
your code will not work. A common case is passing
the
<a href="qscrollview.html#viewport">viewport()</a> of a <a href="qlistview.html">QListView</a>,
in which case,
override the
<a href="qscrollview.html#contentsDragMoveEvent">contentsDragMoveEvent()</a>,
etc.
functions rather than QListView's dragMoveEvent() etc. For other
cases, you will need to use an event filter to act on the drag/drop events
of another widget (as is the usual way to intercept foreign events).
<p> <h3><a name="QScrollView">QScrollView</a></h3>
<p> The parameters in the signal
<a href="qscrollview.html#contentsMoving">contentsMoving(int,int)</a>
are now positive rather than negative values, coinciding with
<a href="qscrollview.html#setContentsPos">setContentsPos()</a>. Search for
connections you make to this signal, and either change the slot they are
connected to such that it also expects positive rather than negative
values, or introduce an intermediate slot and signal that negates them.
<p> If you used drag and drop with <a href="qscrollview.html">QScrollView</a>, you may experience the problem
described for <a href="#QDropSite">QDropSite</a>.
<p> <h3><a name="QTextStream">QTextStream</a></h3>
<p> <p>
<pre> operator&lt;&lt;(QTextStream&amp;, QChar&amp;)</pre>
does not skip whitespace.
<pre> operator&lt;&lt;(QTextStream&amp;, char&amp;)</pre>
does,
as was the case with Qt 1.x. This is for backward compatibility.
<p> <h3><a name="QUriDrag">QUriDrag</a></h3>
<p> The class QUrlDrag is renamed to <a href="quridrag.html">QUriDrag</a>, and the API has been
broadened to include additional conversion routines, including
conversions to Unicode filenames (see the class documentation
for details). Note that in Qt 1.x
the QUrlDrag class used the non-standard MIME type "url/url",
while QUriDrag uses the standardized "text/uri-list" type. Other
identifiers affected by the Url to Uri change are
QUrlDrag::setUrls() and QUrlDrag::urlToLocalFile().
<p> <h3><a name="QPainter">QPainter</a></h3>
<p> <p> The GrayText painter flag has been removed. Use
<a href="qpainter.html#setPen">setPen( palette().disabled().foreground() )</a>
instead.
<p> <p> The RasterOp enum
(CopyROP,
OrROP,
XorROP,
NotAndROP,
EraseROP,
NotCopyROP,
NotOrROP,
NotXorROP,
AndROP, NotEraseROP,
NotROP,
ClearROP,
SetROP,
NopROP,
AndNotROP,
OrNotROP,
NandROP,
NorROP, LastROP)
is now part of the Qt namespace class, so if you
use it outside a member function, you'll need to prefix with Qt::.
<p> <h3><a name="QPicture">QPicture</a></h3>
<p> <p>The binary storage format of <a href="qpicture.html">QPicture</a> is changed, but the Qt 2.x
QPicture class can both read and write Qt 1.x format QPictures. No
special handling is required for reading; QPicture will automatically
detect the version number. In order to write a Qt 1.x format QPicture,
set the formatVersion parameter to 1 in the QPicture constructor.
<p> <p>For writing Qt 1.x format QPictures, the compatibility issues of <a
href="#QDataStream">QDataStream</a> applies.
<p> <p>It is safe to try to read a QPicture file generated with Qt 2.x
(without formatVersion set to 1) with a program compiled with Qt
1.x. The program will not crash, it will just issue the warning
"QPicture::play: Incompatible version 2.x" and refuse to load the
picture.
<p> <h3><a name="QPoint">QPoint, <a href="qpointarray.html">QPointArray</a>, <a href="qsize.html">QSize</a> and <a href="qrect.html">QRect</a></a></h3>
<p> <p>The basic coordinate datatype in these classes, QCOORD, is now 32
bit (int) instead of a 16 bit (short). The const values QCOORD_MIN and
QCOORD_MAX have changed accordingly.
<p> <p>QPointArray is now actually, not only seemingly, a QArray of <a href="qpoint.html">QPoint</a>
objects. The semi-internal workaround classes QPointData and QPointVal
are removed since they are no longer needed; QPoint is used directly
instead. The function <pre> QPointArray::shortPoints()</pre>
provides the point array converted to short (16bit) coordinates for
use with external functions that demand that format.
<p> <h3><a name="QImage">QImage</a></h3>
<p> <a href="qimage.html">QImage</a> uses QRgb for the colors - see <a href="#QRgb">the changes to that</a>.
<p> <h3><a name="QPixmap">QPixmap</a></h3>
<p> <pre> QPixmap::convertToImage()</pre>
with bitmaps now guarantees that color0 pixels
become color(0) in the resulting QImage. If you worked around the lack of
this, you may be able to simplify your code. If you made assumptions
about the previous undefined behavior, the symptom will be inverted
bitmaps (eg. "inside-out" masks).
<p> <p>
<pre> QPixmap::optimize(TRUE)</pre>
is replaced by
<pre> QPixmap::setOptimization(QPixmap::NormalOptim)</pre>
or
<pre> QPixmap::setOptimization(QPixmap::BestOptim)</pre>
- see the documentation
to choose which is best for your application. NormalOptim is most like
the Qt 1.x "TRUE" optimization.
<p> <h3><a name="QMenuData">QMenuData / <a href="qpopupmenu.html">QPopupMenu</a></a></h3>
<p> In Qt 1.x, new menu items were assigned either an application-wide
unique identifier or an identifier equal to the index of the item, depending on the
<a href="qmenudata.html#insertItem">insertItem(...)</a> function used.
In Qt 2.x this confusing
situation has been cleaned up: generated identifiers are always
unique across the entire application.
<p> If your code depends on generated ids
being equal to the item's index, a quick fix is to use
<pre> QMenuData::indexOf(int id)</pre>
in the handling function instead. You may alternatively pass
<pre> QMenuData::count()</pre>
as identifier when you insert the items.
<p> Furthermore, QPopupMenus can (and should!) be created with a parent
widget now, for example the main window that is used to display the
popup. This way, the popup will automatically be destroyed together
with its main window. Otherwise you'll have to take care of the
ownership manually.
<p> QPopupMenus are also reusable in 2.x. They may occur in different
locations within one menu structure or be used as both a menubar
drop-down and as a context popup-menu. This should make it possible to
significantly simplify many applications.
<p> Last but not least, <a href="qpopupmenu.html">QPopupMenu</a> no longer inherits QTableView. Instead,
it directly inherits <a href="qframe.html">QFrame</a>.
<p> <h3><a name="QValidator">QValidator (<a href="qlineedit.html">QLineEdit</a>, <a href="qcombobox.html">QComboBox</a>, <a href="qspinbox.html">QSpinBox</a>) </a></h3>
<p> <pre> QValidator::validate(...)</pre>
and
<pre> QValidator::fixup( <a href="qstring.html">QString</a> &amp; )</pre>
are now const
functions. If your subclass reimplements validate() as a
non-const function,
you will get a compile error (validate was pure virtual).
<p> In QLineEdit, QComboBox, and QSpinBox,
setValidator(...) now takes a const pointer to a <a href="qvalidator.html">QValidator</a>, and
validator() returns a const pointer. This change highlights the fact
that the widgets do not take the ownership of the validator (a validator is
a <a href="qobject.html">QObject</a> on its own, with its own parent - you can easily set the same validator
object on many different widgets), so changing the state of
such an object or deleting it is very likely a bug.
<p> <h3><a name="QFile">QFile, <a href="qfileinfo.html">QFileInfo</a>, <a href="qdir.html">QDir</a></a></h3>
<p> File and directory names are now always Unicode strings (ie. <a href="qstring.html">QString</a>). If you used QString
in the past for the simplicity it offers, you'll probably have little consequence. However,
if you pass filenames to system functions rather than using Qt functions (eg. if you use the
Unix <tt>unlink()</tt> function rather than <tt>QFile::remove()</tt>, your code will probably
only work for Latin1 locales (eg. Western Europe, the U.S.). To ensure your code will support
filenames in other locales, either use the Qt functions, or convert the filenames via
<pre> QFile::encodeFilename()</pre>
and <pre> QFile::decodeFilename()</pre>
- but do it
<em>just</em> as you call the system function - code that mixes encoded and unencoded filenames
is very error prone. See the comments in QString, such as regarding QT_NO_ASCII_CAST that
can help find potential problems.
<p> <h3><a name="QFontMetrics">QFontMetrics</a></h3>
<p> boundingRect(char) is replaced by
boundingRect(<a href="qchar.html">QChar</a>), but since
char auto-converts to QChar, you're not likely to run into problems
with this.
<p> <h3><a name="QWindow">QWindow</a></h3>
<p> This class (which was just <a href="qwidget.html">QWidget</a> under a different name) has been
removed. If you used it, do a global search-and-replace of the word
"QWindow" with "QWidget".
<p> <h3><a name="QEvent">QEvent</a></h3>
<p> <p> The global #define macros in qevent.h have been replaced by an
enum in <a href="qevent.html">QEvent</a>. Use e.g. QEvent::Paint instead of Event_Paint. Same
for all of:
Event_None,
Event_Timer,
Event_MouseButtonPress,
Event_MouseButtonRelease,
Event_MouseButtonDblClick,
Event_MouseMove,
Event_KeyPress,
Event_KeyRelease,
Event_FocusIn,
Event_FocusOut,
Event_Enter,
Event_Leave,
Event_Paint,
Event_Move,
Event_Resize,
Event_Create,
Event_Destroy,
Event_Show,
Event_Hide,
Event_Close,
Event_Quit,
Event_Accel,
Event_Clipboard,
Event_SockAct,
Event_DragEnter,
Event_DragMove,
Event_DragLeave,
Event_Drop,
Event_DragResponse,
Event_ChildInserted,
Event_ChildRemoved,
Event_LayoutHint,
Event_ActivateControl,
Event_DeactivateControl,
and
Event_User.
<p> <p> The Q_*_EVENT macros in qevent.h have been deleted. Use an
explicit cast instead. The macros were:
Q_TIMER_EVENT,
Q_MOUSE_EVENT,
Q_KEY_EVENT,
Q_FOCUS_EVENT,
Q_PAINT_EVENT,
Q_MOVE_EVENT,
Q_RESIZE_EVENT,
Q_CLOSE_EVENT,
Q_SHOW_EVENT,
Q_HIDE_EVENT,
and
Q_CUSTOM_EVENT.
<p> <p> QChildEvents are now sent for all QObjects, not just QWidgets.
You may need to add extra checking if you use a <a href="qchildevent.html">QChildEvent</a> without
much testing of its values.
<p> <h3>All the removed functions</h3>
<p> All <a href="removed20.html">these functions</a> have been removed in
Qt 2.x. Most are simply cases where "const char*" has changed to
"const <a href="qstring.html">QString</a>&", or when an enumeration type has moved into the Qt::
namespace (which, technically, is a new name, but your code will
compile just the same anyway). This list is provided for completeness.
<p>
<!-- eof -->
<p><address><hr><div align=center>
<table width=100% cellspacing=0 border=0><tr>
<td>Copyright &copy; 2007
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
<td align=right><div align=right>Qt 3.3.8</div>
</table></div></address></body>
</html>

@ -117,6 +117,20 @@ Q_EXPORT int qstricmp( const char *, const char * );
Q_EXPORT int qstrnicmp( const char *, const char *, uint len ); Q_EXPORT int qstrnicmp( const char *, const char *, uint len );
#ifndef QT_CLEAN_NAMESPACE
Q_EXPORT inline uint cstrlen( const char *str )
{ return (uint)strlen(str); }
Q_EXPORT inline char *cstrcpy( char *dst, const char *src )
{ return strcpy(dst,src); }
Q_EXPORT inline int cstrcmp( const char *str1, const char *str2 )
{ return strcmp(str1,str2); }
Q_EXPORT inline int cstrncmp( const char *str1, const char *str2, uint len )
{ return strncmp(str1,str2,len); }
#endif
// qChecksum: Internet checksum // qChecksum: Internet checksum

@ -158,6 +158,19 @@ private:
}; };
#if !defined(QT_CLEAN_NAMESPACE)
// CursorShape is defined in X11/X.h
#ifdef CursorShape
#define X_CursorShape CursorShape
#undef CursorShape
#endif
typedef Qt::CursorShape QCursorShape;
#ifdef X_CursorShape
#define CursorShape X_CursorShape
#endif
#endif
/***************************************************************************** /*****************************************************************************
QCursor stream functions QCursor stream functions
*****************************************************************************/ *****************************************************************************/

@ -734,6 +734,16 @@ inline int qRound( double d )
// Size-dependent types (architechture-dependent byte order) // Size-dependent types (architechture-dependent byte order)
// //
#if !defined(QT_CLEAN_NAMESPACE)
// source compatibility with Qt 1.x
typedef signed char INT8; // 8 bit signed
typedef unsigned char UINT8; // 8 bit unsigned
typedef short INT16; // 16 bit signed
typedef unsigned short UINT16; // 16 bit unsigned
typedef int INT32; // 32 bit signed
typedef unsigned int UINT32; // 32 bit unsigned
#endif
typedef signed char Q_INT8; // 8 bit signed typedef signed char Q_INT8; // 8 bit signed
typedef unsigned char Q_UINT8; // 8 bit unsigned typedef unsigned char Q_UINT8; // 8 bit unsigned
typedef short Q_INT16; // 16 bit signed typedef short Q_INT16; // 16 bit signed
@ -813,6 +823,9 @@ class QDataStream;
#ifndef QT_MODULE_DIALOGS #ifndef QT_MODULE_DIALOGS
# define QT_NO_DIALOG # define QT_NO_DIALOG
#endif #endif
#ifndef QT_MODULE_ICONVIEW
# define QT_NO_ICONVIEW
#endif
#ifndef QT_MODULE_WORKSPACE #ifndef QT_MODULE_WORKSPACE
# define QT_NO_WORKSPACE # define QT_NO_WORKSPACE
#endif #endif
@ -1010,6 +1023,28 @@ Q_EXPORT void qFatal( const char *, ... ) // print fatal message and exit
Q_EXPORT void qSystemWarning( const char *, int code = -1 ); Q_EXPORT void qSystemWarning( const char *, int code = -1 );
#if !defined(QT_CLEAN_NAMESPACE) // compatibility with Qt 1
Q_EXPORT void debug( const char *, ... ) // print debug message
#if defined(Q_CC_GNU) &amp;&amp; !defined(__INSURE__)
__attribute__ ((format (printf, 1, 2)))
#endif
;
Q_EXPORT void warning( const char *, ... ) // print warning message
#if defined(Q_CC_GNU) &amp;&amp; !defined(__INSURE__)
__attribute__ ((format (printf, 1, 2)))
#endif
;
Q_EXPORT void fatal( const char *, ... ) // print fatal message and exit
#if defined(Q_CC_GNU) &amp;&amp; !defined(__INSURE__)
__attribute__ ((format (printf, 1, 2)))
#endif
;
#endif // QT_CLEAN_NAMESPACE
#if !defined(Q_ASSERT) #if !defined(Q_ASSERT)
# if defined(QT_CHECK_STATE) # if defined(QT_CHECK_STATE)
@ -1040,6 +1075,12 @@ Q_EXPORT bool qt_check_pointer( bool c, const char *, int );
# define Q_CHECK_PTR(p) # define Q_CHECK_PTR(p)
#endif #endif
#if !defined(QT_NO_COMPAT) // compatibility with Qt 2
# if !defined(CHECK_PTR)
# define CHECK_PTR(x) Q_CHECK_PTR(x)
# endif
#endif // QT_NO_COMPAT
enum QtMsgType { QtDebugMsg, QtWarningMsg, QtFatalMsg }; enum QtMsgType { QtDebugMsg, QtWarningMsg, QtFatalMsg };
typedef void (*QtMsgHandler)(QtMsgType, const char *); typedef void (*QtMsgHandler)(QtMsgType, const char *);

@ -91,6 +91,12 @@ body { background: #ffffff; color: black; }
#ifndef QT_NO_ICONVIEW #ifndef QT_NO_ICONVIEW
#if !defined( QT_MODULE_ICONVIEW ) || defined( QT_INTERNAL_ICONVIEW )
#define QM_EXPORT_ICONVIEW
#else
#define QM_EXPORT_ICONVIEW Q_EXPORT
#endif
class QIconView; class QIconView;
class QPainter; class QPainter;
class QMimeSource; class QMimeSource;
@ -108,7 +114,7 @@ class QIconDragPrivate;
#ifndef QT_NO_DRAGANDDROP #ifndef QT_NO_DRAGANDDROP
class Q_EXPORT QIconDragItem class QM_EXPORT_ICONVIEW QIconDragItem
{ {
public: public:
QIconDragItem(); QIconDragItem();
@ -122,7 +128,7 @@ private:
}; };
class Q_EXPORT QIconDrag : public QDragObject class QM_EXPORT_ICONVIEW QIconDrag : public QDragObject
{ {
Q_OBJECT Q_OBJECT
public: public:
@ -152,7 +158,7 @@ private:
class QIconViewToolTip; class QIconViewToolTip;
class QIconViewItemPrivate; class QIconViewItemPrivate;
class Q_EXPORT QIconViewItem : public Qt class QM_EXPORT_ICONVIEW QIconViewItem : public Qt
{ {
friend class QIconView; friend class QIconView;
friend class QIconViewToolTip; friend class QIconViewToolTip;
@ -295,7 +301,7 @@ private:
class QIconViewPrivate; /* don't touch */ class QIconViewPrivate; /* don't touch */
class Q_EXPORT QIconView : public QScrollView class QM_EXPORT_ICONVIEW QIconView : public QScrollView
{ {
friend class QIconViewItem; friend class QIconViewItem;
friend class QIconViewPrivate; friend class QIconViewPrivate;

@ -652,11 +652,6 @@ public:
Key_LaunchD = 0x10af, Key_LaunchD = 0x10af,
Key_LaunchE = 0x10b0, Key_LaunchE = 0x10b0,
Key_LaunchF = 0x10b1, Key_LaunchF = 0x10b1,
Key_MonBrightnessUp = 0x010b2,
Key_MonBrightnessDown = 0x010b3,
Key_KeyboardLightOnOff = 0x010b4,
Key_KeyboardBrightnessUp = 0x010b5,
Key_KeyboardBrightnessDown = 0x010b6,
Key_MediaLast = 0x1fff, Key_MediaLast = 0x1fff,

@ -139,7 +139,6 @@ public:
uint containsRef( const type *d ) const uint containsRef( const type *d ) const
{ return QGList::containsRef((QPtrCollection::Item)d); } { return QGList::containsRef((QPtrCollection::Item)d); }
bool replace( uint i, const type *d ) { return QGList::replaceAt( i, (QPtrCollection::Item)d ); } bool replace( uint i, const type *d ) { return QGList::replaceAt( i, (QPtrCollection::Item)d ); }
type *operator[]( uint i ) { return (type *)QGList::at(i); }
type *at( uint i ) { return (type *)QGList::at(i); } type *at( uint i ) { return (type *)QGList::at(i); }
int at() const { return QGList::at(); } int at() const { return QGList::at(); }
type *current() const { return (type *)QGList::get(); } type *current() const { return (type *)QGList::get(); }

@ -9858,6 +9858,9 @@
<section ref="datastreamformat.html" title="Format of the QDataStream Operators"> <section ref="datastreamformat.html" title="Format of the QDataStream Operators">
<keyword ref="datastreamformat.html">Format of the QDataStream Operators</keyword> <keyword ref="datastreamformat.html">Format of the QDataStream Operators</keyword>
</section> </section>
<section ref="removed20.html" title="Functions removed in Qt 2.0">
<keyword ref="removed20.html">Functions removed in Qt 2.0</keyword>
</section>
<section ref="motif-walkthrough-1.html" title="Getting Started"> <section ref="motif-walkthrough-1.html" title="Getting Started">
<keyword ref="motif-walkthrough-1.html">Getting Started</keyword> <keyword ref="motif-walkthrough-1.html">Getting Started</keyword>
</section> </section>
@ -10074,6 +10077,9 @@
<section ref="popup-example.html" title="Popup Widgets"> <section ref="popup-example.html" title="Popup Widgets">
<keyword ref="popup-example.html">Popup Widgets</keyword> <keyword ref="popup-example.html">Popup Widgets</keyword>
</section> </section>
<section ref="porting2.html" title="Porting to Qt 2.x">
<keyword ref="porting2.html">Porting to Qt 2.x</keyword>
</section>
<section ref="porting.html" title="Porting to Qt 3.x"> <section ref="porting.html" title="Porting to Qt 3.x">
<keyword ref="porting.html">Porting to Qt 3.x</keyword> <keyword ref="porting.html">Porting to Qt 3.x</keyword>
</section> </section>

File diff suppressed because one or more lines are too long

@ -1177,7 +1177,7 @@ See the <a href="qwidget.html#geometry-prop">"geometry"</a> property for details
<h3 class=fn>void <a name="grabKeyboard"></a>QWidget::grabKeyboard () <h3 class=fn>void <a name="grabKeyboard"></a>QWidget::grabKeyboard ()
</h3> </h3>
Grabs the keyboard input. Grabs the keyboard input.
<p> This widget receives all keyboard events until <a href="#releaseKeyboard">releaseKeyboard</a>() <p> This widget reveives all keyboard events until <a href="#releaseKeyboard">releaseKeyboard</a>()
is called; other widgets get no keyboard events at all. Mouse is called; other widgets get no keyboard events at all. Mouse
events are not affected. Use <a href="#grabMouse">grabMouse</a>() if you want to grab that. events are not affected. Use <a href="#grabMouse">grabMouse</a>() if you want to grab that.
<p> The focus widget is not affected, except that it doesn't receive <p> The focus widget is not affected, except that it doesn't receive

@ -224,6 +224,12 @@ typedef void (*QtCleanUpFunction)();
Q_EXPORT void qAddPostRoutine( QtCleanUpFunction ); Q_EXPORT void qAddPostRoutine( QtCleanUpFunction );
Q_EXPORT void qRemovePostRoutine( QtCleanUpFunction ); Q_EXPORT void qRemovePostRoutine( QtCleanUpFunction );
#if !defined(QT_CLEAN_NAMESPACE)
// source compatibility with Qt 2.x
typedef QtCleanUpFunction Q_CleanUpFunction;
#endif
#endif // QWINDOWDEFS_H #endif // QWINDOWDEFS_H
</pre> </pre>
<!-- eof --> <!-- eof -->

@ -0,0 +1,379 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/doc/porting2.doc:1096 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Functions removed in Qt 2.0</title>
<style type="text/css"><!--
fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; }
--></style>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#E5E5E5">
<td valign=center>
<a href="index.html">
<font color="#004faf">Home</font></a>
| <a href="classes.html">
<font color="#004faf">All&nbsp;Classes</font></a>
| <a href="mainclasses.html">
<font color="#004faf">Main&nbsp;Classes</font></a>
| <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
| <a href="groups.html">
<font color="#004faf">Grouped&nbsp;Classes</font></a>
| <a href="functions.html">
<font color="#004faf">Functions</font></a>
</td>
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>Functions removed in Qt 2.0</h1>
<p> <pre>
<a href="qfiledialog.html#fileHighlighted">QFileDialog::fileHighlighted</a>(const char *)
<a href="qfiledialog.html#fileSelected">QFileDialog::fileSelected</a>(const char *)
<a href="qfiledialog.html#dirEntered">QFileDialog::dirEntered</a>(const char *)
QFileDialog::updatePathBox(const char *)
<a href="qobject.html#name">QObject::name</a>(void) const
<a href="qfiledialog.html#getOpenFileName">QFileDialog::getOpenFileName</a>(const char *, const char *, <a href="qwidget.html">QWidget</a> *, const char *)
<a href="qfiledialog.html#getSaveFileName">QFileDialog::getSaveFileName</a>(const char *, const char *, QWidget *, const char *)
<a href="qfiledialog.html#getExistingDirectory">QFileDialog::getExistingDirectory</a>(const char *, QWidget *, const char *)
<a href="qfiledialog.html#getOpenFileNames">QFileDialog::getOpenFileNames</a>(const char *, const char *, QWidget *, const char *)
<a href="qfiledialog.html#setSelection">QFileDialog::setSelection</a>(const char *)
<a href="qfiledialog.html#setDir">QFileDialog::setDir</a>(const char *)
<a href="qmessagebox.html#setText">QMessageBox::setText</a>(const char *)
<a href="qmessagebox.html#setButtonText">QMessageBox::setButtonText</a>(const char *)
QMessageBox::setButtonText(int, const char *)
<a href="qwidget.html#setStyle">QMessageBox::setStyle</a>(GUIStyle)
<a href="qmessagebox.html#standardIcon">QMessageBox::standardIcon</a>(QMessageBox::Icon, GUIStyle)
<a href="qmessagebox.html#information">QMessageBox::information</a>(<a href="qwidget.html">QWidget</a> *, const char *, const char *, const char *, const char *, const char *, int, int)
QMessageBox::information(QWidget *, const char *, const char *, int, int, int)
<a href="qmessagebox.html#warning">QMessageBox::warning</a>(QWidget *, const char *, const char *, const char *, const char *, const char *, int, int)
QMessageBox::warning(QWidget *, const char *, const char *, int, int, int)
<a href="qmessagebox.html#critical">QMessageBox::critical</a>(QWidget *, const char *, const char *, const char *, const char *, const char *, int, int)
QMessageBox::critical(QWidget *, const char *, const char *, int, int, int)
<a href="qmessagebox.html#about">QMessageBox::about</a>(QWidget *, const char *, const char *)
<a href="qmessagebox.html#aboutQt">QMessageBox::aboutQt</a>(QWidget *, const char *)
<a href="qmessagebox.html#message">QMessageBox::message</a>(const char *, const char *, const char *, QWidget *, const char *)
<a href="qmessagebox.html#buttonText">QMessageBox::buttonText</a>(void) const
<a href="qmessagebox.html#query">QMessageBox::query</a>(const char *, const char *, const char *, const char *, <a href="qwidget.html">QWidget</a> *, const char *)
<a href="qprogressdialog.html#setLabelText">QProgressDialog::setLabelText</a>(const char *)
<a href="qprogressdialog.html#setCancelButtonText">QProgressDialog::setCancelButtonText</a>(const char *)
<a href="qwidget.html#styleChange">QProgressDialog::styleChange</a>(GUIStyle)
QProgressDialog::init(QWidget *, const char *, const char *, int)
<a href="qtabdialog.html#addTab">QTabDialog::addTab</a>(QWidget *, const char *)
<a href="qtabdialog.html#isTabEnabled">QTabDialog::isTabEnabled</a>(const char *) const
<a href="qtabdialog.html#setTabEnabled">QTabDialog::setTabEnabled</a>(const char *, bool)
<a href="qtabdialog.html#setDefaultButton">QTabDialog::setDefaultButton</a>(const char *)
<a href="qtabdialog.html#setCancelButton">QTabDialog::setCancelButton</a>(const char *)
<a href="qtabdialog.html#setApplyButton">QTabDialog::setApplyButton</a>(const char *)
QTabDialog::setOKButton(const char *)
QTabDialog::setOkButton(const char *)
<a href="qwidget.html#styleChange">QTabDialog::styleChange</a>(GUIStyle)
<a href="qtabdialog.html#selected">QTabDialog::selected</a>(const char *)
<a href="qobject.html#name">QObject::name</a>(void) const
<a href="qapplication.html#setStyle">QApplication::setStyle</a>(GUIStyle)
<a href="qapplication.html#palette">QApplication::palette</a>(void)
<a href="qapplication.html#setPalette">QApplication::setPalette</a>(const <a href="qpalette.html">QPalette</a> &, bool)
<a href="qapplication.html#font">QApplication::font</a>(void)
<a href="qapplication.html#setFont">QApplication::setFont</a>(const <a href="qfont.html">QFont</a> &, bool)
<a href="qbrush.html#setStyle">QBrush::setStyle</a>(BrushStyle)
QBrush::init(const <a href="qcolor.html">QColor</a> &, BrushStyle)
QObject::name(void) const
<a href="qclipboard.html#data">QClipboard::data</a>(const char *) const
<a href="qclipboard.html#setData">QClipboard::setData</a>(const char *, void *)
<a href="qclipboard.html#setText">QClipboard::setText</a>(const char *)
QUrlDrag::decodeLocalFiles(<a href="qdropevent.html">QDropEvent</a> *, <a href="qstrlist.html">QStrList</a> &)
QObject::name(void) const
<a href="qstoreddrag.html#setEncodedData">QStoredDrag::setEncodedData</a>(QArrayT<char> const &)
<a href="qtextdrag.html#setText">QTextDrag::setText</a>(const char *)
<a href="qimagedrag.html#canDecode">QImageDrag::canDecode</a>(<a href="qdragmoveevent.html">QDragMoveEvent</a> *)
<a href="qtextdrag.html#canDecode">QTextDrag::canDecode</a>(QDragMoveEvent *)
QUrlDrag::canDecode(QDragMoveEvent *)
<a href="qimagedrag.html#decode">QImageDrag::decode</a>(QDropEvent *, <a href="qimage.html">QImage</a> &)
QImageDrag::decode(QDropEvent *, <a href="qpixmap.html">QPixmap</a> &)
<a href="qtextdrag.html#decode">QTextDrag::decode</a>(QDropEvent *, <a href="qstring.html">QString</a> &)
QUrlDrag::decode(QDropEvent *, QStrList &)
<a href="qdropevent.html#format">QDragMoveEvent::format</a>(int)
<a href="qdropevent.html#provides">QDragMoveEvent::provides</a>(const char *)
<a href="qdropevent.html#data">QDragMoveEvent::data</a>(const char *)
<a href="qdropevent.html#data">QDropEvent::data</a>(const char *)
QEvent::peErrMsg(void)
<a href="qfont.html#substitute">QFont::substitute</a>(const char *)
<a href="qfont.html#insertSubstitution">QFont::insertSubstitution</a>(const char *, const char *)
<a href="qfont.html#removeSubstitution">QFont::removeSubstitution</a>(const char *)
QFont::load(unsigned int) const
<a href="qfont.html#setFamily">QFont::setFamily</a>(const char *)
<a href="qfont.html#bold">QFont::bold</a>(void) const
<a href="qfont.html#setBold">QFont::setBold</a>(bool)
<a href="qfont.html#handle">QFont::handle</a>(unsigned int) const
QFont::bold(void) const
QFontInfo::font(void) const
QFontInfo::reset(const <a href="qwidget.html">QWidget</a> *)
QFontInfo::type(void) const
<a href="qfontmetrics.html#inFont">QFontMetrics::inFont</a>(char) const
<a href="qfontmetrics.html#leftBearing">QFontMetrics::leftBearing</a>(char) const
<a href="qfontmetrics.html#rightBearing">QFontMetrics::rightBearing</a>(char) const
<a href="qfontmetrics.html#width">QFontMetrics::width</a>(char) const
QFontMetrics::width(const char *, int) const
<a href="qfontmetrics.html#boundingRect">QFontMetrics::boundingRect</a>(char) const
QFontMetrics::boundingRect(const char *, int) const
QFontMetrics::boundingRect(int, int, int, int, int, const char *, int, int, int *, char **) const
<a href="qfontmetrics.html#size">QFontMetrics::size</a>(int, const char *, int, int, int *, char **) const
QFontMetrics::font(void) const
QFontMetrics::reset(const QWidget *)
QFontMetrics::type(void) const
<a href="qobject.html#name">QObject::name</a>(void) const
QGManager::setBorder(int)
QGManager::newSerChain(QGManager::Direction)
QGManager::newParChain(QGManager::Direction)
QGManager::add(QChain *, QChain *, int)
QGManager::addWidget(QChain *, <a href="qwidget.html">QWidget</a> *, int)
QGManager::addSpacing(QChain *, int, int, int)
QGManager::addBranch(QChain *, QChain *, int, int)
QGManager::setStretch(QChain *, int)
QGManager::activate(void)
QGManager::unFreeze(void)
QGManager::xChain(void)
QGManager::yChain(void)
QGManager::setMenuBar(QWidget *)
QGManager::mainWidget(void)
QGManager::remove(QWidget *)
QGManager::setName(QChain *, const char *)
QGManager::eventFilter(<a href="qobject.html">QObject</a> *, <a href="qevent.html">QEvent</a> *)
QGManager::resizeHandle(QWidget *, const <a href="qsize.html">QSize</a> &)
QGManager::resizeAll(void)
<a href="qiconset.html#setPixmap">QIconSet::setPixmap</a>(const char *, QIconSet::Size, QIconSet::Mode)
<a href="qimage.html#imageFormat">QImage::imageFormat</a>(const char *)
<a href="qimageio.html#imageFormat">QImageIO::imageFormat</a>(const char *)
<a href="qimage.html#load">QImage::load</a>(const char *, const char *)
<a href="qimage.html#loadFromData">QImage::loadFromData</a>(QArrayT<char>, const char *)
<a href="qimage.html#save">QImage::save</a>(const char *, const char *) const
<a href="qimageio.html#setFileName">QImageIO::setFileName</a>(const char *)
<a href="qimageio.html#setDescription">QImageIO::setDescription</a>(const char *)
QBoxLayout::addB(<a href="qlayout.html">QLayout</a> *, int)
<a href="qobject.html#name">QObject::name</a>(void) const
QLayout::basicManager(void)
QLayout::verChain(QLayout *)
QLayout::horChain(QLayout *)
QObject::name(void) const
<a href="qobject.html#tr">QObject::tr</a>(const char *) const
<a href="qpaintdevice.html#x11Screen">QPaintDevice::x11Screen</a>(voidQPaintDevice::x11Depth(voidQPaintDevice::x11Cells(voidQPaintDevice::x11Colormap(voidQPaintDevice::x11DefaultColormap(void) <a href="qpaintdevice.html#x11Visual">QPaintDevice::x11Visual</a>(voidQPaintDevice::x11DefaultVisual(void)
<a href="qpainter.html#translate">QPainter::translate</a>(float, float)
<a href="qpainter.html#scale">QPainter::scale</a>(float, float)
<a href="qpainter.html#shear">QPainter::shear</a>(float, float)
<a href="qpainter.html#rotate">QPainter::rotate</a>(float)
<a href="qpainter.html#drawText">QPainter::drawText</a>(const <a href="qpoint.html">QPoint</a> &, const char *, int)
QPainter::drawText(const <a href="qrect.html">QRect</a> &, int, const char *, int, QRect *, char **)
QPainter::drawText(int, int, const char *, int)
QPainter::drawText(int, int, int, int, int, const char *, int, QRect *, char **)
<a href="qpainter.html#boundingRect">QPainter::boundingRect</a>(int, int, int, int, int, const char *, int, char **)
QPainter::testf(unsigned short) const
QPainter::setf(unsigned short)
QPainter::setf(unsigned short, bool)
QPainter::clearf(unsigned short)
<a href="qpainter.html#setPen">QPainter::setPen</a>(PenStyle)
<a href="qpainter.html#setBrush">QPainter::setBrush</a>(BrushStyle)
<a href="qpainter.html#setBackgroundMode">QPainter::setBackgroundMode</a>(BGMode)
<a href="qpen.html#setStyle">QPen::setStyle</a>(PenStyle)
QPen::init(const <a href="qcolor.html">QColor</a> &, unsigned int, PenStyle)
<a href="qpicture.html#load">QPicture::load</a>(const char *)
<a href="qpicture.html#save">QPicture::save</a>(const char *)
QPixmap::isOptimized(void) const
QPixmap::optimize(bool)
QPixmap::isGloballyOptimized(void)
QPixmap::optimizeGlobally(bool)
<a href="qpixmap.html#imageFormat">QPixmap::imageFormat</a>(const char *)
<a href="qpixmap.html#load">QPixmap::load</a>(const char *, const char *, QPixmap::ColorMode)
QPixmap::load(const char *, const char *, int)
<a href="qpixmap.html#loadFromData">QPixmap::loadFromData</a>(QArrayT<char>, const char *, int)
<a href="qpixmap.html#save">QPixmap::save</a>(const char *, const char *) const
<a href="qpixmapcache.html#find">QPixmapCache::find</a>(const char *)
QPixmapCache::find(const char *, <a href="qpixmap.html">QPixmap</a> &)
<a href="qpixmapcache.html#insert">QPixmapCache::insert</a>(const char *, QPixmap *)
QPixmapCache::insert(const char *, const QPixmap &)
<a href="qprinter.html#setPrinterName">QPrinter::setPrinterName</a>(const char *)
<a href="qprinter.html#setOutputFileName">QPrinter::setOutputFileName</a>(const char *)
<a href="qprinter.html#setPrintProgram">QPrinter::setPrintProgram</a>(const char *)
<a href="qprinter.html#setDocName">QPrinter::setDocName</a>(const char *)
<a href="qprinter.html#setCreator">QPrinter::setCreator</a>(const char *)
<a href="qrect.html#setX">QRect::setX</a>(int)
<a href="qrect.html#setY">QRect::setY</a>(int)
QRegion::exec(QArrayT<char> const &)
<a href="qobject.html#name">QObject::name</a>(void) const
QObject::name(void) const
<a href="qsignalmapper.html#setMapping">QSignalMapper::setMapping</a>(const <a href="qobject.html">QObject</a> *, const char *)
<a href="qsignalmapper.html#mapped">QSignalMapper::mapped</a>(const char *)
QObject::name(void) const
QObject::name(void) const
<a href="qwidget.html#setCaption">QWidget::setCaption</a>(const char *)
<a href="qwidget.html#setIconText">QWidget::setIconText</a>(const char *)
<a href="qwidget.html#drawText">QWidget::drawText</a>(const <a href="qpoint.html">QPoint</a> &, const char *)
QWidget::drawText(int, int, const char *)
QWidget::acceptFocus(void) const
QWidget::setAcceptFocus(bool)
<a href="qwidget.html#create">QWidget::create</a>(unsigned int)
QWidget::create(void)
QWidget::internalMove(int, int)
QWidget::internalResize(int, int)
QWidget::internalSetGeometry(int, int, int, int)
QWidget::deferMove(const QPoint &)
QWidget::deferResize(const <a href="qsize.html">QSize</a> &)
QWidget::cancelMove(voidQWidget::cancelResize(voidQWidget::sendDeferredEvents(voidQWidget::setBackgroundColorFromMode(voidQObject::name(void) const <a href="qwidget.html#setMask">QWidget::setMask</a>(QBitmapQWMatrix::setMatrix(float, float, float, float, float, float)
<a href="qwmatrix.html#map">QWMatrix::map</a>(float, float, float *, float *) const
<a href="qwmatrix.html#translate">QWMatrix::translate</a>(float, float)
<a href="qwmatrix.html#scale">QWMatrix::scale</a>(float, float)
<a href="qwmatrix.html#shear">QWMatrix::shear</a>(float, float)
<a href="qwmatrix.html#rotate">QWMatrix::rotate</a>(float)
<a href="qbuffer.html#setBuffer">QBuffer::setBuffer</a>(QArrayT<char>)
<a href="qdir.html#entryList">QDir::entryList</a>(const char *, int, int) const
<a href="qdir.html#entryInfoList">QDir::entryInfoList</a>(const char *, int, int) const
<a href="qdir.html#mkdir">QDir::mkdir</a>(const char *, bool) const
<a href="qdir.html#rmdir">QDir::rmdir</a>(const char *, bool) const
<a href="qdir.html#exists">QDir::exists</a>(const char *, bool)
<a href="qdir.html#remove">QDir::remove</a>(const char *, bool)
<a href="qdir.html#rename">QDir::rename</a>(const char *, const char *, bool)
<a href="qdir.html#setCurrent">QDir::setCurrent</a>(const char *)
<a href="qdir.html#match">QDir::match</a>(const char *, const char *)
<a href="qdir.html#cleanDirPath">QDir::cleanDirPath</a>(const char *)
<a href="qdir.html#isRelativePath">QDir::isRelativePath</a>(const char *)
<a href="qdir.html#setPath">QDir::setPath</a>(const char *)
<a href="qdir.html#filePath">QDir::filePath</a>(const char *, bool) const
<a href="qdir.html#absFilePath">QDir::absFilePath</a>(const char *, bool) const
<a href="qdir.html#convertSeparators">QDir::convertSeparators</a>(const char *)
<a href="qdir.html#cd">QDir::cd</a>(const char *, bool)
<a href="qdir.html#setNameFilter">QDir::setNameFilter</a>(const char *)
<a href="qfile.html#setName">QFile::setName</a>(const char *)
<a href="qfile.html#exists">QFile::exists</a>(const char *)
<a href="qfile.html#remove">QFile::remove</a>(const char *)
<a href="qfileinfo.html#setFile">QFileInfo::setFile</a>(const <a href="qdir.html">QDir</a> &, const char *)
QFileInfo::setFile(const char *)
QFile::exists(const char *)
<a href="qfileinfo.html#extension">QFileInfo::extension</a>(void) const
<a href="qregexp.html#match">QRegExp::match</a>(const char *, int, int *) const
QRegExp::matchstr(unsigned short *, char *, char *) const
QString::resize(unsigned int)
<a href="qstring.html#fill">QString::fill</a>(char, int)
<a href="qstring.html#find">QString::find</a>(const char *, int, bool) const
<a href="qstring.html#findRev">QString::findRev</a>(const char *, int, bool) const
<a href="qstring.html#leftJustify">QString::leftJustify</a>(unsigned int, char, bool) const
<a href="qstring.html#rightJustify">QString::rightJustify</a>(unsigned int, char, bool) const
<a href="qstring.html#insert">QString::insert</a>(unsigned int, const char *)
<a href="qstring.html#append">QString::append</a>(const char *)
<a href="qstring.html#prepend">QString::prepend</a>(const char *)
<a href="qstring.html#replace">QString::replace</a>(const <a href="qregexp.html">QRegExp</a> &, const char *)
QString::replace(unsigned int, unsigned int, const char *)
QString::setStr(const char *)
<a href="qstring.html#setNum">QString::setNum</a>(int)
QString::setNum(unsigned long)
<a href="qstring.html#setExpand">QString::setExpand</a>(unsigned int, char)
<a href="qbutton.html#setText">QButton::setText</a>(const char *)
<a href="qcombobox.html#setEditText">QComboBox::setEditText</a>(const char *)
<a href="qcombobox.html#activated">QComboBox::activated</a>(const char *)
<a href="qcombobox.html#highlighted">QComboBox::highlighted</a>(const char *)
<a href="qcombobox.html#insertItem">QComboBox::insertItem</a>(const char *, int)
<a href="qcombobox.html#changeItem">QComboBox::changeItem</a>(const char *, int)
<a href="qwidget.html#setStyle">QComboBox::setStyle</a>(GUIStyle)
<a href="qcombobox.html#setValidator">QComboBox::setValidator</a>(<a href="qvalidator.html">QValidator</a> *)
<a href="qgroupbox.html#setTitle">QGroupBox::setTitle</a>(const char *)
QHeader::moveAround(int, int)
<a href="qheader.html#addLabel">QHeader::addLabel</a>(const char *, int)
<a href="qheader.html#setLabel">QHeader::setLabel</a>(int, const char *, int)
<a href="qheader.html#setOrientation">QHeader::setOrientation</a>(QHeader::Orientation)
<a href="qwidget.html#resizeEvent">QHeader::resizeEvent</a>(<a href="qresizeevent.html">QResizeEvent</a> *QHeader::paintCell(<a href="qpainter.html">QPainter</a> *, int, intQHeader::setupPainter(QPainter *QHeader::cellHeight(intQHeader::cellWidth(int) <a href="qlabel.html#setText">QLabel::setText</a>(const char *QLCDNumber::display(const char *)
<a href="qframe.html#resizeEvent">QLCDNumber::resizeEvent</a>(QResizeEvent *)
QLCDNumber::internalDisplay(const char *)
QLCDNumber::drawString(const char *, QPainter &, <a href="qbitarray.html">QBitArray</a> *, bool)
QLCDNumber::drawDigit(const <a href="qpoint.html">QPoint</a> &, QPainter &, int, char, char)
QLCDNumber::drawSegment(const QPoint &, char, QPainter &, int, bool)
<a href="qwidget.html#event">QLineEdit::event</a>(<a href="qevent.html">QEvent</a> *)
<a href="qlineedit.html#setValidator">QLineEdit::setValidator</a>(<a href="qvalidator.html">QValidator</a> *)
<a href="qlineedit.html#validateAndSet">QLineEdit::validateAndSet</a>(const char *, int, int, int)
<a href="qlineedit.html#setText">QLineEdit::setText</a>(const char *)
<a href="qlineedit.html#insert">QLineEdit::insert</a>(const char *)
<a href="qlineedit.html#textChanged">QLineEdit::textChanged</a>(const char *)
<a href="qlistbox.html#insertItem">QListBox::insertItem</a>(const char *, int)
<a href="qlistbox.html#inSort">QListBox::inSort</a>(const char *)
<a href="qlistbox.html#changeItem">QListBox::changeItem</a>(const char *, int)
<a href="qlistbox.html#maxItemWidth">QListBox::maxItemWidth</a>(void)
<a href="qlistbox.html#highlighted">QListBox::highlighted</a>(const char *)
<a href="qlistboxitem.html#setText">QListBoxItem::setText</a>(const char *)
<a href="qlistbox.html#selected">QListBox::selected</a>(const char *)
<a href="qlistviewitem.html#isExpandable">QListViewItem::isExpandable</a>(void)
<a href="qwidget.html#setStyle">QListView::setStyle</a>(GUIStyle)
<a href="qmainwindow.html#addToolBar">QMainWindow::addToolBar</a>(<a href="qtoolbar.html">QToolBar</a> *, const char *, QMainWindow::ToolBarDock, bool)
<a href="qmenudata.html#insertItem">QMenuData::insertItem</a>(const <a href="qpixmap.html">QPixmap</a> &, const <a href="qobject.html">QObject</a> *, const char *, int)
QMenuData::insertItem(const QPixmap &, const char *, <a href="qpopupmenu.html">QPopupMenu</a> *, int, int)
QMenuData::insertItem(const QPixmap &, const char *, const QObject *, const char *, int)
QMenuData::insertItem(const QPixmap &, const char *, const QObject *, const char *, int, int, int)
QMenuData::insertItem(const QPixmap &, const char *, int, int)
QMenuData::insertItem(const char *, QPopupMenu *, int, int)
QMenuData::insertItem(const char *, const QObject *, const char *, int)
QMenuData::insertItem(const char *, const QObject *, const char *, int, int, int)
QMenuData::insertItem(const char *, int, int)
<a href="qmenudata.html#changeItem">QMenuData::changeItem</a>(const QPixmap &, const char *, int)
QMenuData::changeItem(const char *, int)
QMenuData::insertAny(const char *, const QPixmap *, QPopupMenu *, int, int)
QMenuItem::setText(const char *)
QMultiLineEdit::textWidth(<a href="qstring.html">QString</a> *)
QMultiLineEdit::repaintAll(void)
QMultiLineEdit::repaintDelayed(void)
<a href="qtextedit.html#setText">QMultiLineEdit::setText</a>(const char *)
<a href="qtextedit.html#append">QMultiLineEdit::append</a>(const char *)
QPopupMenu::itemAtPos(const <a href="qpoint.html">QPoint</a> &)
QPopupMenu::actSig(int)
<a href="qwidget.html#mouseReleaseEvent">QRadioButton::mouseReleaseEvent</a>(<a href="qmouseevent.html">QMouseEvent</a> *)
<a href="qwidget.html#keyPressEvent">QRadioButton::keyPressEvent</a>(<a href="qkeyevent.html">QKeyEvent</a> *)
QRangeControl::adjustValue(void)
<a href="qscrollbar.html#setOrientation">QScrollBar::setOrientation</a>(QScrollBar::Orientation)
<a href="qscrollview.html#horizontalScrollBar">QScrollView::horizontalScrollBar</a>(void)
<a href="qscrollview.html#verticalScrollBar">QScrollView::verticalScrollBar</a>(void)
<a href="qscrollview.html#viewport">QScrollView::viewport</a>(void)
<a href="qslider.html#setOrientation">QSlider::setOrientation</a>(QSlider::Orientation)
<a href="qspinbox.html#setSpecialValueText">QSpinBox::setSpecialValueText</a>(const char *)
<a href="qspinbox.html#setValidator">QSpinBox::setValidator</a>(<a href="qvalidator.html">QValidator</a> *)
<a href="qspinbox.html#valueChanged">QSpinBox::valueChanged</a>(const char *)
<a href="qwidget.html#paletteChange">QSpinBox::paletteChange</a>(const <a href="qpalette.html">QPalette</a> &)
<a href="qwidget.html#enabledChange">QSpinBox::enabledChange</a>(bool)
<a href="qwidget.html#fontChange">QSpinBox::fontChange</a>(const <a href="qfont.html">QFont</a> &)
<a href="qwidget.html#styleChange">QSpinBox::styleChange</a>(GUIStyle)
<a href="qsplitter.html#setOrientation">QSplitter::setOrientation</a>(QSplitter::Orientation)
<a href="qwidget.html#event">QSplitter::event</a>(<a href="qevent.html">QEvent</a> *)
QSplitter::childInsertEvent(<a href="qchildevent.html">QChildEvent</a> *)
QSplitter::childRemoveEvent(QChildEvent *)
<a href="qsplitter.html#moveSplitter">QSplitter::moveSplitter</a>(short)
<a href="qsplitter.html#adjustPos">QSplitter::adjustPos</a>(int)
QSplitter::splitterWidget(void)
QSplitter::startMoving(void)
QSplitter::moveTo(<a href="qpoint.html">QPoint</a>)
QSplitter::stopMoving(void)
QSplitter::newpos(void) const
<a href="qstatusbar.html#message">QStatusBar::message</a>(const char *)
QStatusBar::message(const char *, int)
<a href="qobject.html#name">QObject::name</a>(void) const
<a href="qtooltipgroup.html#showTip">QToolTipGroup::showTip</a>(const char *)
<a href="qtooltip.html#add">QToolTip::add</a>(<a href="qwidget.html">QWidget</a> *, const <a href="qrect.html">QRect</a> &, const char *)
QToolTip::add(QWidget *, const QRect &, const char *, <a href="qtooltipgroup.html">QToolTipGroup</a> *, const char *)
QToolTip::add(QWidget *, const char *)
QToolTip::add(QWidget *, const char *, QToolTipGroup *, const char *)
<a href="qtooltip.html#tip">QToolTip::tip</a>(const QRect &, const char *)
QToolTip::tip(const QRect &, const char *, const char *)
QObject::name(void) const
<a href="qwhatsthis.html#add">QWhatsThis::add</a>(QWidget *, const <a href="qpixmap.html">QPixmap</a> &, const char *, const char *, bool)
QWhatsThis::add(QWidget *, const char *, bool)
<a href="qwhatsthis.html#textFor">QWhatsThis::textFor</a>(QWidget *)
<a href="qwidget.html#event">QWidgetStack::event</a>(<a href="qevent.html">QEvent</a> *)
</pre><p>
<!-- eof -->
<p><address><hr><div align=center>
<table width=100% cellspacing=0 border=0><tr>
<td>Copyright &copy; 2007
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
<td align=right><div align=right>Qt 3.3.8</div>
</table></div></address></body>
</html>

@ -74,6 +74,7 @@ File Handling | tutorial2-07.html
Font Displayer | qfd-example.html Font Displayer | qfd-example.html
Fonts in Qt/Embedded | emb-fonts.html Fonts in Qt/Embedded | emb-fonts.html
Format of the QDataStream Operators | datastreamformat.html Format of the QDataStream Operators | datastreamformat.html
Functions removed in Qt 2.0 | removed20.html
GNU General Public License | gpl.html GNU General Public License | gpl.html
Getting Started | motif-walkthrough-1.html Getting Started | motif-walkthrough-1.html
Grapher Plugin | grapher-nsplugin-example.html Grapher Plugin | grapher-nsplugin-example.html
@ -145,6 +146,7 @@ Pictures of Most Qt Widgets | pictures.html
Play Tetrix! | qaxserver-demo-tetrax.html Play Tetrix! | qaxserver-demo-tetrax.html
Plugins | plugins.html Plugins | plugins.html
Popup Widgets | popup-example.html Popup Widgets | popup-example.html
Porting to Qt 2.x | porting2.html
Porting to Qt 3.x | porting.html Porting to Qt 3.x | porting.html
Porting your applications to Qt/Embedded | emb-porting.html Porting your applications to Qt/Embedded | emb-porting.html
Preparing to Migrate the User Interface | motif-walkthrough-2.html Preparing to Migrate the User Interface | motif-walkthrough-2.html

@ -44,5 +44,6 @@ Debian distribution
man1/mergetr.1 man1/mergetr.1
man1/msg2qm.1 man1/msg2qm.1
man1/qembed.1 man1/qembed.1
man1/qt20fix.1
man1/qtconfig.1 man1/qtconfig.1
man1/qvfb.1 man1/qvfb.1

@ -2,7 +2,7 @@
.SH "NAME" .SH "NAME"
linguist \- Translation tool for Qt. linguist \- Translation tool for Qt.
.SH "SYNOPSIS" .SH "SYNPOSIS"
.B linguist .B linguist
[ [
.I TRANSLATION .I TRANSLATION

@ -98,4 +98,4 @@ lrelease gnomovision_*.ts
.SH "SEE ALSO" .SH "SEE ALSO"
.BR lupdate (1) .BR lupdate (1)
and and
.BR https://trinitydesktop.org/docs/qt3/i18n.html .BR http://doc.trolltech.com/i18n.html

@ -104,4 +104,4 @@ lupdate *.cpp *.h *.ui -ts gnomovision_dk.ts
.SH "SEE ALSO" .SH "SEE ALSO"
.BR lrelease (1) .BR lrelease (1)
and and
.BR https://trinitydesktop.org/docs/qt3/i18n.html .BR http://doc.trolltech.com/i18n.html

@ -10,24 +10,17 @@ that assists producing QPF files from TTF and BDF files.
.SH "SYNTAX" .SH "SYNTAX"
.LP qembed [ \fIgeneral\-files\fP ] <[ \fI\-\-images image\-files \fP]>
makeqpf [ \fI\-A\fP ] [ \fI\-f spec\-file \fP] [ \fIfont ... \fP]
\-A
Render and save all fonts in fontdir
.br .br
\-f spec\-file
File of lines: general\-files
fontname character-ranges These files can be any type of file.
eg. \-\-images image\-files
smoothtimes 0\-ff,20a0\-20af These files must be in image formats supported by Qt.
.br
font
Font to render and save
.SH "FILES" .SH "FILES"
.LP .LP
\fI$(QTDIR)/lib/fonts/fontdir\fP \fI$(QTDIR)/etc/fonts/fontdir\fP
.SH "AUTHORS" .SH "AUTHORS"
.LP .LP
TrollTech <http://www.trolltech.com/> TrollTech <http://www.trolltech.com/>

@ -34,7 +34,7 @@ when required, so you will not need to use the
directly. directly.
.PP .PP
In brief, the meta object system is a structure used by Qt (see In brief, the meta object system is a structure used by Qt (see
.BR https://trinitydesktop.org/docs/qt3/ ")" .BR http://doc.trolltech.com ")"
for component programming and run time type information. It adds for component programming and run time type information. It adds
properties and inheritance information to (some) classes and properties and inheritance information to (some) classes and
provides a new type of communication between those instances of those provides a new type of communication between those instances of those
@ -446,4 +446,4 @@ public:
.SH "SEE ALSO" .SH "SEE ALSO"
.BR http://www.trolltech.com ", " .BR http://www.trolltech.com ", "
.BR "C++ ARM, section r.11.3" " (for the answer to the quiz), and" .BR "C++ ARM, section r.11.3" " (for the answer to the quiz), and"
.BR https://trinitydesktop.org/docs/qt3/ " (for complete Qt documentation)." .BR http://doc.trolltech.com " (for complete Qt documentation)."

@ -0,0 +1,32 @@
.TH "qt20fix" "1" "3.0.3" "Troll Tech AS, Norway." ""
.SH "NAME"
.LP
qt20fix \- Helps clean namespace when porting an app from Qt1 to Qt2
.SH "SYNTAX"
.LP
qt20fix myapp.cpp
.SH "DESCRIPTION"
.LP
Qt 2.x is namespace\-clean, unlike 1.x. Qt now uses very
few global identifiers. Identifiers like red, blue,
LeftButton, AlignRight, Key_Up, Key_Down, NoBrush etc.
are now part of a special class Qt (defined in
qnamespace.h), which is inherited by most Qt classes.
Member functions of classes that inherit from QWidget,
etc. are totally unaffected, but code that is not in
functions of classes inherited from Qt, you must qualify
these identifiers like this: Qt::red, Qt::LeftButton,
Qt::AlignRight, etc.
The qt/bin/qt20fix script helps to fix the code that
needs adaption, though most code does not need changing.
Compiling with \-DQT1COMPATIBILITY will help you get going
with Qt 2.x \- it allows all the old "dirty namespace"
identifiers from Qt 1.x to continue working. Without it,
you'll get compile errors that can easily be fixed by
searching this page for the clean identifiers.
.SH "AUTHORS"
.LP
TrollTech <http://www.trolltech.com/>

@ -131,6 +131,6 @@ doesn't care, so you can use .C, .cc, .CC, .cxx or even .c++ if
you prefer.) you prefer.)
.PP .PP
.SH "SEE ALSO" .SH "SEE ALSO"
.BR https://trinitydesktop.org/docs/qt3/ " " .BR http://www.trolltech.com/ " "
.SH AUTHOR .SH AUTHOR
Trolltech ASA <info@trolltech.com> Trolltech ASA <info@trolltech.com>

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -165,10 +165,13 @@ previously disabled, please check these macro variables:
\i \c CHECK_MATH becomes \c QT_CHECK_MATH \i \c CHECK_MATH becomes \c QT_CHECK_MATH
\endlist \endlist
The name of some debugging macro functions has been changed: The name of some debugging macro functions has been changed as well
but source compatibility should not be affected if the macro variable
\c QT_CLEAN_NAMESPACE is not defined:
\list \list
\i \c ASSERT becomes \c Q_ASSERT \i \c ASSERT becomes \c Q_ASSERT
\i \c CHECK_PTR becomes \c Q_CHECK_PTR
\endlist \endlist
For the record, undocumented macro variables that are not part of the API For the record, undocumented macro variables that are not part of the API

@ -3,6 +3,7 @@ TARGET = demo
CONFIG += qt warn_off release CONFIG += qt warn_off release
unix:LIBS += -lm unix:LIBS += -lm
DEFINES += QT_INTERNAL_ICONVIEW
DEFINES += QT_INTERNAL_WORKSPACE DEFINES += QT_INTERNAL_WORKSPACE
DEFINES += QT_INTERNAL_CANVAS DEFINES += QT_INTERNAL_CANVAS
INCLUDEPATH += . INCLUDEPATH += .

@ -106,7 +106,7 @@ float noise3(float vec[3])
{ {
int bx0, bx1, by0, by1, bz0, bz1, b00, b10, b01, b11; int bx0, bx1, by0, by1, bz0, bz1, b00, b10, b01, b11;
float rx0, rx1, ry0, ry1, rz0, rz1, *q, sy, sz, a, b, c, d, t, u, v; float rx0, rx1, ry0, ry1, rz0, rz1, *q, sy, sz, a, b, c, d, t, u, v;
int i, j; register int i, j;
if (start) { if (start) {
start = 0; start = 0;

@ -7,6 +7,8 @@
** **
*****************************************************************************/ *****************************************************************************/
#define QT_CLEAN_NAMESPACE // avoid clashes with Xmd.h
#include <qstringlist.h> #include <qstringlist.h>
#include <qgl.h> #include <qgl.h>
#include "glinfo.h" #include "glinfo.h"

@ -53,7 +53,7 @@ void poly()
int head = 0; int head = 0;
int tail = -maxcurves + 2; int tail = -maxcurves + 2;
QPointArray *a = new QPointArray[ maxcurves ]; QPointArray *a = new QPointArray[ maxcurves ];
QPointArray *p; register QPointArray *p;
QRect r = d->rect(); // desktop rectangle QRect r = d->rect(); // desktop rectangle
int i; int i;

@ -9,10 +9,10 @@ REQUIRES = full-config
HEADERS = mywidget.h HEADERS = mywidget.h
SOURCES = main.cpp \ SOURCES = main.cpp \
mywidget.cpp mywidget.cpp
TRANSLATIONS = mywidget.ts \ TRANSLATIONS = mywidget_cs.ts \
mywidget_cs.ts \
mywidget_de.ts \ mywidget_de.ts \
mywidget_el.ts \ mywidget_el.ts \
mywidget_en.ts \
mywidget_eo.ts \ mywidget_eo.ts \
mywidget_fr.ts \ mywidget_fr.ts \
mywidget_it.ts \ mywidget_it.ts \

@ -1,71 +1,73 @@
<!DOCTYPE TS><TS> <!DOCTYPE TS><TS>
<!-- Translation achieved by Arabeyes Project (http://www.arabeyes.org) -->
<!-- Translator(s): -->
<!-- Youcef Rabah Rahal <rahal@arabeyes.org> -->
<context> <context>
<name>MyWidget</name> <name>MyWidget</name>
<message>
<source>E&amp;xit...</source>
<translation type="obsolete">&amp;Esci...</translation>
</message>
<message> <message>
<source>First</source> <source>First</source>
<translation>الأوّل</translation> <translation>Ø£Ù^Ù?</translation>
</message> </message>
<message> <message>
<source>Internationalization Example</source> <source>Internationalization Example</source>
<translation>مثال عن التّدويل</translation> <translation>Ù?ثاÙ? اÙ?تدÙ^ÙSÙ?</translation>
</message> </message>
<message> <message>
<source>Isometric</source> <source>Isometric</source>
<translation>متساوي المقاييس</translation> <translation>Ù?تÙ?اثÙ?</translation>
</message> </message>
<message> <message>
<source>Language: English</source> <source>Language: English</source>
<translation>اللّغة: عربية</translation> <translation>اÙ?Ù?غة: اÙ?عربÙSØ©</translation>
</message> </message>
<message> <message>
<source>Oblique</source> <source>Oblique</source>
<translation>مائل</translation> <translation>Ù?صÙ?ت</translation>
</message> </message>
<message> <message>
<source>Perspective</source> <source>Perspective</source>
<translation>منظور</translation> <translation>Ù?Ù?ظÙ^ر</translation>
</message> </message>
<message> <message>
<source>Second</source> <source>Second</source>
<translation>الثّاني</translation> <translation type="unfinished">ثاÙ?Ù?</translation>
</message> </message>
<message> <message>
<source>The Main Window</source> <source>The Main Window</source>
<translation>النّافذة الرّئيسية</translation> <translation type="unfinished">اÙ?Ù?اÙ?ذة اÙ?رئÙSسÙSØ©</translation>
</message> </message>
<message> <message>
<source>Third</source> <source>Third</source>
<translation>الثّالث</translation> <translation type="unfinished">ثاÙ?Ø«</translation>
</message> </message>
<message> <message>
<source>View</source> <source>View</source>
<translation>منظر</translation> <translation type="unfinished">Ù?رئÙ?</translation>
</message> </message>
<message> <message>
<source>E&amp;xit</source> <source>E&amp;xit</source>
<translation>&amp;خروج</translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Ctrl+Q</source> <source>Ctrl+Q</source>
<translation>تحكّم+Q</translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>&amp;File</source> <source>&amp;File</source>
<translation>&amp;ملفّ</translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context> <context>
<name>QVDialog</name> <name>QVDialog</name>
<message> <message>
<source>OK</source> <source>OK</source>
<translation>موافقة</translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Cancel</source> <source>Cancel</source>
<translation>إلغاء</translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
</TS> </TS>

@ -0,0 +1 @@
../src/kernel/q1xcompatibility.h

@ -1 +1 @@
../src/widgets/qiconview.h ../src/iconview/qiconview.h

@ -0,0 +1 @@
../src/compat/qpaintd.h

@ -0,0 +1 @@
../src/compat/qpaintdc.h

@ -0,0 +1 @@
../src/kernel/qpaintdevicedefs.h

@ -5,8 +5,22 @@
#include "qglobal.h" #include "qglobal.h"
#ifndef _DEFAULT_SOURCE // Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
# define _DEFAULT_SOURCE
// DNS system header files are a mess!
// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
// 'u_char' and includes <sys/types.h>. Now the problem is that
// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
#ifndef _BSD_SOURCE
# define _BSD_SOURCE
#endif
// 1) need to reset default environment if _BSD_SOURCE is defined
// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
// 3) it seems older glibc need this to include the X/Open stuff
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif #endif
#include <unistd.h> #include <unistd.h>

@ -1,81 +0,0 @@
#
#
# qmake configuration for freebsd-clang
#
MAKEFILE_GENERATOR = UNIX
TEMPLATE = app
CONFIG += qt warn_on release thread link_prl
QMAKE_CC = clang
QMAKE_LEX = flex
QMAKE_LEXFLAGS =
QMAKE_YACC = yacc
QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = -pipe -fvisibility=hidden -fvisibility-inlines-hidden
QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w
QMAKE_CFLAGS_RELEASE = -O2
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
QMAKE_CFLAGS_THREAD = -pthread -D_THREAD_SAFE
QMAKE_CXX = clang++
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
# Addon software goes into /usr/local on the BSDs, by default we will look there
QMAKE_INCDIR = /usr/local/include
QMAKE_LIBDIR = /usr/local/lib
QMAKE_INCDIR_X11 = /usr/X11R6/include
QMAKE_LIBDIR_X11 = /usr/X11R6/lib
QMAKE_INCDIR_QT = $(QTDIR)/include
QMAKE_LIBDIR_QT = $(QTDIR)/lib
QMAKE_INCDIR_OPENGL = /usr/X11R6/include
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
QMAKE_LINK = clang++
QMAKE_LINK_SHLIB = clang++
QMAKE_LFLAGS =
QMAKE_LFLAGS_RELEASE =
QMAKE_LFLAGS_DEBUG =
QMAKE_LFLAGS_SHLIB = -shared
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
QMAKE_LFLAGS_SONAME = -Wl,-soname,
QMAKE_LFLAGS_THREAD = -pthread
QMAKE_RPATH = -Wl,-rpath,
QMAKE_LIBS =
QMAKE_LIBS_DYNLOAD =
QMAKE_LIBS_X11 = -lXext -lX11 -lm
QMAKE_LIBS_X11SM = -lSM -lICE
QMAKE_LIBS_QT = -lqt
QMAKE_LIBS_QT_THREAD = -lqt-mt
QMAKE_LIBS_OPENGL = -lGLU -lGL -lXmu
QMAKE_LIBS_OPENGL_QT = -lGL -lXmu
QMAKE_LIBS_THREAD =
QMAKE_MOC = $(QTDIR)/bin/moc
QMAKE_UIC = $(QTDIR)/bin/uic
QMAKE_AR = ar cqs
QMAKE_RANLIB =
QMAKE_TAR = tar -cf
QMAKE_GZIP = gzip -9f
QMAKE_COPY = cp -f
QMAKE_MOVE = mv -f
QMAKE_DEL_FILE = rm -f
QMAKE_DEL_DIR = rmdir
QMAKE_CHK_DIR_EXISTS = test -d
QMAKE_MKDIR = mkdir -p

@ -1,103 +0,0 @@
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
// Get Qt defines/settings
#include "qglobal.h"
// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
#include <unistd.h>
// We are hot - unistd.h should have turned on the specific APIs we requested
#ifdef QT_THREAD_SUPPORT
#include <pthread.h>
#endif
#include <dirent.h>
#include <fcntl.h>
#include <grp.h>
#include <pwd.h>
#include <signal.h>
#include <dlfcn.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/ipc.h>
#include <sys/time.h>
#include <sys/shm.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/wait.h>
// DNS header files are not fully covered by X/Open specifications.
// In particular nothing is said about res_* :/
// On BSDs header files <netinet/in.h> and <arpa/nameser.h> are not
// included by <resolv.h>. Note that <arpa/nameser.h> must be included
// before <resolv.h>.
#include <netinet/in.h>
#define class c_class // FreeeBSD 3.x
#include <arpa/nameser.h>
#undef class
#include <resolv.h>
#if !defined(QT_NO_COMPAT)
#define QT_STATBUF struct stat
#define QT_STATBUF4TSTAT struct stat
#define QT_STAT ::stat
#define QT_FSTAT ::fstat
#define QT_STAT_REG S_IFREG
#define QT_STAT_DIR S_IFDIR
#define QT_STAT_MASK S_IFMT
#define QT_STAT_LNK S_IFLNK
#define QT_FILENO fileno
#define QT_OPEN ::open
#define QT_CLOSE ::close
#define QT_LSEEK ::lseek
#define QT_READ ::read
#define QT_WRITE ::write
#define QT_ACCESS ::access
#define QT_GETCWD ::getcwd
#define QT_CHDIR ::chdir
#define QT_MKDIR ::mkdir
#define QT_RMDIR ::rmdir
#define QT_OPEN_RDONLY O_RDONLY
#define QT_OPEN_WRONLY O_WRONLY
#define QT_OPEN_RDWR O_RDWR
#define QT_OPEN_CREAT O_CREAT
#define QT_OPEN_TRUNC O_TRUNC
#define QT_OPEN_APPEND O_APPEND
#endif
#define QT_SIGNAL_RETTYPE void
#define QT_SIGNAL_ARGS int
#define QT_SIGNAL_IGNORE SIG_IGN
#if !defined(__DragonFly__) && __FreeBSD_version < 400000
// FreeBSD 1.0 - 3.5.1
# define QT_SOCKLEN_T int
#else
// FreeBSD 4.0 - 5.0
# define QT_SOCKLEN_T socklen_t
#endif
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
// Older FreeBSD versions may still use the a.out format instead of ELF.
// From the FreeBSD man pages:
// In previous implementations, it was necessary to prepend an
// underscore to all external symbols in order to gain symbol
// compatibility with object code compiled from the C language.
// This is still the case when using the (obsolete) -aout option to
// the C language compiler.
#ifndef __ELF__
#define QT_AOUT_UNDERSCORE
#endif
#endif // QPLATFORMDEFS_H

@ -12,7 +12,7 @@ QMAKE_LEX = flex
QMAKE_LEXFLAGS = QMAKE_LEXFLAGS =
QMAKE_YACC = yacc QMAKE_YACC = yacc
QMAKE_YACCFLAGS = -d QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = -pipe -fvisibility=hidden -fvisibility-inlines-hidden QMAKE_CFLAGS = -pipe
QMAKE_CFLAGS_DEPS = -M QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w QMAKE_CFLAGS_WARN_OFF = -w

@ -5,8 +5,22 @@
#include "qglobal.h" #include "qglobal.h"
#ifndef _DEFAULT_SOURCE // Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
# define _DEFAULT_SOURCE
// DNS system header files are a mess!
// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
// 'u_char' and includes <sys/types.h>. Now the problem is that
// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
#ifndef _BSD_SOURCE
# define _BSD_SOURCE
#endif
// 1) need to reset default environment if _BSD_SOURCE is defined
// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
// 3) it seems older glibc need this to include the X/Open stuff
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif #endif

@ -1,89 +0,0 @@
#
#
# qmake configuration for linux-clang
#
MAKEFILE_GENERATOR = UNIX
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl thread
QMAKE_INCREMENTAL_STYLE = sublib
QMAKE_CC = clang
QMAKE_LEX = flex
QMAKE_LEXFLAGS =
QMAKE_YACC = yacc
QMAKE_YACCFLAGS = -d
QMAKE_YACCFLAGS_MANGLE = -p $base -b $base
QMAKE_YACC_HEADER = $base.tab.h
QMAKE_YACC_SOURCE = $base.tab.c
QMAKE_CFLAGS = -pipe -g -fvisibility=hidden -fvisibility-inlines-hidden
QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w
QMAKE_CFLAGS_RELEASE = -O2
QMAKE_CFLAGS_DEBUG = -O0
QMAKE_CFLAGS_SHLIB = -fPIC
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
QMAKE_CFLAGS_THREAD = -D_REENTRANT
QMAKE_CXX = clang++
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
QMAKE_INCDIR =
QMAKE_LIBDIR =
QMAKE_INCDIR_X11 = /usr/X11R6/include
QMAKE_LIBDIR_X11 = /usr/X11R6/lib
QMAKE_INCDIR_QT = $(QTDIR)/include
QMAKE_LIBDIR_QT = $(QTDIR)/lib
QMAKE_INCDIR_OPENGL = /usr/X11R6/include
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
QMAKE_LINK = clang++
QMAKE_LINK_SHLIB = clang++
QMAKE_LFLAGS = -luuid
QMAKE_LFLAGS_RELEASE =
QMAKE_LFLAGS_DEBUG =
QMAKE_LFLAGS_SHLIB = -shared
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
QMAKE_LFLAGS_SONAME = -Wl,-soname,
QMAKE_LFLAGS_THREAD =
QMAKE_RPATH = -Wl,-rpath,
QMAKE_LIBS = -luuid
QMAKE_LIBS_DYNLOAD = -ldl
QMAKE_LIBS_X11 = -lXext -lX11 -lm
QMAKE_LIBS_X11SM = -lSM -lICE
QMAKE_LIBS_NIS = -lnsl
QMAKE_LIBS_QT = -lqt
QMAKE_LIBS_QT_THREAD = -lqt-mt
QMAKE_LIBS_OPENGL = -lGLU -lGL -lXmu
QMAKE_LIBS_OPENGL_QT = -lGL -lXmu
QMAKE_LIBS_THREAD = -lpthread
QMAKE_MOC = $(QTDIR)/bin/moc
QMAKE_UIC = $(QTDIR)/bin/uic
QMAKE_AR = ar cqs
QMAKE_RANLIB =
QMAKE_TAR = tar -cf
QMAKE_GZIP = gzip -9f
QMAKE_COPY = cp -f
QMAKE_COPY_FILE = $(COPY)
QMAKE_COPY_DIR = $(COPY) -r
QMAKE_MOVE = mv -f
QMAKE_DEL_FILE = rm -f
QMAKE_DEL_DIR = rmdir
QMAKE_STRIP =
QMAKE_STRIPFLAGS_LIB += --strip-unneeded
QMAKE_CHK_DIR_EXISTS = test -d
QMAKE_MKDIR = mkdir -p

@ -1,89 +0,0 @@
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
// Get Qt defines/settings
#include "qglobal.h"
#ifndef _DEFAULT_SOURCE
# define _DEFAULT_SOURCE
#endif
#include <unistd.h>
// We are hot - unistd.h should have turned on the specific APIs we requested
#ifdef QT_THREAD_SUPPORT
#include <pthread.h>
#endif
#include <dirent.h>
#include <fcntl.h>
#include <grp.h>
#include <pwd.h>
#include <signal.h>
#include <dlfcn.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/ipc.h>
#include <sys/time.h>
#include <sys/shm.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/wait.h>
// DNS header files are not fully covered by X/Open specifications.
// In particular nothing is said about res_* :/
// Header files <netinet/in.h> and <arpa/nameser.h> are not included
// by <resolv.h> on older versions of the GNU C library. Note that
// <arpa/nameser.h> must be included before <resolv.h>.
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
#if !defined(QT_NO_COMPAT)
#define QT_STATBUF struct stat
#define QT_STATBUF4TSTAT struct stat
#define QT_STAT ::stat
#define QT_FSTAT ::fstat
#define QT_STAT_REG S_IFREG
#define QT_STAT_DIR S_IFDIR
#define QT_STAT_MASK S_IFMT
#define QT_STAT_LNK S_IFLNK
#define QT_FILENO fileno
#define QT_OPEN ::open
#define QT_CLOSE ::close
#define QT_LSEEK ::lseek
#define QT_READ ::read
#define QT_WRITE ::write
#define QT_ACCESS ::access
#define QT_GETCWD ::getcwd
#define QT_CHDIR ::chdir
#define QT_MKDIR ::mkdir
#define QT_RMDIR ::rmdir
#define QT_OPEN_RDONLY O_RDONLY
#define QT_OPEN_WRONLY O_WRONLY
#define QT_OPEN_RDWR O_RDWR
#define QT_OPEN_CREAT O_CREAT
#define QT_OPEN_TRUNC O_TRUNC
#define QT_OPEN_APPEND O_APPEND
#endif
#define QT_SIGNAL_RETTYPE void
#define QT_SIGNAL_ARGS int
#define QT_SIGNAL_IGNORE SIG_IGN
#define QT_SOCKLEN_T socklen_t
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
#endif
#define QT_MITSHM
#endif // QPLATFORMDEFS_H

@ -5,8 +5,22 @@
#include "qglobal.h" #include "qglobal.h"
#ifndef _DEFAULT_SOURCE // Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
# define _DEFAULT_SOURCE
// DNS system header files are a mess!
// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
// 'u_char' and includes <sys/types.h>. Now the problem is that
// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
#ifndef _BSD_SOURCE
# define _BSD_SOURCE
#endif
// 1) need to reset default environment if _BSD_SOURCE is defined
// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
// 3) it seems older glibc need this to include the X/Open stuff
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif #endif
#include <unistd.h> #include <unistd.h>
@ -77,7 +91,11 @@
#define QT_SIGNAL_ARGS int #define QT_SIGNAL_ARGS int
#define QT_SIGNAL_IGNORE SIG_IGN #define QT_SIGNAL_IGNORE SIG_IGN
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
#define QT_SOCKLEN_T socklen_t #define QT_SOCKLEN_T socklen_t
#else
#define QT_SOCKLEN_T int
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
#define QT_SNPRINTF ::snprintf #define QT_SNPRINTF ::snprintf

@ -5,8 +5,22 @@
#include "qglobal.h" #include "qglobal.h"
#ifndef _DEFAULT_SOURCE // Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
# define _DEFAULT_SOURCE
// DNS system header files are a mess!
// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
// 'u_char' and includes <sys/types.h>. Now the problem is that
// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
#ifndef _BSD_SOURCE
# define _BSD_SOURCE
#endif
// 1) need to reset default environment if _BSD_SOURCE is defined
// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
// 3) it seems older glibc need this to include the X/Open stuff
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif #endif
#include <unistd.h> #include <unistd.h>
@ -77,7 +91,11 @@
#define QT_SIGNAL_ARGS int #define QT_SIGNAL_ARGS int
#define QT_SIGNAL_IGNORE SIG_IGN #define QT_SIGNAL_IGNORE SIG_IGN
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
#define QT_SOCKLEN_T socklen_t #define QT_SOCKLEN_T socklen_t
#else
#define QT_SOCKLEN_T int
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
#define QT_SNPRINTF ::snprintf #define QT_SNPRINTF ::snprintf

@ -1,5 +1,26 @@
#ifndef _DEFAULT_SOURCE #ifndef QPLATFORMDEFS_H
# define _DEFAULT_SOURCE #define QPLATFORMDEFS_H
// Get Qt defines/settings
#include "qglobal.h"
// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
// DNS system header files are a mess!
// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
// 'u_char' and includes <sys/types.h>. Now the problem is that
// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
#ifndef _BSD_SOURCE
# define _BSD_SOURCE
#endif
// 1) need to reset default environment if _BSD_SOURCE is defined
// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
// 3) it seems older glibc need this to include the X/Open stuff
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif #endif
#include <unistd.h> #include <unistd.h>
@ -70,7 +91,11 @@
#define QT_SIGNAL_ARGS int #define QT_SIGNAL_ARGS int
#define QT_SIGNAL_IGNORE SIG_IGN #define QT_SIGNAL_IGNORE SIG_IGN
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
#define QT_SOCKLEN_T socklen_t #define QT_SOCKLEN_T socklen_t
#else
#define QT_SOCKLEN_T int
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
#define QT_SNPRINTF ::snprintf #define QT_SNPRINTF ::snprintf

@ -5,8 +5,22 @@
#include "qglobal.h" #include "qglobal.h"
#ifndef _DEFAULT_SOURCE // Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
# define _DEFAULT_SOURCE
// DNS system header files are a mess!
// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
// 'u_char' and includes <sys/types.h>. Now the problem is that
// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
#ifndef _BSD_SOURCE
# define _BSD_SOURCE
#endif
// 1) need to reset default environment if _BSD_SOURCE is defined
// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
// 3) it seems older glibc need this to include the X/Open stuff
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif #endif
#include <unistd.h> #include <unistd.h>
@ -77,7 +91,11 @@
#define QT_SIGNAL_ARGS int #define QT_SIGNAL_ARGS int
#define QT_SIGNAL_IGNORE SIG_IGN #define QT_SIGNAL_IGNORE SIG_IGN
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
#define QT_SOCKLEN_T socklen_t #define QT_SOCKLEN_T socklen_t
#else
#define QT_SOCKLEN_T int
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
#define QT_SNPRINTF ::snprintf #define QT_SNPRINTF ::snprintf

@ -5,8 +5,22 @@
#include "qglobal.h" #include "qglobal.h"
#ifndef _DEFAULT_SOURCE // Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
# define _DEFAULT_SOURCE
// DNS system header files are a mess!
// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
// 'u_char' and includes <sys/types.h>. Now the problem is that
// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
#ifndef _BSD_SOURCE
# define _BSD_SOURCE
#endif
// 1) need to reset default environment if _BSD_SOURCE is defined
// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
// 3) it seems older glibc need this to include the X/Open stuff
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif #endif
#include <unistd.h> #include <unistd.h>
@ -77,7 +91,11 @@
#define QT_SIGNAL_ARGS int #define QT_SIGNAL_ARGS int
#define QT_SIGNAL_IGNORE SIG_IGN #define QT_SIGNAL_IGNORE SIG_IGN
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
#define QT_SOCKLEN_T socklen_t #define QT_SOCKLEN_T socklen_t
#else
#define QT_SOCKLEN_T int
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
#define QT_SNPRINTF ::snprintf #define QT_SNPRINTF ::snprintf

@ -5,8 +5,22 @@
#include "qglobal.h" #include "qglobal.h"
#ifndef _DEFAULT_SOURCE // Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
# define _DEFAULT_SOURCE
// DNS system header files are a mess!
// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
// 'u_char' and includes <sys/types.h>. Now the problem is that
// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
#ifndef _BSD_SOURCE
# define _BSD_SOURCE
#endif
// 1) need to reset default environment if _BSD_SOURCE is defined
// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
// 3) it seems older glibc need this to include the X/Open stuff
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif #endif
#include <unistd.h> #include <unistd.h>
@ -77,7 +91,11 @@
#define QT_SIGNAL_ARGS int #define QT_SIGNAL_ARGS int
#define QT_SIGNAL_IGNORE SIG_IGN #define QT_SIGNAL_IGNORE SIG_IGN
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
#define QT_SOCKLEN_T socklen_t #define QT_SOCKLEN_T socklen_t
#else
#define QT_SOCKLEN_T int
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
#define QT_SNPRINTF ::snprintf #define QT_SNPRINTF ::snprintf

@ -5,8 +5,22 @@
#include "qglobal.h" #include "qglobal.h"
#ifndef _DEFAULT_SOURCE // Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
# define _DEFAULT_SOURCE
// DNS system header files are a mess!
// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
// 'u_char' and includes <sys/types.h>. Now the problem is that
// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
#ifndef _BSD_SOURCE
# define _BSD_SOURCE
#endif
// 1) need to reset default environment if _BSD_SOURCE is defined
// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
// 3) it seems older glibc need this to include the X/Open stuff
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif #endif
#include <unistd.h> #include <unistd.h>
@ -77,7 +91,11 @@
#define QT_SIGNAL_ARGS int #define QT_SIGNAL_ARGS int
#define QT_SIGNAL_IGNORE SIG_IGN #define QT_SIGNAL_IGNORE SIG_IGN
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
#define QT_SOCKLEN_T socklen_t #define QT_SOCKLEN_T socklen_t
#else
#define QT_SOCKLEN_T int
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
#define QT_SNPRINTF ::snprintf #define QT_SNPRINTF ::snprintf

@ -5,8 +5,22 @@
#include "qglobal.h" #include "qglobal.h"
#ifndef _DEFAULT_SOURCE // Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
# define _DEFAULT_SOURCE
// DNS system header files are a mess!
// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
// 'u_char' and includes <sys/types.h>. Now the problem is that
// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
#ifndef _BSD_SOURCE
# define _BSD_SOURCE
#endif
// 1) need to reset default environment if _BSD_SOURCE is defined
// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
// 3) it seems older glibc need this to include the X/Open stuff
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif #endif
#include <unistd.h> #include <unistd.h>
@ -80,7 +94,11 @@
#define QT_SIGNAL_ARGS int #define QT_SIGNAL_ARGS int
#define QT_SIGNAL_IGNORE SIG_IGN #define QT_SIGNAL_IGNORE SIG_IGN
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
#define QT_SOCKLEN_T socklen_t #define QT_SOCKLEN_T socklen_t
#else
#define QT_SOCKLEN_T int
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
#define QT_SNPRINTF ::snprintf #define QT_SNPRINTF ::snprintf

@ -5,8 +5,22 @@
#include "qglobal.h" #include "qglobal.h"
#ifndef _DEFAULT_SOURCE // Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
# define _DEFAULT_SOURCE
// DNS system header files are a mess!
// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
// 'u_char' and includes <sys/types.h>. Now the problem is that
// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
#ifndef _BSD_SOURCE
# define _BSD_SOURCE
#endif
// 1) need to reset default environment if _BSD_SOURCE is defined
// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
// 3) it seems older glibc need this to include the X/Open stuff
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif #endif
#include <unistd.h> #include <unistd.h>
@ -77,7 +91,11 @@
#define QT_SIGNAL_ARGS int #define QT_SIGNAL_ARGS int
#define QT_SIGNAL_IGNORE SIG_IGN #define QT_SIGNAL_IGNORE SIG_IGN
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
#define QT_SOCKLEN_T socklen_t #define QT_SOCKLEN_T socklen_t
#else
#define QT_SOCKLEN_T int
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
#define QT_SNPRINTF ::snprintf #define QT_SNPRINTF ::snprintf

@ -5,8 +5,22 @@
#include "qglobal.h" #include "qglobal.h"
#ifndef _DEFAULT_SOURCE // Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
# define _DEFAULT_SOURCE
// DNS system header files are a mess!
// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
// 'u_char' and includes <sys/types.h>. Now the problem is that
// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
#ifndef _BSD_SOURCE
# define _BSD_SOURCE
#endif
// 1) need to reset default environment if _BSD_SOURCE is defined
// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
// 3) it seems older glibc need this to include the X/Open stuff
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif #endif
#include <unistd.h> #include <unistd.h>
@ -77,7 +91,11 @@
#define QT_SIGNAL_ARGS int #define QT_SIGNAL_ARGS int
#define QT_SIGNAL_IGNORE SIG_IGN #define QT_SIGNAL_IGNORE SIG_IGN
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
#define QT_SOCKLEN_T socklen_t #define QT_SOCKLEN_T socklen_t
#else
#define QT_SOCKLEN_T int
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
#define QT_SNPRINTF ::snprintf #define QT_SNPRINTF ::snprintf

@ -76,7 +76,11 @@
#define QT_SIGNAL_ARGS int #define QT_SIGNAL_ARGS int
#define QT_SIGNAL_IGNORE SIG_IGN #define QT_SIGNAL_IGNORE SIG_IGN
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
#define QT_SOCKLEN_T socklen_t #define QT_SOCKLEN_T socklen_t
#else
#define QT_SOCKLEN_T int
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
#define QT_SNPRINTF ::snprintf #define QT_SNPRINTF ::snprintf

@ -12,7 +12,7 @@ QMAKE_LEX = flex
QMAKE_LEXFLAGS = QMAKE_LEXFLAGS =
QMAKE_YACC = yacc QMAKE_YACC = yacc
QMAKE_YACCFLAGS = -d QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = -pipe -fvisibility=hidden -fvisibility-inlines-hidden QMAKE_CFLAGS = -pipe
QMAKE_CFLAGS_DEPS = -M QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w QMAKE_CFLAGS_WARN_OFF = -w
@ -35,12 +35,12 @@ QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
QMAKE_INCDIR = /usr/local/include QMAKE_INCDIR = /usr/local/include
QMAKE_LIBDIR = /usr/local/lib QMAKE_LIBDIR = /usr/local/lib
QMAKE_INCDIR_X11 = /usr/X11R7/include QMAKE_INCDIR_X11 = /usr/X11R6/include
QMAKE_LIBDIR_X11 = /usr/X11R7/lib QMAKE_LIBDIR_X11 = /usr/X11R6/lib
QMAKE_INCDIR_QT = $(QTDIR)/include QMAKE_INCDIR_QT = $(QTDIR)/include
QMAKE_LIBDIR_QT = $(QTDIR)/lib QMAKE_LIBDIR_QT = $(QTDIR)/lib
QMAKE_INCDIR_OPENGL = /usr/X11R7/include QMAKE_INCDIR_OPENGL = /usr/X11R6/include
QMAKE_LIBDIR_OPENGL = /usr/X11R7/lib QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
QMAKE_LINK = g++ QMAKE_LINK = g++
QMAKE_LINK_SHLIB = g++ QMAKE_LINK_SHLIB = g++

@ -12,7 +12,7 @@ QMAKE_LEX = flex
QMAKE_LEXFLAGS = QMAKE_LEXFLAGS =
QMAKE_YACC = yacc QMAKE_YACC = yacc
QMAKE_YACCFLAGS = -d QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = -pipe -fvisibility=hidden -fvisibility-inlines-hidden QMAKE_CFLAGS = -pipe
QMAKE_CFLAGS_DEPS = -M QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w QMAKE_CFLAGS_WARN_OFF = -w

@ -1,3 +1,6 @@
#ifndef QT_CLEAN_NAMESPACE
#define QT_CLEAN_NAMESPACE
#endif
#include <qimageformatplugin.h> #include <qimageformatplugin.h>
#ifndef QT_NO_IMAGEFORMATPLUGIN #ifndef QT_NO_IMAGEFORMATPLUGIN

@ -1,3 +1,7 @@
#ifndef QT_CLEAN_NAMESPACE
#define QT_CLEAN_NAMESPACE
#endif
#include <qimageformatplugin.h> #include <qimageformatplugin.h>
#ifndef QT_NO_IMAGEFORMATPLUGIN #ifndef QT_NO_IMAGEFORMATPLUGIN

@ -1,3 +1,6 @@
#ifndef QT_CLEAN_NAMESPACE
#define QT_CLEAN_NAMESPACE
#endif
#include <qimageformatplugin.h> #include <qimageformatplugin.h>
#ifndef QT_NO_IMAGEFORMATPLUGIN #ifndef QT_NO_IMAGEFORMATPLUGIN

@ -3,7 +3,7 @@ TARGET = qimsw-multi
DESTDIR = ../../../inputmethods DESTDIR = ../../../inputmethods
INCLUDEPATH += . INCLUDEPATH += .
CONFIG += qt warn_on plugin CONFIG += qt warn_on debug plugin
target.path += $$plugins.path/inputmethods target.path += $$plugins.path/inputmethods
INSTALLS += target INSTALLS += target

@ -3,7 +3,7 @@ TARGET = qimsw-none
DESTDIR = ../../../inputmethods DESTDIR = ../../../inputmethods
INCLUDEPATH += . INCLUDEPATH += .
CONFIG += qt warn_on plugin CONFIG += qt warn_on debug plugin
target.path += $$plugins.path/inputmethods target.path += $$plugins.path/inputmethods
INSTALLS += target INSTALLS += target

@ -3,7 +3,7 @@ TARGET = qsimple
DESTDIR = ../../../inputmethods DESTDIR = ../../../inputmethods
INCLUDEPATH += . INCLUDEPATH += .
CONFIG += qt warn_on plugin CONFIG += qt warn_on debug plugin
target.path += $$plugins.path/inputmethods target.path += $$plugins.path/inputmethods
INSTALLS += target INSTALLS += target

@ -3,7 +3,7 @@ TARGET = qxim
DESTDIR = ../../../inputmethods DESTDIR = ../../../inputmethods
INCLUDEPATH += . INCLUDEPATH += .
CONFIG += qt warn_on plugin CONFIG += qt warn_on debug plugin
target.path += $$plugins.path/inputmethods target.path += $$plugins.path/inputmethods
INSTALLS += target INSTALLS += target
DEFINES += QT_NO_XINERAMA DEFINES += QT_NO_XINERAMA

@ -1183,7 +1183,7 @@ MakefileGenerator::init()
Option::fixPathToTargetOS(imgfile); Option::fixPathToTargetOS(imgfile);
if(!project->isEmpty("UI_DIR") || !project->isEmpty("UI_SOURCES_DIR")) { if(!project->isEmpty("UI_DIR") || !project->isEmpty("UI_SOURCES_DIR")) {
if(imgfile.find(Option::dir_sep) != -1) if(imgfile.find(Option::dir_sep) != -1)
imgfile = imgfile.mid(imgfile.findRev(Option::dir_sep) + 1); imgfile = imgfile.right(imgfile.findRev(Option::dir_sep) + 1);
imgfile.prepend( (project->isEmpty("UI_DIR") ? project->first("UI_SOURCES_DIR") : imgfile.prepend( (project->isEmpty("UI_DIR") ? project->first("UI_SOURCES_DIR") :
project->first("UI_DIR")) ); project->first("UI_DIR")) );
v["QMAKE_IMAGE_COLLECTION"] = QStringList(imgfile); v["QMAKE_IMAGE_COLLECTION"] = QStringList(imgfile);
@ -1433,7 +1433,7 @@ MakefileGenerator::write()
QString prl = var("TARGET"); QString prl = var("TARGET");
int slsh = prl.findRev(Option::dir_sep); int slsh = prl.findRev(Option::dir_sep);
if(slsh != -1) if(slsh != -1)
prl = prl.right(prl.length() - slsh - 1); prl = prl.right(prl.length() - slsh);
int dot = prl.find('.'); int dot = prl.find('.');
if(dot != -1) if(dot != -1)
prl = prl.left(dot); prl = prl.left(dot);
@ -2142,9 +2142,10 @@ QString MakefileGenerator::build_args()
bool bool
MakefileGenerator::writeHeader(QTextStream &t) MakefileGenerator::writeHeader(QTextStream &t)
{ {
time_t foo = time(NULL);
t << "#############################################################################" << endl; t << "#############################################################################" << endl;
t << "# Makefile for building: " << var("TARGET") << endl; t << "# Makefile for building: " << var("TARGET") << endl;
t << "# Generated by qmake (" << qmake_version() << ") (Qt " << QT_VERSION_STR << ")" << endl; t << "# Generated by qmake (" << qmake_version() << ") (Qt " << QT_VERSION_STR << ") on: " << ctime(&foo);
t << "# Project: " << fileFixify(project->projectFile()) << endl; t << "# Project: " << fileFixify(project->projectFile()) << endl;
t << "# Template: " << var("TEMPLATE") << endl; t << "# Template: " << var("TEMPLATE") << endl;
t << "# Command: " << build_args() << endl; t << "# Command: " << build_args() << endl;

@ -345,7 +345,7 @@ bool
ProjectGenerator::writeMakefile(QTextStream &t) ProjectGenerator::writeMakefile(QTextStream &t)
{ {
t << "######################################################################" << endl; t << "######################################################################" << endl;
t << "# Automatically generated by qmake (" << qmake_version() << ") " << endl; t << "# Automatically generated by qmake (" << qmake_version() << ") " << QDateTime::currentDateTime().toString() << endl;
t << "######################################################################" << endl << endl; t << "######################################################################" << endl << endl;
QStringList::Iterator it; QStringList::Iterator it;
for(it = Option::before_user_vars.begin(); it != Option::before_user_vars.end(); ++it) for(it = Option::before_user_vars.begin(); it != Option::before_user_vars.end(); ++it)

@ -343,7 +343,7 @@ UnixMakefileGenerator::init()
if(libtoolify[i].startsWith("QMAKE_LINK") || libtoolify[i] == "QMAKE_AR_CMD") { if(libtoolify[i].startsWith("QMAKE_LINK") || libtoolify[i] == "QMAKE_AR_CMD") {
libtool_flags += " --mode=link"; libtool_flags += " --mode=link";
if(project->isActiveConfig("staticlib")) { if(project->isActiveConfig("staticlib")) {
comp_flags += " -static"; libtool_flags += " -static";
} else { } else {
if(!project->isEmpty("QMAKE_LIB_FLAG")) { if(!project->isEmpty("QMAKE_LIB_FLAG")) {
int maj = project->first("VER_MAJ").toInt(); int maj = project->first("VER_MAJ").toInt();
@ -352,16 +352,18 @@ UnixMakefileGenerator::init()
comp_flags += " -version-info " + QString::number(10*maj + min) + comp_flags += " -version-info " + QString::number(10*maj + min) +
":" + QString::number(pat) + ":0"; ":" + QString::number(pat) + ":0";
if(libtoolify[i] != "QMAKE_AR_CMD") { if(libtoolify[i] != "QMAKE_AR_CMD") {
QString rpath = project->first("target.path"); QString rpath = Option::output_dir;
if(rpath.right(1) != Option::dir_sep) { if(!project->isEmpty("DESTDIR")) {
rpath += Option::dir_sep; rpath = project->first("DESTDIR");
if(QDir::isRelativePath(rpath))
rpath.prepend(Option::output_dir + Option::dir_sep);
} }
comp_flags += " -rpath " + Option::fixPathToTargetOS(rpath, FALSE); comp_flags += " -rpath " + Option::fixPathToTargetOS(rpath, FALSE);
} }
} }
} }
if(project->isActiveConfig("plugin")) if(project->isActiveConfig("plugin"))
comp_flags += " -module"; libtool_flags += " -module";
} else { } else {
libtool_flags += " --mode=compile"; libtool_flags += " --mode=compile";
} }
@ -761,7 +763,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
QString src_lt = var("QMAKE_ORIG_TARGET"); QString src_lt = var("QMAKE_ORIG_TARGET");
int slsh = src_lt.findRev(Option::dir_sep); int slsh = src_lt.findRev(Option::dir_sep);
if(slsh != -1) if(slsh != -1)
src_lt = src_lt.right(src_lt.length() - slsh - 1); src_lt = src_lt.right(src_lt.length() - slsh);
int dot = src_lt.find('.'); int dot = src_lt.find('.');
if(dot != -1) if(dot != -1)
src_lt = src_lt.left(dot); src_lt = src_lt.left(dot);
@ -784,7 +786,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
QString src_pc = var("QMAKE_ORIG_TARGET"); QString src_pc = var("QMAKE_ORIG_TARGET");
int slsh = src_pc.findRev(Option::dir_sep); int slsh = src_pc.findRev(Option::dir_sep);
if(slsh != -1) if(slsh != -1)
src_pc = src_pc.right(src_pc.length() - slsh - 1); src_pc = src_pc.right(src_pc.length() - slsh);
int dot = src_pc.find('.'); int dot = src_pc.find('.');
if(dot != -1) if(dot != -1)
src_pc = src_pc.left(dot); src_pc = src_pc.left(dot);

@ -1386,6 +1386,20 @@ void UnixMakefileGenerator::init2()
if(!project->isActiveConfig("compile_libtool")) if(!project->isActiveConfig("compile_libtool"))
project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_SONAME"]; project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_SONAME"];
} }
QString destdir = project->first("DESTDIR");
if ( !destdir.isEmpty() && !project->variables()["QMAKE_RPATH"].isEmpty() ) {
QString rpath_destdir = destdir;
if(QDir::isRelativePath(rpath_destdir)) {
QFileInfo fi(Option::fixPathToLocalOS(rpath_destdir));
if(fi.convertToAbs()) //strange, shouldn't really happen
rpath_destdir = Option::fixPathToTargetOS(rpath_destdir, FALSE);
else
rpath_destdir = fi.filePath();
} else {
rpath_destdir = Option::fixPathToTargetOS(rpath_destdir, FALSE);
}
project->variables()["QMAKE_LFLAGS"] += project->first("QMAKE_RPATH") + rpath_destdir;
}
} }
QStringList &quc = project->variables()["QMAKE_EXTRA_UNIX_COMPILERS"]; QStringList &quc = project->variables()["QMAKE_EXTRA_UNIX_COMPILERS"];
for(QStringList::Iterator it = quc.begin(); it != quc.end(); ++it) { for(QStringList::Iterator it = quc.begin(); it != quc.end(); ++it) {
@ -1414,7 +1428,7 @@ UnixMakefileGenerator::libtoolFileName()
QString ret = var("TARGET"); QString ret = var("TARGET");
int slsh = ret.findRev(Option::dir_sep); int slsh = ret.findRev(Option::dir_sep);
if(slsh != -1) if(slsh != -1)
ret = ret.right(ret.length() - slsh - 1); ret = ret.right(ret.length() - slsh);
int dot = ret.find('.'); int dot = ret.find('.');
if(dot != -1) if(dot != -1)
ret = ret.left(dot); ret = ret.left(dot);
@ -1438,8 +1452,9 @@ UnixMakefileGenerator::writeLibtoolFile()
QTextStream t(&ft); QTextStream t(&ft);
t << "# " << lname << " - a libtool library file\n"; t << "# " << lname << " - a libtool library file\n";
time_t now = time(NULL);
t << "# Generated by qmake/libtool (" << qmake_version() << ") (Qt " t << "# Generated by qmake/libtool (" << qmake_version() << ") (Qt "
<< QT_VERSION_STR << ")\n"; << QT_VERSION_STR << ") on: " << ctime(&now) << "\n";
t << "# The name that we can dlopen(3).\n" t << "# The name that we can dlopen(3).\n"
<< "dlname='" << var(project->isActiveConfig("plugin") ? "TARGET" : "TARGET_x") << "dlname='" << var(project->isActiveConfig("plugin") ? "TARGET" : "TARGET_x")
@ -1451,17 +1466,13 @@ UnixMakefileGenerator::writeLibtoolFile()
t << var("TARGET"); t << var("TARGET");
} else { } else {
if (project->isEmpty("QMAKE_HPUX_SHLIB")) if (project->isEmpty("QMAKE_HPUX_SHLIB"))
t << var("TARGET_x.y.z") << " " << var("TARGET_x.y") << " "; t << var("TARGET_x.y.z") << " ";
t << var("TARGET_x") << " " << var("TARGET_"); t << var("TARGET_x") << " " << var("TARGET_");
} }
t << "'\n\n"; t << "'\n\n";
t << "# The name of the static archive.\n" t << "# The name of the static archive.\n"
<< "old_library='"; << "old_library='" << lname.left(lname.length()-Option::libtool_ext.length()) << ".a'\n\n";
if(project->isActiveConfig("staticlib")) {
t << lname.left(lname.length()-Option::libtool_ext.length()) << ".a";
}
t << "'\n\n";
t << "# Libraries that this one depends upon.\n"; t << "# Libraries that this one depends upon.\n";
QStringList libs; QStringList libs;
@ -1502,7 +1513,7 @@ UnixMakefileGenerator::pkgConfigFileName()
QString ret = var("TARGET"); QString ret = var("TARGET");
int slsh = ret.findRev(Option::dir_sep); int slsh = ret.findRev(Option::dir_sep);
if(slsh != -1) if(slsh != -1)
ret = ret.right(ret.length() - slsh - 1); ret = ret.right(ret.length() - slsh);
if(ret.startsWith("lib")) if(ret.startsWith("lib"))
ret = ret.mid(3); ret = ret.mid(3);
int dot = ret.find('.'); int dot = ret.find('.');
@ -1546,38 +1557,23 @@ UnixMakefileGenerator::writePkgConfigFile() // ### does make sense only for
project->variables()["ALL_DEPS"].append(fname); project->variables()["ALL_DEPS"].append(fname);
QTextStream t(&ft); QTextStream t(&ft);
QString prefix = pkgConfigPrefix(); QString prefix = pkgConfigPrefix();
QString libDir = qInstallPathLibs(); QString libDir = project->first("QMAKE_PKGCONFIG_LIBDIR");
if (libDir.isEmpty()) if(libDir.isEmpty())
{ libDir = prefix + "/lib";
libDir = prefix + "/lib"; QString includeDir = project->first("QMAKE_PKGCONFIG_INCDIR");
} if(includeDir.isEmpty())
QString includeDir = qInstallPathHeaders(); includeDir = prefix + "/include";
if (includeDir.isEmpty()) QString pluginsDir = project->first("QMAKE_PKGCONFIG_PLUGINS");
{ if(pluginsDir.isEmpty())
includeDir = prefix + "/include"; pluginsDir = prefix + "/plugins";
}
QString pluginsDir = qInstallPathPlugins(); t << "prefix=" << prefix << endl;
if (pluginsDir.isEmpty()) t << "exec_prefix=${prefix}\n"
{ << "libdir=" << pkgConfigFixPath(libDir) << "\n"
pluginsDir = prefix + "/plugins"; << "includedir=" << pkgConfigFixPath(includeDir) << endl;
} // non-standard entry. Provides path for plugins
QString translationsDir = qInstallPathTranslations(); t << "pluginsdir=" << pkgConfigFixPath(pluginsDir) << endl;
if (translationsDir.isEmpty())
{
translationsDir = prefix + "/translations";
}
t << "prefix=" << prefix << endl
<< "exec_prefix=${prefix}" << endl
<< "libdir=" << pkgConfigFixPath(libDir) << endl
<< "includedir=" << pkgConfigFixPath(includeDir) << endl
// non-standard entry. Provides path for plugins
<< "pluginsdir=" << pkgConfigFixPath(pluginsDir) << endl
// non-standard entry. Provides path for translations
<< "translationsdir=" << pkgConfigFixPath(translationsDir) << endl
<< endl;
// non-standard entry. Provides useful info normally only // non-standard entry. Provides useful info normally only
// contained in the internal .qmake.cache file // contained in the internal .qmake.cache file
t << varGlue("CONFIG", "qt_config=", " ", "") << endl << endl; t << varGlue("CONFIG", "qt_config=", " ", "") << endl << endl;

@ -386,7 +386,7 @@ BorlandMakefileGenerator::init()
if(project->isEmpty("QMAKE_INSTALL_DIR")) if(project->isEmpty("QMAKE_INSTALL_DIR"))
project->variables()["QMAKE_INSTALL_DIR"].append("$(COPY_DIR)"); project->variables()["QMAKE_INSTALL_DIR"].append("$(COPY_DIR)");
bool is_qt = (project->first("TARGET") == "qt" QTDLL_POSTFIX || project->first("TARGET") == "qtmt" QTDLL_POSTFIX); bool is_qt = (project->first("TARGET") == "qt"QTDLL_POSTFIX || project->first("TARGET") == "qtmt"QTDLL_POSTFIX);
QStringList &configs = project->variables()["CONFIG"]; QStringList &configs = project->variables()["CONFIG"];
if (project->isActiveConfig("shared")) if (project->isActiveConfig("shared"))
project->variables()["DEFINES"].append("QT_DLL"); project->variables()["DEFINES"].append("QT_DLL");

@ -397,7 +397,7 @@ MingwMakefileGenerator::init()
if(project->isEmpty("QMAKE_INSTALL_DIR")) if(project->isEmpty("QMAKE_INSTALL_DIR"))
project->variables()["QMAKE_INSTALL_DIR"].append("$(COPY_DIR)"); project->variables()["QMAKE_INSTALL_DIR"].append("$(COPY_DIR)");
bool is_qt = (project->first("TARGET") == "qt" QTDLL_POSTFIX || project->first("TARGET") == "qt-mt" QTDLL_POSTFIX); bool is_qt = (project->first("TARGET") == "qt"QTDLL_POSTFIX || project->first("TARGET") == "qt-mt"QTDLL_POSTFIX);
project->variables()["QMAKE_ORIG_TARGET"] = project->variables()["TARGET"]; project->variables()["QMAKE_ORIG_TARGET"] = project->variables()["TARGET"];
// LIBS defined in Profile comes first for gcc // LIBS defined in Profile comes first for gcc

@ -623,7 +623,7 @@ DspMakefileGenerator::init()
if ( project->variables()["QMAKESPEC"].isEmpty() ) if ( project->variables()["QMAKESPEC"].isEmpty() )
project->variables()["QMAKESPEC"].append( getenv("QMAKESPEC") ); project->variables()["QMAKESPEC"].append( getenv("QMAKESPEC") );
bool is_qt = (project->first("TARGET") == "qt" QTDLL_POSTFIX || project->first("TARGET") == "qt-mt" QTDLL_POSTFIX); bool is_qt = (project->first("TARGET") == "qt"QTDLL_POSTFIX || project->first("TARGET") == "qt-mt"QTDLL_POSTFIX);
project->variables()["QMAKE_ORIG_TARGET"] = project->variables()["TARGET"]; project->variables()["QMAKE_ORIG_TARGET"] = project->variables()["TARGET"];
QStringList &configs = project->variables()["CONFIG"]; QStringList &configs = project->variables()["CONFIG"];

@ -482,7 +482,7 @@ NmakeMakefileGenerator::init()
if(project->isEmpty("QMAKE_INSTALL_DIR")) if(project->isEmpty("QMAKE_INSTALL_DIR"))
project->variables()["QMAKE_INSTALL_DIR"].append("$(COPY_DIR)"); project->variables()["QMAKE_INSTALL_DIR"].append("$(COPY_DIR)");
bool is_qt = (project->first("TARGET") == "qt" QTDLL_POSTFIX || project->first("TARGET") == "qt-mt" QTDLL_POSTFIX); bool is_qt = (project->first("TARGET") == "qt"QTDLL_POSTFIX || project->first("TARGET") == "qt-mt"QTDLL_POSTFIX);
project->variables()["QMAKE_ORIG_TARGET"] = project->variables()["TARGET"]; project->variables()["QMAKE_ORIG_TARGET"] = project->variables()["TARGET"];
QString targetfilename = project->variables()["TARGET"].first(); QString targetfilename = project->variables()["TARGET"].first();

@ -459,8 +459,8 @@ void VcprojGenerator::init()
// Are we building Qt? // Are we building Qt?
bool is_qt = bool is_qt =
( project->first("TARGET") == "qt" QTDLL_POSTFIX || ( project->first("TARGET") == "qt"QTDLL_POSTFIX ||
project->first("TARGET") == "qt-mt" QTDLL_POSTFIX ); project->first("TARGET") == "qt-mt"QTDLL_POSTFIX );
// Are we using Qt? // Are we using Qt?
bool isQtActive = project->isActiveConfig("qt"); bool isQtActive = project->isActiveConfig("qt");
@ -1097,8 +1097,8 @@ void VcprojGenerator::initOld()
project->variables()["QMAKESPEC"].append( getenv("QMAKESPEC") ); project->variables()["QMAKESPEC"].append( getenv("QMAKESPEC") );
bool is_qt = bool is_qt =
( project->first("TARGET") == "qt" QTDLL_POSTFIX || ( project->first("TARGET") == "qt"QTDLL_POSTFIX ||
project->first("TARGET") == "qt-mt" QTDLL_POSTFIX ); project->first("TARGET") == "qt-mt"QTDLL_POSTFIX );
QStringList &configs = project->variables()["CONFIG"]; QStringList &configs = project->variables()["CONFIG"];

@ -724,7 +724,7 @@ QMakeProject::isActiveConfig(const QString &x, bool regex, QMap<QString, QString
static char *buffer = NULL; static char *buffer = NULL;
if(!buffer) if(!buffer)
buffer = (char *)malloc(1024); buffer = (char *)malloc(1024);
int l = readlink(Option::mkfile::qmakespec, buffer, 1023); int l = readlink(Option::mkfile::qmakespec, buffer, 1024);
if(l != -1) { if(l != -1) {
buffer[l] = '\0'; buffer[l] = '\0';
QString r = buffer; QString r = buffer;

@ -861,7 +861,15 @@ EOF
int main (argc, argv) int argc; char *argv[]; { int main (argc, argv) int argc; char *argv[]; {
#endif #endif
#ifdef __ELF__ #ifdef __ELF__
printf ("%s-pc-linux-gnu\n", argv[1]); # ifdef __GLIBC__
# if __GLIBC__ >= 2
printf ("%s-pc-linux-gnu\n", argv[1]);
# else
printf ("%s-pc-linux-gnulibc1\n", argv[1]);
# endif
# else
printf ("%s-pc-linux-gnulibc1\n", argv[1]);
# endif
#else #else
printf ("%s-pc-linux-gnuaout\n", argv[1]); printf ("%s-pc-linux-gnuaout\n", argv[1]);
#endif #endif

@ -246,8 +246,30 @@
#endif #endif
#ifdef PNG_SETJMP_SUPPORTED #ifdef PNG_SETJMP_SUPPORTED
/* This is an attempt to force a single setjmp behaviour on Linux. If
* the X config stuff didn't define _BSD_SOURCE we wouldn't need this.
*/
# ifdef __linux__
# ifdef _BSD_SOURCE
# define PNG_SAVE_BSD_SOURCE
# undef _BSD_SOURCE
# endif
# ifdef _SETJMP_H
__png.h__ already includes setjmp.h;
__dont__ include it again.;
# endif
# endif /* __linux__ */
/* include setjmp.h for error handling */ /* include setjmp.h for error handling */
# include <setjmp.h> # include <setjmp.h>
# ifdef __linux__
# ifdef PNG_SAVE_BSD_SOURCE
# define _BSD_SOURCE
# undef PNG_SAVE_BSD_SOURCE
# endif
# endif /* __linux__ */
#endif /* PNG_SETJMP_SUPPORTED */ #endif /* PNG_SETJMP_SUPPORTED */
#ifdef BSD #ifdef BSD

@ -694,16 +694,16 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
else /* mmx _not supported - Use modified C routine */ else /* mmx _not supported - Use modified C routine */
#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ #endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
{ {
png_uint_32 i; register png_uint_32 i;
png_uint_32 initial_val = png_pass_start[png_ptr->pass]; png_uint_32 initial_val = png_pass_start[png_ptr->pass];
/* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */ /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */
int stride = png_pass_inc[png_ptr->pass]; register int stride = png_pass_inc[png_ptr->pass];
/* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */ /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */
int rep_bytes = png_pass_width[png_ptr->pass]; register int rep_bytes = png_pass_width[png_ptr->pass];
/* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */ /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */
png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */
int diff = (int) (png_ptr->width & 7); /* amount lost */ int diff = (int) (png_ptr->width & 7); /* amount lost */
png_uint_32 final_val = len; /* GRR bugfix */ register png_uint_32 final_val = len; /* GRR bugfix */
srcptr = png_ptr->row_buf + 1 + initial_val; srcptr = png_ptr->row_buf + 1 + initial_val;
dstptr = row + initial_val; dstptr = row + initial_val;
@ -848,16 +848,16 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
else /* mmx _not supported - Use modified C routine */ else /* mmx _not supported - Use modified C routine */
#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ #endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
{ {
png_uint_32 i; register png_uint_32 i;
png_uint_32 initial_val = BPP2 * png_pass_start[png_ptr->pass]; png_uint_32 initial_val = BPP2 * png_pass_start[png_ptr->pass];
/* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */ /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */
int stride = BPP2 * png_pass_inc[png_ptr->pass]; register int stride = BPP2 * png_pass_inc[png_ptr->pass];
/* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */ /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */
int rep_bytes = BPP2 * png_pass_width[png_ptr->pass]; register int rep_bytes = BPP2 * png_pass_width[png_ptr->pass];
/* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */ /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */
png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */
int diff = (int) (png_ptr->width & 7); /* amount lost */ int diff = (int) (png_ptr->width & 7); /* amount lost */
png_uint_32 final_val = BPP2 * len; /* GRR bugfix */ register png_uint_32 final_val = BPP2 * len; /* GRR bugfix */
srcptr = png_ptr->row_buf + 1 + initial_val; srcptr = png_ptr->row_buf + 1 + initial_val;
dstptr = row + initial_val; dstptr = row + initial_val;
@ -1016,16 +1016,16 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
else /* mmx _not supported - Use modified C routine */ else /* mmx _not supported - Use modified C routine */
#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ #endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
{ {
png_uint_32 i; register png_uint_32 i;
png_uint_32 initial_val = BPP3 * png_pass_start[png_ptr->pass]; png_uint_32 initial_val = BPP3 * png_pass_start[png_ptr->pass];
/* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */ /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */
int stride = BPP3 * png_pass_inc[png_ptr->pass]; register int stride = BPP3 * png_pass_inc[png_ptr->pass];
/* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */ /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */
int rep_bytes = BPP3 * png_pass_width[png_ptr->pass]; register int rep_bytes = BPP3 * png_pass_width[png_ptr->pass];
/* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */ /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */
png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */
int diff = (int) (png_ptr->width & 7); /* amount lost */ int diff = (int) (png_ptr->width & 7); /* amount lost */
png_uint_32 final_val = BPP3 * len; /* GRR bugfix */ register png_uint_32 final_val = BPP3 * len; /* GRR bugfix */
srcptr = png_ptr->row_buf + 1 + initial_val; srcptr = png_ptr->row_buf + 1 + initial_val;
dstptr = row + initial_val; dstptr = row + initial_val;
@ -1191,16 +1191,16 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
else /* mmx _not supported - Use modified C routine */ else /* mmx _not supported - Use modified C routine */
#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ #endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
{ {
png_uint_32 i; register png_uint_32 i;
png_uint_32 initial_val = BPP4 * png_pass_start[png_ptr->pass]; png_uint_32 initial_val = BPP4 * png_pass_start[png_ptr->pass];
/* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */ /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */
int stride = BPP4 * png_pass_inc[png_ptr->pass]; register int stride = BPP4 * png_pass_inc[png_ptr->pass];
/* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */ /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */
int rep_bytes = BPP4 * png_pass_width[png_ptr->pass]; register int rep_bytes = BPP4 * png_pass_width[png_ptr->pass];
/* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */ /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */
png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */
int diff = (int) (png_ptr->width & 7); /* amount lost */ int diff = (int) (png_ptr->width & 7); /* amount lost */
png_uint_32 final_val = BPP4 * len; /* GRR bugfix */ register png_uint_32 final_val = BPP4 * len; /* GRR bugfix */
srcptr = png_ptr->row_buf + 1 + initial_val; srcptr = png_ptr->row_buf + 1 + initial_val;
dstptr = row + initial_val; dstptr = row + initial_val;
@ -1383,16 +1383,16 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
else /* mmx _not supported - Use modified C routine */ else /* mmx _not supported - Use modified C routine */
#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ #endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
{ {
png_uint_32 i; register png_uint_32 i;
png_uint_32 initial_val = BPP6 * png_pass_start[png_ptr->pass]; png_uint_32 initial_val = BPP6 * png_pass_start[png_ptr->pass];
/* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */ /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */
int stride = BPP6 * png_pass_inc[png_ptr->pass]; register int stride = BPP6 * png_pass_inc[png_ptr->pass];
/* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */ /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */
int rep_bytes = BPP6 * png_pass_width[png_ptr->pass]; register int rep_bytes = BPP6 * png_pass_width[png_ptr->pass];
/* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */ /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */
png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */
int diff = (int) (png_ptr->width & 7); /* amount lost */ int diff = (int) (png_ptr->width & 7); /* amount lost */
png_uint_32 final_val = BPP6 * len; /* GRR bugfix */ register png_uint_32 final_val = BPP6 * len; /* GRR bugfix */
srcptr = png_ptr->row_buf + 1 + initial_val; srcptr = png_ptr->row_buf + 1 + initial_val;
dstptr = row + initial_val; dstptr = row + initial_val;
@ -1424,16 +1424,16 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
{ {
png_bytep srcptr; png_bytep srcptr;
png_bytep dstptr; png_bytep dstptr;
png_uint_32 i; register png_uint_32 i;
png_uint_32 initial_val = BPP8 * png_pass_start[png_ptr->pass]; png_uint_32 initial_val = BPP8 * png_pass_start[png_ptr->pass];
/* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */ /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */
int stride = BPP8 * png_pass_inc[png_ptr->pass]; register int stride = BPP8 * png_pass_inc[png_ptr->pass];
/* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */ /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */
int rep_bytes = BPP8 * png_pass_width[png_ptr->pass]; register int rep_bytes = BPP8 * png_pass_width[png_ptr->pass];
/* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */ /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */
png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */
int diff = (int) (png_ptr->width & 7); /* amount lost */ int diff = (int) (png_ptr->width & 7); /* amount lost */
png_uint_32 final_val = BPP8 * len; /* GRR bugfix */ register png_uint_32 final_val = BPP8 * len; /* GRR bugfix */
srcptr = png_ptr->row_buf + 1 + initial_val; srcptr = png_ptr->row_buf + 1 + initial_val;
dstptr = row + initial_val; dstptr = row + initial_val;

@ -375,10 +375,10 @@ end8:
} }
else /* mmx not supported - use modified C routine */ else /* mmx not supported - use modified C routine */
{ {
unsigned int incr1, initial_val, final_val; register unsigned int incr1, initial_val, final_val;
png_size_t pixel_bytes; png_size_t pixel_bytes;
png_uint_32 i; png_uint_32 i;
int disp = png_pass_inc[png_ptr->pass]; register int disp = png_pass_inc[png_ptr->pass];
int offset_table[7] = {0, 4, 0, 2, 0, 1, 0}; int offset_table[7] = {0, 4, 0, 2, 0, 1, 0};
pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); pixel_bytes = (png_ptr->row_info.pixel_depth >> 3);
@ -487,10 +487,10 @@ end16:
} }
else /* mmx not supported - use modified C routine */ else /* mmx not supported - use modified C routine */
{ {
unsigned int incr1, initial_val, final_val; register unsigned int incr1, initial_val, final_val;
png_size_t pixel_bytes; png_size_t pixel_bytes;
png_uint_32 i; png_uint_32 i;
int disp = png_pass_inc[png_ptr->pass]; register int disp = png_pass_inc[png_ptr->pass];
int offset_table[7] = {0, 4, 0, 2, 0, 1, 0}; int offset_table[7] = {0, 4, 0, 2, 0, 1, 0};
pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); pixel_bytes = (png_ptr->row_info.pixel_depth >> 3);
@ -618,10 +618,10 @@ end24:
} }
else /* mmx not supported - use modified C routine */ else /* mmx not supported - use modified C routine */
{ {
unsigned int incr1, initial_val, final_val; register unsigned int incr1, initial_val, final_val;
png_size_t pixel_bytes; png_size_t pixel_bytes;
png_uint_32 i; png_uint_32 i;
int disp = png_pass_inc[png_ptr->pass]; register int disp = png_pass_inc[png_ptr->pass];
int offset_table[7] = {0, 4, 0, 2, 0, 1, 0}; int offset_table[7] = {0, 4, 0, 2, 0, 1, 0};
pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); pixel_bytes = (png_ptr->row_info.pixel_depth >> 3);
@ -758,10 +758,10 @@ end32:
} }
else /* mmx _not supported - Use modified C routine */ else /* mmx _not supported - Use modified C routine */
{ {
unsigned int incr1, initial_val, final_val; register unsigned int incr1, initial_val, final_val;
png_size_t pixel_bytes; png_size_t pixel_bytes;
png_uint_32 i; png_uint_32 i;
int disp = png_pass_inc[png_ptr->pass]; register int disp = png_pass_inc[png_ptr->pass];
int offset_table[7] = {0, 4, 0, 2, 0, 1, 0}; int offset_table[7] = {0, 4, 0, 2, 0, 1, 0};
pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); pixel_bytes = (png_ptr->row_info.pixel_depth >> 3);
@ -916,10 +916,10 @@ end48:
} }
else /* mmx _not supported - Use modified C routine */ else /* mmx _not supported - Use modified C routine */
{ {
unsigned int incr1, initial_val, final_val; register unsigned int incr1, initial_val, final_val;
png_size_t pixel_bytes; png_size_t pixel_bytes;
png_uint_32 i; png_uint_32 i;
int disp = png_pass_inc[png_ptr->pass]; register int disp = png_pass_inc[png_ptr->pass];
int offset_table[7] = {0, 4, 0, 2, 0, 1, 0}; int offset_table[7] = {0, 4, 0, 2, 0, 1, 0};
pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); pixel_bytes = (png_ptr->row_info.pixel_depth >> 3);
@ -947,8 +947,8 @@ end48:
png_size_t pixel_bytes; png_size_t pixel_bytes;
int offset_table[7] = {0, 4, 0, 2, 0, 1, 0}; int offset_table[7] = {0, 4, 0, 2, 0, 1, 0};
unsigned int i; unsigned int i;
int disp = png_pass_inc[png_ptr->pass]; // get the offset register int disp = png_pass_inc[png_ptr->pass]; // get the offset
unsigned int incr1, initial_val, final_val; register unsigned int incr1, initial_val, final_val;
pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); pixel_bytes = (png_ptr->row_info.pixel_depth >> 3);
sptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]* sptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]*

@ -360,8 +360,8 @@ static int vxprintf(
} }
bufpt = &buf[etBUFSIZE-1]; bufpt = &buf[etBUFSIZE-1];
{ {
char *cset; /* Use registers for speed */ register char *cset; /* Use registers for speed */
int base; register int base;
cset = infop->charset; cset = infop->charset;
base = infop->base; base = infop->base;
do{ /* Convert to ascii */ do{ /* Convert to ascii */
@ -602,7 +602,7 @@ static int vxprintf(
** the output. ** the output.
*/ */
if( !flag_leftjustify ){ if( !flag_leftjustify ){
int nspace; register int nspace;
nspace = width-length; nspace = width-length;
if( nspace>0 ){ if( nspace>0 ){
count += nspace; count += nspace;
@ -618,7 +618,7 @@ static int vxprintf(
count += length; count += length;
} }
if( flag_leftjustify ){ if( flag_leftjustify ){
int nspace; register int nspace;
nspace = width-length; nspace = width-length;
if( nspace>0 ){ if( nspace>0 ){
count += nspace; count += nspace;

@ -500,14 +500,14 @@ int sqliteHashNoCase(const char *z, int n){
** there is no consistency, we will define our own. ** there is no consistency, we will define our own.
*/ */
int sqliteStrICmp(const char *zLeft, const char *zRight){ int sqliteStrICmp(const char *zLeft, const char *zRight){
unsigned char *a, *b; register unsigned char *a, *b;
a = (unsigned char *)zLeft; a = (unsigned char *)zLeft;
b = (unsigned char *)zRight; b = (unsigned char *)zRight;
while( *a!=0 && UpperToLower[*a]==UpperToLower[*b]){ a++; b++; } while( *a!=0 && UpperToLower[*a]==UpperToLower[*b]){ a++; b++; }
return *a - *b; return *a - *b;
} }
int sqliteStrNICmp(const char *zLeft, const char *zRight, int N){ int sqliteStrNICmp(const char *zLeft, const char *zRight, int N){
unsigned char *a, *b; register unsigned char *a, *b;
a = (unsigned char *)zLeft; a = (unsigned char *)zLeft;
b = (unsigned char *)zRight; b = (unsigned char *)zRight;
while( N-- > 0 && *a!=0 && UpperToLower[*a]==UpperToLower[*b]){ a++; b++; } while( N-- > 0 && *a!=0 && UpperToLower[*a]==UpperToLower[*b]){ a++; b++; }
@ -941,7 +941,7 @@ static int sqlite_utf8_to_int(const unsigned char *z){
*/ */
int int
sqliteGlobCompare(const unsigned char *zPattern, const unsigned char *zString){ sqliteGlobCompare(const unsigned char *zPattern, const unsigned char *zString){
int c; register int c;
int invert; int invert;
int seen; int seen;
int c2; int c2;
@ -1030,7 +1030,7 @@ sqliteGlobCompare(const unsigned char *zPattern, const unsigned char *zString){
*/ */
int int
sqliteLikeCompare(const unsigned char *zPattern, const unsigned char *zString){ sqliteLikeCompare(const unsigned char *zPattern, const unsigned char *zString){
int c; register int c;
int c2; int c2;
while( (c = UpperToLower[*zPattern])!=0 ){ while( (c = UpperToLower[*zPattern])!=0 ){

@ -260,8 +260,8 @@ local unsigned long crc32_little(crc, buf, len)
const unsigned char FAR *buf; const unsigned char FAR *buf;
unsigned len; unsigned len;
{ {
u4 c; register u4 c;
const u4 FAR *buf4; register const u4 FAR *buf4;
c = (u4)crc; c = (u4)crc;
c = ~c; c = ~c;
@ -300,8 +300,8 @@ local unsigned long crc32_big(crc, buf, len)
const unsigned char FAR *buf; const unsigned char FAR *buf;
unsigned len; unsigned len;
{ {
u4 c; register u4 c;
const u4 FAR *buf4; register const u4 FAR *buf4;
c = REV((u4)crc); c = REV((u4)crc);
c = ~c; c = ~c;

@ -862,9 +862,9 @@ local uInt longest_match(s, cur_match)
IPos cur_match; /* current match */ IPos cur_match; /* current match */
{ {
unsigned chain_length = s->max_chain_length;/* max hash chain length */ unsigned chain_length = s->max_chain_length;/* max hash chain length */
Bytef *scan = s->window + s->strstart; /* current string */ register Bytef *scan = s->window + s->strstart; /* current string */
Bytef *match; /* matched string */ register Bytef *match; /* matched string */
int len; /* length of current match */ register int len; /* length of current match */
int best_len = s->prev_length; /* best match length so far */ int best_len = s->prev_length; /* best match length so far */
int nice_match = s->nice_match; /* stop if match long enough */ int nice_match = s->nice_match; /* stop if match long enough */
IPos limit = s->strstart > (IPos)MAX_DIST(s) ? IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
@ -879,13 +879,13 @@ local uInt longest_match(s, cur_match)
/* Compare two bytes at a time. Note: this is not always beneficial. /* Compare two bytes at a time. Note: this is not always beneficial.
* Try with and without -DUNALIGNED_OK to check. * Try with and without -DUNALIGNED_OK to check.
*/ */
Bytef *strend = s->window + s->strstart + MAX_MATCH - 1; register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
ush scan_start = *(ushf*)scan; register ush scan_start = *(ushf*)scan;
ush scan_end = *(ushf*)(scan+best_len-1); register ush scan_end = *(ushf*)(scan+best_len-1);
#else #else
Bytef *strend = s->window + s->strstart + MAX_MATCH; register Bytef *strend = s->window + s->strstart + MAX_MATCH;
Byte scan_end1 = scan[best_len-1]; register Byte scan_end1 = scan[best_len-1];
Byte scan_end = scan[best_len]; register Byte scan_end = scan[best_len];
#endif #endif
/* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
@ -1004,10 +1004,10 @@ local uInt longest_match_fast(s, cur_match)
deflate_state *s; deflate_state *s;
IPos cur_match; /* current match */ IPos cur_match; /* current match */
{ {
Bytef *scan = s->window + s->strstart; /* current string */ register Bytef *scan = s->window + s->strstart; /* current string */
Bytef *match; /* matched string */ register Bytef *match; /* matched string */
int len; /* length of current match */ register int len; /* length of current match */
Bytef *strend = s->window + s->strstart + MAX_MATCH; register Bytef *strend = s->window + s->strstart + MAX_MATCH;
/* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
* It is easy to get rid of this optimization if necessary. * It is easy to get rid of this optimization if necessary.
@ -1094,8 +1094,8 @@ local void check_match(s, start, match, length)
local void fill_window(s) local void fill_window(s)
deflate_state *s; deflate_state *s;
{ {
unsigned n, m; register unsigned n, m;
Posf *p; register Posf *p;
unsigned more; /* Amount of free space at the end of the window. */ unsigned more; /* Amount of free space at the end of the window. */
uInt wsize = s->w_size; uInt wsize = s->w_size;

@ -1143,7 +1143,7 @@ local unsigned bi_reverse(code, len)
unsigned code; /* the value to invert */ unsigned code; /* the value to invert */
int len; /* its bit length */ int len; /* its bit length */
{ {
unsigned res = 0; register unsigned res = 0;
do { do {
res |= code & 1; res |= code & 1;
code >>= 1, res <<= 1; code >>= 1, res <<= 1;

@ -0,0 +1,25 @@
/****************************************************************************
**
** Compatibility file - should only be included by legacy code.
** It #includes the file which obsoletes this one.
**
** Copyright (C) 1998-2008 Trolltech ASA. All rights reserved.
** This file is part of the Qt GUI Toolkit.
**
** This file may be distributed under the terms of the Q Public License
** as defined by Trolltech ASA of Norway and appearing in the file
** LICENSE.QPL included in the packaging of this file.
**
** Licensees holding valid Qt Professional Edition licenses may use this
** file in accordance with the Qt Professional Edition License Agreement
** provided with the Qt Professional Edition.
**
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
** information about the Professional Edition licensing, or see
** http://www.trolltech.com/qpl/ for QPL licensing information.
**
*****************************************************************************/
#ifndef QPAINTD_H
#define QPAINTD_H
#include "qpaintdevice.h"
#endif

@ -0,0 +1,25 @@
/****************************************************************************
**
** Compatibility file - should only be included by legacy code.
** It #includes the file which obsoletes this one.
**
** Copyright (C) 1998-2008 Trolltech ASA. All rights reserved.
** This file is part of the Qt GUI Toolkit.
**
** This file may be distributed under the terms of the Q Public License
** as defined by Trolltech ASA of Norway and appearing in the file
** LICENSE.QPL included in the packaging of this file.
**
** Licensees holding valid Qt Professional Edition licenses may use this
** file in accordance with the Qt Professional Edition License Agreement
** provided with the Qt Professional Edition.
**
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
** information about the Professional Edition licensing, or see
** http://www.trolltech.com/qpl/ for QPL licensing information.
**
*****************************************************************************/
#ifndef QPAINTDC_H
#define QPAINTDC_H
#include "qpaintdevicedefs.h"
#endif

@ -603,7 +603,7 @@ void QMessageBox::init( int button0, int button1, int button2 )
"Linux, and all major commercial Unix variants." "Linux, and all major commercial Unix variants."
"<br>Qt is also available for embedded devices.</p>" "<br>Qt is also available for embedded devices.</p>"
"<p>Qt is a Trolltech product. " "<p>Qt is a Trolltech product. "
"See <tt>https://trinitydesktop.org/docs/qt3/</tt> " "See <tt>http://www.trolltech.com/qt/</tt> "
"for more information.</p>" "for more information.</p>"
).arg( QT_VERSION_STR ); ).arg( QT_VERSION_STR );
#endif #endif

@ -166,7 +166,7 @@ static QPixmap *get_qiv_buffer_pixmap( const QSize &s )
#ifndef QT_NO_DRAGANDDROP #ifndef QT_NO_DRAGANDDROP
class Q_EXPORT QIconDragData class QM_EXPORT_ICONVIEW QIconDragData
{ {
public: public:
QIconDragData(); QIconDragData();
@ -184,7 +184,7 @@ public:
bool operator==( const QIconDragData &i ) const; bool operator==( const QIconDragData &i ) const;
}; };
class Q_EXPORT QIconDragDataItem class QM_EXPORT_ICONVIEW QIconDragDataItem
{ {
public: public:
QIconDragDataItem() {} QIconDragDataItem() {}
@ -3872,11 +3872,11 @@ void QIconView::selectAll( bool select )
rr = rr.unite( item->rect() ); rr = rr.unite( item->rect() );
changed = TRUE; changed = TRUE;
} }
} else {
else { if ( FALSE != item->isSelected() ) {
if ( FALSE != item->isSelected() ) { item->setSelected( FALSE, TRUE );
item->setSelected( FALSE, TRUE ); changed = TRUE;
changed = TRUE; }
} }
} }
} }
@ -3906,16 +3906,8 @@ void QIconView::invertSelection()
bool b = signalsBlocked(); bool b = signalsBlocked();
blockSignals( TRUE ); blockSignals( TRUE );
QIconViewItem *item = d->firstItem; QIconViewItem *item = d->firstItem;
for ( ; item; item = item->next ) { for ( ; item; item = item->next )
if (item->isVisible()) { item->setSelected( !item->isSelected(), TRUE );
item->setSelected( !item->isSelected(), TRUE );
}
else {
if ( FALSE != item->isSelected() ) {
item->setSelected( FALSE, TRUE );
}
}
}
blockSignals( b ); blockSignals( b );
emit selectionChanged(); emit selectionChanged();
} }

@ -55,6 +55,12 @@
#ifndef QT_NO_ICONVIEW #ifndef QT_NO_ICONVIEW
#if !defined( QT_MODULE_ICONVIEW ) || defined( QT_INTERNAL_ICONVIEW )
#define QM_EXPORT_ICONVIEW
#else
#define QM_EXPORT_ICONVIEW Q_EXPORT
#endif
class QIconView; class QIconView;
class QPainter; class QPainter;
class QMimeSource; class QMimeSource;
@ -72,7 +78,7 @@ class QIconDragPrivate;
#ifndef QT_NO_DRAGANDDROP #ifndef QT_NO_DRAGANDDROP
class Q_EXPORT QIconDragItem class QM_EXPORT_ICONVIEW QIconDragItem
{ {
public: public:
QIconDragItem(); QIconDragItem();
@ -86,7 +92,7 @@ private:
}; };
class Q_EXPORT QIconDrag : public QDragObject class QM_EXPORT_ICONVIEW QIconDrag : public QDragObject
{ {
Q_OBJECT Q_OBJECT
public: public:
@ -116,7 +122,7 @@ private:
class QIconViewToolTip; class QIconViewToolTip;
class QIconViewItemPrivate; class QIconViewItemPrivate;
class Q_EXPORT QIconViewItem : public Qt class QM_EXPORT_ICONVIEW QIconViewItem : public Qt
{ {
friend class QIconView; friend class QIconView;
friend class QIconViewToolTip; friend class QIconViewToolTip;
@ -263,7 +269,7 @@ private:
class QIconViewPrivate; /* don't touch */ class QIconViewPrivate; /* don't touch */
class Q_EXPORT QIconView : public QScrollView class QM_EXPORT_ICONVIEW QIconView : public QScrollView
{ {
friend class QIconViewItem; friend class QIconViewItem;
friend class QIconViewPrivate; friend class QIconViewPrivate;

@ -0,0 +1,6 @@
# Qt iconview module
iconview {
HEADERS += $$ICONVIEW_H/qiconview.h
SOURCES += $$ICONVIEW_CPP/qiconview.cpp
}

@ -0,0 +1,49 @@
/****************************************************************************
**
** Various macros etc. to ease porting from Qt 1.x to 2.0. THIS FILE
** WILL CHANGE OR DISAPPEAR IN THE NEXT VERSION OF Qt.
**
** Created : 980824
**
** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved.
**
** This file is part of the kernel module of the Qt GUI Toolkit.
**
** This file may be used under the terms of the GNU General
** Public License versions 2.0 or 3.0 as published by the Free
** Software Foundation and appearing in the files LICENSE.GPL2
** and LICENSE.GPL3 included in the packaging of this file.
** Alternatively you may (at your option) use any later version
** of the GNU General Public License if such license has been
** publicly approved by Trolltech ASA (or its successors, if any)
** and the KDE Free Qt Foundation.
**
** Please review the following information to ensure GNU General
** Public Licensing requirements will be met:
** http://trolltech.com/products/qt/licenses/licensing/opensource/.
** If you are unsure which license is appropriate for your use, please
** review the following information:
** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
** or contact the sales department at sales@trolltech.com.
**
** This file may be used under the terms of the Q Public License as
** defined by Trolltech ASA and appearing in the file LICENSE.QPL
** included in the packaging of this file. Licensees holding valid Qt
** Commercial licenses may use this file in accordance with the Qt
** Commercial License Agreement provided with the Software.
**
** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
** herein.
**
**********************************************************************/
#ifndef Q1XCOMPATIBILITY_H
#define Q1XCOMPATIBILITY_H
#error "Compatibility with Qt 1.x is no longer guaranteed. Please"
#error "update your code (for example using qt20fix script). We"
#error "apologize for any inconvenience."
#endif // Q1XCOMPATIBILITY_H

@ -549,7 +549,7 @@ QAccelPrivate::~QAccelPrivate()
static QAccelItem *find_id( QAccelList &list, int id ) static QAccelItem *find_id( QAccelList &list, int id )
{ {
QAccelItem *item = list.first(); register QAccelItem *item = list.first();
while ( item && item->id != id ) while ( item && item->id != id )
item = list.next(); item = list.next();
return item; return item;
@ -557,7 +557,7 @@ static QAccelItem *find_id( QAccelList &list, int id )
static QAccelItem *find_key( QAccelList &list, const QKeySequence &key ) static QAccelItem *find_key( QAccelList &list, const QKeySequence &key )
{ {
QAccelItem *item = list.first(); register QAccelItem *item = list.first();
while ( item && !( item->key == key ) ) while ( item && !( item->key == key ) )
item = list.next(); item = list.next();
return item; return item;

@ -1421,7 +1421,7 @@ QStyle& QApplication::style()
if ( is_app_running && !is_app_closing && (*app_pal != app_pal_copy) ) { if ( is_app_running && !is_app_closing && (*app_pal != app_pal_copy) ) {
QEvent e( QEvent::ApplicationPaletteChange ); QEvent e( QEvent::ApplicationPaletteChange );
QWidgetIntDictIt it( *((QWidgetIntDict*)QWidget::mapper) ); QWidgetIntDictIt it( *((QWidgetIntDict*)QWidget::mapper) );
QWidget *w; register QWidget *w;
while ( (w=it.current()) ) { // for all widgets... while ( (w=it.current()) ) { // for all widgets...
++it; ++it;
sendEvent( w, &e ); sendEvent( w, &e );
@ -1467,7 +1467,7 @@ void QApplication::setStyle( QStyle *style )
if (old) { if (old) {
if ( is_app_running && !is_app_closing ) { if ( is_app_running && !is_app_closing ) {
QWidgetIntDictIt it( *((QWidgetIntDict*)QWidget::mapper) ); QWidgetIntDictIt it( *((QWidgetIntDict*)QWidget::mapper) );
QWidget *w; register QWidget *w;
while ( (w=it.current()) ) { // for all widgets... while ( (w=it.current()) ) { // for all widgets...
++it; ++it;
if ( !w->testWFlags(WType_Desktop) && // except desktop if ( !w->testWFlags(WType_Desktop) && // except desktop
@ -1494,7 +1494,7 @@ void QApplication::setStyle( QStyle *style )
if (old) { if (old) {
if ( is_app_running && !is_app_closing ) { if ( is_app_running && !is_app_closing ) {
QWidgetIntDictIt it( *((QWidgetIntDict*)QWidget::mapper) ); QWidgetIntDictIt it( *((QWidgetIntDict*)QWidget::mapper) );
QWidget *w; register QWidget *w;
while ( (w=it.current()) ) { // for all widgets... while ( (w=it.current()) ) { // for all widgets...
++it; ++it;
if ( !w->testWFlags(WType_Desktop) ) { // except desktop if ( !w->testWFlags(WType_Desktop) ) { // except desktop
@ -2080,7 +2080,7 @@ void QApplication::setPalette( const QPalette &palette, bool informWidgets,
if ( !oldpal || ( *oldpal != pal ) ) { if ( !oldpal || ( *oldpal != pal ) ) {
QEvent e( QEvent::ApplicationPaletteChange ); QEvent e( QEvent::ApplicationPaletteChange );
QWidgetIntDictIt it( *((QWidgetIntDict*)QWidget::mapper) ); QWidgetIntDictIt it( *((QWidgetIntDict*)QWidget::mapper) );
QWidget *w; register QWidget *w;
while ( (w=it.current()) ) { // for all widgets... while ( (w=it.current()) ) { // for all widgets...
++it; ++it;
if ( all || (!className && w->isTopLevel() ) || w->inherits(className) ) // matching class if ( all || (!className && w->isTopLevel() ) || w->inherits(className) ) // matching class
@ -2170,7 +2170,7 @@ void QApplication::setFont( const QFont &font, bool informWidgets,
if ( informWidgets && is_app_running && !is_app_closing ) { if ( informWidgets && is_app_running && !is_app_closing ) {
QEvent e( QEvent::ApplicationFontChange ); QEvent e( QEvent::ApplicationFontChange );
QWidgetIntDictIt it( *((QWidgetIntDict*)QWidget::mapper) ); QWidgetIntDictIt it( *((QWidgetIntDict*)QWidget::mapper) );
QWidget *w; register QWidget *w;
while ( (w=it.current()) ) { // for all widgets... while ( (w=it.current()) ) { // for all widgets...
++it; ++it;
if ( all || (!className && w->isTopLevel() ) || w->inherits(className) ) // matching class if ( all || (!className && w->isTopLevel() ) || w->inherits(className) ) // matching class
@ -2780,7 +2780,7 @@ bool QApplication::internalNotify( QObject *receiver, QEvent * e)
{ {
if ( eventFilters ) { if ( eventFilters ) {
QObjectListIt it( *eventFilters ); QObjectListIt it( *eventFilters );
QObject *obj; register QObject *obj;
while ( (obj=it.current()) != 0 ) { // send to all filters while ( (obj=it.current()) != 0 ) { // send to all filters
++it; // until one returns TRUE ++it; // until one returns TRUE
if ( obj->eventFilter(receiver,e) ) if ( obj->eventFilter(receiver,e) )

@ -44,6 +44,9 @@
// provide a proper alternative for others. See also the exports in // provide a proper alternative for others. See also the exports in
// qapplication_win.cpp which suggest a unification. // qapplication_win.cpp which suggest a unification.
// ### needed for solaris-g++ in beta5
#define QT_CLEAN_NAMESPACE
#include "qplatformdefs.h" #include "qplatformdefs.h"
// POSIX Large File Support redefines open -> open64 // POSIX Large File Support redefines open -> open64
@ -2894,7 +2897,7 @@ void QApplication::setOverrideCursor( const QCursor &cursor, bool replace )
cursorStack->append( app_cursor ); cursorStack->append( app_cursor );
QWidgetIntDictIt it( *((QWidgetIntDict*)QWidget::mapper) ); QWidgetIntDictIt it( *((QWidgetIntDict*)QWidget::mapper) );
QWidget *w; register QWidget *w;
while ( (w=it.current()) ) { // for all widgets that have while ( (w=it.current()) ) { // for all widgets that have
if ( w->testWState( WState_OwnCursor ) ) if ( w->testWState( WState_OwnCursor ) )
qt_x11_enforce_cursor( w ); qt_x11_enforce_cursor( w );
@ -2922,7 +2925,7 @@ void QApplication::restoreOverrideCursor()
app_cursor = cursorStack->last(); app_cursor = cursorStack->last();
if ( QWidget::mapper != 0 && !closingDown() ) { if ( QWidget::mapper != 0 && !closingDown() ) {
QWidgetIntDictIt it( *((QWidgetIntDict*)QWidget::mapper) ); QWidgetIntDictIt it( *((QWidgetIntDict*)QWidget::mapper) );
QWidget *w; register QWidget *w;
while ( (w=it.current()) ) { // set back to original cursors while ( (w=it.current()) ) { // set back to original cursors
if ( w->testWState( WState_OwnCursor ) ) if ( w->testWState( WState_OwnCursor ) )
qt_x11_enforce_cursor( w ); qt_x11_enforce_cursor( w );
@ -2986,7 +2989,7 @@ void QApplication::setGlobalMouseTracking( bool enable )
} }
if ( tellAllWidgets ) { if ( tellAllWidgets ) {
QWidgetIntDictIt it( *((QWidgetIntDict*)QWidget::mapper) ); QWidgetIntDictIt it( *((QWidgetIntDict*)QWidget::mapper) );
QWidget *w; register QWidget *w;
while ( (w=it.current()) ) { while ( (w=it.current()) ) {
if ( app_tracking > 0 ) { // switch on if ( app_tracking > 0 ) { // switch on
if ( !w->testWState(WState_MouseTracking) ) { if ( !w->testWState(WState_MouseTracking) ) {
@ -4818,11 +4821,6 @@ bool QETWidget::translatePropertyEvent(const XEvent *event)
#define XF86XK_LaunchD 0x1008FF4D #define XF86XK_LaunchD 0x1008FF4D
#define XF86XK_LaunchE 0x1008FF4E #define XF86XK_LaunchE 0x1008FF4E
#define XF86XK_LaunchF 0x1008FF4F #define XF86XK_LaunchF 0x1008FF4F
#define XF86XK_MonBrightnessUp 0x1008FF02 /* Monitor/panel brightness */
#define XF86XK_MonBrightnessDown 0x1008FF03 /* Monitor/panel brightness */
#define XF86XK_KbdLightOnOff 0x1008FF04 /* Keyboards may be lit */
#define XF86XK_KbdBrightnessUp 0x1008FF05 /* Keyboards may be lit */
#define XF86XK_KbdBrightnessDown 0x1008FF06 /* Keyboards may be lit */
// end of XF86keysyms.h // end of XF86keysyms.h
@ -5021,11 +5019,6 @@ static const KeySym KeyTbl[] = { // keyboard mapping table
XF86XK_LaunchB, Qt::Key_LaunchD, XF86XK_LaunchB, Qt::Key_LaunchD,
XF86XK_LaunchC, Qt::Key_LaunchE, XF86XK_LaunchC, Qt::Key_LaunchE,
XF86XK_LaunchD, Qt::Key_LaunchF, XF86XK_LaunchD, Qt::Key_LaunchF,
XF86XK_MonBrightnessUp, Qt::Key_MonBrightnessUp,
XF86XK_MonBrightnessDown, Qt::Key_MonBrightnessDown,
XF86XK_KbdLightOnOff, Qt::Key_KeyboardLightOnOff,
XF86XK_KbdBrightnessUp, Qt::Key_KeyboardBrightnessUp,
XF86XK_KbdBrightnessDown, Qt::Key_KeyboardBrightnessDown,
0, 0 0, 0
}; };

@ -964,12 +964,9 @@ int QGIFFormat::decode(QImage& img, QImageConsumer* consumer,
if (backingstore.width() < w if (backingstore.width() < w
|| backingstore.height() < h) { || backingstore.height() < h) {
// We just use the backing store as a byte array // We just use the backing store as a byte array
if(!backingstore.create( QMAX(backingstore.width(), w), backingstore.create( QMAX(backingstore.width(), w),
QMAX(backingstore.height(), h), QMAX(backingstore.height(), h),
32)) { 32);
state = Error;
return -1;
}
memset( img.bits(), 0, img.numBytes() ); memset( img.bits(), 0, img.numBytes() );
} }
for (int ln=0; ln<h; ln++) { for (int ln=0; ln<h; ln++) {

@ -122,6 +122,19 @@ private:
}; };
#if !defined(QT_CLEAN_NAMESPACE)
// CursorShape is defined in X11/X.h
#ifdef CursorShape
#define X_CursorShape CursorShape
#undef CursorShape
#endif
typedef Qt::CursorShape QCursorShape;
#ifdef X_CursorShape
#define CursorShape X_CursorShape
#endif
#endif
/***************************************************************************** /*****************************************************************************
QCursor stream functions QCursor stream functions
*****************************************************************************/ *****************************************************************************/

@ -502,7 +502,7 @@ void QCursor::update() const
{ {
if ( !initialized ) if ( !initialized )
initialize(); initialize();
QCursorData *d = data; // cheat const! register QCursorData *d = data; // cheat const!
if ( d->hcurs ) // already loaded if ( d->hcurs ) // already loaded
return; return;

@ -1140,11 +1140,6 @@ Qt::ButtonState QKeyEvent::stateAfter() const
\value Key_LaunchD \value Key_LaunchD
\value Key_LaunchE \value Key_LaunchE
\value Key_LaunchF \value Key_LaunchF
\value Key_MonBrightnessUp
\value Key_MonBrightnessDown
\value Key_KeyboardLightOnOff
\value Key_KeyboardBrightnessUp
\value Key_KeyboardBrightnessDown
\value Key_MediaLast \value Key_MediaLast

@ -211,7 +211,7 @@ static inline void getTime( timeval &t ) // get time of day
static void repairTimer( const timeval &time ) // repair broken timer static void repairTimer( const timeval &time ) // repair broken timer
{ {
timeval diff = watchtime - time; timeval diff = watchtime - time;
TimerInfo *t = timerList->first(); register TimerInfo *t = timerList->first();
while ( t ) { // repair all timers while ( t ) { // repair all timers
t->timeout = t->timeout - diff; t->timeout = t->timeout - diff;
t = timerList->next(); t = timerList->next();
@ -308,7 +308,7 @@ int qStartTimer( int interval, QObject *obj )
bool qKillTimer( int id ) bool qKillTimer( int id )
{ {
TimerInfo *t; register TimerInfo *t;
if ( !timerList || id <= 0 || if ( !timerList || id <= 0 ||
id > (int)timerBitVec->size() || !timerBitVec->testBit( id-1 ) ) id > (int)timerBitVec->size() || !timerBitVec->testBit( id-1 ) )
return FALSE; // not init'd or invalid timer return FALSE; // not init'd or invalid timer
@ -325,7 +325,7 @@ bool qKillTimer( int id )
bool qKillTimer( QObject *obj ) bool qKillTimer( QObject *obj )
{ {
TimerInfo *t; register TimerInfo *t;
if ( !timerList ) // not initialized if ( !timerList ) // not initialized
return FALSE; return FALSE;
t = timerList->first(); t = timerList->first();
@ -530,7 +530,7 @@ int QEventLoop::activateTimers()
timeval currentTime; timeval currentTime;
int n_act = 0, maxCount = timerList->count(); int n_act = 0, maxCount = timerList->count();
TimerInfo *begin = 0; TimerInfo *begin = 0;
TimerInfo *t; register TimerInfo *t;
for ( ;; ) { for ( ;; ) {
if ( ! maxCount-- ) if ( ! maxCount-- )

@ -239,7 +239,7 @@ static void repairTimer( const timeval &time ) // repair broken timer
qt_timerListMutex->lock(); qt_timerListMutex->lock();
#endif #endif
timeval diff = watchtime - time; timeval diff = watchtime - time;
TimerInfo *t = timerList->first(); register TimerInfo *t = timerList->first();
while ( t ) { // repair all timers while ( t ) { // repair all timers
t->timeout = t->timeout - diff; t->timeout = t->timeout - diff;
t = timerList->next(); t = timerList->next();
@ -374,7 +374,7 @@ bool qKillTimer( int id )
#if defined(QT_THREAD_SUPPORT) #if defined(QT_THREAD_SUPPORT)
if (qt_timerListMutex) qt_timerListMutex->lock(); if (qt_timerListMutex) qt_timerListMutex->lock();
#endif #endif
TimerInfo *t; register TimerInfo *t;
if ( (!timerList) || (id <= 0) || (id > (int)timerBitVec->size()) || (!timerBitVec->testBit( id-1 )) ) { if ( (!timerList) || (id <= 0) || (id > (int)timerBitVec->size()) || (!timerBitVec->testBit( id-1 )) ) {
#if defined(QT_THREAD_SUPPORT) #if defined(QT_THREAD_SUPPORT)
if (qt_timerListMutex) qt_timerListMutex->unlock(); if (qt_timerListMutex) qt_timerListMutex->unlock();
@ -407,7 +407,7 @@ bool qKillTimer( QObject *obj )
#if defined(QT_THREAD_SUPPORT) #if defined(QT_THREAD_SUPPORT)
if (qt_timerListMutex) qt_timerListMutex->lock(); if (qt_timerListMutex) qt_timerListMutex->lock();
#endif #endif
TimerInfo *t; register TimerInfo *t;
if ( !timerList ) { // not initialized if ( !timerList ) { // not initialized
#if defined(QT_THREAD_SUPPORT) #if defined(QT_THREAD_SUPPORT)
if (qt_timerListMutex) qt_timerListMutex->unlock(); if (qt_timerListMutex) qt_timerListMutex->unlock();
@ -645,7 +645,7 @@ int QEventLoop::activateTimers()
timeval currentTime; timeval currentTime;
int n_act = 0, maxCount = timerList->count(); int n_act = 0, maxCount = timerList->count();
TimerInfo *begin = 0; TimerInfo *begin = 0;
TimerInfo *t; register TimerInfo *t;
for ( ;; ) { for ( ;; ) {
if ( ! maxCount-- ) { if ( ! maxCount-- ) {

@ -75,7 +75,7 @@ Q_EXPORT bool qt_has_xft = FALSE;
Qt::HANDLE qt_xft_handle(const QFont &font) Qt::HANDLE qt_xft_handle(const QFont &font)
{ {
QFontEngine *engine = font.d->engineForScript( QFontPrivate::defaultScript ); QFontEngine *engine = font.d->engineForScript( QFontPrivate::defaultScript );
if (engine->type() != QFontEngine::Xft) if (!engine->type() == QFontEngine::Xft)
return 0; return 0;
return (long)static_cast<QFontEngineXft *>(engine)->font(); return (long)static_cast<QFontEngineXft *>(engine)->font();
} }

@ -81,10 +81,10 @@
#ifndef Q_PLUGIN_VERIFICATION_DATA #ifndef Q_PLUGIN_VERIFICATION_DATA
# define Q_PLUGIN_VERIFICATION_DATA \ # define Q_PLUGIN_VERIFICATION_DATA \
static const char *qt_ucm_verification_data = \ static const char *qt_ucm_verification_data = \
"pattern=" "QT_UCM_VERIFICATION_DATA" "\n" \ "pattern=""QT_UCM_VERIFICATION_DATA""\n" \
"version=" QT_VERSION_STR "\n" \ "version="QT_VERSION_STR"\n" \
"flags=" Q_PLUGIN_FLAGS_STRING "\n" \ "flags="Q_PLUGIN_FLAGS_STRING"\n" \
"buildkey=" QT_BUILD_KEY "\0"; "buildkey="QT_BUILD_KEY"\0";
#endif // Q_PLUGIN_VERIFICATION_DATA #endif // Q_PLUGIN_VERIFICATION_DATA
#define Q_PLUGIN_INSTANTIATE( IMPLEMENTATION ) \ #define Q_PLUGIN_INSTANTIATE( IMPLEMENTATION ) \

@ -1392,7 +1392,7 @@ struct QRgbMap {
static bool convert_32_to_8( const QImage *src, QImage *dst, int conversion_flags, QRgb* palette=0, int palette_count=0 ) static bool convert_32_to_8( const QImage *src, QImage *dst, int conversion_flags, QRgb* palette=0, int palette_count=0 )
{ {
QRgb *p; register QRgb *p;
uchar *b; uchar *b;
bool do_quant = FALSE; bool do_quant = FALSE;
int y, x; int y, x;
@ -1702,7 +1702,7 @@ static bool convert_8_to_32( const QImage *src, QImage *dst )
return FALSE; // create failed return FALSE; // create failed
dst->setAlphaBuffer( src->hasAlphaBuffer() ); dst->setAlphaBuffer( src->hasAlphaBuffer() );
for ( int y=0; y<dst->height(); y++ ) { // for each scan line... for ( int y=0; y<dst->height(); y++ ) { // for each scan line...
uint *p = (uint *)dst->scanLine(y); register uint *p = (uint *)dst->scanLine(y);
uchar *b = src->scanLine(y); uchar *b = src->scanLine(y);
uint *end = p + dst->width(); uint *end = p + dst->width();
while ( p < end ) while ( p < end )
@ -1718,7 +1718,7 @@ static bool convert_1_to_32( const QImage *src, QImage *dst )
return FALSE; // could not create return FALSE; // could not create
dst->setAlphaBuffer( src->hasAlphaBuffer() ); dst->setAlphaBuffer( src->hasAlphaBuffer() );
for ( int y=0; y<dst->height(); y++ ) { // for each scan line... for ( int y=0; y<dst->height(); y++ ) { // for each scan line...
uint *p = (uint *)dst->scanLine(y); register uint *p = (uint *)dst->scanLine(y);
uchar *b = src->scanLine(y); uchar *b = src->scanLine(y);
int x; int x;
if ( src->bitOrder() == QImage::BigEndian ) { if ( src->bitOrder() == QImage::BigEndian ) {
@ -1756,7 +1756,7 @@ static bool convert_1_to_8( const QImage *src, QImage *dst )
dst->setColor( 1, 0xff000000 ); dst->setColor( 1, 0xff000000 );
} }
for ( int y=0; y<dst->height(); y++ ) { // for each scan line... for ( int y=0; y<dst->height(); y++ ) { // for each scan line...
uchar *p = dst->scanLine(y); register uchar *p = dst->scanLine(y);
uchar *b = src->scanLine(y); uchar *b = src->scanLine(y);
int x; int x;
if ( src->bitOrder() == QImage::BigEndian ) { if ( src->bitOrder() == QImage::BigEndian ) {
@ -1833,7 +1833,7 @@ static bool dither_to_1( const QImage *src, QImage *dst,
int bmwidth = (w+7)/8; int bmwidth = (w+7)/8;
if ( !(line1 && line2) ) if ( !(line1 && line2) )
return FALSE; return FALSE;
uchar *p; register uchar *p;
uchar *end; uchar *end;
int *b1, *b2; int *b1, *b2;
int wbytes = w * (d/8); int wbytes = w * (d/8);
@ -2083,7 +2083,7 @@ static bool convert_16_to_32( const QImage *src, QImage *dst )
return FALSE; // create failed return FALSE; // create failed
dst->setAlphaBuffer( src->hasAlphaBuffer() ); dst->setAlphaBuffer( src->hasAlphaBuffer() );
for ( int y=0; y<dst->height(); y++ ) { // for each scan line... for ( int y=0; y<dst->height(); y++ ) { // for each scan line...
uint *p = (uint *)dst->scanLine(y); register uint *p = (uint *)dst->scanLine(y);
ushort *s = (ushort*)src->scanLine(y); ushort *s = (ushort*)src->scanLine(y);
uint *end = p + dst->width(); uint *end = p + dst->width();
while ( p < end ) while ( p < end )
@ -2099,7 +2099,7 @@ static bool convert_32_to_16( const QImage *src, QImage *dst )
return FALSE; // create failed return FALSE; // create failed
dst->setAlphaBuffer( src->hasAlphaBuffer() ); dst->setAlphaBuffer( src->hasAlphaBuffer() );
for ( int y=0; y<dst->height(); y++ ) { // for each scan line... for ( int y=0; y<dst->height(); y++ ) { // for each scan line...
ushort *p = (ushort *)dst->scanLine(y); register ushort *p = (ushort *)dst->scanLine(y);
uint *s = (uint*)src->scanLine(y); uint *s = (uint*)src->scanLine(y);
ushort *end = p + dst->width(); ushort *end = p + dst->width();
while ( p < end ) while ( p < end )
@ -2363,7 +2363,7 @@ QImage QImage::convertBitOrder( Endian bitOrder ) const
int bpl = (width() + 7) / 8; int bpl = (width() + 7) / 8;
for ( int y = 0; y < data->h; y++ ) { for ( int y = 0; y < data->h; y++ ) {
uchar *p = jumpTable()[y]; register uchar *p = jumpTable()[y];
uchar *end = p + bpl; uchar *end = p + bpl;
uchar *b = image.jumpTable()[y]; uchar *b = image.jumpTable()[y];
while ( p < end ) while ( p < end )
@ -2454,14 +2454,14 @@ void pnmscale(const QImage& src, QImage& dst)
{ {
QRgb* xelrow = 0; QRgb* xelrow = 0;
QRgb* tempxelrow = 0; QRgb* tempxelrow = 0;
QRgb* xP; register QRgb* xP;
QRgb* nxP; register QRgb* nxP;
int rows, cols, rowsread, newrows, newcols; int rows, cols, rowsread, newrows, newcols;
int row, col, needtoreadrow; register int row, col, needtoreadrow;
const uchar maxval = 255; const uchar maxval = 255;
double xscale, yscale; double xscale, yscale;
long sxscale, syscale; long sxscale, syscale;
long fracrowtofill, fracrowleft; register long fracrowtofill, fracrowleft;
long* as; long* as;
long* rs; long* rs;
long* gs; long* gs;
@ -2551,11 +2551,11 @@ void pnmscale(const QImage& src, QImage& dst)
xelrow = (QRgb*)src.scanLine(rowsread++); xelrow = (QRgb*)src.scanLine(rowsread++);
needtoreadrow = 0; needtoreadrow = 0;
} }
long a=0; register long a=0;
for ( col = 0, xP = xelrow, nxP = tempxelrow; for ( col = 0, xP = xelrow, nxP = tempxelrow;
col < cols; ++col, ++xP, ++nxP ) col < cols; ++col, ++xP, ++nxP )
{ {
long r, g, b; register long r, g, b;
if ( as ) { if ( as ) {
r = rs[col] + fracrowtofill * qRed( *xP ) * qAlpha( *xP ) / 255; r = rs[col] + fracrowtofill * qRed( *xP ) * qAlpha( *xP ) / 255;
@ -2601,9 +2601,9 @@ void pnmscale(const QImage& src, QImage& dst)
/* shortcut X scaling if possible */ /* shortcut X scaling if possible */
memcpy(dst.scanLine(rowswritten++), tempxelrow, newcols*4); memcpy(dst.scanLine(rowswritten++), tempxelrow, newcols*4);
} else { } else {
long a, r, g, b; register long a, r, g, b;
long fraccoltofill, fraccolleft = 0; register long fraccoltofill, fraccolleft = 0;
int needcol; register int needcol;
nxP = (QRgb*)dst.scanLine(rowswritten++); nxP = (QRgb*)dst.scanLine(rowswritten++);
fraccoltofill = SCALE; fraccoltofill = SCALE;
@ -3692,7 +3692,7 @@ static void swapPixel01( QImage *image ) // 1-bpp: swap 0 and 1 pixels
{ {
int i; int i;
if ( image->depth() == 1 && image->numColors() == 2 ) { if ( image->depth() == 1 && image->numColors() == 2 ) {
uint *p = (uint *)image->bits(); register uint *p = (uint *)image->bits();
int nbytes = image->numBytes(); int nbytes = image->numBytes();
for ( i=0; i<nbytes/4; i++ ) { for ( i=0; i<nbytes/4; i++ ) {
*p = ~*p; *p = ~*p;
@ -3942,7 +3942,7 @@ static QImageHandler *get_image_handler( const char *format )
{ // get pointer to handler { // get pointer to handler
qt_init_image_handlers(); qt_init_image_handlers();
qt_init_image_plugins(); qt_init_image_plugins();
QImageHandler *p = imageHandlers->first(); register QImageHandler *p = imageHandlers->first();
while ( p ) { // traverse list while ( p ) { // traverse list
if ( p->format == format ) if ( p->format == format )
return p; return p;
@ -4667,8 +4667,6 @@ bool read_dib( QDataStream& s, int offset, int startpos, QImage& image )
if ( !(comp == BMP_RGB || (nbits == 4 && comp == BMP_RLE4) || if ( !(comp == BMP_RGB || (nbits == 4 && comp == BMP_RLE4) ||
(nbits == 8 && comp == BMP_RLE8) || ((nbits == 16 || nbits == 32) && comp == BMP_BITFIELDS)) ) (nbits == 8 && comp == BMP_RLE8) || ((nbits == 16 || nbits == 32) && comp == BMP_BITFIELDS)) )
return FALSE; // weird compression type return FALSE; // weird compression type
if ((w < 0) || ((w * abs(h)) > (16384 * 16384)))
return FALSE;
int ncols; int ncols;
int depth; int depth;
@ -4776,7 +4774,7 @@ bool read_dib( QDataStream& s, int offset, int startpos, QImage& image )
Q_CHECK_PTR( buf ); Q_CHECK_PTR( buf );
if ( comp == BMP_RLE4 ) { // run length compression if ( comp == BMP_RLE4 ) { // run length compression
int x=0, y=0, b, c, i; int x=0, y=0, b, c, i;
uchar *p = line[h-1]; register uchar *p = line[h-1];
uchar *endp = line[h-1]+w; uchar *endp = line[h-1]+w;
while ( y < h ) { while ( y < h ) {
if ( (b=d->getch()) == EOF ) if ( (b=d->getch()) == EOF )
@ -4841,7 +4839,7 @@ bool read_dib( QDataStream& s, int offset, int startpos, QImage& image )
while ( --h >= 0 ) { while ( --h >= 0 ) {
if ( d->readBlock((char*)buf,buflen) != buflen ) if ( d->readBlock((char*)buf,buflen) != buflen )
break; break;
uchar *p = line[h]; register uchar *p = line[h];
uchar *b = buf; uchar *b = buf;
for ( int i=0; i<w/2; i++ ) { // convert nibbles to bytes for ( int i=0; i<w/2; i++ ) { // convert nibbles to bytes
*p++ = *b >> 4; *p++ = *b >> 4;
@ -4857,7 +4855,7 @@ bool read_dib( QDataStream& s, int offset, int startpos, QImage& image )
else if ( nbits == 8 ) { // 8 bit BMP image else if ( nbits == 8 ) { // 8 bit BMP image
if ( comp == BMP_RLE8 ) { // run length compression if ( comp == BMP_RLE8 ) { // run length compression
int x=0, y=0, b; int x=0, y=0, b;
uchar *p = line[h-1]; register uchar *p = line[h-1];
const uchar *endp = line[h-1]+w; const uchar *endp = line[h-1]+w;
while ( y < h ) { while ( y < h ) {
if ( (b=d->getch()) == EOF ) if ( (b=d->getch()) == EOF )
@ -4920,7 +4918,7 @@ bool read_dib( QDataStream& s, int offset, int startpos, QImage& image )
} }
else if ( nbits == 16 || nbits == 24 || nbits == 32 ) { // 16,24,32 bit BMP image else if ( nbits == 16 || nbits == 24 || nbits == 32 ) { // 16,24,32 bit BMP image
QRgb *p; register QRgb *p;
QRgb *end; QRgb *end;
uchar *buf24 = new uchar[bpl]; uchar *buf24 = new uchar[bpl];
int bpl24 = ((w*nbits+31)/32)*4; int bpl24 = ((w*nbits+31)/32)*4;
@ -5051,7 +5049,7 @@ bool qt_write_dib( QDataStream& s, QImage image )
uchar *buf = new uchar[bpl_bmp]; uchar *buf = new uchar[bpl_bmp];
uchar *b, *end; uchar *b, *end;
uchar *p; register uchar *p;
memset( buf, 0, bpl_bmp ); memset( buf, 0, bpl_bmp );
for ( y=image.height()-1; y>=0; y-- ) { // write the image bits for ( y=image.height()-1; y>=0; y-- ) { // write the image bits
@ -5196,7 +5194,7 @@ static void read_pbm_image( QImageIO *iio ) // read PBM image data
mcc = 1; // ignore max color component mcc = 1; // ignore max color component
else else
mcc = read_pbm_int( d ); // get max color component mcc = read_pbm_int( d ); // get max color component
if ( w <= 0 || w > 32767 || h <= 0 || h > 32767 || mcc <= 0 || mcc > 0xffff ) if ( w <= 0 || w > 32767 || h <= 0 || h > 32767 || mcc <= 0 )
return; // weird P.M image return; // weird P.M image
int maxc = mcc; int maxc = mcc;
@ -5237,7 +5235,7 @@ static void read_pbm_image( QImageIO *iio ) // read PBM image data
} }
} }
} else { // read ascii data } else { // read ascii data
uchar *p; register uchar *p;
int n; int n;
for ( y=0; y<h; y++ ) { for ( y=0; y<h; y++ ) {
p = image.scanLine( y ); p = image.scanLine( y );
@ -5503,7 +5501,7 @@ static void read_async_image( QImageIO *iio )
X bitmap image read/write functions X bitmap image read/write functions
*****************************************************************************/ *****************************************************************************/
static inline int hex2byte( char *p ) static inline int hex2byte( register char *p )
{ {
return ( (isdigit((uchar) *p) ? *p - '0' : toupper((uchar) *p) - 'A' + 10) << 4 ) | return ( (isdigit((uchar) *p) ? *p - '0' : toupper((uchar) *p) - 'A' + 10) << 4 ) |
( isdigit((uchar) *(p+1)) ? *(p+1) - '0' : toupper((uchar) *(p+1)) - 'A' + 10 ); ( isdigit((uchar) *(p+1)) ? *(p+1) - '0' : toupper((uchar) *(p+1)) - 'A' + 10 );
@ -5512,32 +5510,18 @@ static inline int hex2byte( char *p )
static void read_xbm_image( QImageIO *iio ) static void read_xbm_image( QImageIO *iio )
{ {
const int buflen = 300; const int buflen = 300;
const int maxlen = 4096;
char buf[buflen]; char buf[buflen];
QRegExp r1, r2; QRegExp r1, r2;
QIODevice *d = iio->ioDevice(); QIODevice *d = iio->ioDevice();
int w=-1, h=-1; int w=-1, h=-1;
QImage image; QImage image;
Q_INT64 readBytes = 0;
Q_INT64 totalReadBytes = 0;
r1 = QString::fromLatin1("^#define[ \t]+[a-zA-Z0-9._]+[ \t]+"); r1 = QString::fromLatin1("^#define[ \t]+[a-zA-Z0-9._]+[ \t]+");
r2 = QString::fromLatin1("[0-9]+"); r2 = QString::fromLatin1("[0-9]+");
d->readLine( buf, buflen ); // "#define .._width <num>"
buf[0] = '\0'; while (!d->atEnd() && buf[0] != '#') //skip leading comment, if any
while (buf[0] != '#') { //skip leading comment, if any d->readLine( buf, buflen );
readBytes = d->readLine(buf, buflen);
// if readBytes >= buflen, it's very probably not a C file
if ((readBytes <= 0) || (readBytes >= (buflen-1)))
return;
// limit xbm headers to the first 4k in the file to prevent
// excessive reads on non-xbm files
totalReadBytes += readBytes;
if (totalReadBytes >= maxlen)
return;
}
QString sbuf; QString sbuf;
sbuf = QString::fromLatin1(buf); sbuf = QString::fromLatin1(buf);
@ -5546,10 +5530,7 @@ static void read_xbm_image( QImageIO *iio )
r2.search(sbuf, r1.matchedLength()) == r1.matchedLength() ) r2.search(sbuf, r1.matchedLength()) == r1.matchedLength() )
w = atoi( &buf[r1.matchedLength()] ); w = atoi( &buf[r1.matchedLength()] );
readBytes = d->readLine(buf, buflen ); // "#define .._height <num>" d->readLine( buf, buflen ); // "#define .._height <num>"
if (readBytes <= 0) {
return;
}
sbuf = QString::fromLatin1(buf); sbuf = QString::fromLatin1(buf);
if ( r1.search(sbuf) == 0 && if ( r1.search(sbuf) == 0 &&
@ -5560,11 +5541,8 @@ static void read_xbm_image( QImageIO *iio )
return; // format error return; // format error
for ( ;; ) { // scan for data for ( ;; ) { // scan for data
readBytes = d->readLine(buf, buflen); if ( d->readLine(buf, buflen) <= 0 ) // end of file
if (readBytes <= 0) { // end of file
return; return;
}
buf[readBytes] = '\0';
if ( strstr(buf,"0x") != 0 ) // does line contain data? if ( strstr(buf,"0x") != 0 ) // does line contain data?
break; break;
} }
@ -5582,10 +5560,7 @@ static void read_xbm_image( QImageIO *iio )
w = (w+7)/8; // byte width w = (w+7)/8; // byte width
while ( y < h ) { // for all encoded bytes... while ( y < h ) { // for all encoded bytes...
if (p && (p < (buf + readBytes - 3))) { // p = "0x.." if ( p ) { // p = "0x.."
if (!isxdigit(p[2]) || !isxdigit(p[3])) {
return;
}
*b++ = hex2byte(p+2); *b++ = hex2byte(p+2);
p += 2; p += 2;
if ( ++x == w && ++y < h ) { if ( ++x == w && ++y < h ) {
@ -5594,10 +5569,8 @@ static void read_xbm_image( QImageIO *iio )
} }
p = strstr( p, "0x" ); p = strstr( p, "0x" );
} else { // read another line } else { // read another line
readBytes = d->readLine(buf, buflen); if ( d->readLine(buf,buflen) <= 0 ) // EOF ==> truncated image
if (readBytes <= 0) // EOF ==> truncated image
break; break;
buf[readBytes] = '\0';
p = strstr( buf, "0x" ); p = strstr( buf, "0x" );
} }
} }
@ -5646,7 +5619,7 @@ static void write_xbm_image( QImageIO *iio )
} }
} }
int bcnt = 0; int bcnt = 0;
char *p = buf; register char *p = buf;
int bpl = (w+7)/8; int bpl = (w+7)/8;
for (int y = 0; y < h; ++y) { for (int y = 0; y < h; ++y) {
uchar *b = image.scanLine(y); uchar *b = image.scanLine(y);

@ -38,6 +38,10 @@
** **
**********************************************************************/ **********************************************************************/
#ifndef QT_CLEAN_NAMESPACE
#define QT_CLEAN_NAMESPACE
#endif
#include "qimage.h" #include "qimage.h"
#ifndef QT_NO_IMAGEIO_JPEG #ifndef QT_NO_IMAGEIO_JPEG

@ -160,11 +160,6 @@ static struct {
{ Qt::Key_LaunchD, QT_TRANSLATE_NOOP( "QAccel", "Launch (D)" ) }, { Qt::Key_LaunchD, QT_TRANSLATE_NOOP( "QAccel", "Launch (D)" ) },
{ Qt::Key_LaunchE, QT_TRANSLATE_NOOP( "QAccel", "Launch (E)" ) }, { Qt::Key_LaunchE, QT_TRANSLATE_NOOP( "QAccel", "Launch (E)" ) },
{ Qt::Key_LaunchF, QT_TRANSLATE_NOOP( "QAccel", "Launch (F)" ) }, { Qt::Key_LaunchF, QT_TRANSLATE_NOOP( "QAccel", "Launch (F)" ) },
{ Qt::Key_MonBrightnessUp, QT_TRANSLATE_NOOP( "QAccel", "Monitor Brightness Up" ) },
{ Qt::Key_MonBrightnessDown, QT_TRANSLATE_NOOP( "QAccel", "Monitor Brightness Down" ) },
{ Qt::Key_KeyboardLightOnOff, QT_TRANSLATE_NOOP( "QAccel", "Keyboard Light On Off" ) },
{ Qt::Key_KeyboardBrightnessUp,QT_TRANSLATE_NOOP( "QAccel", "Keyboard Brightness Up" ) },
{ Qt::Key_KeyboardBrightnessDown, QT_TRANSLATE_NOOP( "QAccel", "Keyboard Brightness Down" ) },
// -------------------------------------------------------------- // --------------------------------------------------------------
// More consistent namings // More consistent namings

@ -47,7 +47,6 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/file.h> #include <sys/file.h>
#else #else
#define _WANT_SEMUN
#include <sys/sem.h> #include <sys/sem.h>
#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) \ #if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) \
|| defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_BSDI) || defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_BSDI)

@ -38,6 +38,10 @@
** **
**********************************************************************/ **********************************************************************/
#ifndef QT_CLEAN_NAMESPACE
#define QT_CLEAN_NAMESPACE
#endif
#include "qdatetime.h" #include "qdatetime.h"
#ifndef QT_NO_IMAGEIO_MNG #ifndef QT_NO_IMAGEIO_MNG

@ -726,11 +726,6 @@ public:
Key_LaunchD = 0x10af, Key_LaunchD = 0x10af,
Key_LaunchE = 0x10b0, Key_LaunchE = 0x10b0,
Key_LaunchF = 0x10b1, Key_LaunchF = 0x10b1,
Key_MonBrightnessUp = 0x010b2,
Key_MonBrightnessDown = 0x010b3,
Key_KeyboardLightOnOff = 0x010b4,
Key_KeyboardBrightnessUp = 0x010b5,
Key_KeyboardBrightnessDown = 0x010b6,
Key_MediaLast = 0x1fff, Key_MediaLast = 0x1fff,

@ -736,7 +736,7 @@ QObject::~QObject()
} }
if ( parentObj ) // remove it from parent object if ( parentObj ) // remove it from parent object
parentObj->removeChild( this ); parentObj->removeChild( this );
QObject *obj; register QObject *obj;
if ( senderObjects ) { // disconnect from senders if ( senderObjects ) { // disconnect from senders
QSenderObjectList *tmp = senderObjects; QSenderObjectList *tmp = senderObjects;
senderObjects = 0; senderObjects = 0;
@ -753,7 +753,7 @@ QObject::~QObject()
QConnectionList* clist = (*connections)[i]; // for each signal... QConnectionList* clist = (*connections)[i]; // for each signal...
if ( !clist ) if ( !clist )
continue; continue;
QConnection *c; register QConnection *c;
QConnectionListIt cit(*clist); QConnectionListIt cit(*clist);
while( (c=cit.current()) ) { // for each connected slot... while( (c=cit.current()) ) { // for each connected slot...
++cit; ++cit;
@ -879,7 +879,7 @@ void *qt_inheritedBy( QMetaObject *superClass, const QObject *object )
{ {
if (!object) if (!object)
return 0; return 0;
QMetaObject *mo = object->metaObject(); register QMetaObject *mo = object->metaObject();
while (mo) { while (mo) {
if (mo == superClass) if (mo == superClass)
return (void*)object; return (void*)object;
@ -1266,7 +1266,7 @@ bool QObject::activate_filters( QEvent *e )
if ( !eventFilters ) // no event filter if ( !eventFilters ) // no event filter
return FALSE; return FALSE;
QObjectListIt it( *eventFilters ); QObjectListIt it( *eventFilters );
QObject *obj = it.current(); register QObject *obj = it.current();
while ( obj ) { // send to all filters while ( obj ) { // send to all filters
++it; // until one returns TRUE ++it; // until one returns TRUE
if ( obj->eventFilter(this,e) ) { if ( obj->eventFilter(this,e) ) {
@ -2466,7 +2466,7 @@ bool QObject::disconnectInternal( const QObject *sender, int signal_index,
bool success = FALSE; bool success = FALSE;
QConnectionList *clist; QConnectionList *clist;
QConnection *c; register QConnection *c;
if ( signal_index == -1 ) { if ( signal_index == -1 ) {
for ( int i = 0; i < (int) s->connections->size(); i++ ) { for ( int i = 0; i < (int) s->connections->size(); i++ ) {
clist = (*s->connections)[i]; // for all signals... clist = (*s->connections)[i]; // for all signals...
@ -3060,7 +3060,7 @@ void QObject::dumpObjectInfo()
if ( ( clist = connections->at( i ) ) ) { if ( ( clist = connections->at( i ) ) ) {
qDebug( "\t%s", metaObject()->signal( i, TRUE )->name ); qDebug( "\t%s", metaObject()->signal( i, TRUE )->name );
n++; n++;
QConnection *c; register QConnection *c;
QConnectionListIt cit(*clist); QConnectionListIt cit(*clist);
while ( (c=cit.current()) ) { while ( (c=cit.current()) ) {
++cit; ++cit;

@ -142,6 +142,12 @@ private: \
#define SIGNAL(a) "2"#a #define SIGNAL(a) "2"#a
#endif #endif
#ifndef QT_CLEAN_NAMESPACE
#define METHOD_CODE 0 // member type codes
#define SLOT_CODE 1
#define SIGNAL_CODE 2
#endif
#define QMETHOD_CODE 0 // member type codes #define QMETHOD_CODE 0 // member type codes
#define QSLOT_CODE 1 #define QSLOT_CODE 1
#define QSIGNAL_CODE 2 #define QSIGNAL_CODE 2

@ -0,0 +1,48 @@
/****************************************************************************
**
** Definition of QPaintDevice constants and flags
**
** Created : 940721
**
** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved.
**
** This file is part of the kernel module of the Qt GUI Toolkit.
**
** This file may be used under the terms of the GNU General
** Public License versions 2.0 or 3.0 as published by the Free
** Software Foundation and appearing in the files LICENSE.GPL2
** and LICENSE.GPL3 included in the packaging of this file.
** Alternatively you may (at your option) use any later version
** of the GNU General Public License if such license has been
** publicly approved by Trolltech ASA (or its successors, if any)
** and the KDE Free Qt Foundation.
**
** Please review the following information to ensure GNU General
** Public Licensing requirements will be met:
** http://trolltech.com/products/qt/licenses/licensing/opensource/.
** If you are unsure which license is appropriate for your use, please
** review the following information:
** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
** or contact the sales department at sales@trolltech.com.
**
** This file may be used under the terms of the Q Public License as
** defined by Trolltech ASA and appearing in the file LICENSE.QPL
** included in the packaging of this file. Licensees holding valid Qt
** Commercial licenses may use this file in accordance with the Qt
** Commercial License Agreement provided with the Software.
**
** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
** herein.
**
**********************************************************************/
#ifndef QPAINTDEVICEDEFS_H
#define QPAINTDEVICEDEFS_H
#error "this file is gone. the #defines it contained are in"
#error "q1xcompatibility.h; the functionality is in QPaintDevice"
#error "and QPaintDeviceMetrics."
#endif // QPAINTDEVICEDEFS_H

@ -303,7 +303,7 @@ static void init_gc_array()
static void cleanup_gc_array( Display *dpy ) static void cleanup_gc_array( Display *dpy )
{ {
QGC *p = gc_array; register QGC *p = gc_array;
int i = gc_array_size; int i = gc_array_size;
if ( gc_array_init ) { if ( gc_array_init ) {
while ( i-- ) { while ( i-- ) {
@ -328,7 +328,7 @@ static GC alloc_gc( Display *dpy, int scrn, Drawable hd, bool monochrome=FALSE,
XSetGraphicsExposures( dpy, gc, False ); XSetGraphicsExposures( dpy, gc, False );
return gc; return gc;
} }
QGC *p = gc_array; register QGC *p = gc_array;
int i = gc_array_size; int i = gc_array_size;
if ( !gc_array_init ) // not initialized if ( !gc_array_init ) // not initialized
init_gc_array(); init_gc_array();
@ -364,7 +364,7 @@ static void free_gc( Display *dpy, GC gc, bool privateGC = FALSE )
XFreeGC( dpy, gc ); XFreeGC( dpy, gc );
return; return;
} }
QGC *p = gc_array; register QGC *p = gc_array;
int i = gc_array_size; int i = gc_array_size;
if ( gc_array_init ) { if ( gc_array_init ) {
while ( i-- ) { while ( i-- ) {

@ -290,7 +290,7 @@ extern const uchar *qt_get_bitflip_array(); // defined in qimage.cpp
static uchar *flip_bits( const uchar *bits, int len ) static uchar *flip_bits( const uchar *bits, int len )
{ {
const uchar *p = bits; register const uchar *p = bits;
const uchar *end = p + len; const uchar *end = p + len;
uchar *newdata = new uchar[len]; uchar *newdata = new uchar[len];
uchar *b = newdata; uchar *b = newdata;
@ -958,7 +958,7 @@ QImage QPixmap::convertToImage() const
image.setColor( 0, qRgb(255,255,255) ); image.setColor( 0, qRgb(255,255,255) );
image.setColor( 1, qRgb(0,0,0) ); image.setColor( 1, qRgb(0,0,0) );
} else if ( !trucol ) { // pixmap with colormap } else if ( !trucol ) { // pixmap with colormap
uchar *p; register uchar *p;
uchar *end; uchar *end;
uchar use[256]; // pixel-in-use table uchar use[256]; // pixel-in-use table
uchar pix[256]; // pixel translation table uchar pix[256]; // pixel translation table
@ -1243,8 +1243,8 @@ bool QPixmap::convertFromImage( const QImage &img, int conversion_flags )
bool trucol = (visual->c_class == TrueColor || visual->c_class == DirectColor); bool trucol = (visual->c_class == TrueColor || visual->c_class == DirectColor);
int nbytes = image.numBytes(); int nbytes = image.numBytes();
uchar *newbits= 0; uchar *newbits= 0;
#ifdef QT_MITSHM_CONVERSIONS
int newbits_size = 0; int newbits_size = 0;
#ifdef QT_MITSHM_CONVERSIONS
bool mitshm_ximage = false; bool mitshm_ximage = false;
XShmSegmentInfo shminfo; XShmSegmentInfo shminfo;
#endif #endif
@ -1615,9 +1615,7 @@ bool QPixmap::convertFromImage( const QImage &img, int conversion_flags )
} }
newbits = (uchar *)malloc( nbytes ); // copy image into newbits newbits = (uchar *)malloc( nbytes ); // copy image into newbits
#ifdef QT_MITSHM_CONVERSIONS
newbits_size = nbytes; newbits_size = nbytes;
#endif
Q_CHECK_PTR( newbits ); Q_CHECK_PTR( newbits );
if ( !newbits ) // no memory if ( !newbits ) // no memory
return FALSE; return FALSE;
@ -1746,9 +1744,7 @@ bool QPixmap::convertFromImage( const QImage &img, int conversion_flags )
ushort *p2; ushort *p2;
int p2inc = xi->bytes_per_line/sizeof(ushort); int p2inc = xi->bytes_per_line/sizeof(ushort);
ushort *newerbits = (ushort *)malloc( xi->bytes_per_line * h ); ushort *newerbits = (ushort *)malloc( xi->bytes_per_line * h );
#ifdef QT_MITSHM_CONVERSIONS
newbits_size = xi->bytes_per_line * h; newbits_size = xi->bytes_per_line * h;
#endif
Q_CHECK_PTR( newerbits ); Q_CHECK_PTR( newerbits );
if ( !newerbits ) // no memory if ( !newerbits ) // no memory
return FALSE; return FALSE;

@ -46,7 +46,7 @@
#include "qiodevice.h" #include "qiodevice.h"
#include <png.h> #include <png.h>
#if PNG_LIBPNG_VER>=10500 #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 )
#include <zlib.h> #include <zlib.h>
#endif /* LIBPNG 1.5 */ #endif /* LIBPNG 1.5 */
@ -129,7 +129,7 @@ void setup_qt( QImage& image, png_structp png_ptr, png_infop info_ptr, float scr
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
0, 0, 0); 0, 0, 0);
#if PNG_LIBPNG_VER>=10500 #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 )
png_colorp info_ptr_palette = NULL; png_colorp info_ptr_palette = NULL;
int info_ptr_num_palette = 0; int info_ptr_num_palette = 0;
if (png_get_valid(png_ptr, info_ptr, PNG_INFO_PLTE)) { if (png_get_valid(png_ptr, info_ptr, PNG_INFO_PLTE)) {
@ -147,7 +147,7 @@ void setup_qt( QImage& image, png_structp png_ptr, png_infop info_ptr, float scr
if ( color_type == PNG_COLOR_TYPE_GRAY ) { if ( color_type == PNG_COLOR_TYPE_GRAY ) {
// Black & White or 8-bit grayscale // Black & White or 8-bit grayscale
#if PNG_LIBPNG_VER>=10500 #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 )
if ( bit_depth == 1 && png_get_channels(png_ptr, info_ptr) == 1 ) { if ( bit_depth == 1 && png_get_channels(png_ptr, info_ptr) == 1 ) {
#else /* LIBPNG 1.5 */ #else /* LIBPNG 1.5 */
if ( bit_depth == 1 && info_ptr->channels == 1 ) { if ( bit_depth == 1 && info_ptr->channels == 1 ) {
@ -185,9 +185,9 @@ void setup_qt( QImage& image, png_structp png_ptr, png_infop info_ptr, float scr
image.setColor( i, qRgba(c,c,c,0xff) ); image.setColor( i, qRgba(c,c,c,0xff) );
} }
if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) { if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) {
#if PNG_LIBPNG_VER>=10500 #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 )
const int g = info_ptr_trans_color->gray; const int g = info_ptr_trans_color->gray;
#elif PNG_LIBPNG_VER>=10400 #elif ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=4 )
const int g = info_ptr->trans_color.gray; const int g = info_ptr->trans_color.gray;
#else #else
const int g = info_ptr->trans_values.gray; const int g = info_ptr->trans_values.gray;
@ -200,7 +200,7 @@ void setup_qt( QImage& image, png_structp png_ptr, png_infop info_ptr, float scr
} }
} else if ( color_type == PNG_COLOR_TYPE_PALETTE } else if ( color_type == PNG_COLOR_TYPE_PALETTE
&& png_get_valid(png_ptr, info_ptr, PNG_INFO_PLTE) && png_get_valid(png_ptr, info_ptr, PNG_INFO_PLTE)
#if PNG_LIBPNG_VER>=10500 #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 )
&& info_ptr_num_palette <= 256 ) && info_ptr_num_palette <= 256 )
#else /* LIBPNG 1.5 */ #else /* LIBPNG 1.5 */
&& info_ptr->num_palette <= 256 ) && info_ptr->num_palette <= 256 )
@ -212,7 +212,7 @@ void setup_qt( QImage& image, png_structp png_ptr, png_infop info_ptr, float scr
png_read_update_info( png_ptr, info_ptr ); png_read_update_info( png_ptr, info_ptr );
png_get_IHDR(png_ptr, info_ptr, png_get_IHDR(png_ptr, info_ptr,
&width, &height, &bit_depth, &color_type, 0, 0, 0); &width, &height, &bit_depth, &color_type, 0, 0, 0);
#if PNG_LIBPNG_VER>=10500 #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 )
if (!image.create(width, height, bit_depth, info_ptr_num_palette, if (!image.create(width, height, bit_depth, info_ptr_num_palette,
#else /* LIBPNG 1.5 */ #else /* LIBPNG 1.5 */
if (!image.create(width, height, bit_depth, info_ptr->num_palette, if (!image.create(width, height, bit_depth, info_ptr->num_palette,
@ -223,7 +223,7 @@ void setup_qt( QImage& image, png_structp png_ptr, png_infop info_ptr, float scr
if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) { if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) {
image.setAlphaBuffer( TRUE ); image.setAlphaBuffer( TRUE );
#if PNG_LIBPNG_VER>=10500 #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 )
while ( i < info_ptr_num_trans ) { while ( i < info_ptr_num_trans ) {
image.setColor(i, qRgba( image.setColor(i, qRgba(
info_ptr_palette[i].red, info_ptr_palette[i].red,
@ -236,9 +236,9 @@ void setup_qt( QImage& image, png_structp png_ptr, png_infop info_ptr, float scr
info_ptr->palette[i].green, info_ptr->palette[i].green,
info_ptr->palette[i].blue, info_ptr->palette[i].blue,
#endif /* LIBPNG 1.5 */ #endif /* LIBPNG 1.5 */
#if PNG_LIBPNG_VER>=10500 #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 )
info_ptr_trans_alpha[i] info_ptr_trans_alpha[i]
#elif PNG_LIBPNG_VER>=10400 #elif ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=4 )
info_ptr->trans_alpha[i] info_ptr->trans_alpha[i]
#else #else
info_ptr->trans[i] info_ptr->trans[i]
@ -248,7 +248,7 @@ void setup_qt( QImage& image, png_structp png_ptr, png_infop info_ptr, float scr
i++; i++;
} }
} }
#if PNG_LIBPNG_VER>=10500 #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 )
while ( i < info_ptr_num_palette ) { while ( i < info_ptr_num_palette ) {
image.setColor(i, qRgba( image.setColor(i, qRgba(
info_ptr_palette[i].red, info_ptr_palette[i].red,
@ -347,7 +347,7 @@ void read_png_image(QImageIO* iio)
return; return;
} }
#if PNG_LIBPNG_VER>=10500 #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 )
if (setjmp(png_jmpbuf(png_ptr))) { if (setjmp(png_jmpbuf(png_ptr))) {
#else /* LIBPNG 1.5 */ #else /* LIBPNG 1.5 */
if (setjmp(png_ptr->jmpbuf)) { if (setjmp(png_ptr->jmpbuf)) {
@ -388,7 +388,7 @@ void read_png_image(QImageIO* iio)
png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)
if (image.depth()==32 && png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) { if (image.depth()==32 && png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
QRgb trans = 0xFF000000 | qRgb( QRgb trans = 0xFF000000 | qRgb(
#if PNG_LIBPNG_VER>=10400 #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=4 )
(info_ptr->trans_color.red << 8 >> bit_depth)&0xff, (info_ptr->trans_color.red << 8 >> bit_depth)&0xff,
(info_ptr->trans_color.green << 8 >> bit_depth)&0xff, (info_ptr->trans_color.green << 8 >> bit_depth)&0xff,
(info_ptr->trans_color.blue << 8 >> bit_depth)&0xff); (info_ptr->trans_color.blue << 8 >> bit_depth)&0xff);
@ -542,7 +542,7 @@ bool QPNGImageWriter::writeImage(const QImage& image, int quality_in, int off_x_
return FALSE; return FALSE;
} }
#if PNG_LIBPNG_VER>=10500 #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 )
if (setjmp(png_jmpbuf(png_ptr))) { if (setjmp(png_jmpbuf(png_ptr))) {
#else /* LIBPNG 1.5 */ #else /* LIBPNG 1.5 */
if (setjmp(png_ptr->jmpbuf)) { if (setjmp(png_ptr->jmpbuf)) {
@ -568,6 +568,19 @@ bool QPNGImageWriter::writeImage(const QImage& image, int quality_in, int off_x_
png_set_write_fn(png_ptr, (void*)this, qpiw_write_fn, qpiw_flush_fn); png_set_write_fn(png_ptr, (void*)this, qpiw_write_fn, qpiw_flush_fn);
#if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 )
#warning XXXtnn not too sure about this
/*
according to png.h, channels is only used on read, not writes, so we
should be able to comment this out.
*/
#else /* LIBPNG 1.5 */
info_ptr->channels =
(image.depth() == 32)
? (image.hasAlphaBuffer() ? 4 : 3)
: 1;
#endif /* LIBPNG 1.5 */
png_set_IHDR(png_ptr, info_ptr, image.width(), image.height(), png_set_IHDR(png_ptr, info_ptr, image.width(), image.height(),
image.depth() == 1 ? 1 : 8 /* per channel */, image.depth() == 1 ? 1 : 8 /* per channel */,
image.depth() == 32 image.depth() == 32
@ -576,7 +589,7 @@ bool QPNGImageWriter::writeImage(const QImage& image, int quality_in, int off_x_
: PNG_COLOR_TYPE_RGB : PNG_COLOR_TYPE_RGB
: PNG_COLOR_TYPE_PALETTE, 0, 0, 0); : PNG_COLOR_TYPE_PALETTE, 0, 0, 0);
#if PNG_LIBPNG_VER>=10500 #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 )
png_color_8 sig_bit; png_color_8 sig_bit;
sig_bit.red = 8; sig_bit.red = 8;
sig_bit.green = 8; sig_bit.green = 8;
@ -601,14 +614,14 @@ bool QPNGImageWriter::writeImage(const QImage& image, int quality_in, int off_x_
png_set_PLTE(png_ptr, info_ptr, palette, num_palette); png_set_PLTE(png_ptr, info_ptr, palette, num_palette);
int* trans = new int[num_palette]; int* trans = new int[num_palette];
int num_trans = 0; int num_trans = 0;
#if PNG_LIBPNG_VER>=10500 #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 )
png_colorp info_ptr_palette = NULL; png_colorp info_ptr_palette = NULL;
int tmp; int tmp;
png_get_PLTE(png_ptr, info_ptr, &info_ptr_palette, &tmp); png_get_PLTE(png_ptr, info_ptr, &info_ptr_palette, &tmp);
#endif /* LIBPNG 1.5 */ #endif /* LIBPNG 1.5 */
for (int i=0; i<num_palette; i++) { for (int i=0; i<num_palette; i++) {
QRgb rgb=image.color(i); QRgb rgb=image.color(i);
#if PNG_LIBPNG_VER>=10500 #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 )
info_ptr_palette[i].red = qRed(rgb); info_ptr_palette[i].red = qRed(rgb);
info_ptr_palette[i].green = qGreen(rgb); info_ptr_palette[i].green = qGreen(rgb);
info_ptr_palette[i].blue = qBlue(rgb); info_ptr_palette[i].blue = qBlue(rgb);
@ -624,7 +637,7 @@ bool QPNGImageWriter::writeImage(const QImage& image, int quality_in, int off_x_
} }
} }
} }
#if PNG_LIBPNG_VER>=10500 #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 )
png_set_PLTE(png_ptr, info_ptr, info_ptr_palette, num_palette); png_set_PLTE(png_ptr, info_ptr, info_ptr_palette, num_palette);
#endif /* LIBPNG 1.5 */ #endif /* LIBPNG 1.5 */
if (num_trans) { if (num_trans) {
@ -637,7 +650,7 @@ bool QPNGImageWriter::writeImage(const QImage& image, int quality_in, int off_x_
} }
if ( image.hasAlphaBuffer() ) { if ( image.hasAlphaBuffer() ) {
#if PNG_LIBPNG_VER>=10500 #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 )
png_color_8p sig_bit; png_color_8p sig_bit;
png_get_sBIT(png_ptr, info_ptr, &sig_bit); png_get_sBIT(png_ptr, info_ptr, &sig_bit);
sig_bit->alpha = 8; sig_bit->alpha = 8;
@ -1130,7 +1143,7 @@ int QPNGFormat::decode(QImage& img, QImageConsumer* cons,
return -1; return -1;
} }
#if PNG_LIBPNG_VER>=10500 #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 )
if (setjmp(png_jmpbuf(png_ptr))) { if (setjmp(png_jmpbuf(png_ptr))) {
#else /* LIBPNG 1.5 */ #else /* LIBPNG 1.5 */
if (setjmp((png_ptr)->jmpbuf)) { if (setjmp((png_ptr)->jmpbuf)) {
@ -1161,7 +1174,7 @@ int QPNGFormat::decode(QImage& img, QImageConsumer* cons,
if ( !png_ptr ) return 0; if ( !png_ptr ) return 0;
#if PNG_LIBPNG_VER>=10500 #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 )
if (setjmp(png_jmpbuf(png_ptr))) { if (setjmp(png_jmpbuf(png_ptr))) {
#else /* LIBPNG 1.5 */ #else /* LIBPNG 1.5 */
if (setjmp(png_ptr->jmpbuf)) { if (setjmp(png_ptr->jmpbuf)) {
@ -1225,7 +1238,7 @@ void QPNGFormat::end(png_structp png, png_infop info)
consumer->frameDone(QPoint(offx,offy),r); consumer->frameDone(QPoint(offx,offy),r);
consumer->end(); consumer->end();
state = FrameStart; state = FrameStart;
#if PNG_LIBPNG_VER>=10500 #if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 )
unused_data = png_process_data_pause(png, 0); unused_data = png_process_data_pause(png, 0);
#else /* LIBPNG 1.5 */ #else /* LIBPNG 1.5 */
unused_data = (int)png->buffer_size; // Since libpng doesn't tell us unused_data = (int)png->buffer_size; // Since libpng doesn't tell us

@ -190,8 +190,8 @@ QPointArray::QPointArray( int nPoints, const QCOORD *points )
void QPointArray::translate( int dx, int dy ) void QPointArray::translate( int dx, int dy )
{ {
QPoint *p = data(); register QPoint *p = data();
int i = size(); register int i = size();
QPoint pt( dx, dy ); QPoint pt( dx, dy );
while ( i-- ) { while ( i-- ) {
*p += pt; *p += pt;
@ -440,7 +440,7 @@ QRect QPointArray::boundingRect() const
{ {
if ( isEmpty() ) if ( isEmpty() )
return QRect( 0, 0, 0, 0 ); // null rectangle return QRect( 0, 0, 0, 0 ); // null rectangle
QPoint *pd = data(); register QPoint *pd = data();
int minx, maxx, miny, maxy; int minx, maxx, miny, maxy;
minx = maxx = pd->x(); minx = maxx = pd->x();
miny = maxy = pd->y(); miny = maxy = pd->y();
@ -937,7 +937,7 @@ QPointArray QPointArray::cubicBezier() const
if ( m < 2 ) // at least two points if ( m < 2 ) // at least two points
m = 2; m = 2;
QPointArray p( m ); // p = Bezier point array QPointArray p( m ); // p = Bezier point array
QPointData *pd = p.data(); register QPointData *pd = p.data();
float x0 = xvec[0], y0 = yvec[0]; float x0 = xvec[0], y0 = yvec[0];
float dt = 1.0F/m; float dt = 1.0F/m;
@ -1018,7 +1018,7 @@ QPointArray QPointArray::cubicBezier() const
QDataStream &operator<<( QDataStream &s, const QPointArray &a ) QDataStream &operator<<( QDataStream &s, const QPointArray &a )
{ {
uint i; register uint i;
uint len = a.size(); uint len = a.size();
s << len; // write size of array s << len; // write size of array
for ( i=0; i<len; i++ ) // write each point for ( i=0; i<len; i++ ) // write each point
@ -1037,7 +1037,7 @@ QDataStream &operator<<( QDataStream &s, const QPointArray &a )
QDataStream &operator>>( QDataStream &s, QPointArray &a ) QDataStream &operator>>( QDataStream &s, QPointArray &a )
{ {
uint i; register uint i;
uint len; uint len;
s >> len; // read size of array s >> len; // read size of array
if ( !a.resize( len ) ) // no memory if ( !a.resize( len ) ) // no memory

@ -407,8 +407,8 @@ static bool
miInsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, miInsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE,
int scanline, ScanLineListBlock **SLLBlock, int *iSLLBlock) int scanline, ScanLineListBlock **SLLBlock, int *iSLLBlock)
{ {
EdgeTableEntry *start, *prev; register EdgeTableEntry *start, *prev;
ScanLineList *pSLL, *pPrevSLL; register ScanLineList *pSLL, *pPrevSLL;
ScanLineListBlock *tmpSLLBlock; ScanLineListBlock *tmpSLLBlock;
/* /*
@ -505,7 +505,7 @@ typedef struct {
static void static void
miFreeStorage(ScanLineListBlock *pSLLBlock) miFreeStorage(ScanLineListBlock *pSLLBlock)
{ {
ScanLineListBlock *tmpSLLBlock; register ScanLineListBlock *tmpSLLBlock;
while (pSLLBlock) while (pSLLBlock)
{ {
@ -519,8 +519,8 @@ static bool
miCreateETandAET(int count, DDXPointPtr pts, EdgeTable *ET, miCreateETandAET(int count, DDXPointPtr pts, EdgeTable *ET,
EdgeTableEntry *AET, EdgeTableEntry *pETEs, ScanLineListBlock *pSLLBlock) EdgeTableEntry *AET, EdgeTableEntry *pETEs, ScanLineListBlock *pSLLBlock)
{ {
DDXPointPtr top, bottom; register DDXPointPtr top, bottom;
DDXPointPtr PrevPt, CurrPt; register DDXPointPtr PrevPt, CurrPt;
int iSLLBlock = 0; int iSLLBlock = 0;
int dy; int dy;
@ -609,8 +609,8 @@ miCreateETandAET(int count, DDXPointPtr pts, EdgeTable *ET,
static void static void
miloadAET(EdgeTableEntry *AET, EdgeTableEntry *ETEs) miloadAET(EdgeTableEntry *AET, EdgeTableEntry *ETEs)
{ {
EdgeTableEntry *pPrevAET; register EdgeTableEntry *pPrevAET;
EdgeTableEntry *tmp; register EdgeTableEntry *tmp;
pPrevAET = AET; pPrevAET = AET;
AET = AET->next; AET = AET->next;
@ -656,9 +656,9 @@ miloadAET(EdgeTableEntry *AET, EdgeTableEntry *ETEs)
static void static void
micomputeWAET(EdgeTableEntry *AET) micomputeWAET(EdgeTableEntry *AET)
{ {
EdgeTableEntry *pWETE; register EdgeTableEntry *pWETE;
int inside = 1; register int inside = 1;
int isInside = 0; register int isInside = 0;
AET->nextWETE = 0; AET->nextWETE = 0;
pWETE = AET; pWETE = AET;
@ -694,10 +694,10 @@ micomputeWAET(EdgeTableEntry *AET)
static int static int
miInsertionSort(EdgeTableEntry *AET) miInsertionSort(EdgeTableEntry *AET)
{ {
EdgeTableEntry *pETEchase; register EdgeTableEntry *pETEchase;
EdgeTableEntry *pETEinsert; register EdgeTableEntry *pETEinsert;
EdgeTableEntry *pETEchaseBackTMP; register EdgeTableEntry *pETEchaseBackTMP;
int changed = 0; register int changed = 0;
AET = AET->next; AET = AET->next;
while (AET) while (AET)
@ -769,12 +769,12 @@ void QPolygonScanner::scan( const QPointArray& pa, bool winding, int index, int
DDXPointPtr ptsIn = (DDXPointPtr)pa.data(); DDXPointPtr ptsIn = (DDXPointPtr)pa.data();
ptsIn += index; ptsIn += index;
EdgeTableEntry *pAET; /* the Active Edge Table */ register EdgeTableEntry *pAET; /* the Active Edge Table */
int y; /* the current scanline */ register int y; /* the current scanline */
int nPts = 0; /* number of pts in buffer */ register int nPts = 0; /* number of pts in buffer */
EdgeTableEntry *pWETE; /* Winding Edge Table */ register EdgeTableEntry *pWETE; /* Winding Edge Table */
ScanLineList *pSLL; /* Current ScanLineList */ register ScanLineList *pSLL; /* Current ScanLineList */
DDXPointPtr ptsOut; /* ptr to output buffers */ register DDXPointPtr ptsOut; /* ptr to output buffers */
int *width; int *width;
DDXPointRec FirstPoint[NUMPTSTOBUFFER]; /* the output buffers */ DDXPointRec FirstPoint[NUMPTSTOBUFFER]; /* the output buffers */
int FirstWidth[NUMPTSTOBUFFER]; int FirstWidth[NUMPTSTOBUFFER];

@ -89,8 +89,8 @@ struct QRegionPrivate {
static void UnionRegion(QRegionPrivate *reg1, QRegionPrivate *reg2, QRegionPrivate *newReg); static void UnionRegion(QRegionPrivate *reg1, QRegionPrivate *reg2, QRegionPrivate *newReg);
static void IntersectRegion(QRegionPrivate *reg1, QRegionPrivate *reg2, QRegionPrivate *newReg); static void IntersectRegion(QRegionPrivate *reg1, QRegionPrivate *reg2, register QRegionPrivate *newReg);
static void miRegionOp(QRegionPrivate *newReg, QRegionPrivate *reg1, QRegionPrivate *reg2, static void miRegionOp(register QRegionPrivate *newReg, QRegionPrivate *reg1, QRegionPrivate *reg2,
void (*overlapFunc)(...), void (*overlapFunc)(...),
void (*nonOverlap1Func)(...), void (*nonOverlap1Func)(...),
void (*nonOverlap2Func)(...)); void (*nonOverlap2Func)(...));
@ -300,7 +300,7 @@ typedef void (*voidProcp)(...);
static static
void UnionRectWithRegion(const QRect *rect, QRegionPrivate *source, QRegionPrivate *dest) void UnionRectWithRegion(register const QRect *rect, QRegionPrivate *source, QRegionPrivate *dest)
{ {
QRegionPrivate region; QRegionPrivate region;
@ -333,7 +333,7 @@ void UnionRectWithRegion(const QRect *rect, QRegionPrivate *source, QRegionPriva
static void static void
miSetExtents (QRegionPrivate *pReg) miSetExtents (QRegionPrivate *pReg)
{ {
QRect *pBox, register QRect *pBox,
*pBoxEnd, *pBoxEnd,
*pExtents; *pExtents;
@ -383,10 +383,10 @@ miSetExtents (QRegionPrivate *pReg)
static static
int int
OffsetRegion(QRegionPrivate *pRegion, int x, int y) OffsetRegion(register QRegionPrivate *pRegion, register int x, register int y)
{ {
int nbox; register int nbox;
QRect *pbox; register QRect *pbox;
pbox = pRegion->rects.data(); pbox = pRegion->rects.data();
nbox = pRegion->numRects; nbox = pRegion->numRects;
@ -419,12 +419,12 @@ OffsetRegion(QRegionPrivate *pRegion, int x, int y)
/* static void*/ /* static void*/
static static
int int
miIntersectO (QRegionPrivate *pReg, QRect *r1, QRect *r1End, miIntersectO (register QRegionPrivate *pReg, register QRect *r1, QRect *r1End,
QRect *r2, QRect *r2End, int y1, int y2) register QRect *r2, QRect *r2End, int y1, int y2)
{ {
int x1; register int x1;
int x2; register int x2;
QRect *pNextRect; register QRect *pNextRect;
pNextRect = pReg->rects.data() + pReg->numRects; pNextRect = pReg->rects.data() + pReg->numRects;
@ -474,7 +474,7 @@ miIntersectO (QRegionPrivate *pReg, QRect *r1, QRect *r1End,
static static
void void
IntersectRegion(QRegionPrivate *reg1, QRegionPrivate *reg2, QRegionPrivate *newReg) IntersectRegion(QRegionPrivate *reg1, QRegionPrivate *reg2, register QRegionPrivate *newReg)
{ {
/* check for trivial reject */ /* check for trivial reject */
if ( (!(reg1->numRects)) || (!(reg2->numRects)) || if ( (!(reg1->numRects)) || (!(reg2->numRects)) ||
@ -519,14 +519,14 @@ IntersectRegion(QRegionPrivate *reg1, QRegionPrivate *reg2, QRegionPrivate *newR
/* static int*/ /* static int*/
static static
int int
miCoalesce (QRegionPrivate *pReg, int prevStart, int curStart) miCoalesce (register QRegionPrivate *pReg, int prevStart, int curStart)
//Region pReg; /* Region to coalesce */ //Region pReg; /* Region to coalesce */
//prevStart; /* Index of start of previous band */ //prevStart; /* Index of start of previous band */
//curStart; /* Index of start of current band */ //curStart; /* Index of start of current band */
{ {
QRect *pPrevBox; /* Current box in previous band */ register QRect *pPrevBox; /* Current box in previous band */
QRect *pCurBox; /* Current box in current band */ register QRect *pCurBox; /* Current box in current band */
QRect *pRegEnd; /* End of region */ register QRect *pRegEnd; /* End of region */
int curNumRects; /* Number of rectangles in current int curNumRects; /* Number of rectangles in current
* band */ * band */
int prevNumRects; /* Number of rectangles in previous int prevNumRects; /* Number of rectangles in previous
@ -670,11 +670,11 @@ miCoalesce (QRegionPrivate *pReg, int prevStart, int curStart)
*/ */
/* static void*/ /* static void*/
static void static void
miRegionOp(QRegionPrivate *newReg, QRegionPrivate *reg1, QRegionPrivate *reg2, miRegionOp(register QRegionPrivate *newReg, QRegionPrivate *reg1, QRegionPrivate *reg2,
void (*overlapFunc)(...), void (*overlapFunc)(...),
void (*nonOverlap1Func)(...), void (*nonOverlap1Func)(...),
void (*nonOverlap2Func)(...)) void (*nonOverlap2Func)(...))
//Region newReg; /* Place to store result */ //register Region newReg; /* Place to store result */
//Region reg1; /* First region in operation */ //Region reg1; /* First region in operation */
//Region reg2; /* 2d region in operation */ //Region reg2; /* 2d region in operation */
//void (*overlapFunc)(); /* Function to call for over- //void (*overlapFunc)(); /* Function to call for over-
@ -686,18 +686,18 @@ miRegionOp(QRegionPrivate *newReg, QRegionPrivate *reg1, QRegionPrivate *reg2,
//* overlapping bands in region //* overlapping bands in region
//* 2 */ //* 2 */
{ {
QRect *r1; /* Pointer into first region */ register QRect *r1; /* Pointer into first region */
QRect *r2; /* Pointer into 2d region */ register QRect *r2; /* Pointer into 2d region */
QRect *r1End; /* End of 1st region */ QRect *r1End; /* End of 1st region */
QRect *r2End; /* End of 2d region */ QRect *r2End; /* End of 2d region */
int ybot; /* Bottom of intersection */ register int ybot; /* Bottom of intersection */
int ytop; /* Top of intersection */ register int ytop; /* Top of intersection */
int prevBand; /* Index of start of int prevBand; /* Index of start of
* previous band in newReg */ * previous band in newReg */
int curBand; /* Index of start of current int curBand; /* Index of start of current
* band in newReg */ * band in newReg */
QRect *r1BandEnd; /* End of current band in r1 */ register QRect *r1BandEnd; /* End of current band in r1 */
QRect *r2BandEnd; /* End of current band in r2 */ register QRect *r2BandEnd; /* End of current band in r2 */
int top; /* Top of non-overlapping int top; /* Top of non-overlapping
* band */ * band */
int bot; /* Bottom of non-overlapping int bot; /* Bottom of non-overlapping
@ -951,10 +951,10 @@ miRegionOp(QRegionPrivate *newReg, QRegionPrivate *reg1, QRegionPrivate *reg2,
/* static void*/ /* static void*/
static static
int int
miUnionNonO (QRegionPrivate *pReg, QRect * r, miUnionNonO (register QRegionPrivate *pReg, register QRect * r,
QRect * rEnd, int y1, int y2) QRect * rEnd, register int y1, register int y2)
{ {
QRect * pNextRect; register QRect * pNextRect;
pNextRect = pReg->rects.data() + pReg->numRects; pNextRect = pReg->rects.data() + pReg->numRects;
@ -993,10 +993,10 @@ miUnionNonO (QRegionPrivate *pReg, QRect * r,
/* static void*/ /* static void*/
static static
int int
miUnionO (QRegionPrivate *pReg, QRect *r1, QRect *r1End, miUnionO (register QRegionPrivate *pReg, register QRect *r1, QRect *r1End,
QRect *r2, QRect *r2End, int y1, int y2) register QRect *r2, QRect *r2End, register int y1, register int y2)
{ {
QRect *pNextRect; register QRect *pNextRect;
pNextRect = pReg->rects.data() + pReg->numRects; pNextRect = pReg->rects.data() + pReg->numRects;
@ -1121,10 +1121,10 @@ static void UnionRegion(QRegionPrivate *reg1, QRegionPrivate *reg2, QRegionPriva
/* static void*/ /* static void*/
static static
int int
miSubtractNonO1 (QRegionPrivate *pReg, QRect *r, miSubtractNonO1 (register QRegionPrivate *pReg, register QRect *r,
QRect *rEnd, int y1, int y2) QRect *rEnd, register int y1, register int y2)
{ {
QRect *pNextRect; register QRect *pNextRect;
pNextRect = pReg->rects.data() + pReg->numRects; pNextRect = pReg->rects.data() + pReg->numRects;
@ -1160,11 +1160,11 @@ miSubtractNonO1 (QRegionPrivate *pReg, QRect *r,
/* static void*/ /* static void*/
static static
int int
miSubtractO (QRegionPrivate *pReg, QRect *r1, QRect *r1End, miSubtractO (register QRegionPrivate *pReg, register QRect *r1, QRect *r1End,
QRect *r2, QRect *r2End, int y1, int y2) register QRect *r2, QRect *r2End, register int y1, register int y2)
{ {
QRect *pNextRect; register QRect *pNextRect;
int x1; register int x1;
x1 = r1->left(); x1 = r1->left();
@ -1285,7 +1285,7 @@ miSubtractO (QRegionPrivate *pReg, QRect *r1, QRect *r1End,
*----------------------------------------------------------------------- *-----------------------------------------------------------------------
*/ */
static void SubtractRegion(QRegionPrivate *regM, QRegionPrivate *regS, QRegionPrivate *regD) static void SubtractRegion(QRegionPrivate *regM, QRegionPrivate *regS, register QRegionPrivate *regD)
{ {
/* check for trivial reject */ /* check for trivial reject */
if ( (!(regM->numRects)) || (!(regS->numRects)) || if ( (!(regM->numRects)) || (!(regS->numRects)) ||
@ -1361,13 +1361,13 @@ static bool PointInRegion( QRegionPrivate *pRegion, int x, int y )
return FALSE; return FALSE;
} }
static bool RectInRegion(QRegionPrivate *region, static bool RectInRegion(register QRegionPrivate *region,
int rx, int ry, unsigned int rwidth, unsigned int rheight) int rx, int ry, unsigned int rwidth, unsigned int rheight)
{ {
QRect *pbox; register QRect *pbox;
QRect *pboxEnd; register QRect *pboxEnd;
QRect rect(rx, ry, rwidth, rheight); QRect rect(rx, ry, rwidth, rheight);
QRect *prect = &rect; register QRect *prect = &rect;
int partIn, partOut; int partIn, partOut;
/* this is (just) a useful optimization */ /* this is (just) a useful optimization */
@ -1800,8 +1800,8 @@ static void
InsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline, InsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline,
ScanLineListBlock **SLLBlock, int *iSLLBlock) ScanLineListBlock **SLLBlock, int *iSLLBlock)
{ {
EdgeTableEntry *start, *prev; register EdgeTableEntry *start, *prev;
ScanLineList *pSLL, *pPrevSLL; register ScanLineList *pSLL, *pPrevSLL;
ScanLineListBlock *tmpSLLBlock; ScanLineListBlock *tmpSLLBlock;
/* /*
@ -1881,12 +1881,12 @@ InsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline,
*/ */
static void static void
CreateETandAET(int count, QPoint *pts, CreateETandAET(register int count, register QPoint *pts,
EdgeTable *ET, EdgeTableEntry *AET, EdgeTableEntry *pETEs, EdgeTable *ET, EdgeTableEntry *AET, register EdgeTableEntry *pETEs,
ScanLineListBlock *pSLLBlock) ScanLineListBlock *pSLLBlock)
{ {
QPoint *top, *bottom; register QPoint *top, *bottom;
QPoint *PrevPt, *CurrPt; register QPoint *PrevPt, *CurrPt;
int iSLLBlock = 0; int iSLLBlock = 0;
int dy; int dy;
@ -1969,10 +1969,10 @@ CreateETandAET(int count, QPoint *pts,
*/ */
static void static void
loadAET(EdgeTableEntry *AET, EdgeTableEntry *ETEs) loadAET(register EdgeTableEntry *AET, register EdgeTableEntry *ETEs)
{ {
EdgeTableEntry *pPrevAET; register EdgeTableEntry *pPrevAET;
EdgeTableEntry *tmp; register EdgeTableEntry *tmp;
pPrevAET = AET; pPrevAET = AET;
AET = AET->next; AET = AET->next;
@ -2016,11 +2016,11 @@ loadAET(EdgeTableEntry *AET, EdgeTableEntry *ETEs)
* *
*/ */
static void static void
computeWAET(EdgeTableEntry *AET) computeWAET(register EdgeTableEntry *AET)
{ {
EdgeTableEntry *pWETE; register EdgeTableEntry *pWETE;
int inside = 1; register int inside = 1;
int isInside = 0; register int isInside = 0;
AET->nextWETE = (EdgeTableEntry *)NULL; AET->nextWETE = (EdgeTableEntry *)NULL;
pWETE = AET; pWETE = AET;
@ -2054,12 +2054,12 @@ computeWAET(EdgeTableEntry *AET)
*/ */
static int static int
InsertionSort(EdgeTableEntry *AET) InsertionSort(register EdgeTableEntry *AET)
{ {
EdgeTableEntry *pETEchase; register EdgeTableEntry *pETEchase;
EdgeTableEntry *pETEinsert; register EdgeTableEntry *pETEinsert;
EdgeTableEntry *pETEchaseBackTMP; register EdgeTableEntry *pETEchaseBackTMP;
int changed = 0; register int changed = 0;
AET = AET->next; AET = AET->next;
while (AET) while (AET)
@ -2090,9 +2090,9 @@ InsertionSort(EdgeTableEntry *AET)
* Clean up our act. * Clean up our act.
*/ */
static void static void
FreeStorage(ScanLineListBlock *pSLLBlock) FreeStorage(register ScanLineListBlock *pSLLBlock)
{ {
ScanLineListBlock *tmpSLLBlock; register ScanLineListBlock *tmpSLLBlock;
while (pSLLBlock) while (pSLLBlock)
{ {
@ -2110,15 +2110,15 @@ FreeStorage(ScanLineListBlock *pSLLBlock)
* stack by the calling procedure. * stack by the calling procedure.
* *
*/ */
static int PtsToRegion(int numFullPtBlocks, int iCurPtBlock, static int PtsToRegion(register int numFullPtBlocks, register int iCurPtBlock,
POINTBLOCK *FirstPtBlock, QRegionPrivate *reg) POINTBLOCK *FirstPtBlock, QRegionPrivate *reg)
{ {
QRect *rects; register QRect *rects;
QPoint *pts; register QPoint *pts;
POINTBLOCK *CurPtBlock; register POINTBLOCK *CurPtBlock;
int i; register int i;
QRect *extents; register QRect *extents;
int numRects; register int numRects;
extents = &reg->extents; extents = &reg->extents;
@ -2182,12 +2182,12 @@ static QRegionPrivate *PolygonRegion(QPoint *Pts, int Count, int rule)
//int rule; /* winding rule */ //int rule; /* winding rule */
{ {
QRegionPrivate *region; QRegionPrivate *region;
EdgeTableEntry *pAET; /* Active Edge Table */ register EdgeTableEntry *pAET; /* Active Edge Table */
int y; /* current scanline */ register int y; /* current scanline */
int iPts = 0; /* number of pts in buffer */ register int iPts = 0; /* number of pts in buffer */
EdgeTableEntry *pWETE; /* Winding Edge Table Entry*/ register EdgeTableEntry *pWETE; /* Winding Edge Table Entry*/
ScanLineList *pSLL; /* current scanLineList */ register ScanLineList *pSLL; /* current scanLineList */
QPoint *pts; /* output buffer */ register QPoint *pts; /* output buffer */
EdgeTableEntry *pPrevAET; /* ptr to previous AET */ EdgeTableEntry *pPrevAET; /* ptr to previous AET */
EdgeTable ET; /* header node for ET */ EdgeTable ET; /* header node for ET */
EdgeTableEntry AET; /* header node for AET */ EdgeTableEntry AET; /* header node for AET */

@ -4093,7 +4093,7 @@ QTextParagraph::~QTextParagraph()
{ {
delete str; delete str;
if ( hasdoc ) { if ( hasdoc ) {
QTextDocument *doc = document(); register QTextDocument *doc = document();
if ( this == doc->minwParag ) { if ( this == doc->minwParag ) {
doc->minwParag = 0; doc->minwParag = 0;
doc->minw = 0; doc->minw = 0;

@ -38,6 +38,8 @@
** **
**********************************************************************/ **********************************************************************/
#define QT_CLEAN_NAMESPACE
#include "qsound.h" #include "qsound.h"
#ifndef QT_NO_SOUND #ifndef QT_NO_SOUND

@ -51,6 +51,7 @@ kernel {
$$KERNEL_H/qobjectdict.h \ $$KERNEL_H/qobjectdict.h \
$$KERNEL_H/qobjectlist.h \ $$KERNEL_H/qobjectlist.h \
$$KERNEL_H/qpaintdevice.h \ $$KERNEL_H/qpaintdevice.h \
$$KERNEL_H/qpaintdevicedefs.h \
$$KERNEL_H/qpainter.h \ $$KERNEL_H/qpainter.h \
$$KERNEL_P/qpainter_p.h \ $$KERNEL_P/qpainter_p.h \
$$KERNEL_H/qpalette.h \ $$KERNEL_H/qpalette.h \

@ -331,10 +331,7 @@ void QThread::start(Priority priority)
pthread_attr_init(&attr); pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING-0 >= 0) #if !defined(Q_OS_OPENBSD) && defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING-0 >= 0)
#if _POSIX_THREAD_PRIORITY_SCHEDULING == 0 && defined _SC_THREAD_PRIORITY_SCHEDULING
if (sysconf(_SC_THREAD_PRIORITY_SCHEDULING) > 0)
#endif
switch (priority) { switch (priority) {
case InheritPriority: case InheritPriority:
{ {

@ -1,6 +1,7 @@
/* This file is licensed under the terms of the GPL v2 or v3, as it has been publicly released by /* This file is licensed under the terms of the GPL v2 or v3, as it has been publicly released by
OpenSUSE as part of their GPLed Qt library disribution */ OpenSUSE as part of their GPLed Qt library disribution */
#define QT_CLEAN_NAMESPACE
#include "qtkdeintegration_x11_p.h" #include "qtkdeintegration_x11_p.h"
#include <qcolordialog.h> #include <qcolordialog.h>
@ -26,7 +27,11 @@ static QCString findLibrary()
if( getenv( "QT_NO_KDE_INTEGRATION" ) == NULL if( getenv( "QT_NO_KDE_INTEGRATION" ) == NULL
|| getenv( "QT_NO_KDE_INTEGRATION" )[ 0 ] == '0' ) || getenv( "QT_NO_KDE_INTEGRATION" )[ 0 ] == '0' )
{ {
return QCString() + qInstallPathPlugins() + "/integration/libqtkde"; #ifdef USE_LIB64_PATHES
return "/opt/kde3/lib64/kde3/plugins/integration/libqtkde";
#else
return "/opt/kde3/lib/kde3/plugins/integration/libqtkde";
#endif
} }
return ""; return "";
} }

@ -85,7 +85,7 @@ bool QUType_QVariant::convertFrom( QUObject *o, QUType *t )
else if ( isEqual( o->type, &static_QUType_int ) ) else if ( isEqual( o->type, &static_QUType_int ) )
var = new QVariant( static_QUType_int.get( o ) ); var = new QVariant( static_QUType_int.get( o ) );
else if ( isEqual( o->type, &static_QUType_bool ) ) else if ( isEqual( o->type, &static_QUType_bool ) )
var = new QVariant( static_QUType_bool.get( o ) ); var = new QVariant( static_QUType_bool.get( o ), 42 );
else if ( isEqual( o->type, &static_QUType_double ) ) else if ( isEqual( o->type, &static_QUType_double ) )
var = new QVariant( static_QUType_double.get( o ) ); var = new QVariant( static_QUType_double.get( o ) );
else if ( isEqual( o->type, &static_QUType_charstar ) ) else if ( isEqual( o->type, &static_QUType_charstar ) )

@ -877,10 +877,12 @@ QVariant::QVariant( Q_ULLONG val )
} }
/*! /*!
Constructs a new variant with a boolean value, \a val. Constructs a new variant with a boolean value, \a val. The integer
argument is a dummy, necessary for compatibility with some
compilers.
*/ */
QVariant::QVariant( bool val ) QVariant::QVariant( bool val, int )
{ { // this is the comment that does NOT name said compiler.
d = new Private; d = new Private;
d->typ = Bool; d->typ = Bool;
d->value.b = val; d->value.b = val;

@ -42,10 +42,7 @@
#define QVARIANT_H #define QVARIANT_H
#ifndef QT_H #ifndef QT_H
#include "qmap.h"
#include "qstring.h" #include "qstring.h"
#include "qstringlist.h"
#include "qvaluelist.h"
#endif // QT_H #endif // QT_H
#ifndef QT_NO_VARIANT #ifndef QT_NO_VARIANT
@ -83,10 +80,6 @@ template <class T> class QValueListConstIterator;
template <class T> class QValueListNode; template <class T> class QValueListNode;
template <class Key, class T> class QMap; template <class Key, class T> class QMap;
template <class Key, class T> class QMapConstIterator; template <class Key, class T> class QMapConstIterator;
typedef QMap<QString, QVariant> QStringVariantMap;
typedef QMapIterator<QString, QVariant> QStringVariantMapIterator;
typedef QMapConstIterator<QString, QVariant> QStringVariantMapConstIterator;
#endif #endif
class Q_EXPORT QVariant class Q_EXPORT QVariant
@ -174,7 +167,8 @@ public:
QVariant( uint ); QVariant( uint );
QVariant( Q_LLONG ); QVariant( Q_LLONG );
QVariant( Q_ULLONG ); QVariant( Q_ULLONG );
QVariant( bool ); // ### Problems on some compilers ?
QVariant( bool, int );
QVariant( double ); QVariant( double );
QVariant( QSizePolicy ); QVariant( QSizePolicy );
@ -323,6 +317,13 @@ public:
void* rawAccess( void* ptr = 0, Type typ = Invalid, bool deepCopy = FALSE ); void* rawAccess( void* ptr = 0, Type typ = Invalid, bool deepCopy = FALSE );
}; };
// down here for GCC 2.7.* compatibility
#ifndef QT_H
#include "qvaluelist.h"
#include "qstringlist.h"
#include "qmap.h"
#endif // QT_H
inline QVariant::Type QVariant::type() const inline QVariant::Type QVariant::type() const
{ {
return d->typ; return d->typ;

@ -1044,7 +1044,7 @@ void QWidget::destroyMapper()
QWidgetIntDictIt it( *((QWidgetIntDict*)mapper) ); QWidgetIntDictIt it( *((QWidgetIntDict*)mapper) );
QWidgetMapper * myMapper = mapper; QWidgetMapper * myMapper = mapper;
mapper = 0; mapper = 0;
QWidget *w; register QWidget *w;
while ( (w=it.current()) ) { // remove parents widgets while ( (w=it.current()) ) { // remove parents widgets
++it; ++it;
if ( !w->parentObj ) // widget is a parent if ( !w->parentObj ) // widget is a parent
@ -4172,7 +4172,7 @@ void QWidget::showChildren( bool spontaneous )
{ {
if ( children() ) { if ( children() ) {
QObjectListIt it(*children()); QObjectListIt it(*children());
QObject *object; register QObject *object;
QWidget *widget; QWidget *widget;
while ( it ) { while ( it ) {
object = it.current(); object = it.current();
@ -4197,7 +4197,7 @@ void QWidget::hideChildren( bool spontaneous )
{ {
if ( children() ) { if ( children() ) {
QObjectListIt it(*children()); QObjectListIt it(*children());
QObject *object; register QObject *object;
QWidget *widget; QWidget *widget;
while ( it ) { while ( it ) {
object = it.current(); object = it.current();

@ -794,7 +794,7 @@ void QWidget::destroy( bool destroyWindow, bool destroySubWindows )
clearWState( WState_Created ); clearWState( WState_Created );
if ( children() ) { if ( children() ) {
QObjectListIt it(*children()); QObjectListIt it(*children());
QObject *obj; register QObject *obj;
while ( (obj=it.current()) ) { // destroy all widget children while ( (obj=it.current()) ) { // destroy all widget children
++it; ++it;
if ( obj->isWidgetType() ) if ( obj->isWidgetType() )
@ -1487,31 +1487,28 @@ void QWidget::grabMouse()
void QWidget::grabMouse( const QCursor &cursor ) void QWidget::grabMouse( const QCursor &cursor )
{ {
if ( !qt_nograb() ) { if ( !qt_nograb() ) {
if ( mouseGrb != this ) { if ( mouseGrb )
if ( mouseGrb ) { mouseGrb->releaseMouse();
mouseGrb->releaseMouse();
}
#if defined(QT_CHECK_STATE) #if defined(QT_CHECK_STATE)
int status = int status =
#endif #endif
XGrabPointer( x11Display(), winId(), False, XGrabPointer( x11Display(), winId(), False,
(uint)(ButtonPressMask | ButtonReleaseMask | (uint)(ButtonPressMask | ButtonReleaseMask |
PointerMotionMask | EnterWindowMask | LeaveWindowMask), PointerMotionMask | EnterWindowMask | LeaveWindowMask),
GrabModeAsync, GrabModeAsync, GrabModeAsync, GrabModeAsync,
None, cursor.handle(), qt_x_time ); None, cursor.handle(), qt_x_time );
#if defined(QT_CHECK_STATE) #if defined(QT_CHECK_STATE)
if ( status ) { if ( status ) {
const char *s = const char *s =
status == GrabNotViewable ? "\"GrabNotViewable\"" : status == GrabNotViewable ? "\"GrabNotViewable\"" :
status == AlreadyGrabbed ? "\"AlreadyGrabbed\"" : status == AlreadyGrabbed ? "\"AlreadyGrabbed\"" :
status == GrabFrozen ? "\"GrabFrozen\"" : status == GrabFrozen ? "\"GrabFrozen\"" :
status == GrabInvalidTime ? "\"GrabInvalidTime\"" : status == GrabInvalidTime ? "\"GrabInvalidTime\"" :
"<?>"; "<?>";
qWarning( "Grabbing the mouse failed with %s", s ); qWarning( "Grabbing the mouse failed with %s", s );
}
#endif
mouseGrb = this;
} }
#endif
mouseGrb = this;
} }
} }
@ -1551,13 +1548,11 @@ void QWidget::releaseMouse()
void QWidget::grabKeyboard() void QWidget::grabKeyboard()
{ {
if ( !qt_nograb() ) { if ( !qt_nograb() ) {
if ( keyboardGrb != this ) { if ( keyboardGrb )
if ( keyboardGrb ) { keyboardGrb->releaseKeyboard();
keyboardGrb->releaseKeyboard(); XGrabKeyboard( x11Display(), winid, False, GrabModeAsync, GrabModeAsync,
} qt_x_time );
XGrabKeyboard( x11Display(), winid, False, GrabModeAsync, GrabModeAsync, qt_x_time ); keyboardGrb = this;
keyboardGrb = this;
}
} }
} }
@ -2481,7 +2476,7 @@ void QWidget::scroll( int dx, int dy, const QRect& r )
if ( !valid_rect && children() ) { // scroll children if ( !valid_rect && children() ) { // scroll children
QPoint pd( dx, dy ); QPoint pd( dx, dy );
QObjectListIt it(*children()); QObjectListIt it(*children());
QObject *object; register QObject *object;
while ( it ) { // move all children while ( it ) { // move all children
object = it.current(); object = it.current();
if ( object->isWidgetType() ) { if ( object->isWidgetType() ) {

@ -188,4 +188,10 @@ typedef void (*QtCleanUpFunction)();
Q_EXPORT void qAddPostRoutine( QtCleanUpFunction ); Q_EXPORT void qAddPostRoutine( QtCleanUpFunction );
Q_EXPORT void qRemovePostRoutine( QtCleanUpFunction ); Q_EXPORT void qRemovePostRoutine( QtCleanUpFunction );
#if !defined(QT_CLEAN_NAMESPACE)
// source compatibility with Qt 2.x
typedef QtCleanUpFunction Q_CleanUpFunction;
#endif
#endif // QWINDOWDEFS_H #endif // QWINDOWDEFS_H

@ -724,8 +724,8 @@ QRegion QWMatrix::operator * (const QRegion &r ) const
return r; return r;
QMemArray<QRect> rects = r.rects(); QMemArray<QRect> rects = r.rects();
QRegion result; QRegion result;
QRect *rect = rects.data(); register QRect *rect = rects.data();
int i = rects.size(); register int i = rects.size();
if ( _m12 == 0.0F && _m21 == 0.0F && _m11 > 1.0F && _m22 > 1.0F ) { if ( _m12 == 0.0F && _m21 == 0.0F && _m11 > 1.0F && _m22 > 1.0F ) {
// simple case, no rotation // simple case, no rotation
while ( i ) { while ( i ) {

@ -2833,7 +2833,7 @@ void generateClass() // generate C++ source code for a class
{ {
const char *hdr1 = "/****************************************************************************\n" const char *hdr1 = "/****************************************************************************\n"
"** %s meta object code from reading C++ file '%s'\n**\n"; "** %s meta object code from reading C++ file '%s'\n**\n";
const char *hdr2 = "** Created by: The Qt Meta Object Compiler version %d (Qt %s)\n"; const char *hdr2 = "** Created: %s\n";
const char *hdr3 = "** WARNING! All changes made in this file will be lost!\n"; const char *hdr3 = "** WARNING! All changes made in this file will be lost!\n";
const char *hdr4 = "*****************************************************************************/\n\n"; const char *hdr4 = "*****************************************************************************/\n\n";
int i; int i;
@ -2863,6 +2863,8 @@ void generateClass() // generate C++ source code for a class
g->gen_count++; g->gen_count++;
if ( g->gen_count == 1 ) { // first class to be generated if ( g->gen_count == 1 ) { // first class to be generated
QDateTime dt = QDateTime::currentDateTime();
QCString dstr = dt.toString().ascii();
QCString fn = g->fileName; QCString fn = g->fileName;
i = g->fileName.length()-1; i = g->fileName.length()-1;
while ( i>0 && g->fileName[i-1] != '/' && g->fileName[i-1] != '\\' ) while ( i>0 && g->fileName[i-1] != '/' && g->fileName[i-1] != '\\' )
@ -2870,7 +2872,7 @@ void generateClass() // generate C++ source code for a class
if ( i >= 0 ) if ( i >= 0 )
fn = &g->fileName[i]; fn = &g->fileName[i];
fprintf( out, hdr1, (const char*)qualifiedClassName(),(const char*)fn); fprintf( out, hdr1, (const char*)qualifiedClassName(),(const char*)fn);
fprintf( out, hdr2, formatRevision, QT_VERSION_STR ); fprintf( out, hdr2, (const char*)dstr );
fprintf( out, "%s", hdr3 ); fprintf( out, "%s", hdr3 );
fprintf( out, "%s", hdr4 ); fprintf( out, "%s", hdr4 );
@ -3439,14 +3441,16 @@ void generateClass() // generate C++ source code for a class
} }
if ( it.current()->getfunc ) { if ( it.current()->getfunc ) {
if ( it.current()->gspec == Property::Pointer ) if ( it.current()->gspec == Property::Pointer )
fprintf( out, "\tcase 1: if ( this->%s() ) *v = QVariant( %s*%s() ); break;\n", fprintf( out, "\tcase 1: if ( this->%s() ) *v = QVariant( %s*%s()%s ); break;\n",
it.current()->getfunc->name.data(), it.current()->getfunc->name.data(),
!isVariantType( it.current()->type ) ? "(int)" : "", !isVariantType( it.current()->type ) ? "(int)" : "",
it.current()->getfunc->name.data()); it.current()->getfunc->name.data(),
it.current()->type == "bool" ? ", 0" : "" );
else else
fprintf( out, "\tcase 1: *v = QVariant( %sthis->%s() ); break;\n", fprintf( out, "\tcase 1: *v = QVariant( %sthis->%s()%s ); break;\n",
!isVariantType( it.current()->type ) ? "(int)" : "", !isVariantType( it.current()->type ) ? "(int)" : "",
it.current()->getfunc->name.data()); it.current()->getfunc->name.data(),
it.current()->type == "bool" ? ", 0" : "" );
} else if ( it.current()->override ) { } else if ( it.current()->override ) {
flag_propagate |= 1<< (1+1); flag_propagate |= 1<< (1+1);
} }

@ -1248,9 +1248,9 @@ extern int yylex (void);
*/ */
YY_DECL YY_DECL
{ {
yy_state_type yy_current_state; register yy_state_type yy_current_state;
char *yy_cp, *yy_bp; register char *yy_cp, *yy_bp;
int yy_act; register int yy_act;
#line 113 "moc.l" #line 113 "moc.l"
@ -1300,7 +1300,7 @@ YY_DECL
yy_match: yy_match:
do do
{ {
YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] ) if ( yy_accept[yy_current_state] )
{ {
(yy_last_accepting_state) = yy_current_state; (yy_last_accepting_state) = yy_current_state;
@ -2448,9 +2448,9 @@ case YY_STATE_EOF(IN_CLASSINFO):
*/ */
static int yy_get_next_buffer (void) static int yy_get_next_buffer (void)
{ {
char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
char *source = (yytext_ptr); register char *source = (yytext_ptr);
int number_to_move, i; register int number_to_move, i;
int ret_val; int ret_val;
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
@ -2582,15 +2582,15 @@ static int yy_get_next_buffer (void)
static yy_state_type yy_get_previous_state (void) static yy_state_type yy_get_previous_state (void)
{ {
yy_state_type yy_current_state; register yy_state_type yy_current_state;
char *yy_cp; register char *yy_cp;
yy_current_state = (yy_start); yy_current_state = (yy_start);
yy_current_state += YY_AT_BOL(); yy_current_state += YY_AT_BOL();
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
{ {
YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] ) if ( yy_accept[yy_current_state] )
{ {
(yy_last_accepting_state) = yy_current_state; (yy_last_accepting_state) = yy_current_state;
@ -2615,10 +2615,10 @@ static int yy_get_next_buffer (void)
*/ */
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
{ {
int yy_is_jam; register int yy_is_jam;
char *yy_cp = (yy_c_buf_p); register char *yy_cp = (yy_c_buf_p);
YY_CHAR yy_c = 1; register YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] ) if ( yy_accept[yy_current_state] )
{ {
(yy_last_accepting_state) = yy_current_state; (yy_last_accepting_state) = yy_current_state;
@ -2636,9 +2636,9 @@ static int yy_get_next_buffer (void)
return yy_is_jam ? 0 : yy_current_state; return yy_is_jam ? 0 : yy_current_state;
} }
static void yyunput (int c, char * yy_bp ) static void yyunput (int c, register char * yy_bp )
{ {
char *yy_cp; register char *yy_cp;
yy_cp = (yy_c_buf_p); yy_cp = (yy_c_buf_p);
@ -2648,10 +2648,10 @@ static int yy_get_next_buffer (void)
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */ { /* need to shift things up to make room */
/* +2 for EOB chars. */ /* +2 for EOB chars. */
int number_to_move = (yy_n_chars) + 2; register int number_to_move = (yy_n_chars) + 2;
char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
char *source = register char *source =
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
@ -3266,7 +3266,7 @@ int yylex_destroy (void)
#ifndef yytext_ptr #ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
{ {
int i; register int i;
for ( i = 0; i < n; ++i ) for ( i = 0; i < n; ++i )
s1[i] = s2[i]; s1[i] = s2[i];
} }
@ -3275,7 +3275,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
#ifdef YY_NEED_STRLEN #ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * s ) static int yy_flex_strlen (yyconst char * s )
{ {
int n; register int n;
for ( n = 0; s[n]; ++n ) for ( n = 0; s[n]; ++n )
; ;

@ -2112,7 +2112,7 @@ yystrlen (yystr)
# endif # endif
# ifndef yystpcpy # ifndef yystpcpy
# if defined __GLIBC__ && defined _STRING_H && defined _DEFAULT_SOURCE # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
# define yystpcpy stpcpy # define yystpcpy stpcpy
# else # else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
@ -5659,7 +5659,7 @@ void generateClass() // generate C++ source code for a class
{ {
const char *hdr1 = "/****************************************************************************\n" const char *hdr1 = "/****************************************************************************\n"
"** %s meta object code from reading C++ file '%s'\n**\n"; "** %s meta object code from reading C++ file '%s'\n**\n";
const char *hdr2 = "** Created by: The Qt Meta Object Compiler version %d (Qt %s)\n"; const char *hdr2 = "** Created: %s\n";
const char *hdr3 = "** WARNING! All changes made in this file will be lost!\n"; const char *hdr3 = "** WARNING! All changes made in this file will be lost!\n";
const char *hdr4 = "*****************************************************************************/\n\n"; const char *hdr4 = "*****************************************************************************/\n\n";
int i; int i;
@ -5689,6 +5689,8 @@ void generateClass() // generate C++ source code for a class
g->gen_count++; g->gen_count++;
if ( g->gen_count == 1 ) { // first class to be generated if ( g->gen_count == 1 ) { // first class to be generated
QDateTime dt = QDateTime::currentDateTime();
QCString dstr = dt.toString().ascii();
QCString fn = g->fileName; QCString fn = g->fileName;
i = g->fileName.length()-1; i = g->fileName.length()-1;
while ( i>0 && g->fileName[i-1] != '/' && g->fileName[i-1] != '\\' ) while ( i>0 && g->fileName[i-1] != '/' && g->fileName[i-1] != '\\' )
@ -5696,7 +5698,7 @@ void generateClass() // generate C++ source code for a class
if ( i >= 0 ) if ( i >= 0 )
fn = &g->fileName[i]; fn = &g->fileName[i];
fprintf( out, hdr1, (const char*)qualifiedClassName(),(const char*)fn); fprintf( out, hdr1, (const char*)qualifiedClassName(),(const char*)fn);
fprintf( out, hdr2, formatRevision, QT_VERSION_STR ); fprintf( out, hdr2, (const char*)dstr );
fprintf( out, "%s", hdr3 ); fprintf( out, "%s", hdr3 );
fprintf( out, "%s", hdr4 ); fprintf( out, "%s", hdr4 );
@ -6265,14 +6267,16 @@ void generateClass() // generate C++ source code for a class
} }
if ( it.current()->getfunc ) { if ( it.current()->getfunc ) {
if ( it.current()->gspec == Property::Pointer ) if ( it.current()->gspec == Property::Pointer )
fprintf( out, "\tcase 1: if ( this->%s() ) *v = QVariant( %s*%s() ); break;\n", fprintf( out, "\tcase 1: if ( this->%s() ) *v = QVariant( %s*%s()%s ); break;\n",
it.current()->getfunc->name.data(), it.current()->getfunc->name.data(),
!isVariantType( it.current()->type ) ? "(int)" : "", !isVariantType( it.current()->type ) ? "(int)" : "",
it.current()->getfunc->name.data()); it.current()->getfunc->name.data(),
it.current()->type == "bool" ? ", 0" : "" );
else else
fprintf( out, "\tcase 1: *v = QVariant( %sthis->%s() ); break;\n", fprintf( out, "\tcase 1: *v = QVariant( %sthis->%s()%s ); break;\n",
!isVariantType( it.current()->type ) ? "(int)" : "", !isVariantType( it.current()->type ) ? "(int)" : "",
it.current()->getfunc->name.data()); it.current()->getfunc->name.data(),
it.current()->type == "bool" ? ", 0" : "" );
} else if ( it.current()->override ) { } else if ( it.current()->override ) {
flag_propagate |= 1<< (1+1); flag_propagate |= 1<< (1+1);
} }

@ -102,7 +102,7 @@ static Q_UINT32 now()
return 0; return 0;
} }
#if defined(__RES) && (__RES >= 19980901) #if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 3)))
#define Q_MODERN_RES_API #define Q_MODERN_RES_API
#else #else
#endif #endif

@ -31,6 +31,7 @@ WIDGETS_CPP = widgets
SQL_CPP = sql SQL_CPP = sql
TABLE_CPP = table TABLE_CPP = table
DIALOGS_CPP = dialogs DIALOGS_CPP = dialogs
ICONVIEW_CPP = iconview
NETWORK_CPP = network NETWORK_CPP = network
OPENGL_CPP = opengl OPENGL_CPP = opengl
TOOLS_CPP = tools TOOLS_CPP = tools
@ -48,6 +49,7 @@ win32 {
WIDGETS_H = $$WIDGETS_CPP WIDGETS_H = $$WIDGETS_CPP
TABLE_H = $$TABLE_CPP TABLE_H = $$TABLE_CPP
DIALOGS_H = $$DIALOGS_CPP DIALOGS_H = $$DIALOGS_CPP
ICONVIEW_H = $$ICONVIEW_CPP
NETWORK_H = $$NETWORK_CPP NETWORK_H = $$NETWORK_CPP
OPENGL_H = $$OPENGL_CPP OPENGL_H = $$OPENGL_CPP
TOOLS_H = $$TOOLS_CPP TOOLS_H = $$TOOLS_CPP
@ -64,6 +66,7 @@ win32 {
WIDGETS_H = $$WIN_ALL_H WIDGETS_H = $$WIN_ALL_H
TABLE_H = $$WIN_ALL_H TABLE_H = $$WIN_ALL_H
DIALOGS_H = $$WIN_ALL_H DIALOGS_H = $$WIN_ALL_H
ICONVIEW_H = $$WIN_ALL_H
NETWORK_H = $$WIN_ALL_H NETWORK_H = $$WIN_ALL_H
OPENGL_H = $$WIN_ALL_H OPENGL_H = $$WIN_ALL_H
TOOLS_H = $$WIN_ALL_H TOOLS_H = $$WIN_ALL_H
@ -92,6 +95,7 @@ unix {
SQL_H = $$SQL_CPP SQL_H = $$SQL_CPP
TABLE_H = $$TABLE_CPP TABLE_H = $$TABLE_CPP
DIALOGS_H = $$DIALOGS_CPP DIALOGS_H = $$DIALOGS_CPP
ICONVIEW_H = $$ICONVIEW_CPP
NETWORK_H = $$NETWORK_CPP NETWORK_H = $$NETWORK_CPP
OPENGL_H = $$OPENGL_CPP OPENGL_H = $$OPENGL_CPP
TOOLS_H = $$TOOLS_CPP TOOLS_H = $$TOOLS_CPP
@ -113,7 +117,7 @@ embedded {
} }
DEPENDPATH += ;$$NETWORK_H;$$KERNEL_H;$$WIDGETS_H;$$INPUTMETHOD_H;$$SQL_H;$$TABLE_H;$$DIALOGS_H; DEPENDPATH += ;$$NETWORK_H;$$KERNEL_H;$$WIDGETS_H;$$INPUTMETHOD_H;$$SQL_H;$$TABLE_H;$$DIALOGS_H;
DEPENDPATH += $$OPENGL_H;$$TOOLS_H;$$CODECS_H;$$WORKSPACE_H;$$XML_H; DEPENDPATH += $$ICONVIEW_H;$$OPENGL_H;$$TOOLS_H;$$CODECS_H;$$WORKSPACE_H;$$XML_H;
DEPENDPATH += $$CANVAS_H;$$STYLES_H DEPENDPATH += $$CANVAS_H;$$STYLES_H
embedded:DEPENDPATH += ;$$EMBEDDED_H embedded:DEPENDPATH += ;$$EMBEDDED_H
@ -145,6 +149,7 @@ embedded:include($$KERNEL_CPP/qt_qws.pri)
include($$KERNEL_CPP/qt_kernel.pri) include($$KERNEL_CPP/qt_kernel.pri)
include($$WIDGETS_CPP/qt_widgets.pri) include($$WIDGETS_CPP/qt_widgets.pri)
include($$DIALOGS_CPP/qt_dialogs.pri) include($$DIALOGS_CPP/qt_dialogs.pri)
include($$ICONVIEW_CPP/qt_iconview.pri)
include($$WORKSPACE_CPP/qt_workspace.pri) include($$WORKSPACE_CPP/qt_workspace.pri)
include($$INPUTMETHOD_CPP/qt_inputmethod.pri) include($$INPUTMETHOD_CPP/qt_inputmethod.pri)
include($$NETWORK_CPP/qt_network.pri) include($$NETWORK_CPP/qt_network.pri)

@ -46,6 +46,21 @@
DEFINES *= QT_MODULE_WORKSPACE DEFINES *= QT_MODULE_WORKSPACE
} }
!iconview:contains( DEFINES, QT_INTERNAL_ICONVIEW ) {
CONFIG += iconview
ICONVIEW_CPP = $$QT_SOURCE_TREE/src/iconview
win32 {
WIN_ALL_H = $$QT_SOURCE_TREE/include
ICONVIEW_H = $$WIN_ALL_H
}
unix {
ICONVIEW_H = $$ICONVIEW_CPP
}
INCLUDEPATH += $$QT_SOURCE_TREE/src/iconview
include( $$QT_SOURCE_TREE/src/iconview/qt_iconview.pri )
DEFINES *= QT_MODULE_ICONVIEW
}
!canvas:contains( DEFINES, QT_INTERNAL_CANVAS ) { !canvas:contains( DEFINES, QT_INTERNAL_CANVAS ) {
CONFIG += canvas CONFIG += canvas
CANVAS_CPP = $$QT_SOURCE_TREE/src/canvas CANVAS_CPP = $$QT_SOURCE_TREE/src/canvas

@ -350,40 +350,30 @@ int QMYSQLResult::numRowsAffected()
static void qServerEnd() static void qServerEnd()
{ {
#ifndef Q_NO_MYSQL_EMBEDDED #ifndef Q_NO_MYSQL_EMBEDDED
#if !defined(MARIADB_BASE_VERSION) && !defined(MARIADB_VERSION_ID) # if MYSQL_VERSION_ID >= 40000
# if MYSQL_VERSION_ID > 40000
# if (MYSQL_VERSION_ID >= 40110 && MYSQL_VERSION_ID < 50000) || MYSQL_VERSION_ID >= 50003
mysql_library_end();
# else
mysql_server_end(); mysql_server_end();
# endif # endif // MYSQL_VERSION_ID
# endif #endif // Q_NO_MYSQL_EMBEDDED
#endif
#endif
} }
static void qServerInit() static void qServerInit()
{ {
#ifndef Q_NO_MYSQL_EMBEDDED #ifndef Q_NO_MYSQL_EMBEDDED
# if MYSQL_VERSION_ID >= 40000 # if MYSQL_VERSION_ID >= 40000
if (qMySqlInitHandledByUser || qMySqlConnectionCount > 1) if ( qMySqlInitHandledByUser || qMySqlConnectionCount > 1 )
return; return;
if ( // this should only be called once
# if (MYSQL_VERSION_ID >= 40110 && MYSQL_VERSION_ID < 50000) || MYSQL_VERSION_ID >= 50003 // has no effect on client/server library
mysql_library_init(0, 0, 0) // but is vital for the embedded lib
# else if ( mysql_server_init( 0, 0, 0 ) ) {
mysql_server_init(0, 0, 0) # ifdef QT_CHECK_RANGE
# endif qWarning( "QMYSQLDriver::qServerInit: unable to start server." );
) { # endif
qWarning("QMYSQLDriver::qServerInit: unable to start server.");
} }
# endif // MYSQL_VERSION_ID # endif // MYSQL_VERSION_ID
#endif // Q_NO_MYSQL_EMBEDDED #endif // Q_NO_MYSQL_EMBEDDED
#if defined(MARIADB_BASE_VERSION) || defined(MARIADB_VERSION_ID)
qAddPostRoutine(mysql_server_end);
#endif
} }
QMYSQLDriver::QMYSQLDriver( QObject * parent, const char * name ) QMYSQLDriver::QMYSQLDriver( QObject * parent, const char * name )
@ -505,7 +495,7 @@ bool QMYSQLDriver::open( const QString& db,
return FALSE; return FALSE;
} }
bool reconnect = 0; my_bool reconnect = 0;
for ( it = opts.begin(); it != opts.end(); ++it ) { for ( it = opts.begin(); it != opts.end(); ++it ) {
QString opt( (*it).upper() ); QString opt( (*it).upper() );
if ( opt == "CLIENT_COMPRESS" ) if ( opt == "CLIENT_COMPRESS" )

@ -147,10 +147,8 @@ static QVariant::Type qDecodePSQLType( int t )
case FLOAT8OID : case FLOAT8OID :
type = QVariant::Double; type = QVariant::Double;
break; break;
#ifdef ABSTIMEOID // PostgreSQL << 12.x
case ABSTIMEOID : case ABSTIMEOID :
case RELTIMEOID : case RELTIMEOID :
#endif
case DATEOID : case DATEOID :
type = QVariant::Date; type = QVariant::Date;
break; break;
@ -290,7 +288,7 @@ QVariant QPSQLResult::data( int i )
switch ( type ) { switch ( type ) {
case QVariant::Bool: case QVariant::Bool:
{ {
QVariant b ( (bool)(val == "t") ); QVariant b ( (bool)(val == "t"), 0 );
return ( b ); return ( b );
} }
case QVariant::String: case QVariant::String:

@ -68,7 +68,7 @@ void QSqlExtension::bindValue( const QString& placeholder, const QVariant& val,
if ( index.contains( (int)values.count() ) ) { if ( index.contains( (int)values.count() ) ) {
index[ (int)values.count() ] = placeholder; index[ (int)values.count() ] = placeholder;
} }
values[ placeholder ] = QSqlParam( val, tp ); values[ placeholder ] = Param( val, tp );
} }
void QSqlExtension::bindValue( int pos, const QVariant& val, QSql::ParameterType tp ) void QSqlExtension::bindValue( int pos, const QVariant& val, QSql::ParameterType tp )
@ -76,7 +76,7 @@ void QSqlExtension::bindValue( int pos, const QVariant& val, QSql::ParameterType
bindm = BindByPosition; bindm = BindByPosition;
index[ pos ] = QString::number( pos ); index[ pos ] = QString::number( pos );
QString nm = QString::number( pos ); QString nm = QString::number( pos );
values[ nm ] = QSqlParam( val, tp ); values[ nm ] = Param( val, tp );
} }
void QSqlExtension::addBindValue( const QVariant& val, QSql::ParameterType tp ) void QSqlExtension::addBindValue( const QVariant& val, QSql::ParameterType tp )
@ -128,10 +128,10 @@ QVariant QSqlExtension::boundValue( int pos ) const
return values[ index[ pos ] ].value; return values[ index[ pos ] ].value;
} }
QStringVariantMap QSqlExtension::boundValues() const QMap<QString, QVariant> QSqlExtension::boundValues() const
{ {
QMap<QString, QSqlParam>::ConstIterator it; QMap<QString, Param>::ConstIterator it;
QStringVariantMap m; QMap<QString, QVariant> m;
if ( bindm == BindByName ) { if ( bindm == BindByName ) {
for ( it = values.begin(); it != values.end(); ++it ) for ( it = values.begin(); it != values.end(); ++it )
m.insert( it.key(), it.data().value ); m.insert( it.key(), it.data().value );

@ -71,11 +71,11 @@
#define QM_TEMPLATE_EXTERN_SQL Q_TEMPLATE_EXTERN #define QM_TEMPLATE_EXTERN_SQL Q_TEMPLATE_EXTERN
#endif #endif
struct QSqlParam { struct Param {
QSqlParam( const QVariant& v = QVariant(), QSql::ParameterType t = QSql::In ): value( v ), typ( t ) {} Param( const QVariant& v = QVariant(), QSql::ParameterType t = QSql::In ): value( v ), typ( t ) {}
QVariant value; QVariant value;
QSql::ParameterType typ; QSql::ParameterType typ;
Q_DUMMY_COMPARISON_OPERATOR(QSqlParam) Q_DUMMY_COMPARISON_OPERATOR(Param)
}; };
struct Holder { struct Holder {
@ -102,7 +102,7 @@ public:
virtual QVariant parameterValue( int pos ); virtual QVariant parameterValue( int pos );
QVariant boundValue( const QString& holder ) const; QVariant boundValue( const QString& holder ) const;
QVariant boundValue( int pos ) const; QVariant boundValue( int pos ) const;
QStringVariantMap boundValues() const; QMap<QString, QVariant> boundValues() const;
void clear(); void clear();
void clearValues(); void clearValues();
void clearIndex(); void clearIndex();
@ -114,7 +114,7 @@ public:
int bindCount; int bindCount;
QMap<int, QString> index; QMap<int, QString> index;
typedef QMap<QString, QSqlParam> ValueMap; typedef QMap<QString, Param> ValueMap;
ValueMap values; ValueMap values;
// convenience container for QSqlQuery // convenience container for QSqlQuery

@ -1173,8 +1173,8 @@ QVariant QSqlQuery::boundValue( int pos ) const
QSqlQuery query; QSqlQuery query;
... ...
// Examine the bound values - bound using named binding // Examine the bound values - bound using named binding
QStringVariantMap::ConstIterator it; QMap<QString, QVariant>::ConstIterator it;
QStringVariantMap vals = query.boundValues(); QMap<QString, QVariant> vals = query.boundValues();
for ( it = vals.begin(); it != vals.end(); ++it ) for ( it = vals.begin(); it != vals.end(); ++it )
qWarning( "Placeholder: " + it.key() + ", Value: " + (*it).toString() ); qWarning( "Placeholder: " + it.key() + ", Value: " + (*it).toString() );
... ...
@ -1189,10 +1189,10 @@ QVariant QSqlQuery::boundValue( int pos ) const
\endcode \endcode
*/ */
QStringVariantMap QSqlQuery::boundValues() const QMap<QString,QVariant> QSqlQuery::boundValues() const
{ {
if ( !d->sqlResult || !d->sqlResult->extension() ) if ( !d->sqlResult || !d->sqlResult->extension() )
return QStringVariantMap(); return QMap<QString,QVariant>();
return d->sqlResult->extension()->boundValues(); return d->sqlResult->extension()->boundValues();
} }

@ -114,7 +114,7 @@ public:
void addBindValue( const QVariant& val, QSql::ParameterType type ); void addBindValue( const QVariant& val, QSql::ParameterType type );
QVariant boundValue( const QString& placeholder ) const; QVariant boundValue( const QString& placeholder ) const;
QVariant boundValue( int pos ) const; QVariant boundValue( int pos ) const;
QStringVariantMap boundValues() const; QMap<QString, QVariant> boundValues() const;
QString executedQuery() const; QString executedQuery() const;
protected: protected:

@ -5359,7 +5359,7 @@ void QTable::repaintSelections( QTableSelection *oldSelection,
} }
if ( updateHorizontal && numCols() > 0 && left >= 0 && !isRowSelection( selectionMode() ) ) { if ( updateHorizontal && numCols() > 0 && left >= 0 && !isRowSelection( selectionMode() ) ) {
int *s = &topHeader->states.data()[left]; register int *s = &topHeader->states.data()[left];
for ( i = left; i <= right; ++i ) { for ( i = left; i <= right; ++i ) {
if ( !isColumnSelected( i ) ) if ( !isColumnSelected( i ) )
*s = QTableHeader::Normal; *s = QTableHeader::Normal;
@ -5373,7 +5373,7 @@ void QTable::repaintSelections( QTableSelection *oldSelection,
} }
if ( updateVertical && numRows() > 0 && top >= 0 ) { if ( updateVertical && numRows() > 0 && top >= 0 ) {
int *s = &leftHeader->states.data()[top]; register int *s = &leftHeader->states.data()[top];
for ( i = top; i <= bottom; ++i ) { for ( i = top; i <= bottom; ++i ) {
if ( !isRowSelected( i ) ) if ( !isRowSelected( i ) )
*s = QTableHeader::Normal; *s = QTableHeader::Normal;
@ -6641,7 +6641,7 @@ void QTableHeader::setSectionStateToAll( SectionState state )
if ( isRowSelection( table->selectionMode() ) && orientation() == Horizontal ) if ( isRowSelection( table->selectionMode() ) && orientation() == Horizontal )
return; return;
int *d = (int *) states.data(); register int *d = (int *) states.data();
int n = count(); int n = count();
while (n >= 4) { while (n >= 4) {
@ -7053,7 +7053,7 @@ void QTableHeader::updateSelections()
int b = sectionAt( endPos ); int b = sectionAt( endPos );
int start = QMIN( a, b ); int start = QMIN( a, b );
int end = QMAX( a, b ); int end = QMAX( a, b );
int *s = states.data(); register int *s = states.data();
for ( int i = 0; i < count(); ++i ) { for ( int i = 0; i < count(); ++i ) {
if ( i < start || i > end ) if ( i < start || i > end )
*s = oldStates.data()[ i ]; *s = oldStates.data()[ i ];
@ -7079,8 +7079,8 @@ void QTableHeader::updateSelections()
void QTableHeader::saveStates() void QTableHeader::saveStates()
{ {
oldStates.resize( count() ); oldStates.resize( count() );
int *s = states.data(); register int *s = states.data();
int *s2 = oldStates.data(); register int *s2 = oldStates.data();
for ( int i = 0; i < count(); ++i ) { for ( int i = 0; i < count(); ++i ) {
*s2 = *s; *s2 = *s;
++s2; ++s2;

@ -372,7 +372,7 @@ bool QBitArray::toggleBit( uint index )
return FALSE; return FALSE;
} }
#endif #endif
uchar *p = (uchar *)data() + (index>>3); register uchar *p = (uchar *)data() + (index>>3);
uchar b = (1 << (index & 7)); // bit position uchar b = (1 << (index & 7)); // bit position
uchar c = *p & b; // read bit uchar c = *p & b; // read bit
*p ^= b; // toggle bit *p ^= b; // toggle bit
@ -436,8 +436,8 @@ bool QBitArray::toggleBit( uint index )
QBitArray &QBitArray::operator&=( const QBitArray &a ) QBitArray &QBitArray::operator&=( const QBitArray &a )
{ {
resize( QMAX(size(), a.size()) ); resize( QMAX(size(), a.size()) );
uchar *a1 = (uchar *)data(); register uchar *a1 = (uchar *)data();
uchar *a2 = (uchar *)a.data(); register uchar *a2 = (uchar *)a.data();
int n = QMIN( QByteArray::size(), a.QByteArray::size() ); int n = QMIN( QByteArray::size(), a.QByteArray::size() );
int p = QMAX( QByteArray::size(), a.QByteArray::size() ) - n; int p = QMAX( QByteArray::size(), a.QByteArray::size() ) - n;
while ( n-- > 0 ) while ( n-- > 0 )
@ -467,8 +467,8 @@ QBitArray &QBitArray::operator&=( const QBitArray &a )
QBitArray &QBitArray::operator|=( const QBitArray &a ) QBitArray &QBitArray::operator|=( const QBitArray &a )
{ {
resize( QMAX(size(), a.size()) ); resize( QMAX(size(), a.size()) );
uchar *a1 = (uchar *)data(); register uchar *a1 = (uchar *)data();
uchar *a2 = (uchar *)a.data(); register uchar *a2 = (uchar *)a.data();
int n = QMIN( QByteArray::size(), a.QByteArray::size() ); int n = QMIN( QByteArray::size(), a.QByteArray::size() );
while ( n-- > 0 ) while ( n-- > 0 )
*a1++ |= *a2++; *a1++ |= *a2++;
@ -495,8 +495,8 @@ QBitArray &QBitArray::operator|=( const QBitArray &a )
QBitArray &QBitArray::operator^=( const QBitArray &a ) QBitArray &QBitArray::operator^=( const QBitArray &a )
{ {
resize( QMAX(size(), a.size()) ); resize( QMAX(size(), a.size()) );
uchar *a1 = (uchar *)data(); register uchar *a1 = (uchar *)data();
uchar *a2 = (uchar *)a.data(); register uchar *a2 = (uchar *)a.data();
int n = QMIN( QByteArray::size(), a.QByteArray::size() ); int n = QMIN( QByteArray::size(), a.QByteArray::size() );
while ( n-- > 0 ) while ( n-- > 0 )
*a1++ ^= *a2++; *a1++ ^= *a2++;
@ -517,8 +517,8 @@ QBitArray &QBitArray::operator^=( const QBitArray &a )
QBitArray QBitArray::operator~() const QBitArray QBitArray::operator~() const
{ {
QBitArray a( size() ); QBitArray a( size() );
uchar *a1 = (uchar *)data(); register uchar *a1 = (uchar *)data();
uchar *a2 = (uchar *)a.data(); register uchar *a2 = (uchar *)a.data();
int n = QByteArray::size(); int n = QByteArray::size();
while ( n-- ) while ( n-- )
*a2++ = ~*a1++; *a2++ = ~*a1++;

@ -296,10 +296,10 @@ public: \
#ifndef Q_UCM_VERIFICATION_DATA #ifndef Q_UCM_VERIFICATION_DATA
# define Q_UCM_VERIFICATION_DATA \ # define Q_UCM_VERIFICATION_DATA \
static const char *qt_ucm_verification_data = \ static const char *qt_ucm_verification_data = \
"pattern=" "QT_UCM_VERIFICATION_DATA" "\n" \ "pattern=""QT_UCM_VERIFICATION_DATA""\n" \
"version=" QT_VERSION_STR "\n" \ "version="QT_VERSION_STR"\n" \
"flags=" Q_UCM_FLAGS_STRING "\n" \ "flags="Q_UCM_FLAGS_STRING"\n" \
"buildkey=" QT_BUILD_KEY "\0"; "buildkey="QT_BUILD_KEY"\0";
#endif // Q_UCM_VERIFICATION_DATA #endif // Q_UCM_VERIFICATION_DATA
// This macro expands to the default implementation of ucm_instantiate. // This macro expands to the default implementation of ucm_instantiate.

@ -72,8 +72,8 @@
void *qmemmove( void *dst, const void *src, uint len ) void *qmemmove( void *dst, const void *src, uint len )
{ {
char *d; register char *d;
char *s; register char *s;
if ( dst > src ) { if ( dst > src ) {
d = (char *)dst + len - 1; d = (char *)dst + len - 1;
s = (char *)src + len - 1; s = (char *)src + len - 1;
@ -218,8 +218,8 @@ char *qstrncpy( char *dst, const char *src, uint len )
int qstricmp( const char *str1, const char *str2 ) int qstricmp( const char *str1, const char *str2 )
{ {
const uchar *s1 = (const uchar *)str1; register const uchar *s1 = (const uchar *)str1;
const uchar *s2 = (const uchar *)str2; register const uchar *s2 = (const uchar *)str2;
int res; int res;
uchar c; uchar c;
if ( !s1 || !s2 ) if ( !s1 || !s2 )
@ -252,8 +252,8 @@ int qstricmp( const char *str1, const char *str2 )
int qstrnicmp( const char *str1, const char *str2, uint len ) int qstrnicmp( const char *str1, const char *str2, uint len )
{ {
const uchar *s1 = (const uchar *)str1; register const uchar *s1 = (const uchar *)str1;
const uchar *s2 = (const uchar *)str2; register const uchar *s2 = (const uchar *)str2;
int res; int res;
uchar c; uchar c;
if ( !s1 || !s2 ) if ( !s1 || !s2 )
@ -273,8 +273,8 @@ static bool crc_tbl_init = FALSE;
static void createCRC16Table() // build CRC16 lookup table static void createCRC16Table() // build CRC16 lookup table
{ {
uint i; register uint i;
uint j; register uint j;
uint v0, v1, v2, v3; uint v0, v1, v2, v3;
for ( i = 0; i < 16; i++ ) { for ( i = 0; i < 16; i++ ) {
v0 = i & 1; v0 = i & 1;
@ -322,7 +322,7 @@ Q_UINT16 qChecksum( const char *data, uint len )
crc_tbl_init = TRUE; crc_tbl_init = TRUE;
} }
} }
Q_UINT16 crc = 0xffff; register Q_UINT16 crc = 0xffff;
uchar c; uchar c;
uchar *p = (uchar *)data; uchar *p = (uchar *)data;
while ( len-- ) { while ( len-- ) {
@ -940,7 +940,7 @@ int QCString::find( char c, int index, bool cs ) const
{ {
if ( (uint)index >= size() ) // index outside string if ( (uint)index >= size() ) // index outside string
return -1; return -1;
const char *d; register const char *d;
if ( cs ) { // case sensitive if ( cs ) { // case sensitive
d = strchr( data()+index, c ); d = strchr( data()+index, c );
} else { } else {
@ -1056,8 +1056,8 @@ int QCString::find( const char *str, int index, bool cs, uint l ) const
int QCString::findRev( char c, int index, bool cs ) const int QCString::findRev( char c, int index, bool cs ) const
{ {
const char *b = data(); register const char *b = data();
const char *d; register const char *d;
if ( index < 0 ) if ( index < 0 )
index = length(); index = length();
if ( (uint)index >= size() ) if ( (uint)index >= size() )
@ -1290,7 +1290,7 @@ QCString QCString::mid( uint index, uint len ) const
} else { } else {
if ( len > slen-index ) if ( len > slen-index )
len = slen - index; len = slen - index;
char *p = data()+index; register char *p = data()+index;
QCString s( len+1 ); QCString s( len+1 );
strncpy( s.data(), p, len ); strncpy( s.data(), p, len );
*(s.data()+len) = '\0'; *(s.data()+len) = '\0';
@ -1390,7 +1390,7 @@ QCString QCString::rightJustify( uint width, char fill, bool truncate ) const
QCString QCString::lower() const QCString QCString::lower() const
{ {
QCString s( data() ); QCString s( data() );
char *p = s.data(); register char *p = s.data();
if ( p ) { if ( p ) {
while ( *p ) { while ( *p ) {
*p = tolower( (uchar) *p ); *p = tolower( (uchar) *p );
@ -1416,7 +1416,7 @@ QCString QCString::lower() const
QCString QCString::upper() const QCString QCString::upper() const
{ {
QCString s( data() ); QCString s( data() );
char *p = s.data(); register char *p = s.data();
if ( p ) { if ( p ) {
while ( *p ) { while ( *p ) {
*p = toupper(*p); *p = toupper(*p);
@ -1448,7 +1448,7 @@ QCString QCString::stripWhiteSpace() const
if ( isEmpty() ) // nothing to do if ( isEmpty() ) // nothing to do
return copy(); return copy();
char *s = data(); register char *s = data();
QCString result = s; QCString result = s;
int reslen = result.length(); int reslen = result.length();
if ( !isspace((uchar) s[0]) && !isspace((uchar) s[reslen-1]) ) if ( !isspace((uchar) s[0]) && !isspace((uchar) s[reslen-1]) )
@ -2107,7 +2107,7 @@ QCString &QCString::setNum( long n )
{ {
detach(); detach();
char buf[20]; char buf[20];
char *p = &buf[19]; register char *p = &buf[19];
bool neg; bool neg;
if ( n < 0 ) { if ( n < 0 ) {
neg = TRUE; neg = TRUE;
@ -2137,7 +2137,7 @@ QCString &QCString::setNum( ulong n )
{ {
detach(); detach();
char buf[20]; char buf[20];
char *p = &buf[19]; register char *p = &buf[19];
*p = '\0'; *p = '\0';
do { do {
*--p = ((int)(n%10)) + '0'; *--p = ((int)(n%10)) + '0';
@ -2195,7 +2195,7 @@ QCString &QCString::setNum( double n, char f, int prec )
qWarning( "QCString::setNum: Invalid format char '%c'", f ); qWarning( "QCString::setNum: Invalid format char '%c'", f );
#endif #endif
char format[20]; char format[20];
char *fs = format; // generate format string register char *fs = format; // generate format string
*fs++ = '%'; // "%.<prec>l<f>" *fs++ = '%'; // "%.<prec>l<f>"
if ( prec > 99 ) if ( prec > 99 )
prec = 99; prec = 99;

@ -81,6 +81,20 @@ Q_EXPORT int qstricmp( const char *, const char * );
Q_EXPORT int qstrnicmp( const char *, const char *, uint len ); Q_EXPORT int qstrnicmp( const char *, const char *, uint len );
#ifndef QT_CLEAN_NAMESPACE
Q_EXPORT inline uint cstrlen( const char *str )
{ return (uint)strlen(str); }
Q_EXPORT inline char *cstrcpy( char *dst, const char *src )
{ return strcpy(dst,src); }
Q_EXPORT inline int cstrcmp( const char *str1, const char *str2 )
{ return strcmp(str1,str2); }
Q_EXPORT inline int cstrncmp( const char *str1, const char *str2, uint len )
{ return strncmp(str1,str2,len); }
#endif
// qChecksum: Internet checksum // qChecksum: Internet checksum

@ -493,7 +493,7 @@ extern "C" long long __strtoll( const char *, char**, int );
static Q_INT64 read_int_ascii( QDataStream *s ) static Q_INT64 read_int_ascii( QDataStream *s )
{ {
int n = 0; register int n = 0;
char buf[40]; char buf[40];
for ( ;; ) { for ( ;; ) {
buf[n] = s->device()->getch(); buf[n] = s->device()->getch();
@ -575,7 +575,7 @@ QDataStream &QDataStream::operator>>( Q_INT16 &i )
} else if ( noswap ) { // no conversion needed } else if ( noswap ) { // no conversion needed
dev->readBlock( (char *)&i, sizeof(Q_INT16) ); dev->readBlock( (char *)&i, sizeof(Q_INT16) );
} else { // swap bytes } else { // swap bytes
uchar *p = (uchar *)(&i); register uchar *p = (uchar *)(&i);
char b[2]; char b[2];
if (dev->readBlock( b, 2 ) >= 2) { if (dev->readBlock( b, 2 ) >= 2) {
*p++ = b[1]; *p++ = b[1];
@ -687,7 +687,7 @@ QDataStream &QDataStream::operator>>( Q_LONG &i )
} else if ( noswap ) { // no conversion needed } else if ( noswap ) { // no conversion needed
dev->readBlock( (char *)&i, sizeof(Q_LONG) ); dev->readBlock( (char *)&i, sizeof(Q_LONG) );
} else { // swap bytes } else { // swap bytes
uchar *p = (uchar *)(&i); register uchar *p = (uchar *)(&i);
char b[sizeof(Q_LONG)]; char b[sizeof(Q_LONG)];
if (dev->readBlock( b, sizeof(Q_LONG) ) >= (int)sizeof(Q_LONG)) { if (dev->readBlock( b, sizeof(Q_LONG) ) >= (int)sizeof(Q_LONG)) {
for ( int j = sizeof(Q_LONG); j; ) { for ( int j = sizeof(Q_LONG); j; ) {
@ -701,7 +701,7 @@ QDataStream &QDataStream::operator>>( Q_LONG &i )
static double read_double_ascii( QDataStream *s ) static double read_double_ascii( QDataStream *s )
{ {
int n = 0; register int n = 0;
char buf[80]; char buf[80];
for ( ;; ) { for ( ;; ) {
buf[n] = s->device()->getch(); buf[n] = s->device()->getch();
@ -759,7 +759,7 @@ QDataStream &QDataStream::operator>>( double &f )
} else if ( noswap ) { // no conversion needed } else if ( noswap ) { // no conversion needed
dev->readBlock( (char *)&f, sizeof(double) ); dev->readBlock( (char *)&f, sizeof(double) );
} else { // swap bytes } else { // swap bytes
uchar *p = (uchar *)(&f); register uchar *p = (uchar *)(&f);
char b[8]; char b[8];
if (dev->readBlock( b, 8 ) >= 8) { if (dev->readBlock( b, 8 ) >= 8) {
*p++ = b[7]; *p++ = b[7];
@ -841,7 +841,7 @@ QDataStream &QDataStream::readRawBytes( char *s, uint len )
{ {
CHECK_STREAM_PRECOND CHECK_STREAM_PRECOND
if ( printable ) { // printable data if ( printable ) { // printable data
Q_INT8 *p = (Q_INT8*)s; register Q_INT8 *p = (Q_INT8*)s;
if ( version() < 4 ) { if ( version() < 4 ) {
while ( len-- ) { while ( len-- ) {
Q_INT32 tmp; Q_INT32 tmp;
@ -918,7 +918,7 @@ QDataStream &QDataStream::operator<<( Q_INT16 i )
} else if ( noswap ) { // no conversion needed } else if ( noswap ) { // no conversion needed
dev->writeBlock( (char *)&i, sizeof(Q_INT16) ); dev->writeBlock( (char *)&i, sizeof(Q_INT16) );
} else { // swap bytes } else { // swap bytes
uchar *p = (uchar *)(&i); register uchar *p = (uchar *)(&i);
char b[2]; char b[2];
b[1] = *p++; b[1] = *p++;
b[0] = *p; b[0] = *p;
@ -944,7 +944,7 @@ QDataStream &QDataStream::operator<<( Q_INT32 i )
} else if ( noswap ) { // no conversion needed } else if ( noswap ) { // no conversion needed
dev->writeBlock( (char *)&i, sizeof(Q_INT32) ); dev->writeBlock( (char *)&i, sizeof(Q_INT32) );
} else { // swap bytes } else { // swap bytes
uchar *p = (uchar *)(&i); register uchar *p = (uchar *)(&i);
char b[4]; char b[4];
b[3] = *p++; b[3] = *p++;
b[2] = *p++; b[2] = *p++;
@ -987,7 +987,7 @@ QDataStream &QDataStream::operator<<( Q_INT64 i )
} else if ( noswap ) { // no conversion needed } else if ( noswap ) { // no conversion needed
dev->writeBlock( (char *)&i, sizeof(Q_INT64) ); dev->writeBlock( (char *)&i, sizeof(Q_INT64) );
} else { // swap bytes } else { // swap bytes
uchar *p = (uchar *)(&i); register uchar *p = (uchar *)(&i);
char b[8]; char b[8];
b[7] = *p++; b[7] = *p++;
b[6] = *p++; b[6] = *p++;
@ -1027,7 +1027,7 @@ QDataStream &QDataStream::operator<<( Q_LONG i )
} else if ( noswap ) { // no conversion needed } else if ( noswap ) { // no conversion needed
dev->writeBlock( (char *)&i, sizeof(Q_LONG) ); dev->writeBlock( (char *)&i, sizeof(Q_LONG) );
} else { // swap bytes } else { // swap bytes
uchar *p = (uchar *)(&i); register uchar *p = (uchar *)(&i);
char b[sizeof(Q_LONG)]; char b[sizeof(Q_LONG)];
for ( int j = sizeof(Q_LONG); j; ) for ( int j = sizeof(Q_LONG); j; )
b[--j] = *p++; b[--j] = *p++;
@ -1064,7 +1064,7 @@ QDataStream &QDataStream::operator<<( float f )
if ( noswap ) { // no conversion needed if ( noswap ) { // no conversion needed
dev->writeBlock( (char *)&g, sizeof(float) ); dev->writeBlock( (char *)&g, sizeof(float) );
} else { // swap bytes } else { // swap bytes
uchar *p = (uchar *)(&g); register uchar *p = (uchar *)(&g);
char b[4]; char b[4];
b[3] = *p++; b[3] = *p++;
b[2] = *p++; b[2] = *p++;
@ -1094,7 +1094,7 @@ QDataStream &QDataStream::operator<<( double f )
} else if ( noswap ) { // no conversion needed } else if ( noswap ) { // no conversion needed
dev->writeBlock( (char *)&f, sizeof(double) ); dev->writeBlock( (char *)&f, sizeof(double) );
} else { // swap bytes } else { // swap bytes
uchar *p = (uchar *)(&f); register uchar *p = (uchar *)(&f);
char b[8]; char b[8];
b[7] = *p++; b[7] = *p++;
b[6] = *p++; b[6] = *p++;
@ -1163,11 +1163,11 @@ QDataStream &QDataStream::writeRawBytes( const char *s, uint len )
CHECK_STREAM_PRECOND CHECK_STREAM_PRECOND
if ( printable ) { // write printable if ( printable ) { // write printable
if ( version() < 4 ) { if ( version() < 4 ) {
char *p = (char *)s; register char *p = (char *)s;
while ( len-- ) while ( len-- )
*this << *p++; *this << *p++;
} else { } else {
Q_INT8 *p = (Q_INT8*)s; register Q_INT8 *p = (Q_INT8*)s;
while ( len-- ) while ( len-- )
*this << *p++; *this << *p++;
} }

@ -1997,7 +1997,7 @@ QDateTime::QDateTime( const QDate &date, const QTime &time )
\sa setTime_t() \sa setTime_t()
*/ */
time_t QDateTime::toTime_t() const uint QDateTime::toTime_t() const
{ {
tm brokenDown; tm brokenDown;
brokenDown.tm_sec = t.second(); brokenDown.tm_sec = t.second();
@ -2007,10 +2007,10 @@ time_t QDateTime::toTime_t() const
brokenDown.tm_mon = d.month() - 1; brokenDown.tm_mon = d.month() - 1;
brokenDown.tm_year = d.year() - 1900; brokenDown.tm_year = d.year() - 1900;
brokenDown.tm_isdst = -1; brokenDown.tm_isdst = -1;
time_t secsSince1Jan1970UTC = mktime( &brokenDown ); int secsSince1Jan1970UTC = (int) mktime( &brokenDown );
if ( secsSince1Jan1970UTC < -1 ) if ( secsSince1Jan1970UTC < -1 )
secsSince1Jan1970UTC = -1; secsSince1Jan1970UTC = -1;
return secsSince1Jan1970UTC; return (uint) secsSince1Jan1970UTC;
} }
/*! /*!
@ -2020,7 +2020,7 @@ time_t QDateTime::toTime_t() const
based on the given UTC time. based on the given UTC time.
*/ */
void QDateTime::setTime_t( time_t secsSince1Jan1970UTC ) void QDateTime::setTime_t( uint secsSince1Jan1970UTC )
{ {
setTime_t( secsSince1Jan1970UTC, Qt::LocalTime ); setTime_t( secsSince1Jan1970UTC, Qt::LocalTime );
} }
@ -2037,9 +2037,9 @@ void QDateTime::setTime_t( time_t secsSince1Jan1970UTC )
\sa toTime_t() \sa toTime_t()
*/ */
void QDateTime::setTime_t( time_t secsSince1Jan1970UTC, Qt::TimeSpec ts ) void QDateTime::setTime_t( uint secsSince1Jan1970UTC, Qt::TimeSpec ts )
{ {
time_t tmp = secsSince1Jan1970UTC; time_t tmp = (time_t) secsSince1Jan1970UTC;
tm *brokenDown = 0; tm *brokenDown = 0;
#if defined(Q_OS_UNIX) && defined(QT_THREAD_SUPPORT) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) #if defined(Q_OS_UNIX) && defined(QT_THREAD_SUPPORT) && defined(_POSIX_THREAD_SAFE_FUNCTIONS)

@ -46,7 +46,6 @@
#include "qnamespace.h" #include "qnamespace.h"
#endif // QT_H #endif // QT_H
#include <time.h>
/***************************************************************************** /*****************************************************************************
QDate class QDate class
@ -197,11 +196,11 @@ public:
QDate date() const { return d; } QDate date() const { return d; }
QTime time() const { return t; } QTime time() const { return t; }
time_t toTime_t() const; uint toTime_t() const;
void setDate( const QDate &date ) { d = date; } void setDate( const QDate &date ) { d = date; }
void setTime( const QTime &time ) { t = time; } void setTime( const QTime &time ) { t = time; }
void setTime_t( time_t secsSince1Jan1970UTC ); void setTime_t( uint secsSince1Jan1970UTC );
void setTime_t( time_t secsSince1Jan1970UTC, Qt::TimeSpec ); void setTime_t( uint secsSince1Jan1970UTC, Qt::TimeSpec );
#ifndef QT_NO_DATESTRING #ifndef QT_NO_DATESTRING
#ifndef QT_NO_SPRINTF #ifndef QT_NO_SPRINTF
QString toString( Qt::DateFormat f = Qt::TextDate ) const; QString toString( Qt::DateFormat f = Qt::TextDate ) const;

@ -55,7 +55,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <limits.h> #include <limits.h>
#include <errno.h> #include <errno.h>
#include <sys/param.h>
void QDir::slashify( QString& ) void QDir::slashify( QString& )
@ -75,7 +74,7 @@ QString QDir::homeDirPath()
QString QDir::canonicalPath() const QString QDir::canonicalPath() const
{ {
QString r; QString r;
#if !defined(PATH_MAX) #if defined(__GLIBC__) && !defined(PATH_MAX)
char *cur = ::get_current_dir_name(); char *cur = ::get_current_dir_name();
if ( cur ) { if ( cur ) {
char *tmp = canonicalize_file_name( QFile::encodeName( dPath ).data() ); char *tmp = canonicalize_file_name( QFile::encodeName( dPath ).data() );
@ -104,7 +103,7 @@ QString QDir::canonicalPath() const
// FIXME // FIXME
} }
} }
#endif /* !PATH_MAX */ #endif /* __GLIBC__ && !PATH_MAX */
return r; return r;
} }
@ -166,7 +165,7 @@ QString QDir::currentDirPath()
struct stat st; struct stat st;
if ( ::stat( ".", &st ) == 0 ) { if ( ::stat( ".", &st ) == 0 ) {
#if !defined(PATH_MAX) #if defined(__GLIBC__) && !defined(PATH_MAX)
char *currentName = ::get_current_dir_name(); char *currentName = ::get_current_dir_name();
if ( currentName ) { if ( currentName ) {
result = QFile::decodeName(currentName); result = QFile::decodeName(currentName);
@ -176,7 +175,7 @@ QString QDir::currentDirPath()
char currentName[PATH_MAX+1]; char currentName[PATH_MAX+1];
if ( ::getcwd( currentName, PATH_MAX ) ) if ( ::getcwd( currentName, PATH_MAX ) )
result = QFile::decodeName(currentName); result = QFile::decodeName(currentName);
#endif /* !PATH_MAX */ #endif /* __GLIBC__ && !PATH_MAX */
#if defined(QT_DEBUG) #if defined(QT_DEBUG)
if ( result.isNull() ) if ( result.isNull() )
qWarning( "QDir::currentDirPath: getcwd() failed" ); qWarning( "QDir::currentDirPath: getcwd() failed" );

@ -133,7 +133,7 @@ QString QFileInfo::readLink() const
if ( !isSymLink() ) if ( !isSymLink() )
return QString(); return QString();
#if defined(Q_OS_UNIX) && !defined(Q_OS_OS2EMX) #if defined(Q_OS_UNIX) && !defined(Q_OS_OS2EMX)
#if !defined(PATH_MAX) #if defined(__GLIBC__) && !defined(PATH_MAX)
int size = 256; int size = 256;
char *s = NULL, *s2; char *s = NULL, *s2;
@ -165,7 +165,7 @@ QString QFileInfo::readLink() const
s[len] = '\0'; s[len] = '\0';
return QFile::decodeName(s); return QFile::decodeName(s);
} }
#endif /* !PATH_MAX */ #endif /* __GLIBC__ && !PATH_MAX */
#endif /* Q_OS_UNIX && !Q_OS_OS2EMX */ #endif /* Q_OS_UNIX && !Q_OS_OS2EMX */
#if !defined(QWS) && defined(Q_OS_MAC) #if !defined(QWS) && defined(Q_OS_MAC)
{ {

@ -324,17 +324,17 @@ bool QGArray::fill( const char *d, int len, uint sz )
if ( sz == 1 ) // 8 bit elements if ( sz == 1 ) // 8 bit elements
memset( data(), *d, len ); memset( data(), *d, len );
else if ( sz == 4 ) { // 32 bit elements else if ( sz == 4 ) { // 32 bit elements
Q_INT32 *x = (Q_INT32*)data(); register Q_INT32 *x = (Q_INT32*)data();
Q_INT32 v = *((Q_INT32*)d); Q_INT32 v = *((Q_INT32*)d);
while ( len-- ) while ( len-- )
*x++ = v; *x++ = v;
} else if ( sz == 2 ) { // 16 bit elements } else if ( sz == 2 ) { // 16 bit elements
Q_INT16 *x = (Q_INT16*)data(); register Q_INT16 *x = (Q_INT16*)data();
Q_INT16 v = *((Q_INT16*)d); Q_INT16 v = *((Q_INT16*)d);
while ( len-- ) while ( len-- )
*x++ = v; *x++ = v;
} else { // any other size elements } else { // any other size elements
char *x = data(); register char *x = data();
while ( len-- ) { // more complicated while ( len-- ) { // more complicated
memcpy( x, d, sz ); memcpy( x, d, sz );
x += sz; x += sz;
@ -400,7 +400,7 @@ QGArray &QGArray::duplicate( const QGArray &a )
if ( a.shd == shd ) { // a.duplicate(a) ! if ( a.shd == shd ) { // a.duplicate(a) !
if ( shd->count > 1 ) { if ( shd->count > 1 ) {
shd->count--; shd->count--;
array_data *n = newData(); register array_data *n = newData();
Q_CHECK_PTR( n ); Q_CHECK_PTR( n );
if ( (n->len=shd->len) ) { if ( (n->len=shd->len) ) {
n->data = NEW(char,n->len); n->data = NEW(char,n->len);
@ -605,11 +605,11 @@ int QGArray::find( const char *d, uint index, uint sz ) const
#endif #endif
return -1; return -1;
} }
uint i; register uint i;
uint ii; uint ii;
switch ( sz ) { switch ( sz ) {
case 1: { // 8 bit elements case 1: { // 8 bit elements
char *x = data() + index; register char *x = data() + index;
char v = *d; char v = *d;
for ( i=index; i<shd->len; i++ ) { for ( i=index; i<shd->len; i++ ) {
if ( *x++ == v ) if ( *x++ == v )
@ -619,7 +619,7 @@ int QGArray::find( const char *d, uint index, uint sz ) const
} }
break; break;
case 2: { // 16 bit elements case 2: { // 16 bit elements
Q_INT16 *x = (Q_INT16*)(data() + index); register Q_INT16 *x = (Q_INT16*)(data() + index);
Q_INT16 v = *((Q_INT16*)d); Q_INT16 v = *((Q_INT16*)d);
for ( i=index; i<shd->len; i+=2 ) { for ( i=index; i<shd->len; i+=2 ) {
if ( *x++ == v ) if ( *x++ == v )
@ -629,7 +629,7 @@ int QGArray::find( const char *d, uint index, uint sz ) const
} }
break; break;
case 4: { // 32 bit elements case 4: { // 32 bit elements
Q_INT32 *x = (Q_INT32*)(data() + index); register Q_INT32 *x = (Q_INT32*)(data() + index);
Q_INT32 v = *((Q_INT32*)d); Q_INT32 v = *((Q_INT32*)d);
for ( i=index; i<shd->len; i+=4 ) { for ( i=index; i<shd->len; i+=4 ) {
if ( *x++ == v ) if ( *x++ == v )
@ -659,11 +659,11 @@ int QGArray::find( const char *d, uint index, uint sz ) const
int QGArray::contains( const char *d, uint sz ) const int QGArray::contains( const char *d, uint sz ) const
{ {
uint i = shd->len; register uint i = shd->len;
int count = 0; int count = 0;
switch ( sz ) { switch ( sz ) {
case 1: { // 8 bit elements case 1: { // 8 bit elements
char *x = data(); register char *x = data();
char v = *d; char v = *d;
while ( i-- ) { while ( i-- ) {
if ( *x++ == v ) if ( *x++ == v )
@ -672,7 +672,7 @@ int QGArray::contains( const char *d, uint sz ) const
} }
break; break;
case 2: { // 16 bit elements case 2: { // 16 bit elements
Q_INT16 *x = (Q_INT16*)data(); register Q_INT16 *x = (Q_INT16*)data();
Q_INT16 v = *((Q_INT16*)d); Q_INT16 v = *((Q_INT16*)d);
i /= 2; i /= 2;
while ( i-- ) { while ( i-- ) {
@ -682,7 +682,7 @@ int QGArray::contains( const char *d, uint sz ) const
} }
break; break;
case 4: { // 32 bit elements case 4: { // 32 bit elements
Q_INT32 *x = (Q_INT32*)data(); register Q_INT32 *x = (Q_INT32*)data();
Q_INT32 v = *((Q_INT32*)d); Q_INT32 v = *((Q_INT32*)d);
i /= 4; i /= 4;
while ( i-- ) { while ( i-- ) {

@ -589,7 +589,7 @@ bool QGCache::makeRoomFor( int cost, int priority )
return FALSE; // than maximum cost return FALSE; // than maximum cost
if ( priority == -1 ) if ( priority == -1 )
priority = 32767; priority = 32767;
QCacheItem *ci = lruList->last(); register QCacheItem *ci = lruList->last();
int cntCost = 0; int cntCost = 0;
int dumps = 0; // number of items to dump int dumps = 0; // number of items to dump
while ( cntCost < cost && ci && ci->skipPriority <= priority ) { while ( cntCost < cost && ci && ci->skipPriority <= priority ) {

@ -95,7 +95,7 @@ int QGDict::hashKeyString( const QString &key )
qWarning( "QGDict::hashKeyString: Invalid null key" ); qWarning( "QGDict::hashKeyString: Invalid null key" );
#endif #endif
int i; int i;
uint h=0; register uint h=0;
uint g; uint g;
const QChar *p = key.unicode(); const QChar *p = key.unicode();
if ( cases ) { // case sensitive if ( cases ) { // case sensitive
@ -129,8 +129,8 @@ int QGDict::hashKeyAscii( const char *key )
if ( key == 0 ) if ( key == 0 )
qWarning( "QGDict::hashAsciiKey: Invalid null key" ); qWarning( "QGDict::hashAsciiKey: Invalid null key" );
#endif #endif
const char *k = key; register const char *k = key;
uint h=0; register uint h=0;
uint g; uint g;
if ( cases ) { // case sensitive if ( cases ) { // case sensitive
while ( *k ) { while ( *k ) {
@ -1080,8 +1080,8 @@ QPtrCollection::Item QGDictIterator::toFirst()
curNode = 0; curNode = 0;
return 0; return 0;
} }
uint i = 0; register uint i = 0;
QBaseBucket **v = dict->vec; register QBaseBucket **v = dict->vec;
while ( !(*v++) ) while ( !(*v++) )
i++; i++;
curNode = dict->vec[i]; curNode = dict->vec[i];
@ -1125,8 +1125,8 @@ QPtrCollection::Item QGDictIterator::operator++()
return 0; return 0;
curNode = curNode->getNext(); curNode = curNode->getNext();
if ( !curNode ) { // no next bucket if ( !curNode ) { // no next bucket
uint i = curIndex + 1; // look from next vec element register uint i = curIndex + 1; // look from next vec element
QBaseBucket **v = &dict->vec[i]; register QBaseBucket **v = &dict->vec[i];
while ( i < dict->size() && !(*v++) ) while ( i < dict->size() && !(*v++) )
i++; i++;
if ( i == dict->size() ) { // nothing found if ( i == dict->size() ) { // nothing found

@ -350,7 +350,7 @@ QLNode *QGList::locate( uint index )
curNode = firstNode; curNode = firstNode;
curIndex = 0; curIndex = 0;
} }
QLNode *node; register QLNode *node;
int distance = index - curIndex; // node distance to cur node int distance = index - curIndex; // node distance to cur node
bool forward; // direction to traverse bool forward; // direction to traverse
@ -405,7 +405,7 @@ void QGList::inSort( QPtrCollection::Item d )
//mutex->lock(); //mutex->lock();
#endif #endif
int index = 0; int index = 0;
QLNode *n = firstNode; register QLNode *n = firstNode;
while ( n && compareItems(n->data,d) < 0 ){ // find position in list while ( n && compareItems(n->data,d) < 0 ){ // find position in list
n = n->next; n = n->next;
index++; index++;
@ -426,7 +426,7 @@ void QGList::prepend( QPtrCollection::Item d )
#if defined(QT_THREAD_SUPPORT) #if defined(QT_THREAD_SUPPORT)
//mutex->lock(); //mutex->lock();
#endif #endif
QLNode *n = new QLNode( newItem(d) ); register QLNode *n = new QLNode( newItem(d) );
Q_CHECK_PTR( n ); Q_CHECK_PTR( n );
n->prev = 0; n->prev = 0;
if ( (n->next = firstNode) ) // list is not empty if ( (n->next = firstNode) ) // list is not empty
@ -451,7 +451,7 @@ void QGList::append( QPtrCollection::Item d )
#if defined(QT_THREAD_SUPPORT) #if defined(QT_THREAD_SUPPORT)
//mutex->lock(); //mutex->lock();
#endif #endif
QLNode *n = new QLNode( newItem(d) ); register QLNode *n = new QLNode( newItem(d) );
Q_CHECK_PTR( n ); Q_CHECK_PTR( n );
n->next = 0; n->next = 0;
if ( (n->prev = lastNode) ) { // list is not empty if ( (n->prev = lastNode) ) { // list is not empty
@ -500,7 +500,7 @@ bool QGList::insertAt( uint index, QPtrCollection::Item d )
return FALSE; return FALSE;
} }
QLNode *prevNode = nextNode->prev; QLNode *prevNode = nextNode->prev;
QLNode *n = new QLNode( newItem(d) ); register QLNode *n = new QLNode( newItem(d) );
Q_CHECK_PTR( n ); Q_CHECK_PTR( n );
nextNode->prev = n; nextNode->prev = n;
Q_ASSERT( (!((curIndex > 0) && (!prevNode))) ); Q_ASSERT( (!((curIndex > 0) && (!prevNode))) );
@ -564,7 +564,7 @@ QLNode *QGList::unlink()
#endif #endif
return 0; return 0;
} }
QLNode *n = curNode; // unlink this node register QLNode *n = curNode; // unlink this node
if ( n == firstNode ) { // removing first node ? if ( n == firstNode ) { // removing first node ?
if ( (firstNode = n->next) ) { if ( (firstNode = n->next) ) {
firstNode->prev = 0; firstNode->prev = 0;
@ -881,7 +881,7 @@ void QGList::clear()
#if defined(QT_THREAD_SUPPORT) #if defined(QT_THREAD_SUPPORT)
//mutex->lock(); //mutex->lock();
#endif #endif
QLNode *n = firstNode; register QLNode *n = firstNode;
firstNode = lastNode = curNode = 0; // initialize list firstNode = lastNode = curNode = 0; // initialize list
numNodes = 0; numNodes = 0;
@ -914,7 +914,7 @@ int QGList::findRef( QPtrCollection::Item d, bool fromStart )
#if defined(QT_THREAD_SUPPORT) #if defined(QT_THREAD_SUPPORT)
//mutex->lock(); //mutex->lock();
#endif #endif
QLNode *n; register QLNode *n;
int index; int index;
if ( fromStart ) { // start from first node if ( fromStart ) { // start from first node
n = firstNode; n = firstNode;
@ -946,7 +946,7 @@ int QGList::find( QPtrCollection::Item d, bool fromStart )
#if defined(QT_THREAD_SUPPORT) #if defined(QT_THREAD_SUPPORT)
//mutex->lock(); //mutex->lock();
#endif #endif
QLNode *n; register QLNode *n;
int index; int index;
if ( fromStart ) { // start from first node if ( fromStart ) { // start from first node
n = firstNode; n = firstNode;
@ -977,7 +977,7 @@ uint QGList::containsRef( QPtrCollection::Item d ) const
#if defined(QT_THREAD_SUPPORT) #if defined(QT_THREAD_SUPPORT)
//mutex->lock(); //mutex->lock();
#endif #endif
QLNode *n = firstNode; register QLNode *n = firstNode;
uint count = 0; uint count = 0;
while ( n ) { // for all nodes... while ( n ) { // for all nodes...
if ( n->data == d ) // count # exact matches if ( n->data == d ) // count # exact matches
@ -1000,7 +1000,7 @@ uint QGList::contains( QPtrCollection::Item d ) const
#if defined(QT_THREAD_SUPPORT) #if defined(QT_THREAD_SUPPORT)
//mutex->lock(); //mutex->lock();
#endif #endif
QLNode *n = firstNode; register QLNode *n = firstNode;
uint count = 0; uint count = 0;
QGList *that = (QGList*)this; // mutable for compareItems() QGList *that = (QGList*)this; // mutable for compareItems()
while ( n ) { // for all nodes... while ( n ) { // for all nodes...
@ -1167,7 +1167,7 @@ void QGList::toVector( QGVector *vector ) const
#endif #endif
return; return;
} }
QLNode *n = firstNode; register QLNode *n = firstNode;
uint i = 0; uint i = 0;
while ( n ) { while ( n ) {
vector->insert( i, n->data ); vector->insert( i, n->data );

@ -41,7 +41,6 @@
#include "qplatformdefs.h" #include "qplatformdefs.h"
#include "qasciidict.h" #include "qasciidict.h"
#include <qdatetime.h>
#include <limits.h> #include <limits.h>
#include <stdio.h> #include <stdio.h>
#include <limits.h> #include <limits.h>
@ -465,27 +464,46 @@ static void mac_default_handler( const char *msg )
#endif #endif
void handle_buffer(const char *buf, QtMsgType msgType)
void qDebug( const char *msg, ... )
{ {
char buf[QT_BUFFER_LENGTH];
va_list ap;
va_start( ap, msg ); // use variable arg list
#if defined(QT_VSNPRINTF)
QT_VSNPRINTF( buf, QT_BUFFER_LENGTH, msg, ap );
#else
vsprintf( buf, msg, ap );
#endif
va_end( ap );
if ( handler ) { if ( handler ) {
(*handler)( msgType, buf ); (*handler)( QtDebugMsg, buf );
} else if (msgType == QtFatalMsg) { } else {
#if defined(Q_CC_MWERKS) #if defined(Q_CC_MWERKS)
mac_default_handler(buf); mac_default_handler(buf);
#elif defined(Q_OS_TEMP)
QString fstr( buf );
OutputDebugString( (fstr + "\n").ucs2() );
#else #else
fprintf( stderr, "%s\n", buf ); // add newline fprintf( stderr, "%s\n", buf ); // add newline
#endif #endif
#if defined(Q_OS_UNIX) && defined(QT_DEBUG) }
abort(); // trap; generates core dump }
#elif defined(Q_OS_TEMP) && defined(QT_DEBUG)
QString fstr; // copied... this looks really bad.
fstr.sprintf( "%s:%s %s %s\n", __FILE__, __LINE__, QT_VERSION_STR, buf ); void debug( const char *msg, ... )
OutputDebugString( fstr.ucs2() ); {
#elif defined(_CRT_ERROR) && defined(_DEBUG) char buf[QT_BUFFER_LENGTH];
_CrtDbgReport( _CRT_ERROR, __FILE__, __LINE__, QT_VERSION_STR, buf ); va_list ap;
va_start( ap, msg ); // use variable arg list
#if defined(QT_VSNPRINTF)
QT_VSNPRINTF( buf, QT_BUFFER_LENGTH, msg, ap );
#else #else
exit( 1 ); // goodbye cruel world vsprintf( buf, msg, ap );
#endif #endif
va_end( ap );
if ( handler ) {
(*handler)( QtDebugMsg, buf );
} else { } else {
#if defined(Q_CC_MWERKS) #if defined(Q_CC_MWERKS)
mac_default_handler(buf); mac_default_handler(buf);
@ -498,109 +516,123 @@ void handle_buffer(const char *buf, QtMsgType msgType)
} }
} }
void qDebug( const QString &msg ) void qWarning( const char *msg, ... )
{
char buf[QT_BUFFER_LENGTH];
strcpy( buf, QDateTime::currentDateTime().toString("[yyyy/MM/dd hh:mm:ss.zzz] ").local8Bit() );
int len = strlen(buf);
strncpy( &buf[len], msg.local8Bit(), QT_BUFFER_LENGTH - len - 1 );
len += msg.length();
if (len >= QT_BUFFER_LENGTH) {
len = QT_BUFFER_LENGTH - 1;
}
buf[len] = '\0';
handle_buffer(buf, QtDebugMsg);
}
void qDebug( const char *msg, ... )
{ {
char buf[QT_BUFFER_LENGTH]; char buf[QT_BUFFER_LENGTH];
strcpy( buf, QDateTime::currentDateTime().toString("[yyyy/MM/dd hh:mm:ss.zzz] ").local8Bit() );
int len = strlen(buf);
va_list ap; va_list ap;
va_start( ap, msg ); // use variable arg list va_start( ap, msg ); // use variable arg list
#if defined(QT_VSNPRINTF) #if defined(QT_VSNPRINTF)
QT_VSNPRINTF( &buf[len], QT_BUFFER_LENGTH, msg, ap ); QT_VSNPRINTF( buf, QT_BUFFER_LENGTH, msg, ap );
#else #else
vsprintf( &buf[len], msg, ap ); vsprintf( buf, msg, ap );
#endif #endif
va_end( ap ); va_end( ap );
handle_buffer(buf, QtDebugMsg); if ( handler ) {
(*handler)( QtWarningMsg, buf );
} else {
#if defined(Q_CC_MWERKS)
mac_default_handler(buf);
#elif defined(Q_OS_TEMP)
QString fstr( buf );
OutputDebugString( (fstr + "\n").ucs2() );
#else
fprintf( stderr, "%s\n", buf ); // add newline
#endif
}
} }
void qDebug( const QCString &s )
{
qDebug(s.data());
}
void qWarning( const QString &msg ) // again, copied
void warning( const char *msg, ... )
{ {
char buf[QT_BUFFER_LENGTH]; char buf[QT_BUFFER_LENGTH];
strcpy( buf, QDateTime::currentDateTime().toString("[yyyy/MM/dd hh:mm:ss.zzz] ").local8Bit() ); va_list ap;
int len = strlen(buf); va_start( ap, msg ); // use variable arg list
strncpy( &buf[len], msg.local8Bit(), QT_BUFFER_LENGTH - len - 1 ); #if defined(QT_VSNPRINTF)
len += msg.length(); QT_VSNPRINTF( buf, QT_BUFFER_LENGTH, msg, ap );
if (len >= QT_BUFFER_LENGTH) { #else
len = QT_BUFFER_LENGTH - 1; vsprintf( buf, msg, ap );
#endif
va_end( ap );
if ( handler ) {
(*handler)( QtWarningMsg, buf );
} else {
#if defined(Q_CC_MWERKS)
mac_default_handler(buf);
#elif defined(Q_OS_TEMP)
QString fstr( buf );
OutputDebugString( (fstr + "\n").ucs2() );
#else
fprintf( stderr, "%s\n", buf ); // add newline
#endif
} }
buf[len] = '\0';
handle_buffer(buf, QtWarningMsg);
} }
void qWarning( const char *msg, ... ) void qFatal( const char *msg, ... )
{ {
char buf[QT_BUFFER_LENGTH]; char buf[QT_BUFFER_LENGTH];
strcpy( buf, QDateTime::currentDateTime().toString("[yyyy/MM/dd hh:mm:ss.zzz] ").local8Bit() );
int len = strlen(buf);
va_list ap; va_list ap;
va_start( ap, msg ); // use variable arg list va_start( ap, msg ); // use variable arg list
#if defined(QT_VSNPRINTF) #if defined(QT_VSNPRINTF)
QT_VSNPRINTF( &buf[len], QT_BUFFER_LENGTH, msg, ap ); QT_VSNPRINTF( buf, QT_BUFFER_LENGTH, msg, ap );
#else #else
vsprintf( &buf[len], msg, ap ); vsprintf( buf, msg, ap );
#endif #endif
va_end( ap ); va_end( ap );
handle_buffer(buf, QtWarningMsg); if ( handler ) {
} (*handler)( QtFatalMsg, buf );
} else {
void qWarning( const QCString &s ) #if defined(Q_CC_MWERKS)
{ mac_default_handler(buf);
qWarning(s.data()); #else
} fprintf( stderr, "%s\n", buf ); // add newline
#endif
void qFatal( const QString &msg ) #if defined(Q_OS_UNIX) && defined(QT_DEBUG)
{ abort(); // trap; generates core dump
char buf[QT_BUFFER_LENGTH]; #elif defined(Q_OS_TEMP) && defined(QT_DEBUG)
strcpy( buf, QDateTime::currentDateTime().toString("[yyyy/MM/dd hh:mm:ss.zzz] ").local8Bit() ); QString fstr;
int len = strlen(buf); fstr.sprintf( "%s:%s %s %s\n", __FILE__, __LINE__, QT_VERSION_STR, buf );
strncpy( &buf[len], msg.local8Bit(), QT_BUFFER_LENGTH - len - 1 ); OutputDebugString( fstr.ucs2() );
len += msg.length(); #elif defined(_CRT_ERROR) && defined(_DEBUG)
if (len >= QT_BUFFER_LENGTH) { _CrtDbgReport( _CRT_ERROR, __FILE__, __LINE__, QT_VERSION_STR, buf );
len = QT_BUFFER_LENGTH - 1; #else
exit( 1 ); // goodbye cruel world
#endif
} }
buf[len] = '\0';
handle_buffer(buf, QtFatalMsg);
} }
void qFatal( const char *msg, ... ) // yet again, copied
void fatal( const char *msg, ... )
{ {
char buf[QT_BUFFER_LENGTH]; char buf[QT_BUFFER_LENGTH];
strcpy( buf, QDateTime::currentDateTime().toString("[yyyy/MM/dd hh:mm:ss.zzz] ").local8Bit() );
int len = strlen(buf);
va_list ap; va_list ap;
va_start( ap, msg ); // use variable arg list va_start( ap, msg ); // use variable arg list
#if defined(QT_VSNPRINTF) #if defined(QT_VSNPRINTF)
QT_VSNPRINTF( &buf[len], QT_BUFFER_LENGTH, msg, ap ); QT_VSNPRINTF( buf, QT_BUFFER_LENGTH, msg, ap );
#else #else
vsprintf( &buf[len], msg, ap ); vsprintf( buf, msg, ap );
#endif #endif
va_end( ap ); va_end( ap );
handle_buffer(buf, QtFatalMsg); if ( handler ) {
} (*handler)( QtFatalMsg, buf );
} else {
void qFatal( const QCString &s ) #if defined(Q_CC_MWERKS)
{ mac_default_handler(buf);
qWarning(s.data()); #else
fprintf( stderr, "%s\n", buf ); // add newline
#endif
#if defined(Q_OS_UNIX) && defined(QT_DEBUG)
abort(); // trap; generates core dump
#elif defined(Q_OS_TEMP) && defined(QT_DEBUG)
QString fstr;
fstr.sprintf( "%s:%s %s %s\n", __FILE__, __LINE__, QT_VERSION_STR, buf );
OutputDebugString( fstr.ucs2() );
#elif defined(_CRT_ERROR) && defined(_DEBUG)
_CrtDbgReport( _CRT_ERROR, __FILE__, __LINE__, QT_VERSION_STR, buf );
#else
exit( 1 ); // goodbye cruel world
#endif
}
} }
/*! /*!

@ -700,6 +700,16 @@ inline int qRound( double d )
// Size-dependent types (architechture-dependent byte order) // Size-dependent types (architechture-dependent byte order)
// //
#if !defined(QT_CLEAN_NAMESPACE)
// source compatibility with Qt 1.x
typedef signed char INT8; // 8 bit signed
typedef unsigned char UINT8; // 8 bit unsigned
typedef short INT16; // 16 bit signed
typedef unsigned short UINT16; // 16 bit unsigned
typedef int INT32; // 32 bit signed
typedef unsigned int UINT32; // 32 bit unsigned
#endif
typedef signed char Q_INT8; // 8 bit signed typedef signed char Q_INT8; // 8 bit signed
typedef unsigned char Q_UINT8; // 8 bit unsigned typedef unsigned char Q_UINT8; // 8 bit unsigned
typedef short Q_INT16; // 16 bit signed typedef short Q_INT16; // 16 bit signed
@ -741,9 +751,8 @@ typedef Q_UINT64 Q_ULLONG; // unsigned long long
// Data stream functions is provided by many classes (defined in qdatastream.h) // Data stream functions is provided by many classes (defined in qdatastream.h)
// //
class QCString;
class QDataStream; class QDataStream;
class QString;
// //
// Feature subsetting // Feature subsetting
@ -780,6 +789,12 @@ class QString;
#ifndef QT_MODULE_DIALOGS #ifndef QT_MODULE_DIALOGS
# define QT_NO_DIALOG # define QT_NO_DIALOG
#endif #endif
#ifndef QT_MODULE_ICONVIEW
# define QT_NO_ICONVIEW
#endif
#ifndef QT_MODULE_WORKSPACE
# define QT_NO_WORKSPACE
#endif
#ifndef QT_MODULE_NETWORK #ifndef QT_MODULE_NETWORK
#define QT_NO_NETWORK #define QT_NO_NETWORK
#endif #endif
@ -958,25 +973,19 @@ Q_EXPORT int qWinVersion();
#endif #endif
Q_EXPORT void qDebug( const QString& ); // print debug message Q_EXPORT void qDebug( const char *, ... ) // print debug message
Q_EXPORT void qDebug( const QCString& ); // print debug message
Q_EXPORT void qDebug( const char *, ... ) // print debug message
#if defined(Q_CC_GNU) && !defined(__INSURE__) #if defined(Q_CC_GNU) && !defined(__INSURE__)
__attribute__ ((format (printf, 1, 2))) __attribute__ ((format (printf, 1, 2)))
#endif #endif
; ;
Q_EXPORT void qWarning( const QString& ); // print warning message Q_EXPORT void qWarning( const char *, ... ) // print warning message
Q_EXPORT void qWarning( const QCString& ); // print warning message
Q_EXPORT void qWarning( const char *, ... ) // print warning message
#if defined(Q_CC_GNU) && !defined(__INSURE__) #if defined(Q_CC_GNU) && !defined(__INSURE__)
__attribute__ ((format (printf, 1, 2))) __attribute__ ((format (printf, 1, 2)))
#endif #endif
; ;
Q_EXPORT void qFatal( const QString& ); // print fatal message and exit Q_EXPORT void qFatal( const char *, ... ) // print fatal message and exit
Q_EXPORT void qFatal( const QCString& ); // print fatal message and exit
Q_EXPORT void qFatal( const char *, ... ) // print fatal message and exit
#if defined(Q_CC_GNU) #if defined(Q_CC_GNU)
__attribute__ ((format (printf, 1, 2))) __attribute__ ((format (printf, 1, 2)))
#endif #endif
@ -984,6 +993,28 @@ Q_EXPORT void qFatal( const char *, ... ) // print fatal message and exit
Q_EXPORT void qSystemWarning( const char *, int code = -1 ); Q_EXPORT void qSystemWarning( const char *, int code = -1 );
#if !defined(QT_CLEAN_NAMESPACE) // compatibility with Qt 1
Q_EXPORT void debug( const char *, ... ) // print debug message
#if defined(Q_CC_GNU) && !defined(__INSURE__)
__attribute__ ((format (printf, 1, 2)))
#endif
;
Q_EXPORT void warning( const char *, ... ) // print warning message
#if defined(Q_CC_GNU) && !defined(__INSURE__)
__attribute__ ((format (printf, 1, 2)))
#endif
;
Q_EXPORT void fatal( const char *, ... ) // print fatal message and exit
#if defined(Q_CC_GNU) && !defined(__INSURE__)
__attribute__ ((format (printf, 1, 2)))
#endif
;
#endif // QT_CLEAN_NAMESPACE
#if !defined(Q_ASSERT) #if !defined(Q_ASSERT)
# if defined(QT_CHECK_STATE) # if defined(QT_CHECK_STATE)
@ -1014,6 +1045,12 @@ Q_EXPORT bool qt_check_pointer( bool c, const char *, int );
# define Q_CHECK_PTR(p) # define Q_CHECK_PTR(p)
#endif #endif
#if !defined(QT_NO_COMPAT) // compatibility with Qt 2
# if !defined(CHECK_PTR)
# define CHECK_PTR(x) Q_CHECK_PTR(x)
# endif
#endif // QT_NO_COMPAT
enum QtMsgType { QtDebugMsg, QtWarningMsg, QtFatalMsg }; enum QtMsgType { QtDebugMsg, QtWarningMsg, QtFatalMsg };
typedef void (*QtMsgHandler)(QtMsgType, const char *); typedef void (*QtMsgHandler)(QtMsgType, const char *);
@ -1044,7 +1081,6 @@ Q_EXPORT const char *qInstallPathPlugins();
Q_EXPORT const char *qInstallPathData(); Q_EXPORT const char *qInstallPathData();
Q_EXPORT const char *qInstallPathTranslations(); Q_EXPORT const char *qInstallPathTranslations();
Q_EXPORT const char *qInstallPathSysconf(); Q_EXPORT const char *qInstallPathSysconf();
Q_EXPORT const char *qInstallPathShare();
#endif /* __cplusplus */ #endif /* __cplusplus */

@ -388,8 +388,8 @@ void QGVector::sort() // sort vector
{ {
if ( count() == 0 ) // no elements if ( count() == 0 ) // no elements
return; return;
Item *start = &vec[0]; register Item *start = &vec[0];
Item *end = &vec[len-1]; register Item *end = &vec[len-1];
Item tmp; Item tmp;
for (;;) { // put all zero elements behind for (;;) { // put all zero elements behind
while ( start < end && *start != 0 ) while ( start < end && *start != 0 )

@ -163,8 +163,8 @@ static char *_qdtoa(double d, int mode, int ndigits, int *decpt,
int *sign, char **rve, char **digits_str); int *sign, char **rve, char **digits_str);
static double qstrtod(const char *s00, char const **se, bool *ok); static double qstrtod(const char *s00, char const **se, bool *ok);
#endif #endif
static Q_LLONG qstrtoll(const char *nptr, const char **endptr, int base, bool *ok); static Q_LLONG qstrtoll(const char *nptr, const char **endptr, register int base, bool *ok);
static Q_ULLONG qstrtoull(const char *nptr, const char **endptr, int base, bool *ok); static Q_ULLONG qstrtoull(const char *nptr, const char **endptr, register int base, bool *ok);
static inline bool compareBits(double d1, double d2) static inline bool compareBits(double d1, double d2)
{ {
@ -3797,13 +3797,13 @@ Q_ULLONG QLocalePrivate::stringToUnsLongLong(QString num, int base,
* Ignores `locale' stuff. Assumes that the upper and lower case * Ignores `locale' stuff. Assumes that the upper and lower case
* alphabets and digits are each contiguous. * alphabets and digits are each contiguous.
*/ */
static Q_ULLONG qstrtoull(const char *nptr, const char **endptr, int base, bool *ok) static Q_ULLONG qstrtoull(const char *nptr, const char **endptr, register int base, bool *ok)
{ {
const char *s = nptr; register const char *s = nptr;
Q_ULLONG acc; register Q_ULLONG acc;
unsigned char c; register unsigned char c;
Q_ULLONG qbase, cutoff; register Q_ULLONG qbase, cutoff;
int neg, any, cutlim; register int neg, any, cutlim;
if (ok != 0) if (ok != 0)
*ok = TRUE; *ok = TRUE;
@ -3878,13 +3878,13 @@ static Q_ULLONG qstrtoull(const char *nptr, const char **endptr, int base, bool
* Ignores `locale' stuff. Assumes that the upper and lower case * Ignores `locale' stuff. Assumes that the upper and lower case
* alphabets and digits are each contiguous. * alphabets and digits are each contiguous.
*/ */
static Q_LLONG qstrtoll(const char *nptr, const char **endptr, int base, bool *ok) static Q_LLONG qstrtoll(const char *nptr, const char **endptr, register int base, bool *ok)
{ {
const char *s; register const char *s;
Q_ULLONG acc; register Q_ULLONG acc;
unsigned char c; register unsigned char c;
Q_ULLONG qbase, cutoff; register Q_ULLONG qbase, cutoff;
int neg, any, cutlim; register int neg, any, cutlim;
if (ok != 0) if (ok != 0)
*ok = TRUE; *ok = TRUE;

@ -45,8 +45,8 @@
typedef pthread_mutex_t Q_MUTEX_T; typedef pthread_mutex_t Q_MUTEX_T;
// POSIX threads mutex types // POSIX threads mutex types
#if (defined(PTHREAD_MUTEX_RECURSIVE) && defined(PTHREAD_MUTEX_DEFAULT)) && \ #if ((defined(PTHREAD_MUTEX_RECURSIVE) && defined(PTHREAD_MUTEX_DEFAULT)) || \
!defined(Q_OS_UNIXWARE) && !defined(Q_OS_SOLARIS) && \ defined(Q_OS_FREEBSD)) && !defined(Q_OS_UNIXWARE) && !defined(Q_OS_SOLARIS) && \
!defined(Q_OS_MAC) !defined(Q_OS_MAC)
// POSIX 1003.1c-1995 - We love this OS // POSIX 1003.1c-1995 - We love this OS
# define Q_MUTEX_SET_TYPE(a, b) pthread_mutexattr_settype((a), (b)) # define Q_MUTEX_SET_TYPE(a, b) pthread_mutexattr_settype((a), (b))
@ -72,6 +72,7 @@ typedef pthread_mutex_t Q_MUTEX_T;
#include "qmutex_p.h" #include "qmutex_p.h"
#include <errno.h> #include <errno.h>
#include <stdint.h>
#include <string.h> #include <string.h>
// Private class declarations // Private class declarations
@ -105,8 +106,7 @@ public:
int level(); int level();
int count; int count;
pthread_t owner; unsigned long owner;
bool is_owned;
pthread_mutex_t handle2; pthread_mutex_t handle2;
}; };
#endif // !Q_RECURSIVE_MUTEX_TYPE #endif // !Q_RECURSIVE_MUTEX_TYPE
@ -207,7 +207,7 @@ int QRealMutexPrivate::level()
#ifndef Q_RECURSIVE_MUTEX_TYPE #ifndef Q_RECURSIVE_MUTEX_TYPE
QRecursiveMutexPrivate::QRecursiveMutexPrivate() QRecursiveMutexPrivate::QRecursiveMutexPrivate()
: count(0), is_owned(false) : count(0), owner(0)
{ {
pthread_mutexattr_t attr; pthread_mutexattr_t attr;
pthread_mutexattr_init(&attr); pthread_mutexattr_init(&attr);
@ -244,15 +244,14 @@ void QRecursiveMutexPrivate::lock()
{ {
pthread_mutex_lock(&handle2); pthread_mutex_lock(&handle2);
if (count > 0 && pthread_equal(owner, pthread_self()) ) { if (count > 0 && owner == (unsigned long) pthread_self()) {
count++; count++;
} else { } else {
pthread_mutex_unlock(&handle2); pthread_mutex_unlock(&handle2);
pthread_mutex_lock(&handle); pthread_mutex_lock(&handle);
pthread_mutex_lock(&handle2); pthread_mutex_lock(&handle2);
count = 1; count = 1;
owner = pthread_self(); owner = (unsigned long) pthread_self();
is_owned = true;
} }
pthread_mutex_unlock(&handle2); pthread_mutex_unlock(&handle2);
@ -262,7 +261,7 @@ void QRecursiveMutexPrivate::unlock()
{ {
pthread_mutex_lock(&handle2); pthread_mutex_lock(&handle2);
if ( is_owned && pthread_equal(owner, pthread_self()) ) { if (owner == (unsigned long) pthread_self()) {
// do nothing if the count is already 0... to reflect the behaviour described // do nothing if the count is already 0... to reflect the behaviour described
// in the docs // in the docs
if (count && (--count) < 1) { if (count && (--count) < 1) {
@ -272,6 +271,8 @@ void QRecursiveMutexPrivate::unlock()
} else { } else {
#ifdef QT_CHECK_RANGE #ifdef QT_CHECK_RANGE
qWarning("QMutex::unlock: unlock from different thread than locker"); qWarning("QMutex::unlock: unlock from different thread than locker");
qWarning(" was locked by %d, unlock attempt from %lu",
(int)owner, (uintptr_t)pthread_self());
#endif #endif
} }
@ -308,7 +309,7 @@ bool QRecursiveMutexPrivate::trylock()
pthread_mutex_lock(&handle2); pthread_mutex_lock(&handle2);
if ( count > 0 && pthread_equal(owner, pthread_self()) ) { if ( count > 0 && owner == (unsigned long) pthread_self() ) {
count++; count++;
} else { } else {
int code = pthread_mutex_trylock(&handle); int code = pthread_mutex_trylock(&handle);
@ -322,8 +323,7 @@ bool QRecursiveMutexPrivate::trylock()
ret = FALSE; ret = FALSE;
} else { } else {
count = 1; count = 1;
owner = pthread_self(); owner = (unsigned long) pthread_self();
is_owned = true;
} }
} }

@ -103,7 +103,6 @@ public:
uint containsRef( const type *d ) const uint containsRef( const type *d ) const
{ return QGList::containsRef((QPtrCollection::Item)d); } { return QGList::containsRef((QPtrCollection::Item)d); }
bool replace( uint i, const type *d ) { return QGList::replaceAt( i, (QPtrCollection::Item)d ); } bool replace( uint i, const type *d ) { return QGList::replaceAt( i, (QPtrCollection::Item)d ); }
type *operator[]( uint i ) { return (type *)QGList::at(i); }
type *at( uint i ) { return (type *)QGList::at(i); } type *at( uint i ) { return (type *)QGList::at(i); }
int at() const { return QGList::at(); } int at() const { return QGList::at(); }
type *current() const { return (type *)QGList::get(); } type *current() const { return (type *)QGList::get(); }

@ -4,7 +4,6 @@
** **
** Created : 920722 ** Created : 920722
** **
** Copyright (C) 2015 Timothy Pearson. All rights reserved.
** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. ** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved.
** **
** This file is part of the tools module of the Qt GUI Toolkit. ** This file is part of the tools module of the Qt GUI Toolkit.
@ -576,7 +575,7 @@ bool QChar::isSymbol() const
int QChar::digitValue() const int QChar::digitValue() const
{ {
#ifndef QT_NO_UNICODETABLES #ifndef QT_NO_UNICODETABLES
int pos = QUnicodeTables::decimal_info[row()]; register int pos = QUnicodeTables::decimal_info[row()];
if( !pos ) if( !pos )
return -1; return -1;
return QUnicodeTables::decimal_info[(pos<<8) + cell()]; return QUnicodeTables::decimal_info[(pos<<8) + cell()];
@ -654,7 +653,7 @@ static QString shared_decomp;
const QString &QChar::decomposition() const const QString &QChar::decomposition() const
{ {
#ifndef QT_NO_UNICODETABLES #ifndef QT_NO_UNICODETABLES
int pos = QUnicodeTables::decomposition_info[row()]; register int pos = QUnicodeTables::decomposition_info[row()];
if(!pos) return QString::null; if(!pos) return QString::null;
pos = QUnicodeTables::decomposition_info[(pos<<8)+cell()]; pos = QUnicodeTables::decomposition_info[(pos<<8)+cell()];
@ -681,7 +680,7 @@ const QString &QChar::decomposition() const
QChar::Decomposition QChar::decompositionTag() const QChar::Decomposition QChar::decompositionTag() const
{ {
#ifndef QT_NO_UNICODETABLES #ifndef QT_NO_UNICODETABLES
int pos = QUnicodeTables::decomposition_info[row()]; register int pos = QUnicodeTables::decomposition_info[row()];
if(!pos) return QChar::Single; if(!pos) return QChar::Single;
pos = QUnicodeTables::decomposition_info[(pos<<8)+cell()]; pos = QUnicodeTables::decomposition_info[(pos<<8)+cell()];
@ -961,7 +960,7 @@ private:
QLigature::QLigature( QChar c ) QLigature::QLigature( QChar c )
{ {
int pos = QUnicodeTables::ligature_info[c.row()]; register int pos = QUnicodeTables::ligature_info[c.row()];
if( !pos ) if( !pos )
ligatures = 0; ligatures = 0;
else else
@ -1052,8 +1051,7 @@ QStringData::QStringData() : QShared(),
issimpletext(TRUE), issimpletext(TRUE),
maxl(0), maxl(0),
islatin1(FALSE), islatin1(FALSE),
security_unpaged(FALSE), security_unpaged(FALSE) {
cString(0) {
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
mutex = new QMutex(FALSE); mutex = new QMutex(FALSE);
#endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
@ -1067,8 +1065,7 @@ QStringData::QStringData(QChar *u, uint l, uint m) : QShared(),
issimpletext(FALSE), issimpletext(FALSE),
maxl(m), maxl(m),
islatin1(FALSE), islatin1(FALSE),
security_unpaged(FALSE), security_unpaged(FALSE) {
cString(0) {
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
mutex = new QMutex(FALSE); mutex = new QMutex(FALSE);
#endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
@ -1086,9 +1083,6 @@ QStringData::~QStringData() {
if ( ascii ) { if ( ascii ) {
delete[] ascii; delete[] ascii;
} }
if (cString) {
delete cString;
}
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
if ( mutex ) { if ( mutex ) {
delete mutex; delete mutex;
@ -1102,10 +1096,6 @@ void QStringData::setDirty() {
delete [] ascii; delete [] ascii;
ascii = 0; ascii = 0;
} }
if (cString) {
delete cString;
cString = 0;
}
issimpletext = FALSE; issimpletext = FALSE;
} }
@ -2528,7 +2518,7 @@ QString QString::multiArg( int numArgs, const QString& a1, const QString& a2,
int digitUsed[10]; int digitUsed[10];
int argForDigit[10]; int argForDigit[10];
}; };
const QChar *uc = d->unicode; register const QChar *uc = d->unicode;
const QString *args[4]; const QString *args[4];
const int len = (int) length(); const int len = (int) length();
const int end = len - 1; const int end = len - 1;
@ -2614,10 +2604,12 @@ QString QString::multiArg( int numArgs, const QString& a1, const QString& a2,
*/ */
#ifndef QT_NO_SPRINTF #ifndef QT_NO_SPRINTF
QString &QString::sprintf(const char *cformat, ...) QString &QString::sprintf( const char* cformat, ... )
{ {
QLocale locale(QLocale::C);
va_list ap; va_list ap;
va_start(ap, cformat); va_start( ap, cformat );
if ( !cformat || !*cformat ) { if ( !cformat || !*cformat ) {
// Qt 1.x compat // Qt 1.x compat
@ -2625,16 +2617,6 @@ QString &QString::sprintf(const char *cformat, ...)
return *this; return *this;
} }
QString &s = vsprintf(cformat, ap);
va_end(ap);
return s;
}
QString &QString::vsprintf( const char* cformat, va_list ap )
{
QLocale locale(QLocale::C);
// Parse cformat // Parse cformat
QString result; QString result;
@ -2951,6 +2933,7 @@ QString &QString::vsprintf( const char* cformat, va_list ap )
result.append(subst.rightJustify(width)); result.append(subst.rightJustify(width));
} }
va_end(ap);
*this = result; *this = result;
return *this; return *this;
@ -3018,7 +3001,7 @@ int QString::find( QChar c, int index, bool cs ) const
index += l; index += l;
if ( (uint)index >= l ) if ( (uint)index >= l )
return -1; return -1;
const QChar *uc = unicode()+index; register const QChar *uc = unicode()+index;
const QChar *end = unicode() + l; const QChar *end = unicode() + l;
if ( cs ) { if ( cs ) {
while ( uc < end && *uc != c ) while ( uc < end && *uc != c )
@ -3041,7 +3024,7 @@ int QString::find( QChar c, int index, bool cs ) const
static void bm_init_skiptable( const QString &pattern, uint *skiptable, bool cs ) static void bm_init_skiptable( const QString &pattern, uint *skiptable, bool cs )
{ {
int i = 0; int i = 0;
uint *st = skiptable; register uint *st = skiptable;
int l = pattern.length(); int l = pattern.length();
while ( i++ < 0x100/8 ) { while ( i++ < 0x100/8 ) {
*(st++) = l; *(st++) = l;
@ -3078,7 +3061,7 @@ static int bm_find( const QString &str, int index, const QString &pattern, uint
const uint pl = pattern.length(); const uint pl = pattern.length();
const uint pl_minus_one = pl - 1; const uint pl_minus_one = pl - 1;
const QChar *current = uc + index + pl_minus_one; register const QChar *current = uc + index + pl_minus_one;
const QChar *end = uc + l; const QChar *end = uc + l;
if ( cs ) { if ( cs ) {
while ( current < end ) { while ( current < end ) {
@ -3269,7 +3252,7 @@ int QString::findRev( QChar c, int index, bool cs ) const
if ( (uint)index >= l ) if ( (uint)index >= l )
return -1; return -1;
const QChar *end = unicode(); const QChar *end = unicode();
const QChar *uc = end + index; register const QChar *uc = end + index;
if ( cs ) { if ( cs ) {
while ( uc >= end && *uc != c ) while ( uc >= end && *uc != c )
uc--; uc--;
@ -3836,7 +3819,7 @@ QString QString::mid( uint index, uint len ) const
len = slen - index; len = slen - index;
if ( index == 0 && len == slen ) if ( index == 0 && len == slen )
return *this; return *this;
const QChar *p = unicode()+index; register const QChar *p = unicode()+index;
QString s( len, TRUE ); QString s( len, TRUE );
memcpy( s.d->unicode, p, len * sizeof(QChar) ); memcpy( s.d->unicode, p, len * sizeof(QChar) );
s.d->len = len; s.d->len = len;
@ -3938,7 +3921,7 @@ QString QString::rightJustify( uint width, QChar fill, bool truncate ) const
QString QString::lower() const QString QString::lower() const
{ {
int l = length(); int l = length();
QChar *p = d->unicode; register QChar *p = d->unicode;
while ( l ) { while ( l ) {
if ( *p != ::lower(*p) ) { if ( *p != ::lower(*p) ) {
QString s( *this ); QString s( *this );
@ -3971,7 +3954,7 @@ QString QString::lower() const
QString QString::upper() const QString QString::upper() const
{ {
int l = length(); int l = length();
QChar *p = d->unicode; register QChar *p = d->unicode;
while ( l ) { while ( l ) {
if ( *p != ::upper(*p) ) { if ( *p != ::upper(*p) ) {
QString s( *this ); QString s( *this );
@ -4012,7 +3995,7 @@ QString QString::stripWhiteSpace() const
{ {
if ( isEmpty() ) // nothing to do if ( isEmpty() ) // nothing to do
return *this; return *this;
const QChar *s = unicode(); register const QChar *s = unicode();
if ( !s->isSpace() && !s[length()-1].isSpace() ) if ( !s->isSpace() && !s[length()-1].isSpace() )
return *this; return *this;
@ -5999,14 +5982,6 @@ void QString::setSecurityUnPaged(bool lock) {
*/ */
QCString QString::utf8() const QCString QString::utf8() const
{ {
if (!d->cString) {
d->cString = new QCString("");
}
if(d == shared_null)
{
return *d->cString;
}
int l = length(); int l = length();
int rlen = l*3+1; int rlen = l*3+1;
QCString rstr(rlen); QCString rstr(rlen);
@ -6051,8 +6026,7 @@ QCString QString::utf8() const
++ch; ++ch;
} }
rstr.truncate( cursor - (uchar*)rstr.data() ); rstr.truncate( cursor - (uchar*)rstr.data() );
*d->cString = rstr; return rstr;
return *d->cString;
} }
static QChar *addOne(QChar *qch, QString &str) static QChar *addOne(QChar *qch, QString &str)
@ -6253,32 +6227,23 @@ QString QString::fromLatin1( const char* chars, int len )
QCString QString::local8Bit() const QCString QString::local8Bit() const
{ {
if (!d->cString) {
d->cString = new QCString("");
}
if(d == shared_null)
{
return *d->cString;
}
#ifdef QT_NO_TEXTCODEC #ifdef QT_NO_TEXTCODEC
*d->cString = QCString(latin1()); return latin1();
return *d->cString;
#else #else
#ifdef Q_WS_X11 #ifdef Q_WS_X11
QTextCodec* codec = QTextCodec::codecForLocale(); QTextCodec* codec = QTextCodec::codecForLocale();
*d->cString = codec ? codec->fromUnicode(*this) : QCString(latin1()); return codec
return *d->cString; ? codec->fromUnicode(*this)
: QCString(latin1());
#endif #endif
#if defined( Q_WS_MACX ) #if defined( Q_WS_MACX )
return utf8(); return utf8();
#endif #endif
#if defined( Q_WS_MAC9 ) #if defined( Q_WS_MAC9 )
*d->cString = QCString(latin1()); //I'm evil.. return QCString(latin1()); //I'm evil..
return *d->cString;
#endif #endif
#ifdef Q_WS_WIN #ifdef Q_WS_WIN
*d->cString = isNull() ? QCString("") : qt_winQString2MB( *this ); return isNull() ? QCString("") : qt_winQString2MB( *this );
return *d->cString;
#endif #endif
#ifdef Q_WS_QWS #ifdef Q_WS_QWS
return utf8(); // ### if there is any 8 bit format supported? return utf8(); // ### if there is any 8 bit format supported?

@ -4,7 +4,6 @@
** **
** Created : 920609 ** Created : 920609
** **
** Copyright (C) 2015 Timothy Pearson. All rights reserved.
** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. ** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved.
** **
** This file is part of the tools module of the Qt GUI Toolkit. ** This file is part of the tools module of the Qt GUI Toolkit.
@ -64,9 +63,6 @@
#endif #endif
#endif #endif
#ifndef QT_NO_SPRINTF
#include <stdarg.h>
#endif
/***************************************************************************** /*****************************************************************************
QString class QString class
@ -388,7 +384,6 @@ struct Q_EXPORT QStringData : public QShared {
bool security_unpaged : 1; bool security_unpaged : 1;
QMutex* mutex; QMutex* mutex;
QCString *cString;
private: private:
#if defined(Q_DISABLE_COPY) #if defined(Q_DISABLE_COPY)
@ -457,11 +452,6 @@ public:
QString &sprintf( const char* format, ... ) QString &sprintf( const char* format, ... )
#if defined(Q_CC_GNU) && !defined(__INSURE__) #if defined(Q_CC_GNU) && !defined(__INSURE__)
__attribute__ ((format (printf, 2, 3))) __attribute__ ((format (printf, 2, 3)))
#endif
;
QString &vsprintf(const char *format, va_list ap)
#if defined(Q_CC_GNU) && !defined(__INSURE__)
__attribute__ ((format (printf, 2, 0)))
#endif #endif
; ;
#endif #endif

@ -1869,7 +1869,7 @@ QTextStream &QTextStream::output_int( int format, unsigned long long n, bool neg
static const char hexdigits_upper[] = "0123456789ABCDEF"; static const char hexdigits_upper[] = "0123456789ABCDEF";
CHECK_STREAM_PRECOND CHECK_STREAM_PRECOND
char buf[76]; char buf[76];
char *p; register char *p;
int len; int len;
const char *hexdigits; const char *hexdigits;
@ -2099,7 +2099,7 @@ QTextStream &QTextStream::operator<<( double f )
f_char = (flags() & uppercase) ? 'E' : 'e'; f_char = (flags() & uppercase) ? 'E' : 'e';
else else
f_char = (flags() & uppercase) ? 'G' : 'g'; f_char = (flags() & uppercase) ? 'G' : 'g';
char *fs = format; // generate format string register char *fs = format; // generate format string
*fs++ = '%'; // "%.<prec>l<f_char>" *fs++ = '%'; // "%.<prec>l<f_char>"
*fs++ = '.'; *fs++ = '.';
int prec = precision(); int prec = precision();

File diff suppressed because it is too large Load Diff

@ -101,7 +101,7 @@ inline QChar::Category category( const QChar &c )
if ( c.unicode() > 0xff ) return QChar::Letter_Uppercase; //######## if ( c.unicode() > 0xff ) return QChar::Letter_Uppercase; //########
return (QChar::Category)QUnicodeTables::unicode_info[c.unicode()]; return (QChar::Category)QUnicodeTables::unicode_info[c.unicode()];
#else #else
int uc = ((int)QUnicodeTables::unicode_info[c.row()]) << 8; register int uc = ((int)QUnicodeTables::unicode_info[c.row()]) << 8;
uc += c.cell(); uc += c.cell();
return (QChar::Category)QUnicodeTables::unicode_info[uc]; return (QChar::Category)QUnicodeTables::unicode_info[uc];
#endif // QT_NO_UNICODETABLES #endif // QT_NO_UNICODETABLES
@ -112,8 +112,8 @@ inline QChar lower( const QChar &c )
#ifndef QT_NO_UNICODETABLES #ifndef QT_NO_UNICODETABLES
int row = c.row(); int row = c.row();
int cell = c.cell(); int cell = c.cell();
int ci = QUnicodeTables::case_info[row]; register int ci = QUnicodeTables::case_info[row];
int uc = ((int)QUnicodeTables::unicode_info[c.row()]) << 8; register int uc = ((int)QUnicodeTables::unicode_info[c.row()]) << 8;
uc += c.cell(); uc += c.cell();
if (QUnicodeTables::unicode_info[uc] != QChar::Letter_Uppercase || !ci) if (QUnicodeTables::unicode_info[uc] != QChar::Letter_Uppercase || !ci)
return c; return c;
@ -131,8 +131,8 @@ inline QChar upper( const QChar &c )
#ifndef QT_NO_UNICODETABLES #ifndef QT_NO_UNICODETABLES
int row = c.row(); int row = c.row();
int cell = c.cell(); int cell = c.cell();
int ci = QUnicodeTables::case_info[row]; register int ci = QUnicodeTables::case_info[row];
int uc = ((int)QUnicodeTables::unicode_info[c.row()]) << 8; register int uc = ((int)QUnicodeTables::unicode_info[c.row()]) << 8;
uc += c.cell(); uc += c.cell();
if (QUnicodeTables::unicode_info[uc] != QChar::Letter_Lowercase || !ci) if (QUnicodeTables::unicode_info[uc] != QChar::Letter_Lowercase || !ci)
return c; return c;
@ -148,7 +148,7 @@ inline QChar upper( const QChar &c )
inline QChar::Direction direction( const QChar &c ) inline QChar::Direction direction( const QChar &c )
{ {
#ifndef QT_NO_UNICODETABLES #ifndef QT_NO_UNICODETABLES
int pos = QUnicodeTables::direction_info[c.row()]; register int pos = QUnicodeTables::direction_info[c.row()];
return (QChar::Direction) (QUnicodeTables::direction_info[(pos<<8)+c.cell()] & 0x1f); return (QChar::Direction) (QUnicodeTables::direction_info[(pos<<8)+c.cell()] & 0x1f);
#else #else
Q_UNUSED(c); Q_UNUSED(c);
@ -159,7 +159,7 @@ inline QChar::Direction direction( const QChar &c )
inline bool mirrored( const QChar &c ) inline bool mirrored( const QChar &c )
{ {
#ifndef QT_NO_UNICODETABLES #ifndef QT_NO_UNICODETABLES
int pos = QUnicodeTables::direction_info[c.row()]; register int pos = QUnicodeTables::direction_info[c.row()];
return QUnicodeTables::direction_info[(pos<<8)+c.cell()] > 128; return QUnicodeTables::direction_info[(pos<<8)+c.cell()] > 128;
#else #else
Q_UNUSED(c); Q_UNUSED(c);
@ -187,7 +187,7 @@ inline QChar mirroredChar( const QChar &ch )
inline QChar::Joining joining( const QChar &ch ) inline QChar::Joining joining( const QChar &ch )
{ {
#ifndef QT_NO_UNICODETABLES #ifndef QT_NO_UNICODETABLES
int pos = QUnicodeTables::direction_info[ch.row()]; register int pos = QUnicodeTables::direction_info[ch.row()];
return (QChar::Joining) ((QUnicodeTables::direction_info[(pos<<8)+ch.cell()] >> 5) &0x3); return (QChar::Joining) ((QUnicodeTables::direction_info[(pos<<8)+ch.cell()] >> 5) &0x3);
#else #else
Q_UNUSED(ch); Q_UNUSED(ch);
@ -225,7 +225,7 @@ inline int lineBreakClass( const QChar &ch )
return ch.row() ? QUnicodeTables::LineBreak_AL return ch.row() ? QUnicodeTables::LineBreak_AL
: QUnicodeTables::latin1_line_break_info[ch.cell()]; : QUnicodeTables::latin1_line_break_info[ch.cell()];
#else #else
int pos = ((int)QUnicodeTables::line_break_info[ch.row()] << 8) + ch.cell(); register int pos = ((int)QUnicodeTables::line_break_info[ch.row()] << 8) + ch.cell();
return QUnicodeTables::line_break_info[pos]; return QUnicodeTables::line_break_info[pos];
#endif #endif
} }

@ -215,7 +215,7 @@ QM_TEMPLATE_EXTERN_TABLE template class QM_EXPORT_TABLE QPtrVector<QTableItem>;
// qsqlextension template exports // qsqlextension template exports
#if defined(Q_DEFINED_QSQLEXTENSION) && defined(Q_DEFINED_QMAP) && defined(Q_DEFINED_QVALUEVECTOR) && defined(Q_DEFINED_QSTRING) && !defined(Q_EXPORTED_QSQLEXTENSION_TEMPLATES) #if defined(Q_DEFINED_QSQLEXTENSION) && defined(Q_DEFINED_QMAP) && defined(Q_DEFINED_QVALUEVECTOR) && defined(Q_DEFINED_QSTRING) && !defined(Q_EXPORTED_QSQLEXTENSION_TEMPLATES)
#define Q_EXPORTED_QSQLEXTENSION_TEMPLATES #define Q_EXPORTED_QSQLEXTENSION_TEMPLATES
QM_TEMPLATE_EXTERN_SQL template class QM_EXPORT_SQL QMap<QString,QSqlParam>; QM_TEMPLATE_EXTERN_SQL template class QM_EXPORT_SQL QMap<QString,Param>;
QM_TEMPLATE_EXTERN_SQL template class QM_EXPORT_SQL QValueVector<Holder>; QM_TEMPLATE_EXTERN_SQL template class QM_EXPORT_SQL QValueVector<Holder>;
#endif #endif

@ -597,7 +597,7 @@ QAction::~QAction()
*/ */
void QAction::setIconSet( const QIconSet& icon ) void QAction::setIconSet( const QIconSet& icon )
{ {
QIconSet *i = d->iconset; register QIconSet *i = d->iconset;
if ( !icon.isNull() ) if ( !icon.isNull() )
d->iconset = new QIconSet( icon ); d->iconset = new QIconSet( icon );
else else

@ -371,7 +371,7 @@ void QButtonGroup::buttonPressed()
// introduce a QButtonListIt if calling anything // introduce a QButtonListIt if calling anything
int id = -1; int id = -1;
QButton *bt = (QButton *)sender(); // object that sent the signal QButton *bt = (QButton *)sender(); // object that sent the signal
for ( QButtonItem *i=buttons->first(); i; i=buttons->next() ) for ( register QButtonItem *i=buttons->first(); i; i=buttons->next() )
if ( bt == i->button ) { // button was clicked if ( bt == i->button ) { // button was clicked
id = i->id; id = i->id;
break; break;
@ -391,7 +391,7 @@ void QButtonGroup::buttonReleased()
// introduce a QButtonListIt if calling anything // introduce a QButtonListIt if calling anything
int id = -1; int id = -1;
QButton *bt = (QButton *)sender(); // object that sent the signal QButton *bt = (QButton *)sender(); // object that sent the signal
for ( QButtonItem *i=buttons->first(); i; i=buttons->next() ) for ( register QButtonItem *i=buttons->first(); i; i=buttons->next() )
if ( bt == i->button ) { // button was clicked if ( bt == i->button ) { // button was clicked
id = i->id; id = i->id;
break; break;
@ -414,7 +414,7 @@ void QButtonGroup::buttonClicked()
#if defined(QT_CHECK_NULL) #if defined(QT_CHECK_NULL)
Q_ASSERT( bt ); Q_ASSERT( bt );
#endif #endif
for ( QButtonItem *i=buttons->first(); i; i=buttons->next() ) { for ( register QButtonItem *i=buttons->first(); i; i=buttons->next() ) {
if ( bt == i->button ) { // button was clicked if ( bt == i->button ) { // button was clicked
id = i->id; id = i->id;
break; break;

@ -185,12 +185,12 @@ QDialogButtons::setDefaultButton(Button button)
if(d->def != button) { if(d->def != button) {
#ifndef QT_NO_PROPERTIES #ifndef QT_NO_PROPERTIES
if(d->buttons.contains(d->def)) if(d->buttons.contains(d->def))
d->buttons[d->def]->setProperty("default", QVariant(false)); d->buttons[d->def]->setProperty("default", QVariant(FALSE,0));
#endif #endif
d->def = button; d->def = button;
#ifndef QT_NO_PROPERTIES #ifndef QT_NO_PROPERTIES
if(d->buttons.contains(d->def)) if(d->buttons.contains(d->def))
d->buttons[d->def]->setProperty("default", QVariant(false)); d->buttons[d->def]->setProperty("default", QVariant(FALSE,0));
#endif #endif
} }
} }
@ -413,7 +413,7 @@ QDialogButtons::layoutButtons()
if(b == d->def) { if(b == d->def) {
w->setFocus(); w->setFocus();
#ifndef QT_NO_PROPERTIES #ifndef QT_NO_PROPERTIES
w->setProperty("default", QVariant(true)); w->setProperty("default", QVariant(TRUE,0));
#endif #endif
} }
w->setEnabled(d->enabled & b); w->setEnabled(d->enabled & b);

@ -396,7 +396,7 @@ void QLCDNumber::setNumDigits( int numDigits )
bool doDisplay = ndigits == 0; bool doDisplay = ndigits == 0;
if ( numDigits == ndigits ) // no change if ( numDigits == ndigits ) // no change
return; return;
int i; register int i;
int dif; int dif;
if ( numDigits > ndigits ) { // expand if ( numDigits > ndigits ) { // expand
dif = numDigits - ndigits; dif = numDigits - ndigits;

@ -2351,7 +2351,7 @@ void QListViewItem::ignoreDoubleClick()
item \a i, similar to the QWidget::enterEvent() function. item \a i, similar to the QWidget::enterEvent() function.
*/ */
// ### bug here too? see qiconview.cpp onItem/onViewport // ### bug here too? see qiconview.cppp onItem/onViewport
/*! /*!
\fn void QListView::onViewport() \fn void QListView::onViewport()
@ -5366,17 +5366,9 @@ void QListView::selectAll( bool select )
QListViewItemIterator it( this ); QListViewItemIterator it( this );
while ( it.current() ) { while ( it.current() ) {
QListViewItem *i = it.current(); QListViewItem *i = it.current();
if ( i->isVisible()) { if ( (bool)i->selected != select ) {
if ( (bool)i->selected != select ) { i->setSelected( select );
i->setSelected( select ); anything = TRUE;
anything = TRUE;
}
}
else {
if ( (bool)i->selected != FALSE ) {
i->setSelected( FALSE );
anything = TRUE;
}
} }
++it; ++it;
} }
@ -5406,16 +5398,8 @@ void QListView::invertSelection()
bool b = signalsBlocked(); bool b = signalsBlocked();
blockSignals( TRUE ); blockSignals( TRUE );
QListViewItemIterator it( this ); QListViewItemIterator it( this );
for ( ; it.current(); ++it ) { for ( ; it.current(); ++it )
if (it.current()->isVisible()) { it.current()->setSelected( !it.current()->isSelected() );
it.current()->setSelected( !it.current()->isSelected() );
}
else {
if ( FALSE != it.current()->isSelected() ) {
it.current()->setSelected( FALSE );
}
}
}
blockSignals( b ); blockSignals( b );
emit selectionChanged(); emit selectionChanged();
triggerUpdate(); triggerUpdate();

@ -785,7 +785,7 @@ void QMenuBar::hidePopups()
bool anyVisible = FALSE; bool anyVisible = FALSE;
#endif #endif
QMenuItemListIt it(*mitems); QMenuItemListIt it(*mitems);
QMenuItem *mi; register QMenuItem *mi;
while ( (mi=it.current()) ) { while ( (mi=it.current()) ) {
++it; ++it;
if ( mi->popup() && mi->popup()->isVisible() ) { if ( mi->popup() && mi->popup()->isVisible() ) {
@ -1337,7 +1337,7 @@ void QMenuBar::keyPressEvent( QKeyEvent *e )
} }
if ( dx ) { // highlight next/prev if ( dx ) { // highlight next/prev
int i = actItem; register int i = actItem;
int c = mitems->count(); int c = mitems->count();
int n = c; int n = c;
while ( n-- ) { while ( n-- ) {
@ -1362,7 +1362,7 @@ void QMenuBar::keyPressEvent( QKeyEvent *e )
QMenuItem* currentSelected = 0; QMenuItem* currentSelected = 0;
QMenuItem* firstAfterCurrent = 0; QMenuItem* firstAfterCurrent = 0;
QMenuItem *m; register QMenuItem *m;
int indx = 0; int indx = 0;
int clashCount = 0; int clashCount = 0;
while ( (m=it.current()) ) { while ( (m=it.current()) ) {
@ -1534,7 +1534,7 @@ void QMenuBar::setupAccelerators()
autoaccel = 0; autoaccel = 0;
QMenuItemListIt it(*mitems); QMenuItemListIt it(*mitems);
QMenuItem *mi; register QMenuItem *mi;
while ( (mi=it.current()) ) { while ( (mi=it.current()) ) {
++it; ++it;
if ( !mi->isEnabledAndVisible() ) // ### when we have a good solution for the accel vs. focus widget problem, remove that. That is only a workaround if ( !mi->isEnabledAndVisible() ) // ### when we have a good solution for the accel vs. focus widget problem, remove that. That is only a workaround

@ -260,7 +260,7 @@ int QMenuData::insertAny( const QString *text, const QPixmap *pixmap,
if ( id < 0 ) // -2, -3 etc. if ( id < 0 ) // -2, -3 etc.
id = get_seq_id(); id = get_seq_id();
QMenuItem *mi = new QMenuItem; register QMenuItem *mi = new QMenuItem;
Q_CHECK_PTR( mi ); Q_CHECK_PTR( mi );
mi->ident = id; mi->ident = id;
if ( widget != 0 ) { if ( widget != 0 ) {
@ -842,7 +842,7 @@ void QMenuData::removeItemAt( int index )
void QMenuData::clear() void QMenuData::clear()
{ {
QMenuItem *mi = mitems->first(); register QMenuItem *mi = mitems->first();
while ( mi ) { while ( mi ) {
if ( mi->popup_menu ) if ( mi->popup_menu )
menuDelPopup( mi->popup_menu ); menuDelPopup( mi->popup_menu );
@ -1041,7 +1041,7 @@ void QMenuData::changeItem( int id, const QPixmap &pixmap )
QMenuData *parent; QMenuData *parent;
QMenuItem *mi = findItem( id, &parent ); QMenuItem *mi = findItem( id, &parent );
if ( mi ) { // item found if ( mi ) { // item found
QPixmap *i = mi->pixmap_data; register QPixmap *i = mi->pixmap_data;
bool fast_refresh = i != 0 && bool fast_refresh = i != 0 &&
i->width() == pixmap.width() && i->width() == pixmap.width() &&
i->height() == pixmap.height() && i->height() == pixmap.height() &&
@ -1103,7 +1103,7 @@ void QMenuData::changeItemIconSet( int id, const QIconSet &icon )
QMenuData *parent; QMenuData *parent;
QMenuItem *mi = findItem( id, &parent ); QMenuItem *mi = findItem( id, &parent );
if ( mi ) { // item found if ( mi ) { // item found
QIconSet *i = mi->iconset_data; register QIconSet *i = mi->iconset_data;
bool fast_refresh = i != 0; bool fast_refresh = i != 0;
if ( !icon.isNull() ) if ( !icon.isNull() )
mi->iconset_data = new QIconSet( icon ); mi->iconset_data = new QIconSet( icon );

@ -631,7 +631,7 @@ void QPopupMenu::popup( const QPoint &pos, int indexAtPoint )
h = height(); h = height();
if(indexAtPoint >= 0) { if(indexAtPoint >= 0) {
if(off_top) { //scroll to it if(off_top) { //scroll to it
QMenuItem *mi = NULL; register QMenuItem *mi = NULL;
QMenuItemListIt it(*mitems); QMenuItemListIt it(*mitems);
for(int tmp_y = 0; tmp_y < off_top && (mi=it.current()); ) { for(int tmp_y = 0; tmp_y < off_top && (mi=it.current()); ) {
QSize sz = style().sizeFromContents(QStyle::CT_PopupMenuItem, this, QSize sz = style().sizeFromContents(QStyle::CT_PopupMenuItem, this,
@ -794,7 +794,7 @@ void QPopupMenu::hilitSig( int id )
void QPopupMenu::setFirstItemActive() void QPopupMenu::setFirstItemActive()
{ {
QMenuItemListIt it(*mitems); QMenuItemListIt it(*mitems);
QMenuItem *mi; register QMenuItem *mi;
int ai = 0; int ai = 0;
if(d->scroll.scrollable) if(d->scroll.scrollable)
ai = d->scroll.topScrollableIndex; ai = d->scroll.topScrollableIndex;
@ -817,7 +817,7 @@ void QPopupMenu::setFirstItemActive()
void QPopupMenu::hideAllPopups() void QPopupMenu::hideAllPopups()
{ {
QMenuData *top = this; // find top level popup register QMenuData *top = this; // find top level popup
if ( !preventAnimation ) if ( !preventAnimation )
QTimer::singleShot( 10, this, SLOT(allowAnimation()) ); QTimer::singleShot( 10, this, SLOT(allowAnimation()) );
preventAnimation = TRUE; preventAnimation = TRUE;
@ -851,7 +851,7 @@ void QPopupMenu::hidePopups()
preventAnimation = TRUE; preventAnimation = TRUE;
QMenuItemListIt it(*mitems); QMenuItemListIt it(*mitems);
QMenuItem *mi; register QMenuItem *mi;
while ( (mi=it.current()) ) { while ( (mi=it.current()) ) {
++it; ++it;
if ( mi->popup() && mi->popup()->parentMenu == this ) //avoid circularity if ( mi->popup() && mi->popup()->parentMenu == this ) //avoid circularity
@ -873,7 +873,7 @@ void QPopupMenu::hidePopups()
bool QPopupMenu::tryMenuBar( QMouseEvent *e ) bool QPopupMenu::tryMenuBar( QMouseEvent *e )
{ {
QMenuData *top = this; // find top level register QMenuData *top = this; // find top level
while ( top->parentMenu ) while ( top->parentMenu )
top = top->parentMenu; top = top->parentMenu;
#ifndef QT_NO_MENUBAR #ifndef QT_NO_MENUBAR
@ -909,7 +909,7 @@ bool QPopupMenu::tryMouseEvent( QPopupMenu *p, QMouseEvent * e)
void QPopupMenu::byeMenuBar() void QPopupMenu::byeMenuBar()
{ {
#ifndef QT_NO_MENUBAR #ifndef QT_NO_MENUBAR
QMenuData *top = this; // find top level register QMenuData *top = this; // find top level
while ( top->parentMenu ) while ( top->parentMenu )
top = top->parentMenu; top = top->parentMenu;
#endif #endif
@ -1075,7 +1075,7 @@ QSize QPopupMenu::updateSize(bool force_update, bool do_resize)
int height = 0; int height = 0;
int max_width = 0, max_height = 0; int max_width = 0, max_height = 0;
QFontMetrics fm = fontMetrics(); QFontMetrics fm = fontMetrics();
QMenuItem *mi; register QMenuItem *mi;
maxPMWidth = 0; maxPMWidth = 0;
int maxWidgetWidth = 0; int maxWidgetWidth = 0;
tab = 0; tab = 0;
@ -1258,7 +1258,7 @@ QSize QPopupMenu::updateSize(bool force_update, bool do_resize)
void QPopupMenu::updateAccel( QWidget *parent ) void QPopupMenu::updateAccel( QWidget *parent )
{ {
QMenuItemListIt it(*mitems); QMenuItemListIt it(*mitems);
QMenuItem *mi; register QMenuItem *mi;
if ( parent ) { if ( parent ) {
delete autoaccel; delete autoaccel;
@ -1349,7 +1349,7 @@ void QPopupMenu::enableAccel( bool enable )
autoaccel->setEnabled( enable ); autoaccel->setEnabled( enable );
accelDisabled = !enable; // rememeber when updateAccel accelDisabled = !enable; // rememeber when updateAccel
QMenuItemListIt it(*mitems); QMenuItemListIt it(*mitems);
QMenuItem *mi; register QMenuItem *mi;
while ( (mi=it.current()) ) { // do the same for sub popups while ( (mi=it.current()) ) { // do the same for sub popups
++it; ++it;
if ( mi->popup() ) // call recursively if ( mi->popup() ) // call recursively
@ -1651,7 +1651,7 @@ void QPopupMenu::mousePressEvent( QMouseEvent *e )
} }
return; return;
} }
QMenuItem *mi = mitems->at(item); register QMenuItem *mi = mitems->at(item);
if ( item != actItem ) // new item activated if ( item != actItem ) // new item activated
setActiveItem( item ); setActiveItem( item );
@ -1702,7 +1702,7 @@ void QPopupMenu::mouseReleaseEvent( QMouseEvent *e )
else else
byeMenuBar(); byeMenuBar();
} else { // selected menu item! } else { // selected menu item!
QMenuItem *mi = mitems->at(actItem); register QMenuItem *mi = mitems->at(actItem);
if ( mi ->widget() ) { if ( mi ->widget() ) {
QWidget* widgetAt = QApplication::widgetAt( e->globalPos(), TRUE ); QWidget* widgetAt = QApplication::widgetAt( e->globalPos(), TRUE );
if ( widgetAt && widgetAt != this ) { if ( widgetAt && widgetAt != this ) {
@ -1815,7 +1815,7 @@ void QPopupMenu::mouseMoveEvent( QMouseEvent *e )
if ( (e->state() & Qt::MouseButtonMask) && !mouseBtDn ) if ( (e->state() & Qt::MouseButtonMask) && !mouseBtDn )
mouseBtDn = TRUE; // so mouseReleaseEvent will pop down mouseBtDn = TRUE; // so mouseReleaseEvent will pop down
QMenuItem *mi = mitems->at( item ); register QMenuItem *mi = mitems->at( item );
if ( mi->widget() ) { if ( mi->widget() ) {
QWidget* widgetAt = QApplication::widgetAt( e->globalPos(), TRUE ); QWidget* widgetAt = QApplication::widgetAt( e->globalPos(), TRUE );
@ -2034,7 +2034,7 @@ void QPopupMenu::keyPressEvent( QKeyEvent *e )
QMenuItem* currentSelected = 0; QMenuItem* currentSelected = 0;
QMenuItem* firstAfterCurrent = 0; QMenuItem* firstAfterCurrent = 0;
QMenuItem *m; register QMenuItem *m;
mi = 0; mi = 0;
int indx = 0; int indx = 0;
int clashCount = 0; int clashCount = 0;
@ -2101,7 +2101,7 @@ void QPopupMenu::keyPressEvent( QKeyEvent *e )
} }
#ifndef QT_NO_MENUBAR #ifndef QT_NO_MENUBAR
if ( !ok_key ) { // send to menu bar if ( !ok_key ) { // send to menu bar
QMenuData *top = this; // find top level register QMenuData *top = this; // find top level
while ( top->parentMenu ) while ( top->parentMenu )
top = top->parentMenu; top = top->parentMenu;
if ( top->isMenuBar ) { if ( top->isMenuBar ) {
@ -2118,7 +2118,7 @@ void QPopupMenu::keyPressEvent( QKeyEvent *e )
} else if ( dy < 0 ) { } else if ( dy < 0 ) {
QMenuItemListIt it(*mitems); QMenuItemListIt it(*mitems);
it.toLast(); it.toLast();
QMenuItem *mi; register QMenuItem *mi;
int ai = count() - 1; int ai = count() - 1;
while ( (mi=it.current()) ) { while ( (mi=it.current()) ) {
--it; --it;
@ -2134,7 +2134,7 @@ void QPopupMenu::keyPressEvent( QKeyEvent *e )
} }
if ( dy ) { // highlight next/prev if ( dy ) { // highlight next/prev
int i = actItem; register int i = actItem;
int c = mitems->count(); int c = mitems->count();
for(int n = c; n; n--) { for(int n = c; n; n--) {
i = i + dy; i = i + dy;
@ -2520,7 +2520,7 @@ void QPopupMenu::connectModal( QPopupMenu* receiver, bool doConnect )
receiver, SLOT(modalActivation(int)) ); receiver, SLOT(modalActivation(int)) );
QMenuItemListIt it(*mitems); QMenuItemListIt it(*mitems);
QMenuItem *mi; register QMenuItem *mi;
while ( (mi=it.current()) ) { while ( (mi=it.current()) ) {
++it; ++it;
if ( mi->popup() && mi->popup() != receiver if ( mi->popup() && mi->popup() != receiver
@ -2641,12 +2641,12 @@ bool QPopupMenu::customWhatsThis() const
*/ */
bool QPopupMenu::focusNextPrevChild( bool next ) bool QPopupMenu::focusNextPrevChild( bool next )
{ {
QMenuItem *mi; register QMenuItem *mi;
int dy = next? 1 : -1; int dy = next? 1 : -1;
if ( dy && actItem < 0 ) { if ( dy && actItem < 0 ) {
setFirstItemActive(); setFirstItemActive();
} else if ( dy ) { // highlight next/prev } else if ( dy ) { // highlight next/prev
int i = actItem; register int i = actItem;
int c = mitems->count(); int c = mitems->count();
int n = c; int n = c;
while ( n-- ) { while ( n-- ) {

@ -20,7 +20,6 @@ widgets {
$$WIDGETS_H/qheader.h \ $$WIDGETS_H/qheader.h \
$$WIDGETS_H/qhgroupbox.h \ $$WIDGETS_H/qhgroupbox.h \
$$WIDGETS_H/qhbox.h \ $$WIDGETS_H/qhbox.h \
$$WIDGETS_H/qiconview.h \
$$WIDGETS_H/qlabel.h \ $$WIDGETS_H/qlabel.h \
$$WIDGETS_H/qlcdnumber.h \ $$WIDGETS_H/qlcdnumber.h \
$$WIDGETS_H/qlineedit.h \ $$WIDGETS_H/qlineedit.h \
@ -82,7 +81,6 @@ widgets {
$$WIDGETS_CPP/qheader.cpp \ $$WIDGETS_CPP/qheader.cpp \
$$WIDGETS_CPP/qhgroupbox.cpp \ $$WIDGETS_CPP/qhgroupbox.cpp \
$$WIDGETS_CPP/qhbox.cpp \ $$WIDGETS_CPP/qhbox.cpp \
$$WIDGETS_CPP/qiconview.cpp \
$$WIDGETS_CPP/qlabel.cpp \ $$WIDGETS_CPP/qlabel.cpp \
$$WIDGETS_CPP/qlcdnumber.cpp \ $$WIDGETS_CPP/qlcdnumber.cpp \
$$WIDGETS_CPP/qlineedit.cpp \ $$WIDGETS_CPP/qlineedit.cpp \

@ -311,7 +311,7 @@ private:
// for the DTD currently being parsed. // for the DTD currently being parsed.
static const uint dtdRecursionLimit = 2U; static const uint dtdRecursionLimit = 2U;
// The maximum amount of characters an entity value may contain, after expansion. // The maximum amount of characters an entity value may contain, after expansion.
static const uint entityCharacterLimit = 4096U; static const uint entityCharacterLimit = 65536U;
const QString &string(); const QString &string();
void stringClear(); void stringClear();

@ -1,93 +0,0 @@
[Desktop Entry]
Encoding=UTF-8
Exec=assistant-qt3
Name=Qt3 Assistant
Name[de]=Qt3 Assistent
Name[bg]=Qt3 асистент
Name[cs]=Qt3 asistent
Name[de]=Qt3 Assistent
Name[hu]=Qt3 Asszisztens
Name[ja]=Qt3アシスタント
Name[km]=អ្នក​ជំនួយការ Qt3
Name[nb]=Qt3-assistent
Name[pa]=Qt3 ਸਹਾਇਕ
Name[sv]=Qt3-assistent
Name[zh_CN]=Qt3 助手
Name[zh_TW]=Qt3 助理
GenericName=Document Browser
GenericName[af]=Dokument Blaaier
GenericName[az]=Sənəd Səyyahı
GenericName[bg]=Преглед на документи
GenericName[bn]=নথী ব্রাউজার
GenericName[br]=Furcher Teulioù
GenericName[bs]=Preglednik dokumenata
GenericName[ca]=Navegador de documents
GenericName[cs]=Prohlížeč dokumentace
GenericName[cy]=Porydd Dogfen
GenericName[da]=Dokumentfremviser
GenericName[de]=Dokumentbrowser
GenericName[el]=Προβολέας εγγράφων
GenericName[eo]=Dokumentorigardilo
GenericName[es]=Navegador de documentos
GenericName[et]=Dokumentatsiooni brauser
GenericName[eu]=Dokumentu Ikustailua
GenericName[fa]=مرورگر سند
GenericName[fi]=Asiakirjaselain
GenericName[fo]=Skjalakagari
GenericName[fr]=Explorateur de documentation
GenericName[gl]=Explorador de Documentos
GenericName[he]=דפדפן מסמכים
GenericName[hi]=दस्तावेज़़ ब्राउज़र
GenericName[hr]=Preglednik dokumenata
GenericName[hu]=Dokumentumböngésző
GenericName[is]=Skjalavafri
GenericName[it]=Visualizzatore di documenti
GenericName[ja]=ドキュメントブラウザ
GenericName[km]=កម្មវិធី​រុករក​ឯកសារ
GenericName[ko]=문서 탐색기
GenericName[lo]=ເຄື່ອງມືເລືອກເບິ່ງແຟ້ມເອກະສານ
GenericName[lt]=Dokumentų žiūriklis
GenericName[lv]=Dokumentu Pārlūks
GenericName[mn]=Баримтын хөтөч
GenericName[ms]=Pelungsur Dokumen
GenericName[mt]=Browser ta' Dokumenti
GenericName[nb]=Dokumentleser
GenericName[nds]=Dokmentkieker
GenericName[nl]=Documentbrowser
GenericName[nn]=Dokumentlesar
GenericName[nso]=Seinyakisi sa Tokomane
GenericName[pa]=ਦਸਤਾਵੇਜ਼ ਝਲਕਾਰਾ
GenericName[pl]=Przeglądarka dokumentów
GenericName[pt]=Navegador de Documentos
GenericName[pt_BR]=Navegador de Documentos
GenericName[ro]=Navigator de documente
GenericName[ru]=Программа просмотра документов
GenericName[se]=Dokumeantalogan
GenericName[sk]=Prehliadač dokumentácie
GenericName[sl]=Pregledovalnik dokumentov
GenericName[sr]=Претраживач докумената
GenericName[sr@Latn]=Pretraživač dokumenata
GenericName[ss]=Ibrawuza yelidokhumente
GenericName[sv]=Dokumentbläddrare
GenericName[ta]=ஆவண உலாவி
GenericName[tg]=Тафсири ҳуҷҷат
GenericName[th]=เครื่องมือเลือกดูแฟ้มเอกสาร
GenericName[tr]=Belge Tarayıcısı
GenericName[uk]=Навігатор документів
GenericName[uz]=Ҳужжат браузери
GenericName[ven]=Buronza ya manwalwa
GenericName[vi]=Trình duyệt tài liệu
GenericName[wa]=Foyteu di documints
GenericName[xh]=Umkhangeli Wencwadi Zoxwebhu
GenericName[xx]=xxDocument Browserxx
GenericName[zh_CN]=文档浏览器
GenericName[zh_TW]=文件閱讀器
GenericName[zu]=Umcingi Woshicilelo
Comment=Qt3 Helpcenter
Comment[de]= Qt3 Hilfezentrum
Comment[fr]=Centre d'aide de Qt3
MimeType=application/x-assistant;
Icon=assistant-qt3.png
Terminal=false
Type=Application
Categories=Qt;Development;Documentation;

@ -34,9 +34,11 @@ win32:RC_FILE = assistant.rc
mac:RC_FILE = assistant.icns mac:RC_FILE = assistant.icns
target.path = $$bins.path target.path = $$bins.path
INSTALLS += target
assistanttranslations.files = *.qm assistanttranslations.files = *.qm
assistanttranslations.path = $$translations.path assistanttranslations.path = $$translations.path
INSTALLS += assistanttranslations
TRANSLATIONS = assistant_de.ts \ TRANSLATIONS = assistant_de.ts \
assistant_fr.ts assistant_fr.ts
@ -68,13 +70,3 @@ IMAGES = images/editcopy.png \
images/addtab.png \ images/addtab.png \
images/closetab.png \ images/closetab.png \
images/d_closetab.png images/d_closetab.png
desktop.path = $$share.path/applications
desktop.files = assistant-qt3.desktop
system( cp images/appicon.png assistant-qt3.png )
icon.path = $$share.path/pixmaps
icon.files = assistant-qt3.png
INSTALLS += target assistanttranslations desktop icon

@ -1,145 +0,0 @@
[Desktop Entry]
Encoding=UTF-8
Exec=designer-qt3
Name=Qt3 Designer
Name[bg]=Qt3 Дизайнер
Name[br]=Ergrafer Qt3
Name[ca]=Dissenyador Qt3
Name[cs]=Qt3 designer
Name[de]=Qt3-Designer
Name[eo]=Qt3-Desegnilo
Name[es]=Diseñador Qt3
Name[et]=Qt3 disainer
Name[eu]=Qt3 Diseinatzailea
Name[gl]=Deseñador de Qt3
Name[he]=Qt3 בצעמ
Name[it]=Designer Qt3
Name[ja]=Qt3デザイナー
Name[ko]=Qt3 디자이너
Name[lv]=Qt3 Dizainers
Name[mk]=Qt3 дизајнер
Name[no]=Qt3-designer
Name[oc]=Dessinador Qt3
Name[pl]=Projektant Qt3
Name[sk]=Qt3 Dizajnér
Name[sl]=Snovalnik Qt3
Name[ta]=Qt3 À¨¼ôÀ¡Ç÷
Name[uk]=Дизайнер Qt3
Name[zh_CN.GB2312]=Qt3 设计者
Name[zh_TW.Big5]=Qt3 設計器
GenericName=Interface Designer
GenericName[af]=Koppelvlak Ontwerper
GenericName[ar]=أداة لتصميم واجهة البرامج
GenericName[az]=Ara Üz Tərtibçisi
GenericName[bg]=Дизайнер на интерфейси
GenericName[bn]=ইন্টারফেস পরিকল্পনা
GenericName[bs]=Qt alat za dizajniranje interfejsa
GenericName[ca]=Dissenyador d'interfícies
GenericName[cs]=Návrhář rozhraní
GenericName[cy]=Dylunydd Rhyngwyneb
GenericName[da]=Grænsefladedesigner
GenericName[de]=Schnittstellen-Designer
GenericName[el]=Σχεδιαστής διασυνδέσεων
GenericName[eo]=Interfacdesegnilo
GenericName[es]=Diseñador de interfaces
GenericName[et]=Kasutajaliidese disainer
GenericName[eu]=Interfaze Diseinatzailea
GenericName[fa]=طراح رابط
GenericName[fi]=Käyttöliittymäsuunnittelija
GenericName[fo]=Nýtaramótssniðari
GenericName[fr]=Concepteur d'interface
GenericName[gl]=Deseñador de Interfaces
GenericName[he]=מעצב ממשקים
GenericName[hi]=इंटरफेस डिज़ाइनर
GenericName[hr]=Dizajner sučelja
GenericName[hu]=Felülettervező
GenericName[is]=Viðmótshönnun
GenericName[it]=Disegnatore di interfacce
GenericName[ja]=インターフェースデザイナー
GenericName[km]=កម្មវិធី​រចនា​ចំណុច​ប្រទាក់
GenericName[ko]=인터페이스 디자이너
GenericName[lo]=ເຄື່ອງມືອອກແບບສ່ວນຕິດຕໍ່ຜູ້ໃຊ້
GenericName[lt]=Sąsajos redaktorius
GenericName[lv]=Starsejas Dizainers
GenericName[mn]=Гадаргуун дизайнер
GenericName[ms]=Pereka Antaramuka
GenericName[mt]=Diżinjatur tal-interfaċċji
GenericName[nb]=Utforming av grensesnitt
GenericName[nl]=Interface-ontwerper
GenericName[nn]=Utforming av grensesnitt
GenericName[nso]=Mohlami wa Interface
GenericName[pa]=ਇੰਟਰਫੇਸ ਡਿਜਾਇਨਰ
GenericName[pl]=Projektowanie interfejsów
GenericName[pt]=Editor de Interfaces
GenericName[pt_BR]=Interface do Designer
GenericName[ro]=Dezvoltator de interfeţe
GenericName[ru]=Редактор интерфейса приложений Qt
GenericName[se]=Laktahábmejeaddji
GenericName[sk]=Návrh rozhrania
GenericName[sl]=Snovalnik vmesnikov
GenericName[sr]=Дизајнер интерфејса
GenericName[sr@Latn]=Dizajner interfejsa
GenericName[ss]=Umhleli wesichumanisi
GenericName[sv]=Gränssnittseditor
GenericName[ta]=முகப்புப் வடிவமைப்பாளர்
GenericName[tg]=Тароҳи робита
GenericName[th]=เครื่องมือออกแบบส่วนติดต่อผู้ใช้
GenericName[tr]=Arayüz tasarım programı
GenericName[uk]=Дизайн інтерфейсу
GenericName[uz]=Интерфейс дизайнери
GenericName[ven]=Muvhati wa nga Phanda
GenericName[vi]=Trình thiết kế giao diện
GenericName[wa]=Dessineu d' eterfaces
GenericName[xh]=Umyili Wezojongongano
GenericName[xx]=xxInterface Designerxx
GenericName[zh_CN]=界面设计器
GenericName[zh_TW]=界面設計師
GenericName[zu]=Umakhi Womxhumanisi
Comment=Qt3 interface designer
Comment[az]=Qt3 axtar üz dizayn proqramı
Comment[bg]=Qt3 interface дизайнер
Comment[br]=Ergrafer etrefas Qt3
Comment[ca]=Dissenyador d'interfícies Qt3
Comment[cs]=Editor UI pro Qt3
Comment[da]=Qt3 grænseflade designer
Comment[de]=Schnittstellen-Designer für Qt3
Comment[el]=Σχεδιασμός περιβάλλοντων Qt3
Comment[eo]=Qt3-Interfacdesegnilo
Comment[es]=Diseñador de interfaces de Qt3
Comment[et]=Qt3 dialoogide redaktor
Comment[eu]=Qt3 interfaze diseinatzailea
Comment[fi]=Qt3:n käyttöliittymäsuunnittelija
Comment[fr]=Conception d'interfaces avec Qt3
Comment[gl]=Editor de interfaces de Qt3
Comment[he]=Qt3-ל םיקשממ בצעמ
Comment[hu]=Qt3 felülettervező
Comment[is]=Viðmótshönnunartól fyrir Qt3
Comment[it]=Editor per le interfaccie Qt3
Comment[ja]=Qt3インターフェースデザイナー
Comment[ko]=Qt3 인터페이스 디자이너
Comment[lt]=Qt3 sąsajos redaktorius
Comment[lv]=Qt3 starsejas dizainers
Comment[mk]=Дизајнер на Qt3 дијалози
Comment[nl]=Qt3 interface-ontwerper
Comment[no]=Qt3-grensesnittdesigner
Comment[no_NY]=Redigering av Qt3-miljø
Comment[oc]=Dessinador d'interfacies Qt3
Comment[pl]=Projektant interfejsu Qt3
Comment[pt]=Editor de interfaces do Qt3
Comment[pt_BR]=Designer de interface Qt3
Comment[ro]=Dezvoltator de interfeţe Qt3
Comment[ru]=редактор интерфейсов приложений Qt3
Comment[sk]=Qt3 dizajnér rozhrania
Comment[sl]=Snovalnik vmesnikov za Qt3
Comment[sr]=Dizajner Qt3 interfejsa
Comment[sv]=Editor för gränssnitt till Qt3
Comment[ta]=Qt3 À¨¼ôÀ¡Ç÷
Comment[tr]=Qt3 arayüz tasarım programı
Comment[uk]=Редактор інтерфейсу для Qt3
Comment[zh_CN.GB2312]=Qt3 界面设计程序
Comment[zh_TW.Big5]=Qt3 介面編輯器
MimeType=application/x-designer;
Icon=designer-qt3
Terminal=false
Type=Application
Categories=Qt;Development;

@ -12,6 +12,7 @@ TARGET = designercore
DEFINES += DESIGNER DEFINES += DESIGNER
DEFINES += QT_INTERNAL_XML DEFINES += QT_INTERNAL_XML
DEFINES += QT_INTERNAL_WORKSPACE DEFINES += QT_INTERNAL_WORKSPACE
DEFINES += QT_INTERNAL_ICONVIEW
DEFINES += QT_INTERNAL_TABLE DEFINES += QT_INTERNAL_TABLE
table:win32-msvc:DEFINES+=QM_TEMPLATE_EXTERN_TABLE=extern table:win32-msvc:DEFINES+=QM_TEMPLATE_EXTERN_TABLE=extern
@ -429,21 +430,14 @@ hpux-acc* {
TRANSLATIONS = designer_de.ts designer_fr.ts TRANSLATIONS = designer_de.ts designer_fr.ts
target.path=$$libs.path target.path=$$libs.path
INSTALLS += target
templates.path=$$data.path/templates templates.path=$$data.path/templates
templates.files = ../templates/* templates.files = ../templates/*
INSTALLS += templates
designertranlations.files = *.qm designertranlations.files = *.qm
designertranlations.path = $$translations.path designertranlations.path = $$translations.path
INSTALLS += designertranlations
!macx-g++:PRECOMPILED_HEADER = designer_pch.h !macx-g++:PRECOMPILED_HEADER = designer_pch.h
desktop.path = $$share.path/applications
desktop.files = designer-qt3.desktop
system( cp images/designer_appicon.png designer-qt3.png )
icon.path = $$share.path/pixmaps
icon.files = designer-qt3.png
INSTALLS += target templates designertranlations desktop icon

@ -1740,8 +1740,8 @@ void MainWindow::handleRMBProperties( int id, QMap<QString, int> &props, QWidget
if ( oldDoWrap != doWrap ) { if ( oldDoWrap != doWrap ) {
QString pn( tr( "Set 'wordwrap' of '%1'" ).arg( w->name() ) ); QString pn( tr( "Set 'wordwrap' of '%1'" ).arg( w->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"wordwrap", QVariant( oldDoWrap ), "wordwrap", QVariant( oldDoWrap, 0 ),
QVariant( doWrap ), QString::null, QString::null ); QVariant( doWrap, 0 ), QString::null, QString::null );
cmd->execute(); cmd->execute();
formWindow()->commandHistory()->addCommand( cmd ); formWindow()->commandHistory()->addCommand( cmd );
MetaDataBase::setPropertyChanged( w, "wordwrap", TRUE ); MetaDataBase::setPropertyChanged( w, "wordwrap", TRUE );
@ -2647,8 +2647,8 @@ bool MainWindow::openEditor( QWidget *w, FormWindow *f )
if ( oldDoWrap != doWrap ) { if ( oldDoWrap != doWrap ) {
QString pn( tr( "Set 'wordwrap' of '%1'" ).arg( w->name() ) ); QString pn( tr( "Set 'wordwrap' of '%1'" ).arg( w->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"wordwrap", QVariant( oldDoWrap ), "wordwrap", QVariant( oldDoWrap, 0 ),
QVariant( doWrap ), QString::null, QString::null ); QVariant( doWrap, 0 ), QString::null, QString::null );
cmd->execute(); cmd->execute();
formWindow()->commandHistory()->addCommand( cmd ); formWindow()->commandHistory()->addCommand( cmd );
MetaDataBase::setPropertyChanged( w, "wordwrap", TRUE ); MetaDataBase::setPropertyChanged( w, "wordwrap", TRUE );

@ -64,7 +64,7 @@ class MetaDataBaseRecord
public: public:
QObject *object; QObject *object;
QStringList changedProperties; QStringList changedProperties;
QStringVariantMap fakeProperties; QMap<QString,QVariant> fakeProperties;
QMap<QString, QString> propertyComments; QMap<QString, QString> propertyComments;
int spacing, margin; int spacing, margin;
QString resizeMode; QString resizeMode;
@ -272,14 +272,14 @@ QVariant MetaDataBase::fakeProperty( QObject * o, const QString &property)
o, o->name(), o->className() ); o, o->name(), o->className() );
return QVariant(); return QVariant();
} }
QStringVariantMap::Iterator it = r->fakeProperties.find( property ); QMap<QString, QVariant>::Iterator it = r->fakeProperties.find( property );
if ( it != r->fakeProperties.end() ) if ( it != r->fakeProperties.end() )
return r->fakeProperties[property]; return r->fakeProperties[property];
return WidgetFactory::defaultValue( o, property ); return WidgetFactory::defaultValue( o, property );
} }
QStringVariantMap* MetaDataBase::fakeProperties( QObject* o ) QMap<QString,QVariant>* MetaDataBase::fakeProperties( QObject* o )
{ {
setupDataBase(); setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o ); MetaDataBaseRecord *r = db->find( (void*)o );

@ -162,7 +162,7 @@ public:
static void setFakeProperty( QObject *o, const QString &property, const QVariant& value ); static void setFakeProperty( QObject *o, const QString &property, const QVariant& value );
static QVariant fakeProperty( QObject * o, const QString &property ); static QVariant fakeProperty( QObject * o, const QString &property );
static QStringVariantMap* fakeProperties( QObject* o ); static QMap<QString,QVariant>* fakeProperties( QObject* o );
static void setSpacing( QObject *o, int spacing ); static void setSpacing( QObject *o, int spacing );
static int spacing( QObject *o ); static int spacing( QObject *o );

@ -1103,7 +1103,7 @@ PropertyBoolItem::~PropertyBoolItem()
void PropertyBoolItem::toggle() void PropertyBoolItem::toggle()
{ {
bool b = value().toBool(); bool b = value().toBool();
setValue( QVariant( !b ) ); setValue( QVariant( !b, 0 ) );
setValue(); setValue();
} }
@ -1158,7 +1158,7 @@ void PropertyBoolItem::setValue()
return; return;
setText( 1, combo()->currentText() ); setText( 1, combo()->currentText() );
bool b = combo()->currentItem() == 0 ? (bool)FALSE : (bool)TRUE; bool b = combo()->currentItem() == 0 ? (bool)FALSE : (bool)TRUE;
PropertyItem::setValue( QVariant( b ) ); PropertyItem::setValue( QVariant( b, 0 ) );
notifyValueChange(); notifyValueChange();
} }
@ -1900,13 +1900,13 @@ void PropertyFontItem::initChildren()
} else if ( item->name() == tr( "Point Size" ) ) } else if ( item->name() == tr( "Point Size" ) )
item->setValue( val.toFont().pointSize() ); item->setValue( val.toFont().pointSize() );
else if ( item->name() == tr( "Bold" ) ) else if ( item->name() == tr( "Bold" ) )
item->setValue( QVariant( val.toFont().bold() ) ); item->setValue( QVariant( val.toFont().bold(), 0 ) );
else if ( item->name() == tr( "Italic" ) ) else if ( item->name() == tr( "Italic" ) )
item->setValue( QVariant( val.toFont().italic() ) ); item->setValue( QVariant( val.toFont().italic(), 0 ) );
else if ( item->name() == tr( "Underline" ) ) else if ( item->name() == tr( "Underline" ) )
item->setValue( QVariant( val.toFont().underline() ) ); item->setValue( QVariant( val.toFont().underline(), 0 ) );
else if ( item->name() == tr( "Strikeout" ) ) else if ( item->name() == tr( "Strikeout" ) )
item->setValue( QVariant( val.toFont().strikeOut() ) ); item->setValue( QVariant( val.toFont().strikeOut(), 0 ) );
} }
} }
@ -3702,9 +3702,9 @@ void PropertyList::setPropertyValue( PropertyItem *i )
} else if ( i->name() == "wordwrap" ) { } else if ( i->name() == "wordwrap" ) {
int align = editor->widget()->property( "alignment" ).toInt(); int align = editor->widget()->property( "alignment" ).toInt();
if ( align & WordBreak ) if ( align & WordBreak )
i->setValue( QVariant( true ) ); i->setValue( QVariant( TRUE, 0 ) );
else else
i->setValue( QVariant( false ) ); i->setValue( QVariant( FALSE, 0 ) );
} else if ( i->name() == "layoutSpacing" ) { } else if ( i->name() == "layoutSpacing" ) {
( (PropertyLayoutItem*)i )->setValue( MetaDataBase::spacing( WidgetFactory::containerOfWidget( (QWidget*)editor->widget() ) ) ); ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::spacing( WidgetFactory::containerOfWidget( (QWidget*)editor->widget() ) ) );
} else if ( i->name() == "layoutMargin" ) { } else if ( i->name() == "layoutMargin" ) {

@ -180,11 +180,6 @@ static struct {
{ Qt::Key_LaunchD, QT_TRANSLATE_NOOP( "QAccel", "Launch (D)" ) }, { Qt::Key_LaunchD, QT_TRANSLATE_NOOP( "QAccel", "Launch (D)" ) },
{ Qt::Key_LaunchE, QT_TRANSLATE_NOOP( "QAccel", "Launch (E)" ) }, { Qt::Key_LaunchE, QT_TRANSLATE_NOOP( "QAccel", "Launch (E)" ) },
{ Qt::Key_LaunchF, QT_TRANSLATE_NOOP( "QAccel", "Launch (F)" ) }, { Qt::Key_LaunchF, QT_TRANSLATE_NOOP( "QAccel", "Launch (F)" ) },
{ Qt::Key_MonBrightnessUp, QT_TRANSLATE_NOOP( "QAccel", "Monitor Brightness Up" ) },
{ Qt::Key_MonBrightnessDown, QT_TRANSLATE_NOOP( "QAccel", "Monitor Brightness Down" ) },
{ Qt::Key_KeyboardLightOnOff, QT_TRANSLATE_NOOP( "QAccel", "Keyboard Light On Off" ) },
{ Qt::Key_KeyboardBrightnessUp, QT_TRANSLATE_NOOP( "QAccel", "Keyboard Brightness Up" ) },
{ Qt::Key_KeyboardBrightnessDown, QT_TRANSLATE_NOOP( "QAccel", "Keyboard Brightness Down" ) },
// -------------------------------------------------------------- // --------------------------------------------------------------
// More consistent namings // More consistent namings
@ -1501,8 +1496,8 @@ void Resource::saveObjectProperties( QObject *w, QTextStream &ts, int indent )
} }
if ( w->isWidgetType() && MetaDataBase::fakeProperties( w ) ) { if ( w->isWidgetType() && MetaDataBase::fakeProperties( w ) ) {
QStringVariantMap* fakeProperties = MetaDataBase::fakeProperties( w ); QMap<QString, QVariant>* fakeProperties = MetaDataBase::fakeProperties( w );
for ( QStringVariantMap::Iterator fake = fakeProperties->begin(); for ( QMap<QString, QVariant>::Iterator fake = fakeProperties->begin();
fake != fakeProperties->end(); ++fake ) { fake != fakeProperties->end(); ++fake ) {
if ( MetaDataBase::isPropertyChanged( w, fake.key() ) ) { if ( MetaDataBase::isPropertyChanged( w, fake.key() ) ) {
if ( w->inherits("CustomWidget") ) { if ( w->inherits("CustomWidget") ) {

@ -1486,13 +1486,13 @@ QVariant WidgetFactory::defaultValue( QObject *w, const QString &propName )
{ {
if ( propName == "wordwrap" ) { if ( propName == "wordwrap" ) {
int v = defaultValue( w, "alignment" ).toInt(); int v = defaultValue( w, "alignment" ).toInt();
return QVariant( ( v & WordBreak ) == WordBreak ); return QVariant( ( v & WordBreak ) == WordBreak, 0 );
} else if ( propName == "toolTip" || propName == "whatsThis" ) { } else if ( propName == "toolTip" || propName == "whatsThis" ) {
return QVariant( QString::fromLatin1( "" ) ); return QVariant( QString::fromLatin1( "" ) );
} else if ( w->inherits( "CustomWidget" ) ) { } else if ( w->inherits( "CustomWidget" ) ) {
return QVariant(); return QVariant();
} else if ( propName == "frameworkCode" ) { } else if ( propName == "frameworkCode" ) {
return QVariant( true ); return QVariant( TRUE, 0 );
} else if ( propName == "layoutMargin" || propName == "layoutSpacing" ) { } else if ( propName == "layoutMargin" || propName == "layoutSpacing" ) {
return QVariant( -1 ); return QVariant( -1 );
} }

@ -718,7 +718,7 @@ void Dlg2Ui::emitWidgetBody( const QDomElement& e, bool layouted )
if ( tagName == QString("Style") ) { if ( tagName == QString("Style") ) {
if ( getTextValue(n) == QString("ReadWrite") ) if ( getTextValue(n) == QString("ReadWrite") )
emitProperty( QString("editable"), emitProperty( QString("editable"),
QVariant(true) ); QVariant(TRUE, 0) );
} }
} else if ( parentTagName == QString("DlgWidget") ) { } else if ( parentTagName == QString("DlgWidget") ) {
if ( tagName == QString("Name") ) { if ( tagName == QString("Name") ) {
@ -891,7 +891,7 @@ QVariant Dlg2Ui::getValue( const QDomElement& e, const QString& tagName,
if ( type == QString("integer") ) { if ( type == QString("integer") ) {
return getTextValue( e ).toInt(); return getTextValue( e ).toInt();
} else if ( type == QString("boolean") ) { } else if ( type == QString("boolean") ) {
return QVariant( isTrue(getTextValue(e)) ); return QVariant( isTrue(getTextValue(e)), 0 );
} else if ( type == QString("double") ) { } else if ( type == QString("double") ) {
return getTextValue( e ).toDouble(); return getTextValue( e ).toDouble();
} else if ( type == QString("qcstring") ) { } else if ( type == QString("qcstring") ) {

@ -839,7 +839,7 @@ void Glade2Ui::emitPushButton( const QString& text, const QString& name )
emitProperty( QString("name"), name.latin1() ); emitProperty( QString("name"), name.latin1() );
emitProperty( QString("text"), text ); emitProperty( QString("text"), text );
if ( name.contains(QString("ok")) > 0 ) { if ( name.contains(QString("ok")) > 0 ) {
emitProperty( QString("default"), QVariant(true) ); emitProperty( QString("default"), QVariant(TRUE, 0) );
} else if ( name.contains(QString("help")) > 0 ) { } else if ( name.contains(QString("help")) > 0 ) {
emitProperty( QString("accel"), (int) Qt::Key_F1 ); emitProperty( QString("accel"), (int) Qt::Key_F1 );
} }
@ -1215,7 +1215,7 @@ void Glade2Ui::emitQListViewColumns( const QDomElement& qlistview )
} else if ( tagName == QString("class") ) { } else if ( tagName == QString("class") ) {
QString gtkClass = getTextValue( n ); QString gtkClass = getTextValue( n );
if ( gtkClass.endsWith(QString("Tree")) ) if ( gtkClass.endsWith(QString("Tree")) )
emitProperty( QString("rootIsDecorated"), QVariant(true) ); emitProperty( QString("rootIsDecorated"), QVariant(TRUE, 0) );
} else if ( tagName == QString("selection_mode") ) { } else if ( tagName == QString("selection_mode") ) {
emitProperty( QString("selectionMode"), emitProperty( QString("selectionMode"),
gtk2qtSelectionMode(getTextValue(n)) ); gtk2qtSelectionMode(getTextValue(n)) );
@ -1815,16 +1815,16 @@ QString Glade2Ui::emitWidget( const QDomElement& widget, bool layouted,
if ( !layouted && (x != 0 || y != 0 || width != 0 || height != 0) ) if ( !layouted && (x != 0 || y != 0 || width != 0 || height != 0) )
emitProperty( QString("geometry"), QRect(x, y, width, height) ); emitProperty( QString("geometry"), QRect(x, y, width, height) );
if ( gtkClass == QString("GtkToggleButton") ) { if ( gtkClass == QString("GtkToggleButton") ) {
emitProperty( QString("toggleButton"), QVariant(true) ); emitProperty( QString("toggleButton"), QVariant(TRUE, 0) );
if ( active ) if ( active )
emitProperty( QString("on"), QVariant(true) ); emitProperty( QString("on"), QVariant(TRUE, 0) );
} else { } else {
if ( active ) if ( active )
emitProperty( QString("checked"), QVariant(true) ); emitProperty( QString("checked"), QVariant(TRUE, 0) );
} }
if ( !editable ) if ( !editable )
emitProperty( QString("readOnly"), QVariant(true) ); emitProperty( QString("readOnly"), QVariant(TRUE, 0) );
if ( !focusTarget.isEmpty() ) if ( !focusTarget.isEmpty() )
emitProperty( QString("buddy"), emitProperty( QString("buddy"),
fixedName(focusTarget).latin1() ); fixedName(focusTarget).latin1() );
@ -1889,7 +1889,7 @@ QString Glade2Ui::emitWidget( const QDomElement& widget, bool layouted,
} }
if ( !showText ) if ( !showText )
emitProperty( QString("percentageVisible"), emitProperty( QString("percentageVisible"),
QVariant(false) ); QVariant(FALSE, 0) );
if ( step != 1 ) if ( step != 1 )
emitProperty( QString("lineStep"), step ); emitProperty( QString("lineStep"), step );
if ( tabPos.endsWith(QString("_BOTTOM")) || if ( tabPos.endsWith(QString("_BOTTOM")) ||
@ -1905,12 +1905,12 @@ QString Glade2Ui::emitWidget( const QDomElement& widget, bool layouted,
if ( !tooltip.isEmpty() ) if ( !tooltip.isEmpty() )
emitProperty( QString("toolTip"), tooltip ); emitProperty( QString("toolTip"), tooltip );
if ( !valueInList ) if ( !valueInList )
emitProperty( QString("editable"), QVariant(true) ); emitProperty( QString("editable"), QVariant(TRUE, 0) );
if ( wrap && gtkClass == QString("GtkSpinButton") ) if ( wrap && gtkClass == QString("GtkSpinButton") )
emitProperty( QString("wrapping"), QVariant(true) ); emitProperty( QString("wrapping"), QVariant(TRUE, 0) );
if ( gtkClass.endsWith(QString("Tree")) ) { if ( gtkClass.endsWith(QString("Tree")) ) {
emitProperty( QString("rootIsDecorated"), QVariant(true) ); emitProperty( QString("rootIsDecorated"), QVariant(TRUE, 0) );
} else if ( gtkOrientedWidget.exactMatch(gtkClass) ) { } else if ( gtkOrientedWidget.exactMatch(gtkClass) ) {
QString s = ( gtkOrientedWidget.cap(1) == QChar('H') ) ? QString s = ( gtkOrientedWidget.cap(1) == QChar('H') ) ?
QString( "Horizontal" ) : QString( "Vertical" ); QString( "Horizontal" ) : QString( "Vertical" );

@ -199,7 +199,7 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal
v = QVariant( e.firstChild().toText().data().toDouble() ); v = QVariant( e.firstChild().toText().data().toDouble() );
} else if ( e.tagName() == "bool" ) { } else if ( e.tagName() == "bool" ) {
QString t = e.firstChild().toText().data(); QString t = e.firstChild().toText().data();
v = QVariant( t == "true" || t == "1" ); v = QVariant( t == "true" || t == "1", 0 );
} else if ( e.tagName() == "pixmap" ) { } else if ( e.tagName() == "pixmap" ) {
v = QVariant( e.firstChild().toText().data() ); v = QVariant( e.firstChild().toText().data() );
} else if ( e.tagName() == "iconset" ) { } else if ( e.tagName() == "iconset" ) {

@ -137,7 +137,7 @@ void Uic::embed( QTextStream& out, const char* project, const QStringList& image
for ( it = images.begin(); it != images.end(); ++it ) for ( it = images.begin(); it != images.end(); ++it )
out << "** " << *it << "\n"; out << "** " << *it << "\n";
out << "**\n"; out << "**\n";
out << "** Created by: The Qt user interface compiler (Qt " << QT_VERSION_STR << ")\n"; out << "** Created: " << QDateTime::currentDateTime().toString() << "\n";
out << "**\n"; out << "**\n";
out << "** WARNING! All changes made in this file will be lost!\n"; out << "** WARNING! All changes made in this file will be lost!\n";
out << "****************************************************************************/\n"; out << "****************************************************************************/\n";

@ -1052,7 +1052,7 @@ void Uic::createFormImpl( const QDomElement &e )
QString label = DomTool::readAttribute( n, "title", "", comment ).toString(); QString label = DomTool::readAttribute( n, "title", "", comment ).toString();
out << indent << "addPage( " << page << ", QString(\"\") );" << endl; out << indent << "addPage( " << page << ", QString(\"\") );" << endl;
trout << indent << "setTitle( " << page << ", " << trcall( label, comment ) << " );" << endl; trout << indent << "setTitle( " << page << ", " << trcall( label, comment ) << " );" << endl;
QVariant def( false ); QVariant def( FALSE, 0 );
if ( DomTool::hasAttribute( n, "backEnabled" ) ) if ( DomTool::hasAttribute( n, "backEnabled" ) )
out << indent << "setBackEnabled( " << page << ", " << mkBool( DomTool::readAttribute( n, "backEnabled", def).toBool() ) << endl; out << indent << "setBackEnabled( " << page << ", " << mkBool( DomTool::readAttribute( n, "backEnabled", def).toBool() ) << endl;
if ( DomTool::hasAttribute( n, "nextEnabled" ) ) if ( DomTool::hasAttribute( n, "nextEnabled" ) )

@ -320,7 +320,7 @@ int main( int argc, char * argv[] )
out << "/****************************************************************************" << endl; out << "/****************************************************************************" << endl;
out << "** Form "<< (impl? "implementation" : "interface") << " generated from reading ui file '" << fileName << "'" << endl; out << "** Form "<< (impl? "implementation" : "interface") << " generated from reading ui file '" << fileName << "'" << endl;
out << "**" << endl; out << "**" << endl;
out << "** Created by: The Qt user interface compiler (Qt " << QT_VERSION_STR << ")" << endl; out << "** Created: " << QDateTime::currentDateTime().toString() << endl;
out << "**" << endl; out << "**" << endl;
out << "** WARNING! All changes made in this file will be lost!" << endl; out << "** WARNING! All changes made in this file will be lost!" << endl;
out << "****************************************************************************/" << endl << endl; out << "****************************************************************************/" << endl << endl;

@ -537,7 +537,7 @@ QString Uic::setObjectProperty( const QString& objClass, const QString& obj, con
if ( stdset ) if ( stdset )
v = "%1"; v = "%1";
else else
v = "QVariant( %1 )"; v = "QVariant( %1, 0 )";
v = v.arg( mkBool( e.firstChild().toText().data() ) ); v = v.arg( mkBool( e.firstChild().toText().data() ) );
} else if ( e.tagName() == "pixmap" ) { } else if ( e.tagName() == "pixmap" ) {
v = e.firstChild().toText().data(); v = e.firstChild().toText().data();

@ -263,7 +263,7 @@ bool Uic::isFrameworkCodeGenerated( const QDomElement& e )
{ {
QDomElement n = getObjectProperty( e, "frameworkCode" ); QDomElement n = getObjectProperty( e, "frameworkCode" );
if ( n.attribute("name") == "frameworkCode" && if ( n.attribute("name") == "frameworkCode" &&
!DomTool::elementToVariant( n.firstChild().toElement(), QVariant( true ) ).toBool() ) !DomTool::elementToVariant( n.firstChild().toElement(), QVariant( TRUE, 0 ) ).toBool() )
return FALSE; return FALSE;
return TRUE; return TRUE;
} }

@ -637,7 +637,7 @@ void QWidgetFactory::unpackVariant( const UibStrTable& strings, QDataStream& in,
break; break;
case QVariant::Bool: case QVariant::Bool:
in >> bit; in >> bit;
value = QVariant( bit != 0 ); value = QVariant( bit != 0, 0 );
break; break;
case QVariant::Double: case QVariant::Double:
in >> value.asDouble(); in >> value.asDouble();

@ -1,102 +0,0 @@
[Desktop Entry]
Exec=linguist-qt3
Name=Qt3 Linguist
Name[de]=Qt3-Linguist
Name[eo]=Qt3-Lingvisto
Name[es]=Lingüista Qt3
Name[ko]=Qt3 언어학자
Name[lv]=Qt3 Lingvists
Name[fr]=Qt3 Linguist
Name[hu]=Qt3 Nyelvész
Name[ja]=Qt3リンギスト
Name[km]=ភាសាវិទូ Qt3
Name[nb]=Qt3-Linguist
Name[pa]=Qt3 ਅਨੁਵਾਦਕ
Name[pl]=Lingwista Qt3
Name[zh_TW]=Qt3 語言專家
GenericName=Translation Tool
GenericName[af]=Vertaling Program
GenericName[ar]=أداة للترجمة
GenericName[az]=Tərcümə Vasitəsi
GenericName[bg]=Инструмент за превод
GenericName[bn]=অনুবাদ টুল
GenericName[bs]=Alat za prevođenje
GenericName[ca]=Eina de traducció
GenericName[cs]=Překladatelský nástroj
GenericName[cy]=Erfyn Cyfieithu
GenericName[da]=Oversættelsesværktøj
GenericName[de]=Übersetzungsprogramm
GenericName[el]=Εργαλείο μεταφράσεων
GenericName[eo]=Tradukilo por Qt-programoj
GenericName[es]=Herramienta de traducción
GenericName[et]=Tõlkimise rakendus
GenericName[eu]=Itzulpenerako Tresnak
GenericName[fa]=ابزار ترجمه
GenericName[fi]=Käännöstyökalu
GenericName[fo]=Umsetingaramboð
GenericName[fr]=Outil de traduction
GenericName[gl]=Ferramenta de Traducción
GenericName[he]=כלי תרגום
GenericName[hi]=अनुवाद उपकरण
GenericName[hr]=Uslužni program za prevođenje
GenericName[hu]=Fordítássegítő
GenericName[is]=Þýðingartól
GenericName[it]=Strumento per le traduzioni
GenericName[ja]=翻訳ツール
GenericName[km]=ឧបករណ៍​បកប្រែ
GenericName[ko]=번역 도구
GenericName[lo]=ເຄື່ອງມືແປພາສາ
GenericName[lt]=Vertimo įrankis
GenericName[lv]=Tulkošanas Rīks
GenericName[mn]=Орчуулгын програм
GenericName[ms]=Perkakasan Penterjemahan
GenericName[mt]=Għodda tat-traduzzjoni
GenericName[nb]=Oversettelsesverktøy
GenericName[nl]=Vertaalprogramma
GenericName[nn]=Omsetjingsverktøy
GenericName[nso]=Sebereka sa Thlathollo
GenericName[pa]=ਅਨੁਵਾਦ ਸੰਦ
GenericName[pl]=Narzędzie dla tłumaczy
GenericName[pt]=Ferramenta de Tradução
GenericName[pt_BR]=Ferramenta de Tradução
GenericName[ro]=Utilitar de traducere
GenericName[ru]=Утилита локализации приложений
GenericName[se]=Jorgalanneavvu
GenericName[sk]=Prekladací nástroj
GenericName[sl]=Orodje za prevajanje
GenericName[sr]=Алат за превођење
GenericName[sr@Latn]=Alat za prevođenje
GenericName[ss]=Lithulusi lekuhumusha
GenericName[sv]=Översättningsverktyg
GenericName[ta]=மொழிபெயர்ப்புக் கருவி
GenericName[tg]=Тарҷумагар барои QT
GenericName[th]=เครื่องมือแปลภาษา
GenericName[tr]=Çeviri Aracı
GenericName[uk]=Засіб для перекладів
GenericName[uz]=Таржима қилиш воситаси
GenericName[ven]=Zwishumiswa zwau Dologa
GenericName[vi]=Công cụ dịch
GenericName[wa]=Usteye di ratournaedje
GenericName[xh]=Isixhobo Soguqulelo lomsebenzi kolunye ulwimi
GenericName[xx]=xxTranslation Toolxx
GenericName[zh_CN]=翻译工具
GenericName[zh_TW]=翻譯工具
GenericName[zu]=Ithuluzi Lokuguqulela
Comment=Tool for translating message catalogues of Qt3 based programs
Comment[da]=Redskab til at oversætte Qt3 baserede programmer
Comment[de]=Dienstprogramm zur Übersetzung von Programmen, die auf Qt3 basieren
Comment[eo]=Ilo por tradukado de mesaĝaroj de Qt3-bazitaj programoj
Comment[es]=Herramienta para la traducción de catálogos de mensajes de programas basados en Qt3
Comment[fr]=Outil de traduction des catalogues de messages pour les programmes utilisant Qt3
Comment[he]=Qt3 תוססובמ תוינכות לש תועדוה יגולטק םוגרתל ילכ
Comment[hu]=Segédprogram a Qt3-alapú programok üzenetfájljainak lefordításához
Comment[ko]=Qt3를 바탕으로 하는 프로그램에서 쓸 번역된 메세지 목록을 관리하는 도구
Comment[lv]=Rīks ziņojumu katalogu tulkošanai uz Qt3 bāzētās programmās
Comment[pt]=Ferramenta para traduzir os catálogos de mensagens de programas do Qt3
Comment[pt_BR]=Ferramenta para traduzir os catálogos de mensagens de programas do Qt3
Comment[sv]=Verktyg för att översätta meddelandekataloger från Qt3-baserade program
MimeType=application/x-linguist;
Terminal=false
Icon=linguist-qt3
Type=Application
Categories=Qt;Development;Translation;

@ -47,13 +47,15 @@ mac {
PROJECTNAME = Qt Linguist PROJECTNAME = Qt Linguist
target.path=$$bins.path target.path=$$bins.path
INSTALLS += target
linguisttranslations.files = *.qm linguisttranslations.files = *.qm
linguisttranslations.path = $$translations.path linguisttranslations.path = $$translations.path
INSTALLS += linguisttranslations
phrasebooks.path=$$data.path/phrasebooks phrasebooks.path=$$data.path/phrasebooks
phrasebooks.files = ../phrasebooks/* phrasebooks.files = ../phrasebooks/*
INSTALLS += phrasebooks
FORMS = about.ui \ FORMS = about.ui \
statistics.ui statistics.ui
IMAGES = images/accelerator.png \ IMAGES = images/accelerator.png \
@ -105,13 +107,3 @@ IMAGES = images/accelerator.png \
images/undo.png \ images/undo.png \
images/whatsthis.xpm images/whatsthis.xpm
INCLUDEPATH += ../shared INCLUDEPATH += ../shared
desktop.path = $$share.path/applications
desktop.files = linguist-qt3.desktop
system( cp images/appicon.png linguist-qt3.png )
icon.path = $$share.path/pixmaps
icon.files = linguist-qt3.png
INSTALLS += target linguisttranslations phrasebooks desktop icon

@ -192,10 +192,10 @@ void translate( const QString& filename, const QString& qmfile )
QString charset = msgstr.mid( cpos, i-cpos ); QString charset = msgstr.mid( cpos, i-cpos );
codec = QTextCodec::codecForName( charset.ascii() ); codec = QTextCodec::codecForName( charset.ascii() );
if ( codec ) { if ( codec ) {
qDebug( "PO file character set: %s. Codec: %s", debug( "PO file character set: %s. Codec: %s",
charset.ascii(), codec->name() ); charset.ascii(), codec->name() );
} else { } else {
qDebug( "No codec for %s", charset.ascii() ); debug( "No codec for %s", charset.ascii() );
} }
} }
break; break;

@ -1,34 +0,0 @@
[Desktop Entry]
Encoding=UTF-8
Exec=qtconfig-qt3
Name=Qt3 Configuration
Name[de]=Qt3 Konfiguration
Name[bg]=Настройки на Qt3
Name[cs]=Qt3 nastavení
Name[de]=Qt3 Konfiguration
Name[el]=Ρυθμίσεις Qt3
Name[fi]=Qt3 asetukset
Name[fr]=Configuration de Qt3
Name[hu]=Qt3 beállítások
Name[it]=Impostazioni Qt3
Name[ja]=Qt3設定
Name[km]=ការ​កំណត់ Qt3
Name[nb]=Qt3-innstillinger
Name[nl]=Qt3 Instellingen
Name[pa]=Qt3 ਸਥਾਪਨ
Name[pl]=Ustawienia Qt3
Name[pt]=Definições Qt3
Name[pt_BR]=Configurações do Qt3
Name[ru]=Настройки Qt3
Name[sv]=Qt3-inställningar
Name[uk]=Параметри Qt3
Name[zh_CN]=Qt3 设置
Name[zh_TW]=Qt3 設定
Comment=A graphical configuration tool for programs using Qt 3
Comment[de]=Ein grafisches Konfigurationstool für Qt3-Programme
Comment[fr]=Un outil de configuration graphique pour les programmes utilisant Qt3
MimeType=application/x-qtconfig;
Terminal=false
Icon=qt3config
Type=Application
Categories=Qt;Settings;

@ -12,17 +12,7 @@ TARGET = qtconfig
DESTDIR = ../../bin DESTDIR = ../../bin
target.path=$$bins.path target.path=$$bins.path
INSTALLS += target
INCLUDEPATH += . INCLUDEPATH += .
DBFILE = qtconfig.db DBFILE = qtconfig.db
REQUIRES=full-config nocrosscompiler !win32* REQUIRES=full-config nocrosscompiler !win32*
desktop.path = $$share.path/applications
desktop.files = qt3config.desktop
system( cp images/appicon.png qt3config.png )
icon.path = $$share.path/pixmaps
icon.files = qt3config.png
INSTALLS += target desktop icon

@ -33,6 +33,7 @@
#include "qanimationwriter.h" #include "qanimationwriter.h"
#define QT_CLEAN_NAMESPACE
#include <qfile.h> #include <qfile.h>
#include <png.h> #include <png.h>

Loading…
Cancel
Save