pinetry-tqt-updates-2023: Follow up on changed defines

Signed-off-by: Emanoil Kotsev <deloptes@gmail.com>
pull/8/head
Emanoil Kotsev 8 months ago
parent 35d783f9af
commit 551d331e7e
No known key found for this signature in database
GPG Key ID: F1EEB8CD9FB16A50

@ -63,7 +63,7 @@ class TQWidget;
class TQPainter; class TQPainter;
class TQPixmap; class TQPixmap;
class Q_EXPORT SecTQSharedDoubleBuffer class TQ_EXPORT SecTQSharedDoubleBuffer
{ {
public: public:
enum DoubleBufferFlags { enum DoubleBufferFlags {

@ -86,7 +86,7 @@
#include "ntqaccessible.h" #include "ntqaccessible.h"
#endif #endif
#ifndef QT_NO_ACCEL #ifndef TQT_NO_ACCEL
#include "ntqkeysequence.h" #include "ntqkeysequence.h"
#define ACCEL_KEY(k) "\t" + TQString(TQKeySequence( TQt::CTRL | TQt::Key_ ## k )) #define ACCEL_KEY(k) "\t" + TQString(TQKeySequence( TQt::CTRL | TQt::Key_ ## k ))
#else #else
@ -235,7 +235,7 @@ struct SecTQLineEditPrivate : public TQt
inline bool hasSelectedText() const { return !text.isEmpty() && selend > selstart; } inline bool hasSelectedText() const { return !text.isEmpty() && selend > selstart; }
inline void deselect() { selDirty |= (selend > selstart); selstart = selend = 0; } inline void deselect() { selDirty |= (selend > selstart); selstart = selend = 0; }
void removeSelectedText(); void removeSelectedText();
#ifndef QT_NO_CLIPBOARD #ifndef TQT_NO_CLIPBOARD
void copy( bool clipboard = TRUE ) const; void copy( bool clipboard = TRUE ) const;
#endif #endif
inline bool inSelection( int x ) const inline bool inSelection( int x ) const
@ -1018,14 +1018,14 @@ bool SecTQLineEdit::isReadOnly() const
void SecTQLineEdit::setReadOnly( bool enable ) void SecTQLineEdit::setReadOnly( bool enable )
{ {
d->readOnly = enable; d->readOnly = enable;
#ifndef QT_NO_CURSOR #ifndef TQT_NO_CURSOR
setCursor( enable ? arrowCursor : ibeamCursor ); setCursor( enable ? arrowCursor : ibeamCursor );
#endif #endif
update(); update();
} }
#ifndef QT_NO_CLIPBOARD #ifndef TQT_NO_CLIPBOARD
/*! /*!
Copies the selected text to the clipboard and deletes it, if there Copies the selected text to the clipboard and deletes it, if there
is any, and if echoMode() is \c Normal. is any, and if echoMode() is \c Normal.
@ -1081,7 +1081,7 @@ void SecTQLineEditPrivate::copy( bool clipboard ) const
#endif #endif
} }
#endif // !QT_NO_CLIPBOARD #endif // !TQT_NO_CLIPBOARD
/*!\reimp /*!\reimp
*/ */
@ -1177,7 +1177,7 @@ void SecTQLineEdit::mousePressEvent( TQMouseEvent* e )
void SecTQLineEdit::mouseMoveEvent( TQMouseEvent * e ) void SecTQLineEdit::mouseMoveEvent( TQMouseEvent * e )
{ {
#ifndef QT_NO_CURSOR #ifndef TQT_NO_CURSOR
if ( ( e->state() & MouseButtonMask ) == 0 ) { if ( ( e->state() & MouseButtonMask ) == 0 ) {
if ( !d->readOnly ) if ( !d->readOnly )
setCursor( ( d->inSelection( e->pos().x() ) ? arrowCursor : ibeamCursor ) ); setCursor( ( d->inSelection( e->pos().x() ) ? arrowCursor : ibeamCursor ) );
@ -1193,7 +1193,7 @@ void SecTQLineEdit::mouseMoveEvent( TQMouseEvent * e )
*/ */
void SecTQLineEdit::mouseReleaseEvent( TQMouseEvent* e ) void SecTQLineEdit::mouseReleaseEvent( TQMouseEvent* e )
{ {
#ifndef QT_NO_CLIPBOARD #ifndef TQT_NO_CLIPBOARD
if (TQApplication::clipboard()->supportsSelection() ) { if (TQApplication::clipboard()->supportsSelection() ) {
if ( e->button() == LeftButton ) { if ( e->button() == LeftButton ) {
d->copy( FALSE ); d->copy( FALSE );
@ -1286,7 +1286,7 @@ void SecTQLineEdit::keyPressEvent( TQKeyEvent * e )
case Key_B: case Key_B:
cursorForward( e->state() & ShiftButton, -1 ); cursorForward( e->state() & ShiftButton, -1 );
break; break;
#ifndef QT_NO_CLIPBOARD #ifndef TQT_NO_CLIPBOARD
case Key_C: case Key_C:
copy(); copy();
break; break;
@ -1322,7 +1322,7 @@ void SecTQLineEdit::keyPressEvent( TQKeyEvent * e )
clear(); clear();
break; break;
#endif #endif
#ifndef QT_NO_CLIPBOARD #ifndef TQT_NO_CLIPBOARD
case Key_V: case Key_V:
if ( !d->readOnly ) if ( !d->readOnly )
paste(); paste();
@ -1431,7 +1431,7 @@ void SecTQLineEdit::keyPressEvent( TQKeyEvent * e )
if ( !d->readOnly ) if ( !d->readOnly )
undo(); undo();
break; break;
#ifndef QT_NO_CLIPBOARD #ifndef TQT_NO_CLIPBOARD
case Key_F16: // Copy key on Sun keyboards case Key_F16: // Copy key on Sun keyboards
copy(); copy();
break; break;
@ -1720,7 +1720,7 @@ void SecTQLineEdit::clipboardChanged()
void SecTQLineEditPrivate::init( const SecTQString& txt ) void SecTQLineEditPrivate::init( const SecTQString& txt )
{ {
#ifndef QT_NO_CURSOR #ifndef TQT_NO_CURSOR
q->setCursor( readOnly ? arrowCursor : ibeamCursor ); q->setCursor( readOnly ? arrowCursor : ibeamCursor );
#endif #endif
q->setFocusPolicy( TQWidget::StrongFocus ); q->setFocusPolicy( TQWidget::StrongFocus );

@ -80,7 +80,7 @@ class TQPopupMenu;
class TQTextParagraph; class TQTextParagraph;
class TQTextCursor; class TQTextCursor;
class Q_EXPORT SecTQLineEdit : public TQFrame class TQ_EXPORT SecTQLineEdit : public TQFrame
{ {
TQ_OBJECT TQ_OBJECT
TQ_ENUMS( EchoMode ) TQ_ENUMS( EchoMode )
@ -127,7 +127,7 @@ public:
int alignment() const; int alignment() const;
#ifndef QT_NO_COMPAT #ifndef TQT_NO_COMPAT
void cursorLeft( bool mark, int steps = 1 ) { cursorForward( mark, -steps ); } void cursorLeft( bool mark, int steps = 1 ) { cursorForward( mark, -steps ); }
void cursorRight( bool mark, int steps = 1 ) { cursorForward( mark, steps ); } void cursorRight( bool mark, int steps = 1 ) { cursorForward( mark, steps ); }
#endif #endif
@ -153,7 +153,7 @@ public:
bool isUndoAvailable() const; bool isUndoAvailable() const;
bool isRedoAvailable() const; bool isRedoAvailable() const;
#ifndef QT_NO_COMPAT #ifndef TQT_NO_COMPAT
bool hasMarkedText() const { return hasSelectedText(); } bool hasMarkedText() const { return hasSelectedText(); }
SecTQString markedText() const { return selectedText(); } SecTQString markedText() const { return selectedText(); }
#endif #endif
@ -175,7 +175,7 @@ public slots:
virtual void setSelection( int, int ); virtual void setSelection( int, int );
virtual void setCursorPosition( int ); virtual void setCursorPosition( int );
virtual void setAlignment( int flag ); virtual void setAlignment( int flag );
#ifndef QT_NO_CLIPBOARD #ifndef TQT_NO_CLIPBOARD
virtual void cut(); virtual void cut();
virtual void copy() const; virtual void copy() const;
virtual void paste(); virtual void paste();
@ -204,7 +204,7 @@ protected:
void resizeEvent( TQResizeEvent * ); void resizeEvent( TQResizeEvent * );
void drawContents( TQPainter * ); void drawContents( TQPainter * );
void windowActivationChange( bool ); void windowActivationChange( bool );
#ifndef QT_NO_COMPAT #ifndef TQT_NO_COMPAT
void repaintArea( int, int ) { update(); } void repaintArea( int, int ) { update(); }
#endif #endif

@ -80,8 +80,8 @@ static uint computeNewMax( uint len )
// IMPORTANT! If you change these, make sure you also change the // IMPORTANT! If you change these, make sure you also change the
// "delete unicode" statement in ~SecTQStringData() in SecTQString.h correspondingly! // "delete unicode" statement in ~SecTQStringData() in SecTQString.h correspondingly!
#define QT_ALLOC_SECTQCHAR_VEC(N) (TQChar*) ::secmem_malloc (sizeof(TQChar) * (N)) #define TQT_ALLOC_SECTQCHAR_VEC(N) (TQChar*) ::secmem_malloc (sizeof(TQChar) * (N))
#define QT_DELETE_SECTQCHAR_VEC(P) ::secmem_free (P) #define TQT_DELETE_SECTQCHAR_VEC(P) ::secmem_free (P)
/***************************************************************************** /*****************************************************************************
@ -188,7 +188,7 @@ static uint computeNewMax( uint len )
\sa TQChar TQCString TQByteArray SecTQConstString \sa TQChar TQCString TQByteArray SecTQConstString
*/ */
Q_EXPORT SecTQStringData *SecTQString::shared_null = 0; TQ_EXPORT SecTQStringData *SecTQString::shared_null = 0;
QT_STATIC_CONST_IMPL SecTQString SecTQString::null; QT_STATIC_CONST_IMPL SecTQString SecTQString::null;
QT_STATIC_CONST_IMPL TQChar TQChar::null; QT_STATIC_CONST_IMPL TQChar TQChar::null;
QT_STATIC_CONST_IMPL TQChar TQChar::replacement((ushort)0xfffd); QT_STATIC_CONST_IMPL TQChar TQChar::replacement((ushort)0xfffd);
@ -220,7 +220,7 @@ SecTQStringData* SecTQString::makeSharedNull()
*/ */
SecTQString::SecTQString( TQChar ch ) SecTQString::SecTQString( TQChar ch )
{ {
d = new SecTQStringData( QT_ALLOC_SECTQCHAR_VEC( 1 ), 1, 1 ); d = new SecTQStringData( TQT_ALLOC_SECTQCHAR_VEC( 1 ), 1, 1 );
d->unicode[0] = ch; d->unicode[0] = ch;
} }
@ -239,7 +239,7 @@ SecTQString::SecTQString( int size, bool /*dummy*/ )
{ {
if ( size ) { if ( size ) {
int l = size; int l = size;
TQChar* uc = QT_ALLOC_SECTQCHAR_VEC( l ); TQChar* uc = TQT_ALLOC_SECTQCHAR_VEC( l );
d = new SecTQStringData( uc, 0, l ); d = new SecTQStringData( uc, 0, l );
} else { } else {
d = shared_null ? shared_null : (shared_null=new SecTQStringData); d = shared_null ? shared_null : (shared_null=new SecTQStringData);
@ -258,7 +258,7 @@ SecTQString::SecTQString( const TQString &str )
d = shared_null ? shared_null : makeSharedNull(); d = shared_null ? shared_null : makeSharedNull();
d->ref(); d->ref();
} else { } else {
TQChar* uc = QT_ALLOC_SECTQCHAR_VEC( length ); TQChar* uc = TQT_ALLOC_SECTQCHAR_VEC( length );
if ( unicode ) if ( unicode )
memcpy(uc, unicode, length*sizeof(TQChar)); memcpy(uc, unicode, length*sizeof(TQChar));
d = new SecTQStringData(uc,unicode ? length : 0,length); d = new SecTQStringData(uc,unicode ? length : 0,length);
@ -287,7 +287,7 @@ SecTQString::SecTQString( const TQChar* unicode, uint length )
d = shared_null ? shared_null : makeSharedNull(); d = shared_null ? shared_null : makeSharedNull();
d->ref(); d->ref();
} else { } else {
TQChar* uc = QT_ALLOC_SECTQCHAR_VEC( length ); TQChar* uc = TQT_ALLOC_SECTQCHAR_VEC( length );
if ( unicode ) if ( unicode )
memcpy(uc, unicode, length*sizeof(TQChar)); memcpy(uc, unicode, length*sizeof(TQChar));
d = new SecTQStringData(uc,unicode ? length : 0,length); d = new SecTQStringData(uc,unicode ? length : 0,length);
@ -429,7 +429,7 @@ void SecTQString::setLength( uint newLen )
( newLen * 4 < d->maxl && d->maxl > 4 ) ) { ( newLen * 4 < d->maxl && d->maxl > 4 ) ) {
// detach, grow or shrink // detach, grow or shrink
uint newMax = computeNewMax( newLen ); uint newMax = computeNewMax( newLen );
TQChar* nd = QT_ALLOC_SECTQCHAR_VEC( newMax ); TQChar* nd = TQT_ALLOC_SECTQCHAR_VEC( newMax );
if ( nd ) { if ( nd ) {
uint len = TQMIN( d->len, newLen ); uint len = TQMIN( d->len, newLen );
memcpy( nd, d->unicode, sizeof(TQChar) * len ); memcpy( nd, d->unicode, sizeof(TQChar) * len );
@ -594,10 +594,10 @@ SecTQString &SecTQString::insert( uint index, const TQChar* s, uint len )
if ( s >= d->unicode && (uint)(s - d->unicode) < d->maxl ) { if ( s >= d->unicode && (uint)(s - d->unicode) < d->maxl ) {
// Part of me - take a copy. // Part of me - take a copy.
TQChar *tmp = QT_ALLOC_SECTQCHAR_VEC( len ); TQChar *tmp = TQT_ALLOC_SECTQCHAR_VEC( len );
memcpy(tmp,s,len*sizeof(TQChar)); memcpy(tmp,s,len*sizeof(TQChar));
insert(index,tmp,len); insert(index,tmp,len);
QT_DELETE_SECTQCHAR_VEC( tmp ); TQT_DELETE_SECTQCHAR_VEC( tmp );
return *this; return *this;
} }
@ -669,10 +669,10 @@ SecTQString &SecTQString::replace( uint index, uint len, const TQChar* s, uint s
memcpy( d->unicode+index, s, len * sizeof(TQChar) ); memcpy( d->unicode+index, s, len * sizeof(TQChar) );
} else if ( s >= d->unicode && (uint)(s - d->unicode) < d->maxl ) { } else if ( s >= d->unicode && (uint)(s - d->unicode) < d->maxl ) {
// Part of me - take a copy. // Part of me - take a copy.
TQChar *tmp = QT_ALLOC_SECTQCHAR_VEC( slen ); TQChar *tmp = TQT_ALLOC_SECTQCHAR_VEC( slen );
memcpy( tmp, s, slen * sizeof(TQChar) ); memcpy( tmp, s, slen * sizeof(TQChar) );
replace( index, len, tmp, slen ); replace( index, len, tmp, slen );
QT_DELETE_SECTQCHAR_VEC( tmp ); TQT_DELETE_SECTQCHAR_VEC( tmp );
} else { } else {
remove( index, len ); remove( index, len );
insert( index, s, slen ); insert( index, s, slen );

@ -87,7 +87,7 @@ class SecTQCharRef;
template <class T> class TQDeepCopy; template <class T> class TQDeepCopy;
#include <stdio.h> #include <stdio.h>
// internal // internal
struct Q_EXPORT SecTQStringData : public TQShared { struct TQ_EXPORT SecTQStringData : public TQShared {
SecTQStringData() : SecTQStringData() :
TQShared(), unicode(0), len(0), maxl(0) { ref(); } TQShared(), unicode(0), len(0), maxl(0) { ref(); }
SecTQStringData(TQChar *u, uint l, uint m) : SecTQStringData(TQChar *u, uint l, uint m) :
@ -109,7 +109,7 @@ struct Q_EXPORT SecTQStringData : public TQShared {
}; };
class Q_EXPORT SecTQString class TQ_EXPORT SecTQString
{ {
public: public:
SecTQString(); // make null string SecTQString(); // make null string
@ -191,7 +191,7 @@ private:
friend class TQDeepCopy<SecTQString>; friend class TQDeepCopy<SecTQString>;
}; };
class Q_EXPORT SecTQCharRef { class TQ_EXPORT SecTQCharRef {
friend class SecTQString; friend class SecTQString;
SecTQString& s; SecTQString& s;
uint p; uint p;
@ -249,7 +249,7 @@ public:
inline SecTQCharRef SecTQString::at( uint i ) { return SecTQCharRef(this,i); } inline SecTQCharRef SecTQString::at( uint i ) { return SecTQCharRef(this,i); }
inline SecTQCharRef SecTQString::operator[]( int i ) { return at((uint)i); } inline SecTQCharRef SecTQString::operator[]( int i ) { return at((uint)i); }
class Q_EXPORT SecTQConstString : private SecTQString { class TQ_EXPORT SecTQConstString : private SecTQString {
public: public:
SecTQConstString( const TQChar* unicode, uint length ); SecTQConstString( const TQChar* unicode, uint length );
~SecTQConstString(); ~SecTQConstString();
@ -297,7 +297,7 @@ inline bool SecTQString::isEmpty() const
SecTQString non-member operators SecTQString non-member operators
*****************************************************************************/ *****************************************************************************/
Q_EXPORT inline const SecTQString operator+( const SecTQString &s1, const SecTQString &s2 ) TQ_EXPORT inline const SecTQString operator+( const SecTQString &s1, const SecTQString &s2 )
{ {
SecTQString tmp( s1 ); SecTQString tmp( s1 );
tmp += s2; tmp += s2;

Loading…
Cancel
Save