v30.3-roots.1 · Commit 5: [PATCH 05/68] feat(qt): preserve Roots identity and GUI support on Core 30.3
src/qt/test/test_main.cpp
Before: src/qt/test/test_main.cpp · After: src/qt/test/test_main.cpp
File metadata
index f3430c7822a4910bbed09b52ce6a0a6e4f55de55..1e26c4570ce787fea7b0be8e64738693deba1b58 100644
Download original patch · Release notes
Diff rows 1–18 of 18. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. Before is on the left; after is on the right. Unified view fits narrow screens more easily.
src/qt/test/test_main.cpp
CHANGED
|
@@ -49,6 +49,7 @@ int main(int argc, char* argv[])
|
|
| 49 |
}());
|
| 50 |
|
| 51 |
std::unique_ptr<interfaces::Init> init = interfaces::MakeGuiInit(argc, argv);
|
|
|
|
| 52 |
gArgs.ForceSetArg("-listen", "0");
|
| 53 |
gArgs.ForceSetArg("-listenonion", "0");
|
| 54 |
gArgs.ForceSetArg("-discover", "0");
|
|
@@ -69,6 +70,11 @@ int main(int argc, char* argv[])
|
|
| 69 |
#endif
|
| 70 |
|
| 71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
QCoreApplication::setOrganizationName(QAPP_ORG_NAME);
|
| 73 |
QCoreApplication::setApplicationName(QAPP_APP_NAME_DEFAULT "-test");
|
| 74 |
|
|
|
|
| 49 |
}());
|
| 50 |
|
| 51 |
std::unique_ptr<interfaces::Init> init = interfaces::MakeGuiInit(argc, argv);
|
| 52 |
+
Q_INIT_RESOURCE(bitcoin_rendered);
|
| 53 |
gArgs.ForceSetArg("-listen", "0");
|
| 54 |
gArgs.ForceSetArg("-listenonion", "0");
|
| 55 |
gArgs.ForceSetArg("-discover", "0");
|
|
|
|
| 70 |
#endif
|
| 71 |
|
| 72 |
|
| 73 |
+
// Keep GUI settings inside the disposable test data directory.
|
| 74 |
+
QSettings::setDefaultFormat(QSettings::IniFormat);
|
| 75 |
+
QSettings::setPath(QSettings::IniFormat, QSettings::UserScope,
|
| 76 |
+
QString::fromStdString(fs::PathToString(gArgs.GetDataDirBase())));
|
| 77 |
+
|
| 78 |
QCoreApplication::setOrganizationName(QAPP_ORG_NAME);
|
| 79 |
QCoreApplication::setApplicationName(QAPP_APP_NAME_DEFAULT "-test");
|
| 80 |
|