commit 4f0981e7bbbb8d9d00490856daa3d35e170845d7
Author: Yuriy Skalko <[email protected]>
Date:   Mon Dec 14 20:46:39 2020 +0200

    Merge namespace signals2 into namespace lyx
---
 src/LaTeX.h                        |    2 +-
 src/graphics/GraphicsCacheItem.cpp |    4 ++--
 src/graphics/GraphicsCacheItem.h   |    4 ++--
 src/graphics/GraphicsConverter.cpp |    4 ++--
 src/graphics/GraphicsConverter.h   |    4 ++--
 src/graphics/GraphicsLoader.cpp    |    6 +++---
 src/graphics/GraphicsLoader.h      |    4 ++--
 src/graphics/PreviewLoader.cpp     |    4 ++--
 src/graphics/PreviewLoader.h       |    4 ++--
 src/insets/RenderPreview.cpp       |    2 +-
 src/insets/RenderPreview.h         |    6 +++---
 src/support/FileMonitor.cpp        |    2 +-
 src/support/FileMonitor.h          |    4 ++--
 src/support/ForkedCalls.h          |    2 +-
 src/support/Timeout.h              |    2 +-
 src/support/signals.h              |    4 +++-
 16 files changed, 30 insertions(+), 28 deletions(-)

diff --git a/src/LaTeX.h b/src/LaTeX.h
index 994fbe0..569114d 100644
--- a/src/LaTeX.h
+++ b/src/LaTeX.h
@@ -163,7 +163,7 @@ public:
        };
 
        /// This signal emits an informative message
-       signals2::signal<void(docstring)> message;
+       signal<void(docstring)> message;
 
 
        /**
diff --git a/src/graphics/GraphicsCacheItem.cpp 
b/src/graphics/GraphicsCacheItem.cpp
index c72ac38..918dc02 100644
--- a/src/graphics/GraphicsCacheItem.cpp
+++ b/src/graphics/GraphicsCacheItem.cpp
@@ -119,7 +119,7 @@ public:
        ImageStatus status_;
 
        /// This signal is emitted when the image loading status changes.
-       signals2::signal<void()> statusChanged;
+       signal<void()> statusChanged;
 
        ///
        unique_ptr<Converter> converter_;
@@ -195,7 +195,7 @@ ImageStatus CacheItem::status() const
 }
 
 
-signals2::connection CacheItem::connect(slot_type const & slot) const
+connection CacheItem::connect(slot_type const & slot) const
 {
        return pimpl_->statusChanged.connect(slot);
 }
diff --git a/src/graphics/GraphicsCacheItem.h b/src/graphics/GraphicsCacheItem.h
index ba5efe6..a018b39 100644
--- a/src/graphics/GraphicsCacheItem.h
+++ b/src/graphics/GraphicsCacheItem.h
@@ -81,9 +81,9 @@ public:
        /** Connect and you'll be informed when the loading status of the image
         *  changes.
         */
-       typedef signals2::signal<void()>::slot_type slot_type;
+       typedef signal<void()>::slot_type slot_type;
        ///
-       signals2::connection connect(slot_type const &) const;
+       connection connect(slot_type const &) const;
 
 private:
        /// noncopyable
diff --git a/src/graphics/GraphicsConverter.cpp 
b/src/graphics/GraphicsConverter.cpp
index 66e198a..c97e766 100644
--- a/src/graphics/GraphicsConverter.cpp
+++ b/src/graphics/GraphicsConverter.cpp
@@ -55,7 +55,7 @@ public:
        /** At the end of the conversion process inform the outside world
         *  by emitting a signal.
         */
-       typedef signals2::signal<void(bool)> sig;
+       typedef signal<void(bool)> sig;
        ///
        sig finishedConversion;
 
@@ -96,7 +96,7 @@ void Converter::startConversion() const
 }
 
 
-signals2::connection Converter::connect(slot_type const & slot) const
+connection Converter::connect(slot_type const & slot) const
 {
        return pimpl_->finishedConversion.connect(slot);
 }
