Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Release 5.0.1 #36

Merged
merged 2 commits into from
Dec 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 27 additions & 14 deletions CMakeLists.txt
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
# Iridium wallet Graphical User Interface
# Based on Bytecoin wallet
#
# First updtate submodules
# First update submodules :
# git submodule update --init --recursive
# git submodule foreach git pull origin master
#

cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.5)

message(STATUS "------- Starting configuration ---------")

#Set build version
set(VERSION_MAJOR "5")
set(VERSION_MINOR "0.0")
set(VERSION_MINOR "0.1")
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}")
set(CMAKE_CXX_STANDARD 11)

# Enabling C++14
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# Output directories
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)

set(ARCH native CACHE STRING "CPU to build for: -march value or default")
if("${ARCH}" STREQUAL "default")
set(ARCH_FLAG "default")
Expand Down Expand Up @@ -56,7 +68,6 @@ project(${CN_PROJECT_NAME})

set(CRYPTONOTE_LIB cryptonote)


find_package(Qt5 REQUIRED
Gui
Widgets
Expand Down Expand Up @@ -89,7 +100,7 @@ if(WIN32)
set(Boost_USE_STATIC_RUNTIME ON)
endif(WIN32)

find_package(Boost 1.58 REQUIRED COMPONENTS date_time filesystem program_options regex serialization system thread chrono)
find_package(Boost 1.68 REQUIRED COMPONENTS date_time filesystem program_options regex serialization system thread chrono)
if ((${Boost_MAJOR_VERSION} EQUAL 1) AND (${Boost_MINOR_VERSION} EQUAL 54))
message(SEND_ERROR "Boost version 1.58 is unsupported, more details are available here http://goo.gl/RrCFmA")
endif ()
Expand Down Expand Up @@ -118,7 +129,7 @@ file(GLOB_RECURSE CRYPTONOTE_SOURCES
cryptonote/src/Common/StringView.cpp
cryptonote/src/Common/VectorOutputStream.cpp
cryptonote/src/Common/ScopeExit.cpp
cryptonote/src/ConnectivityTool/ConnectivityTool.cpp
#cryptonote/src/ConnectivityTool/ConnectivityTool.cpp
cryptonote/src/crypto/blake256.c
cryptonote/src/crypto/chacha8.cpp
cryptonote/src/crypto/crypto-ops-data.c
Expand Down Expand Up @@ -197,7 +208,7 @@ else()
endif()

#qt5_wrap_cpp(WALLET_HEADERS_MOC ${WALLET_HEADERS})
qt5_wrap_ui(WALLET_FORMS_HEADERS ${WALLET_FORMS})
qt_wrap_ui(WALLET_FORMS_HEADERS ${WALLET_FORMS})
#qt5_add_resources(WALLET_RESOURCES_RCC ${WALLET_RESOURCES})

if (WIN32)
Expand Down Expand Up @@ -235,11 +246,11 @@ elseif (UNIX)
# if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
# endif()

find_package(Qt5PrintSupport REQUIRED)
find_package(Qt5 COMPONENTS PrintSupport REQUIRED)
include_directories(/usr/include/malloc)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes -std=c++11 -stdlib=libc++")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -maes -D_DARWIN_C_SOURCE")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes -std=c17 -D_DARWIN_C_SOURCE")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework Cocoa -framework OpenGL -framework CoreFoundation -framework Carbon -framework IOKit -L/usr/lib")

set(MACOSX_BUNDLE_ICON_FILE iridium.icns)
Expand All @@ -260,8 +271,8 @@ elseif (UNIX)
set(RELEASE_FLAGS "-Wno-uninitialized -Wno-deprecated-declarations")
else(APPLE)
set(PLATFORM_DIR Linux)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes -std=c++11")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes -std=c11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes -std=c17")
endif (APPLE)
endif ()

