Skip to content

Commit

Permalink
Merge pull request #56 from HTHcoin/code-clean-up
Browse files Browse the repository at this point in the history
Code clean up
  • Loading branch information
MichaelHDesigns authored May 18, 2020
2 parents 078b783 + 0b377a7 commit b537da2
Show file tree
Hide file tree
Showing 25 changed files with 588 additions and 85 deletions.
5 changes: 3 additions & 2 deletions contrib/dash-qt.pro
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ FORMS += \
../src/qt/forms/openuridialog.ui \
../src/qt/forms/optionsdialog.ui \
../src/qt/forms/overviewpage.ui \
../src/qt/forms/overviewapage.ui \
../src/qt/forms/receivecoinsdialog.ui \
../src/qt/forms/receiverequestdialog.ui \
../src/qt/forms/sendcoinsdialog.ui \
Expand All @@ -23,4 +22,6 @@ FORMS += \
RESOURCES += \
../src/qt/dash.qrc

CONFIG+=c++11
CONFIG += c++11


1 change: 1 addition & 0 deletions libhelpthehomelessconsensus.pc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
prefix=/home/devilking6105/Help-The-Homeless-Coin-0.14/depends/x86_64-w64-mingw32

exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -714,4 +714,4 @@ moc_%.cpp: %.h
%.qm: %.ts
@test -f $(LRELEASE)
@$(MKDIR_P) $(@D)
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LRELEASE) -silent $< -qm $@
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LRELEASE) -silent $< -qm $@
10 changes: 10 additions & 0 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@ class CMainParams : public CChainParams {
consensus.devAddress = "hWrjjP7w4iE5tezxDG3jD7xCTmikw3Kgoy";
consensus.devAddressPubKey = "b027849d3febd03af8063fc9f1f1226fbe3eb74c";
consensus.nDevelopersFeeBegin = 250;

/* consensus.FoundationAddress = "BB2BwSbDCqCqNsfc7FgWFJn4sRgnUt4tsM";
consensus.FoundationPODSAddress = "BScSypUZVEEY4TMz1ehyyPcS5wrnMM7WPB";
consensus.FoundationQTAddress = "BDcNYc8tGXmwD7QmLXbR1rk1qteTDVEjUD";
consensus.BurnAddress = "B4T5ciTCkWauSqVAcVKy88ofjcSasUkSYU"; */

consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 1544655600;
Expand Down Expand Up @@ -410,6 +415,11 @@ class CTestNetParams : public CChainParams {
consensus.devAddress = "yUDp1tj5hnnVYaZxpA94k2ZyDiG3hD46it";
consensus.devAddressPubKey = "56b02e0c24998c6d27a7603cc17be9cd62643825";
consensus.nDevelopersFeeBegin = 250;

consensus.FoundationAddress = "yg7cUN19J8puigMMXfhv193S92EiSNe3Ag";
consensus.FoundationPODSAddress = "ycGfUKh4itBzi4EGj2W8gxSEbLUGJqLFBZ";
consensus.FoundationQTAddress = "yeKHKjBRDpcz6Ec8pHQhQXpkszJLp9ykMo";
consensus.BurnAddress = "yTQvV7JLSpjtUXteGGaR3SXKV5tRqe9U1e";

consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 1199145601; // January 1, 2008
Expand Down
6 changes: 6 additions & 0 deletions src/consensus/params.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ struct Params {
const char *devAddress;
const char *devAddressPubKey;
int nDevelopersFeeBegin;

std::string FoundationAddress;
std::string FoundationPODSAddress;
std::string FoundationQTAddress;
std::string BurnAddress;

/** Block height and hash at which BIP34 becomes active */
int BIP34Height;
uint256 BIP34Hash;
Expand Down
1 change: 1 addition & 0 deletions src/masternode-payments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ bool IsBlockPayeeValid(const CTransaction& txNew, int nBlockHeight, CAmount bloc
return true;
}


// superblocks started
// SEE IF THIS IS A VALID SUPERBLOCK

Expand Down
54 changes: 49 additions & 5 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ void BitcoinGUI::createActions()
sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2));
#endif
tabGroup->addAction(sendCoinsAction);

sendCoinsMenuAction = new QAction(QIcon(":/icons/" + theme + "/send"), sendCoinsAction->text(), this);
sendCoinsMenuAction->setStatusTip(sendCoinsAction->statusTip());
sendCoinsMenuAction->setToolTip(sendCoinsMenuAction->statusTip());
Expand All @@ -448,6 +448,7 @@ void BitcoinGUI::createActions()
receiveCoinsMenuAction = new QAction(QIcon(":/icons/" + theme + "/receiving_addresses"), receiveCoinsAction->text(), this);
receiveCoinsMenuAction->setStatusTip(receiveCoinsAction->statusTip());
receiveCoinsMenuAction->setToolTip(receiveCoinsMenuAction->statusTip());


historyAction = new QAction(QIcon(":/icons/" + theme + "/history"), tr("&Transactions"), this);
historyAction->setStatusTip(tr("Browse transaction history"));
Expand Down Expand Up @@ -576,7 +577,7 @@ void BitcoinGUI::createActions()
openGraphAction->setEnabled(false);
openPeersAction->setEnabled(false);
openRepairAction->setEnabled(false);

usedSendingAddressesAction = new QAction(QIcon(":/icons/" + theme + "/address-book"), tr("&Sending addresses..."), this);
usedSendingAddressesAction->setStatusTip(tr("Show the list of used sending addresses and labels"));
usedReceivingAddressesAction = new QAction(QIcon(":/icons/" + theme + "/address-book"), tr("&Receiving addresses..."), this);
Expand All @@ -592,15 +593,16 @@ void BitcoinGUI::createActions()
showPrivateSendHelpAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&PrivateSend information"), this);
showPrivateSendHelpAction->setMenuRole(QAction::NoRole);
showPrivateSendHelpAction->setStatusTip(tr("Show the PrivateSend basic information"));



connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked()));
connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
connect(optionsAction, SIGNAL(triggered()), this, SLOT(optionsClicked()));
connect(toggleHideAction, SIGNAL(triggered()), this, SLOT(toggleHidden()));
connect(showHelpMessageAction, SIGNAL(triggered()), this, SLOT(showHelpMessageClicked()));
connect(showPrivateSendHelpAction, SIGNAL(triggered()), this, SLOT(showPrivateSendHelpClicked()));

