Remove Qt4 related stuff

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/83/head
Michele Calgaro 10 months ago
parent 48ea22d00b
commit 83991febd2
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

3
configure vendored

@ -3020,9 +3020,6 @@ EOF
if [ "$CFG_LARGEFILE" = "yes" ]; then if [ "$CFG_LARGEFILE" = "yes" ]; then
echo "#define QT_LARGEFILE_SUPPORT 64" >>$outpath/include/ntqconfig.h.new echo "#define QT_LARGEFILE_SUPPORT 64" >>$outpath/include/ntqconfig.h.new
if [ "$CFG_NEWABI" = "yes" ]; then
echo "#define QT_ABI_QT4 1" >>$outpath/include/ntqconfig.h.new
fi
fi fi
$unixtests/ptrsize.test $XQMAKESPEC $OPT_VERBOSE $relpath $outpath $unixtests/ptrsize.test $XQMAKESPEC $OPT_VERBOSE $relpath $outpath

@ -155,13 +155,7 @@ public:
bool permission( int permissionSpec ) const; bool permission( int permissionSpec ) const;
#if (TQT_VERSION-0 &gt;= 0x040000)
#error "TQFileInfo::size() should return TQIODevice::Offset instead of uint"
#elif defined(QT_ABI_QT4)
TQIODevice::Offset size() const;
#else
uint size() const; uint size() const;
#endif
TQDateTime created() const; TQDateTime created() const;
TQDateTime lastModified() const; TQDateTime lastModified() const;

@ -127,11 +127,7 @@ body { background: #ffffff; color: black; }
class Q_EXPORT TQIODevice class Q_EXPORT TQIODevice
{ {
public: public:
#if defined(QT_ABI_QT4)
typedef TQ_LLONG Offset;
#else
typedef TQ_ULONG Offset; typedef TQ_ULONG Offset;
#endif
TQIODevice(); TQIODevice();
virtual ~TQIODevice(); virtual ~TQIODevice();

@ -109,13 +109,6 @@ public:
TQPtrListIterator&lt;TQObject&gt;::operator=( i ); } TQPtrListIterator&lt;TQObject&gt;::operator=( i ); }
}; };
#if (TQT_VERSION-0 &gt;= 0x040000)
#if defined(Q_CC_GNU)
#warning "remove the TQObjectListIt class"
#warning "remove the typedef too, maybe"
#endif
typedef TQObjectListIterator TQObjectListIt;
#else
class Q_EXPORT TQObjectListIt : public TQPtrListIterator&lt;TQObject&gt; class Q_EXPORT TQObjectListIt : public TQPtrListIterator&lt;TQObject&gt;
{ {
public: public:
@ -123,7 +116,6 @@ public:
TQObjectListIt &amp;operator=(const TQObjectListIt &amp;i) TQObjectListIt &amp;operator=(const TQObjectListIt &amp;i)
{ return (TQObjectListIt&amp;)TQPtrListIterator&lt;TQObject&gt;::operator=(i); } { return (TQObjectListIt&amp;)TQPtrListIterator&lt;TQObject&gt;::operator=(i); }
}; };
#endif
#endif // TQOBJECTLIST_H #endif // TQOBJECTLIST_H
</pre> </pre>

@ -210,9 +210,6 @@ private:
uint enabled : 1; uint enabled : 1;
int rw, cl; int rw, cl;
int rowspan, colspan; int rowspan, colspan;
#if (TQT_VERSION &gt;= 0x040000)
#error "Add a setAlignment() function in 4.0 (but no d pointer)"
#endif
}; };
#define Q_DEFINED_QTABLE_ITEM #define Q_DEFINED_QTABLE_ITEM

@ -491,9 +491,6 @@ protected:
protected slots: protected slots:
virtual void doChangeInterval(); virtual void doChangeInterval();
void sliderReleased(); // ### make virtual in 4.0 void sliderReleased(); // ### make virtual in 4.0
#if (TQT_VERSION &gt;= 0x040000)
#error "Some functions need to be changed to virtual for TQt 4.0"
#endif
private slots: private slots:
void formatMore(); void formatMore();

@ -175,9 +175,6 @@ protected:
// ### Make virtual in 4.0, maybe act like TQPushButton with // ### Make virtual in 4.0, maybe act like TQPushButton with
// regards to setFlat() instead? Andy // regards to setFlat() instead? Andy
bool uses3D() const; bool uses3D() const;
#if (TQT_VERSION &gt;= 0x040000)
#error "Some functions need to be changed to virtual for TQt 4.0"
#endif
bool eventFilter( TQObject *o, TQEvent *e ); bool eventFilter( TQObject *o, TQEvent *e );

