Commit 88267a32 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by hjk

Generalize QT_NO_CAST_FROM_ASCII

Change-Id: I2b6c5876cafb7cf19fc3040bc84fd88a90b6c0e0
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent a31dd26e
......@@ -8,7 +8,8 @@ function defines(qbs)
var list = [
'IDE_LIBRARY_BASENAME="lib"',
"QT_DISABLE_DEPRECATED_BEFORE=0x040900",
"QT_NO_CAST_TO_ASCII"
"QT_NO_CAST_TO_ASCII",
"QT_NO_CAST_FROM_ASCII"
]
if (testsEnabled(qbs))
list.push("WITH_TESTS")
......
......@@ -162,8 +162,7 @@ LIBS += -L$$IDE_LIBRARY_PATH
DEFINES += IDE_LIBRARY_BASENAME=\\\"$$IDE_LIBRARY_BASENAME\\\"
}
#DEFINES += QT_NO_CAST_FROM_ASCII
DEFINES += QT_NO_CAST_TO_ASCII
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
!macx:DEFINES += QT_USE_FAST_OPERATOR_PLUS QT_USE_FAST_CONCATENATION
unix {
......
......@@ -21,6 +21,7 @@ QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH)
SOURCES += $$PWD/main.cpp
RESOURCES += $$PWD/../qmlpuppet.qrc
DEFINES -= QT_NO_CAST_FROM_ASCII
OTHER_FILES += Info.plist.in
macx {
......
......@@ -19,6 +19,7 @@ include (../interfaces/interfaces.pri)
SOURCES += $$PWD/main.cpp
RESOURCES += $$PWD/../qmlpuppet.qrc
DEFINES -= QT_NO_CAST_FROM_ASCII
OTHER_FILES += Info.plist.in
macx {
......
......@@ -3,7 +3,7 @@ TARGET = Aggregation
include(../../qtcreatorlibrary.pri)
DEFINES += AGGREGATION_LIBRARY QT_NO_CAST_FROM_ASCII
DEFINES += AGGREGATION_LIBRARY
HEADERS = aggregate.h \
aggregation_global.h
......
......@@ -4,9 +4,9 @@ import "../QtcLibrary.qbs" as QtcLibrary
QtcLibrary {
name: "Aggregation"
cpp.defines: base.concat(["AGGREGATION_LIBRARY", "QT_NO_CAST_FROM_ASCII"])
Depends { name: "cpp" }
Depends { name: "Qt.core" }
cpp.defines: base.concat("AGGREGATION_LIBRARY")
files: [
"aggregate.cpp",
......
......@@ -10,8 +10,6 @@ include(../3rdparty/cplusplus/cplusplus.pri)
greaterThan(QT_MAJOR_VERSION, 4): QT += concurrent
DEFINES += QT_NO_CAST_FROM_ASCII
contains(QT, gui) {
HEADERS += \
$$PWD/Icons.h \
......
......@@ -7,8 +7,7 @@ QtcLibrary {
cpp.includePaths: base.concat("../3rdparty/cplusplus")
cpp.defines: base.concat([
"NDEBUG",
"CPLUSPLUS_BUILD_LIB",
"QT_NO_CAST_FROM_ASCII"
"CPLUSPLUS_BUILD_LIB"
])
cpp.optimization: "fast"
......
TEMPLATE = lib
TARGET = ExtensionSystem
DEFINES += EXTENSIONSYSTEM_LIBRARY QT_NO_CAST_FROM_ASCII
DEFINES += EXTENSIONSYSTEM_LIBRARY
include(../../qtcreatorlibrary.pri)
include(extensionsystem_dependencies.pri)
......
......@@ -6,8 +6,7 @@ QtcLibrary {
cpp.defines: base.concat([
"EXTENSIONSYSTEM_LIBRARY",
"IDE_TEST_DIR=\".\"",
"QT_NO_CAST_FROM_ASCII"
"IDE_TEST_DIR=\".\""
])
Depends { name: "cpp" }
......
......@@ -2,8 +2,7 @@ TEMPLATE = lib
TARGET = GLSL
DEFINES += \
GLSL_BUILD_LIB \
QT_CREATOR \
QT_NO_CAST_FROM_ASCII
QT_CREATOR
include(../../qtcreatorlibrary.pri)
include(glsl-lib.pri)
......
......@@ -6,8 +6,7 @@ QtcLibrary {
cpp.defines: base.concat([
"QT_CREATOR",
"GLSL_BUILD_LIB",
"QT_NO_CAST_FROM_ASCII"
"GLSL_BUILD_LIB"
])
Depends { name: "cpp" }
......
TEMPLATE = lib
TARGET = LanguageUtils
DEFINES += QT_CREATOR QT_NO_CAST_FROM_ASCII
DEFINES += QT_CREATOR
unix:QMAKE_CXXFLAGS_DEBUG += -O3
......
......@@ -7,8 +7,7 @@ QtcLibrary {
cpp.includePaths: base.concat("../3rdparty/cplusplus")
cpp.defines: base.concat([
"QT_CREATOR",
"LANGUAGEUTILS_BUILD_DIR",
"QT_NO_CAST_FROM_ASCII"
"LANGUAGEUTILS_BUILD_DIR"
])
cpp.optimization: "fast"
......
......@@ -5,8 +5,6 @@ QT += network
include(../../qtcreatorlibrary.pri)
include(qmldebug-lib.pri)
DEFINES += QT_NO_CAST_FROM_ASCII
OTHER_FILES += \
qmldebug.pri
......@@ -4,10 +4,7 @@ import "../QtcLibrary.qbs" as QtcLibrary
QtcLibrary {
name: "QmlDebug"
cpp.defines: base.concat([
"QMLDEBUG_LIB",
"QT_NO_CAST_FROM_ASCII"
])
cpp.defines: base.concat("QMLDEBUG_LIB")
Depends { name: "cpp" }
Depends { name: "Qt"; submodules: ["gui", "network"] }
......
TEMPLATE = lib
TARGET = QmlEditorWidgets
DEFINES += QWEAKPOINTER_ENABLE_ARROW QT_NO_CAST_FROM_ASCII
DEFINES += QWEAKPOINTER_ENABLE_ARROW
unix:QMAKE_CXXFLAGS_DEBUG += -O3
......
......@@ -8,8 +8,7 @@ QtcLibrary {
cpp.defines: base.concat([
"QWEAKPOINTER_ENABLE_ARROW",
"BUILD_QMLEDITORWIDGETS_LIB",
"QT_CREATOR",
"QT_NO_CAST_FROM_ASCII"
"QT_CREATOR"
])
cpp.optimization: "fast"
......
TEMPLATE = lib
TARGET = QmlJS
DEFINES += QMLJS_BUILD_DIR QT_CREATOR QT_NO_CAST_FROM_ASCII
DEFINES += QMLJS_BUILD_DIR QT_CREATOR
QT +=script
include(../../qtcreatorlibrary.pri)
......
......@@ -7,8 +7,7 @@ QtcLibrary {
cpp.includePaths: base.concat("parser")
cpp.defines: base.concat([
"QMLJS_BUILD_DIR",
"QT_CREATOR",
"QT_NO_CAST_FROM_ASCII"
"QT_CREATOR"
])
cpp.optimization: "fast"
......
......@@ -9,8 +9,6 @@ QT += script network
CONFIG += exceptions # used by portlist.cpp, textfileformat.cpp, and ssh/*
DEFINES += QT_NO_CAST_FROM_ASCII
win32-msvc* {
# disable warnings caused by botan headers
QMAKE_CXXFLAGS += -wd4250 -wd4290
......
......@@ -4,7 +4,7 @@ import "../QtcLibrary.qbs" as QtcLibrary
QtcLibrary {
name: "Utils"
cpp.defines: base.concat(["QTCREATOR_UTILS_LIB", "QT_NO_CAST_FROM_ASCII"])
cpp.defines: base.concat("QTCREATOR_UTILS_LIB")
Properties {
condition: qbs.targetOS == "windows"
......
......@@ -5,7 +5,7 @@ CONFIG += exceptions
TARGET = zeroconf
TEMPLATE = lib
DEFINES += ZEROCONF_LIBRARY QT_NO_CAST_FROM_ASCII
DEFINES += ZEROCONF_LIBRARY
SOURCES += servicebrowser.cpp \
embeddedLib.cpp \
......
......@@ -8,7 +8,7 @@ QtcLibrary {
Depends { name: "Qt.network" }
cpp.includePaths: base.concat(".")
cpp.defines: base.concat(["ZEROCONF_LIBRARY", "QT_NO_CAST_FROM_ASCII"])
cpp.defines: base.concat("ZEROCONF_LIBRARY")
Properties {
condition: qbs.targetOS == "windows"
......
TEMPLATE = lib
TARGET = AnalyzerBase
DEFINES += ANALYZER_LIBRARY QT_NO_CAST_FROM_ASCII
DEFINES += ANALYZER_LIBRARY
include(../../qtcreatorplugin.pri)
include(analyzerbase_dependencies.pri)
......
......@@ -13,10 +13,7 @@ QtcPlugin {
Depends { name: "TextEditor" }
Depends { name: "cpp" }
cpp.defines: base.concat([
"ANALYZER_LIBRARY",
"QT_NO_CAST_FROM_ASCII"
])
cpp.defines: base.concat("ANALYZER_LIBRARY")
files: [
"analyzerbase.qrc",
......
......@@ -76,5 +76,4 @@ FORMS += \
androidcreatekeystorecertificate.ui
RESOURCES = android.qrc
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
DEFINES += ANDROID_LIBRARY
TEMPLATE = lib
TARGET = AutotoolsProjectManager
#PROVIDER = Openismus
DEFINES += QT_NO_CAST_FROM_ASCII
include(../../qtcreatorplugin.pri)
include(autotoolsprojectmanager_dependencies.pri)
......
......@@ -11,9 +11,6 @@ QtcPlugin {
Depends { name: "QtSupport" }
Depends { name: "CppTools" }
Depends { name: "cpp" }
cpp.defines: base.concat(["QT_NO_CAST_FROM_ASCII"])
files: [
"autogenstep.cpp",
"autogenstep.h",
......
......@@ -2,7 +2,6 @@ TARGET = Bazaar
TEMPLATE = lib
include(../../qtcreatorplugin.pri)
include(bazaar_dependencies.pri)
DEFINES += QT_NO_CAST_FROM_ASCII
SOURCES += \
bazaarclient.cpp \
bazaarcontrol.cpp \
......
......@@ -3,8 +3,6 @@ TARGET = BinEditor
include(../../qtcreatorplugin.pri)
include(bineditor_dependencies.pri)
DEFINES += QT_NO_CAST_FROM_ASCII
HEADERS += bineditorplugin.h \
bineditor.h \
bineditorconstants.h \
......
......@@ -10,9 +10,6 @@ QtcPlugin {
Depends { name: "TextEditor" }
Depends { name: "Find" }
Depends { name: "cpp" }
cpp.defines: base.concat(["QT_NO_CAST_FROM_ASCII"])
files: [
"bineditor.cpp",
"bineditor.h",
......
......@@ -6,8 +6,6 @@ include(../../plugins/projectexplorer/projectexplorer.pri)
include(../../plugins/coreplugin/coreplugin.pri)
include(../../plugins/texteditor/texteditor.pri)
DEFINES += QT_NO_CAST_FROM_ASCII
HEADERS += bookmarksplugin.h \
bookmark.h \
bookmarkmanager.h \
......
......@@ -12,9 +12,6 @@ QtcPlugin {
Depends { name: "Find" }
Depends { name: "Locator" }
Depends { name: "cpp" }
cpp.defines: base.concat(["QT_NO_CAST_FROM_ASCII"])
files: [
"bookmark.cpp",
"bookmark.h",
......
......@@ -5,8 +5,6 @@ TARGET = ClearCase
include(../../qtcreatorplugin.pri)
include(clearcase_dependencies.pri)
DEFINES += QT_NO_CAST_FROM_ASCII
HEADERS += activityselector.h \
annotationhighlighter.h \
checkoutdialog.h \
......
......@@ -16,9 +16,6 @@ QtcPlugin {
Depends { name: "VcsBase" }
Depends { name: "Locator" }
Depends { name: "cpp" }
cpp.defines: base.concat(["QT_NO_CAST_FROM_ASCII"])
files: [
"activityselector.cpp",
"activityselector.h",
......
......@@ -4,8 +4,6 @@ TARGET = CMakeProjectManager
include(../../qtcreatorplugin.pri)
include(cmakeprojectmanager_dependencies.pri)
DEFINES += QT_NO_CAST_FROM_ASCII
HEADERS = cmakeproject.h \
cmakeprojectplugin.h \
cmakeprojectmanager.h \
......
......@@ -5,7 +5,6 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "CMakeProjectManager"
Depends { name: "cpp" }
Depends { name: "Qt.widgets" }
Depends { name: "Core" }
Depends { name: "CppTools" }
......@@ -14,7 +13,6 @@ QtcPlugin {
Depends { name: "ProjectExplorer" }
Depends { name: "TextEditor" }
Depends { name: "QtSupport" }
cpp.defines: base.concat(["QT_NO_CAST_FROM_ASCII"])
files: [
"CMakeProject.mimetypes.xml",
......@@ -52,4 +50,3 @@ QtcPlugin {
"makestep.h",
]
}
TEMPLATE = lib
TARGET = Core
DEFINES += CORE_LIBRARY \
QT_NO_CAST_FROM_ASCII
DEFINES += CORE_LIBRARY
QT += network \
script \
sql
......
......@@ -32,7 +32,6 @@ QtcPlugin {
]
}
cpp.defines: base.concat([ "QT_NO_CAST_FROM_ASCII" ])
files: [
"basefilewizard.cpp",
"basefilewizard.h",
......
......@@ -3,7 +3,6 @@ TEMPLATE = lib
TARGET = CodePaster
include(../../qtcreatorplugin.pri)
include(cpaster_dependencies.pri)
DEFINES += QT_NO_CAST_FROM_ASCII
HEADERS += cpasterplugin.h \
settingspage.h \
protocol.h \
......
TEMPLATE = lib
TARGET = CppEditor
DEFINES += CPPEDITOR_LIBRARY QT_NO_CAST_FROM_ASCII
DEFINES += CPPEDITOR_LIBRARY
include(../../qtcreatorplugin.pri)
include(cppeditor_dependencies.pri)
HEADERS += cppplugin.h \
......
......@@ -14,7 +14,6 @@ QtcPlugin {
Depends { name: "cpp" }
cpp.includePaths: base.concat("../../libs/3rdparty")
cpp.defines: base.concat(["QT_NO_CAST_FROM_ASCII"])
files: [
"CppEditor.mimetypes.xml",
......
......@@ -4,7 +4,6 @@ include(../../qtcreatorplugin.pri)
include($$IDE_SOURCE_TREE/src/plugins/locator/locator.pri)
include(cpptools_dependencies.pri)
DEFINES += QT_NO_CAST_FROM_ASCII
INCLUDEPATH += .
DEFINES += CPPTOOLS_LIBRARY
HEADERS += completionsettingspage.h \
......
......@@ -16,9 +16,6 @@ QtcPlugin {
Depends { name: "CPlusPlus" }
Depends { name: "LanguageUtils" }
Depends { name: "cpp" }
cpp.defines: base.concat(["QT_NO_CAST_FROM_ASCII"])
files: [
"ModelManagerInterface.cpp",
"ModelManagerInterface.h",
......
......@@ -8,7 +8,6 @@ include(../../plugins/coreplugin/coreplugin.pri)
include(../../plugins/vcsbase/vcsbase.pri)
include(../../libs/utils/utils.pri)
DEFINES += QT_NO_CAST_FROM_ASCII
HEADERS += annotationhighlighter.h \
cvsplugin.h \
cvscontrol.h \
......
......@@ -8,7 +8,7 @@ TARGET = Debugger
include(../../qtcreatorplugin.pri)
include(debugger_dependencies.pri)
DEFINES += DEBUGGER_LIBRARY QT_NO_CAST_FROM_ASCII
DEFINES += DEBUGGER_LIBRARY
INCLUDEPATH += $$PWD/../../libs/utils
......
......@@ -26,7 +26,6 @@ QtcPlugin {
"../../shared/json",
"../../shared/registryaccess"
])
cpp.defines: base.concat(["QT_NO_CAST_FROM_ASCII"])
Group {
condition: Defaults.testsEnabled(qbs)
......
TEMPLATE = lib
TARGET = Designer
DEFINES += DESIGNER_LIBRARY QT_NO_CAST_FROM_ASCII
DEFINES += DESIGNER_LIBRARY
include(../../qtcreatorplugin.pri)
include(../../shared/designerintegrationv2/designerintegration.pri)
......
......@@ -7,7 +7,6 @@ include(../../plugins/coreplugin/coreplugin.pri)
include(../../plugins/texteditor/texteditor.pri)
include(../../plugins/find/find.pri)
DEFINES += QT_NO_CAST_FROM_ASCII
QT += gui
SOURCES += fakevimactions.cpp \
fakevimhandler.cpp \
......
......@@ -10,9 +10,7 @@ QtcPlugin {
Depends { name: "TextEditor" }
Depends { name: "Find" }
Depends { name: "Qt.widgets" }
Depends { name: "cpp" }
cpp.defines: base.concat(["QT_NO_CAST_FROM_ASCII"])
files: [
"fakevimactions.cpp",
"fakevimactions.h",
......
......@@ -3,8 +3,6 @@ TARGET = GenericProjectManager
include(../../qtcreatorplugin.pri)
include(genericprojectmanager_dependencies.pri)
DEFINES += QT_NO_CAST_FROM_ASCII
HEADERS = genericproject.h \
genericprojectplugin.h \
genericprojectmanager.h \
......
......@@ -5,7 +5,6 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "GenericProjectManager"
Depends { name: "cpp" }
Depends { name: "Qt.widgets" }
Depends { name: "Core" }
Depends { name: "CPlusPlus" }
......@@ -15,7 +14,6 @@ QtcPlugin {
Depends { name: "Find" }
Depends { name: "Locator" }
Depends { name: "QtSupport" }
cpp.defines: base.concat(["QT_NO_CAST_FROM_ASCII"])
files: [
"filesselectionwizardpage.cpp",
......
TEMPLATE = lib
TARGET = Git
DEFINES += QT_NO_CAST_FROM_ASCII
include(../../qtcreatorplugin.pri)
include(../../plugins/projectexplorer/projectexplorer.pri)
include(../../plugins/texteditor/texteditor.pri)
......
......@@ -12,9 +12,6 @@ QtcPlugin {
Depends { name: "VcsBase" }
Depends { name: "Locator" }
Depends { name: "cpp" }
cpp.defines: base.concat(["QT_NO_CAST_FROM_ASCII"])
files: [
"annotationhighlighter.cpp",
"annotationhighlighter.h",
......
......@@ -5,8 +5,7 @@ include(glsleditor_dependencies.pri)
DEFINES += \
GLSLEDITOR_LIBRARY \
QT_CREATOR \
QT_NO_CAST_FROM_ASCII
QT_CREATOR
HEADERS += \
glsleditor.h \
......
......@@ -5,7 +5,6 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "GLSLEditor"
Depends { name: "cpp" }
Depends { name: "Qt.widgets" }
Depends { name: "Core" }
Depends { name: "TextEditor" }
......@@ -13,7 +12,6 @@ QtcPlugin {
Depends { name: "CppTools" }
Depends { name: "GLSL" }
Depends { name: "CPlusPlus" }
cpp.defines: base.concat(["QT_NO_CAST_FROM_ASCII"])
files: [
"GLSLEditor.mimetypes.xml",
......
......@@ -18,8 +18,7 @@ include(help_dependencies.pri)
DEFINES += \
QT_CLUCENE_SUPPORT \
HELP_LIBRARY \
QT_NO_CAST_FROM_ASCII
HELP_LIBRARY
HEADERS += \
centralwidget.h \
......
......@@ -25,7 +25,7 @@ QtcPlugin {
condition: qtcore.versionMajor >= 5
cpp.defines: base.concat(["QT_NO_WEBKIT"])
}
cpp.defines: base.concat(["QT_CLUCENE_SUPPORT", "QT_NO_CAST_FROM_ASCII"])
cpp.defines: base.concat("QT_CLUCENE_SUPPORT")
cpp.includePaths: base.concat("../../shared/help")
files: [
......
......@@ -3,8 +3,6 @@ TARGET = ImageViewer
include(../../qtcreatorplugin.pri)
include(imageviewer_dependencies.pri)
DEFINES += QT_NO_CAST_FROM_ASCII
HEADERS += \
imageviewerplugin.h \
imageviewerfactory.h \
......
......@@ -5,10 +5,8 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "ImageViewer"
Depends { name: "cpp" }
Depends { name: "Qt"; submodules: ["widgets", "svg"] }
Depends { name: "Core" }
cpp.defines: base.concat(["QT_NO_CAST_FROM_ASCII"])
files: [
"ImageViewer.mimetypes.xml",
......
TEMPLATE = lib
TARGET = Locator
DEFINES += LOCATOR_LIBRARY QT_NO_CAST_FROM_ASCII
DEFINES += LOCATOR_LIBRARY
include(../../qtcreatorplugin.pri)
include(locator_dependencies.pri)
HEADERS += locatorplugin.h \
......
......@@ -16,7 +16,6 @@ QtcPlugin {
"codeassist"
])
cpp.defines: base.concat(["QT_NO_CAST_FROM_ASCII"])
files: [
"basefilefilter.cpp",
"basefilefilter.h",
......
TEMPLATE = lib
TARGET = Macros
DEFINES += MACROS_LIBRARY QT_NO_CAST_FROM_ASCII
DEFINES += MACROS_LIBRARY
include(../../qtcreatorplugin.pri)
include(macros_dependencies.pri)
......
......@@ -5,14 +5,12 @@ import "../QtcPlugin.qbs" as QtcPlugin
QtcPlugin {
name: "Macros"
Depends { name: "cpp" }
Depends { name: "Qt.widgets" }
Depends { name: "Core" }
Depends { name: "Locator" }
Depends { name: "Find" }
Depends { name: "TextEditor" }
Depends { name: "app_version_header" }
cpp.defines: base.concat(["QT_NO_CAST_FROM_ASCII"])
files: [
"actionmacrohandler.cpp",
......
......@@ -108,4 +108,4 @@ FORMS += \
maemodeviceconfigwizardkeydeploymentpage.ui
RESOURCES += qt-maemo.qrc
DEFINES += MADDE_LIBRARY QT_NO_CAST_FROM_ASCII
DEFINES += MADDE_LIBRARY
......@@ -12,9 +12,6 @@ QtcPlugin {
Depends { name: "RemoteLinux" }
Depends { name: "Qt.gui" }
Depends { name: "cpp" }
cpp.defines: base.concat(["QT_NO_CAST_FROM_ASCII"])
files: [
"debianmanager.cpp",
"debianmanager.h",
......
......@@ -2,7 +2,6 @@ TARGET = Mercurial
TEMPLATE = lib
include(../../qtcreatorplugin.pri)
include(mercurial_dependencies.pri)
DEFINES += QT_NO_CAST_FROM_ASCII
SOURCES += mercurialplugin.cpp \
optionspage.cpp \
mercurialcontrol.cpp \
......
......@@ -4,8 +4,6 @@ TARGET = Perforce
include(../../qtcreatorplugin.pri)
include(perforce_dependencies.pri)
DEFINES += QT_NO_CAST_FROM_ASCII
HEADERS += \
perforceplugin.h \
perforcechecker.h \
......
......@@ -287,4 +287,4 @@ RESOURCES += projectexplorer.qrc
DEFINES += QTC_CPU=X86Architecture
}
DEFINES += PROJECTEXPLORER_LIBRARY QT_NO_CAST_FROM_ASCII
DEFINES += PROJECTEXPLORER_LIBRARY
......@@ -14,7 +14,7 @@ QtcPlugin {
Depends { name: "QtcSsh" }