diff --git a/src/graphics/GraphicsConverter.h b/src/graphics/GraphicsConverter.h
index 7eb3689..582c3f0 100644
--- a/src/graphics/GraphicsConverter.h
+++ b/src/graphics/GraphicsConverter.h
@@ -48,10 +48,10 @@ public:
         *  If the conversion is successful, then the listener is passed \c 
true.
         *  The connection is closed when this is destroyed.
         */
-       typedef signals2::signal<void(bool)> sig_type;
+       typedef signal<void(bool)> sig_type;
        typedef sig_type::slot_type slot_type;
        ///
-       signals2::connection connect(slot_type const &) const;
+       connection connect(slot_type const &) const;
 
        /** If the conversion is successful, this returns the name of the
         *  resulting file.
diff --git a/src/graphics/GraphicsLoader.cpp b/src/graphics/GraphicsLoader.cpp
index 2316a4a..b375c0e 100644
--- a/src/graphics/GraphicsLoader.cpp
+++ b/src/graphics/GraphicsLoader.cpp
@@ -192,9 +192,9 @@ public:
        /// We modify a local copy of the image once it is loaded.
        ImagePtr image_;
        /// This signal is emitted when the image loading status changes.
-       signals2::signal<void()> signal_;
+       signal<void()> signal_;
        /// The connection of the signal statusChanged
-       signals2::scoped_connection connection_;
+       scoped_connection connection_;
 
        double displayPixelRatio() const
        {
@@ -364,7 +364,7 @@ void Loader::setDisplayPixelRatio(double scale)
 }
 
 
-signals2::connection Loader::connect(slot const & slot) const
+connection Loader::connect(slot const & slot) const
 {
        return pimpl_->signal_.connect(slot);
 }
diff --git a/src/graphics/GraphicsLoader.h b/src/graphics/GraphicsLoader.h
index 0a299cb..1fa51d3 100644
--- a/src/graphics/GraphicsLoader.h
+++ b/src/graphics/GraphicsLoader.h
@@ -90,10 +90,10 @@ public:
        /** Connect and you'll be informed when the loading status of the image
         *  changes.
         */
-       typedef signals2::signal<void()> sig;
+       typedef signal<void()> sig;
        typedef sig::slot_type slot;
        ///
-       signals2::connection connect(slot const &) const;
+       connection connect(slot const &) const;
 
        /** The loaded image with Pixmap set.
         *  If the Pixmap is not yet set (see status() for why...), returns 0.
diff --git a/src/graphics/PreviewLoader.cpp b/src/graphics/PreviewLoader.cpp
index e1177a8..7cb83fb 100644
--- a/src/graphics/PreviewLoader.cpp
+++ b/src/graphics/PreviewLoader.cpp
@@ -180,7 +180,7 @@ public:
        void refreshPreviews();
 
        /// Emit this signal when an image is ready for display.
-       signals2::signal<void(PreviewImage const &)> imageReady;
+       signal<void(PreviewImage const &)> imageReady;
 
        Buffer const & buffer() const { return buffer_; }
 
@@ -282,7 +282,7 @@ void PreviewLoader::refreshPreviews()
 }
 
 
-signals2::connection PreviewLoader::connect(slot const & slot) const
+connection PreviewLoader::connect(slot const & slot) const
 {
        return pimpl_->imageReady.connect(slot);
 }
diff --git a/src/graphics/PreviewLoader.h b/src/graphics/PreviewLoader.h
index 5d0bf8e..272c4d3 100644
--- a/src/graphics/PreviewLoader.h
+++ b/src/graphics/PreviewLoader.h
@@ -76,10 +76,10 @@ public:
         *  has been created and is ready for loading through
         *  lyx::graphics::PreviewImage::image().
         */
-       typedef signals2::signal<void(PreviewImage const &)> sig;
+       typedef signal<void(PreviewImage const &)> sig;
        typedef sig::slot_type slot;
        ///
