[LyX/master] Remove code that has not been used for 13 years.

Richard Kimberly Heck rikiheck at lyx.org
Fri Feb 28 04:51:43 UTC 2020


commit 78ade7e6ec18b8f34645f5629500a79e103dda72
Author: Richard Kimberly Heck <rikiheck at lyx.org>
Date:   Fri Feb 28 00:08:30 2020 -0500

    Remove code that has not been used for 13 years.
---
 src/frontends/qt/ButtonController.cpp |   26 +-------------------------
 src/frontends/qt/ButtonController.h   |    5 -----
 2 files changed, 1 insertions(+), 30 deletions(-)

diff --git a/src/frontends/qt/ButtonController.cpp b/src/frontends/qt/ButtonController.cpp
index d2910c8..940db32 100644
--- a/src/frontends/qt/ButtonController.cpp
+++ b/src/frontends/qt/ButtonController.cpp
@@ -27,17 +27,6 @@
 namespace lyx {
 namespace frontend {
 
-static void setWidgetEnabled(QWidget * obj, bool enabled)
-{
-	if (QLineEdit * le = qobject_cast<QLineEdit*>(obj))
-		le->setReadOnly(!enabled);
-	else
-		obj->setEnabled(enabled);
-
-	obj->setFocusPolicy(enabled ? Qt::StrongFocus : Qt::NoFocus);
-}
-
-
 /////////////////////////////////////////////////////////////////////////
 //
 // CheckedLineEdit
@@ -204,10 +193,7 @@ bool ButtonController::setReadOnly(bool ro)
 
 	d->policy_.input(ro ?
 		ButtonPolicy::SMI_READ_ONLY : ButtonPolicy::SMI_READ_WRITE);
-	// refreshReadOnly(); This will enable all widgets in dialogs, no matter if
-	//                    they allowed to be enabled, so when you plan to
-	//                    reenable this call, read this before:
-	// http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg128222.html
+
 	refresh();
 	return ro;
 }
@@ -251,16 +237,6 @@ void ButtonController::refresh() const
 }
 
 
-void ButtonController::refreshReadOnly() const
-{
-	if (d->read_only_.empty())
-		return;
-	bool const enable = !policy().isReadOnly();
-	for(QWidget * w : d->read_only_)
-		setWidgetEnabled(w, enable);
-}
-
-
 void ButtonController::addCheckedLineEdit(QLineEdit * input, QWidget * label)
 {
 	d->checked_widgets_.append(CheckedLineEdit(input, label));
diff --git a/src/frontends/qt/ButtonController.h b/src/frontends/qt/ButtonController.h
index 46e5d0d..c34c0cd 100644
--- a/src/frontends/qt/ButtonController.h
+++ b/src/frontends/qt/ButtonController.h
@@ -71,11 +71,6 @@ public:
 	 */
 	void refresh() const;
 
-	/** Refresh the activation state of all the widgets under the control
-	 *  of the BC to reflect the read-only status of the underlying buffer.
-	 */
-	void refreshReadOnly() const;
-
 	/** Passthrough function -- returns its input value
 	 *  Tell the BC about the read-only status of the underlying buffer.
 	 */


More information about the lyx-cvs mailing list