From f60392515d0b3f1fb9e4f536a311b0d0e1bd11ff Mon Sep 17 00:00:00 2001 From: Anton Date: Mon, 10 Jun 2019 22:28:45 +0400 Subject: pica-client: fixes for compatibility with Qt5 on OS X/C++11/clang --- pica-client/picaactioncenter.cpp | 4 ++-- pica-client/picasystray.cpp | 6 +++--- pica-client/skynet.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pica-client/picaactioncenter.cpp b/pica-client/picaactioncenter.cpp index 3869c2d..5e84369 100644 --- a/pica-client/picaactioncenter.cpp +++ b/pica-client/picaactioncenter.cpp @@ -57,7 +57,7 @@ PicaActionCenter::PicaActionCenter(QObject *parent) : void PicaActionCenter::about() { #ifdef PACKAGE_VERSION -#define VERSION_STRING "v"PACKAGE_VERSION +#define VERSION_STRING "v" PACKAGE_VERSION #else #define VERSION_STRING "" #endif @@ -65,7 +65,7 @@ void PicaActionCenter::about() mbx.setWindowIcon(picapica_ico_sit); mbx.setIconPixmap(picapica_ico_sit.pixmap(32)); mbx.setTextFormat(Qt::RichText); - mbx.setText(tr("Pica Pica Messenger "VERSION_STRING"
Copyright (c) 2012 - 2019 Anton Sviridenko


\ + mbx.setText(tr("Pica Pica Messenger " VERSION_STRING "
Copyright (c) 2012 - 2019 Anton Sviridenko


\ https://picapica.im

\ User Manual

\ protocol version " PICA_PROTO_VER_STRING "
" diff --git a/pica-client/picasystray.cpp b/pica-client/picasystray.cpp index 81e679d..a4a8995 100644 --- a/pica-client/picasystray.cpp +++ b/pica-client/picasystray.cpp @@ -21,7 +21,7 @@ #include "accounts.h" #ifdef PACKAGE_VERSION -#define VERSION_STRING "v"PACKAGE_VERSION +#define VERSION_STRING "v" PACKAGE_VERSION #else #define VERSION_STRING "" #endif @@ -44,7 +44,7 @@ PicaSysTray::PicaSysTray(QObject *parent) : systray_ = new QSystemTrayIcon(picapica_ico_sit); systray_->setContextMenu(systrayMenu_); - systray_->setToolTip("Pica Pica Messenger "VERSION_STRING); + systray_->setToolTip("Pica Pica Messenger " VERSION_STRING); systray_->show(); connect(systray_, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(systray_activated(QSystemTrayIcon::ActivationReason))); @@ -66,7 +66,7 @@ void PicaSysTray::systray_activated(QSystemTrayIcon::ActivationReason r) void PicaSysTray::skynet_became_self_aware() { systray_->setIcon(picapica_ico_fly); - systray_->setToolTip(Accounts::GetCurrentAccount().name + " - Pica Pica Messenger "VERSION_STRING); + systray_->setToolTip(Accounts::GetCurrentAccount().name + " - Pica Pica Messenger " VERSION_STRING); } void PicaSysTray::skynet_lost_self_awareness() diff --git a/pica-client/skynet.cpp b/pica-client/skynet.cpp index 89386d0..d56dfbb 100644 --- a/pica-client/skynet.cpp +++ b/pica-client/skynet.cpp @@ -974,7 +974,7 @@ void SkyNet::c2c_closed_cb(const unsigned char *peer_id, int reason) void SkyNet::nodelist_cb(int type, void *addr_bin, const char *addr_str, unsigned int port) { - Nodes::NodeRecord nr = {addr_str, port}; + Nodes::NodeRecord nr = {addr_str, static_cast(port)}; skynet->nodes.Add(nr); } -- cgit v1.2.1