[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:43 -0500 (EST) |
branch: old/qt-info
commit 262eba90f5965a3c6cbf906b30fa87a6a7229f52
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Fri Apr 19 14:10:37 2019 +0100
error message for non-existent index entry
---
js/docbrowser/core.cpp | 2 +-
js/docbrowser/core.h | 1 +
js/docbrowser/qtinfo.js | 6 ++++++
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/js/docbrowser/core.cpp b/js/docbrowser/core.cpp
index ee7597fdc4..f4d41a3225 100644
--- a/js/docbrowser/core.cpp
+++ b/js/docbrowser/core.cpp
@@ -45,7 +45,7 @@ Core::activate_input (const QString &arg)
if (index_data.contains(arg))
emit set_current_url (index_data[arg].toString());
else
- ; /* error message? */
+ emit echo ("Index entry not found");
}
void
diff --git a/js/docbrowser/core.h b/js/docbrowser/core.h
index 3874b5d73e..65d4f4cdcd 100644
--- a/js/docbrowser/core.h
+++ b/js/docbrowser/core.h
@@ -25,6 +25,7 @@ signals:
void setUrl (const QString &text);
void set_current_url (const QString &text);
void search (const QString &text);
+ void echo (const QString &message);
public slots:
// Signals emitted from the HTML client side and received on the C++ side.
diff --git a/js/docbrowser/qtinfo.js b/js/docbrowser/qtinfo.js
index 996cf2d1aa..9f204ba549 100644
--- a/js/docbrowser/qtinfo.js
+++ b/js/docbrowser/qtinfo.js
@@ -80,6 +80,12 @@ function wc_init()
store.dispatch (actions.search (string));
});
+ channel.objects.core.echo.connect(function(msg) {
+ store.dispatch ({
+ type: "echo",
+ msg: msg
+ });
+ });
});
};
- [no subject], (continued)
- [no subject], Gavin D. Smith, 2022/11/30
- [no subject], Gavin D. Smith, 2022/11/30
- [no subject], Gavin D. Smith, 2022/11/30
- [no subject], Gavin D. Smith, 2022/11/30
- [no subject], Gavin D. Smith, 2022/11/30
- [no subject], Gavin D. Smith, 2022/11/30
- [no subject], Gavin D. Smith, 2022/11/30
- [no subject], Gavin D. Smith, 2022/11/30
- [no subject], Gavin D. Smith, 2022/11/30
- [no subject], Gavin D. Smith, 2022/11/30
- [no subject],
Gavin D. Smith <=
- [no subject], Gavin D. Smith, 2022/11/30
- [no subject], Gavin D. Smith, 2022/11/30