@ -80,9 +80,6 @@ body { background: #ffffff; color: black; }
#ifndef QT_H #ifndef QT_H
#include "ntqdatetime.h" #include "ntqdatetime.h"
#include "ntqstring.h" #include "ntqstring.h"
#if defined(QT_ABI_QT4)
#include "ntqiodevice.h"
#endif
#endif // QT_H #endif // QT_H
class TQUrlOperator; class TQUrlOperator;
@ -100,18 +97,6 @@ public:
TQUrlInfo(); TQUrlInfo();
TQUrlInfo( const TQUrlOperator &amp;path, const TQString &amp;file ); TQUrlInfo( const TQUrlOperator &amp;path, const TQString &amp;file );
TQUrlInfo( const TQUrlInfo &amp;ui ); TQUrlInfo( const TQUrlInfo &amp;ui );
#if (TQT_VERSION-0 &gt;= 0x040000)
#error "TQUrlInfo::TQUrlInfo() should accept TQIODevice::Offset instead of uint"
#elif defined(QT_ABI_QT4)
TQUrlInfo( const TQString &amp;name, int permissions, const TQString &amp;owner,
const TQString &amp;group, TQIODevice::Offset size, const TQDateTime &amp;lastModified,
const TQDateTime &amp;lastRead, bool isDir, bool isFile, bool isSymLink,
bool isWritable, bool isReadable, bool isExecutable );
TQUrlInfo( const TQUrl &amp;url, int permissions, const TQString &amp;owner,
const TQString &amp;group, TQIODevice::Offset size, const TQDateTime &amp;lastModified,
const TQDateTime &amp;lastRead, bool isDir, bool isFile, bool isSymLink,
bool isWritable, bool isReadable, bool isExecutable );
#else
TQUrlInfo( const TQString &amp;name, int permissions, const TQString &amp;owner, TQUrlInfo( const TQString &amp;name, int permissions, const TQString &amp;owner,
const TQString &amp;group, uint size, const TQDateTime &amp;lastModified, const TQString &amp;group, uint size, const TQDateTime &amp;lastModified,
const TQDateTime &amp;lastRead, bool isDir, bool isFile, bool isSymLink, const TQDateTime &amp;lastRead, bool isDir, bool isFile, bool isSymLink,
@ -120,7 +105,6 @@ public:
const TQString &amp;group, uint size, const TQDateTime &amp;lastModified, const TQString &amp;group, uint size, const TQDateTime &amp;lastModified,
const TQDateTime &amp;lastRead, bool isDir, bool isFile, bool isSymLink, const TQDateTime &amp;lastRead, bool isDir, bool isFile, bool isSymLink,
bool isWritable, bool isReadable, bool isExecutable ); bool isWritable, bool isReadable, bool isExecutable );
#endif
TQUrlInfo &amp;operator=( const TQUrlInfo &amp;ui ); TQUrlInfo &amp;operator=( const TQUrlInfo &amp;ui );
virtual ~TQUrlInfo(); virtual ~TQUrlInfo();
@ -130,13 +114,7 @@ public:
virtual void setSymLink( bool b ); virtual void setSymLink( bool b );
virtual void setOwner( const TQString &amp;s ); virtual void setOwner( const TQString &amp;s );
virtual void setGroup( const TQString &amp;s ); virtual void setGroup( const TQString &amp;s );
#if (TQT_VERSION-0 &gt;= 0x040000)
#error "TQUrlInfo::setSize() should accept TQIODevice::Offset instead of uint"
#elif defined(QT_ABI_QT4)
virtual void setSize( TQIODevice::Offset size );
#else
virtual void setSize( uint size ); virtual void setSize( uint size );
#endif
virtual void setWritable( bool b ); virtual void setWritable( bool b );
virtual void setReadable( bool b ); virtual void setReadable( bool b );
virtual void setPermissions( int p ); virtual void setPermissions( int p );
@ -148,13 +126,7 @@ public:
int permissions() const; int permissions() const;
TQString owner() const; TQString owner() const;
TQString group() const; TQString group() const;
#if (TQT_VERSION-0 &gt;= 0x040000)
#error "TQUrlInfo::size() should return TQIODevice::Offset instead of uint"
#elif defined(QT_ABI_QT4)
TQIODevice::Offset size() const;
#else
uint size() const; uint size() const;
#endif
TQDateTime lastModified() const; TQDateTime lastModified() const;
TQDateTime lastRead() const; TQDateTime lastRead() const;
bool isDir() const; bool isDir() const;

@ -78,9 +78,6 @@ public:
bool isComposing() const; bool isComposing() const;
bool isPreeditRelocationEnabled(); bool isPreeditRelocationEnabled();
#if (TQT_VERSION-0 >= 0x040000)
TQPtrList<TQMenu> *qt4menus();
#endif
TQPtrList<TQInputContextMenu> *menus(); TQPtrList<TQInputContextMenu> *menus();
TQPopupMenu *createImSelPopup(); TQPopupMenu *createImSelPopup();

@ -117,10 +117,6 @@
#include "ntqgb18030codec.h" #include "ntqgb18030codec.h"
#if (TQT_VERSION-0 >= 0x040000)
#error "move obsolete header <ntqgbkcodec.h> into the src/compat directory"
#endif
#ifndef TQT_NO_BIG_CODECS #ifndef TQT_NO_BIG_CODECS
#define InRange(c, lower, upper) (((c) >= (lower)) && ((c) <= (upper))) #define InRange(c, lower, upper) (((c) >= (lower)) && ((c) <= (upper)))

@ -2005,13 +2005,7 @@ TQString TQFileDialogPrivate::File::text( int column ) const
return info.name(); return info.name();
case 1: case 1:
if ( info.isFile() ) { if ( info.isFile() ) {
#if (TQT_VERSION-0 >= 0x040000)
#error "clean up Large File Support"
#elif defined(QT_ABI_QT4)
TQIODevice::Offset size = info.size();
#else
uint size = info.size(); uint size = info.size();
#endif
#if defined(QT_LARGEFILE_SUPPORT) && defined(Q_OS_UNIX) #if defined(QT_LARGEFILE_SUPPORT) && defined(Q_OS_UNIX)
// ### the following code should not be needed as soon // ### the following code should not be needed as soon
// ### as TQUrlInfo::size() can return 64-bit // ### as TQUrlInfo::size() can return 64-bit

@ -57,10 +57,8 @@ struct TQInputContextMenu {
NoSeparator, NoSeparator,
InsertSeparator InsertSeparator
}; };
#if !(TQT_VERSION-0 >= 0x040000)
TQString title; TQString title;
TQPopupMenu *popup; TQPopupMenu *popup;
#endif
}; };
@ -89,13 +87,8 @@ public:
virtual bool isComposing() const; virtual bool isComposing() const;
virtual bool isPreeditRelocationEnabled(); virtual bool isPreeditRelocationEnabled();
#if (TQT_VERSION-0 >= 0x040000)
virtual TQPtrList<TQAction *> actions();
void addActionsTo( TQMenu *menu, TQInputContextMenu::Action action = TQInputContextMenu::InsertSeparator );
#else
virtual TQPtrList<TQInputContextMenu> *menus(); virtual TQPtrList<TQInputContextMenu> *menus();
void addMenusTo( TQPopupMenu *popup, TQInputContextMenu::Action action = TQInputContextMenu::InsertSeparator ); void addMenusTo( TQPopupMenu *popup, TQInputContextMenu::Action action = TQInputContextMenu::InsertSeparator );
#endif
#if defined(Q_WS_X11) #if defined(Q_WS_X11)
// these functions are not recommended for ordinary use // these functions are not recommended for ordinary use

