Skip to content

Commit

Permalink
make use of silent error() emission
Browse files Browse the repository at this point in the history
get rid of the entirely superfluous stock "Aborting." messages -
the event triggering the exit has already reported the problem.

Change-Id: Ib9dfb9e4212f60eceb2ea432cdf56c5a8afe9d65
Reviewed-by: Lars Knoll <[email protected]>
  • Loading branch information
ossilator authored and laknoll committed Aug 8, 2016
1 parent 22d1351 commit 815a41f
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion mkspecs/features/android/android_deployment_settings.prf
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ contains(TEMPLATE, ".*app"):!build_pass: {

isEmpty(ANDROID_DEPLOYMENT_SETTINGS_FILE): ANDROID_DEPLOYMENT_SETTINGS_FILE = $$OUT_PWD/android-$$TARGET-deployment-settings.json

write_file($$ANDROID_DEPLOYMENT_SETTINGS_FILE, FILE_CONTENT) | error("Aborting.")
write_file($$ANDROID_DEPLOYMENT_SETTINGS_FILE, FILE_CONTENT)|error()
}

2 changes: 1 addition & 1 deletion mkspecs/features/configure.prf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ defineTest(qtCompileTest) {
# Clean up after previous run
exists($$test_out_dir/Makefile):qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE distclean")

mkpath($$test_out_dir)|error("Aborting.")
mkpath($$test_out_dir)|error()

!isEmpty (QMAKE_QTCONF): qtconfarg = -qtconf $$QMAKE_QTCONF

Expand Down
2 changes: 1 addition & 1 deletion mkspecs/features/java.prf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ javac.commands = javac -source 6 -target 6 -Xlint:unchecked -bootclasspath $$AND
javac.depends = FORCE
QMAKE_EXTRA_COMPILERS += javac

mkpath($$absolute_path($$CLASS_DIR, $$OUT_PWD)) | error("Aborting.")
mkpath($$absolute_path($$CLASS_DIR, $$OUT_PWD))|error()

# Disable all linker flags since we are overriding the regular linker
QMAKE_LFLAGS =
Expand Down
2 changes: 1 addition & 1 deletion mkspecs/features/moc.prf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ win32:count(MOC_INCLUDEPATH, 40, >) {
WIN_INCLUDETEMP_CONT =
for (inc, MOC_INCLUDEPATH): \
WIN_INCLUDETEMP_CONT += -I$$inc
write_file($$absolute_path($$WIN_INCLUDETEMP, $$OUT_PWD), WIN_INCLUDETEMP_CONT)|error("Aborting.")
write_file($$absolute_path($$WIN_INCLUDETEMP, $$OUT_PWD), WIN_INCLUDETEMP_CONT)|error()
}

# QNX's compiler sets "gcc" config, but does not support the -dM option;
Expand Down
6 changes: 3 additions & 3 deletions mkspecs/features/qt.prf
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ contains(qt_module_deps, qml): \
}
}
QML_IMPORT_CPP = $$OUT_PWD/$$lower($$basename(TARGET))_qml_plugin_import.cpp
write_file($$QML_IMPORT_CPP, IMPORT_FILE_CONT)|error("Aborting.")
write_file($$QML_IMPORT_CPP, IMPORT_FILE_CONT)|error()
GENERATED_SOURCES += $$QML_IMPORT_CPP
QMAKE_DISTCLEAN += $$QML_IMPORT_CPP

Expand All @@ -261,7 +261,7 @@ contains(qt_module_deps, qml): \
"[Paths]" \
"Imports = $$QMAKE_QML_BUNDLE_PATH" \
"Qml2Imports = $$QMAKE_QML_BUNDLE_PATH"
write_file("$$OUT_PWD/qt.conf", QT_CONF_CONTENTS)|error("Aborting.")
write_file("$$OUT_PWD/qt.conf", QT_CONF_CONTENTS)|error()

