Example #1
0
bool operator>(const Version &one, const Version &two)
{
    if(Version::compareVersion(one.getMajor(), two.getMajor(),
                      one.getMinor(), two.getMinor(),
                      one.getMini(), two.getMini(),
                      one.getBuild(), two.getBuild()) == 1)
    {
        return true;
    }
    return false;
}
Example #2
0
Version::Version(const Version &other)
{
    m_major = other.getMajor();
    m_minor = other.getMinor();
    m_mini = other.getMini();
    m_build = other.getBuild();
}
Example #3
0
void SystemInfo::add(Info &info) {
  const char *category = "System";

  info.add(category, "CPU", getCPUBrand());
  info.add(category, "CPU ID",
           SSTR(getCPUVendor() << " Family " << getCPUFamily() << " Model "
                << getCPUModel() << " Stepping " << getCPUStepping()));
  info.add(category, "CPUs", String(getCPUCount()));

  info.add(category, "Memory", HumanSize(getTotalMemory()).toString() + "B");
  info.add(category, "Free Memory",
           HumanSize(getFreeMemory()).toString() + "B");
  info.add(category, "Threads", getThreadsType().toString());

  Version osVersion = getOSVersion();
  info.add(category, "OS Version",
           SSTR((unsigned)osVersion.getMajor() << '.'
                << (unsigned)osVersion.getMinor()));

  info.add(category, "Has Battery",
           String(PowerManagement::instance().hasBattery()));
  info.add(category, "On Battery",
           String(PowerManagement::instance().onBattery()));
}