Skip to content
Permalink
Browse files

OSInfo: fix OS X version string formatting build error.

Cast the version components to unsigned long and print
them as %lu.
  • Loading branch information...
mkrautz committed Nov 15, 2015
1 parent 74d19f4 commit 9dba18fcca6928afe822e53cf718c21371877338
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/OSInfo.cpp
@@ -131,7 +131,11 @@ QString OSInfo::getOSVersion() {
const NXArchInfo *ai = local ? NXGetArchInfoFromCpuType(local->cputype, CPU_SUBTYPE_MULTIPLE) : NULL;
const char *arch = ai ? ai->name : "unknown";

os.sprintf("%i.%i.%i (%s)", major, minor, bugfix, arch);
os.sprintf("%lu.%lu.%lu (%s)",
static_cast<unsigned long>(major),
static_cast<unsigned long>(minor),
static_cast<unsigned long>(bugfix),
arch);
#else
#ifdef Q_OS_LINUX
QProcess qp;

0 comments on commit 9dba18f

Please sign in to comment.
You can’t perform that action at this time.