# write qt.conf and copy each qml import dir into the bundle.
# But strip away archives and other files that are not needed:
Expand Down Expand Up @@ -334,7 +334,7 @@ contains(QT_CONFIG, static) {
warning("Plugin class name could not be determined for $$IMPORT_PLUG plugin.")
}
IMPORT_CPP = $$OUT_PWD/$$lower($$basename(TARGET))_plugin_import.cpp
write_file($$IMPORT_CPP, IMPORT_FILE_CONT)|error("Aborting.")
write_file($$IMPORT_CPP, IMPORT_FILE_CONT)|error()
GENERATED_SOURCES += $$IMPORT_CPP
QMAKE_DISTCLEAN += $$IMPORT_CPP
}
Expand Down
2 changes: 1 addition & 1 deletion mkspecs/features/qt_android_deps.prf
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ DEPENDENCY_FILE = $$ANDROID_DEPENDS_DIR$$TARGET-android-dependencies.xml

!isEmpty(FILE_CONTENT) {
FILE_CONTENT = "<rules><dependencies><lib name=\"$$TARGET\"><depends>" $$FILE_CONTENT "</depends></lib></dependencies></rules>"
write_file($$DEPENDENCY_FILE, FILE_CONTENT) | error("Aborting.")
write_file($$DEPENDENCY_FILE, FILE_CONTENT)|error()
}
}

Expand Down
10 changes: 5 additions & 5 deletions mkspecs/features/qt_configure.prf
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ defineTest(qtConfTest_shell) {
test_out_dir = $$shadowed($$test_dir)
test_cmd_base = "cd $$system_quote($$system_path($$test_out_dir)) &&"

mkpath($$test_out_dir)|error("Aborting.")
mkpath($$test_out_dir)|error()

qtRunLoggedCommand("$$test_cmd_base $$test_dir/$${test} $${args}"): \
return(false)
Expand All @@ -272,7 +272,7 @@ defineReplace(qtConfToolchainSupportsFlag) {
test_cmd_base = "cd $$system_quote($$system_path($$test_out_dir)) &&"

conftest = "int main() { return 0; }"
write_file("$$test_out_dir/conftest.cpp", conftest)|error("Aborting.")
write_file("$$test_out_dir/conftest.cpp", conftest)|error()

qtRunLoggedCommand("$$test_cmd_base $$QMAKE_CXX $${1} -o conftest-out conftest.cpp"): \
return(true)
Expand Down Expand Up @@ -436,7 +436,7 @@ defineTest(qtConfTest_compile) {
# Clean up after previous run
exists($$test_out_dir/Makefile): qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE distclean")

mkpath($$test_out_dir)|error("Aborting.")
mkpath($$test_out_dir)|error()

!isEmpty(QMAKE_QTCONF): qtconfarg = -qtconf $$QMAKE_QTCONF

Expand Down Expand Up @@ -912,7 +912,7 @@ defineTest(qtConfPrintReport) {
}

!equals(config.input.continue, yes): \
error("Aborting.")
error()
}
}

Expand Down Expand Up @@ -1156,7 +1156,7 @@ defineTest(qtConfProcessOutput) {
defined(qtConfOutputPostProcess_$${type}, test): \
qtConfOutputPostProcess_$${type}()

write_file($$file, config.output.$${type})|error("Aborting.")
write_file($$file, config.output.$${type})|error()
}
}

Expand Down
2 changes: 1 addition & 1 deletion mkspecs/features/qt_functions.prf
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ defineTest(qtAddToolEnv) {
"EndLocal"
$$1 = call
}
!build_pass:!write_file($$OUT_PWD/$$batch_name, batch_cont, exe): error("Aborting.")
!build_pass:!write_file($$OUT_PWD/$$batch_name, batch_cont, exe): error()
isEmpty(3): \
$$1 += $$shell_quote($$shell_path($$OUT_PWD/$$batch_name))
else: \
Expand Down
2 changes: 1 addition & 1 deletion mkspecs/features/qt_module.prf
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ android: CONFIG += qt_android_deps no_linker_version_script

