]> git.lyx.org Git - features.git/commitdiff
Remove code that has not been used for 13 years.
authorRichard Kimberly Heck <rikiheck@lyx.org>
Fri, 28 Feb 2020 05:08:30 +0000 (00:08 -0500)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Fri, 28 Feb 2020 05:08:30 +0000 (00:08 -0500)
src/frontends/qt/ButtonController.cpp
src/frontends/qt/ButtonController.h

index d2910c88c1d1c9ae21afe15cc2d00692fa9e1940..940db32d0da4ac8bde82a4329775289c979a6511 100644 (file)
 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));
index 46e5d0d0e7a1778e17c63c29c03e21d4c80f36ee..c34c0cdf13ce3d78d9492082b9da745c78f481a1 100644 (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.
         */