commit ccbfd22f56258c39fbd7b8cac26a539c88c090ec
Author: Yuriy Skalko <[email protected]>
Date: Sun Dec 6 18:01:09 2020 +0200
Move implementation details to constructors. Amend 78f457796c
---
src/frontends/qt/DialogFactory.cpp | 22 +++++-----------------
src/frontends/qt/FindAndReplace.cpp | 4 ++++
src/frontends/qt/GuiProgressView.h | 2 +-
src/frontends/qt/GuiSpellchecker.cpp | 4 ++++
4 files changed, 14 insertions(+), 18 deletions(-)
diff --git a/src/frontends/qt/DialogFactory.cpp
b/src/frontends/qt/DialogFactory.cpp
index e384841..62f6ab8 100644
--- a/src/frontends/qt/DialogFactory.cpp
+++ b/src/frontends/qt/DialogFactory.cpp
@@ -156,14 +156,8 @@ Dialog * createDialog(GuiView & gv, string const & name)
return new GuiShowFile(gv);
if (name == "findreplace")
return new GuiSearch(gv);
- if (name == "findreplaceadv") {
- FindAndReplace * gui = new FindAndReplace(gv,
Qt::RightDockWidgetArea);
-#ifdef Q_OS_MAC
- // On Mac show and floating
- gui->setFloating(true);
-#endif
- return gui;
- }
+ if (name == "findreplaceadv")
+ return new FindAndReplace(gv);
if (name == "graphics")
return new GuiGraphics(gv);
if (name == "include")
@@ -194,14 +188,8 @@ Dialog * createDialog(GuiView & gv, string const & name)
return new GuiRef(gv);
if (name == "sendto")
return new GuiSendTo(gv);
- if (name == "spellchecker") {
- GuiSpellchecker * gui = new GuiSpellchecker(gv,
Qt::RightDockWidgetArea);
-#ifdef Q_OS_MAC
- // On Mac show and floating
- gui->setFloating(true);
-#endif
- return gui;
- }
+ if (name == "spellchecker")
+ return new GuiSpellchecker(gv);
if (name == "symbols")
return new GuiSymbols(gv);
if (name == "tabularcreate")
@@ -217,7 +205,7 @@ Dialog * createDialog(GuiView & gv, string const & name)
if (name == "wrap")
return new GuiWrap(gv);
if (name == "progress")
- return new GuiProgressView(gv, Qt::BottomDockWidgetArea);
+ return new GuiProgressView(gv);
return nullptr;
}
diff --git a/src/frontends/qt/FindAndReplace.cpp
b/src/frontends/qt/FindAndReplace.cpp
index fcfa6bd..b378f46 100644
--- a/src/frontends/qt/FindAndReplace.cpp
+++ b/src/frontends/qt/FindAndReplace.cpp
@@ -588,6 +588,10 @@ FindAndReplace::FindAndReplace(GuiView & parent,
widget_ = new FindAndReplaceWidget(parent);
setWidget(widget_);
setFocusProxy(widget_);
+#ifdef Q_OS_MAC
+ // On Mac show and floating
+ setFloating(true);
+#endif
connect(this, SIGNAL(dockLocationChanged(Qt::DockWidgetArea)),
widget_, SLOT(dockLocationChanged(Qt::DockWidgetArea)));
diff --git a/src/frontends/qt/GuiProgressView.h
b/src/frontends/qt/GuiProgressView.h
index 4ea4efc..1a722b3 100644
--- a/src/frontends/qt/GuiProgressView.h
+++ b/src/frontends/qt/GuiProgressView.h
@@ -46,7 +46,7 @@ class GuiProgressView : public DockView
public:
GuiProgressView(
GuiView & parent, ///< the main window where to dock.
- Qt::DockWidgetArea area, ///< Position of the dock (and also
drawer)
+ Qt::DockWidgetArea area = Qt::BottomDockWidgetArea, ///<
Position of the dock (and also drawer)
Qt::WindowFlags flags = 0);
~GuiProgressView();
diff --git a/src/frontends/qt/GuiSpellchecker.cpp
b/src/frontends/qt/GuiSpellchecker.cpp
index 7fc1155..9fcf20c 100644
--- a/src/frontends/qt/GuiSpellchecker.cpp
+++ b/src/frontends/qt/GuiSpellchecker.cpp
@@ -598,6 +598,10 @@ GuiSpellchecker::GuiSpellchecker(GuiView & parent,
widget_ = new SpellcheckerWidget(&parent, this);
setWidget(widget_);
setFocusProxy(widget_);
+#ifdef Q_OS_MAC
+ // On Mac show and floating
+ setFloating(true);
+#endif
}
--
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs