Drop USE_TQT4 code

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/221/head
Michele Calgaro 1 year ago
parent 503eb0d9f4
commit 57af4f9d87
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -8,8 +8,7 @@ that we would like to make for the next binary incompatible release.
- Change all FooPrivate *d; -> Private * const d; and place initialization
in the constructor (for classes that would benefit from this). To help catch silly
mistakes since d should never change. Also consider changing to use KStaticDeleter to
help prevent mistakes where developers forget to delete the pointer. Maybe make use of
Qt4 helper macros?
help prevent mistakes where developers forget to delete the pointer.
- Move all utility functions away from TDEApplication. TBD: Make TDEApplication
a very thin wrapper around QApplication. Ideally, TDEApplication should go
@ -210,7 +209,7 @@ an alternative help->contents action)
KPixmapIO can't dither, and it generally doesn't make much sense to have this class.
- TDEListView: merge setDropHighlighter and setDropVisualizer, add a setDnDMode to choose between
"dnd to move items" (e.g. keditbookmarks) and "dnd onto items" (e.g. kmail). Unless Qt4 does it all :)
"dnd to move items" (e.g. keditbookmarks) and "dnd onto items" (e.g. kmail).
- Move TDEIO::findDeviceMountPoint, findPathMoundPoint, probably_slow_mounted, and testFileSystemFlag to KMountPoint,
to merge that code.

@ -3,7 +3,6 @@
#include <tqdatastream.h>
#ifdef USE_QT3
inline TQDataStream & operator << (TQDataStream & str, bool b)
{
str << TQ_INT8(b);
@ -17,42 +16,5 @@ inline TQDataStream & operator >> (TQDataStream & str, bool & b)
b = bool(l);
return str;
}
#endif // USE_QT3
#if TQT_VERSION < 0x030200 && !defined(Q_WS_WIN) && !defined(Q_WS_MAC)
inline TQDataStream & operator << (TQDataStream & str, long long int ll)
{
TQ_UINT32 l1,l2;
l1 = ll & 0xffffffffLL;
l2 = ll >> 32;
str << l1 << l2;
return str;
}
inline TQDataStream & operator >> (TQDataStream & str, long long int&ll)
{
TQ_UINT32 l1,l2;
str >> l1 >> l2;
ll = ((unsigned long long int)(l2) << 32) + (long long int) l1;
return str;
}
inline TQDataStream & operator << (TQDataStream & str, unsigned long long int ll)
{
TQ_UINT32 l1,l2;
l1 = ll & 0xffffffffLL;
l2 = ll >> 32;
str << l1 << l2;
return str;
}
inline TQDataStream & operator >> (TQDataStream & str, unsigned long long int &ll)
{
TQ_UINT32 l1,l2;
str >> l1 >> l2;
ll = ((unsigned long long int)(l2) << 32) + (unsigned long long int) l1;
return str;
}
#endif
#endif

