From d1274597179fc48d6db0212336a251a401e1d61f Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Mardelle Date: Tue, 3 Mar 2009 00:12:12 +0000 Subject: [PATCH] Make sure to parse the user's custom profiles at the end, so that they can override default profiles and profiles installed by KNewStuff svn path=/branches/KDE4/; revision=3085 --- src/renderwidget.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/renderwidget.cpp b/src/renderwidget.cpp index 65e1ce8d..4cf779ed 100644 --- a/src/renderwidget.cpp +++ b/src/renderwidget.cpp @@ -854,9 +854,13 @@ void RenderWidget::parseProfiles(QString meta, QString group, QString profile) { QDir directory = QDir(exportFolder); QStringList filter; filter << "*.xml"; - const QStringList fileList = directory.entryList(filter, QDir::Files); + QStringList fileList = directory.entryList(filter, QDir::Files); + // We should parse customprofiles.xml in last position, so that user profiles + // can also override profiles installed by KNewStuff + fileList.removeAll("customprofiles.xml"); foreach(const QString filename, fileList) - parseFile(exportFolder + '/' + filename, true); //filename == "customprofiles.xml"); + parseFile(exportFolder + '/' + filename, true); + if (QFile::exists(exportFolder + "/customprofiles.xml")) parseFile(exportFolder + "/customprofiles.xml", true); if (!meta.isEmpty()) { m_view.destination_list->blockSignals(true); -- 2.39.2