Expand Down Expand Up @@ -295,7 +306,7 @@ target_link_libraries(${PROJECT_NAME} rocksdb ${Boost_LIBRARIES} ${QTMAIN} ${CRY

if (APPLE)
set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/Platform/OSX/MacOSXBundleInfo.plist.in)
find_package(Qt5PrintSupport REQUIRED)
find_package(Qt5 COMPONENTS PrintSupport REQUIRED)
target_link_libraries(${PROJECT_NAME} Qt5::PrintSupport)
elseif (UNIX)
target_link_libraries(${PROJECT_NAME} -lpthread)
Expand All @@ -314,6 +325,8 @@ message(STATUS "Version : ${VERSION}")
message(STATUS "Revision : ${GIT_REVISION}")
message(STATUS "Portable : ${PORTABLE}" )
message(STATUS "----------------------------------------------------------")
message(STATUS "C Flags ${CMAKE_C_FLAGS_RELEASE}")
message(STATUS "CXX Flags ${CMAKE_CXX_FLAGS_RELEASE}")
configure_file("cryptonote/src/version.h.in" "version.h")
configure_file("cryptonote/src/version.h.in" ${CMAKE_SOURCE_DIR}/src/version.h)
configure_file("src/CryptoNoteWalletConfig.h.in" "CryptoNoteWalletConfig.h")
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ $ make
```
* Cmake complain not finding Qt libs : specify your Qt installation path :
```
-DBOOST_ROOT="Your_Qt_root_path"
-DCMAKE_PREFIX_PATH="Your_Qt_root_path"
```
* Your Processor is quiet old and doesn't support aes or avx :
```
Expand Down
2 changes: 1 addition & 1 deletion cryptonote
2 changes: 1 addition & 1 deletion externals/QR-Code-generator
Submodule QR-Code-generator updated 64 files
+27 −150 Readme.markdown
+8 −9 c/Makefile
+70 −0 c/Readme.markdown
+25 −1 c/qrcodegen-demo.c
+134 −107 c/qrcodegen-test.c
+0 −114 c/qrcodegen-worker.c
+160 −147 c/qrcodegen.c
+16 −16 c/qrcodegen.h
+0 −52 cpp/BitBuffer.hpp
+9 −10 cpp/Makefile
+37 −5 cpp/QrCodeGeneratorDemo.cpp
+0 −100 cpp/QrCodeGeneratorWorker.cpp
+0 −225 cpp/QrSegment.cpp
+0 −216 cpp/QrSegment.hpp
+61 −0 cpp/Readme.markdown
+358 −173 cpp/qrcodegen.cpp
+239 −69 cpp/qrcodegen.hpp
+65 −0 java-fast/Readme.markdown
+134 −0 java-fast/io/nayuki/fastqrcodegen/BitBuffer.java
+57 −0 java-fast/io/nayuki/fastqrcodegen/DataTooLongException.java
+95 −0 java-fast/io/nayuki/fastqrcodegen/Memoizer.java
+595 −0 java-fast/io/nayuki/fastqrcodegen/QrCode.java
+255 −0 java-fast/io/nayuki/fastqrcodegen/QrCodeGeneratorDemo.java
+338 −0 java-fast/io/nayuki/fastqrcodegen/QrSegment.java
+424 −0 java-fast/io/nayuki/fastqrcodegen/QrSegmentAdvanced.java
+270 −0 java-fast/io/nayuki/fastqrcodegen/QrTemplate.java
+106 −0 java-fast/io/nayuki/fastqrcodegen/ReedSolomonGenerator.java
+52 −0 java-fast/io/nayuki/fastqrcodegen/package-info.java
+103 −22 java/QrCodeGeneratorDemo.java
+65 −0 java/Readme.markdown
+45 −4 java/pom.xml
+3 −3 java/src/main/java/io/nayuki/qrcodegen/DataTooLongException.java
+156 −251 java/src/main/java/io/nayuki/qrcodegen/QrCode.java
+0 −101 java/src/main/java/io/nayuki/qrcodegen/QrCodeGeneratorWorker.java
+43 −23 java/src/main/java/io/nayuki/qrcodegen/QrSegment.java
+16 −8 java/src/main/java/io/nayuki/qrcodegen/QrSegmentAdvanced.java
+5 −4 java/src/main/java/io/nayuki/qrcodegen/package-info.java
+5 −17 java/src/main/java/module-info.java
+0 −166 javascript/qrcodegen-demo.js
+0 −129 javascript/qrcodegen-js-demo.html
+0 −1,046 javascript/qrcodegen.js
+53 −0 python/Readme.markdown
+0 −136 python/qrcodegen-batch-test.py
+42 −23 python/qrcodegen-demo.py
+0 −85 python/qrcodegen-worker.py
+329 −335 python/qrcodegen.py
+0 −2 python/setup.cfg
+13 −17 python/setup.py
+8 −0 rust-no-heap/Cargo.toml
+71 −0 rust-no-heap/Readme.markdown
+267 −0 rust-no-heap/examples/qrcodegen-demo.rs
+1,453 −0 rust-no-heap/src/lib.rs
+2 −1 rust/Cargo.toml
+31 −24 rust/Readme.markdown
+45 −23 rust/examples/qrcodegen-demo.rs
+0 −114 rust/examples/qrcodegen-worker.rs
+335 −367 rust/src/lib.rs
+56 −0 typescript-javascript/Readme.markdown
+25 −0 typescript-javascript/build.sh
+156 −0 typescript-javascript/qrcodegen-input-demo.html
+54 −6 typescript-javascript/qrcodegen-input-demo.ts
+65 −0 typescript-javascript/qrcodegen-output-demo.html
+240 −0 typescript-javascript/qrcodegen-output-demo.ts
+213 −270 typescript-javascript/qrcodegen.ts
14 changes: 7 additions & 7 deletions src/Gui/Common/AboutDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>600</width>
<height>390</height>
<width>680</width>
<height>480</height>
</rect>
</property>
<property name="sizePolicy">
Expand All @@ -18,14 +18,14 @@
</property>
<property name="minimumSize">
<size>
<width>600</width>
<height>390</height>
<width>680</width>
<height>480</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>600</width>
<height>390</height>
<width>680</width>
<height>480</height>
</size>
</property>
<property name="windowTitle">
Expand All @@ -41,7 +41,7 @@
</sizepolicy>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Iridium version %1-%2&lt;/p&gt;&lt;p&gt;Iridium is the next generation anonymous cryptocurrency based on CryptoNote.&lt;br/&gt;Copyright © 2012-%3 The Iridium developers&lt;br/&gt;This is free software. &lt;/p&gt;&lt;p&gt;Website : &lt;a href=&quot;https://ird.cash&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;https://ird.cash&lt;/span&gt;&lt;/a&gt;&lt;br/&gt;Facebook : &lt;a href=&quot;https://www.facebook.com/IridiumCoin&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;https://www.facebook.com/IridiumCoin&lt;/span&gt;&lt;/a&gt;&lt;br/&gt;Twitter : &lt;a href=&quot;https://twitter.com/iridium_project&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;https://twitter.com/iridium_project&lt;/span&gt;&lt;/a&gt;&lt;br/&gt;Discord : &lt;a href=&quot;https://discord.gg/xU85tpS&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;https://discord.gg/xU85tpS&lt;/span&gt;&lt;/a&gt;&lt;br/&gt;Telegram announcments : &lt;a href=&quot;https://t.me/joinchat/AAAAAFFYZHXzOQkDvsP0gQ&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;https://t.me/joinchat/AAAAAFFYZHXzOQkDvsP0gQ&lt;/span&gt;&lt;/a&gt;&lt;br/&gt;Telegram public chat : &lt;a href=&quot;https://t.me/joinchat/GizWw0sK9LW8DAu4hAeWnA&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;https://t.me/joinchat/GizWw0sK9LW8DAu4hAeWnA&lt;/span&gt;&lt;/a&gt;&lt;br/&gt;Reddit : &lt;a href=&quot;https://www.reddit.com/r/Iridium_IRD&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;https://www.reddit.com/r/Iridium_IRD&lt;/span&gt;&lt;/a&gt;&lt;br/&gt;BTT : &lt;a href=&quot;https://bitcointalk.org/index.php?topic=2150442.0;all&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;https://bitcointalk.org/index.php?topic=2150442.0;all&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;Distributed under the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;Distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details: &lt;/span&gt;&lt;a href=&quot;https://www.gnu.org/licenses/lgpl.html&quot;&gt;&lt;span style=&quot; font-size:11pt; text-decoration: underline; color:#007af4;&quot;&gt;https://www.gnu.org/licenses/lgpl.html&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:x-large; font-weight:700;&quot;&gt;Iridium (IRD) : The Community Cryptocurrency&lt;/span&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:15px;&quot;&gt;An anonymous, privacy-friendly, fairly-mined cryptocurrency with low-supply,high-availability, best-in-class security and an enthusiastic community.&lt;/span&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Official Website : &lt;a href=&quot;https://ird.cash&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;https://www.ird.cash&lt;br/&gt;&lt;/span&gt;&lt;/a&gt;Discord : &lt;a href=&quot;https://discord.gg/xU85tpS&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;https://discord.gg/xU85tpS&lt;br/&gt;&lt;/span&gt;&lt;/a&gt;Telegram announcements : &lt;a href=&quot;https://t.me/joinchat/AAAAAFFYZHXzOQkDvsP0gQ&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;https://t.me/joinchat/AAAAAFFYZHXzOQkDvsP0gQ&lt;/span&gt;&lt;/a&gt;&lt;br/&gt;Telegram Public Chat : &lt;a href=&quot;https://t.me/joinchat/GizWw0sK9LW8DAu4hAeWnA&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;https://t.me/joinchat/GizWw0sK9LW8DAu4hAeWnA&lt;/span&gt;&lt;/a&gt;&lt;a href=&quot;https://discord.gg/xU85tpS&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;/a&gt;Twitter : &lt;a href=&quot;https://twitter.com/iridium_project&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;https://twitter.com/IridiumCash&lt;/span&gt;&lt;/a&gt;&lt;br/&gt;Facebook : &lt;a href=&quot;https://www.facebook.com/IridiumCash&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;https://www.facebook.com/IridiumCash&lt;/span&gt;&lt;/a&gt;&lt;br/&gt;Reddit : &lt;a href=&quot;https://www.reddit.com/r/Iridium_IRD&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;https://www.reddit.com/r/&lt;/span&gt;&lt;/a&gt;&lt;a href=&quot;https://twitter.com/iridium_project&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;IridiumCash&lt;/span&gt;&lt;/a&gt;&lt;br/&gt;BitcoinTalk : &lt;a href=&quot;https://bitcointalk.org/index.php?topic=2150442.0;all&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;https://bitcointalk.org/index.php?topic=2150442.0;all&lt;br/&gt;&lt;/span&gt;&lt;/a&gt;&lt;br/&gt;&lt;span style=&quot; font-size:9pt;&quot;&gt;Distributed under the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. Distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details: &lt;/span&gt;&lt;a href=&quot;https://www.gnu.org/licenses/lgpl.html&quot;&gt;&lt;span style=&quot; font-size:9pt; text-decoration: underline; color:#007af4;&quot;&gt;https://www.gnu.org/licenses/lgpl.html&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;version %1-%2 - Copyright © 2012-%3 The Iridium developers&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
Expand Down
48 changes: 21 additions & 27 deletions src/Gui/Common/KeyDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@
</size>
</property>
<property name="font">
<font>
<family>Courier</family>
</font>
<font/>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
Expand All @@ -133,7 +131,7 @@
</property>
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;meta charset=&quot;utf-8&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Courier'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Monaco';&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
Expand Down Expand Up @@ -164,14 +162,14 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item>
<widget class="QLabel" name="m_spendLabel">
<widget class="QLabel" name="m_viewLabel">
<property name="text">
<string>Spend key</string>
<string>Public key</string>
</property>
</widget>
</item>
<item>
<widget class="QTextEdit" name="m_spendKey">
<widget class="QTextEdit" name="m_viewKey">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
Expand All @@ -191,31 +189,29 @@ p, li { white-space: pre-wrap; }
</size>
</property>
<property name="font">
<font>
<family>Courier</family>
</font>
<font/>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;meta charset=&quot;utf-8&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Courier'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'.SF NS Text';&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="m_viewLabel">
<widget class="QLabel" name="m_spendLabel">
<property name="text">
<string>View key</string>
<string>Spend key</string>
</property>
</widget>
</item>
<item>
<widget class="QTextEdit" name="m_viewKey">
<widget class="QTextEdit" name="m_spendKey">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
Expand All @@ -229,9 +225,7 @@ p, li { white-space: pre-wrap; }
</size>
</property>
<property name="font">
<font>
<family>Courier</family>
</font>
<font/>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
Expand Down Expand Up @@ -314,16 +308,21 @@ p, li { white-space: pre-wrap; }
</layout>
</widget>
<customwidgets>
<customwidget>
<class>WalletGui::WalletOkButton</class>
<extends>QPushButton</extends>
<header>Gui/Common/WalletOkButton.h</header>
</customwidget>
<customwidget>
<class>WalletGui::WalletSmallGrayTextLabel</class>
<extends>QLabel</extends>
<header>Gui/Common/WalletTextLabel.h</header>
</customwidget>
<customwidget>
<class>WalletGui::WalletSmallButton</class>
<extends>QPushButton</extends>
<header>Gui/Common/WalletSmallButton.h</header>
</customwidget>
<customwidget>
<class>WalletGui::WalletOkButton</class>
<extends>QPushButton</extends>
<header>Gui/Common/WalletOkButton.h</header>
</customwidget>
<customwidget>
<class>WalletGui::WalletCancelButton</class>
<extends>QPushButton</extends>
Expand All @@ -334,11 +333,6 @@ p, li { white-space: pre-wrap; }
<extends>QPushButton</extends>
<header>Gui/Common/WalletBlueButton.h</header>
</customwidget>
<customwidget>
<class>WalletGui::WalletSmallButton</class>
<extends>QPushButton</extends>
<header>Gui/Common/WalletSmallButton.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../../resources.qrc"/>
Expand Down
33 changes: 29 additions & 4 deletions src/Gui/Common/QRCodeDialog.cpp
Original file line number Diff line number Diff line change
@@ -1,24 +1,49 @@
#include "QRCodeDialog.h"
#include "QrCode.hpp"
#include "qrcodegen.hpp"
#include <QSvgWidget>
#include "ui_qrcodedialog.h"

#include <iostream>
#include <string>
#include <sstream>

using namespace qrcodegen;

namespace WalletGui {

// generate svg qrcode from a string

std::string QRCodeDialog::toSvgString(QrCode qr) const {
std::ostringstream sb;
int size = qr.getSize();
const int border = 2;

sb << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
sb << "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n";
sb << "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 ";
sb << (size + border * 2) << " " << (size + border * 2) << "\" stroke=\"none\">\n";
sb << "\t<rect width=\"100%\" height=\"100%\" fill=\"#FFFFFF\"/>\n";
sb << "\t<path d=\"";
for (int y = 0; y < size; y++) {
for (int x = 0; x < size; x++) {
if (qr.getModule(x, y)) {
if (x != 0 || y != 0)
sb << " ";
sb << "M" << (x + border) << "," << (y + border) << "h1v1h-1z";
}
}
}
sb << "\" fill=\"#000000\"/>\n";
sb << "</svg>\n";
return sb.str();
}

QRCodeDialog::QRCodeDialog(const QString& _title, const char* _stringToEncode, QWidget* _parent) : QDialog(_parent, static_cast<Qt::WindowFlags>(Qt::WindowCloseButtonHint)),
m_ui(new Ui::QRCodeDialog) {
QSvgWidget* svgWidget(new QSvgWidget(this));
// setWindowTitle(_title);
m_ui->setupUi(this);
m_ui->m_qrLabel->setText(_title);
QrCode qr0 = QrCode::encodeText(_stringToEncode, QrCode::Ecc::QUARTILE);
m_svg = qr0.toSvgString(4);
m_svg = toSvgString(QrCode::encodeText(_stringToEncode, QrCode::Ecc::QUARTILE));
svgWidget->load(QByteArray(m_svg.c_str(),m_svg.length()));
svgWidget->setBaseSize(1000,1000);
svgWidget->setGeometry(0,0,500,500);
Expand Down
4 changes: 2 additions & 2 deletions src/Gui/Common/QRCodeDialog.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

#pragma once

#include <QDialog>
#include "QrCode.hpp"
#include "qrcodegen.hpp"

namespace Ui {
class QRCodeDialog;
Expand All @@ -24,6 +23,7 @@ class QRCodeDialog : public QDialog {
QScopedPointer<Ui::QRCodeDialog> m_ui;
std::string m_svg;
Q_SLOT void qrClicked();
std::string toSvgString(qrcodegen::QrCode qr0) const;
};

}
4 changes: 2 additions & 2 deletions src/Gui/MainWindow/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace {

const int MAX_RECENT_WALLET_COUNT = 10;
const char COMMUNITY_FORUM_URL[] = "https://discord.gg/xU85tpS";
const char REPORT_ISSUE_URL[] = "https://github.com/iridiumdev/iridium-wallet/issues";
const char REPORT_ISSUE_URL[] = "https://github.com/iridiumdev/Iridium-IRD-wallet/issues";

const char DONATION_URL_DONATION_TAG[] = "donation";
const char DONATION_URL_LABEL_TAG[] = "label";
Expand Down Expand Up @@ -368,7 +368,7 @@ void MainWindow::setOpenedState() {
m_ui->m_overviewFrame->show();

m_ui->m_overviewButton->setChecked(true);
m_ui->m_blockExplorerButton->setEnabled(m_cryptoNoteAdapter->getNodeAdapter()->getBlockChainExplorerAdapter() != nullptr);
m_ui->m_blockExplorerButton->setVisible(m_cryptoNoteAdapter->getNodeAdapter()->getBlockChainExplorerAdapter() != nullptr);
}

void MainWindow::setClosedState() {
Expand Down
Loading