@ -25,11 +25,7 @@ Boston, MA 02110-1301, USA.
#include <tqeventloop.h>
#ifdef USE_QT3
#define GLIB_EVENT_LOOP TGlibEventLoop glibEventLoop;
#else
#define GLIB_EVENT_LOOP
#endif
#define GLIB_EVENT_LOOP TGlibEventLoop glibEventLoop;
class TGlibEventLoop : public TQEventLoop {

@ -25,10 +25,6 @@
#include <tqiodevice.h>
#include "tdelibs_export.h"
#ifdef Q_MOC_RUN
#define USE_QT4
#endif // Q_MOC_RUN
class KAsyncIOPrivate;
/**
* Asynchronous I/O Support
@ -39,12 +35,7 @@ class KAsyncIOPrivate;
* @author Thiago Macieira <thiago.macieira@kdemail.net>
* @short Asynchronous I/O support
*/
class TDECORE_EXPORT KAsyncIO:
#ifdef USE_QT4
#else // USE_QT4
public TQObject,
#endif // USE_QT4
public TQIODevice
class TDECORE_EXPORT KAsyncIO: public TQObject, public TQIODevice
{
TQ_OBJECT

@ -111,22 +111,12 @@ bool TDEBufferedIO::setBufferSize(int rsize, int wsize /* = -2 */)
return true;
}
#ifdef USE_QT3
int TDEBufferedIO::bytesAvailable() const
#endif // USE_QT3
#ifdef USE_QT4
qint64 TDEBufferedIO::bytesAvailable() const
#endif // USE_QT4
{
return readBufferSize();
}
#ifdef USE_QT3
int TDEBufferedIO::bytesToWrite() const
#endif // USE_QT3
#ifdef USE_QT4
qint64 TDEBufferedIO::bytesToWrite() const
#endif // USE_QT4
{
return writeBufferSize();
}

@ -118,12 +118,7 @@ public:
* Returns the number of bytes available for reading in the read buffer
* @return the number of bytes available for reading
*/
#ifdef USE_QT3
virtual int bytesAvailable() const;
#endif // USE_QT3
#ifdef USE_QT4
virtual qint64 bytesAvailable() const;
#endif // USE_QT4
/**
* Waits for more data to be available and returns the amount of available data then.
@ -137,12 +132,7 @@ public:
* Returns the number of bytes yet to write, still in the write buffer
* @return the number of unwritten bytes in the write buffer
*/
#ifdef USE_QT3
virtual int bytesToWrite() const;
#endif // USE_QT3
#ifdef USE_QT4
virtual qint64 bytesToWrite() const;
#endif // USE_QT4
/**
* Checks whether there is enough data in the buffer to read a line

@ -222,12 +222,7 @@ KExtendedSocket::~KExtendedSocket()
delete d;
}
#ifdef USE_QT3
void KExtendedSocket::reset()
#endif // USE_QT3
#ifdef USE_QT4
bool KExtendedSocket::reset()
#endif // USE_QT4
{
closeNow();
release();
@ -1557,12 +1552,7 @@ int KExtendedSocket::unreadBlock(const char *, uint)
return -1;
}
#ifdef USE_QT3
int KExtendedSocket::bytesAvailable() const
#endif // USE_QT3
#ifdef USE_QT4
qint64 KExtendedSocket::bytesAvailable() const
#endif // USE_QT4
{
if (d->status < connected || d->flags & passiveSocket)
return -2;

@ -22,10 +22,6 @@
#include "tdelibs_export.h"
#ifdef Q_MOC_RUN
#define Q_OS_UNIX
#endif // Q_MOC_RUN
#ifdef Q_OS_UNIX
#include <sys/time.h>
@ -211,12 +207,7 @@ public:
* freeing any related resources still being kept.
* @since 3.1
*/
#ifdef USE_QT3
void reset();
#endif // USE_QT3
#ifdef USE_QT4
bool reset();
#endif // USE_QT4
/*
* --- status, flags and internal variables --- *
@ -685,12 +676,7 @@ public:
* Returns length of this socket. This call is not supported on sockets.
* @return the length of this socket, or 0 if unsupported
*/
#ifdef USE_QT3
virtual inline TQ_ULONG size() const
#endif // USE_QT3
#ifdef USE_QT4
virtual inline qint64 size() const
#endif // USE_QT4
{ return 0; }
/**
@ -805,12 +791,7 @@ public:
* @return The number of available bytes, or -1 on error or -2 if this call is invalid
* in the current state.
*/
#ifdef USE_QT3
virtual int bytesAvailable() const;
#endif // USE_QT3
#ifdef USE_QT4
virtual qint64 bytesAvailable() const;
#endif // USE_QT4
/**
* Waits @p msec milliseconds for more data to be available (use 0 to

@ -28,10 +28,6 @@ DEALINGS IN THE SOFTWARE.
#include <tqobject.h>
#include <tdelibs_export.h>
#ifdef Q_MOC_RUN
#define Q_WS_X11
#endif // Q_MOC_RUN
#ifdef Q_WS_X11 // FIXME(E)
#include <X11/Xlib.h>

@ -78,11 +78,7 @@ void KQIODeviceGZip::flush(void)
}
}
#ifdef USE_QT4
qint64 KQIODeviceGZip::size(void) const
#else // USE_QT4
TQIODevice::Offset KQIODeviceGZip::size(void) const
#endif // USE_QT4
{
return 0; // You cannot determine size!
}

@ -42,11 +42,7 @@ public:
void close(void);
void flush(void);
#ifdef USE_QT4
qint64 size(void) const;
#else // USE_QT4
Offset size(void) const;
#endif // USE_QT4
Offset at(void) const;
bool at(Offset pos);
bool atEnd(void) const;

@ -22,10 +22,6 @@
#include "tdelibs_export.h"
#ifdef Q_MOC_RUN
#define Q_OS_UNIX
#endif // Q_MOC_RUN
#ifdef Q_OS_UNIX
#include <tqobject.h>

@ -30,10 +30,6 @@ DEALINGS IN THE SOFTWARE.
#include <tqmap.h>
#include <tdelibs_export.h>
#ifdef Q_MOC_RUN
#define Q_WS_X11
#endif // Q_MOC_RUN
#ifdef Q_WS_X11
#include <X11/X.h>

@ -4,7 +4,7 @@
Q*::*
qt_*
# these should preferably go in some namespace in Qt4
# these should preferably go in some namespace
tqDebug
tqFatal
tqWarning

@ -93,12 +93,7 @@ void TDEBufferedSocket::close()
}
}
#ifdef USE_QT3
TQ_LONG TDEBufferedSocket::bytesAvailable() const
#endif
#ifdef USE_QT4
qint64 TDEBufferedSocket::bytesAvailable() const
#endif
{
if (!d->input)
return KStreamSocket::bytesAvailable();
@ -284,12 +279,7 @@ TDEIOBufferBase* TDEBufferedSocket::outputBuffer()
return d->output;
}
#ifdef USE_QT3
TQ_ULONG TDEBufferedSocket::bytesToWrite() const
#endif
#ifdef USE_QT4
qint64 TDEBufferedSocket::bytesToWrite() const
#endif
{
if (!d->output)
return 0;

@ -99,12 +99,7 @@ public:
/**
* Make use of the buffers.
*/
#ifdef USE_QT3
virtual TQ_LONG bytesAvailable() const;
#endif
#ifdef USE_QT4
virtual qint64 bytesAvailable() const;
#endif
/**
* Make use of buffers.
@ -183,12 +178,7 @@ public:
/**
* Returns the length of the output buffer.
*/
#ifdef USE_QT3
virtual TQ_ULONG bytesToWrite() const;
#endif
#ifdef USE_QT4
virtual qint64 bytesToWrite() const;
#endif
/**
* Closes the socket and discards any output data that had been buffered
@ -208,8 +198,6 @@ public:
*/
TQCString readLine();
// KDE4: make virtual, add timeout to match the Qt4 signature
// and move to another class up the hierarchy
/**
* Blocks until the connection is either established, or completely
* failed.
@ -255,12 +243,7 @@ public:
* which required a call to reset() in order to be able to connect again
* using the same device. This is not necessary in TDEBufferedSocket any more.
*/
#ifdef USE_QT3
inline void reset()
#endif
#ifdef USE_QT4
inline bool reset()
#endif
{ closeNow(); }
};

