mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 12:09:57 +00:00
Merge pull request #2449
4a52681
workflows: check if QML loads successfully (selsta)
This commit is contained in:
commit
04a665db0c
2 changed files with 12 additions and 1 deletions
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
|
@ -13,6 +13,8 @@ jobs:
|
||||||
run: brew update && brew install boost hidapi zmq libpgm unbound libsodium miniupnpc ldns expat doxygen graphviz libunwind-headers protobuf qt5
|
run: brew update && brew install boost hidapi zmq libpgm unbound libsodium miniupnpc ldns expat doxygen graphviz libunwind-headers protobuf qt5
|
||||||
- name: build
|
- name: build
|
||||||
run: export PATH=$PATH:/usr/local/opt/qt/bin && ./build.sh
|
run: export PATH=$PATH:/usr/local/opt/qt/bin && ./build.sh
|
||||||
|
- name: test qml
|
||||||
|
run: build/release/bin/monero-wallet-gui.app/Contents/MacOS/monero-wallet-gui --test-qml
|
||||||
|
|
||||||
build-ubuntu:
|
build-ubuntu:
|
||||||
|
|
||||||
|
@ -25,6 +27,8 @@ jobs:
|
||||||
- name: install monero dependencies
|
- name: install monero dependencies
|
||||||
run: sudo apt -y install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev libhidapi-dev libnorm-dev libusb-1.0-0-dev libpgm-dev
|
run: sudo apt -y install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev libhidapi-dev libnorm-dev libusb-1.0-0-dev libpgm-dev
|
||||||
- name: install monero gui dependencies
|
- name: install monero gui dependencies
|
||||||
run: sudo apt -y install qtbase5-dev qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-xmllistmodel qml-module-qt-labs-settings qml-module-qt-labs-folderlistmodel qttools5-dev-tools qml-module-qtquick-templates2 libqt5svg5-dev
|
run: sudo apt -y install qtbase5-dev qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-xmllistmodel qml-module-qt-labs-settings qml-module-qt-labs-folderlistmodel qttools5-dev-tools qml-module-qtquick-templates2 libqt5svg5-dev xvfb
|
||||||
- name: build
|
- name: build
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
|
- name: test qml
|
||||||
|
run: xvfb-run -a build/release/bin/monero-wallet-gui --test-qml
|
||||||
|
|
7
main.cpp
7
main.cpp
|
@ -174,7 +174,10 @@ int main(int argc, char *argv[])
|
||||||
QCoreApplication::translate("main", "Log to specified file"),
|
QCoreApplication::translate("main", "Log to specified file"),
|
||||||
QCoreApplication::translate("main", "file"));
|
QCoreApplication::translate("main", "file"));
|
||||||
|
|
||||||
|
QCommandLineOption testQmlOption("test-qml");
|
||||||
|
testQmlOption.setFlags(QCommandLineOption::HiddenFromHelp);
|
||||||
parser.addOption(logPathOption);
|
parser.addOption(logPathOption);
|
||||||
|
parser.addOption(testQmlOption);
|
||||||
parser.addHelpOption();
|
parser.addHelpOption();
|
||||||
parser.process(app);
|
parser.process(app);
|
||||||
|
|
||||||
|
@ -405,6 +408,10 @@ int main(int argc, char *argv[])
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// QML loaded successfully.
|
||||||
|
if (parser.isSet(testQmlOption))
|
||||||
|
return 0;
|
||||||
|
|
||||||
#ifdef WITH_SCANNER
|
#ifdef WITH_SCANNER
|
||||||
QObject *qmlCamera = rootObject->findChild<QObject*>("qrCameraQML");
|
QObject *qmlCamera = rootObject->findChild<QObject*>("qrCameraQML");
|
||||||
if (qmlCamera)
|
if (qmlCamera)
|
||||||
|
|
Loading…
Reference in a new issue