Fix wireshark-qt startup coredump under autofoo and Windows: make cmake's

VERSION_* macros integers instead of numbers (and treat them as such in
ui/qt/about_dialog.cpp).

svn path=/trunk/; revision=54563
This commit is contained in:
Jeff Morriss 2014-01-02 19:11:06 +00:00
parent bbcd2dcc12
commit a56494a526
2 changed files with 5 additions and 11 deletions

View File

@ -7,9 +7,9 @@
/* Version number of package */
#define VERSION "${CPACK_PACKAGE_VERSION}"
#define VERSION_MAJOR "${PROJECT_MAJOR_VERSION}"
#define VERSION_MINOR "${PROJECT_MINOR_VERSION}"
#define VERSION_MICRO "${PROJECT_PATCH_VERSION}"
#define VERSION_MAJOR ${PROJECT_MAJOR_VERSION}
#define VERSION_MINOR ${PROJECT_MINOR_VERSION}
#define VERSION_MICRO ${PROJECT_PATCH_VERSION}
/* FIXME: Move the path stuff to the CMakeInstallDirs.cmake file */
/* Directory for data */

View File

@ -105,7 +105,6 @@ AboutDialog::AboutDialog(QWidget *parent) :
char *path = NULL;
const char *constpath;
gchar *message;
const char *version;
#if defined (HAVE_LIBSMI) || defined (HAVE_GEOIP)
gint i;
gchar **resultArray;
@ -144,14 +143,9 @@ AboutDialog::AboutDialog(QWidget *parent) :
ui->label_wireshark->setTextInteractionFlags(Qt::TextSelectableByMouse);
ui->label_wireshark->setText(message);
/* VERSION_MINOR is const char * with CMake and int with Autofoo.... */
version = (const char *)VERSION_MINOR;
/* Check if Dev release... (VERSION_MINOR is odd) */
if ( atoi(version) % 2 == 1)
{
#if VERSION_MINOR & 1
ui->label_logo->setPixmap( QPixmap( ":/about/wssplash_dev.png" ) );
}
#endif
/* Authors */