summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Golubev <fatzer2@gmail.com>2024-03-19 08:37:25 +0300
committerAlexander Golubev <fatzer2@gmail.com>2024-03-29 21:31:02 +0300
commit34dbe21c8d3dae60f93a0ebcb475fb1024466c34 (patch)
tree693e11bbba890b379e8c7527f70eaed0669662ea
parent4035e1b59e2fd8797e34c33dd27321ec9bab6368 (diff)
downloadtqt3-34dbe21c8d3dae60f93a0ebcb475fb1024466c34.tar.gz
tqt3-34dbe21c8d3dae60f93a0ebcb475fb1024466c34.zip
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>
-rw-r--r--src/widgets/ntqtextedit.h6
-rw-r--r--src/widgets/qtextedit.cpp12
2 files changed, 9 insertions, 9 deletions
diff --git a/src/widgets/ntqtextedit.h b/src/widgets/ntqtextedit.h
index 3cd475c94..322fb4e00 100644
--- a/src/widgets/ntqtextedit.h
+++ b/src/widgets/ntqtextedit.h
@@ -271,7 +271,7 @@ public:
TQSize sizeHint() const;
- bool isReadOnly() const { return readonly; }
+ bool isReadOnly() const { return readOnly; }
void getCursorPosition( int *parag, int *index ) const;
@@ -579,11 +579,11 @@ private:
bool mousePressed : 1;
bool cursorVisible : 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 mightStartDrag : 1;
bool inDnD : 1;
- bool readonly : 1;
+ bool readOnly : 1;
bool undoEnabled : 1;
bool overWrite : 1;
diff --git a/src/widgets/qtextedit.cpp b/src/widgets/qtextedit.cpp
index 75e54f112..fcb39a7f7 100644
--- a/src/widgets/qtextedit.cpp
+++ b/src/widgets/qtextedit.cpp
@@ -953,7 +953,7 @@ void TQTextEdit::init()
d = new TQTextEditPrivate;
doc->formatCollection()->setPaintDevice( this );
undoEnabled = TRUE;
- readonly = TRUE;
+ readOnly = TRUE;
setReadOnly( FALSE );
setFrameStyle( LineEditPanel | Sunken );
connect( doc, TQ_SIGNAL( minimumWidthChanged(int) ),
@@ -2920,7 +2920,7 @@ void TQTextEdit::updateMicroFocusHint()
if ( hasFocus() || viewport()->hasFocus() ) {
int h = c.paragraph()->lineHeightOfChar( cursor->index() );
- if ( !readonly ) {
+ if ( !readOnly ) {
TQFont f = c.paragraph()->at( c.index() )->format()->font();
setMicroFocusHint( c.x() - contentsX() + frameWidth(),
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 )
{
- if ( (bool) readonly == b )
+ if ( (bool) readOnly == b )
return;
- readonly = b;
+ readOnly = b;
#ifndef TQT_NO_CURSOR
- if ( readonly )
+ if ( readOnly )
viewport()->setCursor( arrowCursor );
else
viewport()->setCursor( ibeamCursor );
- setInputMethodEnabled( !readonly );
+ setInputMethodEnabled( !readOnly );
#endif
#ifdef QT_TEXTEDIT_OPTIMIZATION
checkOptimMode();