verscript = $$verscript_in
}
write_file($$OUT_PWD/$$verscript, verscript_content)|error("Aborting.")
write_file($$OUT_PWD/$$verscript, verscript_content)|error()
unset(current)
unset(previous)
unset(verscript)
Expand Down
6 changes: 3 additions & 3 deletions mkspecs/features/qt_module_headers.prf
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ for (injection, SYNCQT.INJECTIONS) {
fwd_hdr = $$member(injects, 1)
MAIN_FWD = $$INC_PATH/include/$$MODULE_INCNAME/$$fwd_hdr
MAIN_FWD_CONT = '$${LITERAL_HASH}include "$$member(injects, 0)"'
write_file($$MAIN_FWD, MAIN_FWD_CONT)|error("Aborting.")
write_file($$MAIN_FWD, MAIN_FWD_CONT)|error()
!git_build: QMAKE_DISTCLEAN += $$MAIN_FWD
injects = $$member(injects, 2, -1)
for (inject, injects) {
CLASS_FWD = $$INC_PATH/include/$$MODULE_INCNAME/$$inject
CLASS_FWD_CONT = '$${LITERAL_HASH}include "$$fwd_hdr"'
write_file($$CLASS_FWD, CLASS_FWD_CONT)|error("Aborting.")
write_file($$CLASS_FWD, CLASS_FWD_CONT)|error()
!git_build: QMAKE_DISTCLEAN += $$CLASS_FWD
}
}
Expand All @@ -135,7 +135,7 @@ MODULE_MASTER_DEPS_HEADER = $$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME/$${MOD
MODULE_MASTER_DEPS_HEADER_CONT += "$${LITERAL_HASH}include <$$depname/$$depname>"
}
MODULE_MASTER_DEPS_HEADER_CONT += "$${LITERAL_HASH}endif"
write_file($$MODULE_MASTER_DEPS_HEADER, MODULE_MASTER_DEPS_HEADER_CONT)|error("Aborting.")
write_file($$MODULE_MASTER_DEPS_HEADER, MODULE_MASTER_DEPS_HEADER_CONT)|error()
!git_build: QMAKE_DISTCLEAN += $$MODULE_MASTER_DEPS_HEADER
}
SYNCQT.HEADER_FILES += $$MODULE_MASTER_DEPS_HEADER
Expand Down
6 changes: 3 additions & 3 deletions mkspecs/features/qt_module_pris.prf
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
winrt: MODULE_PRI_CONT += \
"QT.$${MODULE_ID}.winrt_capabilities =$$join(MODULE_WINRT_CAPABILITIES, " ", " ")" \
"QT.$${MODULE_ID}.winrt_capabilities_device =$$join(MODULE_WINRT_CAPABILITIES_DEVICE, " ", " ")"
write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.")
write_file($$MODULE_PRI, MODULE_PRI_CONT)|error()
!internal_module:!no_private_module {
module_build_type += internal_module
private_deps = $$QT
Expand All @@ -127,7 +127,7 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
"QT.$${MODULE}_private.frameworks =" \
"QT.$${MODULE}_private.depends = $$private_deps" \
"QT.$${MODULE}_private.module_config =$$join(module_build_type, " ", " ")"
write_file($$MODULE_PRIVATE_PRI, MODULE_PRIVATE_PRI_CONT)|error("Aborting.")
write_file($$MODULE_PRIVATE_PRI, MODULE_PRIVATE_PRI_CONT)|error()
}
MODULE_PRI_FILES = $$MODULE_PRI $$MODULE_PRIVATE_PRI

Expand Down Expand Up @@ -162,7 +162,7 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
MODULE_FWD_PRI_CONT += \
"QT.$${MODULE}_private.includes $$pls= $$MODULE_FWD_PRIVATE_INCLUDES"
}
write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error("Aborting.")
write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error()
touch($$MODULE_FWD_PRI, $$MODULE_PRI)
MODULE_PRI_FILES += $$MODULE_FWD_PRI

