]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiSelection.cpp
Complete the removal of the embedding stuff. Maybe. It's hard to be sure we got every...
[lyx.git] / src / frontends / qt4 / GuiSelection.cpp
index 1e11f93f8c8dd085ba17e3c092f32f1730ac34c1..23878b32328f49b90117ff6f03b8de9753945cab 100644 (file)
@@ -15,8 +15,8 @@
 #include "GuiSelection.h"
 
 #include "qt_helpers.h"
-#include "debug.h"
 
+#include "support/debug.h"
 #include "support/lstrings.h"
 
 #include <QApplication>
@@ -24,8 +24,6 @@
 #include <QString>
 
 
-using std::endl;
-
 namespace lyx {
 namespace frontend {
 
@@ -36,7 +34,7 @@ using support::externalLineEnding;
 GuiSelection::GuiSelection()
        : selection_supported_(qApp->clipboard()->supportsSelection())
 {
-       connect(qApp->clipboard(), SIGNAL(dataChanged()),
+       connect(qApp->clipboard(), SIGNAL(selectionChanged()),
                this, SLOT(on_dataChanged()));
        // initialize clipboard status.
        on_dataChanged();
@@ -73,8 +71,7 @@ docstring const GuiSelection::get() const
 {
        QString const str = qApp->clipboard()->text(QClipboard::Selection)
                                .normalized(QString::NormalizationForm_C);
-       LYXERR(Debug::ACTION) << "GuiSelection::get: " << fromqstr(str)
-                             << endl;
+       LYXERR(Debug::ACTION, "GuiSelection::get: " << fromqstr(str));
        if (str.isNull())
                return docstring();
 
@@ -84,7 +81,7 @@ docstring const GuiSelection::get() const
 
 void GuiSelection::put(docstring const & str)
 {
-       LYXERR(Debug::ACTION) << "GuiSelection::put: " << to_utf8(str) << endl;
+       LYXERR(Debug::ACTION, "GuiSelection::put: " << to_utf8(str));
 
        qApp->clipboard()->setText(toqstr(externalLineEnding(str)),
                                   QClipboard::Selection);
@@ -103,6 +100,8 @@ bool GuiSelection::empty() const
        if (!selection_supported_)
                return true;
 
+       LYXERR(Debug::ACTION, "GuiSelection::empty: " << text_selection_empty_);
+
        return text_selection_empty_;
 }