// Jump directly to tabs in RPC-console
connect(openInfoAction, SIGNAL(triggered()), this, SLOT(showInfo()));
connect(openRPCConsoleAction, SIGNAL(triggered()), this, SLOT(showConsole()));
Expand Down Expand Up @@ -688,8 +690,10 @@ void BitcoinGUI::createMenuBar()
tools->addSeparator();
tools->addAction(openConfEditorAction);
tools->addAction(showBackupsAction);

}


QMenu *help = appMenuBar->addMenu(tr("&Help"));
help->addAction(showHelpMessageAction);
help->addAction(showPrivateSendHelpAction);
Expand All @@ -710,6 +714,7 @@ void BitcoinGUI::createToolBars()
toolbar->addAction(receiveCoinsAction);
toolbar->addAction(historyAction);
toolbar->addAction(overviewaAction);


QSettings settings;
if (!fLiteMode && settings.value("fShowMasternodesTab").toBool() && masternodeAction)
Expand Down Expand Up @@ -878,6 +883,7 @@ void BitcoinGUI::setWalletActionsEnabled(bool enabled)
usedSendingAddressesAction->setEnabled(enabled);
usedReceivingAddressesAction->setEnabled(enabled);
openAction->setEnabled(enabled);

}

void BitcoinGUI::createTrayIcon(const NetworkStyle *networkStyle)
Expand Down Expand Up @@ -1018,7 +1024,6 @@ void BitcoinGUI::openClicked()
}
}


void BitcoinGUI::gotoGovernancePage()
{
governanceAction->setChecked(true);
Expand Down Expand Up @@ -1433,6 +1438,7 @@ void BitcoinGUI::dragEnterEvent(QDragEnterEvent *event)
// Accept only URIs
if(event->mimeData()->hasUrls())
event->acceptProposedAction();

}

void BitcoinGUI::dropEvent(QDropEvent *event)
Expand Down Expand Up @@ -1570,6 +1576,44 @@ void BitcoinGUI::detectShutdown()
}
}


// Governance - Check to see if we should submit a proposal
/* nProposalModulus++;
if (nProposalModulus % 15 == 0 && !fLoadingIndex)
{
nProposalModulus = 0;
if (!msURL.empty())
{
QString qNav = GUIUtil::TOQS(msURL);
msURL = std::string();
QDesktopServices::openUrl(QUrl(qNav));
}
if (fProposalNeedsSubmitted)
{
nProposalModulus = 0;
if(masternodeSync.IsSynced() && chainActive.Tip() && chainActive.Tip()->nHeight > (nProposalPrepareHeight + 6))
{
fProposalNeedsSubmitted = false;
std::string sError;
std::string sGovObj;
bool fSubmitted = SubmitProposalToNetwork(uTxIdFee, nProposalStartTime, msProposalHex, sError, sGovObj);
if (!sError.empty())
{
LogPrintf("Proposal Submission Problem: %s ", sError);
}
msProposalResult = fSubmitted ? "Submitted Proposal Successfully <br>( " + sGovObj + " )" : sError;
LogPrintf(" Proposal Submission Result: %s \n", msProposalResult.c_str());
}
else
{
msProposalResult = "Waiting for block " + RoundToString(nProposalPrepareHeight + 6, 0) + " to submit pending proposal. ";
}
}
}
} */


void BitcoinGUI::showProgress(const QString &title, int nProgress)
{
if (nProgress == 0)
Expand Down
3 changes: 3 additions & 0 deletions src/qt/bitcoingui.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#endif

#include "amount.h"
#include "governancelist.h"

#include <QLabel>
#include <QMainWindow>
Expand Down Expand Up @@ -135,6 +136,7 @@ class BitcoinGUI : public QMainWindow
QAction *openAction;
QAction *showHelpMessageAction;
QAction *showPrivateSendHelpAction;


QSystemTrayIcon *trayIcon;
QMenu *trayIconMenu;
Expand Down Expand Up @@ -226,6 +228,7 @@ public Q_SLOTS:

private Q_SLOTS:
#ifdef ENABLE_WALLET


/** Switch to masternode page */
void gotoGovernancePage();
Expand Down
1 change: 1 addition & 0 deletions src/qt/clientmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ int ClientModel::getNumConnections(unsigned int flags) const
return 0;
}


void ClientModel::setMasternodeList(const CDeterministicMNList& mnList)
{
LOCK(cs_mnlinst);
Expand Down
2 changes: 1 addition & 1 deletion src/qt/clientmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class ClientModel : public QObject
void setMasternodeList(const CDeterministicMNList& mnList);
CDeterministicMNList getMasternodeList() const;
void refreshMasternodeList();

quint64 getTotalBytesRecv() const;
quint64 getTotalBytesSent() const;

Expand Down
4 changes: 1 addition & 3 deletions src/qt/forms/receivecoinsdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,6 @@
<tabstop>showRequestButton</tabstop>
<tabstop>removeRequestButton</tabstop>
</tabstops>
<resources>
<include location="../dash.qrc"/>
</resources>
<resources/>
<connections/>
</ui>
Loading

0 comments on commit b537da2

Please sign in to comment.