mirror of
https://github.com/feather-wallet/feather.git
synced 2024-11-17 01:37:53 +00:00
Merge pull request 'Windows: write to console' (#191) from tobtoht/feather:windows_console_output into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/191
This commit is contained in:
commit
58af196f84
1 changed files with 11 additions and 0 deletions
11
src/main.cpp
11
src/main.cpp
|
@ -14,6 +14,10 @@
|
||||||
|
|
||||||
#include <QtPlugin>
|
#include <QtPlugin>
|
||||||
|
|
||||||
|
#if defined(Q_OS_WIN)
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(Q_OS_LINUX) && defined(STATIC)
|
#if defined(Q_OS_LINUX) && defined(STATIC)
|
||||||
Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)
|
Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)
|
||||||
#endif
|
#endif
|
||||||
|
@ -32,6 +36,13 @@ int main(int argc, char *argv[])
|
||||||
Q_INIT_RESOURCE(assets_mining);
|
Q_INIT_RESOURCE(assets_mining);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
if (AttachConsole(ATTACH_PARENT_PROCESS)) {
|
||||||
|
freopen("CONOUT$", "w", stdout);
|
||||||
|
freopen("CONOUT$", "w", stderr);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QStringList argv_;
|
QStringList argv_;
|
||||||
for(int i = 0; i != argc; i++){
|
for(int i = 0; i != argc; i++){
|
||||||
argv_ << QString::fromStdString(argv[i]);
|
argv_ << QString::fromStdString(argv[i]);
|
||||||
|
|
Loading…
Reference in a new issue