diff --git a/i2pd_qt.pro b/i2pd_qt.pro
index 4e5726a..77ce2ec 100644
--- a/i2pd_qt.pro
+++ b/i2pd_qt.pro
@@ -13,8 +13,9 @@ icons.files = contrib/icons/*
 linux:icons.path = /usr/share/icons/hicolor/
 
 TEMPLATE = app
-QMAKE_CXXFLAGS *= -Wno-unused-parameter -Wno-maybe-uninitialized -Wno-deprecated-copy
-CONFIG += strict_c++ c++17
+
+# C++17 required for i2pd headers (constexpr, auto, brace-init, etc.)
+QMAKE_CXXFLAGS += -std=c++17 -Wno-unused-parameter @CXX_FLAGS@
 
 # suppress OpenSSL deprecation warnings
 DEFINES += OPENSSL_SUPPRESS_DEPRECATED
@@ -54,14 +55,14 @@ SOURCES += \
     src/Saver.cpp \
     src/DelayedSaveManagerImpl.cpp \
     src/SaverImpl.cpp \
+    src/AboutDialog.cpp \
+    src/I2pdQtUtil.cpp \
     src/i2pd/daemon/Daemon.cpp \
     src/i2pd/daemon/HTTPServer.cpp \
-    src/i2pd/daemon/I2PControlHandlers.cpp \
     src/i2pd/daemon/I2PControl.cpp \
-    src/i2pd/daemon/i2pd.cpp \
+    src/i2pd/daemon/I2PControlHandlers.cpp \
     src/i2pd/daemon/UPnP.cpp \
-    src/AboutDialog.cpp \
-    src/I2pdQtUtil.cpp
+    src/i2pd/daemon/i2pd.cpp
 
 HEADERS += \
     src/DaemonQT.h \
@@ -83,11 +84,6 @@ HEADERS += \
     src/Saver.h \
     src/DelayedSaveManagerImpl.h \
     src/SaverImpl.h \
-    src/i2pd/daemon/Daemon.h \
-    src/i2pd/daemon/HTTPServer.h \
-    src/i2pd/daemon/I2PControlHandlers.h \
-    src/i2pd/daemon/I2PControl.h \
-    src/i2pd/daemon/UPnP.h \
     src/AboutDialog.h \
     src/BuildDateTimeQt.h \
     src/I2pdQtUtil.h \
@@ -107,23 +107,9 @@ FORMS += \
     src/generalsettingswidget.ui \
     src/AboutDialog.ui
 
-LIBS += $$PWD/src/i2pd/libi2pd.a $$PWD/src/i2pd/libi2pdclient.a $$PWD/src/i2pd/libi2pdlang.a -lz
-
-# doing that way due to race condition made by make
-i2pd_client.commands = cd $$PWD/src/i2pd/ && mkdir -p obj/libi2pd obj/libi2pd_client obj/i18n && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) USE_UPNP=yes $$I2PDMAKE mk_obj_dir api_client lang
-i2pd_client.target = $$PWD/src/i2pd/libi2pdclient.a
-i2pd_client.depends = i2pd FORCE
-
-i2pd.commands = cd $$PWD/src/i2pd/ && mkdir -p obj/libi2pd obj/libi2pd_client && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) USE_UPNP=yes $$I2PDMAKE mk_obj_dir api
-i2pd.target += $$PWD/src/i2pd/libi2pd.a
-i2pd.depends = FORCE
-
-cleani2pd.commands = cd $$PWD/src/i2pd/ && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) clean
-#cleani2pd.depends = clean
-
-PRE_TARGETDEPS += $$PWD/src/i2pd/libi2pd.a $$PWD/src/i2pd/libi2pdclient.a
-QMAKE_EXTRA_TARGETS += cleani2pd i2pd i2pd_client
-CLEAN_DEPS += cleani2pd
+# Use MacPorts i2pd libraries (not compiled, use pre-built from port)
+I2PDPREFIX = @PREFIX@
+LIBS += $$I2PDPREFIX/lib/libi2pd.a $$I2PDPREFIX/lib/libi2pdclient.a $$I2PDPREFIX/lib/libi2pdlang.a -lz
 
 BuildDateTimeQtTarget.target = $$PWD/src/BuildDateTimeQt.h
 BuildDateTimeQtTarget.depends = FORCE
@@ -137,17 +123,22 @@ DEFINES += VCS_COMMIT_INFO="\\\"git:$(shell git -C \""$$_PRO_FILE_PWD_"\" descri
 
 macx {
 	message("using mac os x target")
-	BREWROOT=/usr/local
-	BOOSTROOT=$$BREWROOT/opt/boost
-	SSLROOT=$$BREWROOT/opt/libressl
-	UPNPROOT=$$BREWROOT/opt/miniupnpc
+	# Use our Boost
+	BOOSTVER = @BOOST_V@
+	BOOSTROOT = $$I2PDPREFIX/libexec/boost/$$BOOSTVER
+	BOOST_SUFFIX = -mt
+
+	# Use MacPorts OpenSSL and miniupnpc
+	SSLROOT = $$I2PDPREFIX
+	UPNPROOT = $$I2PDPREFIX
+
 	INCLUDEPATH += $$BOOSTROOT/include
 	INCLUDEPATH += $$SSLROOT/include
 	INCLUDEPATH += $$UPNPROOT/include
-	LIBS += $$SSLROOT/lib/libssl.a
-	LIBS += $$SSLROOT/lib/libcrypto.a
-	LIBS += $$BOOSTROOT/lib/libboost_program_options.a
-	LIBS += $$UPNPROOT/lib/libminiupnpc.a
+
+	LIBS += -L$$SSLROOT/lib -lssl -lcrypto
+	LIBS += -L$$BOOSTROOT/lib -lboost_system$$BOOST_SUFFIX -lboost_date_time$$BOOST_SUFFIX -lboost_filesystem$$BOOST_SUFFIX -lboost_program_options$$BOOST_SUFFIX
+	LIBS += -L$$UPNPROOT/lib -lminiupnpc
 	LIBS += -Wl,-dead_strip
 	LIBS += -Wl,-dead_strip_dylibs
 	LIBS += -Wl,-bind_at_load
diff --git a/src/BuildDateTimeQt.h b/src/BuildDateTimeQt.h
index 139e208..83f57ad 100644
--- a/src/BuildDateTimeQt.h
+++ b/src/BuildDateTimeQt.h
@@ -2,6 +2,6 @@
 #define BUILDDATETIMEQT_H
 
 #include <QString>
-const QString BUILD_DATE_TIME_QT = QStringLiteral(__DATE__ " " __TIME__);
+const QString BUILD_DATE_TIME_QT = QString::fromLatin1(__DATE__ " " __TIME__);
 
 #endif // BUILDDATETIMEQT_H
diff --git a/src/ClientTunnelPane.cpp b/src/ClientTunnelPane.cpp
index fbfa74c..1a61aa1 100644
--- a/src/ClientTunnelPane.cpp
+++ b/src/ClientTunnelPane.cpp
@@ -25,13 +25,13 @@ int ClientTunnelPane::appendClientTunnelForm(
     ClientTunnelPane& ui = *this;
 
     clientTunnelNameGroupBox = new QGroupBox(tunnelsFormGridLayoutWidget);
-    clientTunnelNameGroupBox->setObjectName(QStringLiteral("clientTunnelNameGroupBox"));
+    clientTunnelNameGroupBox->setObjectName(QString::fromLatin1("clientTunnelNameGroupBox"));
 
     //tunnel
     gridLayoutWidget_2 = new QWidget(clientTunnelNameGroupBox);
 
     QComboBox *tunnelTypeComboBox = new QComboBox(gridLayoutWidget_2);
-    tunnelTypeComboBox->setObjectName(QStringLiteral("tunnelTypeComboBox"));
+    tunnelTypeComboBox->setObjectName(QString::fromLatin1("tunnelTypeComboBox"));
     tunnelTypeComboBox->addItem("Client", i2p::client::I2P_TUNNELS_SECTION_TYPE_CLIENT);
     tunnelTypeComboBox->addItem("Socks", i2p::client::I2P_TUNNELS_SECTION_TYPE_SOCKS);
     tunnelTypeComboBox->addItem("Websocks", i2p::client::I2P_TUNNELS_SECTION_TYPE_WEBSOCKS);
@@ -69,12 +69,12 @@ int ClientTunnelPane::appendClientTunnelForm(
 
     //host
     ui.horizontalLayout_2 = new QHBoxLayout();
-    horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+    horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
     ui.destinationLabel = new QLabel(gridLayoutWidget_2);
-    destinationLabel->setObjectName(QStringLiteral("destinationLabel"));
+    destinationLabel->setObjectName(QString::fromLatin1("destinationLabel"));
     horizontalLayout_2->addWidget(destinationLabel);
     ui.destinationLineEdit = new QLineEdit(gridLayoutWidget_2);
-    destinationLineEdit->setObjectName(QStringLiteral("destinationLineEdit"));
+    destinationLineEdit->setObjectName(QString::fromLatin1("destinationLineEdit"));
     destinationLineEdit->setText(tunnelConfig->getdest().c_str());
     QObject::connect(destinationLineEdit, SIGNAL(textChanged(const QString &)),
                              this, SLOT(updated()));
@@ -90,12 +90,12 @@ int ClientTunnelPane::appendClientTunnelForm(
     {
         int port  = tunnelConfig->getport();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         ui.portLabel = new QLabel(gridLayoutWidget_2);
-        portLabel->setObjectName(QStringLiteral("portLabel"));
+        portLabel->setObjectName(QString::fromLatin1("portLabel"));
         horizontalLayout_2->addWidget(portLabel);
         ui.portLineEdit = new QLineEdit(gridLayoutWidget_2);
-        portLineEdit->setObjectName(QStringLiteral("portLineEdit"));
+        portLineEdit->setObjectName(QString::fromLatin1("portLineEdit"));
         portLineEdit->setText(QString::number(port));
         portLineEdit->setMaximumWidth(80);
         QObject::connect(portLineEdit, SIGNAL(textChanged(const QString &)),
@@ -111,12 +111,12 @@ int ClientTunnelPane::appendClientTunnelForm(
     {
         std::string keys  = tunnelConfig->getkeys();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         ui.keysLabel = new QLabel(gridLayoutWidget_2);
-        keysLabel->setObjectName(QStringLiteral("keysLabel"));
+        keysLabel->setObjectName(QString::fromLatin1("keysLabel"));
         horizontalLayout_2->addWidget(keysLabel);
         ui.keysLineEdit = new QLineEdit(gridLayoutWidget_2);
-        keysLineEdit->setObjectName(QStringLiteral("keysLineEdit"));
+        keysLineEdit->setObjectName(QString::fromLatin1("keysLineEdit"));
         keysLineEdit->setText(keys.c_str());
         QObject::connect(keysLineEdit, SIGNAL(textChanged(const QString &)),
                                  this, SLOT(updated()));
@@ -131,12 +131,12 @@ int ClientTunnelPane::appendClientTunnelForm(
     {
         std::string address  = tunnelConfig->getaddress();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         ui.addressLabel = new QLabel(gridLayoutWidget_2);
-        addressLabel->setObjectName(QStringLiteral("addressLabel"));
+        addressLabel->setObjectName(QString::fromLatin1("addressLabel"));
         horizontalLayout_2->addWidget(addressLabel);
         ui.addressLineEdit = new QLineEdit(gridLayoutWidget_2);
-        addressLineEdit->setObjectName(QStringLiteral("addressLineEdit"));
+        addressLineEdit->setObjectName(QString::fromLatin1("addressLineEdit"));
         addressLineEdit->setText(address.c_str());
         QObject::connect(addressLineEdit, SIGNAL(textChanged(const QString &)),
                                  this, SLOT(updated()));
@@ -153,12 +153,12 @@ int ClientTunnelPane::appendClientTunnelForm(
     {
         int destinationPort = tunnelConfig->getdestinationPort();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         ui.destinationPortLabel = new QLabel(gridLayoutWidget_2);
-        destinationPortLabel->setObjectName(QStringLiteral("destinationPortLabel"));
+        destinationPortLabel->setObjectName(QString::fromLatin1("destinationPortLabel"));
         horizontalLayout_2->addWidget(destinationPortLabel);
         ui.destinationPortLineEdit = new QLineEdit(gridLayoutWidget_2);
-        destinationPortLineEdit->setObjectName(QStringLiteral("destinationPortLineEdit"));
+        destinationPortLineEdit->setObjectName(QString::fromLatin1("destinationPortLineEdit"));
         destinationPortLineEdit->setText(QString::number(destinationPort));
         destinationPortLineEdit->setMaximumWidth(80);
         QObject::connect(destinationPortLineEdit, SIGNAL(textChanged(const QString &)),
@@ -172,10 +172,10 @@ int ClientTunnelPane::appendClientTunnelForm(
         int cryptoType = tunnelConfig->getcryptoType();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
         ui.cryptoTypeLabel = new QLabel(gridLayoutWidget_2);
-        cryptoTypeLabel->setObjectName(QStringLiteral("cryptoTypeLabel"));
+        cryptoTypeLabel->setObjectName(QString::fromLatin1("cryptoTypeLabel"));
         horizontalLayout_2->addWidget(cryptoTypeLabel);
         ui.cryptoTypeLineEdit = new QLineEdit(gridLayoutWidget_2);
-        cryptoTypeLineEdit->setObjectName(QStringLiteral("cryptoTypeLineEdit"));
+        cryptoTypeLineEdit->setObjectName(QString::fromLatin1("cryptoTypeLineEdit"));
         cryptoTypeLineEdit->setText(QString::number(cryptoType));
         cryptoTypeLineEdit->setMaximumWidth(80);
         QObject::connect(cryptoTypeLineEdit, SIGNAL(textChanged(const QString &)),
@@ -188,12 +188,12 @@ int ClientTunnelPane::appendClientTunnelForm(
     {
         i2p::data::SigningKeyType sigType = tunnelConfig->getsigType();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         ui.sigTypeLabel = new QLabel(gridLayoutWidget_2);
-        sigTypeLabel->setObjectName(QStringLiteral("sigTypeLabel"));
+        sigTypeLabel->setObjectName(QString::fromLatin1("sigTypeLabel"));
         horizontalLayout_2->addWidget(sigTypeLabel);
         ui.sigTypeComboBox = SignatureTypeComboBoxFactory::createSignatureTypeComboBox(gridLayoutWidget_2, sigType);
-        sigTypeComboBox->setObjectName(QStringLiteral("sigTypeComboBox"));
+        sigTypeComboBox->setObjectName(QString::fromLatin1("sigTypeComboBox"));
         QObject::connect(sigTypeComboBox, SIGNAL(currentIndexChanged(int)),
                                  this, SLOT(updated()));
         horizontalLayout_2->addWidget(sigTypeComboBox);
diff --git a/src/DaemonQT.cpp b/src/DaemonQT.cpp
index e9bd592..7b415e4 100644
--- a/src/DaemonQT.cpp
+++ b/src/DaemonQT.cpp
@@ -1,15 +1,14 @@
 #include <memory>
 
 #include "DaemonQT.h"
-#include "Daemon.h"
 #include "mainwindow.h"
-
-#include "Log.h"
+#include "Daemon.h"
 
 #include <QMessageBox>
 #include <QApplication>
 #include <QMutexLocker>
 #include <QThread>
+#include <QMetaObject>
 
 //#define DEBUG_WITH_DEFAULT_LOGGING (1)
 
@@ -66,11 +65,11 @@ namespace qt
 	{
 		Worker *worker = new Worker (m_Daemon);
 		worker->moveToThread(&workerThread);
-		connect(&workerThread, &QThread::finished, worker, &QObject::deleteLater);
-		connect(this, &Controller::startDaemon, worker, &Worker::startDaemon);
-		connect(this, &Controller::stopDaemon, worker, &Worker::stopDaemon);
-		connect(this, &Controller::restartDaemon, worker, &Worker::restartDaemon);
-		connect(worker, &Worker::resultReady, this, &Controller::handleResults);
+		connect(&workerThread, SIGNAL(finished()), worker, SLOT(deleteLater()));
+		connect(this, SIGNAL(startDaemon()), worker, SLOT(startDaemon()));
+		connect(this, SIGNAL(stopDaemon()), worker, SLOT(stopDaemon()));
+		connect(this, SIGNAL(restartDaemon()), worker, SLOT(restartDaemon()));
+		connect(worker, SIGNAL(resultReady(bool,QString)), this, SLOT(handleResults(bool,QString)));
 		workerThread.start();
 	}
 	Controller::~Controller()
@@ -88,7 +87,7 @@ namespace qt
 	}
 
 	DaemonQTImpl::DaemonQTImpl ():
-        mutex(nullptr), m_IsRunning(nullptr), m_RunningChangedCallback(nullptr)
+        mutex(nullptr), m_IsRunning(false), m_RunningChangedCallback(nullptr)
 	{
 	}
 
@@ -99,22 +98,29 @@ namespace qt
 
     bool DaemonQTImpl::init(int argc, char* argv[], std::shared_ptr<std::ostream> logstream)
 	{
-		mutex=new QMutex(QMutex::Recursive);
+		mutex = new QMutex(QMutex::Recursive);
 		setRunningCallback(0);
-        m_IsRunning=false;
-        return Daemon.init(argc,argv,logstream);
+        m_IsRunning = false;
+        return Daemon.init(argc, argv, logstream);
 	}
 
 	void DaemonQTImpl::start()
 	{
 		QMutexLocker locker(mutex);
-		setRunning(true);
-		Daemon.start();
+		if (m_IsRunning) {
+			return;
+		}
+		if (Daemon.start()) {
+			setRunning(true);
+		}
 	}
 
 	void DaemonQTImpl::stop()
 	{
 		QMutexLocker locker(mutex);
+		if (!m_IsRunning) {
+			return;
+		}
 		Daemon.stop();
 		setRunning(false);
 	}
@@ -169,27 +175,25 @@ namespace qt
                 QMessageBox::critical(0, "Error", "Daemon init failed");
                 return 1;
             }
-            LogPrint(eLogDebug, "Initialised, creating the main window...");
+            qDebug("Initialised, creating the main window...");
             MainWindow w(logstreamptr);
-            LogPrint(eLogDebug, "Before main window.show()...");
+            qDebug("Before main window.show()...");
             w.show ();
 
             {
                 i2p::qt::Controller daemonQtController(daemon);
                 w.setI2PController(&daemonQtController);
-                LogPrint(eLogDebug, "Starting the daemon...");
-                emit daemonQtController.startDaemon();
-                //daemon.start ();
-                LogPrint(eLogDebug, "Starting GUI event loop...");
+                qDebug("Starting the daemon...");
+                // Qt4 compatibility: can't emit signals from outside class, use QMetaObject::invokeMethod
+                QMetaObject::invokeMethod(&daemonQtController, "startDaemon", Qt::QueuedConnection);
+                qDebug("Starting GUI event loop...");
                 result = app.exec();
-                //daemon.stop ();
             }
         }
 
 		//QMessageBox::information(&w, "Debug", "demon stopped");
-        LogPrint(eLogDebug, "Exiting the application");
+        qDebug("Exiting the application");
 		return result;
 	}
 }
 }
-
diff --git a/src/I2pdQtUtil.cpp b/src/I2pdQtUtil.cpp
index 35a7adf..9a900b6 100644
--- a/src/I2pdQtUtil.cpp
+++ b/src/I2pdQtUtil.cpp
@@ -1,7 +1,9 @@
 #include "I2pdQtUtil.h"
+#include <QRegExp>
 
 bool isValidSingleLine(QLineEdit* widget, WrongInputPageEnum inputPage, MainWindow* mainWindow) {
-    bool correct = !widget->text().contains(QRegularExpression("[\r\n]"), nullptr);
+    // Qt4 compatibility: use QRegExp instead of QRegularExpression
+    bool correct = !widget->text().contains(QRegExp("[\r\n]"));
     if(!correct) {
         mainWindow->highlightWrongInput(
                     QApplication::tr("Single line input expected, but it's multiline"),
diff --git a/src/ServerTunnelPane.cpp b/src/ServerTunnelPane.cpp
index 7423221..0ba387f 100644
--- a/src/ServerTunnelPane.cpp
+++ b/src/ServerTunnelPane.cpp
@@ -15,13 +15,13 @@ int ServerTunnelPane::appendServerTunnelForm(
     ServerTunnelPane& ui = *this;
 
     serverTunnelNameGroupBox = new QGroupBox(tunnelsFormGridLayoutWidget);
-    serverTunnelNameGroupBox->setObjectName(QStringLiteral("serverTunnelNameGroupBox"));
+    serverTunnelNameGroupBox->setObjectName(QString::fromLatin1("serverTunnelNameGroupBox"));
 
     //tunnel
     gridLayoutWidget_2 = new QWidget(serverTunnelNameGroupBox);
 
     QComboBox *tunnelTypeComboBox = new QComboBox(gridLayoutWidget_2);
-    tunnelTypeComboBox->setObjectName(QStringLiteral("tunnelTypeComboBox"));
+    tunnelTypeComboBox->setObjectName(QString::fromLatin1("tunnelTypeComboBox"));
     tunnelTypeComboBox->addItem("Server", i2p::client::I2P_TUNNELS_SECTION_TYPE_SERVER);
     tunnelTypeComboBox->addItem("HTTP", i2p::client::I2P_TUNNELS_SECTION_TYPE_HTTP);
     tunnelTypeComboBox->addItem("IRC", i2p::client::I2P_TUNNELS_SECTION_TYPE_IRC);
@@ -52,12 +52,12 @@ int ServerTunnelPane::appendServerTunnelForm(
 
     //host
     ui.horizontalLayout_2 = new QHBoxLayout();
-    horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+    horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
     ui.hostLabel = new QLabel(gridLayoutWidget_2);
-    hostLabel->setObjectName(QStringLiteral("hostLabel"));
+    hostLabel->setObjectName(QString::fromLatin1("hostLabel"));
     horizontalLayout_2->addWidget(hostLabel);
     ui.hostLineEdit = new QLineEdit(gridLayoutWidget_2);
-    hostLineEdit->setObjectName(QStringLiteral("hostLineEdit"));
+    hostLineEdit->setObjectName(QString::fromLatin1("hostLineEdit"));
     hostLineEdit->setText(tunnelConfig->gethost().c_str());
     QObject::connect(hostLineEdit, SIGNAL(textChanged(const QString &)),
                              this, SLOT(updated()));
@@ -70,12 +70,12 @@ int ServerTunnelPane::appendServerTunnelForm(
     {
         int port  = tunnelConfig->getport();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         ui.portLabel = new QLabel(gridLayoutWidget_2);
-        portLabel->setObjectName(QStringLiteral("portLabel"));
+        portLabel->setObjectName(QString::fromLatin1("portLabel"));
         horizontalLayout_2->addWidget(portLabel);
         ui.portLineEdit = new QLineEdit(gridLayoutWidget_2);
-        portLineEdit->setObjectName(QStringLiteral("portLineEdit"));
+        portLineEdit->setObjectName(QString::fromLatin1("portLineEdit"));
         portLineEdit->setText(QString::number(port));
         portLineEdit->setMaximumWidth(80);
         QObject::connect(portLineEdit, SIGNAL(textChanged(const QString &)),
@@ -88,12 +88,12 @@ int ServerTunnelPane::appendServerTunnelForm(
     {
         std::string keys  = tunnelConfig->getkeys();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         ui.keysLabel = new QLabel(gridLayoutWidget_2);
-        keysLabel->setObjectName(QStringLiteral("keysLabel"));
+        keysLabel->setObjectName(QString::fromLatin1("keysLabel"));
         horizontalLayout_2->addWidget(keysLabel);
         ui.keysLineEdit = new QLineEdit(gridLayoutWidget_2);
-        keysLineEdit->setObjectName(QStringLiteral("keysLineEdit"));
+        keysLineEdit->setObjectName(QString::fromLatin1("keysLineEdit"));
         keysLineEdit->setText(keys.c_str());
         QObject::connect(keysLineEdit, SIGNAL(textChanged(const QString &)),
                                  this, SLOT(updated()));
@@ -105,12 +105,12 @@ int ServerTunnelPane::appendServerTunnelForm(
     {
         int inPort = tunnelConfig->getinPort();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         ui.inPortLabel = new QLabel(gridLayoutWidget_2);
-        inPortLabel->setObjectName(QStringLiteral("inPortLabel"));
+        inPortLabel->setObjectName(QString::fromLatin1("inPortLabel"));
         horizontalLayout_2->addWidget(inPortLabel);
         ui.inPortLineEdit = new QLineEdit(gridLayoutWidget_2);
-        inPortLineEdit->setObjectName(QStringLiteral("inPortLineEdit"));
+        inPortLineEdit->setObjectName(QString::fromLatin1("inPortLineEdit"));
         inPortLineEdit->setText(QString::number(inPort));
         inPortLineEdit->setMaximumWidth(80);
         QObject::connect(inPortLineEdit, SIGNAL(textChanged(const QString &)),
@@ -123,12 +123,12 @@ int ServerTunnelPane::appendServerTunnelForm(
     {
         std::string accessList = tunnelConfig->getaccessList();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         ui.accessListLabel = new QLabel(gridLayoutWidget_2);
-        accessListLabel->setObjectName(QStringLiteral("accessListLabel"));
+        accessListLabel->setObjectName(QString::fromLatin1("accessListLabel"));
         horizontalLayout_2->addWidget(accessListLabel);
         ui.accessListLineEdit = new QLineEdit(gridLayoutWidget_2);
-        accessListLineEdit->setObjectName(QStringLiteral("accessListLineEdit"));
+        accessListLineEdit->setObjectName(QString::fromLatin1("accessListLineEdit"));
         accessListLineEdit->setText(accessList.c_str());
         QObject::connect(accessListLineEdit, SIGNAL(textChanged(const QString &)),
                                  this, SLOT(updated()));
@@ -141,13 +141,13 @@ int ServerTunnelPane::appendServerTunnelForm(
     {
         std::string hostOverride = tunnelConfig->gethostOverride();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         ui.hostOverrideLabel = new QLabel(gridLayoutWidget_2);
-        hostOverrideLabel->setObjectName(QStringLiteral("hostOverrideLabel"));
+        hostOverrideLabel->setObjectName(QString::fromLatin1("hostOverrideLabel"));
         horizontalLayout_2->addWidget(hostOverrideLabel);
         hostOverrideLabel->setEnabled(type==i2p::client::I2P_TUNNELS_SECTION_TYPE_HTTP);
         ui.hostOverrideLineEdit = new QLineEdit(gridLayoutWidget_2);
-        hostOverrideLineEdit->setObjectName(QStringLiteral("hostOverrideLineEdit"));
+        hostOverrideLineEdit->setObjectName(QString::fromLatin1("hostOverrideLineEdit"));
         hostOverrideLineEdit->setText(hostOverride.c_str());
         QObject::connect(hostOverrideLineEdit, SIGNAL(textChanged(const QString &)),
                              this, SLOT(updated()));
@@ -160,12 +160,12 @@ int ServerTunnelPane::appendServerTunnelForm(
     {
         std::string webIRCPass = tunnelConfig->getwebircpass();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         ui.webIRCPassLabel = new QLabel(gridLayoutWidget_2);
-        webIRCPassLabel->setObjectName(QStringLiteral("webIRCPassLabel"));
+        webIRCPassLabel->setObjectName(QString::fromLatin1("webIRCPassLabel"));
         horizontalLayout_2->addWidget(webIRCPassLabel);
         ui.webIRCPassLineEdit = new QLineEdit(gridLayoutWidget_2);
-        webIRCPassLineEdit->setObjectName(QStringLiteral("webIRCPassLineEdit"));
+        webIRCPassLineEdit->setObjectName(QString::fromLatin1("webIRCPassLineEdit"));
         webIRCPassLineEdit->setText(webIRCPass.c_str());
         QObject::connect(webIRCPassLineEdit, SIGNAL(textChanged(const QString &)),
                                  this, SLOT(updated()));
@@ -177,9 +177,9 @@ int ServerTunnelPane::appendServerTunnelForm(
     {
         bool gzip = tunnelConfig->getgzip();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         ui.gzipCheckBox = new QCheckBox(gridLayoutWidget_2);
-        gzipCheckBox->setObjectName(QStringLiteral("gzipCheckBox"));
+        gzipCheckBox->setObjectName(QString::fromLatin1("gzipCheckBox"));
         gzipCheckBox->setChecked(gzip);
         QObject::connect(gzipCheckBox, SIGNAL(stateChanged(int)),
                                  this, SLOT(updated()));
@@ -191,12 +191,12 @@ int ServerTunnelPane::appendServerTunnelForm(
     {
         i2p::data::SigningKeyType sigType = tunnelConfig->getsigType();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         ui.sigTypeLabel = new QLabel(gridLayoutWidget_2);
-        sigTypeLabel->setObjectName(QStringLiteral("sigTypeLabel"));
+        sigTypeLabel->setObjectName(QString::fromLatin1("sigTypeLabel"));
         horizontalLayout_2->addWidget(sigTypeLabel);
         ui.sigTypeComboBox = SignatureTypeComboBoxFactory::createSignatureTypeComboBox(gridLayoutWidget_2, sigType);
-        sigTypeComboBox->setObjectName(QStringLiteral("sigTypeComboBox"));
+        sigTypeComboBox->setObjectName(QString::fromLatin1("sigTypeComboBox"));
         QObject::connect(sigTypeComboBox, SIGNAL(currentIndexChanged(int)),
                                  this, SLOT(updated()));
         horizontalLayout_2->addWidget(sigTypeComboBox);
@@ -210,12 +210,12 @@ int ServerTunnelPane::appendServerTunnelForm(
     {
         std::string address = tunnelConfig->getaddress();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         ui.addressLabel = new QLabel(gridLayoutWidget_2);
-        addressLabel->setObjectName(QStringLiteral("addressLabel"));
+        addressLabel->setObjectName(QString::fromLatin1("addressLabel"));
         horizontalLayout_2->addWidget(addressLabel);
         ui.addressLineEdit = new QLineEdit(gridLayoutWidget_2);
-        addressLineEdit->setObjectName(QStringLiteral("addressLineEdit"));
+        addressLineEdit->setObjectName(QString::fromLatin1("addressLineEdit"));
         addressLineEdit->setText(address.c_str());
         QObject::connect(addressLineEdit, SIGNAL(textChanged(const QString &)),
                                  this, SLOT(updated()));
@@ -227,9 +227,9 @@ int ServerTunnelPane::appendServerTunnelForm(
     {
         bool isUniqueLocal = tunnelConfig->getisUniqueLocal();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         ui.isUniqueLocalCheckBox = new QCheckBox(gridLayoutWidget_2);
-        isUniqueLocalCheckBox->setObjectName(QStringLiteral("isUniqueLocalCheckBox"));
+        isUniqueLocalCheckBox->setObjectName(QString::fromLatin1("isUniqueLocalCheckBox"));
         isUniqueLocalCheckBox->setChecked(isUniqueLocal);
         QObject::connect(gzipCheckBox, SIGNAL(stateChanged(int)),
                                  this, SLOT(updated()));
@@ -242,10 +242,10 @@ int ServerTunnelPane::appendServerTunnelForm(
         int cryptoType = tunnelConfig->getcryptoType();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
         ui.cryptoTypeLabel = new QLabel(gridLayoutWidget_2);
-        cryptoTypeLabel->setObjectName(QStringLiteral("cryptoTypeLabel"));
+        cryptoTypeLabel->setObjectName(QString::fromLatin1("cryptoTypeLabel"));
         horizontalLayout_2->addWidget(cryptoTypeLabel);
         ui.cryptoTypeLineEdit = new QLineEdit(gridLayoutWidget_2);
-        cryptoTypeLineEdit->setObjectName(QStringLiteral("cryptoTypeLineEdit"));
+        cryptoTypeLineEdit->setObjectName(QString::fromLatin1("cryptoTypeLineEdit"));
         cryptoTypeLineEdit->setText(QString::number(cryptoType));
         cryptoTypeLineEdit->setMaximumWidth(80);
         QObject::connect(cryptoTypeLineEdit, SIGNAL(textChanged(const QString &)),
diff --git a/src/ServerTunnelPane.h b/src/ServerTunnelPane.h
index 64fee10..78d9e50 100644
--- a/src/ServerTunnelPane.h
+++ b/src/ServerTunnelPane.h
@@ -2,19 +2,19 @@
 #define SERVERTUNNELPANE_H
 
 #include <QtCore/QVariant>
-#include <QtWidgets/QAction>
-#include <QtWidgets/QApplication>
-#include <QtWidgets/QButtonGroup>
-#include <QtWidgets/QComboBox>
-#include <QtWidgets/QGridLayout>
-#include <QtWidgets/QGroupBox>
-#include <QtWidgets/QHBoxLayout>
-#include <QtWidgets/QHeaderView>
-#include <QtWidgets/QLabel>
-#include <QtWidgets/QLineEdit>
-#include <QtWidgets/QPushButton>
-#include <QtWidgets/QSpacerItem>
-#include <QtWidgets/QWidget>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QComboBox>
+#include <QtGui/QGridLayout>
+#include <QtGui/QGroupBox>
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QHeaderView>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QPushButton>
+#include <QtGui/QSpacerItem>
+#include <QtGui/QWidget>
 #include "QVBoxLayout"
 #include "QCheckBox"
 
diff --git a/src/TunnelPane.cpp b/src/TunnelPane.cpp
index 7e15a6a..54638e6 100644
--- a/src/TunnelPane.cpp
+++ b/src/TunnelPane.cpp
@@ -29,22 +29,22 @@ void TunnelPane::setupTunnelPane(
 
     this->tunnelGroupBox=tunnelGroupBox;
 
-    gridLayoutWidget_2->setObjectName(QStringLiteral("gridLayoutWidget_2"));
+    gridLayoutWidget_2->setObjectName(QString::fromLatin1("gridLayoutWidget_2"));
     this->gridLayoutWidget_2=gridLayoutWidget_2;
     tunnelGridLayout = new QVBoxLayout(gridLayoutWidget_2);
-    tunnelGridLayout->setObjectName(QStringLiteral("tunnelGridLayout"));
+    tunnelGridLayout->setObjectName(QString::fromLatin1("tunnelGridLayout"));
     tunnelGridLayout->setContentsMargins(10, 25, 10, 10);
     tunnelGridLayout->setSpacing(5);
 
     //header
     QHBoxLayout *headerHorizontalLayout = new QHBoxLayout();
-    headerHorizontalLayout->setObjectName(QStringLiteral("headerHorizontalLayout"));
+    headerHorizontalLayout->setObjectName(QString::fromLatin1("headerHorizontalLayout"));
 
     nameLabel = new QLabel(gridLayoutWidget_2);
-    nameLabel->setObjectName(QStringLiteral("nameLabel"));
+    nameLabel->setObjectName(QString::fromLatin1("nameLabel"));
     headerHorizontalLayout->addWidget(nameLabel);
     nameLineEdit = new QLineEdit(gridLayoutWidget_2);
-    nameLineEdit->setObjectName(QStringLiteral("nameLineEdit"));
+    nameLineEdit->setObjectName(QString::fromLatin1("nameLineEdit"));
     const QString& tunnelName=tunnelConfig->getName().c_str();
     nameLineEdit->setText(tunnelName);
     setGroupBoxTitle(tunnelName);
@@ -56,7 +56,7 @@ void TunnelPane::setupTunnelPane(
     headerHorizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
     headerHorizontalLayout->addItem(headerHorizontalSpacer);
     deletePushButton = new QPushButton(gridLayoutWidget_2);
-    deletePushButton->setObjectName(QStringLiteral("deletePushButton"));
+    deletePushButton->setObjectName(QString::fromLatin1("deletePushButton"));
     QObject::connect(deletePushButton, SIGNAL(released()),
                              this, SLOT(deleteButtonReleased()));//MainWindow::DeleteTunnelNamed(std::string name) {
     headerHorizontalLayout->addWidget(deletePushButton);
@@ -66,9 +66,9 @@ void TunnelPane::setupTunnelPane(
     {
         //const QString& type = tunnelConfig->getType();
         QHBoxLayout * horizontalLayout_ = new QHBoxLayout();
-        horizontalLayout_->setObjectName(QStringLiteral("horizontalLayout_"));
+        horizontalLayout_->setObjectName(QString::fromLatin1("horizontalLayout_"));
         typeLabel = new QLabel(gridLayoutWidget_2);
-        typeLabel->setObjectName(QStringLiteral("typeLabel"));
+        typeLabel->setObjectName(QString::fromLatin1("typeLabel"));
         horizontalLayout_->addWidget(typeLabel);
         horizontalLayout_->addWidget(tunnelTypeComboBox);
         QPushButton * lockButton1 = new QPushButton(gridLayoutWidget_2);
@@ -93,12 +93,12 @@ void TunnelPane::appendControlsForI2CPParameters(I2CPParameters& i2cpParameters,
         //number of hops of an inbound tunnel
         const QString& inbound_length=i2cpParameters.getInbound_length();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         inbound_lengthLabel = new QLabel(gridLayoutWidget_2);
-        inbound_lengthLabel->setObjectName(QStringLiteral("inbound_lengthLabel"));
+        inbound_lengthLabel->setObjectName(QString::fromLatin1("inbound_lengthLabel"));
         horizontalLayout_2->addWidget(inbound_lengthLabel);
         inbound_lengthLineEdit = new QLineEdit(gridLayoutWidget_2);
-        inbound_lengthLineEdit->setObjectName(QStringLiteral("inbound_lengthLineEdit"));
+        inbound_lengthLineEdit->setObjectName(QString::fromLatin1("inbound_lengthLineEdit"));
         inbound_lengthLineEdit->setText(inbound_length);
         inbound_lengthLineEdit->setMaximumWidth(80);
         QObject::connect(inbound_lengthLineEdit, SIGNAL(textChanged(const QString &)),
@@ -112,12 +112,12 @@ void TunnelPane::appendControlsForI2CPParameters(I2CPParameters& i2cpParameters,
         //number of hops of an outbound tunnel
         const QString& outbound_length=i2cpParameters.getOutbound_length();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         outbound_lengthLabel = new QLabel(gridLayoutWidget_2);
-        outbound_lengthLabel->setObjectName(QStringLiteral("outbound_lengthLabel"));
+        outbound_lengthLabel->setObjectName(QString::fromLatin1("outbound_lengthLabel"));
         horizontalLayout_2->addWidget(outbound_lengthLabel);
         outbound_lengthLineEdit = new QLineEdit(gridLayoutWidget_2);
-        outbound_lengthLineEdit->setObjectName(QStringLiteral("outbound_lengthLineEdit"));
+        outbound_lengthLineEdit->setObjectName(QString::fromLatin1("outbound_lengthLineEdit"));
         outbound_lengthLineEdit->setText(outbound_length);
         outbound_lengthLineEdit->setMaximumWidth(80);
         QObject::connect(outbound_lengthLineEdit, SIGNAL(textChanged(const QString &)),
@@ -131,12 +131,12 @@ void TunnelPane::appendControlsForI2CPParameters(I2CPParameters& i2cpParameters,
         //number of inbound tunnels
         const QString& inbound_quantity=i2cpParameters.getInbound_quantity();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         inbound_quantityLabel = new QLabel(gridLayoutWidget_2);
-        inbound_quantityLabel->setObjectName(QStringLiteral("inbound_quantityLabel"));
+        inbound_quantityLabel->setObjectName(QString::fromLatin1("inbound_quantityLabel"));
         horizontalLayout_2->addWidget(inbound_quantityLabel);
         inbound_quantityLineEdit = new QLineEdit(gridLayoutWidget_2);
-        inbound_quantityLineEdit->setObjectName(QStringLiteral("inbound_quantityLineEdit"));
+        inbound_quantityLineEdit->setObjectName(QString::fromLatin1("inbound_quantityLineEdit"));
         inbound_quantityLineEdit->setText(inbound_quantity);
         inbound_quantityLineEdit->setMaximumWidth(80);
         QObject::connect(inbound_quantityLineEdit, SIGNAL(textChanged(const QString &)),
@@ -150,12 +150,12 @@ void TunnelPane::appendControlsForI2CPParameters(I2CPParameters& i2cpParameters,
         //number of outbound tunnels
         const QString& outbound_quantity=i2cpParameters.getOutbound_quantity();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         outbound_quantityLabel = new QLabel(gridLayoutWidget_2);
-        outbound_quantityLabel->setObjectName(QStringLiteral("outbound_quantityLabel"));
+        outbound_quantityLabel->setObjectName(QString::fromLatin1("outbound_quantityLabel"));
         horizontalLayout_2->addWidget(outbound_quantityLabel);
         outbound_quantityLineEdit = new QLineEdit(gridLayoutWidget_2);
-        outbound_quantityLineEdit->setObjectName(QStringLiteral("outbound_quantityLineEdit"));
+        outbound_quantityLineEdit->setObjectName(QString::fromLatin1("outbound_quantityLineEdit"));
         outbound_quantityLineEdit->setText(outbound_quantity);
         outbound_quantityLineEdit->setMaximumWidth(80);
         QObject::connect(outbound_quantityLineEdit, SIGNAL(textChanged(const QString &)),
@@ -169,12 +169,12 @@ void TunnelPane::appendControlsForI2CPParameters(I2CPParameters& i2cpParameters,
         //number of ElGamal/AES tags to send
         const QString& crypto_tagsToSend=i2cpParameters.getCrypto_tagsToSend();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         crypto_tagsToSendLabel = new QLabel(gridLayoutWidget_2);
-        crypto_tagsToSendLabel->setObjectName(QStringLiteral("crypto_tagsToSendLabel"));
+        crypto_tagsToSendLabel->setObjectName(QString::fromLatin1("crypto_tagsToSendLabel"));
         horizontalLayout_2->addWidget(crypto_tagsToSendLabel);
         crypto_tagsToSendLineEdit = new QLineEdit(gridLayoutWidget_2);
-        crypto_tagsToSendLineEdit->setObjectName(QStringLiteral("crypto_tagsToSendLineEdit"));
+        crypto_tagsToSendLineEdit->setObjectName(QString::fromLatin1("crypto_tagsToSendLineEdit"));
         crypto_tagsToSendLineEdit->setText(crypto_tagsToSend);
         crypto_tagsToSendLineEdit->setMaximumWidth(80);
         QObject::connect(crypto_tagsToSendLineEdit, SIGNAL(textChanged(const QString &)),
@@ -189,14 +189,14 @@ void TunnelPane::appendControlsForI2CPParameters(I2CPParameters& i2cpParameters,
         //explicitPeers -- list of comma-separated b64 addresses of peers to use, default: unset
         const QString& value=i2cpParameters.getExplicitPeers();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         QLabel *_Label;
         explicitPeersLabel = _Label = new QLabel(gridLayoutWidget_2);
-        _Label->setObjectName(QStringLiteral("_Label"));
+        _Label->setObjectName(QString::fromLatin1("_Label"));
         horizontalLayout_2->addWidget(_Label);
         QLineEdit *_LineEdit;
         explicitPeersLineEdit = _LineEdit = new QLineEdit(gridLayoutWidget_2);
-        _LineEdit->setObjectName(QStringLiteral("_LineEdit"));
+        _LineEdit->setObjectName(QString::fromLatin1("_LineEdit"));
         _LineEdit->setText(value);
         _LineEdit->setMaximumWidth(80);
         QObject::connect(_LineEdit, SIGNAL(textChanged(const QString &)),
@@ -211,14 +211,14 @@ void TunnelPane::appendControlsForI2CPParameters(I2CPParameters& i2cpParameters,
         //i2p.streaming.initialAckDelay -- milliseconds to wait before sending Ack. 200 by default
         const QString& value=i2cpParameters.get_i2p_streaming_initialAckDelay();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         QLabel *_Label;
         i2p_streaming_initialAckDelayLabel = _Label = new QLabel(gridLayoutWidget_2);
-        _Label->setObjectName(QStringLiteral("_Label"));
+        _Label->setObjectName(QString::fromLatin1("_Label"));
         horizontalLayout_2->addWidget(_Label);
         QLineEdit *_LineEdit;
         i2p_streaming_initialAckDelayLineEdit = _LineEdit = new QLineEdit(gridLayoutWidget_2);
-        _LineEdit->setObjectName(QStringLiteral("_LineEdit"));
+        _LineEdit->setObjectName(QString::fromLatin1("_LineEdit"));
         _LineEdit->setText(value);
         _LineEdit->setMaximumWidth(80);
         QObject::connect(_LineEdit, SIGNAL(textChanged(const QString &)),
@@ -233,10 +233,10 @@ void TunnelPane::appendControlsForI2CPParameters(I2CPParameters& i2cpParameters,
         //i2p.streaming.answerPings -- enable sending pongs. true by default
         const bool value=i2cpParameters.get_i2p_streaming_answerPings();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         QCheckBox *_CheckBox;
         i2p_streaming_answerPingsCheckBox = _CheckBox = new QCheckBox(gridLayoutWidget_2);
-        _CheckBox->setObjectName(QStringLiteral("_CheckBox"));
+        _CheckBox->setObjectName(QString::fromLatin1("_CheckBox"));
         horizontalLayout_2->addWidget(_CheckBox);
         _CheckBox->setChecked(value);
         QObject::connect(_CheckBox, SIGNAL(toggled(bool)),
@@ -248,14 +248,14 @@ void TunnelPane::appendControlsForI2CPParameters(I2CPParameters& i2cpParameters,
         //i2cp.leaseSetType -- type of LeaseSet to be sent. 1, 3 or 5. 1 by default
         const QString& value=i2cpParameters.get_i2cp_leaseSetType();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         QLabel *_Label;
         i2cp_leaseSetTypeLabel = _Label = new QLabel(gridLayoutWidget_2);
-        _Label->setObjectName(QStringLiteral("_Label"));
+        _Label->setObjectName(QString::fromLatin1("_Label"));
         horizontalLayout_2->addWidget(_Label);
         QLineEdit *_LineEdit;
         i2cp_leaseSetTypeLineEdit = _LineEdit = new QLineEdit(gridLayoutWidget_2);
-        _LineEdit->setObjectName(QStringLiteral("_LineEdit"));
+        _LineEdit->setObjectName(QString::fromLatin1("_LineEdit"));
         _LineEdit->setText(value);
         _LineEdit->setMaximumWidth(80);
         QObject::connect(_LineEdit, SIGNAL(textChanged(const QString &)),
@@ -270,14 +270,14 @@ void TunnelPane::appendControlsForI2CPParameters(I2CPParameters& i2cpParameters,
         //i2cp.leaseSetEncType -- comma separated encryption types to be used in LeaseSet type 3 or 5. Identity's type by default
         const QString& value=i2cpParameters.get_i2cp_leaseSetEncType();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         QLabel *_Label;
         i2cp_leaseSetEncTypeLabel = _Label = new QLabel(gridLayoutWidget_2);
-        _Label->setObjectName(QStringLiteral("_Label"));
+        _Label->setObjectName(QString::fromLatin1("_Label"));
         horizontalLayout_2->addWidget(_Label);
         QLineEdit *_LineEdit;
         i2cp_leaseSetEncTypeLineEdit = _LineEdit = new QLineEdit(gridLayoutWidget_2);
-        _LineEdit->setObjectName(QStringLiteral("_LineEdit"));
+        _LineEdit->setObjectName(QString::fromLatin1("_LineEdit"));
         _LineEdit->setText(value);
         _LineEdit->setMaximumWidth(80);
         QObject::connect(_LineEdit, SIGNAL(textChanged(const QString &)),
@@ -292,14 +292,14 @@ void TunnelPane::appendControlsForI2CPParameters(I2CPParameters& i2cpParameters,
         //i2cp.leaseSetPrivKey -- decryption key for encrypted LeaseSet in base64. PSK or private DH
         const QString& value=i2cpParameters.get_i2cp_leaseSetPrivKey();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         QLabel *_Label;
         i2cp_leaseSetPrivKeyLabel = _Label = new QLabel(gridLayoutWidget_2);
-        _Label->setObjectName(QStringLiteral("_Label"));
+        _Label->setObjectName(QString::fromLatin1("_Label"));
         horizontalLayout_2->addWidget(_Label);
         QLineEdit *_LineEdit;
         i2cp_leaseSetPrivKeyLineEdit = _LineEdit = new QLineEdit(gridLayoutWidget_2);
-        _LineEdit->setObjectName(QStringLiteral("_LineEdit"));
+        _LineEdit->setObjectName(QString::fromLatin1("_LineEdit"));
         _LineEdit->setText(value);
         _LineEdit->setMaximumWidth(80);
         QObject::connect(_LineEdit, SIGNAL(textChanged(const QString &)),
@@ -314,14 +314,14 @@ void TunnelPane::appendControlsForI2CPParameters(I2CPParameters& i2cpParameters,
         //i2cp.leaseSetAuthType -- authentication type for encrypted LeaseSet. 0 - no authentication(default), 1 - DH, 2 - PSK
         const QString& value=i2cpParameters.get_i2cp_leaseSetAuthType();
         QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
-        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
+        horizontalLayout_2->setObjectName(QString::fromLatin1("horizontalLayout_2"));
         QLabel *_Label;
         i2cp_leaseSetAuthTypeLabel = _Label = new QLabel(gridLayoutWidget_2);
-        _Label->setObjectName(QStringLiteral("_Label"));
+        _Label->setObjectName(QString::fromLatin1("_Label"));
         horizontalLayout_2->addWidget(_Label);
         QLineEdit *_LineEdit;
         i2cp_leaseSetAuthTypeLineEdit = _LineEdit = new QLineEdit(gridLayoutWidget_2);
-        _LineEdit->setObjectName(QStringLiteral("_LineEdit"));
+        _LineEdit->setObjectName(QString::fromLatin1("_LineEdit"));
         _LineEdit->setText(value);
         _LineEdit->setMaximumWidth(80);
         QObject::connect(_LineEdit, SIGNAL(textChanged(const QString &)),
@@ -373,11 +373,13 @@ const char I2P_TUNNELS_SECTION_TYPE_WEBSOCKS[] = "websocks";
 const char I2P_TUNNELS_SECTION_TYPE_HTTPPROXY[] = "httpproxy";
 */
 QString TunnelPane::readTunnelTypeComboboxData() {
-    return tunnelTypeComboBox->currentData().toString();
+    // Qt4 compatibility: use itemData(currentIndex()) instead of currentData()
+    return tunnelTypeComboBox->itemData(tunnelTypeComboBox->currentIndex()).toString();
 }
 
 i2p::data::SigningKeyType TunnelPane::readSigTypeComboboxUI(QComboBox* sigTypeComboBox) {
-    return (i2p::data::SigningKeyType) sigTypeComboBox->currentData().toInt();
+    // Qt4 compatibility: use itemData(currentIndex()) instead of currentData()
+    return (i2p::data::SigningKeyType) sigTypeComboBox->itemData(sigTypeComboBox->currentIndex()).toInt();
 }
 
 void TunnelPane::deleteTunnelForm() {
diff --git a/src/logviewermanager.cpp b/src/logviewermanager.cpp
index f110db9..6ff37c7 100644
--- a/src/logviewermanager.cpp
+++ b/src/logviewermanager.cpp
@@ -32,10 +32,11 @@ QString Worker::pollAndShootATimerForInfiniteRetries() {
 Controller::Controller(LogViewerManager &parameter1):logViewerManager(parameter1) {
     Worker *worker = new Worker(parameter1);
     worker->moveToThread(&workerThread);
-    connect(&workerThread, &QThread::finished, worker, &QObject::deleteLater);
-    connect(this, &Controller::operate1, worker, &Worker::doWork1);
-    connect(worker, &Worker::resultReady,
-            &parameter1, &LogViewerManager::appendPlainText_atGuiThread);
+    // Qt4 compatibility: use SIGNAL/SLOT macros instead of PMF syntax
+    connect(&workerThread, SIGNAL(finished()), worker, SLOT(deleteLater()));
+    connect(this, SIGNAL(operate1()), worker, SLOT(doWork1()));
+    connect(worker, SIGNAL(resultReady(QString)),
+            &parameter1, SLOT(appendPlainText_atGuiThread(QString)));
     workerThread.start();
     timerId=startTimer(100/*millis*/);
 }
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 46652a2..1adc5ee 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -12,11 +12,8 @@
 #include <QFileDialog>
 
 #include <QApplication>
-#include <QScreen>
-#include <QStyleHints>
-#include <QScreen>
-#include <QWindow>
 #include <QMessageBox>
+#include <QMetaObject>
 
 #include <assert.h>
 
@@ -643,7 +640,8 @@ void MainWindow::handleGracefulQuitButton() {
 
 void MainWindow::handleDoRestartButton() {
     qDebug()<<"Do Restart pressed.";
-    emit i2pController->restartDaemon();
+    // Qt4 compatibility: can't emit signals from outside class, use QMetaObject::invokeMethod
+    QMetaObject::invokeMethod(i2pController, "restartDaemon", Qt::QueuedConnection);
 }
 
 
diff --git a/src/mainwindow.h b/src/mainwindow.h
index 581dbe1..ea88349 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -8,24 +8,24 @@
 #include <QPushButton>
 #include <QMessageBox>
 #include <QtCore/QVariant>
-#include <QtWidgets/QAction>
-#include <QtWidgets/QApplication>
-#include <QtWidgets/QButtonGroup>
-#include <QtWidgets/QHeaderView>
-#include <QtWidgets/QMainWindow>
-#include <QtWidgets/QVBoxLayout>
-#include <QtWidgets/QWidget>
-#include <QtWidgets/QCheckBox>
-#include <QtWidgets/QComboBox>
-#include <QtWidgets/QAction>
-#include <QtWidgets/QGridLayout>
-#include <QtWidgets/QGroupBox>
-#include <QtWidgets/QHBoxLayout>
-#include <QtWidgets/QHeaderView>
-#include <QtWidgets/QLabel>
-#include <QtWidgets/QLineEdit>
-#include <QtWidgets/QPushButton>
-#include <QtWidgets/QSpacerItem>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QHeaderView>
+#include <QtGui/QMainWindow>
+#include <QtGui/QVBoxLayout>
+#include <QtGui/QWidget>
+#include <QtGui/QCheckBox>
+#include <QtGui/QComboBox>
+#include <QtGui/QAction>
+#include <QtGui/QGridLayout>
+#include <QtGui/QGroupBox>
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QHeaderView>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QPushButton>
+#include <QtGui/QSpacerItem>
 #include "QVBoxLayout"
 #include "QUrl"
 
@@ -249,7 +249,9 @@ public:
     virtual void loadFromConfigOption(){
         MainWindowItem::loadFromConfigOption();
         const char * ld = boost::any_cast<std::string>(optionValue).c_str();
-        comboBox->setCurrentText(QString(ld));
+        // Qt4 compatibility: use findText + setCurrentIndex instead of setCurrentText
+        int index = comboBox->findText(QString(ld));
+        if (index >= 0) comboBox->setCurrentIndex(index);
     }
     virtual void saveToStringStream(std::stringstream& out){
         std::string logDest = comboBox->currentText().toStdString();
@@ -267,7 +269,9 @@ public:
     virtual void loadFromConfigOption(){
         MainWindowItem::loadFromConfigOption();
         const char * ll = boost::any_cast<std::string>(optionValue).c_str();
-        comboBox->setCurrentText(QString(ll));
+        // Qt4 compatibility: use findText + setCurrentIndex instead of setCurrentText
+        int index = comboBox->findText(QString(ll));
+        if (index >= 0) comboBox->setCurrentIndex(index);
     }
     virtual void saveToStringStream(std::stringstream& out){
         optionValue=comboBox->currentText().toStdString();
@@ -286,7 +290,8 @@ public:
         SignatureTypeComboBoxFactory::fillComboBox(comboBox, selected);
     }
     virtual void saveToStringStream(std::stringstream& out){
-        uint16_t selected = SignatureTypeComboBoxFactory::getSigType(comboBox->currentData());
+        // Qt4 compatibility: use itemData(currentIndex()) instead of currentData()
+        uint16_t selected = SignatureTypeComboBoxFactory::getSigType(comboBox->itemData(comboBox->currentIndex()));
         optionValue=(unsigned short)selected;
         MainWindowItem::saveToStringStream(out);
     }
diff --git a/src/mainwindow.ui b/src/mainwindow.ui
index 8f942b0..f2dcb2f 100644
--- a/src/mainwindow.ui
+++ b/src/mainwindow.ui
@@ -751,9 +751,6 @@
               <property name="horizontalScrollBarPolicy">
                <enum>Qt::ScrollBarAsNeeded</enum>
               </property>
-              <property name="sizeAdjustPolicy">
-               <enum>QAbstractScrollArea::AdjustIgnored</enum>
-              </property>
               <property name="maximumBlockCount">
                <number>10000</number>
               </property>
@@ -814,9 +811,6 @@
               <property name="horizontalScrollBarPolicy">
                <enum>Qt::ScrollBarAsNeeded</enum>
               </property>
-              <property name="sizeAdjustPolicy">
-               <enum>QAbstractScrollArea::AdjustIgnored</enum>
-              </property>
               <property name="widgetResizable">
                <bool>true</bool>
               </property>
