]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt/Dialog.cpp
#10571 improved handling of WM's signal when switching from or to full-screen window
[features.git] / src / frontends / qt / Dialog.cpp
index 2369738c5c5b3b445bc3f29a32dd1b2cd88444e1..a646a898f550150f7e5ea10b1d166cd1a3e93aa8 100644 (file)
@@ -81,7 +81,7 @@ void Dialog::disconnect() const
 
 bool Dialog::isBufferAvailable() const
 {
-       return lyxview_.currentBufferView() != 0;
+       return lyxview_.currentBufferView() != nullptr;
 }
 
 
@@ -106,7 +106,8 @@ KernelDocType Dialog::docType() const
        if (buffer().params().isLiterate())
                return LITERATE;
 
-       return DOCBOOK;
+       // This case should not happen.
+       return LATEX;
 }
 
 
@@ -227,7 +228,7 @@ Inset const * Dialog::inset(InsetCode code) const
        // Check if next is of the type we look for
        if (next)
                if (next->lyxCode() != code)
-                       next = 0;
+                       next = nullptr;
        if (ins) {
                // prefer next if it is of the requested type (bug 8716)
                if (next)
@@ -259,9 +260,6 @@ void Dialog::checkStatus()
        if (canApply()) {
                bool const readonly = isBufferReadonly();
                enableView(!readonly || canApplyToReadOnly());
-               // refreshReadOnly() is too generous in _enabling_ widgets
-               // update dialog to disable disabled widgets again
-
                updateView();
        } else
                enableView(false);