-       signals2::connection connect(slot const &) const;
+       connection connect(slot const &) const;
 
        /** When PreviewImage has finished loading the image file into memory,
         *  it tells the PreviewLoader to tell the outside world
diff --git a/src/insets/RenderPreview.cpp b/src/insets/RenderPreview.cpp
index 2ed69bb..5dff410 100644
--- a/src/insets/RenderPreview.cpp
+++ b/src/insets/RenderPreview.cpp
@@ -288,7 +288,7 @@ void RenderMonitoredPreview::draw(PainterInfo & pi, int x, 
int y, bool const) co
 }
 
 
-signals2::connection RenderMonitoredPreview::connect(slot const & slot)
+connection RenderMonitoredPreview::connect(slot const & slot)
 {
        return changed_.connect(slot);
 }
diff --git a/src/insets/RenderPreview.h b/src/insets/RenderPreview.h
index 97725d8..24eda3a 100644
--- a/src/insets/RenderPreview.h
+++ b/src/insets/RenderPreview.h
@@ -101,7 +101,7 @@ private:
        /** Store the connection to the preview loader so that we connect
         *  only once.
         */
-       signals2::scoped_connection ploader_connection_;
+       scoped_connection ploader_connection_;
 
        /// Inform the core that the inset has changed.
        Inset const * parent_;
@@ -122,9 +122,9 @@ public:
 
        /// Connect and you'll be informed when the file changes.
        /// Do not forget to track objects used by the slot.
-       typedef signals2::signal<void()> sig;
+       typedef signal<void()> sig;
        typedef sig::slot_type slot;
-       signals2::connection connect(slot const & slot);
+       connection connect(slot const & slot);
 
        /// equivalent to dynamic_cast
        RenderMonitoredPreview * asMonitoredPreview() override { return this; }
diff --git a/src/support/FileMonitor.cpp b/src/support/FileMonitor.cpp
index a3b17ad..50f1125 100644
--- a/src/support/FileMonitor.cpp
+++ b/src/support/FileMonitor.cpp
@@ -188,7 +188,7 @@ void FileMonitor::connectToFileMonitorGuard()
 }
 
 
-signals2::connection FileMonitor::connect(slot const & slot)
+connection FileMonitor::connect(slot const & slot)
 {
        return fileChanged_.connect(slot);
 }
diff --git a/src/support/FileMonitor.h b/src/support/FileMonitor.h
index 622637e..1e43979 100644
--- a/src/support/FileMonitor.h
+++ b/src/support/FileMonitor.h
@@ -130,10 +130,10 @@ class FileMonitor : public QObject
 public:
        FileMonitor(std::shared_ptr<FileMonitorGuard> monitor);
 
-       typedef signals2::signal<void(bool)> sig;
+       typedef signal<void(bool)> sig;
        typedef sig::slot_type slot;
        /// Connect and you'll be informed when the file has changed.
-       signals2::connection connect(slot const &);
+       connection connect(slot const &);
        /// absolute path being tracked
        std::string const & filename() { return monitor_->filename(); }
        /// Make sure the good file is being monitored, after e.g. a move or a
diff --git a/src/support/ForkedCalls.h b/src/support/ForkedCalls.h
index 681b889..ea16ced 100644
--- a/src/support/ForkedCalls.h
+++ b/src/support/ForkedCalls.h
@@ -53,7 +53,7 @@ public:
         *  we can return easily to C++ methods, rather than just globally
         *  accessible functions.
         */
-       typedef signals2::signal<void(pid_t, int)> sig;
+       typedef signal<void(pid_t, int)> sig;
        typedef sig::slot_type slot;
 
        /** The signal is connected in the calling routine to the desired
diff --git a/src/support/Timeout.h b/src/support/Timeout.h
index cf15a58..98e1711 100644
--- a/src/support/Timeout.h
+++ b/src/support/Timeout.h
@@ -40,7 +40,7 @@ public:
        /// restart the timer
        void restart();
        /// signal emitted on timer expiry
-       signals2::signal<void()> timeout;
+       signal<void()> timeout;
        /// emit the signal
        void emit();
        /// set the timer type
diff --git a/src/support/signals.h b/src/support/signals.h
index ceca370..4b55663 100644
--- a/src/support/signals.h
+++ b/src/support/signals.h
@@ -18,7 +18,9 @@
 
 namespace lyx {
 
-namespace signals2 = ::nod;
+using nod::signal;
+using nod::connection;
+using nod::scoped_connection;
 
 namespace support {
 
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to