diff --git a/src/LANShare.pro b/src/LANShare.pro
index 806c19d..30789bf 100644
--- a/src/LANShare.pro
+++ b/src/LANShare.pro
@@ -8,9 +8,10 @@ QT += core gui network
 
 greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
 
+LIBS += -lQJson4
+
 TARGET = LANShare
 TEMPLATE = app
-CONFIG += c++17
 
 RC_ICONS += img/icon.ico
 
diff --git a/src/main.cpp b/src/main.cpp
index 7e78e8a..0ea9708 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -39,16 +39,13 @@ int main(int argc, char *argv[])
         return EXIT_FAILURE;
     }
 
-    app.setApplicationDisplayName(PROGRAM_NAME);
     app.setApplicationName(PROGRAM_NAME);
     app.setApplicationVersion(Util::parseAppVersion());
 
     MainWindow mainWindow;
     mainWindow.show();
 
-    QObject::connect(&si, &SingleInstance::newInstanceCreated, [&mainWindow]() {
-        mainWindow.setMainWindowVisibility(true);
-    });
+    QObject::connect(&si, SIGNAL(newInstanceCreated()), &mainWindow, SLOT(setMainWindowVisibility()));
 
     return app.exec();
 }
diff --git a/src/model/device.cpp b/src/model/device.cpp
index 18dc284..97fb1c3 100644
--- a/src/model/device.cpp
+++ b/src/model/device.cpp
@@ -18,8 +18,13 @@
 
 #include "device.h"
 
+Device::Device()
+    : mAddress(QHostAddress::Null)
+{
+}
+
 Device::Device(const QString &id, const QString &name, const QString &osName, const QHostAddress &addr)
-: mId{id}, mName{name}, mOSName{osName}, mAddress{addr}
+    : mId(id), mName(name), mOSName(osName), mAddress(addr)
 {
 }
 
diff --git a/src/model/device.h b/src/model/device.h
index cc90e4b..390542b 100644
--- a/src/model/device.h
+++ b/src/model/device.h
@@ -29,7 +29,7 @@
 class Device
 {
 public:
-    explicit Device() = default;
+    explicit Device() ;
     Device(const QString &id, const QString &name, const QString &osName, const QHostAddress &addr);
 
     inline QString getId() const { return mId; }
@@ -47,10 +47,10 @@ public:
     bool operator!=(const Device& other) const;
 
 private:
-    QString mId{""};
-    QString mName{""};
-    QString mOSName{""};
-    QHostAddress mAddress{QHostAddress::Null};
+    QString mId;
+    QString mName;
+    QString mOSName;
+    QHostAddress mAddress;
 };
 
 #endif // DEVICE_H
diff --git a/src/model/devicelistmodel.cpp b/src/model/devicelistmodel.cpp
index b7f12a0..36ed38f 100644
--- a/src/model/devicelistmodel.cpp
+++ b/src/model/devicelistmodel.cpp
@@ -29,7 +29,7 @@ DeviceListModel::DeviceListModel(DeviceBroadcaster* deviceBC, QObject* parent)
         mDBC = new DeviceBroadcaster(this);
     }
 
-    connect(mDBC, &DeviceBroadcaster::broadcastReceived, this, &DeviceListModel::onBCReceived);
+    connect(mDBC, SIGNAL(broadcastReceived(Device)), this, SLOT(onBCReceived(Device)));
 }
 
 void DeviceListModel::onBCReceived(const Device &fromDevice)
@@ -40,7 +40,7 @@ void DeviceListModel::onBCReceived(const Device &fromDevice)
     }
 
     bool found = false;