@ -73,13 +73,6 @@ public:
TQPtrListIterator<TQObject>::operator=( i ); } TQPtrListIterator<TQObject>::operator=( i ); }
}; };
#if (TQT_VERSION-0 >= 0x040000)
#if defined(Q_CC_GNU)
#warning "remove the TQObjectListIt class"
#warning "remove the typedef too, maybe"
#endif
typedef TQObjectListIterator TQObjectListIt;
#else
class Q_EXPORT TQObjectListIt : public TQPtrListIterator<TQObject> class Q_EXPORT TQObjectListIt : public TQPtrListIterator<TQObject>
{ {
public: public:
@ -87,6 +80,5 @@ public:
TQObjectListIt &operator=(const TQObjectListIt &i) TQObjectListIt &operator=(const TQObjectListIt &i)
{ return (TQObjectListIt&)TQPtrListIterator<TQObject>::operator=(i); } { return (TQObjectListIt&)TQPtrListIterator<TQObject>::operator=(i); }
}; };
#endif
#endif // TQOBJECTLIST_H #endif // TQOBJECTLIST_H

@ -44,9 +44,6 @@
#ifndef QT_H #ifndef QT_H
#include "ntqdatetime.h" #include "ntqdatetime.h"
#include "ntqstring.h" #include "ntqstring.h"
#if defined(QT_ABI_QT4)
#include "ntqiodevice.h"
#endif
#endif // QT_H #endif // QT_H
class TQUrlOperator; class TQUrlOperator;
@ -64,18 +61,6 @@ public:
TQUrlInfo(); TQUrlInfo();
TQUrlInfo( const TQUrlOperator &path, const TQString &file ); TQUrlInfo( const TQUrlOperator &path, const TQString &file );
TQUrlInfo( const TQUrlInfo &ui ); TQUrlInfo( const TQUrlInfo &ui );
#if (TQT_VERSION-0 >= 0x040000)
#error "TQUrlInfo::TQUrlInfo() should accept TQIODevice::Offset instead of uint"
#elif defined(QT_ABI_QT4)
TQUrlInfo( const TQString &name, int permissions, const TQString &owner,
const TQString &group, TQIODevice::Offset size, const TQDateTime &lastModified,
const TQDateTime &lastRead, bool isDir, bool isFile, bool isSymLink,
bool isWritable, bool isReadable, bool isExecutable );
TQUrlInfo( const TQUrl &url, int permissions, const TQString &owner,
const TQString &group, TQIODevice::Offset size, const TQDateTime &lastModified,
const TQDateTime &lastRead, bool isDir, bool isFile, bool isSymLink,
bool isWritable, bool isReadable, bool isExecutable );
#else
TQUrlInfo( const TQString &name, int permissions, const TQString &owner, TQUrlInfo( const TQString &name, int permissions, const TQString &owner,
const TQString &group, uint size, const TQDateTime &lastModified, const TQString &group, uint size, const TQDateTime &lastModified,
const TQDateTime &lastRead, bool isDir, bool isFile, bool isSymLink, const TQDateTime &lastRead, bool isDir, bool isFile, bool isSymLink,
@ -84,7 +69,6 @@ public:
const TQString &group, uint size, const TQDateTime &lastModified, const TQString &group, uint size, const TQDateTime &lastModified,
const TQDateTime &lastRead, bool isDir, bool isFile, bool isSymLink, const TQDateTime &lastRead, bool isDir, bool isFile, bool isSymLink,
bool isWritable, bool isReadable, bool isExecutable ); bool isWritable, bool isReadable, bool isExecutable );
#endif
TQUrlInfo &operator=( const TQUrlInfo &ui ); TQUrlInfo &operator=( const TQUrlInfo &ui );
virtual ~TQUrlInfo(); virtual ~TQUrlInfo();
@ -94,13 +78,7 @@ public:
virtual void setSymLink( bool b ); virtual void setSymLink( bool b );
virtual void setOwner( const TQString &s ); virtual void setOwner( const TQString &s );
virtual void setGroup( const TQString &s ); virtual void setGroup( const TQString &s );
#if (TQT_VERSION-0 >= 0x040000)
#error "TQUrlInfo::setSize() should accept TQIODevice::Offset instead of uint"
#elif defined(QT_ABI_QT4)
virtual void setSize( TQIODevice::Offset size );
#else
virtual void setSize( uint size ); virtual void setSize( uint size );
#endif
virtual void setWritable( bool b ); virtual void setWritable( bool b );
virtual void setReadable( bool b ); virtual void setReadable( bool b );
virtual void setPermissions( int p ); virtual void setPermissions( int p );
@ -112,13 +90,7 @@ public:
int permissions() const; int permissions() const;
TQString owner() const; TQString owner() const;
TQString group() const; TQString group() const;
#if (TQT_VERSION-0 >= 0x040000)
#error "TQUrlInfo::size() should return TQIODevice::Offset instead of uint"
#elif defined(QT_ABI_QT4)
TQIODevice::Offset size() const;
#else
uint size() const; uint size() const;
#endif
TQDateTime lastModified() const; TQDateTime lastModified() const;
TQDateTime lastRead() const; TQDateTime lastRead() const;
bool isDir() const; bool isDir() const;

