Commit 0d20c5b7 authored by Yuchen Deng's avatar Yuchen Deng Committed by Joerg Bornemann

Fix qbs code style

Change-Id: Ia3e4df528d391580064efbeeab75016335a4299d
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@nokia.com>
parent 0527a8bb
......@@ -2,7 +2,7 @@ import qbs.base 1.0
import qbs.fileinfo 1.0 as FileInfo
Module {
Depends { id: qtcore; name: "qt.core" }
Depends { id: qtcore; name: "Qt.core" }
additionalProductFileTags: qtcore.versionMajor < 5 ? ["pluginSpec"] : ["pluginJSON"]
property int ide_version_major: project.ide_version_major
......@@ -49,7 +49,7 @@ Module {
var inf = new TextFile(input.fileName);
var all = inf.readAll();
// replace quoted quotes
all = all.replace(/\\\"/g, "\"");
all = all.replace(/\\\"/g, '"');
// replace config vars
vars['QTCREATOR_VERSION'] = qtcreator_version;
vars['IDE_VERSION_MAJOR'] = ide_version_major;
......@@ -83,8 +83,11 @@ Module {
var xslFile = project.path + "/src/pluginjsonmetadata.xsl";
var xmlPatternsPath = product.modules["qt/core"].binPath + "/xmlpatterns";
var args = [
"-no-format", "-output", output.fileName,
xslFile, input.fileName
"-no-format",
"-output",
output.fileName,
xslFile,
input.fileName
];
var cmd = new Command(xmlPatternsPath, args);
cmd.description = "generating " + FileInfo.fileName(output.fileName);
......
......@@ -106,7 +106,7 @@ Project {
var file = new TextFile(input.fileName);
var content = file.readAll();
// replace quoted quotes
content = content.replace(/\\\"/g, "\"");
content = content.replace(/\\\"/g, '"');
// replace Windows line endings
if (onWindows)
content = content.replace(/\r\n/g, "\n");
......
......@@ -5,14 +5,16 @@ QtcLibrary {
name: "Botan"
Depends { name: "cpp" }
Depends { name: "qt"; submodules: 'core' }
Depends { name: "Qt.core" }
cpp.includePaths: ["build", "src"]
cpp.includePaths: [
"build",
"src"
]
cpp.dynamicLibraries: {
if (qbs.targetOS == 'linux' || qbs.targetOS == 'freebsd') {
return ['rt']
}
else if (qbs.targetOS == 'windows') {
if (qbs.targetOS == "linux" || qbs.targetOS == "freebsd") {
return ["rt"]
} else if (qbs.targetOS == "windows") {
return [
"advapi32",
"user32"
......@@ -22,17 +24,17 @@ QtcLibrary {
cpp.defines: {
var result = []
if (qbs.toolchain == 'msvc2005' || qbs.toolchain == 'msvc2008' || qbs.toolchain == 'msvc2010')
result.push('BOTAN_DLL=__declspec(dllexport)')
if (qbs.toolchain == "msvc2005" || qbs.toolchain == "msvc2008" || qbs.toolchain == "msvc2010")
result.push("BOTAN_DLL=__declspec(dllexport)")
return result
}
Properties {
condition: qbs.toolchain === 'mingw'
condition: qbs.toolchain == "mingw"
cpp.cxxFlags: [
'-fpermissive',
'-finline-functions',
'-Wno-long-long'
"-fpermissive",
"-finline-functions",
"-Wno-long-long"
]
}
......@@ -500,7 +502,7 @@ QtcLibrary {
}
Group {
condition: qbs.targetOS == "linux" || qbs.targetOS == 'mac'
condition: qbs.targetOS == "linux" || qbs.targetOS == "mac"
files: [
"src/alloc/alloc_mmap/mmap_mem.cpp",
"src/cert/cvc/asn1_eac_str.cpp",
......@@ -545,8 +547,8 @@ QtcLibrary {
ProductModule {
Depends { name: "cpp" }
cpp.linkerFlags: {
if (qbs.toolchain === 'mingw') {
return ['--enable-auto-import']
if (qbs.toolchain == "mingw") {
return ["--enable-auto-import"]
}
}
}
......
......@@ -2,7 +2,7 @@ import qbs.base 1.0
DynamicLibrary {
destination: {
if (qbs.targetOS === "windows")
if (qbs.targetOS == "windows")
return "bin"
else
return "lib/qtcreator"
......
......@@ -17,13 +17,34 @@ QtcLibrary {
Depends { name: "Qt.gui" }
files: [
"glsl.h", "glsllexer.h", "glslparser.h", "glslparsertable_p.h", "glslast.h",
"glslastvisitor.h", "glslengine.h", "glslmemorypool.h", "glslastdump.h",
"glslsemantic.h", "glsltype.h", "glsltypes.h", "glslsymbol.h", "glslsymbols.h",
"glslkeywords.cpp", "glslparser.cpp", "glslparsertable.cpp",
"glsllexer.cpp", "glslast.cpp",
"glslastvisitor.cpp", "glslengine.cpp", "glslmemorypool.cpp", "glslastdump.cpp",
"glslsemantic.cpp", "glsltype.cpp", "glsltypes.cpp", "glslsymbol.cpp", "glslsymbols.cpp",
"glsl.h",
"glsllexer.h",
"glslparser.h",
"glslparsertable_p.h",
"glslast.h",
"glslastvisitor.h",
"glslengine.h",
"glslmemorypool.h",
"glslastdump.h",
"glslsemantic.h",
"glsltype.h",
"glsltypes.h",
"glslsymbol.h",
"glslsymbols.h",
"glslkeywords.cpp",
"glslparser.cpp",
"glslparsertable.cpp",
"glsllexer.cpp",
"glslast.cpp",
"glslastvisitor.cpp",
"glslengine.cpp",
"glslmemorypool.cpp",
"glslastdump.cpp",
"glslsemantic.cpp",
"glsltype.cpp",
"glsltypes.cpp",
"glslsymbol.cpp",
"glslsymbols.cpp",
"glsl.g"
]
......
......@@ -13,8 +13,7 @@ QtcLibrary {
]
Depends { name: "cpp" }
Depends { name: "Qt.gui" }
Depends { name: "Qt.network" }
Depends { name: "Qt"; submodules: ["gui", "network"] }
Depends { name: "symbianutils" }
files: [
......@@ -50,9 +49,7 @@ QtcLibrary {
ProductModule {
Depends { name: "cpp" }
Depends { name: "symbianutils" }
cpp.includePaths: [
"."
]
cpp.includePaths: ["."]
}
}
......@@ -18,7 +18,7 @@ QtcLibrary {
Depends { name: "Utils" }
Depends { name: "LanguageUtils" }
Depends { name: "cpp" }
Depends { name: "Qt"; submodules: ['widgets', 'script'] }
Depends { name: "Qt"; submodules: ["widgets", "script"] }
files: [
"qmljs.qrc",
......
......@@ -5,7 +5,7 @@ DynamicLibrary {
destination: "lib/qtcreator/qtcomponents/plugin"
Depends { name: "cpp" }
Depends { name: "Qt"; submodules: ['core', 'widgets', 'quick1', 'script'] }
Depends { name: "Qt"; submodules: ["core", "widgets", "quick1", "script"] }
files: [
"qdeclarativefolderlistmodel.cpp",
......
......@@ -5,14 +5,16 @@ QtcLibrary {
name: "QtcSsh"
cpp.defines: ["QSSH_LIBRARY"]
cpp.includePaths: [ ".", "..",
cpp.includePaths: [
".",
"..",
"../..",
"../3rdparty/botan/build",
buildDirectory
]
Depends { name: "cpp" }
Depends { name: "Qt"; submodules: ['widgets', 'network' ] }
Depends { name: "Qt"; submodules: ["widgets", "network" ] }
Depends { name: "Botan" }
files: [
......@@ -50,6 +52,6 @@ QtcLibrary {
ProductModule {
Depends { name: "cpp" }
Depends { name: "Qt"; submodules: ["widgets", "network"] }
cpp.includePaths: ".."
cpp.includePaths: [".."]
}
}
......@@ -20,7 +20,7 @@ QtcLibrary {
cpp.optimization: "fast"
Depends { name: "cpp" }
Depends { name: "Qt"; submodules: ["network"]}
Depends { name: "Qt.network" }
Depends { name: "Utils" }
Group {
......
......@@ -4,11 +4,14 @@ import "../../tools/QtcTool.qbs" as QtcTool
QtcTool {
name: "qtcreator_ctrlc_stub"
consoleApplication: true
condition: qbs.targetOS === "windows"
condition: qbs.targetOS == "windows"
Depends { name: "cpp" }
files: [ "process_ctrlc_stub.cpp" ]
cpp.dynamicLibraries: [ "user32.lib", "shell32.lib" ]
cpp.dynamicLibraries: [
"user32.lib",
"shell32.lib"
]
}
......@@ -8,7 +8,7 @@ QtcTool {
Depends { name: "cpp" }
files: {
if (qbs.targetOS === "windows") {
if (qbs.targetOS == "windows") {
return [ "process_stub_win.c" ]
} else {
return [ "process_stub_unix.c" ]
......@@ -16,7 +16,7 @@ QtcTool {
}
cpp.dynamicLibraries: {
if (qbs.targetOS === "windows") {
if (qbs.targetOS == "windows") {
return [ "shell32.lib" ]
}
}
......
......@@ -5,22 +5,28 @@ QtcLibrary {
name: "Utils"
cpp.defines: ["QTCREATOR_UTILS_LIB"]
cpp.includePaths: [ ".", "..",
cpp.includePaths: [
".",
"..",
"../..",
buildDirectory
]
Properties {
condition: qbs.targetOS == "windows"
cpp.dynamicLibraries: ["user32", "iphlpapi", "ws2_32"]
cpp.dynamicLibraries: [
"user32",
"iphlpapi",
"ws2_32"
]
}
Properties {
condition: qbs.targetOS === "linux"
condition: qbs.targetOS == "linux"
cpp.dynamicLibraries: ["X11"]
}
Depends { name: "cpp" }
Depends { name: "Qt"; submodules: ['widgets', 'network', 'script', 'concurrent'] }
Depends { name: "Qt"; submodules: ["widgets", "network", "script", "concurrent"] }
Depends { name: "app_version_header" }
files: [
......
......@@ -25,9 +25,12 @@ QtcLibrary {
}
files: [
"servicebrowser.cpp", "servicebrowser.h", "servicebrowser_p.h",
"servicebrowser.cpp",
"servicebrowser.h",
"servicebrowser_p.h",
"embeddedLib.cpp",
"mdnsderived.cpp", "mdnsderived.h",
"mdnsderived.cpp",
"mdnsderived.h",
"avahiLib.cpp",
"dnsSdLib.cpp",
"dns_sd_types.h",
......@@ -37,6 +40,6 @@ QtcLibrary {
ProductModule {
Depends { name: "cpp" }
cpp.includePaths: "."
cpp.includePaths: ["."]
}
}
......@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "AnalyzerBase"
Depends { name: "qt"; submodules: ['widgets'] }
Depends { name: "Qt.widgets" }
Depends { name: "Core" }
Depends { name: "CppTools" }
Depends { name: "RemoteLinux" }
......@@ -13,7 +13,10 @@ QtcPlugin {
Depends { name: "TextEditor" }
Depends { name: "cpp" }
cpp.defines: ["ANALYZER_LIBRARY", "QT_NO_CAST_FROM_ASCII"]
cpp.defines: [
"ANALYZER_LIBRARY",
"QT_NO_CAST_FROM_ASCII"
]
cpp.includePaths: [
"..",
"../../libs",
......@@ -55,9 +58,7 @@ QtcPlugin {
ProductModule {
Depends { name: "cpp" }
cpp.includePaths: [
"."
]
cpp.includePaths: ["."]
Depends { name: "CPlusPlus" }
}
......
......@@ -10,7 +10,7 @@ QtcPlugin {
Depends { name: "Qt4ProjectManager" }
Depends { name: "Debugger" }
Depends { name: "QtSupport" }
Depends { name: "qt"; submodules: ['widgets', 'xml', 'network'] }
Depends { name: "Qt"; submodules: ["widgets", "xml", "network"] }
property bool enable: false
property var pluginspecreplacements: ({"ANDROID_EXPERIMENTAL_STR": (enable ? "false": "true")})
......
......@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "AutotoolsProjectManager"
Depends { name: "qt"; submodules: ['widgets'] }
Depends { name: "Qt.widgets" }
Depends { name: "Core" }
Depends { name: "ProjectExplorer" }
Depends { name: "QtSupport" }
......
......@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "Bazaar"
Depends { name: "qt"; submodules: ['widgets'] }
Depends { name: "Qt.widgets" }
Depends { name: "Core" }
Depends { name: "TextEditor" }
Depends { name: "Find" }
......
......@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "BinEditor"
Depends { name: "qt"; submodules: ['widgets'] }
Depends { name: "Qt.widgets" }
Depends { name: "Core" }
Depends { name: "TextEditor" }
Depends { name: "Find" }
......
......@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "Bookmarks"
Depends { name: "qt"; submodules: ['widgets'] }
Depends { name: "Qt.widgets" }
Depends { name: "Core" }
Depends { name: "ProjectExplorer" }
Depends { name: "TextEditor" }
......@@ -31,6 +31,3 @@ QtcPlugin {
]
}
......@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "ClassView"
Depends { name: "qt"; submodules: ['widgets'] }
Depends { name: "Qt.widgets" }
Depends { name: "Core" }
Depends { name: "CppTools" }
Depends { name: "CPlusPlus" }
......
......@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "CMakeProjectManager"
Depends { name: "qt"; submodules: ['widgets'] }
Depends { name: "Qt.widgets" }
Depends { name: "Core" }
Depends { name: "ProjectExplorer" }
Depends { name: "CppTools" }
......
......@@ -5,10 +5,9 @@ QtcPlugin {
name: "Core"
Depends {
name: "qt"
name: "Qt"
submodules: [
'core', 'widgets', 'xml', 'network',
'script', 'sql', 'help', 'printsupport'
"core", "widgets", "xml", "network", "script", "sql", "help", "printsupport"
]
}
Depends { name: "Utils" }
......@@ -30,7 +29,7 @@ QtcPlugin {
]
cpp.dynamicLibraries: {
if (qbs.targetOS == 'windows') return [
if (qbs.targetOS == "windows") return [
"ole32"
]
}
......
......@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "CodePaster"
Depends { name: "qt"; submodules: ['widgets', 'network'] }
Depends { name: "Qt"; submodules: ["widgets", "network"] }
Depends { name: "Core" }
Depends { name: "TextEditor" }
......
......@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "CppEditor"
Depends { name: "qt"; submodules: ['widgets'] }
Depends { name: "Qt.widgets" }
Depends { name: "Core" }
Depends { name: "CppTools" }
Depends { name: "CPlusPlus" }
......
......@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "CppTools"
Depends { name: "qt"; submodules: ['widgets'] }
Depends { name: "Qt.widgets" }
Depends { name: "Core" }
Depends { name: "Find" }
Depends { name: "TextEditor" }
......
......@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "CVS"
Depends { name: "qt"; submodules: ['widgets'] }
Depends { name: "Qt.widgets" }
Depends { name: "Core" }
Depends { name: "TextEditor" }
Depends { name: "Find" }
......
......@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "Debugger"
Depends { name: "qt"; submodules: ['widgets', 'network', 'script'] }
Depends { name: "Qt"; submodules: ["widgets", "network", "script"] }
Depends { name: "Core" }
Depends { name: "CppTools" }
Depends { name: "QmlJSTools" }
......
......@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "Designer"
Depends { name: "qt"; submodules: ['widgets', 'xml', 'printsupport', 'designer', 'designercomponents'] }
Depends { name: "Qt"; submodules: ["widgets", "xml", "printsupport", "designer", "designercomponents"] }
Depends { name: "Core" }
Depends { name: "CPlusPlus" }
Depends { name: "CppTools" }
......@@ -89,6 +89,3 @@ QtcPlugin {
]
}
......@@ -9,7 +9,7 @@ QtcPlugin {
Depends { name: "TextEditor" }
Depends { name: "Find" }
Depends { name: "cpp" }
Depends { name: "qt"; submodules: ['widgets'] }
Depends { name: "Qt.widgets" }
cpp.includePaths: [
"..",
......
......@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "Find"
Depends { name: "qt"; submodules: ['widgets', 'xml', 'network', 'script'] }
Depends { name: "Qt"; submodules: ["widgets", "xml", "network", "script"] }
Depends { name: "Core" }
Depends { name: "cpp" }
......
......@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "GenericProjectManager"
Depends { name: "qt"; submodules: ['widgets'] }
Depends { name: "Qt.widgets" }
Depends { name: "Core" }
Depends { name: "CPlusPlus" }
Depends { name: "CppTools" }
......
......@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "Git"
Depends { name: "qt"; submodules: ['widgets', 'network'] }
Depends { name: "Qt"; submodules: ["widgets", "network"] }
Depends { name: "Core" }
Depends { name: "TextEditor" }
Depends { name: "Find" }
......
......@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "GLSLEditor"
Depends { name: "qt"; submodules: ['widgets'] }
Depends { name: "Qt.widgets" }
Depends { name: "Core" }
Depends { name: "TextEditor" }
Depends { name: "ProjectExplorer" }
......
......@@ -7,7 +7,7 @@ QtcPlugin {
Depends { name: "Core" }
Depends { name: "cpp" }
Depends { name: "qt"; submodules: ['widgets', 'xml', 'network', 'script'] }
Depends { name: "Qt"; submodules: ["widgets", "xml", "network", "script"] }
cpp.includePaths: [
"..",
......
......@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "ImageViewer"
Depends { name: "qt"; submodules: ['widgets', 'svg'] }
Depends { name: "Qt"; submodules: ["widgets", "svg"] }
Depends { name: "Core" }
Depends { name: "cpp" }
......@@ -35,6 +35,3 @@ QtcPlugin {
]
}
......@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "Locator"
Depends { name: "qt"; submodules: ['widgets', 'xml', 'network', 'script'] }
Depends { name: "Qt"; submodules: ["widgets", "xml", "network", "script"] }
Depends { name: "Core" }
Depends { name: "cpp" }
......
......@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "Macros"
Depends { name: "qt"; submodules: ['widgets'] }
Depends { name: "Qt.widgets" }
Depends { name: "Core" }
Depends { name: "Locator" }
Depends { name: "Find" }
......@@ -54,6 +54,3 @@ QtcPlugin {
]
}
......@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "Mercurial"
Depends { name: "qt"; submodules: ['widgets'] }
Depends { name: "Qt.widgets" }
Depends { name: "Core" }
Depends { name: "TextEditor" }
Depends { name: "Find" }
......
......@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "Perforce"
Depends { name: "qt"; submodules: ['widgets'] }
Depends { name: "Qt.widgets" }
Depends { name: "Core" }
Depends { name: "TextEditor" }
Depends { name: "Find" }
......
......@@ -4,7 +4,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "ProjectExplorer"
Depends { name: "qt"; submodules: ['widgets', 'xml', 'network', 'script', 'quick1'] }
Depends { name: "Qt"; submodules: ["widgets", "xml", "network", "script", "quick1"] }
Depends { name: "Core" }
Depends { name: "Locator" }
Depends { name: "Find" }
......
......@@ -5,9 +5,9 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "QmlDesigner"
condition: qtcore.versionMajor === 4
Depends { id: qtcore; name: "qt.core" }
Depends { name: "qt"; submodules: ['widgets', 'quick1'] }
condition: qtcore.versionMajor == 4
Depends { id: qtcore; name: "Qt.core" }
Depends { name: "Qt"; submodules: ["widgets", "quick1"] }