-    for(const Device& dev : mDevices) {
+    foreach (const Device& dev, mDevices) {
         if (dev.getId() == id) {
             found = true;
             break;
@@ -122,7 +122,7 @@ Device DeviceListModel::device(int index) const
 
 Device DeviceListModel::device(const QString &id) const
 {
-    for (Device dev : mDevices) {
+    foreach (const Device& dev, mDevices) {
         if (dev.getId() == id) {
             return dev;
         }
@@ -133,7 +133,7 @@ Device DeviceListModel::device(const QString &id) const
 
 Device DeviceListModel::device(const QHostAddress &address) const
 {
-    for (Device dev : mDevices) {
+    foreach (const Device& dev, mDevices) {
         if (dev.getAddress() == address) {
             return dev;
         }
diff --git a/src/model/devicelistmodel.h b/src/model/devicelistmodel.h
index e67a35e..7c52f35 100644
--- a/src/model/devicelistmodel.h
+++ b/src/model/devicelistmodel.h
@@ -27,10 +27,10 @@
 class DeviceListModel : public QAbstractListModel
 {
 public:
-    DeviceListModel(DeviceBroadcaster* deviceBC, QObject* parent = nullptr);
+    DeviceListModel(DeviceBroadcaster* deviceBC, QObject* parent = 0);
 
-    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
-    int rowCount(const QModelIndex &parent = QModelIndex()) const override;
+    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+    int rowCount(const QModelIndex &parent = QModelIndex()) const;
 
     void refresh();
 
diff --git a/src/model/transferinfo.cpp b/src/model/transferinfo.cpp
index 7eaba9a..79ea023 100644
--- a/src/model/transferinfo.cpp
+++ b/src/model/transferinfo.cpp
@@ -21,33 +21,33 @@
 
 TransferInfo::TransferInfo(Transfer* owner, QObject *parent) :
     QObject(parent),
-    mState(TransferState::Idle), mLastState(TransferState::Idle),
-    mType(TransferType::None), mProgress(0), mDataSize(0),
+    mState(TransferStateNS::Idle), mLastState(TransferStateNS::Idle),
+    mType(TransferTypeNS::None), mProgress(0), mDataSize(0),
     mOwner(owner)
 {
 }
 
 bool TransferInfo::canResume() const
 {
-    return mState == TransferState::Paused;
+    return mState == TransferStateNS::Paused;
 }
 
 bool TransferInfo::canPause() const
 {
-    return mState == TransferState::Waiting ||
-            mState == TransferState::Transfering;
+    return mState == TransferStateNS::Waiting ||
+            mState == TransferStateNS::Transfering;
 }
 
 bool TransferInfo::canCancel() const
 {
-    return mState == TransferState::Waiting ||
-            mState == TransferState::Transfering ||
-            mState == TransferState::Paused;
+    return mState == TransferStateNS::Waiting ||
+            mState == TransferStateNS::Transfering ||
+            mState == TransferStateNS::Paused;
 }
 
 void TransferInfo::setPeer(Device peer)
 {
-    mPeer = std::move(peer);
+    mPeer = peer;
 }
 
 void TransferInfo::setState(TransferState newState)
@@ -56,40 +56,40 @@ void TransferInfo::setState(TransferState newState)
         TransferState tmp = mState;
 
         switch (mState) {
-        case TransferState::Idle : {
-            if (newState == TransferState::Waiting) {
+        case TransferStateNS::Idle : {
+            if (newState == TransferStateNS::Waiting) {
                 mState = newState;
                 emit stateChanged(mState);
             }
             break;
         }
-        case TransferState::Waiting : {
-            if (newState == TransferState::Transfering ||
-                    newState == TransferState::Cancelled ||
-                    newState == TransferState::Paused) {
+        case TransferStateNS::Waiting : {
+            if (newState == TransferStateNS::Transfering ||
+                    newState == TransferStateNS::Cancelled ||
+                    newState == TransferStateNS::Paused) {
                 mState = newState;
                 emit stateChanged(mState);
             }
             break;
         }
-        case TransferState::Transfering : {
-            if (newState == TransferState::Disconnected ||
-                    newState == TransferState::Finish ||
-                    newState == TransferState::Cancelled ||
-                    newState == TransferState::Paused) {
+        case TransferStateNS::Transfering : {
+            if (newState == TransferStateNS::Disconnected ||
+                    newState == TransferStateNS::Finish ||
+                    newState == TransferStateNS::Cancelled ||
+                    newState == TransferStateNS::Paused) {
                 mState = newState;
                 emit stateChanged(mState);
             }
             break;
         }
-        case TransferState::Paused : {
-            if (newState == TransferState::Waiting ||
-                    newState == TransferState::Transfering) {
+        case TransferStateNS::Paused : {
+            if (newState == TransferStateNS::Waiting ||
+                    newState == TransferStateNS::Transfering) {
                 mState = mLastState;
                 emit stateChanged(mState);
             }
-            else if (newState == TransferState::Cancelled ||
-                     newState == TransferState::Disconnected) {
+            else if (newState == TransferStateNS::Cancelled ||
+                     newState == TransferStateNS::Disconnected) {
                 mState = newState;
                 emit stateChanged(mState);
             }
@@ -125,3 +125,18 @@ void TransferInfo::setFilePath(const QString &fileName)
 {
     mFilePath = fileName;
 }
+
+void TransferInfo::emitDone()
+{
+    emit done();
+}
+
+void TransferInfo::emitErrorOcurred(const QString& errStr)
+{
+    emit errorOcurred(errStr);
+}
+
+void TransferInfo::emitFileOpened()
+{
+    emit fileOpened();
+}
diff --git a/src/model/transferinfo.h b/src/model/transferinfo.h
index 7e69f62..29002f7 100644
--- a/src/model/transferinfo.h
+++ b/src/model/transferinfo.h
@@ -24,21 +24,27 @@
 
 #include "device.h"
 
-enum class TransferState {
-    Idle,
-    Waiting,
-    Disconnected,
-    Paused,
-    Cancelled,
-    Transfering,
-    Finish
-};
-
-enum class TransferType {
-    None,
-    Download,
-    Upload
-};
+namespace TransferStateNS {
+    enum TransferState {
+        Idle,
+        Waiting,
+        Disconnected,
+        Paused,
+        Cancelled,
+        Transfering,
+        Finish
+    };
+}
+typedef TransferStateNS::TransferState TransferState;
+
+namespace TransferTypeNS {
+    enum TransferType {
+        None,
+        Download,
+        Upload
+    };
+}
+typedef TransferTypeNS::TransferType TransferType;
 
 class Transfer;
 
@@ -47,7 +53,7 @@ class TransferInfo : public QObject
     Q_OBJECT
 
 public:
-    explicit TransferInfo(Transfer* owner, QObject *parent = nullptr);
+    explicit TransferInfo(Transfer* owner, QObject *parent = 0);
 
     inline Device getPeer() const { return mPeer; }
     inline int getProgress() const { return mProgress; }
@@ -69,6 +75,10 @@ public:
     void setDataSize(qint64 size);
     void setFilePath(const QString& fileName);
 
+    void emitDone();
+    void emitErrorOcurred(const QString& errStr);
+    void emitFileOpened();
+
 Q_SIGNALS:
     void done();
     void errorOcurred(const QString& errStr);
diff --git a/src/model/transfertablemodel.cpp b/src/model/transfertablemodel.cpp
index bc0c940..8ed8e7c 100644
--- a/src/model/transfertablemodel.cpp
+++ b/src/model/transfertablemodel.cpp
@@ -27,7 +27,7 @@ TransferTableModel::TransferTableModel(QObject *parent) :
 
 TransferTableModel::~TransferTableModel()
 {
-    for (Transfer* t : mTransfers) {
+    foreach (Transfer* t, mTransfers) {
         delete t;
     }
 }
@@ -50,7 +50,7 @@ QVariant TransferTableModel::data(const QModelIndex &index, int role) const
         TransferInfo* info = mTransfers.at(index.row())->getTransferInfo();
 
         if (info) {
-            Column col = (Column) index.column();
+            Column::ColumnEnum col = (Column::ColumnEnum) index.column();
 
             if (role == Qt::DisplayRole) {
                 switch (col) {
@@ -59,7 +59,7 @@ QVariant TransferTableModel::data(const QModelIndex &index, int role) const
                 case Column::FileSize : return Util::sizeToString(info->getDataSize());
                 case Column::State : return getStateString(info->getState());
                 case Column::Progress : return info->getProgress();
-                default : break; 
+                default : break;
                 }
             }
             else if (role == Qt::ForegroundRole && col == Column::State) {
@@ -74,7 +74,7 @@ QVariant TransferTableModel::data(const QModelIndex &index, int role) const
 QVariant TransferTableModel::headerData(int section, Qt::Orientation orientation, int role) const
 {
     if (orientation == Qt::Horizontal && role == Qt::DisplayRole) {
-        Column col = (Column) section;
+        Column::ColumnEnum col = (Column::ColumnEnum) section;
         switch (col) {
         case Column::Peer : return tr("Peer");
         case Column::FileName : return tr("File path");
@@ -100,20 +100,30 @@ void TransferTableModel::insertTransfer(Transfer *t)
     emit dataChanged(index(1, 0), index(mTransfers.size()-1, (int) Column::Count));
 
     TransferInfo* info = t->getTransferInfo();
-    connect(info, &TransferInfo::fileOpened, [=]() {
+    connect(info, SIGNAL(fileOpened()), this, SLOT(onFileOpened()));
+    connect(info, SIGNAL(stateChanged(TransferState)), this, SLOT(onStateChanged(TransferState)));
+}
+
+void TransferTableModel::onFileOpened()
+{
+    TransferInfo* info = qobject_cast<TransferInfo*>(sender());
+    if (info) {
         int idx = mTransfers.indexOf(info->getOwner());
         QModelIndex fNameIdx = index(idx, (int) Column::FileName);
         QModelIndex fSizeIdx = index(idx, (int) Column::FileSize);
         emit dataChanged(fNameIdx, fSizeIdx);
-    });
-
-    connect(info, &TransferInfo::stateChanged, [=](TransferState state) {
-        Q_UNUSED(state);
+    }
+}
 
+void TransferTableModel::onStateChanged(TransferState state)
+{
+    Q_UNUSED(state);
+    TransferInfo* info = qobject_cast<TransferInfo*>(sender());
+    if (info) {
         int idx = mTransfers.indexOf(info->getOwner());
         QModelIndex stateIdx = index(idx, (int) Column::State);
         emit dataChanged(stateIdx, stateIdx);
-    });
+    }
 }
 
 void TransferTableModel::clearCompleted()
@@ -121,10 +131,10 @@ void TransferTableModel::clearCompleted()
     for (int i = 0; i < mTransfers.size(); i++) {
         Transfer* t = mTransfers.at(i);
         TransferState state = t->getTransferInfo()->getState();
-        if (state == TransferState::Idle ||
-                state == TransferState::Finish ||
-                state == TransferState::Disconnected ||
-                state == TransferState::Cancelled) {
+        if (state == TransferStateNS::Idle ||
+                state == TransferStateNS::Finish ||
+                state == TransferStateNS::Disconnected ||
+                state == TransferStateNS::Cancelled) {
 
             beginRemoveRows(QModelIndex(), i, i);
             mTransfers.remove(i);
@@ -138,7 +148,7 @@ void TransferTableModel::clearCompleted()
 Transfer* TransferTableModel::getTransfer(int index) const
 {
     if (index < 0 || index >= mTransfers.size()) {
-        return nullptr;
+        return 0;
     }
 
     return mTransfers.at(index);
@@ -164,13 +174,13 @@ void TransferTableModel::removeTransfer(int index)
 QString TransferTableModel::getStateString(TransferState state) const
 {
     switch (state) {
-    case TransferState::Idle : return tr("Idle");
-    case TransferState::Waiting : return tr("Waiting");
-    case TransferState::Disconnected : return tr("Disconnected");
-    case TransferState::Paused : return tr("Paused");
-    case TransferState::Cancelled : return tr("Cancelled");
-    case TransferState::Transfering : return tr("Transfering");
-    case TransferState::Finish : return tr("Finish");
+    case TransferStateNS::Idle : return tr("Idle");
+    case TransferStateNS::Waiting : return tr("Waiting");
+    case TransferStateNS::Disconnected : return tr("Disconnected");
+    case TransferStateNS::Paused : return tr("Paused");
+    case TransferStateNS::Cancelled : return tr("Cancelled");
+    case TransferStateNS::Transfering : return tr("Transfering");
+    case TransferStateNS::Finish : return tr("Finish");
     }
 
     return QString();
@@ -179,13 +189,13 @@ QString TransferTableModel::getStateString(TransferState state) const
 QColor TransferTableModel::getStateColor(TransferState state) const
 {
     switch (state) {
-    case TransferState::Idle : return QColor("black");
-    case TransferState::Waiting : return QColor("orange");
-    case TransferState::Disconnected : return QColor("red");
-    case TransferState::Paused : return QColor("orange");
-    case TransferState::Cancelled : return QColor("red");
-    case TransferState::Transfering : return QColor("blue");
-    case TransferState::Finish : return QColor("green");
+    case TransferStateNS::Idle : return QColor("black");
+    case TransferStateNS::Waiting : return QColor("orange");
+    case TransferStateNS::Disconnected : return QColor("red");
+    case TransferStateNS::Paused : return QColor("orange");
+    case TransferStateNS::Cancelled : return QColor("red");
+    case TransferStateNS::Transfering : return QColor("blue");
+    case TransferStateNS::Finish : return QColor("green");
     }
 
     return QColor();
diff --git a/src/model/transfertablemodel.h b/src/model/transfertablemodel.h
index ce6f807..1975209 100644
--- a/src/model/transfertablemodel.h
+++ b/src/model/transfertablemodel.h
@@ -32,13 +32,13 @@ class TransferTableModel : public QAbstractTableModel
     Q_OBJECT
 
 public:
-    explicit TransferTableModel(QObject *parent = nullptr);
-    ~TransferTableModel() override;
+    explicit TransferTableModel(QObject *parent = 0);
+    ~TransferTableModel();
 
-    int rowCount(const QModelIndex &parent = QModelIndex()) const override;
-    int columnCount(const QModelIndex &parent = QModelIndex()) const override;
-    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
-    QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
+    int rowCount(const QModelIndex &parent = QModelIndex()) const;
+    int columnCount(const QModelIndex &parent = QModelIndex()) const;
+    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+    QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
 
     void insertTransfer(Transfer* t);
     void clearCompleted();
@@ -48,11 +48,17 @@ public:
 
     void removeTransfer(int index);
 
-    enum class Column : int {
-        Peer = 0, FileName, FileSize, State, Progress,
-        Count
+    struct Column {
+        enum ColumnEnum {
+            Peer = 0, FileName, FileSize, State, Progress,
+            Count
+        };
     };
 
+private Q_SLOTS:
+    void onFileOpened();
+    void onStateChanged(TransferState state);
+
 private:
     QString getStateString(TransferState state) const;
     QColor getStateColor(TransferState state) const;
diff --git a/src/settings.cpp b/src/settings.cpp
index 1f17d40..3b6cc8f 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -21,7 +21,7 @@
 #include <QUuid>
 #include <QSettings>
 #include <QDir>
-#include <QStandardPaths>
+#include <QDesktopServices>
 
 #include "settings.h"
 
@@ -33,6 +33,8 @@
 
 Settings* Settings::obj = new Settings;
 Settings::Settings()
+    : mBCPort(0), mTransferPort(0), mBCInterval(0),
+      mFileBuffSize(0), mReplaceExistingFile(false)
 {
     mThisDevice = Device();
     mThisDevice.setId(QUuid::createUuid().toString());
@@ -111,7 +113,7 @@ QString Settings::getDefaultDownloadPath()
 {
 #if defined (Q_OS_WIN)
     return
-        QStandardPaths::locate(QStandardPaths::DownloadLocation, QString(), QStandardPaths::LocateDirectory) + "LANShareDownloads";
+        QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation) + QDir::separator() + "LANShareDownloads";
 #else
     return QDir::homePath() + QDir::separator() + "LANShareDownloads";
 #endif
diff --git a/src/settings.h b/src/settings.h
index 3010c37..103a7fd 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -35,12 +35,12 @@
     #define OS_NAME "Unknown"
 #endif
 
-const QString PROGRAM_NAME{"LAN Share"};
-const QString PROGRAM_DESC{"A simple program that let you transfer files over local area network (LAN) easily."};
-constexpr int PROGRAM_X_VER{1};
-constexpr int PROGRAM_Y_VER{2};
-constexpr int PROGRAM_Z_VER{1};
-const QString SETTINGS_FILE{"LANSConfig"};
+const QString PROGRAM_NAME = "LAN Share";
+const QString PROGRAM_DESC = "A simple program that let you transfer files over local area network (LAN) easily.";
+const int PROGRAM_X_VER = 1;
+const int PROGRAM_Y_VER = 2;
+const int PROGRAM_Z_VER = 1;
+const QString SETTINGS_FILE = "LANSConfig";
 
 class Settings
 {
@@ -77,12 +77,12 @@ private:
     QString getDefaultDownloadPath();
 
     Device mThisDevice;
-    quint16 mBCPort{0};
-    quint16 mTransferPort{0};
-    quint16 mBCInterval{0};
-    qint32 mFileBuffSize{0};
+    quint16 mBCPort;
+    quint16 mTransferPort;
+    quint16 mBCInterval;
+    qint32 mFileBuffSize;
     QString mDownloadDir;
-    bool mReplaceExistingFile{false};
+    bool mReplaceExistingFile;
 
     static Settings* obj;
 };
diff --git a/src/singleinstance.cpp b/src/singleinstance.cpp
index 5250d5e..4b7fedd 100644
--- a/src/singleinstance.cpp
+++ b/src/singleinstance.cpp
@@ -23,7 +23,7 @@
 SingleInstance::SingleInstance(const QString& name, QObject* parent)
     : QObject(parent), mName(name)
 {
-    connect(&mServer, &QLocalServer::newConnection, this, &SingleInstance::onNewConnection);
+    connect(&mServer, SIGNAL(newConnection()), this, SLOT(onNewConnection()));
 }
 
 QString SingleInstance::getLastErrorString() const
diff --git a/src/singleinstance.h b/src/singleinstance.h
index 147a644..7fca6d3 100644
--- a/src/singleinstance.h
+++ b/src/singleinstance.h
@@ -32,7 +32,7 @@ class SingleInstance : public QObject
     Q_OBJECT
 
 public:
-    SingleInstance(const QString& id, QObject* parent = nullptr);
+    SingleInstance(const QString& id, QObject* parent = 0);
 
     QString getLastErrorString() const;
     bool start();
diff --git a/src/transfer/devicebroadcaster.cpp b/src/transfer/devicebroadcaster.cpp
index f64ee93..70c40de 100644
--- a/src/transfer/devicebroadcaster.cpp
+++ b/src/transfer/devicebroadcaster.cpp
@@ -19,12 +19,14 @@
 #include "devicebroadcaster.h"
 #include "settings.h"
 
+#include <QJson4/QJsonDocument.h>
+#include <QJson4/QJsonObject.h>
 #include <cassert>
 
 DeviceBroadcaster::DeviceBroadcaster(QObject *parent) : QObject(parent)
 {
-    connect(&mTimer, &QTimer::timeout, this, &DeviceBroadcaster::sendBroadcast);
-    connect(&mUdpSock, &QUdpSocket::readyRead, this, &DeviceBroadcaster::processBroadcast);
+    connect(&mTimer, SIGNAL(timeout()), this, SLOT(sendBroadcast()));
+    connect(&mUdpSock, SIGNAL(readyRead()), this, SLOT(processBroadcast()));
 
     mUdpSock.bind(Settings::instance()->getBroadcastPort(), QUdpSocket::ShareAddress);
 }
@@ -40,15 +42,16 @@ void DeviceBroadcaster::sendBroadcast()
 {
     int port = Settings::instance()->getBroadcastPort();
     Device dev = Settings::instance()->getMyDevice();
-    QJsonObject obj(QJsonObject::fromVariantMap({
-                                                    {"id", dev.getId()},
-                                                    {"name", dev.getName()},
-                                                    {"os", dev.getOSName()},
-                                                    {"port", port}
-                                                }));
 
+    QVariantMap map;
+    map["id"] = dev.getId();
+    map["name"] = dev.getName();
+    map["os"] = dev.getOSName();
+    map["port"] = port;
+
+    QJsonObject obj = QJsonObject::fromVariantMap(map);
     QVector<QHostAddress> addresses = getBroadcastAddressFromInterfaces();
-    QByteArray data(QJsonDocument(obj).toJson(QJsonDocument::Compact));
+    QByteArray data = QJsonDocument(obj).toJson(QJsonDocument::Compact);
     foreach (QHostAddress address, addresses) {
         mUdpSock.writeDatagram(data, address, port);
     }
@@ -75,8 +78,8 @@ void DeviceBroadcaster::processBroadcast()
             if (obj.value("port").toVariant().value<quint16>() ==
                     Settings::instance()->getBroadcastPort()) {
 
-                Device device{obj.value("id").toString(), obj.value("name").toString(),
-                              obj.value("os").toString(), sender};
+                Device device(obj.value("id").toString(), obj.value("name").toString(),
+                              obj.value("os").toString(), sender);
                 emit broadcastReceived(device);
             }
         }
diff --git a/src/transfer/devicebroadcaster.h b/src/transfer/devicebroadcaster.h
index bdcf69e..52b2086 100644
--- a/src/transfer/devicebroadcaster.h
+++ b/src/transfer/devicebroadcaster.h
@@ -35,7 +35,7 @@ class DeviceBroadcaster : public QObject
     Q_OBJECT
 
 public:
-    explicit DeviceBroadcaster(QObject *parent = nullptr);
+    explicit DeviceBroadcaster(QObject *parent = 0);
 
 Q_SIGNALS:
     void broadcastReceived(const Device& fromDevice);
diff --git a/src/transfer/receiver.cpp b/src/transfer/receiver.cpp
index 342e594..3641662 100644
--- a/src/transfer/receiver.cpp
+++ b/src/transfer/receiver.cpp
@@ -16,8 +16,8 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <QJsonObject>
-#include <QJsonDocument>
+#include <QJson4/QJsonObject.h>
+#include <QJson4/QJsonDocument.h>
 #include <QDir>
 
 #include "util.h"
@@ -27,10 +27,10 @@
 Receiver::Receiver(const Device& sender, QTcpSocket* socket, QObject* parent)
     : Transfer(socket, parent), mSenderDev(sender), mFileSize(0), mBytesRead(0)
 {
-    mInfo->setState(TransferState::Waiting);
-    connect(mSocket, &QTcpSocket::disconnected, this, &Receiver::onDisconnected);
+    mInfo->setState(TransferStateNS::Waiting);
+    connect(mSocket, SIGNAL(disconnected()), this, SLOT(onDisconnected()));
 
-    mInfo->setTransferType(TransferType::Download);
+    mInfo->setTransferType(TransferTypeNS::Download);
     mInfo->setPeer(sender);
 }
 
@@ -38,33 +38,33 @@ void Receiver::resume()
 {
     if (mInfo->canResume()) {
         mInfo->setState(mInfo->getLastState());
-        writePacket(0, PacketType::Resume, QByteArray());
+        writePacket(0, PacketTypeNS::Resume, QByteArray());
     }
 }
 
 void Receiver::pause()
 {
     if (mInfo->canPause()) {
-        mInfo->setState(TransferState::Paused);
-        writePacket(0, PacketType::Pause, QByteArray());
+        mInfo->setState(TransferStateNS::Paused);
+        writePacket(0, PacketTypeNS::Pause, QByteArray());
     }
 }
 
 void Receiver::cancel()
 {
     if (mInfo->canCancel()) {
-        mInfo->setState(TransferState::Cancelled);
+        mInfo->setState(TransferStateNS::Cancelled);
         mInfo->setProgress(0);
         clearReadBuffer();
-        writePacket(0, PacketType::Cancel, QByteArray());
+        writePacket(0, PacketTypeNS::Cancel, QByteArray());
         mFile->remove();
     }
 }
 
 void Receiver::onDisconnected()
 {
-    mInfo->setState(TransferState::Disconnected);
-    emit mInfo->errorOcurred("Sender disconnected");
+    mInfo->setState(TransferStateNS::Disconnected);
+    mInfo->emitErrorOcurred("Sender disconnected");
 }
 
 void Receiver::processHeaderPacket(QByteArray& data)
@@ -98,11 +98,11 @@ void Receiver::processHeaderPacket(QByteArray& data)
     mInfo->setFilePath(dstFilePath);
     mFile = new QFile(dstFilePath, this);
     if (mFile->open(QIODevice::WriteOnly)) {
-        mInfo->setState(TransferState::Transfering);
-        emit mInfo->fileOpened();
+        mInfo->setState(TransferStateNS::Transfering);
+        mInfo->emitFileOpened();
     }
     else {
-        emit mInfo->errorOcurred(tr("Failed to write ") + dstFilePath);
+        mInfo->emitErrorOcurred(tr("Failed to write ") + dstFilePath);
     }
 }
 
@@ -120,17 +120,17 @@ void Receiver::processFinishPacket(QByteArray& data)
 {
     Q_UNUSED(data);
 
-    mInfo->setState(TransferState::Finish);
+    mInfo->setState(TransferStateNS::Finish);
     mFile->close();
     mSocket->disconnectFromHost();
-    emit mInfo->done();
+    mInfo->emitDone();
 }
 
 void Receiver::processCancelPacket(QByteArray& data)
 {
     Q_UNUSED(data);
 
-    mInfo->setState(TransferState::Cancelled);
+    mInfo->setState(TransferStateNS::Cancelled);
     mInfo->setProgress(0);
     clearReadBuffer();
     mFile->remove();
diff --git a/src/transfer/receiver.h b/src/transfer/receiver.h
index 13ce064..28d43ee 100644
--- a/src/transfer/receiver.h
+++ b/src/transfer/receiver.h
@@ -25,24 +25,24 @@
 class Receiver : public Transfer
 {
 public:
-    Receiver(const Device& sender, QTcpSocket* socket, QObject* parent = nullptr);
+    Receiver(const Device& sender, QTcpSocket* socket, QObject* parent = 0);
 
     inline Device getSender() const { return mSenderDev; }
     inline qint64 getReceivedFileSize() const { return mFileSize; }
     inline qint64 getBytesWritten() const { return mBytesRead; }
 
-    void resume() override;
-    void pause() override;
-    void cancel() override;
+    void resume();
+    void pause();
+    void cancel();
 
 private Q_SLOTS:
     void onDisconnected();
 
 private:
-    void processHeaderPacket(QByteArray& data) override;
-    void processDataPacket(QByteArray& data) override;
-    void processFinishPacket(QByteArray& data) override;
-    void processCancelPacket(QByteArray& data) override;
+    void processHeaderPacket(QByteArray& data);
+    void processDataPacket(QByteArray& data);
+    void processFinishPacket(QByteArray& data);
+    void processCancelPacket(QByteArray& data);
 
     Device mSenderDev;
 
diff --git a/src/transfer/sender.cpp b/src/transfer/sender.cpp
index 82d0f03..912ff73 100644
--- a/src/transfer/sender.cpp
+++ b/src/transfer/sender.cpp
@@ -16,8 +16,8 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <QJsonDocument>
-#include <QJsonObject>
+#include <QJson4/QJsonDocument.h>
+#include <QJson4/QJsonObject.h>
 #include <QDir>
 #include <QtDebug>
 
@@ -25,7 +25,7 @@
 #include "sender.h"
 
 Sender::Sender(const Device& receiver, const QString& folderName, const QString& filePath, QObject* parent)
-    : Transfer(nullptr, parent), mReceiverDev(receiver), mFilePath(filePath), mFolderName(folderName)
+    : Transfer(0, parent), mReceiverDev(receiver), mFilePath(filePath), mFolderName(folderName)
 {
     mFileSize = -1;
     mBytesRemaining = -1;
@@ -38,7 +38,7 @@ Sender::Sender(const Device& receiver, const QString& folderName, const QString&
     mPausedByReceiver = false;
     mIsHeaderSent = false;
 
-    mInfo->setTransferType(TransferType::Upload);
+    mInfo->setTransferType(TransferTypeNS::Upload);
     mInfo->setPeer(receiver);
 }
 
@@ -51,18 +51,18 @@ bool Sender::start()
         mFileSize = mFile->size();
         mInfo->setDataSize(mFileSize);
         mBytesRemaining = mFileSize;
-        emit mInfo->fileOpened();
+        mInfo->emitFileOpened();
     }
 
     if (mFileSize > 0) {
         QHostAddress receiverAddress = mReceiverDev.getAddress();
         setSocket(new QTcpSocket(this));
         mSocket->connectToHost(receiverAddress, Settings::instance()->getTransferPort(), QAbstractSocket::ReadWrite);
-        mInfo->setState(TransferState::Waiting);
+        mInfo->setState(TransferStateNS::Waiting);
 
-        connect(mSocket, &QTcpSocket::bytesWritten, this, &Sender::onBytesWritten);
-        connect(mSocket, &QTcpSocket::connected, this, &Sender::onConnected);
-        connect(mSocket, &QTcpSocket::disconnected, this, &Sender::onDisconnected);
+        connect(mSocket, SIGNAL(bytesWritten(qint64)), this, SLOT(onBytesWritten(qint64)));
+        connect(mSocket, SIGNAL(connected()), this, SLOT(onConnected()));
+        connect(mSocket, SIGNAL(disconnected()), this, SLOT(onDisconnected()));
     }
 
     return ok && mSocket;
@@ -80,7 +80,7 @@ void Sender::resume()
 void Sender::pause()
 {
     if (mInfo->canPause()) {
-        mInfo->setState(TransferState::Paused);
+        mInfo->setState(TransferStateNS::Paused);
         mPaused = true;
     }
 }
@@ -88,8 +88,8 @@ void Sender::pause()
 void Sender::cancel()
 {
     if (mInfo->canCancel()) {
-        writePacket(0, PacketType::Cancel, QByteArray());
-        mInfo->setState(TransferState::Cancelled);
+        writePacket(0, PacketTypeNS::Cancel, QByteArray());
+        mInfo->setState(TransferStateNS::Cancelled);
         mInfo->setProgress(0);
         mCancelled = true;
     }
@@ -97,14 +97,14 @@ void Sender::cancel()
 
 void Sender::onConnected()
 {
-    mInfo->setState(TransferState::Transfering);
+    mInfo->setState(TransferStateNS::Transfering);
     sendHeader();
 }
 
 void Sender::onDisconnected()
 {
-    mInfo->setState(TransferState::Disconnected);
-    emit mInfo->errorOcurred(tr("Receiver disconnected"));
+    mInfo->setState(TransferStateNS::Disconnected);
+    mInfo->emitErrorOcurred(tr("Receiver disconnected"));
 }
 
 void Sender::onBytesWritten(qint64 bytes)
@@ -119,10 +119,10 @@ void Sender::onBytesWritten(qint64 bytes)
 void Sender::finish()
 {
     mFile->close();
-    mInfo->setState(TransferState::Finish);
-    emit mInfo->done();
+    mInfo->setState(TransferStateNS::Finish);
+    mInfo->emitDone();
 
-    writePacket(0, PacketType::Finish, QByteArray());
+    writePacket(0, PacketTypeNS::Finish, QByteArray());
 }
 
 void Sender::sendData()
@@ -137,7 +137,7 @@ void Sender::sendData()
 
     qint64 bytesRead = mFile->read(mFileBuff.data(), mFileBuffSize);
     if (bytesRead == -1) {
-        emit mInfo->errorOcurred(tr("Error while reading file."));
+        mInfo->emitErrorOcurred(tr("Error while reading file."));
         return;
     }
 
@@ -147,7 +147,7 @@ void Sender::sendData()
 
     mInfo->setProgress( (int) ((mFileSize-mBytesRemaining) * 100 / mFileSize) );
 
-    writePacket(mFileBuffSize, PacketType::Data, mFileBuff);
+    writePacket(mFileBuffSize, PacketTypeNS::Data, mFileBuff);
 
     if (!mBytesRemaining) {
         finish();
@@ -158,15 +158,15 @@ void Sender::sendHeader()
 {
     QString fName = QDir(mFile->fileName()).dirName();
 
-    QJsonObject obj( QJsonObject::fromVariantMap({
-                                    {"name", fName},
-                                    {"folder", mFolderName },
-                                    {"size", mFileSize}
-                                }));
+    QVariantMap map;
+    map["name"] = fName;
+    map["folder"] = mFolderName;
+    map["size"] = mFileSize;
 
-    QByteArray headerData( QJsonDocument(obj).toJson() );
+    QJsonObject obj = QJsonObject::fromVariantMap(map);
+    QByteArray headerData = QJsonDocument(obj).toJson();
 
-    writePacket(headerData.size(), PacketType::Header, headerData);
+    writePacket(headerData.size(), PacketTypeNS::Header, headerData);
     mIsHeaderSent = true;
 }
 
@@ -174,7 +174,7 @@ void Sender::processCancelPacket(QByteArray& data)
 {
     Q_UNUSED(data);
 
-    mInfo->setState(TransferState::Cancelled);
+    mInfo->setState(TransferStateNS::Cancelled);
     mInfo->setProgress(0);
     mSocket->disconnectFromHost();
     mCancelled = true;
diff --git a/src/transfer/sender.h b/src/transfer/sender.h
index 4aac9b6..ac6838d 100644
--- a/src/transfer/sender.h
+++ b/src/transfer/sender.h
@@ -25,15 +25,15 @@
 class Sender : public Transfer
 {
 public:
-    Sender(const Device& receiver, const QString& folderName, const QString& filePath, QObject* parent = nullptr);
+    Sender(const Device& receiver, const QString& folderName, const QString& filePath, QObject* parent = 0);
 
     bool start();
 
     Device getReceiver() const { return mReceiverDev; }
 
-    void resume() override;
-    void pause() override;
-    void cancel() override;
+    void resume();
+    void pause();
+    void cancel();
 
 private Q_SLOTS:
     void onBytesWritten(qint64 bytes);
@@ -45,9 +45,9 @@ private:
     void sendData();
     void sendHeader();
 
-    void processCancelPacket(QByteArray& data) override;
-    void processPausePacket(QByteArray& data) override;
-    void processResumePacket(QByteArray& data) override;
+    void processCancelPacket(QByteArray& data);
+    void processPausePacket(QByteArray& data);
+    void processResumePacket(QByteArray& data);
 
     Device mReceiverDev;
     QString mFilePath;
diff --git a/src/transfer/transfer.cpp b/src/transfer/transfer.cpp
index 75d3eea..725c065 100644
--- a/src/transfer/transfer.cpp
+++ b/src/transfer/transfer.cpp
@@ -19,7 +19,7 @@
 #include "transfer.h"
 
 Transfer::Transfer(QTcpSocket* socket, QObject* parent)
-    : QObject(parent), mFile(nullptr), mSocket(nullptr),
+    : QObject(parent), mFile(0), mSocket(0),
       mPacketSize(-1)
 {
     mInfo = new TransferInfo(this, this);
@@ -47,7 +47,7 @@ void Transfer::onReadyRead()
     /*
      * Abaikan data yg diterima jika state transfer 'Cancelled' (Dibatalkan)
      */
-    if (mInfo->getState() == TransferState::Cancelled)
+    if (mInfo->getState() == TransferStateNS::Cancelled)
         return;
 
     mBuff.append(mSocket->readAll());
@@ -90,12 +90,12 @@ void Transfer::writePacket(qint32 packetDataSize, PacketType type, const QByteAr
 void Transfer::processPacket(QByteArray &data, PacketType type)
 {
     switch (type) {
-    case PacketType::Header : processHeaderPacket(data); break;
-    case PacketType::Data : processDataPacket(data); break;
-    case PacketType::Finish : processFinishPacket(data); break;
-    case PacketType::Cancel : processCancelPacket(data); break;
-    case PacketType::Pause : processPausePacket(data); break;
-    case PacketType::Resume : processResumePacket(data); break;
+    case PacketTypeNS::Header : processHeaderPacket(data); break;
+    case PacketTypeNS::Data : processDataPacket(data); break;
+    case PacketTypeNS::Finish : processFinishPacket(data); break;
+    case PacketTypeNS::Cancel : processCancelPacket(data); break;
+    case PacketTypeNS::Pause : processPausePacket(data); break;
+    case PacketTypeNS::Resume : processResumePacket(data); break;
     }
 }
 
@@ -140,7 +140,7 @@ void Transfer::setSocket(QTcpSocket *socket)
 {
     if (socket) {
         mSocket = socket;
-        connect(mSocket, &QTcpSocket::readyRead, this, &Transfer::onReadyRead);
+        connect(mSocket, SIGNAL(readyRead()), this, SLOT(onReadyRead()));
     }
 }
 
diff --git a/src/transfer/transfer.h b/src/transfer/transfer.h
index 2bb61c0..5ec43e7 100644
--- a/src/transfer/transfer.h
+++ b/src/transfer/transfer.h
@@ -27,22 +27,25 @@
 #include "model/transferinfo.h"
 
 
-enum class PacketType : char
-{
-    Header = 0x01,
-    Data,
-    Finish,
-    Cancel,
-    Pause,
-    Resume
-};
+namespace PacketTypeNS {
+    enum PacketType
+    {
+        Header = 0x01,
+        Data,
+        Finish,
+        Cancel,
+        Pause,
+        Resume
+    };
+}
+typedef PacketTypeNS::PacketType PacketType;
 
 class Transfer : public QObject
 {
     Q_OBJECT
 
 public:
-    Transfer(QTcpSocket* socket, QObject* parent = nullptr);
+    Transfer(QTcpSocket* socket, QObject* parent = 0);
 
     inline QFile* getFile() const { return mFile; }
     inline QTcpSocket* getSocket() const { return mSocket; }
diff --git a/src/transfer/transferserver.cpp b/src/transfer/transferserver.cpp
index 0582e51..dcf6f04 100644
--- a/src/transfer/transferserver.cpp
+++ b/src/transfer/transferserver.cpp
@@ -24,7 +24,7 @@ TransferServer::TransferServer(DeviceListModel* devList, QObject *parent) : QObj
 {
     mDevList = devList;
     mServer = new QTcpServer(this);
-    connect(mServer, &QTcpServer::newConnection, this, &TransferServer::onNewConnection);
+    connect(mServer, SIGNAL(newConnection()), this, SLOT(onNewConnection()));
 }
 
 bool TransferServer::listen(const QHostAddress &addr)
diff --git a/src/transfer/transferserver.h b/src/transfer/transferserver.h
index 1315134..fcf8db0 100644
--- a/src/transfer/transferserver.h
+++ b/src/transfer/transferserver.h
@@ -30,7 +30,7 @@ class TransferServer : public QObject
     Q_OBJECT
 
 public:
-    explicit TransferServer(DeviceListModel* devList, QObject *parent = nullptr);
+    explicit TransferServer(DeviceListModel* devList, QObject *parent = 0);
 
     bool listen(const QHostAddress& addr = QHostAddress::Any);
 
diff --git a/src/ui/aboutdialog.h b/src/ui/aboutdialog.h
index e030025..d4be59f 100644
--- a/src/ui/aboutdialog.h
+++ b/src/ui/aboutdialog.h
@@ -30,8 +30,8 @@ class AboutDialog : public QDialog
     Q_OBJECT
 
 public:
-    explicit AboutDialog(QWidget *parent = nullptr);
-    ~AboutDialog() override;
+    explicit AboutDialog(QWidget *parent = 0);
+    ~AboutDialog();
 
 private Q_SLOTS:
     void onCreditsClicked(bool checked);
diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp
index cd50d4e..df98e90 100644
--- a/src/ui/mainwindow.cpp
+++ b/src/ui/mainwindow.cpp
@@ -40,6 +40,7 @@
 
 MainWindow::MainWindow(QWidget *parent) :
     QMainWindow(parent),
+    mForceQuit(false),
     ui(new Ui::MainWindow)
 {
     ui->setupUi(this);
@@ -80,6 +81,26 @@ MainWindow::~MainWindow()
  * Sebelum ditutup, check apakah masih terdapat proses trasfer
  * yg berlangsung, (Sending atau Receiving)
  */
+static bool checkTransferState(Transfer* t) {
+    if (!t)
+        return false;
+    TransferState state = t->getTransferInfo()->getState();
+    return state == TransferStateNS::Paused ||
+            state == TransferStateNS::Transfering ||
+            state == TransferStateNS::Waiting;
+}
+
+static bool checkTransferModel(TransferTableModel* model) {
+    int count = model->rowCount();
+    for (int i = 0; i < count; i++) {
+        Transfer* t = model->getTransfer(i);
+        if (checkTransferState(t)) {
+            return true;
+        }
+    }
+    return false;
+}
+
 void MainWindow::closeEvent(QCloseEvent *event)
 {
     if (mSystrayIcon && mSystrayIcon->isVisible() && !mForceQuit) {
@@ -88,27 +109,6 @@ void MainWindow::closeEvent(QCloseEvent *event)
         return;
     }
 
-    auto checkTransferState = [](Transfer* t) {
-        if (!t)
-            return false;
-        TransferState state = t->getTransferInfo()->getState();
-        return state == TransferState::Paused ||
-                state == TransferState::Transfering ||
-                state == TransferState::Waiting;
-    };
-
-    auto checkTransferModel = [&](TransferTableModel* model) {
-        int count = model->rowCount();
-        for (int i = 0; i < count; i++) {
-            Transfer* t = model->getTransfer(i);
-            if (checkTransferState(t)) {
-                return true;
-            }
-        }
-
-        return false;
-    };
-
     bool needToConfirm = checkTransferModel(mSenderModel);
     if (!needToConfirm)
         needToConfirm = checkTransferModel(mReceiverModel);
@@ -146,15 +146,15 @@ void MainWindow::setMainWindowVisibility(bool visible)
 
 void MainWindow::connectSignals()
 {
-    connect(mTransServer, &TransferServer::newReceiverAdded, this, &MainWindow::onNewReceiverAdded);
+    connect(mTransServer, SIGNAL(newReceiverAdded(Receiver*)), this, SLOT(onNewReceiverAdded(Receiver*())));
 
     QItemSelectionModel* senderSel = ui->senderTableView->selectionModel();
-    connect(senderSel, &QItemSelectionModel::selectionChanged,
-            this, &MainWindow::onSenderTableSelectionChanged);
+    connect(senderSel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
+            this, SLOT(onSenderTableSelectionChanged(QItemSelection,QItemSelection())));
 
     QItemSelectionModel* receiverSel = ui->receiverTableView->selectionModel();
-    connect(receiverSel, &QItemSelectionModel::selectionChanged,
-            this, &MainWindow::onReceiverTableSelectionChanged);
+    connect(receiverSel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
+            this, SLOT(onReceiverTableSelectionChanged(QItemSelection,QItemSelection())));
 }
 
 void MainWindow::sendFile(const QString& folderName, const QString &filePath, const Device &receiver)
@@ -168,7 +168,7 @@ void MainWindow::sendFile(const QString& folderName, const QString &filePath, co
      * tambah progress bar pada item transfer
      */
     QProgressBar* progress = new QProgressBar();
-    connect(sender->getTransferInfo(), &TransferInfo::progressChanged, progress, &QProgressBar::setValue);
+    connect(sender->getTransferInfo(), SIGNAL(progressChanged(int)), progress, SLOT(setValue(int)));
 
     ui->senderTableView->setIndexWidget(progressIdx, progress);
     ui->senderTableView->scrollToTop();
@@ -179,7 +179,7 @@ void MainWindow::selectReceiversAndSendTheFiles(QVector<QPair<QString, QString>
     ReceiverSelectorDialog dialog(mDeviceModel);
     if (dialog.exec() == QDialog::Accepted) {
         QVector<Device> receivers = dialog.getSelectedDevices();
-        for (const Device& receiver : receivers) {
+        foreach (const Device& receiver, receivers) {
             if (receiver.isValid()) {
 
                 /*
@@ -187,7 +187,8 @@ void MainWindow::selectReceiversAndSendTheFiles(QVector<QPair<QString, QString>
                  * Just to make sure.
                  */
                 mBroadcaster->sendBroadcast();
-                for (const auto& p : dirNameAndFullPath) {
+                for (int i = 0; i < dirNameAndFullPath.size(); ++i) {
+                    const QPair<QString, QString>& p = dirNameAndFullPath[i];
                     sendFile(p.first, p.second, receiver);
                 }
 
@@ -208,7 +209,7 @@ void MainWindow::onSendFilesActionTriggered()
         return;
 
     QVector<QPair<QString, QString> > pairs;
-    for (const auto& fName : fileNames)
+    foreach (const QString& fName, fileNames)
         pairs.push_back( QPair<QString, QString>("", fName) );
 
     selectReceiversAndSendTheFiles(pairs);
@@ -241,12 +242,12 @@ void MainWindow::onSendFolderActionTriggered()
      */
     QVector< QPair<QString, QString> > pairs;
     dirs = fDialog.selectedFiles();
-    for (const auto& dirName : dirs) {
+    foreach (const QString& dirName, dirs) {
 
         QDir dir(dirName);
         QVector< QPair<QString, QString> > ps =
                 Util::getInnerDirNameAndFullFilePath(dir, dir.dirName());
-        pairs.append(ps);
+        pairs += ps;
     }
 
     selectReceiversAndSendTheFiles(pairs);
@@ -267,7 +268,7 @@ void MainWindow::onAboutActionTriggered()
 void MainWindow::onNewReceiverAdded(Receiver *rec)
 {
     QProgressBar* progress = new QProgressBar();
-    connect(rec->getTransferInfo(), &TransferInfo::progressChanged, progress, &QProgressBar::setValue);
+    connect(rec->getTransferInfo(), SIGNAL(progressChanged(int)), progress, SLOT(setValue(int)));
     mReceiverModel->insertTransfer(rec);
     QModelIndex progressIdx = mReceiverModel->index(0, (int)TransferTableModel::Column::Progress);
 
@@ -286,7 +287,7 @@ void MainWindow::onSenderTableSelectionChanged(const QItemSelection &selected, c
             ui->pauseSenderBtn->setEnabled(ti->canPause());
             ui->cancelSenderBtn->setEnabled(ti->canCancel());
 
-            connect(ti, &TransferInfo::stateChanged, this, &MainWindow::onSelectedSenderStateChanged);
+            connect(ti, SIGNAL(stateChanged(TransferState)), this, SLOT(onSelectedSenderStateChanged(TransferState())));
         }
 
     }
@@ -296,7 +297,7 @@ void MainWindow::onSenderTableSelectionChanged(const QItemSelection &selected, c
         QModelIndex first = deselected.indexes().first();
         if (first.isValid()) {
             TransferInfo* ti = mSenderModel->getTransferInfo(first.row());
-            disconnect(ti, &TransferInfo::stateChanged, this, &MainWindow::onSelectedSenderStateChanged);
+            disconnect(ti, SIGNAL(stateChanged(TransferState)), this, SLOT(onSelectedSenderStateChanged(TransferState())));
         }
 
     }
@@ -345,7 +346,7 @@ void MainWindow::onReceiverTableDoubleClicked(const QModelIndex& index)
 {
     if (index.isValid()) {
         TransferInfo* ti = mReceiverModel->getTransferInfo(index.row());
-        if (ti && ti->getState() == TransferState::Finish)
+        if (ti && ti->getState() == TransferStateNS::Finish)
             openReceiverFileInCurrentIndex();
     }
 }
@@ -366,7 +367,7 @@ void MainWindow::onReceiverTableSelectionChanged(const QItemSelection &selected,
             ui->pauseReceiverBtn->setEnabled(ti->canPause());
             ui->cancelReceiverBtn->setEnabled(ti->canCancel());
 
-            connect(ti, &TransferInfo::stateChanged, this, &MainWindow::onSelectedReceiverStateChanged);
+            connect(ti, SIGNAL(stateChanged(TransferState)), this, SLOT(onSelectedReceiverStateChanged(TransferState())));
         }
 
     }
@@ -376,7 +377,7 @@ void MainWindow::onReceiverTableSelectionChanged(const QItemSelection &selected,
         QModelIndex first = deselected.indexes().first();
         if (first.isValid()) {
             TransferInfo* ti = mReceiverModel->getTransferInfo(first.row());
-            disconnect(ti, &TransferInfo::stateChanged, this, &MainWindow::onSelectedReceiverStateChanged);
+            disconnect(ti, SIGNAL(stateChanged(TransferState)), this, SLOT(onSelectedReceiverStateChanged(TransferState())));
         }
 
     }
@@ -417,10 +418,10 @@ void MainWindow::onSenderTableContextMenuRequested(const QPoint& pos)
     if (currIndex.isValid()) {
         TransferInfo* ti = mSenderModel->getTransferInfo(currIndex.row());
         TransferState state = ti->getState();
-        bool enableRemove = state == TransferState::Finish ||
-                            state == TransferState::Cancelled ||
-                            state == TransferState::Disconnected ||
-                            state == TransferState::Idle;
+        bool enableRemove = state == TransferStateNS::Finish ||
+                            state == TransferStateNS::Cancelled ||
+                            state == TransferStateNS::Disconnected ||
+                            state == TransferStateNS::Idle;
 
         mSenderRemoveAction->setEnabled(enableRemove);
         mSenderPauseAction->setEnabled(ti->canPause());
@@ -459,11 +460,11 @@ void MainWindow::onReceiverTableContextMenuRequested(const QPoint& pos)
     if (currIndex.isValid()) {
         TransferInfo* ti = mReceiverModel->getTransferInfo(currIndex.row());
         TransferState state = ti->getState();
-        bool enableFileMenu = state == TransferState::Finish;
-        bool enableRemove = state == TransferState::Finish ||
-                            state == TransferState::Cancelled ||
-                            state == TransferState::Disconnected ||
-                            state == TransferState::Idle;
+        bool enableFileMenu = state == TransferStateNS::Finish;
+        bool enableRemove = state == TransferStateNS::Finish ||
+                            state == TransferStateNS::Cancelled ||
+                            state == TransferStateNS::Disconnected ||
+                            state == TransferStateNS::Idle;
 
         mRecOpenAction->setEnabled(enableFileMenu);
         mRecOpenFolderAction->setEnabled(enableFileMenu);
@@ -555,18 +556,18 @@ void MainWindow::deleteReceiverFileInCurrentIndex()
 
 void MainWindow::onSelectedSenderStateChanged(TransferState state)
 {
-    ui->resumeSenderBtn->setEnabled(state == TransferState::Paused);
-    ui->pauseSenderBtn->setEnabled(state == TransferState::Transfering || state == TransferState::Waiting);
-    ui->cancelSenderBtn->setEnabled(state == TransferState::Transfering || state == TransferState::Waiting ||
-                                    state == TransferState::Paused);
+    ui->resumeSenderBtn->setEnabled(state == TransferStateNS::Paused);
+    ui->pauseSenderBtn->setEnabled(state == TransferStateNS::Transfering || state == TransferStateNS::Waiting);
+    ui->cancelSenderBtn->setEnabled(state == TransferStateNS::Transfering || state == TransferStateNS::Waiting ||
+                                    state == TransferStateNS::Paused);
 }
 
 void MainWindow::onSelectedReceiverStateChanged(TransferState state)
 {
-    ui->resumeReceiverBtn->setEnabled(state == TransferState::Paused);
-    ui->pauseReceiverBtn->setEnabled(state == TransferState::Transfering || state == TransferState::Waiting);
-    ui->cancelReceiverBtn->setEnabled(state == TransferState::Transfering || state == TransferState::Waiting ||
-                                    state == TransferState::Paused);
+    ui->resumeReceiverBtn->setEnabled(state == TransferStateNS::Paused);
+    ui->pauseReceiverBtn->setEnabled(state == TransferStateNS::Transfering || state == TransferStateNS::Waiting);
+    ui->cancelReceiverBtn->setEnabled(state == TransferStateNS::Transfering || state == TransferStateNS::Waiting ||
+                                    state == TransferStateNS::Paused);
 }
 
 void MainWindow::quitApp()
@@ -612,59 +613,59 @@ void MainWindow::setupToolbar()
 void MainWindow::setupActions()
 {
     mShowMainWindowAction = new QAction(tr("Show Main Window"), this);
-    connect(mShowMainWindowAction, &QAction::triggered, this, &MainWindow::onShowMainWindowTriggered);
+    connect(mShowMainWindowAction, SIGNAL(triggered()), this, SLOT(onShowMainWindowTriggered()));
     mSendFilesAction = new QAction(QIcon(":/img/file.png"), tr("Send files..."), this);
-    connect(mSendFilesAction, &QAction::triggered, this, &MainWindow::onSendFilesActionTriggered);
+    connect(mSendFilesAction, SIGNAL(triggered()), this, SLOT(onSendFilesActionTriggered()));
     mSendFolderAction = new QAction(QIcon(":/img/folder.png"), tr("Send folders..."), this);
-    connect(mSendFolderAction, &QAction::triggered, this, &MainWindow::onSendFolderActionTriggered);
+    connect(mSendFolderAction, SIGNAL(triggered()), this, SLOT(onSendFolderActionTriggered()));
     mSettingsAction = new QAction(QIcon(":/img/settings.png"), tr("Settings"), this);
-    connect(mSettingsAction, &QAction::triggered, this, &MainWindow::onSettingsActionTriggered);
+    connect(mSettingsAction, SIGNAL(triggered()), this, SLOT(onSettingsActionTriggered()));
     mAboutAction = new QAction(QIcon(":/img/about.png"), tr("About"), this);
     mAboutAction->setMenuRole(QAction::AboutRole);
-    connect(mAboutAction, &QAction::triggered, this, &MainWindow::onAboutActionTriggered);
+    connect(mAboutAction, SIGNAL(triggered()), this, SLOT(onAboutActionTriggered()));
     mAboutQtAction = new QAction(tr("About Qt"), this);
     mAboutQtAction->setMenuRole(QAction::AboutQtRole);
-    connect(mAboutQtAction, &QAction::triggered, QApplication::instance(), &QApplication::aboutQt);
+    connect(mAboutQtAction, SIGNAL(triggered()), QApplication::instance(), SLOT(aboutQt()));
     mQuitAction = new QAction(tr("Quit"), this);
-    connect(mQuitAction, &QAction::triggered, this, &MainWindow::quitApp);
+    connect(mQuitAction, SIGNAL(triggered()), this, SLOT(quitApp()));
 
     mSenderOpenAction = new QAction(tr("Open"), this);
-    connect(mSenderOpenAction, &QAction::triggered, this, &MainWindow::openSenderFileInCurrentIndex);
+    connect(mSenderOpenAction, SIGNAL(triggered()), this, SLOT(openSenderFileInCurrentIndex()));
     mSenderOpenFolderAction = new QAction(tr("Open folder"), this);
-    connect(mSenderOpenFolderAction, &QAction::triggered, this, &MainWindow::openSenderFolderInCurrentIndex);
+    connect(mSenderOpenFolderAction, SIGNAL(triggered()), this, SLOT(openSenderFolderInCurrentIndex()));
     mSenderRemoveAction = new QAction(QIcon(":/img/remove.png"), tr("Remove"), this);
-    connect(mSenderRemoveAction, &QAction::triggered, this, &MainWindow::removeSenderItemInCurrentIndex);
+    connect(mSenderRemoveAction, SIGNAL(triggered()), this, SLOT(removeSenderItemInCurrentIndex()));
     mSenderClearAction = new QAction(QIcon(":/img/clear.png"), tr("Clear"), this);
-    connect(mSenderClearAction, &QAction::triggered, this, &MainWindow::onSenderClearClicked);
+    connect(mSenderClearAction, SIGNAL(triggered()), this, SLOT(onSenderClearClicked()));
     mSenderPauseAction = new QAction(QIcon(":/img/pause.png"), tr("Pause"), this);
-    connect(mSenderPauseAction, &QAction::triggered, this, &MainWindow::onSenderPauseClicked);
+    connect(mSenderPauseAction, SIGNAL(triggered()), this, SLOT(onSenderPauseClicked()));
     mSenderResumeAction = new QAction(QIcon(":/img/resume.png"), tr("Resume"), this);
-    connect(mSenderResumeAction, &QAction::triggered, this, &MainWindow::onSenderResumeClicked);
+    connect(mSenderResumeAction, SIGNAL(triggered()), this, SLOT(onSenderResumeClicked()));
     mSenderCancelAction = new QAction(QIcon(":/img/cancel.png"), tr("Cancel"), this);
-    connect(mSenderCancelAction, &QAction::triggered, this, &MainWindow::onSenderCancelClicked);
+    connect(mSenderCancelAction, SIGNAL(triggered()), this, SLOT(onSenderCancelClicked()));
 
     mRecOpenAction = new QAction(tr("Open"), this);
-    connect(mRecOpenAction, &QAction::triggered, this, &MainWindow::openReceiverFileInCurrentIndex);
+    connect(mRecOpenAction, SIGNAL(triggered()), this, SLOT(openReceiverFileInCurrentIndex()));
     mRecOpenFolderAction = new QAction(tr("Open folder"), this);
-    connect(mRecOpenFolderAction, &QAction::triggered, this, &MainWindow::openReceiverFolderInCurrentIndex);
+    connect(mRecOpenFolderAction, SIGNAL(triggered()), this, SLOT(openReceiverFolderInCurrentIndex()));
     mRecRemoveAction = new QAction(QIcon(":/img/remove.png"), tr("Remove"), this);
-    connect(mRecRemoveAction, &QAction::triggered, this, &MainWindow::removeReceiverItemInCurrentIndex);
+    connect(mRecRemoveAction, SIGNAL(triggered()), this, SLOT(removeReceiverItemInCurrentIndex()));
     mRecDeleteAction = new QAction(tr("Delete from disk"), this);
-    connect(mRecDeleteAction, &QAction::triggered, this, &MainWindow::deleteReceiverFileInCurrentIndex);
+    connect(mRecDeleteAction, SIGNAL(triggered()), this, SLOT(deleteReceiverFileInCurrentIndex()));
     mRecClearAction = new QAction(QIcon(":/img/clear.png"), tr("Clear"), this);
-    connect(mRecClearAction, &QAction::triggered, this, &MainWindow::onReceiverClearClicked);
+    connect(mRecClearAction, SIGNAL(triggered()), this, SLOT(onReceiverClearClicked()));
     mRecPauseAction = new QAction(QIcon(":/img/pause.png"), tr("Pause"), this);
-    connect(mRecPauseAction, &QAction::triggered, this, &MainWindow::onReceiverPauseClicked);
+    connect(mRecPauseAction, SIGNAL(triggered()), this, SLOT(onReceiverPauseClicked()));
     mRecResumeAction = new QAction(QIcon(":/img/resume.png"), tr("Resume"), this);
-    connect(mRecResumeAction, &QAction::triggered, this, &MainWindow::onReceiverResumeClicked);
+    connect(mRecResumeAction, SIGNAL(triggered()), this, SLOT(onReceiverResumeClicked()));
     mRecCancelAction = new QAction(QIcon(":/img/cancel.png"), tr("Cancel"), this);
-    connect(mRecCancelAction, &QAction::triggered, this, &MainWindow::onReceiverCancelClicked);
+    connect(mRecCancelAction, SIGNAL(triggered()), this, SLOT(onReceiverCancelClicked()));
 }
 
 void MainWindow::setupSystrayIcon()
 {
     if (!QSystemTrayIcon::isSystemTrayAvailable()) {
-        mSystrayIcon = nullptr;
+        mSystrayIcon = 0;
         return;
     }
 
diff --git a/src/ui/mainwindow.h b/src/ui/mainwindow.h
index c045ec1..bee1471 100644
--- a/src/ui/mainwindow.h
+++ b/src/ui/mainwindow.h
@@ -21,6 +21,7 @@
 
 #include <QMainWindow>
 #include <QSystemTrayIcon>
+#include <QItemSelection>
 
 #include "model/transfertablemodel.h"
 #include "model/devicelistmodel.h"
@@ -36,11 +37,11 @@ class MainWindow : public QMainWindow
     Q_OBJECT
 
 public:
-    explicit MainWindow(QWidget *parent = nullptr);
-    ~MainWindow() override;
+    explicit MainWindow(QWidget *parent = 0);
+    ~MainWindow();
 
 protected:
-    void closeEvent(QCloseEvent* event) override;
+    void closeEvent(QCloseEvent* event);
 
 public Q_SLOTS:
     void setMainWindowVisibility(bool visible = true);
@@ -99,7 +100,7 @@ private:
     bool anyActiveSender();
     bool anyActiveReceiver();
 
-    bool mForceQuit{false};
+    bool mForceQuit;
     Ui::MainWindow *ui;
     QSystemTrayIcon* mSystrayIcon;
     QMenu* mSystrayMenu;
diff --git a/src/ui/receiverselectordialog.cpp b/src/ui/receiverselectordialog.cpp
index b0bee3d..8507bc4 100644
--- a/src/ui/receiverselectordialog.cpp
+++ b/src/ui/receiverselectordialog.cpp
@@ -59,7 +59,7 @@ QVector<Device> ReceiverSelectorDialog::getSelectedDevices() const
     if (selModel) {
 
         QModelIndexList selected = selModel->selectedIndexes();
-        for (auto selectedIndex : selected) {
+        foreach (const QModelIndex& selectedIndex, selected) {
             if (selectedIndex.isValid()) {
                 devices.push_back(mModel->device(selectedIndex.row()));
             }
diff --git a/src/ui/receiverselectordialog.h b/src/ui/receiverselectordialog.h
index 6a7e426..dc6e494 100644
--- a/src/ui/receiverselectordialog.h
+++ b/src/ui/receiverselectordialog.h
@@ -33,8 +33,8 @@ class ReceiverSelectorDialog : public QDialog
     Q_OBJECT
 
 public:
-    explicit ReceiverSelectorDialog(DeviceListModel* model, QWidget *parent = nullptr);
-    ~ReceiverSelectorDialog() override;
+    explicit ReceiverSelectorDialog(DeviceListModel* model, QWidget *parent = 0);
+    ~ReceiverSelectorDialog();
 
     Device getSelectedDevice() const;
     QVector<Device> getSelectedDevices() const;
diff --git a/src/ui/settingsdialog.h b/src/ui/settingsdialog.h
index 7cf4633..9346c1d 100644
--- a/src/ui/settingsdialog.h
+++ b/src/ui/settingsdialog.h
@@ -30,8 +30,8 @@ class SettingsDialog : public QDialog
     Q_OBJECT
 
 public:
-    explicit SettingsDialog(QWidget *parent = nullptr);
-    ~SettingsDialog() override;
+    explicit SettingsDialog(QWidget *parent = 0);
+    ~SettingsDialog();
 
 private Q_SLOTS:
     void onCancelClicked();
diff --git a/src/util.cpp b/src/util.cpp
index 30d3e46..dd32b04 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -48,11 +48,11 @@ QVector< QPair<QString, QString> >
     QVector< QPair<QString, QString> > pairs;
 
     QFileInfoList fiList = startingDir.entryInfoList(QDir::NoDotAndDotDot | QDir::Files);
-    for (const auto& fi : fiList)
+    foreach (const QFileInfo& fi, fiList)
         pairs.push_back( QPair<QString, QString>(innerDirName, fi.filePath()) );
 
     fiList = startingDir.entryInfoList(QDir::NoDotAndDotDot | QDir::Dirs);
-    for (const auto& fi : fiList) {
+    foreach (const QFileInfo& fi, fiList) {
         QString newInnerDirName;
         if (innerDirName.isEmpty())
             newInnerDirName = fi.fileName();
@@ -62,7 +62,7 @@ QVector< QPair<QString, QString> >
         QVector< QPair<QString, QString> > otherPairs =
                 getInnerDirNameAndFullFilePath( QDir(fi.filePath()), newInnerDirName );
 
-        pairs.append(otherPairs);
+        pairs += otherPairs;
     }
 
     return pairs;