@ -802,14 +802,6 @@ TQString TQInputContext::language()
} }
#if (TQT_VERSION-0 >= 0x040000)
/*!
This is a preliminary interface for TQt4
*/
TQPtrList<TQAction *> TQInputContext::actions()
{
}
#else
/*! /*!
This function can be reimplemented in a subclass to provide input This function can be reimplemented in a subclass to provide input
method dependent popup menus. Return 0 if the menus are method dependent popup menus. Return 0 if the menus are
@ -826,7 +818,6 @@ TQPtrList<TQInputContextMenu> *TQInputContext::menus()
{ {
return 0; return 0;
} }
#endif
/*! /*!
Appends input method dependent submenus into \a popup. A separator Appends input method dependent submenus into \a popup. A separator

@ -1398,10 +1398,6 @@ void TQGridLayout::setColStretch( int col, int stretch )
data->setColStretch( col, stretch ); data->setColStretch( col, stretch );
} }
#if TQT_VERSION >= 0x040000
#error "Make add{Row,Col}Spacing() inline TQT_NO_COMPAT functions defined in terms of set{Row,Col}Spacing()"
#endif
/*! /*!
\obsolete \obsolete

@ -3171,9 +3171,6 @@ void TQPainter::drawTextItem( int x, int y, const TQTextItem &ti, int textFlags
fe->draw( this, x, y, engine, si, textFlags ); fe->draw( this, x, y, engine, si, textFlags );
} }
#if TQT_VERSION >= 0x040000
#error "remove current position and associated methods"
#endif
/*! /*!
\obsolete \obsolete
Returns the current position of the pen. Returns the current position of the pen.

@ -48,10 +48,6 @@
# include "ntqapplication.h" # include "ntqapplication.h"
#endif // QT_H #endif // QT_H
#if TQT_VERSION >= 0x040000
# error "Remove TQThread::TQThread() and TQThread::start()."
#endif
/*! /*!
\class TQThread ntqthread.h \class TQThread ntqthread.h

@ -185,17 +185,10 @@ TQUrlInfo::TQUrlInfo( const TQUrlInfo &ui )
isExecutable. isExecutable.
*/ */
#if defined(QT_ABI_QT4)
TQUrlInfo::TQUrlInfo( const TQString &name, int permissions, const TQString &owner,
const TQString &group, TQIODevice::Offset size, const TQDateTime &lastModified,
const TQDateTime &lastRead, bool isDir, bool isFile, bool isSymLink,
bool isWritable, bool isReadable, bool isExecutable )
#else
TQUrlInfo::TQUrlInfo( const TQString &name, int permissions, const TQString &owner, TQUrlInfo::TQUrlInfo( const TQString &name, int permissions, const TQString &owner,
const TQString &group, uint size, const TQDateTime &lastModified, const TQString &group, uint size, const TQDateTime &lastModified,
const TQDateTime &lastRead, bool isDir, bool isFile, bool isSymLink, const TQDateTime &lastRead, bool isDir, bool isFile, bool isSymLink,
bool isWritable, bool isReadable, bool isExecutable ) bool isWritable, bool isReadable, bool isExecutable )
#endif
{ {
d = new TQUrlInfoPrivate; d = new TQUrlInfoPrivate;
d->name = name; d->name = name;
@ -226,17 +219,10 @@ TQUrlInfo::TQUrlInfo( const TQString &name, int permissions, const TQString &own
isExecutable. isExecutable.
*/ */
#if defined(QT_ABI_QT4)
TQUrlInfo::TQUrlInfo( const TQUrl &url, int permissions, const TQString &owner,
const TQString &group, TQIODevice::Offset size, const TQDateTime &lastModified,
const TQDateTime &lastRead, bool isDir, bool isFile, bool isSymLink,
bool isWritable, bool isReadable, bool isExecutable )
#else
TQUrlInfo::TQUrlInfo( const TQUrl &url, int permissions, const TQString &owner, TQUrlInfo::TQUrlInfo( const TQUrl &url, int permissions, const TQString &owner,
const TQString &group, uint size, const TQDateTime &lastModified, const TQString &group, uint size, const TQDateTime &lastModified,
const TQDateTime &lastRead, bool isDir, bool isFile, bool isSymLink, const TQDateTime &lastRead, bool isDir, bool isFile, bool isSymLink,
bool isWritable, bool isReadable, bool isExecutable ) bool isWritable, bool isReadable, bool isExecutable )
#endif
{ {
d = new TQUrlInfoPrivate; d = new TQUrlInfoPrivate;
d->name = TQFileInfo( url.path() ).fileName(); d->name = TQFileInfo( url.path() ).fileName();
@ -407,11 +393,7 @@ void TQUrlInfo::setGroup( const TQString &s )
\sa isValid() \sa isValid()
*/ */
#if defined(QT_ABI_QT4)
void TQUrlInfo::setSize( TQIODevice::Offset size )
#else
void TQUrlInfo::setSize( uint size ) void TQUrlInfo::setSize( uint size )
#endif
{ {
if ( !d ) if ( !d )
d = new TQUrlInfoPrivate; d = new TQUrlInfoPrivate;
@ -542,15 +524,11 @@ TQString TQUrlInfo::group() const
\sa isValid() \sa isValid()
*/ */
#if defined(QT_ABI_QT4)
TQIODevice::Offset TQUrlInfo::size() const
#else
uint TQUrlInfo::size() const uint TQUrlInfo::size() const
#endif
{ {
if ( !d ) if ( !d )
return 0; return 0;
#if defined(QT_LARGEFILE_SUPPORT) && !defined(QT_ABI_QT4) #if defined(QT_LARGEFILE_SUPPORT)
return d->size > UINT_MAX ? UINT_MAX : (uint)d->size; return d->size > UINT_MAX ? UINT_MAX : (uint)d->size;
#else #else
return d->size; return d->size;

@ -175,9 +175,6 @@ private:
uint enabled : 1; uint enabled : 1;
int rw, cl; int rw, cl;
int rowspan, colspan; int rowspan, colspan;
#if (TQT_VERSION >= 0x040000)
#error "Add a setAlignment() function in 4.0 (but no d pointer)"
#endif
}; };
#define Q_DEFINED_QTABLE_ITEM #define Q_DEFINED_QTABLE_ITEM

@ -119,13 +119,7 @@ public:
bool permission( int permissionSpec ) const; bool permission( int permissionSpec ) const;
#if (TQT_VERSION-0 >= 0x040000)
#error "TQFileInfo::size() should return TQIODevice::Offset instead of uint"
#elif defined(QT_ABI_QT4)
TQIODevice::Offset size() const;
#else
uint size() const; uint size() const;
#endif
TQDateTime created() const; TQDateTime created() const;
TQDateTime lastModified() const; TQDateTime lastModified() const;

@ -91,11 +91,7 @@
class Q_EXPORT TQIODevice class Q_EXPORT TQIODevice
{ {
public: public:
#if defined(QT_ABI_QT4)
typedef TQ_LLONG Offset;
#else
typedef TQ_ULONG Offset; typedef TQ_ULONG Offset;
#endif
TQIODevice(); TQIODevice();
virtual ~TQIODevice(); virtual ~TQIODevice();

@ -268,11 +268,7 @@ bool TQBuffer::at( Offset pos )
#endif #endif
if ( pos > a_len ) { if ( pos > a_len ) {
#if defined(QT_CHECK_RANGE) #if defined(QT_CHECK_RANGE)
#if defined(QT_ABI_QT4)
tqWarning( "TQBuffer::at: Index %lld out of range", pos );
#else
tqWarning( "TQBuffer::at: Index %lu out of range", pos ); tqWarning( "TQBuffer::at: Index %lu out of range", pos );
#endif
#endif #endif
return FALSE; return FALSE;
} }

@ -278,7 +278,7 @@ bool TQFile::open( int m )
length = INT_MAX; length = INT_MAX;
ioIndex = 0; ioIndex = 0;
} else { } else {
#if defined(QT_LARGEFILE_SUPPORT) && !defined(QT_ABI_QT4) #if defined(QT_LARGEFILE_SUPPORT)
length = st.st_size > UINT_MAX ? UINT_MAX : (Offset)st.st_size; length = st.st_size > UINT_MAX ? UINT_MAX : (Offset)st.st_size;
#else #else
length = (Offset)st.st_size; length = (Offset)st.st_size;
@ -352,12 +352,8 @@ bool TQFile::open( int m, FILE *f )
struct stat st; struct stat st;
::fstat( fileno(fh), &st ); ::fstat( fileno(fh), &st );
#if defined(QT_LARGEFILE_SUPPORT) #if defined(QT_LARGEFILE_SUPPORT)
#if !defined(QT_ABI_QT4)
off_t tmp = ftello( fh ); off_t tmp = ftello( fh );
ioIndex = tmp > UINT_MAX ? UINT_MAX : (Offset)tmp; ioIndex = tmp > UINT_MAX ? UINT_MAX : (Offset)tmp;
#else
ioIndex = (Offset)ftello( fh );
#endif
#else #else
ioIndex = (Offset)ftell( fh ); ioIndex = (Offset)ftell( fh );
#endif #endif
@ -367,7 +363,7 @@ bool TQFile::open( int m, FILE *f )
length = INT_MAX; length = INT_MAX;
ioIndex = 0; ioIndex = 0;
} else { } else {
#if defined(QT_LARGEFILE_SUPPORT) && !defined(QT_ABI_QT4) #if defined(QT_LARGEFILE_SUPPORT)
length = st.st_size > UINT_MAX ? UINT_MAX : (Offset)st.st_size; length = st.st_size > UINT_MAX ? UINT_MAX : (Offset)st.st_size;
#else #else
length = (Offset)st.st_size; length = (Offset)st.st_size;
@ -423,7 +419,7 @@ bool TQFile::open( int m, int f )
ext_f = TRUE; ext_f = TRUE;
struct stat st; struct stat st;
::fstat( fd, &st ); ::fstat( fd, &st );
#if defined(QT_LARGEFILE_SUPPORT) && !defined(QT_ABI_QT4) #if defined(QT_LARGEFILE_SUPPORT)
off_t tmp = ::lseek(fd, 0, SEEK_CUR); off_t tmp = ::lseek(fd, 0, SEEK_CUR);
ioIndex = tmp > UINT_MAX ? UINT_MAX : (Offset)tmp; ioIndex = tmp > UINT_MAX ? UINT_MAX : (Offset)tmp;
#else #else
@ -435,7 +431,7 @@ bool TQFile::open( int m, int f )
length = INT_MAX; length = INT_MAX;
ioIndex = 0; ioIndex = 0;
} else { } else {
#if defined(QT_LARGEFILE_SUPPORT) && !defined(QT_ABI_QT4) #if defined(QT_LARGEFILE_SUPPORT)
length = st.st_size > UINT_MAX ? UINT_MAX : (Offset)st.st_size; length = st.st_size > UINT_MAX ? UINT_MAX : (Offset)st.st_size;
#else #else
length = (Offset)st.st_size; length = (Offset)st.st_size;
@ -472,7 +468,7 @@ TQIODevice::Offset TQFile::size() const
} }
if ( ret == -1 ) if ( ret == -1 )
return 0; return 0;
#if defined(QT_LARGEFILE_SUPPORT) && !defined(QT_ABI_QT4) #if defined(QT_LARGEFILE_SUPPORT)
return (uint)st.st_size > UINT_MAX ? UINT_MAX : (Offset)st.st_size; return (uint)st.st_size > UINT_MAX ? UINT_MAX : (Offset)st.st_size;
#else #else
return st.st_size; return st.st_size;
@ -527,18 +523,14 @@ bool TQFile::at( Offset pos )
#endif #endif
} }
if ( ok ) if ( ok )
#if defined(QT_LARGEFILE_SUPPORT) && !defined(QT_ABI_QT4) #if defined(QT_LARGEFILE_SUPPORT)
ioIndex = pos > UINT_MAX ? UINT_MAX : (Offset)pos; ioIndex = pos > UINT_MAX ? UINT_MAX : (Offset)pos;
#else #else
ioIndex = (Offset)pos; ioIndex = (Offset)pos;
#endif #endif
#if defined(QT_CHECK_RANGE) #if defined(QT_CHECK_RANGE)
else else
#if defined(QT_ABI_QT4)
tqWarning( "TQFile::at: Cannot set file position %lld", pos );
#else
tqWarning( "TQFile::at: Cannot set file position %lu", pos ); tqWarning( "TQFile::at: Cannot set file position %lu", pos );
#endif
#endif #endif
return ok; return ok;
} }
@ -654,7 +646,7 @@ TQ_LONG TQFile::writeBlock( const char *p, TQ_ULONG len )
setErrorStringErrno( errno ); setErrorStringErrno( errno );
if ( !isSequentialAccess() ) { if ( !isSequentialAccess() ) {
if ( isRaw() ) { // recalc file position if ( isRaw() ) { // recalc file position
#if defined(QT_LARGEFILE_SUPPORT) && !defined(QT_ABI_QT4) #if defined(QT_LARGEFILE_SUPPORT)
off_t tmp = ::lseek( fd, 0, SEEK_CUR ); off_t tmp = ::lseek( fd, 0, SEEK_CUR );
ioIndex = tmp > UINT_MAX ? UINT_MAX : (Offset)tmp; ioIndex = tmp > UINT_MAX ? UINT_MAX : (Offset)tmp;
#else #else
@ -662,12 +654,8 @@ TQ_LONG TQFile::writeBlock( const char *p, TQ_ULONG len )
#endif #endif
} else { } else {
#if defined(QT_LARGEFILE_SUPPORT) #if defined(QT_LARGEFILE_SUPPORT)
#if !defined(QT_ABI_QT4)
off_t tmp = (Offset)::fseeko( fh, 0, SEEK_CUR ); off_t tmp = (Offset)::fseeko( fh, 0, SEEK_CUR );
ioIndex = tmp > UINT_MAX ? UINT_MAX : (Offset)tmp; ioIndex = tmp > UINT_MAX ? UINT_MAX : (Offset)tmp;
#else
ioIndex = (Offset)::fseeko( fh, 0, SEEK_CUR );
#endif
#else #else
ioIndex = (Offset)::fseek( fh, 0, SEEK_CUR ); ioIndex = (Offset)::fseek( fh, 0, SEEK_CUR );
#endif #endif

@ -45,7 +45,7 @@
#include "ntqdir.h" #include "ntqdir.h"
#include "qfiledefs_p.h" #include "qfiledefs_p.h"
#include "ntqdeepcopy.h" #include "ntqdeepcopy.h"
#if defined(QT_LARGEFILE_SUPPORT) && !defined(QT_ABI_QT4) #if defined(QT_LARGEFILE_SUPPORT)
#include <limits.h> #include <limits.h>
#endif #endif
@ -576,18 +576,12 @@ bool TQFileInfo::convertToAbs()
Returns the file size in bytes, or 0 if the file does not exist or Returns the file size in bytes, or 0 if the file does not exist or
if the size is 0 or if the size cannot be fetched. if the size is 0 or if the size cannot be fetched.
*/ */
#if defined(QT_ABI_QT4)
TQIODevice::Offset TQFileInfo::size() const
#else
uint TQFileInfo::size() const uint TQFileInfo::size() const
#endif
{ {
if ( !fic || !cache ) if ( !fic || !cache )
doStat(); doStat();
if ( fic ) if ( fic )
#if defined(QT_ABI_QT4) #if defined(QT_LARGEFILE_SUPPORT)
return (TQIODevice::Offset)fic->st.st_size;
#elif defined(QT_LARGEFILE_SUPPORT)
return (uint)fic->st.st_size > UINT_MAX ? UINT_MAX : (uint)fic->st.st_size; return (uint)fic->st.st_size > UINT_MAX ? UINT_MAX : (uint)fic->st.st_size;
#else #else
return (uint)fic->st.st_size; return (uint)fic->st.st_size;

@ -723,12 +723,6 @@ void tqSystemWarning( const char* msg, int code )
// //
// The TQ_CHECK_PTR macro calls this function to check if an allocation went ok. // The TQ_CHECK_PTR macro calls this function to check if an allocation went ok.
// //
#if (TQT_VERSION-0 >= 0x040000)
#if defined(Q_CC_GNU)
#warning "Change TQ_CHECK_PTR to '{if ((p)==0) tqt_check_pointer(__FILE__,__LINE__);}'"
#warning "No need for tqt_check_pointer() to return a value - make it void!"
#endif
#endif
bool tqt_check_pointer( bool c, const char *n, int l ) bool tqt_check_pointer( bool c, const char *n, int l )
{ {
if ( c ) if ( c )

@ -568,11 +568,7 @@ bool TQIODevice::at( Offset pos )
{ {
#if defined(QT_CHECK_RANGE) #if defined(QT_CHECK_RANGE)
if ( pos > size() ) { if ( pos > size() ) {
#if defined(QT_ABI_QT4)
tqWarning( "TQIODevice::at: Index %lld out of range", pos );
#else
tqWarning( "TQIODevice::at: Index %lu out of range", pos ); tqWarning( "TQIODevice::at: Index %lu out of range", pos );
#endif
return FALSE; return FALSE;
} }
#endif #endif

@ -2081,13 +2081,10 @@ static ArgEscapeData findArgEscapes(const TQString &s)
d.locale_occurrences = 0; d.locale_occurrences = 0;
} }
#if TQT_VERSION < 0x040000 /* Only the first instance is replaced,
// ### remove preprocessor in TQt 4.0
/* Since in TQt < 4.0 only the first instance is replaced,
escape_len should hold the length of only the first escape escape_len should hold the length of only the first escape
sequence */ sequence */
if (d.occurrences == 0) if (d.occurrences == 0)
#endif
{ {
++d.occurrences; ++d.occurrences;
if (locale_arg) { if (locale_arg) {

@ -384,11 +384,7 @@ bool TQStringBuffer::at( Offset pos )
#endif #endif
if ( pos >= s->length()*2 ) { if ( pos >= s->length()*2 ) {
#if defined(QT_CHECK_RANGE) #if defined(QT_CHECK_RANGE)
#if defined(QT_ABI_QT4)
tqWarning( "TQStringBuffer::at: Index %lld out of range", pos );
#else
tqWarning( "TQStringBuffer::at: Index %lu out of range", pos ); tqWarning( "TQStringBuffer::at: Index %lu out of range", pos );
#endif
#endif #endif
return FALSE; return FALSE;
} }

@ -458,9 +458,6 @@ protected:
protected slots: protected slots:
virtual void doChangeInterval(); virtual void doChangeInterval();
void sliderReleased(); // ### make virtual in 4.0 void sliderReleased(); // ### make virtual in 4.0
#if (TQT_VERSION >= 0x040000)
#error "Some functions need to be changed to virtual for TQt 4.0"
#endif
private slots: private slots:
void formatMore(); void formatMore();

@ -139,9 +139,6 @@ protected:
// ### Make virtual in 4.0, maybe act like TQPushButton with // ### Make virtual in 4.0, maybe act like TQPushButton with
// regards to setFlat() instead? Andy // regards to setFlat() instead? Andy
bool uses3D() const; bool uses3D() const;
#if (TQT_VERSION >= 0x040000)
#error "Some functions need to be changed to virtual for TQt 4.0"
#endif
bool eventFilter( TQObject *o, TQEvent *e ); bool eventFilter( TQObject *o, TQEvent *e );

@ -958,9 +958,6 @@ void TQAction::setVisible( bool visible )
return; return;
d->visible = visible; d->visible = visible;
d->update( TQActionPrivate::Visibility ); d->update( TQActionPrivate::Visibility );
#if (TQT_VERSION-0 >= 0x040000)
#error "TQAction::setVisible function wants to be virtual. Also add virtual change() function"
#endif
if ( d->d_group ) //### this function wants to be virtual in 4.0 if ( d->d_group ) //### this function wants to be virtual in 4.0
d->d_group->update( (TQActionGroup*) this ); d->d_group->update( (TQActionGroup*) this );
} }

@ -675,9 +675,6 @@ bool TQButton::hitButton( const TQPoint &pos ) const
\sa drawButtonLabel(), paintEvent() \sa drawButtonLabel(), paintEvent()
*/ */
#if (TQT_VERSION-0 >= 0x040000)
#error "TQButton. Make pure virtual"
#endif
void TQButton::drawButton( TQPainter * ) void TQButton::drawButton( TQPainter * )
{ {
return; return;

@ -502,22 +502,6 @@ void TQPopupMenu::popup( const TQPoint &pos, int indexAtPoint )
return; return;
#endif #endif
#if (TQT_VERSION-0 >= 0x040000)
#error "Fix this now"
// #### should move to TQWidget - anything might need this functionality,
// #### since anything can have WType_Popup window flag.
// #### This includes stuff in TQPushButton and some stuff for setting
// #### the geometry of TQDialog.
// TQPopupMenu
// ::exec()
// ::popup()
// TQPushButton (shouldn't require TQMenuPopup)
// ::popupPressed
// Some stuff in qwidget.cpp for dialogs... can't remember exactly.
// Also the code here indicatets the parameter should be a rect, not a
// point.
#endif
TQRect screen = screenRect( geometry().center()); TQRect screen = screenRect( geometry().center());
TQRect screen2 = screenRect( TQApplication::reverseLayout() TQRect screen2 = screenRect( TQApplication::reverseLayout()
? pos+TQPoint(width(),0) : pos ); ? pos+TQPoint(width(),0) : pos );

@ -2097,13 +2097,6 @@ void TQScrollView::moveContents(int x, int y)
d->hideOrShowAll(this, TRUE ); d->hideOrShowAll(this, TRUE );
} }
#if (TQT_VERSION-0 >= 0x040000)
#if defined(Q_CC_GNU)
#warning "Should rename contents{X,Y,Width,Height} to viewport{...}"
#endif
// Because it's the viewport rectangle that is "moving", not the contents.
#endif
/*! /*!
\property TQScrollView::contentsX \property TQScrollView::contentsX
\brief the X coordinate of the contents that are at the left edge of \brief the X coordinate of the contents that are at the left edge of

@ -5014,10 +5014,6 @@ void TQTextEdit::scrollToAnchor( const TQString& name )
} }
} }
#if (TQT_VERSION-0 >= 0x040000)
#error "function anchorAt(const TQPoint& pos) should be merged into function anchorAt(const TQPoint& pos, AnchorAttribute attr)"
#endif
/*! /*!
\overload \overload

@ -67,11 +67,6 @@ public:
}; };
#if (TQT_VERSION-0 >= 0x040000)
#if defined(Q_CC_GNU)
#warning "Remove TQWidgetStackEventFilter"
#endif
#endif
class TQWidgetStackEventFilter : public TQObject class TQWidgetStackEventFilter : public TQObject
{ {
/* For binary compatibility, since we cannot implement virtual /* For binary compatibility, since we cannot implement virtual

Loading…
Cancel
Save