From d0e02c1af63cf96363ebb90eb047f3b3ffaf7eb1 Mon Sep 17 00:00:00 2001 From: me_desk Date: Sun, 10 Mar 2013 16:39:02 +0000 Subject: new macro for protocol version as string literal; displaying protocol version in About dialog git-svn-id: svn://localhost/project_picapica/trunk@231 fb96df88-216d-11de-830c-f3023f12d8ac --- PICA_proto.h | 4 ++++ pica-client/picaactioncenter.cpp | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/PICA_proto.h b/PICA_proto.h index 9f71fd8..5062be9 100755 --- a/PICA_proto.h +++ b/PICA_proto.h @@ -7,6 +7,10 @@ #define PICA_PROTO_VER_HIGH 0 #define PICA_PROTO_VER_LOW 3 +#define PICA_PROTO_VER_STRING PICA_STRINGIFY2(PICA_PROTO_VER_HIGH, PICA_PROTO_VER_LOW) +#define PICA_STRINGIFY2(H, L) PICA_STRINGIFY(H, L) +#define PICA_STRINGIFY(H, L) #H#L + #define PICA_PROTO_INITREQ 0xCA #define PICA_PROTO_INITRESPOK 0x01 #define PICA_PROTO_VERDIFFER 0x02 diff --git a/pica-client/picaactioncenter.cpp b/pica-client/picaactioncenter.cpp index 8bedb0f..da8f0b0 100644 --- a/pica-client/picaactioncenter.cpp +++ b/pica-client/picaactioncenter.cpp @@ -3,6 +3,7 @@ #include "mainwindow.h" #include "skynet.h" #include +#include "../PICA_proto.h" #include @@ -28,7 +29,9 @@ void PicaActionCenter::about() QMessageBox mbx; mbx.setWindowIcon(picapica_ico_sit); mbx.setIconPixmap(picapica_ico_sit.pixmap(32)); - mbx.setText(tr("Pica Pica Messenger "VERSION_STRING"\n(c) 2012 Anton Sviridenko\n http://picapica.im\n\n\Contributors:\nDaniil Ustinov - bugfixes")); + mbx.setText(tr("Pica Pica Messenger "VERSION_STRING"\n(c) 2012 Anton Sviridenko\n\ +http://picapica.im\n\nContributors:\nDaniil Ustinov - bugfixes\n\n\ +protocol version " PICA_PROTO_VER_STRING)); mbx.exec(); } -- cgit v1.2.1