@ -48,16 +48,8 @@ public:
};
KClientSocketBase::KClientSocketBase(TQObject *parent, const char *name) :
#ifdef USE_QT4
#else // USE_QT4
TQObject(parent, name),
#endif // USE_QT4
d(new KClientSocketBasePrivate)
{
#ifdef USE_QT4
setParent(parent);
setObjectName(name);
#endif // USE_QT4
TQObject(parent, name), d(new KClientSocketBasePrivate)
{
d->state = Idle;
d->enableRead = true;
d->enableWrite = false;
@ -286,12 +278,7 @@ void KClientSocketBase::close()
}
// This function is unlike all the others because it is const
#ifdef USE_QT3
TQ_LONG KClientSocketBase::bytesAvailable() const
#endif
#ifdef USE_QT4
qint64 KClientSocketBase::bytesAvailable() const
#endif
{
return socketDevice()->bytesAvailable();
}

@ -32,10 +32,6 @@
#include "kresolver.h"
#include <tdelibs_export.h>
#ifdef Q_MOC_RUN
#define USE_QT4
#endif // Q_MOC_RUN
namespace KNetwork {
class KClientSocketBasePrivate;
@ -50,12 +46,7 @@ class KClientSocketBasePrivate;
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
class TDECORE_EXPORT KClientSocketBase :
#ifdef USE_QT4
#else // USE_QT4
public TQObject,
#endif // USE_QT4
public KActiveSocketBase
class TDECORE_EXPORT KClientSocketBase : public TQObject, public KActiveSocketBase
{
TQ_OBJECT
@ -302,12 +293,7 @@ public:
* Returns the number of bytes available on this socket.
* Reimplemented from TDESocketBase.
*/
#ifdef USE_QT3
virtual TQ_LONG bytesAvailable() const;
#endif
#ifdef USE_QT4
virtual qint64 bytesAvailable() const;
#endif
/**
* Waits for more data. Reimplemented from TDESocketBase.

@ -504,11 +504,7 @@ public:
* This call is not supported on sockets. Reimplemented from TQIODevice.
* This will always return 0.
*/
#ifdef USE_QT4
virtual qint64 size() const
#else // USE_QT4
virtual Offset size() const
#endif // USE_QT4
{ return 0; }
/**
@ -536,12 +532,7 @@ public:
* Returns the number of bytes available for reading without
* blocking.
*/
#ifdef USE_QT3
virtual TQ_LONG bytesAvailable() const = 0;
#endif
#ifdef USE_QT4
virtual qint64 bytesAvailable() const = 0;
#endif
/**
* Waits up to @p msecs for more data to be available on this socket.

@ -364,12 +364,7 @@ bool TDESocketDevice::disconnect()
return true; // all is well
}
#ifdef USE_QT3
TQ_LONG TDESocketDevice::bytesAvailable() const
#endif
#ifdef USE_QT4
qint64 TDESocketDevice::bytesAvailable() const
#endif
{
if (m_sockfd == -1)
return -1; // there's nothing to read in a closed socket

@ -198,12 +198,7 @@ public:
/**
* Returns the number of bytes available for reading without blocking.
*/
#ifdef USE_QT3
virtual TQ_LONG bytesAvailable() const;
#endif
#ifdef USE_QT4
virtual qint64 bytesAvailable() const;
#endif
/**
* Waits up to @p msecs for more data to be available on this socket.

@ -202,11 +202,7 @@ public:
TQWMatrix matrix = m_engine->painter()->parseTransform(transform);
TQWMatrix *current = m_engine->painter()->worldMatrix();
#ifdef USE_QT4
printf("[FIXME] *current = matrix * *current locks up under Qt4; bypassing for now\n");
#else // USE_QT4
*current = matrix * *current;
#endif // USE_QT4
}
void parseCommonAttributes(TQDomNode &node)

@ -752,7 +752,6 @@ TDEApplication::TDEApplication( int& argc, char** argv, const TQCString& rAppNam
}
TDEApplication::TDEApplication( bool allowStyles, bool GUIenabled, bool SMenabled ) :
// TQApplication( *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(), TRUE ), // Qt4 requires that there always be a GUI
TQApplication( *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(), GUIenabled, SMenabled ), // We need to be able to run command line apps
TDEInstance( TDECmdLineArgs::about),
#ifdef Q_WS_X11
@ -779,7 +778,6 @@ TDEApplication::TDEApplication( bool allowStyles, bool GUIenabled, bool SMenable
// FOR BINARY COMPATIBILITY ONLY
// REMOVE WHEN PRACTICAL!
TDEApplication::TDEApplication( bool allowStyles, bool GUIenabled ) :
// TQApplication( *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(), TRUE ), // Qt4 requires that there always be a GUI
TQApplication( *TDECmdLineArgs::tqt_argc(), *TDECmdLineArgs::tqt_argv(), GUIenabled ), // We need to be able to run command line apps
TDEInstance( TDECmdLineArgs::about),
#ifdef Q_WS_X11

@ -451,34 +451,10 @@ TQVariant TDEConfigBase::readPropertyEntry( const char *pKey,
case TQVariant::Cursor:
case TQVariant::SizePolicy:
case TQVariant::Time:
#ifdef USE_QT3
case TQVariant::ByteArray:
#endif // USE_QT3
case TQVariant::BitArray:
case TQVariant::KeySequence:
case TQVariant::Pen:
#ifdef USE_QT4
case TQVariant::Char:
case TQVariant::Url:
case TQVariant::Locale:
case TQVariant::RectF:
case TQVariant::SizeF:
case TQVariant::Line:
case TQVariant::LineF:
case TQVariant::PointF:
case TQVariant::RegExp:
case TQVariant::Hash:
case TQVariant::TextLength:
case QVariant::TextFormat:
case TQVariant::Matrix:
case TQVariant::Transform:
case TQVariant::Matrix4x4:
case TQVariant::Vector2D:
case TQVariant::Vector3D:
case TQVariant::Vector4D:
case TQVariant::Quaternion:
case TQVariant::UserType:
#endif // USE_QT4
{
break;
}
@ -1378,34 +1354,10 @@ void TDEConfigBase::writeEntry ( const char *pKey, const TQVariant &prop,
case TQVariant::Cursor:
case TQVariant::SizePolicy:
case TQVariant::Time:
#ifdef USE_QT3
case TQVariant::ByteArray:
#endif // USE_QT3
case TQVariant::BitArray:
case TQVariant::KeySequence:
case TQVariant::Pen:
#ifdef USE_QT4
case TQVariant::Char:
case TQVariant::Url:
case TQVariant::Locale:
case TQVariant::RectF:
case TQVariant::SizeF:
case TQVariant::Line:
case TQVariant::LineF:
case TQVariant::PointF:
case TQVariant::RegExp:
case TQVariant::Hash:
case TQVariant::TextLength:
case QVariant::TextFormat:
case TQVariant::Matrix:
case TQVariant::Transform:
case TQVariant::Matrix4x4:
case TQVariant::Vector2D:
case TQVariant::Vector3D:
case TQVariant::Vector4D:
case TQVariant::Quaternion:
case TQVariant::UserType:
#endif // USE_QT4
{
break;
}

@ -2083,22 +2083,12 @@ void TDELocale::initFileNameEncoding(TDEConfig *)
// which, on Unix platforms, use the locale's codec.
}
#ifdef USE_QT3
TQCString TDELocale::encodeFileNameUTF8( const TQString & fileName )
#endif // USE_QT3
#ifdef USE_QT4
QByteArray TDELocale::encodeFileNameUTF8( const QString & fileName )
#endif // USE_QT4
{
return TQString(fileName).utf8();
}
#ifdef USE_QT3
TQString TDELocale::decodeFileNameUTF8( const TQCString & localFileName )
#endif // USE_QT3
#ifdef USE_QT4
QString TDELocale::decodeFileNameUTF8( const QByteArray & localFileName )
#endif // USE_QT4
{
return TQString::fromUtf8(localFileName);
}

@ -1220,22 +1220,12 @@ private:
/**
* @internal A TQFile filename encoding function (TQFile::encodeFn).
*/
#ifdef USE_QT3
static TQCString encodeFileNameUTF8( const TQString & fileName );
#endif // USE_QT3
#ifdef USE_QT4
static QByteArray encodeFileNameUTF8( const QString & fileName );
#endif // USE_QT4
/**
* @internal TQFile filename decoding function (TQFile::decodeFn).
*/
#ifdef USE_QT3
static TQString decodeFileNameUTF8( const TQCString & localFileName );
#endif // USE_QT3
#ifdef USE_QT4
static QString decodeFileNameUTF8( const QByteArray & localFileName );
#endif // USE_QT4
/**
* @internal Changes the file name of the catalog to the correct

@ -28,10 +28,6 @@ DEALINGS IN THE SOFTWARE.
#include <sys/types.h>
#include <tqobject.h>
#ifdef Q_MOC_RUN
#define Q_WS_X11
#endif // Q_MOC_RUN
#ifdef Q_WS_X11 // FIXME(E): Redo in a less X11-specific way
#include <tqcstring.h>

@ -27,10 +27,6 @@
#include <tqvaluelist.h>
#include "tdelibs_export.h"
#ifdef Q_MOC_RUN
#define Q_OS_UNIX
#endif // Q_MOC_RUN
#ifdef Q_OS_UNIX
class KWinModulePrivate;

@ -1079,11 +1079,6 @@ TQImage& KImageEffect::blend(const TQColor& clr, TQImage& dst, float opacity)
if (dst.depth() != 32)
dst = dst.convertDepth(32);
#ifdef USE_QT4
if (dst.format() != QImage::Format_ARGB32)
dst = dst.convertToFormat(QImage::Format_ARGB32); // This is needed because Qt4 has multiple variants with a 32 bit depth, and the routines below expect one specific variant (ARGB)
#endif
int pixels = dst.width() * dst.height();
#ifdef USE_SSE2_INLINE_ASM
@ -1334,13 +1329,6 @@ TQImage& KImageEffect::blend(TQImage& src, TQImage& dst, float opacity)
if (src.depth() != 32) src = src.convertDepth(32);
if (dst.depth() != 32) dst = dst.convertDepth(32);
#ifdef USE_QT4
if (src.format() != QImage::Format_ARGB32)
src = dst.convertToFormat(QImage::Format_ARGB32); // This is needed because Qt4 has multiple variants with a 32 bit depth, and the routines below expect one specific variant (ARGB)
if (dst.format() != QImage::Format_ARGB32)
dst = dst.convertToFormat(QImage::Format_ARGB32); // This is needed because Qt4 has multiple variants with a 32 bit depth, and the routines below expect one specific variant (ARGB)
#endif
int pixels = src.width() * src.height();
#ifdef USE_SSE2_INLINE_ASM

@ -569,28 +569,6 @@ int TDEStyle::kPixelMetric( TDEStylePixelMetric kpm, const TQStyleControlElement
// -----------------------------------------------------------------------------
// #ifdef USE_QT4 // tdebindings / smoke needs this function declaration available at all times. Furthermore I don't think it would hurt to have the declaration available at all times...so leave these commented out for now
//void TDEStyle::drawPrimitive( TQ_ControlElement pe,
// TQPainter* p,
// const TQStyleControlElementData &ceData,
// ControlElementFlags elementFlags,
// const TQRect &r,
// const TQColorGroup &cg,
// SFlags flags,
// const TQStyleOption& opt ) const
//{
// // FIXME:
// // What should "widget" be in actuality? How should I get it? From where?
// // Almost certainly it should not be null!
// TQWidget *widget = 0;
// drawControl(pe, p, ceData, elementFlags, r, cg, flags, opt, widget);
//}
// #endif // USE_QT4
// -----------------------------------------------------------------------------
void TDEStyle::drawPrimitive( TQ_PrimitiveElement pe,
TQPainter* p,
const TQStyleControlElementData &ceData,

@ -296,19 +296,6 @@ class TDEFX_EXPORT TDEStyle: public TQCommonStyle
SFlags flags = Style_Default,
const TQStyleOption& = TQStyleOption::SO_Default ) const;
// #ifdef USE_QT4 // tdebindings / smoke needs this function declaration available at all times. Furthermore I don't think it would hurt to have the declaration available at all times...so leave these commented out for now
// void drawPrimitive( TQ_ControlElement pe,
// TQPainter* p,
// const TQStyleControlElementData &ceData,
// ControlElementFlags elementFlags,
// const TQRect &r,
// const TQColorGroup &cg,
// SFlags flags = Style_Default,
// const TQStyleOption& = TQStyleOption::SO_Default ) const;
// #endif // USE_QT4
void drawControl( TQ_ControlElement element,
TQPainter* p,
const TQStyleControlElementData &ceData,

@ -193,7 +193,7 @@
/* for Unicode, KDE uses Qt, everything else uses ICU */
#if PLATFORM(KDE) || PLATFORM(QT)
#define WTF_USE_QT4_UNICODE 1
#define WTF_USE_QT3_UNICODE 1
#elif PLATFORM(SYMBIAN)
#define WTF_USE_SYMBIAN_UNICODE 1
#else

@ -1020,17 +1020,11 @@ void HTMLGenericFormElementImpl::defaultEventHandler(EventImpl *evt)
TQKeyEvent* const k = static_cast<KeyEventBaseImpl *>(evt)->qKeyEvent();
if ( k && (k->key() == Qt::Key_Tab || k->key() == TQt::Key_BackTab) ) {
TQWidget* const widget = static_cast<RenderWidget*>(m_render)->widget();
#ifdef USE_QT4
if (widget)
static_cast<FocusHandleWidget *>(widget)
->focusNextPrev(k->key() == Qt::Key_Tab);
#else // USE_QT4
TQFocusEvent::setReason( k->key() == Qt::Key_Tab ? TQFocusEvent::Tab : TQFocusEvent::Backtab );
if (widget)
static_cast<FocusHandleWidget *>(widget)
->focusNextPrev(k->key() == Qt::Key_Tab);
TQFocusEvent::resetReason();
#endif // USE_QT4
evt->setDefaultHandled();
}
}

@ -64,7 +64,6 @@ struct CollectionCache: public NodeListImpl::Cache
virtual void clear(DocumentImpl* doc)
{
Cache::clear(doc);
//qDeletaAll here in Qt4
nameCache.clear();
}
};

@ -2409,13 +2409,9 @@ bool TDEHTMLView::focusNodeWithAccessKey( TQChar c, TDEHTMLView* caller )
guard = node;
}
// Set focus node on the document
#ifdef USE_QT4
m_part->xmlDocImpl()->setFocusNode(node);
#else // USE_QT4
TQFocusEvent::setReason( TQFocusEvent::Shortcut );
m_part->xmlDocImpl()->setFocusNode(node);
TQFocusEvent::resetReason();
#endif // USE_QT4
if( node != NULL && node->hasOneRef()) // deleted, only held by guard
return true;
emit m_part->nodeActivated(Node(node));

