Merge pull request #2666 from patricklodder/1.14.5-qt-discard-args
Give QApplication dummy arguments
This commit is contained in:
commit
0e917fcf1b
|
@ -197,7 +197,7 @@ class BitcoinApplication: public QApplication
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit BitcoinApplication(int &argc, char **argv);
|
explicit BitcoinApplication();
|
||||||
~BitcoinApplication();
|
~BitcoinApplication();
|
||||||
|
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
|
@ -312,8 +312,11 @@ void BitcoinCore::shutdown()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BitcoinApplication::BitcoinApplication(int &argc, char **argv):
|
static int qt_argc = 1;
|
||||||
QApplication(argc, argv),
|
static const char* qt_argv = "dogecoin-qt";
|
||||||
|
|
||||||
|
BitcoinApplication::BitcoinApplication():
|
||||||
|
QApplication(qt_argc, const_cast<char **>(&qt_argv)),
|
||||||
coreThread(0),
|
coreThread(0),
|
||||||
optionsModel(0),
|
optionsModel(0),
|
||||||
clientModel(0),
|
clientModel(0),
|
||||||
|
@ -550,7 +553,7 @@ int main(int argc, char *argv[])
|
||||||
Q_INIT_RESOURCE(bitcoin);
|
Q_INIT_RESOURCE(bitcoin);
|
||||||
Q_INIT_RESOURCE(bitcoin_locale);
|
Q_INIT_RESOURCE(bitcoin_locale);
|
||||||
|
|
||||||
BitcoinApplication app(argc, argv);
|
BitcoinApplication app;
|
||||||
#if QT_VERSION > 0x050100
|
#if QT_VERSION > 0x050100
|
||||||
// Generate high-dpi pixmaps
|
// Generate high-dpi pixmaps
|
||||||
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||||
|
|
|
@ -33,6 +33,9 @@ Q_IMPORT_PLUGIN(qkrcodecs)
|
||||||
|
|
||||||
extern void noui_connect();
|
extern void noui_connect();
|
||||||
|
|
||||||
|
static int qt_argc = 1;
|
||||||
|
static const char* qt_argv = "dogecoin-qt";
|
||||||
|
|
||||||
// This is all you need to run all the tests
|
// This is all you need to run all the tests
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
@ -46,7 +49,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
// Don't remove this, it's needed to access
|
// Don't remove this, it's needed to access
|
||||||
// QCoreApplication:: in the tests
|
// QCoreApplication:: in the tests
|
||||||
QCoreApplication app(argc, argv);
|
QCoreApplication app(qt_argc, const_cast<char **>(&qt_argv));
|
||||||
app.setApplicationName("Bitcoin-Qt-test");
|
app.setApplicationName("Bitcoin-Qt-test");
|
||||||
|
|
||||||
SSL_library_init();
|
SSL_library_init();
|
||||||
|
|
Loading…
Reference in a new issue