Commit 7e9a4131 authored by Christian Kandeler's avatar Christian Kandeler

Fix qbs build.

There was more stuff broken by the switch to Qt Quick 2 than were
originally noticed, and the original fix was buggy as well.

Change-Id: I2b3e0619af923c52aba809355ac271b67097adf1
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@digia.com>
parent 2167788b
......@@ -9,3 +9,16 @@ function qtLibraryName(qbs, name)
}
return name;
}
function versionIsAtLeast(actualVersion, expectedVersion)
{
var actualVersionParts = actualVersion.split('.').map(function(item) { return parseInt(item, 10); });
var expectedVersionParts = expectedVersion.split('.').map(function(item) { return parseInt(item, 10); });
for (var i = 0; i < expectedVersionParts.length; ++i) {
if (actualVersionParts[i] > expectedVersionParts[i])
return true;
if (actualVersionParts[i] < expectedVersionParts[i])
return false;
}
return i === expectedVersionParts.length || expectedVersionParts[i] === 0;
}
......@@ -8,6 +8,10 @@ Product {
property var pluginspecreplacements
property var pluginRecommends: []
Depends { name: "Qt.core" }
property string minimumQtVersion: "4.8"
condition: Defaults.versionIsAtLeast(Qt.core.version, minimumQtVersion)
targetName: Defaults.qtLibraryName(qbs, name)
destinationDirectory: project.ide_plugin_path + '/' + provider
......
......@@ -2,7 +2,6 @@ import qbs
Project {
name: "Plugins"
property bool buildWelcomePlugin: Qt.core.versionMajor >= 5
references: [
"analyzerbase/analyzerbase.qbs",
......
import qbs.base 1.0
import "../../../qbs/defaults.js" as Defaults
import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "ProjectExplorer"
Depends { name: "Qt"; submodules: ["widgets", "xml", "network", "script", "quick"] }
Depends { name: "Qt"; submodules: ["core", "widgets", "xml", "network", "script"] }
Depends { name: "Qt.quick"; condition: Defaults.versionIsAtLeast(Qt.core.version, "5.1"); }
Depends { name: "Core" }
Depends { name: "Locator" }
Depends { name: "Find" }
......@@ -140,7 +142,7 @@ QtcPlugin {
Group {
name: "Project Welcome Page"
condition: project.buildWelcomePlugin
condition: Defaults.versionIsAtLeast(Qt.core.version, "5.1")
files: [
"projectwelcomepage.cpp",
"projectwelcomepage.h"
......
......@@ -4,8 +4,10 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "QmlProfiler"
minimumQtVersion: "5.1"
Depends { name: "Qt"; submodules: ["widgets", "network", "qml", "quick"] }
Depends { name: "Qt"; submodules: ["widgets", "network"] }
Depends { name: "Qt.quick"; condition: product.condition; }
Depends { name: "Core" }
Depends { name: "AnalyzerBase" }
Depends { name: "QmlProjectManager" }
......
import qbs.base 1.0
import "../../../qbs/defaults.js" as Defaults
import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "QtSupport"
Depends { name: "Qt"; submodules: ["widgets", "quick"] }
Depends { name: "Qt"; submodules: ["core", "widgets"]; }
Depends { name: "Qt.quick"; condition: Defaults.versionIsAtLeast(Qt.core.version, "5.1"); }
Depends { name: "Core" }
Depends { name: "ProjectExplorer" }
Depends { name: "TextEditor" }
......@@ -112,7 +114,7 @@ QtcPlugin {
Group {
name: "Getting Started Welcome Page"
condition: project.buildWelcomePlugin
condition: Defaults.versionIsAtLeast(Qt.core.version, "5.1")
files: [
"gettingstartedwelcomepage.cpp",
"gettingstartedwelcomepage.h"
......
......@@ -4,9 +4,10 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "Welcome"
condition: project.buildWelcomePlugin
minimumQtVersion: "5.1"
Depends { name: "Qt"; submodules: ["widgets", "network", "quick"] }
Depends { name: "Qt"; submodules: ["widgets", "network"] }
Depends { name: "Qt.quick"; condition: product.condition; }
Depends { name: "Core" }
Depends { name: "ProjectExplorer" }
......
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