Remove code that has not been used for 13 years.

This commit is contained in:
Richard Kimberly Heck 2020-02-28 00:08:30 -05:00
parent 1948391a94
commit 78ade7e6ec
2 changed files with 1 additions and 30 deletions

View File

@ -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));

View File

@ -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.
*/