From bba55ad105478c361c7aaece8ec9091561bbe856 Mon Sep 17 00:00:00 2001 From: Alf Gaida Date: Sun, 3 Dec 2017 21:40:57 +0100 Subject: [PATCH] imported upstream release 0.4.0. --- .github/ISSUE_TEMPLATE.md | 35 +++++++++++++++++++++++++++++++++++ AUTHORS | 2 +- CHANGELOG | 14 +++++++++++++- CMakeLists.txt | 8 ++++---- cpustat.cpp | 10 +++++----- memstat.cpp | 2 +- netstat.cpp | 4 ++-- 7 files changed, 61 insertions(+), 14 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..4ed3f37 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,35 @@ + + + +##### Expected Behavior + + + +##### Current Behavior + + + +##### Possible Solution + + + +##### Steps to Reproduce (for bugs) + + +1. +2. +3. +4. + +##### Context + + + +##### System Information + +* Distribution & Version: +* Kernel: +* Qt Version: +* libqtxdg Version: +* lxde-build-tools Version: +* Package version: diff --git a/AUTHORS b/AUTHORS index 92f0295..4eca942 100644 --- a/AUTHORS +++ b/AUTHORS @@ -5,7 +5,7 @@ Upstream Authors: Copyright: Copyright (c) 2012 Razor team - Copyright (c) 2012-2016 LXQt team + Copyright (c) 2012-2017 LXQt team License: LGPL-2.1+ The full text of the licenses can be found in the 'COPYING' file. diff --git a/CHANGELOG b/CHANGELOG index 3f920a4..b7a5e4e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,7 +1,19 @@ -libsysstat-0.3.3 / 2016-12-11 +libsysstat-0.4.0 / 2017-09-23 ============================= + * correct spelling mistake + * bump version and needed version of lxqt-build-tools + * liblxqt make no sense here + * Copied issue template + * Drops Qt5Core_VERSION_STRING + * Fixes (#17) + * Bump years + +0.3.3 / 2016-12-11 +================== + + * Release 0.3.3: Update changelog * Bump patch version to 3 * Simplify include_directories and compile definitions * Adds Building project name and Qt version message diff --git a/CMakeLists.txt b/CMakeLists.txt index d90c9e4..4d162ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,11 +3,11 @@ cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR) project(libsysstat) set(MAJOR_VERSION 0) -set(MINOR_VERSION 3) -set(PATCH_VERSION 3) +set(MINOR_VERSION 4) +set(PATCH_VERSION 0) set(SYSSTAT_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}") -set(LXQTBT_MINIMUM_VERSION "0.1.0") +set(LXQTBT_MINIMUM_VERSION "0.4.0") set(QT_MINIMUM_VERSION "5.4.2") # additional cmake files @@ -15,7 +15,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") find_package(lxqt-build-tools ${LXQTBT_MINIMUM_VERSION} REQUIRED) find_package(Qt5Core ${QT_MINIMUM_VERSION} REQUIRED) -message(STATUS "Building ${PROJECT_NAME} with Qt ${Qt5Core_VERSION_STRING}") +message(STATUS "Building ${PROJECT_NAME} with Qt ${Qt5Core_VERSION}") include(CMakePackageConfigHelpers) include(GNUInstallDirs) # Standard directories for installation diff --git a/cpustat.cpp b/cpustat.cpp index 6017d6e..f275af1 100644 --- a/cpustat.cpp +++ b/cpustat.cpp @@ -62,7 +62,7 @@ void CpuStatPrivate::updateSources() { mSources.clear(); - foreach (QString row, readAllFile("/proc/stat").split(QChar('\n'), QString::SkipEmptyParts)) + foreach (const QString &row, readAllFile("/proc/stat").split(QChar('\n'), QString::SkipEmptyParts)) { QStringList tokens = row.split(QChar(' '), QString::SkipEmptyParts); if( (tokens.size() < 5) @@ -76,15 +76,15 @@ void CpuStatPrivate::updateSources() bool ok; - foreach (QString range, readAllFile("/sys/devices/system/cpu/online").split(QChar(','), QString::SkipEmptyParts)) + foreach (const QString &range, readAllFile("/sys/devices/system/cpu/online").split(QChar(','), QString::SkipEmptyParts)) { int dash = range.indexOf('-'); if (dash != -1) { - uint min = range.left(dash).toUInt(&ok); + uint min = range.leftRef(dash).toUInt(&ok); if (ok) { - uint max = range.mid(dash + 1).toUInt(&ok); + uint max = range.midRef(dash + 1).toUInt(&ok); if (ok) for (uint number = min; number <= max; ++number) addSource(QString("cpu%1").arg(number)); @@ -128,7 +128,7 @@ void CpuStatPrivate::timeout() if ( (mMonitoring == CpuStat::LoadOnly) || (mMonitoring == CpuStat::LoadAndFrequency) ) { - foreach (QString row, readAllFile("/proc/stat").split(QChar('\n'), QString::SkipEmptyParts)) + foreach (const QString &row, readAllFile("/proc/stat").split(QChar('\n'), QString::SkipEmptyParts)) { if (!row.startsWith("cpu")) continue; diff --git a/memstat.cpp b/memstat.cpp index 074fbc8..bdca252 100644 --- a/memstat.cpp +++ b/memstat.cpp @@ -53,7 +53,7 @@ void MemStatPrivate::timeout() qulonglong swapTotal = 0; qulonglong swapFree = 0; - foreach (QString row, readAllFile("/proc/meminfo").split(QChar('\n'), QString::SkipEmptyParts)) + foreach (const QString &row, readAllFile("/proc/meminfo").split(QChar('\n'), QString::SkipEmptyParts)) { QStringList tokens = row.split(QChar(' '), QString::SkipEmptyParts); if (tokens.size() != 3) diff --git a/netstat.cpp b/netstat.cpp index e4450a1..970dda2 100644 --- a/netstat.cpp +++ b/netstat.cpp @@ -42,7 +42,7 @@ NetStatPrivate::NetStatPrivate(NetStat *parent) rows.erase(rows.begin(), rows.begin() + 2); - foreach (QString row, rows) + foreach (const QString &row, rows) { QStringList tokens = row.split(QChar(':'), QString::SkipEmptyParts); if (tokens.size() != 2) @@ -74,7 +74,7 @@ void NetStatPrivate::timeout() rows.erase(rows.begin(), rows.begin() + 2); - foreach (QString row, rows) + foreach (const QString &row, rows) { QStringList tokens = row.split(QChar(':'), QString::SkipEmptyParts); if (tokens.size() != 2)