Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit b7d32857 authored by Laurent Montel's avatar Laurent Montel 😁

Fix uncomment all text

parent 895bb2ad
......@@ -388,14 +388,18 @@ void SieveTextEdit::uncomment()
text.remove(0, 1);
}
QString newText = text;
for (int i = 0; i < newText.length(); ++i) {
for (int i = 0; i < newText.length();) {
if (newText.at(i) == QChar::ParagraphSeparator || newText.at(i) == QChar::LineSeparator) {
++i;
if (i < newText.length()) {
if (newText.at(i) == QLatin1Char('#')) {
newText.remove(i, 1);
} else {
++i;
}
}
} else {
++i;
}
}
......
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