Commit d98c1693 authored by Corbin Schwimmbeck's avatar Corbin Schwimmbeck Committed by Laurent Montel
Browse files

Rename isSpace to isSpaceAt

Because the function refers to whitespace at a certain position, I believe this name makes more sense.
parent 576855b0
Pipeline #85648 passed with stage
in 33 seconds
......@@ -62,28 +62,28 @@ CTTask::CTTask(const QString &tokenString, const QString &_comment, const QStrin
// qCDebug(KCM_CRON_LOG) << "Line : " << tokStr;
minute.initialize(tokStr.mid(0, spacePos));
while (isSpace(tokStr, spacePos + 1)) {
while (isSpaceAt(tokStr, spacePos + 1)) {
spacePos++;
}
tokStr = tokStr.mid(spacePos + 1, tokStr.length() - 1);
spacePos = tokStr.indexOf(QRegExp(QLatin1String("[ \t]")));
hour.initialize(tokStr.mid(0, spacePos));
while (isSpace(tokStr, spacePos + 1)) {
while (isSpaceAt(tokStr, spacePos + 1)) {
spacePos++;
}
tokStr = tokStr.mid(spacePos + 1, tokStr.length() - 1);
spacePos = tokStr.indexOf(QRegExp(QLatin1String("[ \t]")));
dayOfMonth.initialize(tokStr.mid(0, spacePos));
while (isSpace(tokStr, spacePos + 1)) {
while (isSpaceAt(tokStr, spacePos + 1)) {
spacePos++;
}
tokStr = tokStr.mid(spacePos + 1, tokStr.length() - 1);
spacePos = tokStr.indexOf(QRegExp(QLatin1String("[ \t]")));
month.initialize(tokStr.mid(0, spacePos));
while (isSpace(tokStr, spacePos + 1)) {
while (isSpaceAt(tokStr, spacePos + 1)) {
spacePos++;
}
tokStr = tokStr.mid(spacePos + 1, tokStr.length() - 1);
......@@ -92,7 +92,7 @@ CTTask::CTTask(const QString &tokenString, const QString &_comment, const QStrin
}
if (mSystemCrontab) {
while (isSpace(tokStr, spacePos + 1)) {
while (isSpaceAt(tokStr, spacePos + 1)) {
spacePos++;
}
tokStr = tokStr.mid(spacePos + 1, tokStr.length() - 1);
......
......@@ -103,7 +103,7 @@ public:
bool reboot;
private:
inline bool isSpace(const QString &token, int pos)
inline bool isSpaceAt(const QString &token, int pos)
{
if (pos >= token.length()) {
return false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment