]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
wizard: add space when autocompleting words
authortobtoht <tob@featherwallet.org>
Mon, 14 Oct 2024 20:46:25 +0000 (22:46 +0200)
committertobtoht <tob@featherwallet.org>
Mon, 14 Oct 2024 20:46:59 +0000 (22:46 +0200)
src/components.h
src/wizard/PageWalletRestoreSeed.cpp
src/wizard/PageWalletRestoreSeed.h

index 8a1059fa120aa772cf63117a85819b4ce14a7996..17b2604b87eb6ad4e4fc5da3b79b3e83f249802e 100644 (file)
@@ -4,6 +4,7 @@
 #ifndef FEATHER_COMPONENTS_H
 #define FEATHER_COMPONENTS_H
 
+#include <QCompleter>
 #include <QPushButton>
 #include <QHBoxLayout>
 #include <QDialog>
@@ -117,4 +118,13 @@ public:
     }
 };
 
+class SpaceCompleter : public QCompleter {
+protected:
+    QString pathFromIndex(const QModelIndex &index) const override
+    {
+        QString completion = QCompleter::pathFromIndex(index);
+        return completion + ' ';
+    }
+};
+
 #endif //FEATHER_COMPONENTS_H
index 624efdb7962a8d555fa547cd2d8cfee337d9d70f..cb251180379f9894216894e4d90326b1fb58b1f6 100644 (file)
@@ -237,4 +237,4 @@ void PageWalletRestoreSeed::onOptionsClicked() {
     m_fields->showSetRestoreHeightPage = check_overrideCreationDate.isChecked();
     m_fields->showSetSeedPassphrasePage = check_setSeedPasshprase.isChecked();
     m_fields->showSetSubaddressLookaheadPage = check_subaddressLookahead.isChecked();
-}
\ No newline at end of file
+}
index 2c3bc8361856da748a2dda6c55d4fc01275ddd8a..ed02550a472afadc4a25299a793456a2a0b56475 100644 (file)
@@ -8,6 +8,8 @@
 #include <QCompleter>
 #include <QStringListModel>
 
+#include "components.h"
+
 namespace Ui {
     class PageWalletRestoreSeed;
 }
@@ -41,7 +43,7 @@ private:
         int length;
         QStringList words;
         QStringListModel completerModel;
-        QCompleter completer;
+        SpaceCompleter completer;
         Seed::Type type;
     };