summaryrefslogtreecommitdiffstats
path: root/tools/common/repositorygen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/common/repositorygen.cpp')
-rw-r--r--tools/common/repositorygen.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/common/repositorygen.cpp b/tools/common/repositorygen.cpp
index 40caf388b..316f26022 100644
--- a/tools/common/repositorygen.cpp
+++ b/tools/common/repositorygen.cpp
@@ -190,6 +190,7 @@ void QInstallerTools::copyMetaData(const QString &_targetDir, const QString &met
bool foundVirtual = false;
bool foundDisplayName = false;
bool foundDownloadableArchives = false;
+ bool foundCheckable = false;
const QDomNode package = packageXml.firstChildElement(QLatin1String("Package"));
const QDomNodeList childNodes = package.childNodes();
for (int i = 0; i < childNodes.count(); ++i) {
@@ -204,6 +205,8 @@ void QInstallerTools::copyMetaData(const QString &_targetDir, const QString &met
foundDisplayName = true;
if (key == QLatin1String("DownloadableArchives"))
foundDownloadableArchives = true;
+ if (key == QLatin1String("Checkable"))
+ foundCheckable = true;
if (node.isComment() || blackList.contains(key))
continue; // just skip comments and some tags...
@@ -220,6 +223,12 @@ void QInstallerTools::copyMetaData(const QString &_targetDir, const QString &met
"mutually exclusive in file \"%1\".").arg(QDir::toNativeSeparators(packageXmlPath)));
}
+ if (foundDefault && foundCheckable) {
+ throw QInstaller::Error(QString::fromLatin1("Error: <Default> and <Checkable>"
+ "elements are mutually exclusive in file \"%1\".")
+ .arg(QDir::toNativeSeparators(packageXmlPath)));
+ }
+
if (!foundDisplayName) {
qWarning() << "No DisplayName tag found at" << info.name << ", using component Name instead.";
QDomElement displayNameElement = doc.createElement(QLatin1String("DisplayName"));