Skip to content

Commit

Permalink
Merge pull request #260 from simelo/stdevMauricio1802_t135_Handle_app…
Browse files Browse the repository at this point in the history
…lication_configuration_using_QSettings

Fixes #135: Handle application configuration using `QSettings`
  • Loading branch information
olemis committed Dec 24, 2019
2 parents 86f2d7d + 2e68815 commit b3d7f9c
Show file tree
Hide file tree
Showing 47 changed files with 885 additions and 4,107 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ htmlcov/
nosetests.xml
coverage.xml
coverage.html
coverage.out
*.cover
.hypothesis/

Expand Down Expand Up @@ -84,3 +85,4 @@ android
rcc_cgo_*.go
darwin


32 changes: 17 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ go:
services:
- docker
go_import_path: github.com/fibercrypto/fibercryptowallet
cache:
directories:
- $GOPATH/src/github.com/therecipe
- $GOPATH/bin
matrix:
include:
- stage: RPI
Expand All @@ -14,52 +18,49 @@ matrix:
- DEFAULT_ARCH=rpi2 make install-docker-deps
- DEFAULT_ARCH=rpi3 make install-docker-deps
- make install-deps-no-envs
- make install-coveralls
script:
- make clean
- DEFAULT_TARGET=rpi1 make build-docker
- DEFAULT_TARGET=rpi2 make build-docker
- DEFAULT_TARGET=rpi3 make build-docker
- make lint
- make test
- make run-docker CMD='make test'
- stage: Android
if: branch = release*$
install:
- DEFAULT_ARCH=android make install-docker-deps
- make install-deps-no-envs
- make install-coveralls
script:
- make clean
- DEFAULT_TARGET=android make build-docker
- DEFAULT_TARGET=android-emulator make build-docker
- make lint
- make test
- make test-cover-travis
- make run-docker CMD='make test'
- make run-docker CMD='make install coveralls ; make test-cover-travis'
- stage: Linux
install:
- make install-docker-deps
- make install-deps-no-envs
- make install-linters
- make install-coveralls
script:
- make clean
- DEFAULT_TARGET=linux make build-docker
- make test
- make clean
- make run-docker CMD='make test'
- make lint
- make test-cover-travis
- make run-docker CMD='make install-coveralls ; make test-cover-travis'
- stage: Windows
os: windows
install:
- choco install make -y
- travis_wait make install-deps-Windows
- choco install unzip -y
- travis_wait 50 make install-deps-Windows
- make install-linters
- make install-coveralls
script:
- make build
- make test
- make build-Windows-travis
- make build-icon
- make lint
- make test-cover-travis
- stage: MacOS
os: osx
osx_image: xcode10.2
Expand All @@ -77,8 +78,8 @@ notifications:
email: false
webhooks:
urls:
- https://fathomless-fjord-24024.herokuapp.com/notify
- https://coveralls.io/webhook
- https://fathomless-fjord-24024.herokuapp.com/notify
- https://coveralls.io/webhook

before_deploy:
- export VERSION="$(git describe --tags --exact-match HEAD 2> /dev/null)"
Expand All @@ -97,5 +98,6 @@ deploy:
draft: true
overwrite: true
on:
repo: fibercrypto/fibercryptowallet
repo: fibercrypto/FiberCryptoWallet
tags: true

27 changes: 10 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
# Contributing to FiberCrypto projects

We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:

