texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Gavin D. Smith
Date: Wed, 30 Nov 2022 13:36:39 -0500 (EST)

branch: old/qt-info
commit c3c724a326fac81d35d3c038366606f1246d7e66
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Fri Apr 12 15:54:43 2019 +0100

    move public slots to end of file
---
 js/docbrowser/core.cpp       | 72 +++++++++++++++++++++++---------------------
 js/docbrowser/mainwindow.cpp |  8 -----
 2 files changed, 38 insertions(+), 42 deletions(-)

diff --git a/js/docbrowser/core.cpp b/js/docbrowser/core.cpp
index a595f317c2..c76a9e9e18 100644
--- a/js/docbrowser/core.cpp
+++ b/js/docbrowser/core.cpp
@@ -14,26 +14,6 @@ Core::Core(Ui::MainWindow *ui, QObject *parent)
 {
 }
 
-void
-Core::external_manual (const QString &url)
-{
-    qDebug() << "sent url" << url;
-
-    // Repace the file being viewed
-    char *manual, *node;
-    parse_external_url (qPrintable(url), &manual, &node);
-
-    if (manual)
-      {
-        load_manual (manual);
-        // and set node to node
-        qDebug () << "got node" << node;
-        //emit setNode (node);
-     }
-
-    free (manual); free (node);
-}
-
 bool
 Core::load_manual (const char *manual)
 {
@@ -56,6 +36,28 @@ Core::load_manual (const char *manual)
     return false;
 }
 
+
+/* Hide the text prompt.
+   Allegedly you can put these two as children of a widget, and then
+   just hide a single widget.  I couldn't get it to look right in
+   qtcreator, though. */
+void
+Core::hide_prompt()
+{
+    ui->promptLabel->setVisible(false);
+    ui->promptCombo->setVisible(false);
+}
+
+void
+Core::activate_input (const QString &arg)
+{
+    emit set_current_url (index_data[arg].toString());
+    hide_prompt();
+    ui->webEngineView->setFocus();
+}
+
+/********************* Public Slots **********************/
+
 /* Show the text prompt. */
 void
 Core::show_text_input (const QString &input, const QJsonObject &data)
@@ -77,21 +79,23 @@ Core::show_text_input (const QString &input, const 
QJsonObject &data)
   ui->promptCombo->setEditText("");
 }
 
-/* Hide the text prompt.
-   Allegedly you can put these two as children of a widget, and then
-   just hide a single widget.  I couldn't get it to look right in
-   qtcreator, though. */
-void
-Core::hide_prompt()
-{
-    ui->promptLabel->setVisible(false);
-    ui->promptCombo->setVisible(false);
-}
 
 void
-Core::activate_input (const QString &arg)
+Core::external_manual (const QString &url)
 {
-    emit set_current_url (index_data[arg].toString());
-    hide_prompt();
-    ui->webEngineView->setFocus();
+    qDebug() << "sent url" << url;
+
+    // Repace the file being viewed
+    char *manual, *node;
+    parse_external_url (qPrintable(url), &manual, &node);
+
+    if (manual)
+      {
+        load_manual (manual);
+        // and set node to node
+        qDebug () << "got node" << node;
+        //emit setNode (node);
+     }
+
+    free (manual); free (node);
 }
diff --git a/js/docbrowser/mainwindow.cpp b/js/docbrowser/mainwindow.cpp
index d788a5b0ba..4886755b5d 100644
--- a/js/docbrowser/mainwindow.cpp
+++ b/js/docbrowser/mainwindow.cpp
@@ -158,14 +158,6 @@ MainWindow::setup_profile (QWebEngineProfile *profile)
     profile->scripts()->insert(s);
     /* This needs to run after the <head> element is accessible, but before
        the DOMContentLoaded event handlers in info.js fire. */
-
-#if 0
-    QWebEngineScript s2;
-    s2.setSourceCode("if (typeof wc_init == 'function') { wc_init(); }");
-    s2.setInjectionPoint(QWebEngineScript::DocumentCreation);
-    s2.setWorldId(QWebEngineScript::MainWorld);
-    profile->scripts()->insert(s2);
-#endif
 }
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]