@ -24,10 +24,6 @@
#include <config.h>
#endif
#ifdef Q_MOC_RUN
#define USE_POSIX_ACL
#endif // Q_MOC_RUN
#ifdef USE_POSIX_ACL
#include <tdelistview.h>

@ -24,10 +24,6 @@
#include <config.h>
#endif
#ifdef Q_MOC_RUN
#define USE_POSIX_ACL
#endif // Q_MOC_RUN
#ifdef USE_POSIX_ACL
#include <tdelistview.h>
#include <sys/acl.h>

@ -24,10 +24,6 @@
#include <tdelibs_export.h>
#ifdef Q_MOC_RUN
#define Q_OS_UNIX
#endif // Q_MOC_RUN
#ifdef Q_OS_UNIX
namespace TDEIO {

@ -2398,7 +2398,6 @@ void KDirLister::addNewItems( const KFileItemList& items )
// TODO: make this faster - test if we have a filter at all first
// DF: was this profiled? The matchesFoo() functions should be fast, w/o filters...
// Of course if there is no filter and we can do a range-insertion instead of a loop, that might be good.
// But that's for Qt4, not possible with TQPtrList.
for ( KFileItemListIterator kit( items ); kit.current(); ++kit ) {
addNewItem( *kit );
}

@ -169,11 +169,7 @@ void KFilterDev::flush()
// Hmm, might not be enough...
}
#ifdef USE_QT4
qint64 KFilterDev::size() const
#else // USE_QT4
TQIODevice::Offset KFilterDev::size() const
#endif // USE_QT4
{
// Well, hmm, Houston, we have a problem.
// We can't know the size of the uncompressed data

@ -82,11 +82,7 @@ public:
// Not implemented
#ifdef qdoc
#else
#ifdef USE_QT4
virtual qint64 size() const;
#else // USE_QT4
virtual TQIODevice::Offset size() const;
#endif // USE_QT4
#endif
virtual TQIODevice::Offset at() const;

@ -67,11 +67,7 @@ public:
virtual void close() {}
virtual void flush() {}
#ifdef USE_QT4
virtual qint64 size() const { return m_length; }
#else // USE_QT4
virtual Offset size() const { return m_length; }
#endif // USE_QT4
virtual TQT_TQIO_LONG tqreadBlock ( char * data, TQT_TQIO_ULONG maxlen )
{

@ -218,12 +218,8 @@ void KMdiChildArea::setTopChild( KMdiChildFrm* child, bool /* bSetFocus */ )
else
child->raise();
#ifdef USE_QT4
child->m_pClient->setFocus();
#else // USE_QT4
TQFocusEvent::setReason( TQFocusEvent::Other );
child->m_pClient->setFocus();
#endif // USE_QT4
}
}