- Submitting a [bug report](https://github.com/fibercrypto/fibercryptowallet/issues/new?labels=bug&template=bug_report.md)
- Submitting a [bug report](https://github.com/fibercrypto/FiberCryptoWallet/issues/new?labels=bug&template=bug_report.md)
- Discussing the current state of the code on [Blockchain Cuba channel](https://t.me/BlockchainCuba)
- Submitting a [new Github pull request](https://github.com/fibercrypto/fibercryptowallet/pull/new) with a fix
- Proposing new [features requests](https://github.com/fibercrypto/fibercryptowallet/issues/new?labels=feature&template=feature_request.md)
- Submitting a [new Github pull request](https://github.com/fibercrypto/FiberCryptoWallet/pull/new) with a fix
- Proposing new [features requests](https://github.com/fibercrypto/FiberCryptoWallet/issues/new?labels=feature&template=feature_request.md)
- Becoming a maintainer

## We Develop with Github

We use github to host code, to track issues and feature requests, as well as accept pull requests.

## We Use [Github Flow](https://guides.github.com/introduction/flow/index.html), So All Code Changes Happen Through Pull Requests

Pull requests are the best way to propose changes to the codebase (we use [Github Flow](https://guides.github.com/introduction/flow/index.html)). We actively welcome your pull requests:

1. Fork the repo and create your branch from `master`.
- Branch name should follow the pattern `<USER>_t<ISSUE>_<DESC>` e.g. `olemis_t256_readme_badges` for @olemis to submit a patch to fix issue #256 by adding project badges in `README.md` file.
* Branch name should follow the pattern `<USER>_t<ISSUE>_<DESC>` e.g. `olemis_t256_readme_badges` for @olemis to submit a patch to fix issue #256 by adding project badges in `README.md` file.
2. If you've added code that should be tested, add tests.
3. If you've changed APIs, update the documentation.
4. If contributions add a relevant feature, describe changes in CHANGELOG.md
Expand All @@ -27,37 +24,33 @@ Pull requests are the best way to propose changes to the codebase (we use [Githu
8. Issue that pull request!

## Any contributions you make will be under the GPLv3 Software License

In short, when you submit code changes, your submissions are understood to be under the same [GPLv3 License](https://choosealicense.com/licenses/gpl-3.0/) that covers the project. Feel free to contact the maintainers if that's a concern.

## Report bugs using Github's [issues](https://github.com/fibercrypto/fibercryptowallet/issues)

We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/fibercrypto/fibercryptowallet/issues/new/choose); it's that easy!
## Report bugs using Github's [issues](https://github.com/fibercrypto/FiberCryptoWallet/issues)
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/fibercrypto/FiberCryptoWallet/issues/new/choose); it's that easy!

## Write bug reports with detail, background, and sample code

[This is an example](http://stackoverflow.com/q/12488905/180626) of a bug report that we think it's not a bad model. Here's [another example from Craig Hockenberry](http://www.openradar.me/11905408), an app developer whom we greatly respect.

**Great Bug Reports** tend to have:

- A quick summary and/or background
- Steps to reproduce
- Be specific!
- Give sample code if you can. [This stackoverflow question](http://stackoverflow.com/q/12488905/180626) includes sample code that _anyone_ with a base R setup can run to reproduce what reporter was seeing
- Give sample code if you can. [This stackoverflow question](http://stackoverflow.com/q/12488905/180626) includes sample code that *anyone* with a base R setup can run to reproduce what reporter was seeing
- What you expected would happen
- What actually happens
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)

People _love_ thorough bug reports. I'm not even kidding.
People *love* thorough bug reports. I'm not even kidding.

## Use a Consistent Coding Style

Code style shall respect golang standards and is checked by a number of linters after running `make lint` from the command line.

## License

By contributing, you agree that your contributions will be licensed under its GPLv3 License.

## References

This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md).


51 changes: 32 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ LICENSE := GPLv3
COPYRIGHT := Copyright © 2019 $(ORG_NAME)

UNAME_S = $(shell uname -s)
OSNAME = $(shell echo $(UNAME_S) | tr A-Z a-z)
DEFAULT_TARGET ?= desktop
DEFAULT_ARCH ?= linux
## In future use as a parameter tu make command.
COIN = skycoin
COIN ?= skycoin
COVERAGEPATH = src/coin/$(COIN)
COVERAGEFILE = $(COVERAGEPATH)/coverage.out
COVERAGEHTML = $(COVERAGEPATH)/coverage.html
Expand All @@ -32,9 +33,6 @@ ICONSET := resources/images/icons/appIcon/appIcon.iconset
CONVERT := convert
SIPS := sips
ICONUTIL := iconutil
UNAME_S = $(shell uname -s)
DEFAULT_TARGET ?= desktop
DEFAULT_ARCH ?= linux

# Platform-specific switches
ifeq ($(OS),Windows_NT)
Expand Down Expand Up @@ -83,11 +81,19 @@ QTFILES := $(shell echo "$(QRCFILES) $(TSFILES) $(PLISTFILES) $(QTCONFFILE
RESOURCEFILES := $(shell echo "$(SVGFILES) $(PNGFILES) $(OTFFILES) $(ICNSFILES) $(ICOFILES) $(RCFILES)")
SRCFILES := $(shell echo "$(QTFILES) $(RESOURCEFILES) $(GOFILES)")

BINPATH_Linux := deploy/linux/fibercryptowallet
BINPATH_Windows_NT := deploy/windows/fibercryptowallet.exe
BINPATH_Linux := deploy/linux/FiberCryptoWallet
BINPATH_Windows_NT := deploy/windows/FiberCryptoWallet.exe
BINPATH_Darwin := deploy/darwin/fibercryptowallet.app/Contents/MacOS/fibercryptowallet
BINPATH := $(BINPATH_$(UNAME_S))

PWD := $(shell pwd)

GOPATH ?= $(shell echo "$${GOPATH}")
GOPATH_SRC := src/github.com/fibercrypto/fibercryptowallet

DOCKER_QT ?= therecipe/qt
DOCKER_QT_TEST ?= simelotech/qt-test

deps: ## Add dependencies
dep ensure
rm -rf rm -rf vendor/github.com/therecipe
Expand All @@ -104,7 +110,8 @@ install-deps-no-envs: ## Install therecipe/qt with -tags=no_env set

install-docker-deps: ## Install docker images for project compilation using docker
@echo "Downloading images..."
docker pull therecipe/qt:$(DEFAULT_ARCH)
docker pull $(DOCKER_QT):$(DEFAULT_ARCH)
docker pull $(DOCKER_QT_TEST):$(DEFAULT_ARCH)
@echo "Download finished."

install-deps-Linux: ## Install Linux dependencies
Expand All @@ -121,16 +128,17 @@ install-deps-Darwin: ## Install osx dependencies
go get -t -d -v ./...

install-deps-Windows: ## Install Windowns dependencies
go get -u -v github.com/therecipe/qt/cmd/...
qtsetup -test=false -ErrorAction SilentlyContinue
set GO111MODULE=off
go get -v -tags=no_env github.com/therecipe/qt/cmd/...
(qtsetup -test=false)
go get -t -d -v ./...
wget -O magick.zip https://sourceforge.net/projects/imagemagick/files/im7-exes/ImageMagick-7.0.7-25-portable-Q16-x64.zip
unzip magick.zip convert.exe

install-deps: install-deps-$(UNAME_S) install-linters ## Install dependencies
@echo "Dependencies installed"

build-docker: ## Build project using docker
build-docker: install-docker-deps ## Build project using docker
@echo "Building $(APP_NAME)..."
qtdeploy -docker build $(DEFAULT_TARGET)
@echo "Done."
Expand Down Expand Up @@ -188,6 +196,11 @@ $(BINPATH_Windows_NT): $(SRCFILES)
make build-res-Windows_NT
make build-qt

build-Windows-travis: $(SRCFILES)
make build-icon
make build-res-Windows_NT
make build-qt

build-res-Darwin: $(PLIST) $(APP_ICON_PATH)/appIcon.icns
@echo "Building on Darwin"
mkdir -p "$(DARWIN_RES)/Content/Resources"
Expand Down Expand Up @@ -231,7 +244,6 @@ clean: clean-test clean-build ## Remove temporary files

gen-mocks: ## Generate mocks for interface types
mockery -all -output src/coin/mocks -outpkg mocks -dir src/core
find src/coin/mocks/ -name '*.go' -type f -print0 | xargs -0 -I PATH sed -i '' -e 's/fibercryptowallet/fibercryptowallet/g' PATH

test-sky: ## Run Skycoin plugin test suite
go test -cover -timeout 30s github.com/fibercrypto/fibercryptowallet/src/coin/skycoin
Expand All @@ -240,27 +252,28 @@ test-sky: ## Run Skycoin plugin test suite
test-core: ## Run tests for API core and helpers
go test -cover -timeout 30s github.com/fibercrypto/fibercryptowallet/src/util

test-data: ## Run tests for data package
go test -cover -timeout 30s github.com/fibercrypto/fibercryptowallet/src/data


test-sky-launch-html-cover:
go test -cover -timeout 30s github.com/fibercrypto/fibercryptowallet/src/coin/skycoin
go test -coverprofile=$(COVERAGEFILE) -timeout 30s github.com/fibercrypto/fibercryptowallet/src/coin/skycoin/models
go tool cover -html=$(COVERAGEFILE) -o $(COVERAGEHTML)

test-cover-travis:
go test -covermode=count -coverprofile=$(COVERAGEFILE) -timeout 30s github.com/fibercrypto/fibercryptowallet/src/util
$(HOME)/gopath/bin/goveralls -coverprofile=$(COVERAGEFILE) -service=travis-ci -repotoken 1zkcSxi8TkcxpL2zTQOK9G5FFoVgWjceP
$(GOPATH)/bin/goveralls -coverprofile=$(COVERAGEFILE) -service=travis-ci -repotoken 1zkcSxi8TkcxpL2zTQOK9G5FFoVgWjceP
go test -coverprofile=$(COVERAGEFILE) -timeout 30s github.com/fibercrypto/fibercryptowallet/src/coin/skycoin/models
$(HOME)/gopath/bin/goveralls -coverprofile=$(COVERAGEFILE) -service=travis-ci -repotoken 1zkcSxi8TkcxpL2zTQOK9G5FFoVgWjceP
$(GOPATH)/bin/goveralls -coverprofile=$(COVERAGEFILE) -service=travis-ci -repotoken 1zkcSxi8TkcxpL2zTQOK9G5FFoVgWjceP
go test -cover -covermode=count -coverprofile=$(COVERAGEFILE) -timeout 30s github.com/fibercrypto/fibercryptowallet/src/coin/skycoin
$(HOME)/gopath/bin/goveralls -coverprofile=$(COVERAGEFILE) -service=travis-ci -repotoken 1zkcSxi8TkcxpL2zTQOK9G5FFoVgWjceP
$(GOPATH)/bin/goveralls -coverprofile=$(COVERAGEFILE) -service=travis-ci -repotoken 1zkcSxi8TkcxpL2zTQOK9G5FFoVgWjceP


test-cover: clean-test test-sky-launch-html-cover ## Show more details of test coverage

test: clean-test test-core test-sky test-data ## Run project test suite
test: clean-test test-core test-sky ## Run project test suite

run-docker: DOCKER_GOPATH=$(shell docker inspect $(DOCKER_QT):$(DEFAULT_ARCH) | grep '"GOPATH=' | head -n1 | cut -d = -f2 | cut -d '"' -f1)
run-docker: install-docker-deps ## Run CMD inside Docker container
@echo "Docker container GOPATH found at $(DOCKER_GOPATH)"
docker run --rm -v $(PWD):$(DOCKER_GOPATH)/$(GOPATH_SRC) $(DOCKER_QT_TEST):$(DEFAULT_ARCH) bash -c 'cd $(DOCKER_GOPATH)/$(GOPATH_SRC) ; $(CMD)'

install-linters: ## Install linters
go get -u github.com/FiloSottile/vendorcheck
Expand Down
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# FiberCrypto wallet

[![Build Status](https://travis-ci.org/fibercrypto/fibercryptowallet.svg?branch=develop)](https://travis-ci.org/fibercrypto/fibercryptowallet)
[![Build Status](https://travis-ci.org/fibercrypto/FiberCryptoWallet.svg?branch=develop)](https://travis-ci.org/fibercrypto/FiberCryptoWallet)
[![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](CONTRIBUTING.md)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](LICENSE.GPLv3)
[![Coverage Status](https://coveralls.io/repos/github/fibercrypto/fibercryptowallet/badge.svg?branch=develop)](https://coveralls.io/github/fibercrypto/fibercryptowallet?branch=develop)
[![Coverage Status](https://coveralls.io/repos/github/fibercrypto/FiberCryptoWallet/badge.svg?branch=develop)](https://coveralls.io/github/fibercrypto/FiberCryptoWallet?branch=develop)

FiberCrypto wallet is a cryptocurrency software wallet aimed at:

Expand Down Expand Up @@ -70,11 +70,10 @@ Windows requires the command line tool `magick convert`, that comes with the ope

[Linux/X11 requirements](http://doc.qt.io/qt-5/linux.html)
[MacOS requirements](http://doc.qt.io/qt-5/macos.html)
[Windows requirements](http://doc.qt.io/qt-5/windows.html)
[Windows requirements](http://doc.qt.io/qt-5/windows.html)

The minimum Qt version required is [Qt 5.12.0 LTS](https://download.qt.io/archive/qt/5.12/5.12.0/ "Qt Archive"). However, is highly recommended using [Qt 5.12.1 LTS](https://download.qt.io/archive/qt/5.12/5.12.1/ "Qt Archive") or any later version of Qt5 due to some bugs:

- [QTBUG-68156](https://bugreports.qt.io/browse/QTBUG-68156 "Incompatible version of OpenSSL on Ubuntu 18.04")
The minimum Qt version required is [Qt 5.12.0 LTS](https://download.qt.io/archive/qt/5.12/5.12.0/ "Qt Archive"). However, is highly recommended using [Qt 5.12.1 LTS](https://download.qt.io/archive/qt/5.12/5.12.1/ "Qt Archive") or any later version of Qt5 due to some bugs:
- [QTBUG-68156](https://bugreports.qt.io/browse/QTBUG-68156 "Incompatible version of OpenSSL on Ubuntu 18.04")
- [QTBUG-72811](https://bugreports.qt.io/browse/QTBUG-72811 "[Reg 5.11 -> 5.12] QQC2 buttons not react to click when holding for about a second")

We always recommend using the latest Qt version. See [Qt Archive](https://download.qt.io/archive/qt/ "Qt Archive").
Expand Down Expand Up @@ -115,5 +114,4 @@ lint Run linters. Use make install-linters first.
Type `make help` in your console for details.

## WIP

This is a Work-In-Progress.
1 change: 0 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (

_ "github.com/fibercrypto/fibercryptowallet/src/coin/skycoin"
_ "github.com/fibercrypto/fibercryptowallet/src/models"
_ "github.com/fibercrypto/fibercryptowallet/src/models/addressBook"
_ "github.com/fibercrypto/fibercryptowallet/src/models/history"
_ "github.com/fibercrypto/fibercryptowallet/src/models/pending"
"github.com/therecipe/qt/core"
Expand Down
1 change: 0 additions & 1 deletion resources/images/icons/user_icon-icons.com_66546.svg

This file was deleted.

Loading

0 comments on commit b3d7f9c

Please sign in to comment.