Expand Down
4 changes: 2 additions & 2 deletions mkspecs/features/qt_plugin.prf
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ CONFIG(static, static|shared)|prefix_build {
"QT_PLUGIN.$${MODULE}.EXTENDS =$$join(PLUGIN_EXTENDS, " ", " ")" \
"QT_PLUGIN.$${MODULE}.CLASS_NAME = $$PLUGIN_CLASS_NAME" \
"QT_PLUGINS += $$MODULE"
write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.")
write_file($$MODULE_PRI, MODULE_PRI_CONT)|error()
MODULE_PRI_FILES = $$MODULE_PRI

force_independent {
Expand All @@ -59,7 +59,7 @@ CONFIG(static, static|shared)|prefix_build {
MODULE_FWD_PRI_CONT = \
"QT_PLUGIN.$${MODULE}.PATH = $$MODULE_BASE_OUTDIR/plugins" \
"include($$MODULE_PRI)"
write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error("Aborting.")
write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error()
touch($$MODULE_FWD_PRI, $$MODULE_PRI)
MODULE_PRI_FILES += $$MODULE_FWD_PRI

Expand Down
2 changes: 1 addition & 1 deletion mkspecs/features/qt_tool.prf
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ DEFINES *= QT_USE_QSTRINGBUILDER
"QT_TOOL.$${MODULE}.binary = $$val_escape(bin)" \
"QT_TOOL.$${MODULE}.depends =$$join(MODULE_DEPENDS, " ", " ")" \
$$module_envvars
write_file($$TOOL_PRI, TOOL_PRI_CONT)|error("Aborting.")
write_file($$TOOL_PRI, TOOL_PRI_CONT)|error()

# Then, inject the new tool into the current cache state
!contains(QMAKE_INTERNAL_INCLUDED_FILES, $$TOOL_PRI) { # before the actual include()!
Expand Down
2 changes: 1 addition & 1 deletion mkspecs/features/resources.prf
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ for(resource, RESOURCES) {
"</RCC>"

!write_file($$OUT_PWD/$$resource_file, resource_file_content): \
error("Aborting.")
error()
}

RESOURCES -= $$resource
Expand Down
10 changes: 5 additions & 5 deletions qtbase.pro
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ for (ft, features) {
" QT_DISABLED_FEATURES += $$lower($$replace(ft, _, -))"
}
}
write_file($$OUT_PWD/src/corelib/global/qfeatures.h, FEATURES_H)|error("Aborting.")
write_file($$OUT_PWD/src/corelib/global/qfeatures.h, FEATURES_H)|error()
# Create forwarding header
FWD_FEATURES_H = \
'$${LITERAL_HASH}include "../../src/corelib/global/qfeatures.h"'
write_file($$OUT_PWD/include/QtCore/qfeatures.h, FWD_FEATURES_H)|error("Aborting.")
write_file($$OUT_PWD/include/QtCore/qfeatures.h, FWD_FEATURES_H)|error()

no_features =
lines = $$cat($$OUT_PWD/src/corelib/global/qconfig.h, lines)
Expand Down Expand Up @@ -146,15 +146,15 @@ FEATURES_PRI = \
"$$escape_expand(\\n)$${LITERAL_HASH} Dependencies derived from <qtbase>/src/corelib/global/qfeatures.txt:" \
$$FEATURES_PRI \
"QT_DISABLED_FEATURES = \$\$unique(QT_DISABLED_FEATURES)"
write_file($$OUT_PWD/mkspecs/qfeatures.pri, FEATURES_PRI)|error("Aborting.")
write_file($$OUT_PWD/mkspecs/qfeatures.pri, FEATURES_PRI)|error()

# Create forwarding headers for qconfig.h
FWD_QCONFIG_H = \
'$${LITERAL_HASH}include "../../src/corelib/global/qconfig.h"'
write_file($$OUT_PWD/include/QtCore/qconfig.h, FWD_QCONFIG_H)|error("Aborting.")
write_file($$OUT_PWD/include/QtCore/qconfig.h, FWD_QCONFIG_H)|error()
FWD_QTCONFIG = \
'$${LITERAL_HASH}include "qconfig.h"'
write_file($$OUT_PWD/include/QtCore/QtConfig, FWD_QTCONFIG)|error("Aborting.")
write_file($$OUT_PWD/include/QtCore/QtConfig, FWD_QTCONFIG)|error()

# Files created by us
QMAKE_DISTCLEAN += \
Expand Down

0 comments on commit 815a41f

Please sign in to comment.