@ -17,10 +17,6 @@
Boston, MA 02110-1301, USA.
*/
#ifdef USE_QT4
#undef Status
#endif // USE_QT4
#include <tqlayout.h>
#include <tqlabel.h>
#include <tqvalidator.h>

@ -1092,8 +1092,6 @@ void KLineEdit::setCompletionBox( TDECompletionBox *box )
TQT_SLOT(setTextWorkaround( const TQString& )) );
connect( d->completionBox, TQT_SIGNAL(userCancelled( const TQString& )),
TQT_SLOT(userCancelled( const TQString& )) );
// TODO: we need our own slot, and to call setModified(true) if Qt4 has that.
connect( d->completionBox, TQT_SIGNAL( activated( const TQString& )),
TQT_SIGNAL(completionBoxActivated( const TQString& )) );
}

@ -16,10 +16,6 @@
#include <kpixmap.h>
#ifdef Q_MOC_RUN
#define Q_WS_X11
#endif // Q_MOC_RUN
#ifdef Q_WS_X11
#include <tqstring.h>

@ -319,11 +319,7 @@ bool QXEmbedAppFilter::eventFilter( TQObject *o, TQEvent * e)
// Variable `obeyFocus' suggests that this is the result of mouse
// activity in the client. The XEMBED_REQUEST_FOCUS message causes
// the embedding widget to take the Qt focus (L2085).
#ifdef USE_QT4
WId window = ((QPublicWidget*)tqApp->focusWidget()->topLevelWidget())->effectiveWinId();
#else // USE_QT4
WId window = ((QPublicWidget*)tqApp->focusWidget()->topLevelWidget())->topData()->parentWinId;
#endif // USE_QT4
focusMap->remove( tqApp->focusWidget()->topLevelWidget() );
sendXEmbedMessage( window, XEMBED_REQUEST_FOCUS );
} else if ( fe->reason() == TQFocusEvent::ActiveWindow ) {
@ -365,32 +361,20 @@ bool QXEmbedAppFilter::eventFilter( TQObject *o, TQEvent * e)
bool tabForward = true;
if ( !(k->state() & ControlButton || k->state() & AltButton) ) {
if ( k->key() == Key_Backtab || (k->key() == Key_Tab && (k->state() & ShiftButton)) ) {
#ifdef USE_QT4
res = ((QPublicWidget*)w)->focusNextPrev( tabForward = false );
#else // USE_QT4
TQFocusEvent::setReason( TQFocusEvent::Backtab );
res = ((QPublicWidget*)w)->focusNextPrev( tabForward = false );
TQFocusEvent::resetReason();
#endif // USE_QT4
} else if ( k->key() == Key_Tab ) {
#ifdef USE_QT4
res = ((QPublicWidget*)w)->focusNextPrev( tabForward = true );
#else // USE_QT4
TQFocusEvent::setReason( TQFocusEvent::Tab );
res = ((QPublicWidget*)w)->focusNextPrev( tabForward = true );
TQFocusEvent::resetReason();
#endif // USE_QT4
}
}
if (res) {
// L0625: We changed the focus because of tab/backtab key
// Now check whether we have been looping around.
TQFocusData *fd = ((QPublicWidget*)w)->focusData();
#ifdef USE_QT4
WId window = ((QPublicWidget*)w->topLevelWidget())->effectiveWinId();
#else // USE_QT4
WId window = ((QPublicWidget*)w->topLevelWidget())->topData()->parentWinId;
#endif // USE_QT4
TQWidget *cw = 0;
TQWidget *fw = fd->home();
if (tabForward && window) {
@ -445,12 +429,7 @@ static int qxembed_x11_event_filter( XEvent* e)
// L0675: We just have been embedded into a XEMBED aware widget.
TQTLWExtra *extra = ((QPublicWidget*)w->topLevelWidget())->topData();
extra->embedded = 1;
#ifdef USE_QT4
// [FIXME]
printf("[FIXME] WId not set in tdelibs/tdeui/qxembed.cpp\n");
#else // USE_QT4
extra->parentWinId = e->xclient.data.l[3];
#endif // USE_QT4
w->topLevelWidget()->show();
break;
}
@ -509,29 +488,19 @@ static int qxembed_x11_event_filter( XEvent* e)
case XEMBED_FOCUS_FIRST:
{
// L0684: Search first widget in tab chain
#ifdef USE_QT4
w->topLevelWidget()->setFocus();
((QPublicWidget*)w->topLevelWidget())->focusNextPrev(true);
#else // USE_QT4
TQFocusEvent::setReason( TQFocusEvent::Tab );
w->topLevelWidget()->setFocus();
((QPublicWidget*)w->topLevelWidget())->focusNextPrev(true);
TQFocusEvent::resetReason();
#endif // USE_QT4
}
break;
case XEMBED_FOCUS_LAST:
{
// L0686: Search last widget in tab chain
#ifdef USE_QT4
w->topLevelWidget()->setFocus();
((QPublicWidget*)w->topLevelWidget())->focusNextPrev(false);
#else // USE_QT4
TQFocusEvent::setReason( TQFocusEvent::Backtab );
w->topLevelWidget()->setFocus();
((QPublicWidget*)w->topLevelWidget())->focusNextPrev(false);
TQFocusEvent::resetReason();
#endif // USE_QT4
}
break;
default:
@ -1168,13 +1137,9 @@ bool QXEmbed::x11Event( XEvent* e)
if (d->xplain && d->xgrab) {
// L2060: The passive grab has intercepted a mouse click
// in the embedded client window. Take the focus.
#ifdef USE_QT4
setFocus();
#else // USE_QT4
TQFocusEvent::setReason( TQFocusEvent::Mouse );
setFocus();
TQFocusEvent::resetReason();
#endif // USE_QT4
// L2064: Resume X11 event processing.
XAllowEvents(tqt_xdisplay(), ReplayPointer, CurrentTime);
// L2065: Qt should not know about this.
@ -1213,20 +1178,12 @@ bool QXEmbed::x11Event( XEvent* e)
if( ((QPublicWidget*)topLevelWidget())->topData()->embedded ) {
focusMap->remove( topLevelWidget() );
focusMap->insert( topLevelWidget(), new TQGuardedPtr<TQWidget>( this ));
#ifdef USE_QT4
WId window = ((QPublicWidget*)topLevelWidget())->effectiveWinId();
#else // USE_QT4
WId window = ((QPublicWidget*)topLevelWidget())->topData()->parentWinId;
#endif // USE_QT4
sendXEmbedMessage( window, XEMBED_REQUEST_FOCUS );
} else {
#ifdef USE_QT4
setFocus();
#else // USE_QT4
TQFocusEvent::setReason( TQFocusEvent::Mouse );
setFocus();
TQFocusEvent::resetReason();
#endif // USE_QT4
}
break;
default:
@ -1318,12 +1275,7 @@ void QXEmbed::embedClientIntoWindow(TQWidget* client, WId window)
XReparentWindow(tqt_xdisplay(), client->winId(), window, 0, 0);
// L2451: These two lines are redundant. See L0680.
((QXEmbed*)client)->topData()->embedded = true;
#ifdef USE_QT4
// [FIXME]
printf("[FIXME] WId not set in tdelibs/tdeui/qxembed.cpp\n");
#else // USE_QT4
((QXEmbed*)client)->topData()->parentWinId = window;
#endif // USE_QT4
// L2452: This seems redundant because L2020 maps the window.
// But calling show() might also set Qt internal flags.
client->show();

@ -25,10 +25,6 @@
#include <tqwidget.h>
#include <tdelibs_export.h>
#ifdef Q_MOC_RUN
#define Q_WS_X11
#endif // Q_MOC_RUN
#ifdef Q_WS_X11
class QXEmbedData;

@ -21,10 +21,6 @@
#include <tqtimer.h>
#include <tqfontmetrics.h>
#ifdef USE_QT4
#undef None
#endif // USE_QT4
#include <tqstyle.h>
#include "tdepopupmenu.h"

@ -28,10 +28,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <tdepopupmenu.h>
#include <tqmap.h>
#ifdef Q_MOC_RUN
#define Q_WS_X11
#endif // Q_MOC_RUN
#ifdef Q_WS_X11 // not yet available for non-X11
class KWinModule;

@ -24,10 +24,6 @@
#include <tqglobal.h>
#ifdef Q_MOC_RUN
#define Q_OS_UNIX
#endif // Q_MOC_RUN
#ifdef Q_OS_UNIX
#include <tqstring.h>

Loading…
Cancel
Save