Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRAFT: Custom data directory support #273

Closed
wants to merge 3 commits into from

Conversation

jarolrod
Copy link
Member

@jarolrod jarolrod commented Feb 22, 2023

Opened to showcase initial support. Lacks system settings wiring.

Dark Light
Screen Shot 2023-02-22 at 3 37 32 AM Screen Shot 2023-02-22 at 3 36 54 AM

Windows
Intel macOS
Apple Silicon macOS
ARM64 Android

@jarolrod jarolrod marked this pull request as draft February 22, 2023 08:42
@jarolrod jarolrod marked this pull request as ready for review February 23, 2023 18:40
@jarolrod jarolrod marked this pull request as draft February 23, 2023 18:58
Copy link
Contributor

@johnny9 johnny9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is the error output for the android apk

02-25 08:51:21.967 32529 32551 W libbitcoin-qt_arm64-v8a.so: QQmlApplicationEngine failed to load component                                                                                                        
02-25 08:51:21.967 32529 32551 W libbitcoin-qt_arm64-v8a.so: qrc:/qml/pages/main.qml:38:13: Type OnboardingStorageLocation unavailable                                                                             
02-25 08:51:21.967 32529 32551 W libbitcoin-qt_arm64-v8a.so: qrc:/qml/pages/onboarding/OnboardingStorageLocation.qml:25:17: Type StorageLocations unavailable                                                      
02-25 08:51:21.967 32529 32551 W libbitcoin-qt_arm64-v8a.so: qrc:/qml/components/StorageLocations.qml:34:5: Type FileDialog unavailable                                                                            
02-25 08:51:21.968 32529 32551 W libbitcoin-qt_arm64-v8a.so: qrc:/qt-project.org/imports/QtQuick/Dialogs/DefaultFileDialog.qml:45:1: module "QtQuick.Dialogs.Private" is not installed                             

@hebasto
Copy link
Member

hebasto commented Feb 26, 2023

Here is the error output for the android apk

...libbitcoin-qt_arm64-v8a.so: qrc:/qt-project.org/imports/QtQuick/Dialogs/DefaultFileDialog.qml:45:1: module "QtQuick.Dialogs.Private" is not installed                             

It looks like expected considering

#ifndef QT_QPA_PLATFORM_ANDROID
Q_IMPORT_PLUGIN(QtQuick2DialogsPrivatePlugin)
#endif

@hebasto
Copy link
Member

hebasto commented Feb 26, 2023

Maybe

diff --git a/build-aux/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4
index e12d2efa6..5b1a133c1 100644
--- a/build-aux/m4/bitcoin_qt.m4
+++ b/build-aux/m4/bitcoin_qt.m4
@@ -236,6 +236,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
         _BITCOIN_QT_CHECK_STATIC_PLUGIN([QtQuickLayoutsPlugin], [-lqml_QtQuick_Layouts_qquicklayoutsplugin])
         dnl qtquickcontrols module plugins
         _BITCOIN_QT_CHECK_STATIC_PLUGIN([QtQuick2DialogsPlugin], [-lqml_QtQuick_Dialogs_dialogplugin])
+        _BITCOIN_QT_CHECK_STATIC_PLUGIN([QtQuick2DialogsPrivatePlugin], [-lqml_QtQuick_Dialogs_Private_dialogsprivateplugin])
         _BITCOIN_QT_CHECK_STATIC_PLUGIN([QtQuickControls1Plugin], [-lqml_QtQuick_Controls_qtquickcontrolsplugin])
         _BITCOIN_QT_CHECK_STATIC_PLUGIN([QmlFolderListModelPlugin], [-lqml_Qt_labs_folderlistmodel_qmlfolderlistmodelplugin])
         _BITCOIN_QT_CHECK_STATIC_PLUGIN([QmlSettingsPlugin], [-lqml_Qt_labs_settings_qmlsettingsplugin])
diff --git a/src/qml/bitcoin.cpp b/src/qml/bitcoin.cpp
index 55a1e152d..288a88b42 100644
--- a/src/qml/bitcoin.cpp
+++ b/src/qml/bitcoin.cpp
@@ -52,9 +52,7 @@ QT_END_NAMESPACE
 Q_IMPORT_PLUGIN(QtQmlPlugin)
 Q_IMPORT_PLUGIN(QtQmlModelsPlugin)
 Q_IMPORT_PLUGIN(QtQuick2DialogsPlugin)
-#ifndef QT_QPA_PLATFORM_ANDROID
 Q_IMPORT_PLUGIN(QtQuick2DialogsPrivatePlugin)
-#endif
 Q_IMPORT_PLUGIN(QtQuick2Plugin)
 Q_IMPORT_PLUGIN(QtQuick2WindowPlugin)
 Q_IMPORT_PLUGIN(QtQuickControls1Plugin)

?

@jarolrod jarolrod added this to the v1.0 milestone May 10, 2023
@hebasto
Copy link
Member

hebasto commented Jun 1, 2023

Need rebase.

When undraft? :)

@hebasto hebasto modified the milestones: v1.0, v1.1 Jun 6, 2023
@jarolrod
Copy link
Member Author

jarolrod commented Sep 1, 2023

rebased over main

@pablomartin4btc
Copy link
Contributor

Since we have already #390, do still we need this PR? Does @D33r-Gee need to incorporate anything from here?

@D33r-Gee D33r-Gee mentioned this pull request Mar 28, 2024
hebasto added a commit that referenced this pull request Jun 8, 2024
7a8fb19 qml: UI only display datadir functionality (D33r-Gee)
b648cbb qml: added getting custom datadir for display (D33r-Gee)

Pull request description:

  This pull request builds upon #392 and introduces enhancements to display the data directory information within the UI. This functionality encompasses both default and custom data directory paths, fulfilling the UI requirements for user-defined data directory selection initiated in #273.

  Also the custom datadir is not persistent at the moment it will be once the back end wiring is added.

  <details>
  <summary>Ubuntu 22.04 Screenshots</summary>

  ![datadir_desktop](https://github.com/bitcoin-core/gui-qml/assets/111142327/639873a5-fd5d-44ac-b0be-66e0762a08db)

  </details>

  <details>
  <summary>Android Screenshots</summary>

  ![datadir_mobile_720](https://github.com/bitcoin-core/gui-qml/assets/111142327/e6fcd12b-f6e6-4efc-adba-071d2caaddef)

  </details>

  As a potential follow-up enhancement, consider incorporating mechanisms for saving the data directory path. This could be achieved through:

  - Double-click functionality: Allow users to save the displayed path by simply double-clicking on it. This provides a convenient and intuitive method for desktop environments.

  - Dedicated button: For mobile use cases or scenarios where double-clicking might not be feasible, introduce a dedicated "Save Path" button. This ensures a clear and accessible action for users on various devices.

ACKs for top commit:
  GBKS:
    ACK 7a8fb19. Looks and feels great, just tested again on MacOS.
  MarnixCroes:
    tACK 7a8fb19 on Ubuntu desktop
  pablomartin4btc:
    reACK 7a8fb19

Tree-SHA512: 4be20832b72fee99046e78ce45e766ff3f00fc556d57c47311828daa3270d1980fdb2b16b95715024a5835f5730f4a3a347337e9dcc22f57fbaf2ac6711a9f6d
@jarolrod
Copy link
Member Author

replaced by #408

@jarolrod jarolrod closed this Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants