Revert the SIC in commit 915976c123.

On further reflection, introducing a SIC to fix the bug is not ideal.  I'm
working on something that will address the underlying bug, but I didn't have
it in time for 5.7.

The versioning behaviour is left, as I do want it to exist for the future.
This only reverts the mandatory versioning of files to avoid the compatibility
break.

CHANGELOG: Undo 915976c123, which never saw a release, enough to avoid the SIC.
wilder
Matthew Dawson 11 years ago
parent 28ddbf8138
commit 9eee15917e
  1. 9
      autotests/test_kconf_update.cpp
  2. 5
      src/kconf_update/README.kconf_update
  3. 6
      src/kconf_update/kconf_update.cpp

@ -262,7 +262,7 @@ void TestKConfUpdate::test_data()
<< true
<< true
;
QTest::newRow("DontMigrateWhenFileDoesntHaveVersion")
QTest::newRow("MigrateWhenFileDoesntHaveVersion")
<<
"File=testrc\n"
"Group=group\n"
@ -276,12 +276,15 @@ void TestKConfUpdate::test_data()
<<
"testrc"
<<
"[$Version]\n"
"update_info=%1\n"
"\n"
"[group]\n"
"old=value\n"
"new=value\n"
<<
""
<< false
<< false
<< true
;
QTest::newRow("DontMigrateWhenUpdateCantDoItMissingFilename")

@ -51,8 +51,9 @@ Commas (,) are used to seperate fields and may not occur as part
of any field and all of the keywords are case-sensitive, i.e. you
cannot say "key" instead of "Key" for example.
Starting from KDE Frameworks 5 make sure to put Version=5 before the first "Id=" otherwise the upd file
will be skipped and the config file will not be updated.
Starting in KDE Frameworks 5, all update files should have a version field
at the top of the file. Thus all files should start with the line Version=5.
Files without a version are currently treated as version 5 but are deprecated.
For the rest the file is parsed and executed sequentially from top to bottom.
Each line can contain one entry. The following entries are recognized:

@ -252,8 +252,7 @@ bool KonfUpdate::checkFile(const QString &filename)
}
if (line.startsWith("Id=")) {
if (!foundVersion) {
qDebug() << QStringLiteral("Missing \"Version=5\", file \'%1\' will be skipped.").arg(filename);
return true;
qDebug() << QStringLiteral("Missing \"Version=5\", file \'%1\' will be skipped in the future.").arg(filename);
}
id = m_currentFilename + ':' + line.mid(3);
} else if (line.startsWith("File=")) {
@ -336,8 +335,7 @@ bool KonfUpdate::updateFile(const QString &filename)
}
if (m_line.startsWith(QLatin1String("Id="))) {
if (!foundVersion) {
qDebug() << QStringLiteral("Missing \"Version=5\", file \'%1\' will be skipped.").arg(filename);
break;
qDebug() << QStringLiteral("Missing \"Version=5\", file \'%1\' will be skipped in the future.").arg(filename);
}
gotId(m_line.mid(3));
} else if (m_skip) {

Loading…
Cancel
Save