TQTextEdit: remove one of two readOnly flags

There were two flags for read-only with different capitalization:
readonly and readOnly. This was probably a mistake.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
pull/139/head
Alexander Golubev 8 months ago committed by TDE Gitea
parent 2b1c78cb53
commit 9c5ea5617a

@ -271,7 +271,7 @@ public:
TQSize sizeHint() const; TQSize sizeHint() const;
bool isReadOnly() const { return readonly; } bool isReadOnly() const { return readOnly; }
void getCursorPosition( int *parag, int *index ) const; void getCursorPosition( int *parag, int *index ) const;
@ -579,11 +579,11 @@ private:
bool mousePressed : 1; bool mousePressed : 1;
bool cursorVisible : 1; bool cursorVisible : 1;
bool blinkCursorVisible : 1; bool blinkCursorVisible : 1;
bool readOnly : 1; bool noop: 1; //< Removed; keep as padding for binary compat or reuse if needed
bool modified : 1; bool modified : 1;
bool mightStartDrag : 1; bool mightStartDrag : 1;
bool inDnD : 1; bool inDnD : 1;
bool readonly : 1; bool readOnly : 1;
bool undoEnabled : 1; bool undoEnabled : 1;
bool overWrite : 1; bool overWrite : 1;

@ -953,7 +953,7 @@ void TQTextEdit::init()
d = new TQTextEditPrivate; d = new TQTextEditPrivate;
doc->formatCollection()->setPaintDevice( this ); doc->formatCollection()->setPaintDevice( this );
undoEnabled = TRUE; undoEnabled = TRUE;
readonly = TRUE; readOnly = TRUE;
setReadOnly( FALSE ); setReadOnly( FALSE );
setFrameStyle( LineEditPanel | Sunken ); setFrameStyle( LineEditPanel | Sunken );
connect( doc, TQ_SIGNAL( minimumWidthChanged(int) ), connect( doc, TQ_SIGNAL( minimumWidthChanged(int) ),
@ -2920,7 +2920,7 @@ void TQTextEdit::updateMicroFocusHint()
if ( hasFocus() || viewport()->hasFocus() ) { if ( hasFocus() || viewport()->hasFocus() ) {
int h = c.paragraph()->lineHeightOfChar( cursor->index() ); int h = c.paragraph()->lineHeightOfChar( cursor->index() );
if ( !readonly ) { if ( !readOnly ) {
TQFont f = c.paragraph()->at( c.index() )->format()->font(); TQFont f = c.paragraph()->at( c.index() )->format()->font();
setMicroFocusHint( c.x() - contentsX() + frameWidth(), setMicroFocusHint( c.x() - contentsX() + frameWidth(),
c.y() + cursor->paragraph()->rect().y() - contentsY() + frameWidth(), 0, h, TRUE, &f ); c.y() + cursor->paragraph()->rect().y() - contentsY() + frameWidth(), 0, h, TRUE, &f );
@ -5891,15 +5891,15 @@ void TQTextEdit::windowActivationChange( bool oldActive )
void TQTextEdit::setReadOnly( bool b ) void TQTextEdit::setReadOnly( bool b )
{ {
if ( (bool) readonly == b ) if ( (bool) readOnly == b )
return; return;
readonly = b; readOnly = b;
#ifndef TQT_NO_CURSOR #ifndef TQT_NO_CURSOR
if ( readonly ) if ( readOnly )
viewport()->setCursor( arrowCursor ); viewport()->setCursor( arrowCursor );
else else
viewport()->setCursor( ibeamCursor ); viewport()->setCursor( ibeamCursor );
setInputMethodEnabled( !readonly ); setInputMethodEnabled( !readOnly );
#endif #endif
#ifdef QT_TEXTEDIT_OPTIMIZATION #ifdef QT_TEXTEDIT_OPTIMIZATION
checkOptimMode(); checkOptimMode();

Loading…
Cancel
Save