mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-02 11:04:00 +01:00
Merge pull request #1412 from nonlinear-chaos-order-etc/openssl
qt: disabled broken UPnP + small qt debugging tweaks
This commit is contained in:
commit
a2b8d468bc
4
qt/i2pd_qt/.gitignore
vendored
4
qt/i2pd_qt/.gitignore
vendored
|
@ -6,4 +6,6 @@ i2pd_qt
|
||||||
Makefile*
|
Makefile*
|
||||||
*.stash
|
*.stash
|
||||||
object_script.*
|
object_script.*
|
||||||
i2pd_qt_plugin_import.cpp
|
i2pd_qt_plugin_import.cpp
|
||||||
|
i2pd_qt.pro.autosave*
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
#include <QMutexLocker>
|
#include <QMutexLocker>
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
|
|
||||||
|
//#define DEBUG_WITH_DEFAULT_LOGGING (1)
|
||||||
|
|
||||||
namespace i2p
|
namespace i2p
|
||||||
{
|
{
|
||||||
namespace qt
|
namespace qt
|
||||||
|
@ -151,10 +153,16 @@ namespace qt
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
{
|
{
|
||||||
std::shared_ptr<std::iostream> logstreamptr=std::make_shared<std::stringstream>();
|
std::shared_ptr<std::iostream> logstreamptr=
|
||||||
|
#ifdef DEBUG_WITH_DEFAULT_LOGGING
|
||||||
|
nullptr
|
||||||
|
#else
|
||||||
|
std::make_shared<std::stringstream>()
|
||||||
|
#endif
|
||||||
|
;
|
||||||
//TODO move daemon init deinit to a bg thread
|
//TODO move daemon init deinit to a bg thread
|
||||||
DaemonQTImpl daemon;
|
DaemonQTImpl daemon;
|
||||||
(*logstreamptr) << "Initialising the daemon..." << std::endl;
|
if(logstreamptr) (*logstreamptr) << "Initialising the daemon..." << std::endl;
|
||||||
bool daemonInitSuccess = daemon.init(argc, argv, logstreamptr);
|
bool daemonInitSuccess = daemon.init(argc, argv, logstreamptr);
|
||||||
if(!daemonInitSuccess)
|
if(!daemonInitSuccess)
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,7 +5,12 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||||
TARGET = i2pd_qt
|
TARGET = i2pd_qt
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
QMAKE_CXXFLAGS *= -std=c++11 -Wno-unused-parameter -Wno-maybe-uninitialized
|
QMAKE_CXXFLAGS *= -std=c++11 -Wno-unused-parameter -Wno-maybe-uninitialized
|
||||||
DEFINES += USE_UPNP
|
|
||||||
|
# For now, disable UPnP which currently crashes on Stop() -- https://github.com/PurpleI2P/i2pd/issues/1387
|
||||||
|
#DEFINES += USE_UPNP
|
||||||
|
DEFINES -= USE_UPNP
|
||||||
|
|
||||||
|
debug: DEFINES += DEBUG_WITH_DEFAULT_LOGGING
|
||||||
|
|
||||||
SOURCES += DaemonQT.cpp mainwindow.cpp \
|
SOURCES += DaemonQT.cpp mainwindow.cpp \
|
||||||
../../libi2pd/api.cpp \
|
../../libi2pd/api.cpp \
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace logviewer {
|
||||||
|
|
||||||
QString Worker::pollAndShootATimerForInfiniteRetries() {
|
QString Worker::pollAndShootATimerForInfiniteRetries() {
|
||||||
std::shared_ptr<std::iostream> logStream=logViewerManager.getLogStream();
|
std::shared_ptr<std::iostream> logStream=logViewerManager.getLogStream();
|
||||||
assert(logStream!=nullptr);
|
if(!logStream)return "";
|
||||||
std::streamsize MAX_SZ=64*1024;
|
std::streamsize MAX_SZ=64*1024;
|
||||||
char*buf=(char*)malloc(MAX_SZ*sizeof(char));
|
char*buf=(char*)malloc(MAX_SZ*sizeof(char));
|
||||||
if(buf==nullptr)return "";
|
if(buf==nullptr)return "";
|
||||||
|
|
Loading…
Reference in a new issue