mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Whitespace only
Separated from the previous commit as I do not like big whitespace changes in a small functional commit. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
parent
a47df05ce5
commit
1f76460dfa
1 changed files with 34 additions and 34 deletions
|
@ -1280,47 +1280,47 @@ void MainTab::saveTaggedStrings(const QVector<dive *> &selectedDives)
|
||||||
struct dive *cd = current_dive;
|
struct dive *cd = current_dive;
|
||||||
|
|
||||||
if (diffTaggedStrings(cd->buddy, displayed_dive.buddy, addedList, removedList))
|
if (diffTaggedStrings(cd->buddy, displayed_dive.buddy, addedList, removedList))
|
||||||
MODIFY_DIVES(selectedDives,
|
MODIFY_DIVES(selectedDives,
|
||||||
QStringList oldList = QString(mydive->buddy).split(QRegExp("\\s*,\\s*"), QString::SkipEmptyParts);
|
QStringList oldList = QString(mydive->buddy).split(QRegExp("\\s*,\\s*"), QString::SkipEmptyParts);
|
||||||
QString newString;
|
QString newString;
|
||||||
QString comma;
|
QString comma;
|
||||||
Q_FOREACH (const QString tag, oldList) {
|
Q_FOREACH (const QString tag, oldList) {
|
||||||
if (!removedList.contains(tag, Qt::CaseInsensitive)) {
|
if (!removedList.contains(tag, Qt::CaseInsensitive)) {
|
||||||
newString += comma + tag;
|
newString += comma + tag;
|
||||||
comma = ", ";
|
comma = ", ";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
Q_FOREACH (const QString tag, addedList) {
|
||||||
Q_FOREACH (const QString tag, addedList) {
|
if (!oldList.contains(tag, Qt::CaseInsensitive)) {
|
||||||
if (!oldList.contains(tag, Qt::CaseInsensitive)) {
|
newString += comma + tag;
|
||||||
newString += comma + tag;
|
comma = ", ";
|
||||||
comma = ", ";
|
}
|
||||||
}
|
}
|
||||||
}
|
free(mydive->buddy);
|
||||||
free(mydive->buddy);
|
mydive->buddy = copy_qstring(newString);
|
||||||
mydive->buddy = copy_qstring(newString);
|
);
|
||||||
);
|
|
||||||
addedList.clear();
|
addedList.clear();
|
||||||
removedList.clear();
|
removedList.clear();
|
||||||
if (diffTaggedStrings(cd->divemaster, displayed_dive.divemaster, addedList, removedList))
|
if (diffTaggedStrings(cd->divemaster, displayed_dive.divemaster, addedList, removedList))
|
||||||
MODIFY_DIVES(selectedDives,
|
MODIFY_DIVES(selectedDives,
|
||||||
QStringList oldList = QString(mydive->divemaster).split(QRegExp("\\s*,\\s*"), QString::SkipEmptyParts);
|
QStringList oldList = QString(mydive->divemaster).split(QRegExp("\\s*,\\s*"), QString::SkipEmptyParts);
|
||||||
QString newString;
|
QString newString;
|
||||||
QString comma;
|
QString comma;
|
||||||
Q_FOREACH (const QString tag, oldList) {
|
Q_FOREACH (const QString tag, oldList) {
|
||||||
if (!removedList.contains(tag, Qt::CaseInsensitive)) {
|
if (!removedList.contains(tag, Qt::CaseInsensitive)) {
|
||||||
newString += comma + tag;
|
newString += comma + tag;
|
||||||
comma = ", ";
|
comma = ", ";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
Q_FOREACH (const QString tag, addedList) {
|
||||||
Q_FOREACH (const QString tag, addedList) {
|
if (!oldList.contains(tag, Qt::CaseInsensitive)) {
|
||||||
if (!oldList.contains(tag, Qt::CaseInsensitive)) {
|
newString += comma + tag;
|
||||||
newString += comma + tag;
|
comma = ", ";
|
||||||
comma = ", ";
|
}
|
||||||
}
|
}
|
||||||
}
|
free(mydive->divemaster);
|
||||||
free(mydive->divemaster);
|
mydive->divemaster = copy_qstring(newString);
|
||||||
mydive->divemaster = copy_qstring(newString);
|
);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int MainTab::diffTaggedStrings(QString currentString, QString displayedString, QStringList &addedList, QStringList &removedList)
|
int MainTab::diffTaggedStrings(QString currentString, QString displayedString, QStringList &addedList, QStringList &removedList)
|
||||||
|
|
Loading…
Add table
Reference in a new issue