Merge remote-tracking branch 'origin/stable' into dev
Conflicts: src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp tools/configure/configureapp.cpp Change-Id: I3092bd3276af14304b7ab3ae1e1cc05d11cdede0
@ -805,7 +805,9 @@ foreach my $lib (@modules_to_sync) {
|
||||
die "No such module: $lib" unless(defined $modules{$lib});
|
||||
|
||||
#iteration info
|
||||
my @dirs = split(/;/, $modules{$lib});
|
||||
my $module = $modules{$lib};
|
||||
my $is_qt = !($module =~ s/^!//);
|
||||
my @dirs = split(/;/, $module);
|
||||
my $dir = $dirs[0];
|
||||
|
||||
my $pathtoheaders = "";
|
||||
@ -914,7 +916,7 @@ foreach my $lib (@modules_to_sync) {
|
||||
}
|
||||
|
||||
my $iheader = $subdir . "/" . $header;
|
||||
my @classes = $public_header && !$minimal ? classNames($iheader) : ();
|
||||
my @classes = $public_header && (!$minimal && $is_qt) ? classNames($iheader) : ();
|
||||
if($showonly) {
|
||||
print "$header [$lib]\n";
|
||||
foreach(@classes) {
|
||||
@ -1024,7 +1026,7 @@ foreach my $lib (@modules_to_sync) {
|
||||
"#include \"".lc($lib)."version.h\"\n" .
|
||||
"#endif\n";
|
||||
|
||||
unless ($showonly || $minimal) {
|
||||
unless ($showonly || $minimal || !$is_qt) {
|
||||
# create deprecated headers
|
||||
my $first = 1;
|
||||
while (my ($header, $include) = each %{$deprecatedheaders{$lib}}) {
|
||||
@ -1112,7 +1114,9 @@ foreach my $lib (@modules_to_sync) {
|
||||
my $master_include = "$out_basedir/include/$lib/$lib";
|
||||
$pri_install_files .= fixPaths($master_include, $dir) . " ";
|
||||
writeFile($master_include, $master_contents, $lib, "master header");
|
||||
}
|
||||
|
||||
unless ($showonly || $minimal) {
|
||||
#handle the headers.pri for each module
|
||||
my $headers_pri_contents = "";
|
||||
$headers_pri_contents .= "SYNCQT.HEADER_FILES = $pri_install_files\n";
|
||||
@ -1126,6 +1130,7 @@ foreach my $lib (@modules_to_sync) {
|
||||
|
||||
if($check_includes) {
|
||||
foreach my $lib (@modules_to_sync) {
|
||||
next if ($modules{$lib} =~ /^!/);
|
||||
#calc subdirs
|
||||
my @subdirs = listSubdirs(map { s/^\^//; $_ } split(/;/, $modules{$lib}));
|
||||
|
||||
|
67
configure
vendored
@ -876,6 +876,7 @@ CFG_SSE=auto
|
||||
CFG_FONTCONFIG=auto
|
||||
CFG_LIBFREETYPE=auto
|
||||
CFG_SQL_AVAILABLE=
|
||||
QT_ALL_BUILD_PARTS=" libs tools examples tests "
|
||||
QT_DEFAULT_BUILD_PARTS="libs tools examples"
|
||||
CFG_BUILD_PARTS=""
|
||||
CFG_NOBUILD_PARTS=""
|
||||
@ -1113,7 +1114,45 @@ while [ "$#" -gt 0 ]; do
|
||||
VAL=no
|
||||
;;
|
||||
#Qt style options that pass an argument
|
||||
-prefix|-docdir|-headerdir|-plugindir|-importdir|-qmldir|-archdatadir|-datadir|-libdir|-bindir|-libexecdir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-skip|-platform|-xplatform|-device|-device-option|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir|-hostlibdir|-qpa|-qconfig|-android-sdk|-android-ndk|-android-ndk-platform|-android-ndk-host|-android-arch|-android-toolchain-version)
|
||||
-prefix| \
|
||||
-docdir| \
|
||||
-headerdir| \
|
||||
-plugindir| \
|
||||
-importdir| \
|
||||
-qmldir| \
|
||||
-archdatadir| \
|
||||
-datadir| \
|
||||
-libdir| \
|
||||
-bindir| \
|
||||
-libexecdir| \
|
||||
-translationdir| \
|
||||
-sysconfdir| \
|
||||
-examplesdir| \
|
||||
-testsdir| \
|
||||
-hostdatadir| \
|
||||
-hostbindir| \
|
||||
-hostlibdir| \
|
||||
-sysroot| \
|
||||
-depths| \
|
||||
-make| \
|
||||
-nomake| \
|
||||
-skip| \
|
||||
-platform| \
|
||||
-xplatform| \
|
||||
-device| \
|
||||
-device-option| \
|
||||
-sdk| \
|
||||
-arch| \
|
||||
-host-arch| \
|
||||
-mysql_config| \
|
||||
-qpa| \
|
||||
-qconfig| \
|
||||
-android-sdk| \
|
||||
-android-ndk| \
|
||||
-android-ndk-platform| \
|
||||
-android-ndk-host| \
|
||||
-android-arch| \
|
||||
-android-toolchain-version)
|
||||
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
|
||||
shift
|
||||
VAL="$1"
|
||||
@ -1392,10 +1431,22 @@ while [ "$#" -gt 0 ]; do
|
||||
fi
|
||||
;;
|
||||
nomake)
|
||||
if [ -n "${QT_ALL_BUILD_PARTS%%* $VAL *}" ]; then
|
||||
echo "Unknown part $VAL passed to -nomake." >&2
|
||||
exit 1
|
||||
fi
|
||||
CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
|
||||
;;
|
||||
make)
|
||||
CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
|
||||
if [ "$VAL" = "no" ]; then
|
||||
UNKNOWN_OPT=yes
|
||||
else
|
||||
if [ -n "${QT_ALL_BUILD_PARTS%%* $VAL *}" ]; then
|
||||
echo "Unknown part $VAL passed to -make." >&2
|
||||
exit 1
|
||||
fi
|
||||
CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
|
||||
fi
|
||||
;;
|
||||
skip)
|
||||
VAL=qt${VAL#qt}
|
||||
@ -4000,10 +4051,6 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
|
||||
if [ '!' -z "$D_FLAGS" ]; then
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $D_FLAGS"
|
||||
fi
|
||||
QMAKE_BIN_DIR="$QT_INSTALL_BINS"
|
||||
[ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
|
||||
QMAKE_DATA_DIR="$QT_INSTALL_ARCHDATA"
|
||||
[ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
|
||||
echo >>"$mkfile"
|
||||
adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
|
||||
adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
|
||||
@ -4020,11 +4067,9 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
|
||||
echo "QT_VERSION = $QT_VERSION" >> "$mkfile"
|
||||
echo "EXTRA_CFLAGS = $EXTRA_CFLAGS" >> "$mkfile"
|
||||
echo "EXTRA_CXXFLAGS = $EXTRA_CXXFLAGS" >> "$mkfile"
|
||||
echo "QTOBJS = $EXTRA_OBJS" >> "$mkfile"
|
||||
echo "QTSRCS = $EXTRA_SRCS" >> "$mkfile"
|
||||
echo "QTOBJS =" $EXTRA_OBJS >> "$mkfile"
|
||||
echo "QTSRCS =" $EXTRA_SRCS >> "$mkfile"
|
||||
echo "LFLAGS = $EXTRA_LFLAGS" >> "$mkfile"
|
||||
echo "QT_INSTALL_BINS = \$(INSTALL_ROOT)$QMAKE_BIN_DIR" >> "$mkfile"
|
||||
echo "QT_INSTALL_DATA = \$(INSTALL_ROOT)$QMAKE_DATA_DIR" >> "$mkfile"
|
||||
echo "EXEEXT = $EXEEXT" >> "$mkfile"
|
||||
echo "RM_F = rm -f" >> "$mkfile"
|
||||
echo "RM_RF = rm -rf" >> "$mkfile"
|
||||
@ -6981,7 +7026,7 @@ fi
|
||||
MAKE=`basename "$MAKE"`
|
||||
echo
|
||||
echo Qt is now configured for building. Just run \'$MAKE\'.
|
||||
if [ "$relpath" = "$QT_INSTALL_PREFIX" ]; then
|
||||
if [ "$outpath" = "$QT_INSTALL_PREFIX" ]; then
|
||||
echo Once everything is built, Qt is installed.
|
||||
echo You should not run \'$MAKE install\'.
|
||||
else
|
||||
|
0
doc/global/template/images/arrow.png
Executable file → Normal file
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
0
doc/global/template/images/bg_l.png
Executable file → Normal file
Before Width: | Height: | Size: 100 B After Width: | Height: | Size: 100 B |
0
doc/global/template/images/bg_l_blank.png
Executable file → Normal file
Before Width: | Height: | Size: 84 B After Width: | Height: | Size: 84 B |
0
doc/global/template/images/bg_r.png
Executable file → Normal file
Before Width: | Height: | Size: 96 B After Width: | Height: | Size: 96 B |
0
doc/global/template/images/bgrContent.png
Executable file → Normal file
Before Width: | Height: | Size: 149 B After Width: | Height: | Size: 149 B |
0
doc/global/template/images/blu_dot.png
Executable file → Normal file
Before Width: | Height: | Size: 168 B After Width: | Height: | Size: 168 B |
0
doc/global/template/images/box_bg.png
Executable file → Normal file
Before Width: | Height: | Size: 89 B After Width: | Height: | Size: 89 B |
0
doc/global/template/images/breadcrumb.png
Executable file → Normal file
Before Width: | Height: | Size: 134 B After Width: | Height: | Size: 134 B |
0
doc/global/template/images/bullet_gt.png
Executable file → Normal file
Before Width: | Height: | Size: 124 B After Width: | Height: | Size: 124 B |
0
doc/global/template/images/bullet_sq.png
Executable file → Normal file
Before Width: | Height: | Size: 74 B After Width: | Height: | Size: 74 B |
0
doc/global/template/images/feedbackground.png
Executable file → Normal file
Before Width: | Height: | Size: 263 B After Width: | Height: | Size: 263 B |
0
doc/global/template/images/home.png
Executable file → Normal file
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
0
doc/global/template/images/horBar.png
Executable file → Normal file
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
0
doc/global/template/images/ico_note.png
Executable file → Normal file
Before Width: | Height: | Size: 649 B After Width: | Height: | Size: 649 B |
0
doc/global/template/images/ico_note_attention.png
Executable file → Normal file
Before Width: | Height: | Size: 529 B After Width: | Height: | Size: 529 B |
0
doc/global/template/images/ico_out.png
Executable file → Normal file
Before Width: | Height: | Size: 388 B After Width: | Height: | Size: 388 B |
0
doc/global/template/images/page_bg.png
Executable file → Normal file
Before Width: | Height: | Size: 84 B After Width: | Height: | Size: 84 B |
0
doc/global/template/images/sprites-combined.png
Executable file → Normal file
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
@ -45,7 +45,7 @@ defineReplace(cmakePortablePaths) {
|
||||
variable = $$1
|
||||
out =
|
||||
for(v, variable) {
|
||||
out += ${CMAKE_FIND_ROOT_PATH}$$cmakeTargetPath($$v)
|
||||
out += $$[QT_SYSROOT]$$cmakeTargetPath($$v)
|
||||
}
|
||||
return ($$join(out, ";"))
|
||||
}
|
||||
|
@ -104,7 +104,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
||||
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS)
|
||||
!!ENDIF
|
||||
|
||||
foreach(_dir ${_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS} ${Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS})
|
||||
foreach(_dir ${_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS}
|
||||
!!IF isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
|
||||
${Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS}
|
||||
!!ENDIF
|
||||
)
|
||||
_qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${_dir})
|
||||
endforeach()
|
||||
|
||||
|
@ -86,7 +86,7 @@ load(qt_common)
|
||||
qtAddToolEnv(QMLPLUGINDUMP, importpath)
|
||||
TARGETPATHBASE = $$replace(TARGETPATH, \\.\\d+\$, )
|
||||
qmltypes.target = qmltypes
|
||||
qmltypes.commands = $$QMLPLUGINDUMP $$replace(TARGETPATHBASE, /, .) $$IMPORT_VERSION > $$QMLTYPEFILE
|
||||
qmltypes.commands = $$QMLPLUGINDUMP -nonrelocatable $$replace(TARGETPATHBASE, /, .) $$IMPORT_VERSION > $$QMLTYPEFILE
|
||||
qmltypes.depends = $$QMAKE_RESOLVED_TARGET
|
||||
} else {
|
||||
qmltypes.CONFIG += recursive
|
||||
|
@ -13,7 +13,7 @@
|
||||
# of the module on JNI-based libraries etc. Used for deployment of an Android
|
||||
# app.
|
||||
|
||||
ANDROID_DEPENDS_DIR = $$MODULE_QMAKE_OUTDIR/lib/
|
||||
ANDROID_DEPENDS_DIR = $$MODULE_BASE_OUTDIR/lib/
|
||||
DEPENDENCY_FILE = $$ANDROID_DEPENDS_DIR$$TARGET-android-dependencies.xml
|
||||
|
||||
!build_pass {
|
||||
|
@ -11,12 +11,13 @@
|
||||
|
||||
# Find the module's source root dir.
|
||||
isEmpty(_QMAKE_CONF_): error("Project has no top-level .qmake.conf file.")
|
||||
MODULE_PROFILE_DIR = $$dirname(_QMAKE_CONF_)
|
||||
isEmpty(MODULE_BASE_DIR): MODULE_BASE_DIR = $$MODULE_PROFILE_DIR
|
||||
isEmpty(MODULE_BASE_OUTDIR): MODULE_BASE_OUTDIR = $$shadowed($$MODULE_BASE_DIR)
|
||||
MODULE_BASE_INDIR = $$dirname(_QMAKE_CONF_)
|
||||
MODULE_BASE_OUTDIR = $$shadowed($$MODULE_BASE_INDIR)
|
||||
!isEmpty(MODULE_BASE_DIR): MODULE_SYNCQT_DIR = $$MODULE_BASE_DIR # compat for webkit
|
||||
isEmpty(MODULE_SYNCQT_DIR): MODULE_SYNCQT_DIR = $$MODULE_BASE_INDIR
|
||||
isEmpty(MODULE_QMAKE_OUTDIR): MODULE_QMAKE_OUTDIR = $$MODULE_BASE_OUTDIR
|
||||
|
||||
exists($$MODULE_PROFILE_DIR/.git): \
|
||||
exists($$MODULE_BASE_INDIR/.git): \
|
||||
CONFIG += git_build
|
||||
|
||||
!prefix_build {
|
||||
|
@ -15,9 +15,9 @@ QMAKE_QT_CONFIG = $$[QT_HOST_DATA/get]/mkspecs/qconfig.pri
|
||||
for(dir, QMAKE_MODULE_PATH) {
|
||||
debug(1, "Loading modules from $${dir}")
|
||||
for(mod, $$list($$files($$dir/qt_*.pri))) {
|
||||
# For installed Qt these paths will be common for all modules
|
||||
# For development these will vary per module, and syncqt will override the value in the
|
||||
# qt_<module>.pri forwarding file
|
||||
# For installed Qt these paths will be common for all modules.
|
||||
# For uninstalled prefix builds these will vary per module, via the
|
||||
# forwarding module pri files. Keep qt_module_pris.prf in sync with this!
|
||||
QT_MODULE_INCLUDE_BASE = $$[QT_INSTALL_HEADERS]
|
||||
QT_MODULE_LIB_BASE = $$[QT_INSTALL_LIBS]
|
||||
QT_MODULE_HOST_LIB_BASE = $$[QT_HOST_LIBS]
|
||||
|
@ -26,11 +26,10 @@ defineTest(qtAddLibrary) {
|
||||
warning("qtAddLibrary() is deprecated. Use qtAddModule() or QT+= instead.")
|
||||
|
||||
# Reverse-engineer the module name from the library name.
|
||||
for(var, $$list($$find($$list($$enumerate_vars()), ^QT\\.[^.]+\\.name$))) {
|
||||
isEqual($$var, $$1) {
|
||||
var ~= s,^QT\\.([^.]+)\\.name$,\\1,
|
||||
qtAddModule($$var, , LIBS):return(true):break()
|
||||
return(false):break() # Yes, the break is insanity. But necessary.
|
||||
for(var, QT_MODULES) {
|
||||
isEqual(QT.$${var}.name, $$1) {
|
||||
qtAddModule($$var, , LIBS)
|
||||
return(true):break() # Yes, the break is insanity. But necessary.
|
||||
}
|
||||
}
|
||||
error("No module matching library '$$1' found.")
|
||||
@ -131,7 +130,6 @@ defineTest(qtAddModule) {
|
||||
export(QMAKE_RPATHDIR)
|
||||
export(QMAKE_RPATHLINKDIR)
|
||||
export(PRE_TARGETDEPS)
|
||||
return(true)
|
||||
}
|
||||
|
||||
# qt variable, libs variable
|
||||
|
@ -21,7 +21,7 @@ load(qt_build_paths)
|
||||
QMAKE_SYNCQT += -module $$MODULE_INCNAME -version $$VERSION
|
||||
}
|
||||
QMAKE_SYNCQT += \
|
||||
-outdir $$MODULE_BASE_OUTDIR $$MODULE_BASE_DIR
|
||||
-outdir $$MODULE_BASE_OUTDIR $$MODULE_SYNCQT_DIR
|
||||
!silent: message($$QMAKE_SYNCQT)
|
||||
system($$QMAKE_SYNCQT)|error("Failed to run: $$QMAKE_SYNCQT")
|
||||
}
|
||||
@ -32,11 +32,11 @@ minimal_syncqt: return()
|
||||
git_build: \
|
||||
INC_PATH = $$MODULE_BASE_OUTDIR
|
||||
else: \
|
||||
INC_PATH = $$MODULE_BASE_DIR
|
||||
INC_PATH = $$MODULE_BASE_INDIR
|
||||
include($$INC_PATH/include/$$MODULE_INCNAME/headers.pri, "", true)
|
||||
|
||||
autogen_warning = \
|
||||
"/* This file was generated by qmake with the info from <root>/$$relative_path($$_PRO_FILE_, $$MODULE_BASE_DIR). */"
|
||||
"/* This file was generated by qmake with the info from <root>/$$relative_path($$_PRO_FILE_, $$MODULE_BASE_INDIR). */"
|
||||
|
||||
# Create a module master depends header
|
||||
MODULE_MASTER_DEPS_HEADER = $$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME/$${MODULE_INCNAME}Depends
|
||||
|
@ -10,8 +10,17 @@
|
||||
#
|
||||
|
||||
load(qt_build_paths)
|
||||
# Pre-generated headers in the source tree and
|
||||
# - shadow build or
|
||||
# - non-shadow non-prefix build of a module which is not qtbase (because the build-time
|
||||
# generated headers all end up in qtbase).
|
||||
!git_build:if(!equals(_PRO_FILE_PWD_, $$OUT_PWD) \
|
||||
|if(!prefix_build:!equals(MODULE_BASE_INDIR, $$[QT_HOST_PREFIX]))): \
|
||||
CONFIG += split_incpath
|
||||
force_independent|split_incpath: \
|
||||
CONFIG += need_fwd_pri
|
||||
MODULE_FWD_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_lib_$${MODULE}.pri
|
||||
force_independent: \
|
||||
need_fwd_pri: \
|
||||
MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri
|
||||
else: \
|
||||
MODULE_PRI = $$MODULE_FWD_PRI
|
||||
@ -56,18 +65,22 @@ else: \
|
||||
MODULE_PRIVATE_INCLUDES = \$\$QT_MODULE_INCLUDE_BASE/$$MODULE_INCNAME/$$VERSION \
|
||||
\$\$QT_MODULE_INCLUDE_BASE/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME
|
||||
}
|
||||
!git_build:if(!equals(_PRO_FILE_PWD_, $$OUT_PWD) \
|
||||
|if(!prefix_build:!equals(MODULE_BASE_DIR, $$[QT_HOST_PREFIX]))) {
|
||||
pub_inc = $$replace(MODULE_INCLUDES, ^\\\$\\\$QT_MODULE_INCLUDE_BASE, $$MODULE_BASE_DIR/include)
|
||||
priv_inc = $$replace(MODULE_PRIVATE_INCLUDES, ^\\\$\\\$QT_MODULE_INCLUDE_BASE, $$MODULE_BASE_DIR/include)
|
||||
force_independent {
|
||||
MODULE_FWD_PRI_CONT_SUFFIX = \
|
||||
"QT.$${MODULE}.includes += $$pub_inc" \
|
||||
"QT.$${MODULE}.private_includes = $$priv_inc"
|
||||
} else {
|
||||
MODULE_INCLUDES += $$pub_inc
|
||||
MODULE_PRIVATE_INCLUDES = $$priv_inc
|
||||
}
|
||||
split_incpath: \
|
||||
MODULE_SHADOW_INCLUDES = $$replace(MODULE_INCLUDES, ^\\\$\\\$QT_MODULE_INCLUDE_BASE, \
|
||||
$$MODULE_BASE_OUTDIR/include)
|
||||
MODULE_INCLUDES += $$MODULE_AUX_INCLUDES
|
||||
MODULE_PRIVATE_INCLUDES += $$MODULE_PRIVATE_AUX_INCLUDES
|
||||
internal_module {
|
||||
MODULE_PRIVATE_INCLUDES = $$MODULE_INCLUDES $$MODULE_PRIVATE_INCLUDES
|
||||
MODULE_INCLUDES =
|
||||
MODULE_PRIVATE_SHADOW_INCLUDES = $$MODULE_SHADOW_INCLUDES
|
||||
MODULE_SHADOW_INCLUDES =
|
||||
}
|
||||
split_incpath {
|
||||
!isEmpty(MODULE_SHADOW_INCLUDES): \
|
||||
MODULE_FWD_PRI_CONT_SUFFIX += "QT.$${MODULE}.includes += $$MODULE_SHADOW_INCLUDES"
|
||||
!isEmpty(MODULE_PRIVATE_SHADOW_INCLUDES): \
|
||||
MODULE_FWD_PRI_CONT_SUFFIX += "QT.$${MODULE}.private_includes += $$MODULE_PRIVATE_SHADOW_INCLUDES"
|
||||
}
|
||||
MODULE_PRI_CONT = \
|
||||
"QT.$${MODULE}.VERSION = $${VERSION}" \
|
||||
@ -98,12 +111,17 @@ else: \
|
||||
write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.")
|
||||
MODULE_PRI_FILES = $$MODULE_PRI
|
||||
|
||||
force_independent {
|
||||
need_fwd_pri {
|
||||
|
||||
split_incpath: \
|
||||
MODULE_BASE_INCDIR = $$MODULE_BASE_INDIR
|
||||
else: \
|
||||
MODULE_BASE_INCDIR = $$MODULE_BASE_OUTDIR
|
||||
|
||||
# Create a forwarding module .pri file
|
||||
MODULE_FWD_PRI_CONT = \
|
||||
"QT_MODULE_BIN_BASE = $$MODULE_BASE_OUTDIR/bin" \
|
||||
"QT_MODULE_INCLUDE_BASE = $$MODULE_BASE_OUTDIR/include" \
|
||||
"QT_MODULE_INCLUDE_BASE = $$MODULE_BASE_INCDIR/include" \
|
||||
"QT_MODULE_IMPORT_BASE = $$MODULE_BASE_OUTDIR/imports" \
|
||||
"QT_MODULE_QML_BASE = $$MODULE_BASE_OUTDIR/qml" \
|
||||
"QT_MODULE_LIB_BASE = $$MODULE_BASE_OUTDIR/lib" \
|
||||
@ -116,9 +134,9 @@ else: \
|
||||
touch($$MODULE_FWD_PRI, $$MODULE_PRI)
|
||||
MODULE_PRI_FILES += $$MODULE_FWD_PRI
|
||||
|
||||
} else { # prefix_build
|
||||
} else {
|
||||
|
||||
# This is needed for the direct include() below.
|
||||
# This is needed for the direct include() below. Mirrors qt_config.prf
|
||||
QT_MODULE_BIN_BASE = $$[QT_INSTALL_BINS]
|
||||
QT_MODULE_INCLUDE_BASE = $$[QT_INSTALL_HEADERS]
|
||||
QT_MODULE_IMPORT_BASE = $$[QT_INSTALL_IMPORTS]
|
||||
|
@ -18,11 +18,11 @@ resource_combine {
|
||||
QMAKE_RESOURCE_FLAGS += -name ${QMAKE_FILE_BASE}
|
||||
}
|
||||
}
|
||||
rcc.commands = "$$QMAKE_RCC" $$QMAKE_RESOURCE_FLAGS "${QMAKE_FILE_IN}" -o "${QMAKE_FILE_OUT}"
|
||||
rcc.depend_command = "$$QMAKE_RCC" -list $$QMAKE_RESOURCE_FLAGS "${QMAKE_FILE_IN}"
|
||||
rcc.commands = $$QMAKE_RCC $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
|
||||
rcc.depend_command = $$QMAKE_RCC -list $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN}
|
||||
rcc.CONFIG += add_inputs_as_makefile_deps
|
||||
rcc.input = RESOURCES
|
||||
rcc.variable_out = SOURCES
|
||||
rcc.name = RCC ${QMAKE_FILE_IN}
|
||||
silent:rcc.commands = @echo rcc "${QMAKE_FILE_IN}" && $$rcc.commands
|
||||
silent:rcc.commands = @echo rcc ${QMAKE_FILE_IN} && $$rcc.commands
|
||||
QMAKE_EXTRA_COMPILERS += rcc
|
||||
|
@ -42,7 +42,7 @@ isEmpty(QMAKE_COMPILER) {
|
||||
else:*-llvm*: \
|
||||
QMAKE_COMPILER = gcc llvm
|
||||
else:*-clang*: \
|
||||
QMAKE_COMPILER = clang llvm
|
||||
QMAKE_COMPILER = gcc clang llvm
|
||||
else:*-msvc*: \
|
||||
QMAKE_COMPILER = msvc
|
||||
else: \
|
||||
|
@ -4,7 +4,7 @@ isEmpty(UI_DIR):UI_DIR = .
|
||||
isEmpty(QMAKE_MOD_UIC):QMAKE_MOD_UIC = ui_
|
||||
|
||||
uic.commands = $$QMAKE_UIC ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
|
||||
uic.depend_command = "$$QMAKE_UIC" -d "${QMAKE_FILE_IN}"
|
||||
uic.depend_command = $$QMAKE_UIC -d ${QMAKE_FILE_IN}
|
||||
uic.output = $$UI_DIR/$${QMAKE_MOD_UIC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
|
||||
uic.input = FORMS
|
||||
uic.variable_out = GENERATED_FILES
|
||||
|
26
qmake/doc/qmake.qdocconf
Normal file
@ -0,0 +1,26 @@
|
||||
include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
|
||||
|
||||
project = QMake
|
||||
description = QMake Manual
|
||||
url = http://qt-project.org/doc/qt-$QT_VER/qmake
|
||||
|
||||
qhp.projects = qmake
|
||||
|
||||
qhp.qmake.file = qmake.qhp
|
||||
qhp.qmake.namespace = org.qt-project.qmake.$QT_VERSION_TAG
|
||||
qhp.qmake.virtualFolder = qmake
|
||||
qhp.qmake.indexTitle = QMake Manual
|
||||
qhp.qmake.filterAttributes = qt $QT_VERSION tools qmake
|
||||
qhp.qmake.customFilters.qmake.name = qmake Manual
|
||||
qhp.qmake.customFilters.qmake.filterAttributes = qt tools qmake
|
||||
qhp.qmake.subprojects = manual
|
||||
qhp.qmake.subprojects.manual.title = Manual
|
||||
qhp.qmake.subprojects.manual.indexTitle = qmake Manual
|
||||
qhp.qmake.subprojects.manual.selectors = fake:page
|
||||
|
||||
language = Cpp
|
||||
|
||||
sources = src/qmake-manual.qdoc
|
||||
|
||||
imagedirs = src/images
|
||||
exampledirs = src
|
BIN
qmake/doc/src/images/qmake-precompile-ui.png
Normal file
After Width: | Height: | Size: 87 KiB |
4493
qmake/doc/src/qmake-manual.qdoc
Normal file
58
qmake/doc/src/snippets/code/doc_src_qmake-manual.cpp
Normal file
@ -0,0 +1,58 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the documentation of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
|
||||
** of its contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
//! [104]
|
||||
// Add C includes here
|
||||
|
||||
#if defined __cplusplus
|
||||
// Add C++ includes here
|
||||
#include <stdlib>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <QApplication> // Qt includes
|
||||
#include <QPushButton>
|
||||
#include <QLabel>
|
||||
#include "thirdparty/include/libmain.h"
|
||||
#include "my_stable_class.h"
|
||||
...
|
||||
#endif
|
||||
//! [104]
|
||||
|
||||
|
917
qmake/doc/src/snippets/code/doc_src_qmake-manual.pro
Normal file
@ -0,0 +1,917 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the documentation of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
|
||||
** of its contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#! [0]
|
||||
make all
|
||||
#! [0]
|
||||
|
||||
|
||||
#! [1]
|
||||
CONFIG += qt debug
|
||||
#! [1]
|
||||
|
||||
|
||||
#! [2]
|
||||
QT += network xml
|
||||
#! [2]
|
||||
|
||||
|
||||
#! [3]
|
||||
QT = network xml # This will omit the core and gui modules.
|
||||
#! [3]
|
||||
|
||||
|
||||
#! [4]
|
||||
QT -= gui # Only the core module is used.
|
||||
#! [4]
|
||||
|
||||
|
||||
#! [5]
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += ogg dbus-1
|
||||
#! [5]
|
||||
|
||||
|
||||
#! [6]
|
||||
LIBS += -L/usr/local/lib -lmath
|
||||
#! [6]
|
||||
|
||||
|
||||
#! [7]
|
||||
INCLUDEPATH = c:/msdev/include d:/stl/include
|
||||
#! [7]
|
||||
|
||||
|
||||
#! [8]
|
||||
qmake [mode] [options] files
|
||||
#! [8]
|
||||
|
||||
|
||||
#! [9]
|
||||
qmake -makefile [options] files
|
||||
#! [9]
|
||||
|
||||
|
||||
#! [10]
|
||||
qmake -makefile -o Makefile "CONFIG+=test" test.pro
|
||||
#! [10]
|
||||
|
||||
|
||||
#! [11]
|
||||
qmake "CONFIG+=test" test.pro
|
||||
#! [11]
|
||||
|
||||
|
||||
#! [12]
|
||||
qmake -project [options] files
|
||||
#! [12]
|
||||
|
||||
|
||||
#! [13]
|
||||
qmake -spec macx-g++
|
||||
#! [13]
|
||||
|
||||
|
||||
#! [14]
|
||||
QMAKE_LFLAGS += -F/path/to/framework/directory/
|
||||
#! [14]
|
||||
|
||||
|
||||
#! [15]
|
||||
LIBS += -framework TheFramework
|
||||
#! [15]
|
||||
|
||||
|
||||
#! [16]
|
||||
TEMPLATE = lib
|
||||
CONFIG += lib_bundle
|
||||
#! [16]
|
||||
|
||||
|
||||
#! [17]
|
||||
FRAMEWORK_HEADERS.version = Versions
|
||||
FRAMEWORK_HEADERS.files = path/to/header_one.h path/to/header_two.h
|
||||
FRAMEWORK_HEADERS.path = Headers
|
||||
QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
|
||||
#! [17]
|
||||
|
||||
|
||||
#! [19]
|
||||
qmake -spec macx-xcode project.pro
|
||||
#! [19]
|
||||
|
||||
|
||||
#! [20]
|
||||
qmake -tp vc
|
||||
#! [20]
|
||||
|
||||
|
||||
#! [21]
|
||||
qmake -tp vc -r
|
||||
#! [21]
|
||||
|
||||
|
||||
#! [22]
|
||||
CONFIG -= embed_manifest_exe
|
||||
#! [22]
|
||||
|
||||
|
||||
#! [23]
|
||||
CONFIG -= embed_manifest_dll
|
||||
#! [23]
|
||||
|
||||
|
||||
#! [24]
|
||||
make all
|
||||
#! [24]
|
||||
|
||||
|
||||
#! [25]
|
||||
build_pass:CONFIG(debug, debug|release) {
|
||||
unix: TARGET = $$join(TARGET,,,_debug)
|
||||
else: TARGET = $$join(TARGET,,,d)
|
||||
}
|
||||
#! [25]
|
||||
|
||||
|
||||
#! [26]
|
||||
CONFIG += console newstuff
|
||||
...
|
||||
newstuff {
|
||||
SOURCES += new.cpp
|
||||
HEADERS += new.h
|
||||
}
|
||||
#! [26]
|
||||
|
||||
|
||||
#! [27]
|
||||
DEFINES += USE_MY_STUFF
|
||||
#! [27]
|
||||
|
||||
|
||||
#! [28]
|
||||
myFiles.files = path\*.png
|
||||
DEPLOYMENT += myFiles
|
||||
#! [28]
|
||||
|
||||
|
||||
#! [29]
|
||||
myFiles.files = path\file1.ext1 path2\file2.ext1 path3\*
|
||||
myFiles.path = \some\path\on\device
|
||||
someother.files = C:\additional\files\*
|
||||
someother.path = \myFiles\path2
|
||||
DEPLOYMENT += myFiles someother
|
||||
#! [29]
|
||||
|
||||
|
||||
#! [30]
|
||||
DESTDIR = ../../lib
|
||||
#! [30]
|
||||
|
||||
|
||||
#! [31]
|
||||
DISTFILES += ../program.txt
|
||||
#! [31]
|
||||
|
||||
|
||||
#! [32]
|
||||
FORMS = mydialog.ui \
|
||||
mywidget.ui \
|
||||
myconfig.ui
|
||||
#! [32]
|
||||
|
||||
|
||||
#! [33]
|
||||
FORMS3 = my_uic3_dialog.ui \
|
||||
my_uic3_widget.ui \
|
||||
my_uic3_config.ui
|
||||
#! [33]
|
||||
|
||||
|
||||
#! [34]
|
||||
HEADERS = myclass.h \
|
||||
login.h \
|
||||
mainwindow.h
|
||||
#! [34]
|
||||
|
||||
|
||||
#! [35]
|
||||
INCLUDEPATH = c:/msdev/include d:/stl/include
|
||||
#! [35]
|
||||
|
||||
|
||||
#! [36]
|
||||
target.path += $$[QT_INSTALL_PLUGINS]/imageformats
|
||||
INSTALLS += target
|
||||
#! [36]
|
||||
|
||||
|
||||
#! [37]
|
||||
LEXSOURCES = lexer.l
|
||||
#! [37]
|
||||
|
||||
|
||||
#! [38]
|
||||
unix:LIBS += -L/usr/local/lib -lmath
|
||||
win32:LIBS += c:/mylibs/math.lib
|
||||
#! [38]
|
||||
|
||||
|
||||
#! [39]
|
||||
CONFIG += no_lflags_merge
|
||||
#! [39]
|
||||
|
||||
|
||||
#! [40]
|
||||
unix:MOC_DIR = ../myproject/tmp
|
||||
win32:MOC_DIR = c:/myproject/tmp
|
||||
#! [40]
|
||||
|
||||
|
||||
#! [41]
|
||||
unix:OBJECTS_DIR = ../myproject/tmp
|
||||
win32:OBJECTS_DIR = c:/myproject/tmp
|
||||
#! [41]
|
||||
|
||||
|
||||
#! [43]
|
||||
FRAMEWORK_HEADERS.version = Versions
|
||||
FRAMEWORK_HEADERS.files = path/to/header_one.h path/to/header_two.h
|
||||
FRAMEWORK_HEADERS.path = Headers
|
||||
QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
|
||||
#! [43]
|
||||
|
||||
|
||||
#! [44]
|
||||
QMAKE_BUNDLE_EXTENSION = .myframework
|
||||
#! [44]
|
||||
|
||||
|
||||
#! [45]
|
||||
QMAKE_RESOURCE_FLAGS += -threshold 0 -compress 9
|
||||
#! [45]
|
||||
|
||||
|
||||
#! [47]
|
||||
QT -= gui # Only the core module is used.
|
||||
#! [47]
|
||||
|
||||
|
||||
#! [48]
|
||||
unix:RCC_DIR = ../myproject/resources
|
||||
win32:RCC_DIR = c:/myproject/resources
|
||||
#! [48]
|
||||
|
||||
|
||||
#! [49]
|
||||
SOURCES = myclass.cpp \
|
||||
login.cpp \
|
||||
mainwindow.cpp
|
||||
#! [49]
|
||||
|
||||
|
||||
#! [50]
|
||||
SUBDIRS = kernel \
|
||||
tools
|
||||
#! [50]
|
||||
|
||||
|
||||
#! [51]
|
||||
CONFIG += ordered
|
||||
#! [51]
|
||||
|
||||
|
||||
#! [52]
|
||||
TEMPLATE = app
|
||||
TARGET = myapp
|
||||
SOURCES = main.cpp
|
||||
#! [52]
|
||||
|
||||
|
||||
#! [53]
|
||||
TEMPLATE = lib
|
||||
SOURCES = main.cpp
|
||||
TARGET = mylib
|
||||
#! [53]
|
||||
|
||||
|
||||
#! [54]
|
||||
unix:UI_DIR = ../myproject/ui
|
||||
win32:UI_DIR = c:/myproject/ui
|
||||
#! [54]
|
||||
|
||||
|
||||
#! [57]
|
||||
VERSION = 1.2.3
|
||||
#! [57]
|
||||
|
||||
|
||||
#! [58]
|
||||
YACCSOURCES = moc.y
|
||||
#! [58]
|
||||
|
||||
|
||||
#! [59]
|
||||
FILE = /etc/passwd
|
||||
FILENAME = $$basename(FILE) #passwd
|
||||
#! [59]
|
||||
|
||||
|
||||
#! [60]
|
||||
CONFIG = debug
|
||||
CONFIG += release
|
||||
CONFIG(release, debug|release):message(Release build!) #will print
|
||||
CONFIG(debug, debug|release):message(Debug build!) #no print
|
||||
#! [60]
|
||||
|
||||
|
||||
#! [61]
|
||||
contains( drivers, network ) {
|
||||
# drivers contains 'network'
|
||||
message( "Configuring for network build..." )
|
||||
HEADERS += network.h
|
||||
SOURCES += network.cpp
|
||||
}
|
||||
#! [61]
|
||||
|
||||
|
||||
#! [62]
|
||||
error(An error has occurred in the configuration process.)
|
||||
#! [62]
|
||||
|
||||
|
||||
#! [63]
|
||||
exists( $(QTDIR)/lib/libqt-mt* ) {
|
||||
message( "Configuring for multi-threaded Qt..." )
|
||||
CONFIG += thread
|
||||
}
|
||||
#! [63]
|
||||
|
||||
|
||||
#! [64]
|
||||
MY_VAR = one two three four
|
||||
MY_VAR2 = $$join(MY_VAR, " -L", -L) -Lfive
|
||||
MY_VAR3 = $$member(MY_VAR, 2) $$find(MY_VAR, t.*)
|
||||
#! [64]
|
||||
|
||||
|
||||
#! [65]
|
||||
LIST = 1 2 3
|
||||
for(a, LIST):exists(file.$${a}):message(I see a file.$${a}!)
|
||||
#! [65]
|
||||
|
||||
|
||||
#! [66]
|
||||
include( shared.pri )
|
||||
OPTIONS = standard custom
|
||||
!include( options.pri ) {
|
||||
message( "No custom build options specified" )
|
||||
OPTIONS -= custom
|
||||
}
|
||||
#! [66]
|
||||
|
||||
|
||||
#! [67]
|
||||
isEmpty( CONFIG ) {
|
||||
CONFIG += warn_on debug
|
||||
}
|
||||
#! [67]
|
||||
|
||||
|
||||
#! [68]
|
||||
message( "This is a message" )
|
||||
#! [68]
|
||||
|
||||
|
||||
#! [69]
|
||||
!build_pass:message( "This is a message" )
|
||||
#! [69]
|
||||
|
||||
|
||||
#! [70]
|
||||
This is a test.
|
||||
#! [70]
|
||||
|
||||
|
||||
#! [71]
|
||||
system(ls /bin):HAS_BIN=FALSE
|
||||
#! [71]
|
||||
|
||||
|
||||
#! [72]
|
||||
UNAME = $$system(uname -s)
|
||||
contains( UNAME, [lL]inux ):message( This looks like Linux ($$UNAME) to me )
|
||||
#! [72]
|
||||
|
||||
|
||||
#! [73]
|
||||
ARGS = 1 2 3 2 5 1
|
||||
ARGS = $$unique(ARGS) #1 2 3 5
|
||||
#! [73]
|
||||
|
||||
|
||||
#! [74]
|
||||
qmake -set PROPERTY VALUE
|
||||
#! [74]
|
||||
|
||||
|
||||
#! [75]
|
||||
qmake -query PROPERTY
|
||||
qmake -query #queries all current PROPERTY/VALUE pairs
|
||||
#! [75]
|
||||
|
||||
|
||||
#! [77]
|
||||
qmake -query "QT_INSTALL_PREFIX"
|
||||
#! [77]
|
||||
|
||||
|
||||
#! [78]
|
||||
QMAKE_VERS = $$[QMAKE_VERSION]
|
||||
#! [78]
|
||||
|
||||
|
||||
#! [79]
|
||||
documentation.path = /usr/local/program/doc
|
||||
documentation.files = docs/*
|
||||
#! [79]
|
||||
|
||||
|
||||
#! [80]
|
||||
INSTALLS += documentation
|
||||
#! [80]
|
||||
|
||||
|
||||
#! [81]
|
||||
unix:documentation.extra = create_docs; mv master.doc toc.doc
|
||||
#! [81]
|
||||
|
||||
|
||||
#! [82]
|
||||
target.path = /usr/local/myprogram
|
||||
INSTALLS += target
|
||||
#! [82]
|
||||
|
||||
|
||||
#! [83]
|
||||
CONFIG += create_prl
|
||||
#! [83]
|
||||
|
||||
|
||||
#! [84]
|
||||
CONFIG += link_prl
|
||||
#! [84]
|
||||
|
||||
|
||||
#! [85]
|
||||
QMAKE_EXT_MOC = .mymoc
|
||||
#! [85]
|
||||
|
||||
|
||||
#! [86]
|
||||
mytarget.target = .buildfile
|
||||
mytarget.commands = touch $$mytarget.target
|
||||
mytarget.depends = mytarget2
|
||||
|
||||
mytarget2.commands = @echo Building $$mytarget.target
|
||||
#! [86]
|
||||
|
||||
|
||||
#! [87]
|
||||
QMAKE_EXTRA_TARGETS += mytarget mytarget2
|
||||
#! [87]
|
||||
|
||||
|
||||
#! [88]
|
||||
new_moc.output = moc_${QMAKE_FILE_BASE}.cpp
|
||||
new_moc.commands = moc ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT}
|
||||
new_moc.depend_command = g++ -E -M ${QMAKE_FILE_NAME} | sed "s,^.*: ,,"
|
||||
new_moc.input = NEW_HEADERS
|
||||
QMAKE_EXTRA_COMPILERS += new_moc
|
||||
#! [88]
|
||||
|
||||
|
||||
#! [89]
|
||||
TARGET = myapp
|
||||
#! [89]
|
||||
|
||||
|
||||
#! [90]
|
||||
DEFINES += USE_MY_STUFF
|
||||
#! [90]
|
||||
|
||||
|
||||
#! [91]
|
||||
DEFINES -= USE_MY_STUFF
|
||||
#! [91]
|
||||
|
||||
|
||||
#! [92]
|
||||
DEFINES *= USE_MY_STUFF
|
||||
#! [92]
|
||||
|
||||
|
||||
#! [93]
|
||||
DEFINES ~= s/QT_[DT].+/QT
|
||||
#! [93]
|
||||
|
||||
|
||||
#! [94]
|
||||
EVERYTHING = $$SOURCES $$HEADERS
|
||||
message("The project contains the following files:")
|
||||
message($$EVERYTHING)
|
||||
#! [94]
|
||||
|
||||
|
||||
#! [95]
|
||||
win32:DEFINES += USE_MY_STUFF
|
||||
#! [95]
|
||||
|
||||
|
||||
#! [96]
|
||||
win32:xml {
|
||||
message(Building for Windows)
|
||||
SOURCES += xmlhandler_win.cpp
|
||||
} else:xml {
|
||||
SOURCES += xmlhandler.cpp
|
||||
} else {
|
||||
message("Unknown configuration")
|
||||
}
|
||||
#! [96]
|
||||
|
||||
|
||||
#! [97]
|
||||
MY_VARIABLE = value
|
||||
#! [97]
|
||||
|
||||
|
||||
#! [98]
|
||||
MY_DEFINES = $$DEFINES
|
||||
#! [98]
|
||||
|
||||
|
||||
#! [99]
|
||||
MY_DEFINES = $${DEFINES}
|
||||
#! [99]
|
||||
|
||||
|
||||
#! [100]
|
||||
TARGET = myproject_$${TEMPLATE}
|
||||
#! [100]
|
||||
|
||||
|
||||
#! [101]
|
||||
target.path = $$[QT_INSTALL_PLUGINS]/designer
|
||||
INSTALLS += target
|
||||
#! [101]
|
||||
|
||||
|
||||
#! [102]
|
||||
defineReplace(functionName){
|
||||
#function code
|
||||
}
|
||||
#! [102]
|
||||
|
||||
|
||||
#! [103]
|
||||
CONFIG += myfeatures
|
||||
#! [103]
|
||||
|
||||
|
||||
#! [105]
|
||||
PRECOMPILED_HEADER = stable.h
|
||||
#! [105]
|
||||
|
||||
|
||||
#! [106]
|
||||
precompile_header:!isEmpty(PRECOMPILED_HEADER) {
|
||||
DEFINES += USING_PCH
|
||||
}
|
||||
#! [106]
|
||||
|
||||
|
||||
#! [107]
|
||||
PRECOMPILED_HEADER = window.h
|
||||
SOURCES = window.cpp
|
||||
#! [107]
|
||||
|
||||
|
||||
#! [108]
|
||||
SOURCES += hello.cpp
|
||||
#! [108]
|
||||
|
||||
|
||||
#! [109]
|
||||
SOURCES += hello.cpp
|
||||
SOURCES += main.cpp
|
||||
#! [109]
|
||||
|
||||
|
||||
#! [110]
|
||||
SOURCES = hello.cpp \
|
||||
main.cpp
|
||||
#! [110]
|
||||
|
||||
|
||||
#! [111]
|
||||
HEADERS += hello.h
|
||||
SOURCES += hello.cpp
|
||||
SOURCES += main.cpp
|
||||
#! [111]
|
||||
|
||||
|
||||
#! [112]
|
||||
TARGET = helloworld
|
||||
#! [112]
|
||||
|
||||
|
||||
#! [113]
|
||||
HEADERS += hello.h
|
||||
SOURCES += hello.cpp
|
||||
SOURCES += main.cpp
|
||||
#! [113]
|
||||
|
||||
|
||||
#! [114]
|
||||
qmake -o Makefile hello.pro
|
||||
#! [114]
|
||||
|
||||
|
||||
#! [115]
|
||||
qmake -tp vc hello.pro
|
||||
#! [115]
|
||||
|
||||
|
||||
#! [116]
|
||||
CONFIG += debug
|
||||
HEADERS += hello.h
|
||||
SOURCES += hello.cpp
|
||||
SOURCES += main.cpp
|
||||
#! [116]
|
||||
|
||||
|
||||
#! [117]
|
||||
win32 {
|
||||
SOURCES += hellowin.cpp
|
||||
}
|
||||
#! [117]
|
||||
|
||||
|
||||
#! [118]
|
||||
CONFIG += debug
|
||||
HEADERS += hello.h
|
||||
SOURCES += hello.cpp
|
||||
SOURCES += main.cpp
|
||||
win32 {
|
||||
SOURCES += hellowin.cpp
|
||||
}
|
||||
unix {
|
||||
SOURCES += hellounix.cpp
|
||||
}
|
||||
#! [118]
|
||||
|
||||
|
||||
#! [119]
|
||||
!exists( main.cpp ) {
|
||||
error( "No main.cpp file found" )
|
||||
}
|
||||
#! [119]
|
||||
|
||||
|
||||
#! [120]
|
||||
CONFIG += debug
|
||||
HEADERS += hello.h
|
||||
SOURCES += hello.cpp
|
||||
SOURCES += main.cpp
|
||||
win32 {
|
||||
SOURCES += hellowin.cpp
|
||||
}
|
||||
unix {
|
||||
SOURCES += hellounix.cpp
|
||||
}
|
||||
!exists( main.cpp ) {
|
||||
error( "No main.cpp file found" )
|
||||
}
|
||||
#! [120]
|
||||
|
||||
|
||||
#! [121]
|
||||
win32 {
|
||||
debug {
|
||||
CONFIG += console
|
||||
}
|
||||
}
|
||||
#! [121]
|
||||
|
||||
|
||||
#! [122]
|
||||
CONFIG += debug
|
||||
HEADERS += hello.h
|
||||
SOURCES += hello.cpp
|
||||
SOURCES += main.cpp
|
||||
win32 {
|
||||
SOURCES += hellowin.cpp
|
||||
}
|
||||
unix {
|
||||
SOURCES += hellounix.cpp
|
||||
}
|
||||
!exists( main.cpp ) {
|
||||
error( "No main.cpp file found" )
|
||||
}
|
||||
win32:debug {
|
||||
CONFIG += console
|
||||
}
|
||||
#! [122]
|
||||
|
||||
|
||||
#! [123]
|
||||
TEMPLATE = app
|
||||
DESTDIR = c:/helloapp
|
||||
HEADERS += hello.h
|
||||
SOURCES += hello.cpp
|
||||
SOURCES += main.cpp
|
||||
DEFINES += USE_MY_STUFF
|
||||
CONFIG += release
|
||||
#! [123]
|
||||
|
||||
|
||||
#! [124]
|
||||
make all
|
||||
#! [124]
|
||||
|
||||
|
||||
#! [125]
|
||||
make
|
||||
#! [125]
|
||||
|
||||
|
||||
#! [126]
|
||||
make install
|
||||
#! [126]
|
||||
|
||||
|
||||
#! [127]
|
||||
CONFIG(debug, debug|release) {
|
||||
mac: TARGET = $$join(TARGET,,,_debug)
|
||||
win32: TARGET = $$join(TARGET,,d)
|
||||
}
|
||||
#! [127]
|
||||
|
||||
#! [142]
|
||||
DEPLOYMENT_PLUGIN += qjpeg
|
||||
#! [142]
|
||||
|
||||
#! [149]
|
||||
SUBDIRS += my_executable my_library
|
||||
my_executable.subdir = app
|
||||
my_executable.depends = my_library
|
||||
my_library.subdir = lib
|
||||
#! [149]
|
||||
|
||||
#! [157]
|
||||
packagesExist(sqlite3 QtNetwork QtDeclarative) {
|
||||
DEFINES += USE_FANCY_UI
|
||||
}
|
||||
#! [157]
|
||||
|
||||
#! [158]
|
||||
#ifdef USE_FANCY_UI
|
||||
// Use the fancy UI, as we have extra packages available
|
||||
#endif
|
||||
#! [158]
|
||||
|
||||
#! [159]
|
||||
message($$absolute_path("readme.txt", "/home/johndoe/myproject"))
|
||||
#! [159]
|
||||
|
||||
|
||||
#! [160]
|
||||
TARGET = helloworld
|
||||
equals(TARGET, "helloworld") {
|
||||
message("The target assignment was successful.")
|
||||
}
|
||||
#! [160]
|
||||
|
||||
|
||||
#! [161]
|
||||
CONTACT = firstname middlename surname phone
|
||||
message($$first(CONTACT))
|
||||
#! [161]
|
||||
|
||||
|
||||
#! [162]
|
||||
CONTACT = firstname middlename surname phone
|
||||
message($$last(CONTACT))
|
||||
#! [162]
|
||||
|
||||
|
||||
#! [163]
|
||||
message($$format_number(BAD, ibase=16 width=6 zeropad))
|
||||
#! [163]
|
||||
|
||||
|
||||
#! [164]
|
||||
ANSWER = 42
|
||||
greaterThan(ANSWER, 1) {
|
||||
message("The answer might be correct.")
|
||||
}
|
||||
#! [164]
|
||||
|
||||
|
||||
#! [165]
|
||||
ANSWER = 42
|
||||
lessThan(ANSWER, 1) {
|
||||
message("The answer might be wrong.")
|
||||
}
|
||||
#! [165]
|
||||
|
||||
|
||||
#! [166]
|
||||
if(linux-g++*|macx-g++*):CONFIG(debug, debug|release) {
|
||||
message("We are on Linux or Mac OS, and we are in debug mode.")
|
||||
}
|
||||
#! [166]
|
||||
|
||||
|
||||
#! [167]
|
||||
CONTACT = firstname:middlename:surname:phone
|
||||
message($$section(CONTACT, :, 2, 2))
|
||||
#! [167]
|
||||
|
||||
|
||||
#! [168]
|
||||
CONTACT = firstname:middlename:surname:phone
|
||||
message($$split(CONTACT, :))
|
||||
#! [168]
|
||||
|
||||
#! [169]
|
||||
NARF = zort
|
||||
unset(NARF)
|
||||
!defined(NARF, var) {
|
||||
message("NARF is not defined.")
|
||||
}
|
||||
#! [169]
|
||||
|
||||
|
||||
#! [170]
|
||||
for(var, $$list(foo bar baz)) {
|
||||
...
|
||||
}
|
||||
#! [170]
|
||||
|
||||
|
||||
#! [171]
|
||||
values = foo bar baz
|
||||
for(var, values) {
|
||||
...
|
||||
}
|
||||
#! [171]
|
||||
|
||||
|
||||
#! [172]
|
||||
VALUE = 123
|
||||
TMP_VALUE = x$$VALUE
|
||||
greaterThan(TMP_VALUE, x456): message("Condition may be true.")
|
||||
#! [172]
|
||||
|
||||
|
||||
#! [173]
|
||||
message("First line$$escape_expand(\\n)Second line")
|
||||
#! [173]
|
10
qmake/doc/src/snippets/qmake/comments.pro
Normal file
@ -0,0 +1,10 @@
|
||||
#! [0]
|
||||
# Comments usually start at the beginning of a line, but they
|
||||
# can also follow other content on the same line.
|
||||
#! [0]
|
||||
|
||||
#! [1]
|
||||
# To include a literal hash character, use the $$LITERAL_HASH variable:
|
||||
urlPieces = http://qt-project.org/doc/qt-5.0/qtgui/qtextdocument.html pageCount
|
||||
message($$join(urlPieces, $$LITERAL_HASH))
|
||||
#! [1]
|
23
qmake/doc/src/snippets/qmake/configscopes.pro
Normal file
@ -0,0 +1,23 @@
|
||||
SOURCES = main.cpp
|
||||
#! [0]
|
||||
CONFIG += opengl
|
||||
#! [0]
|
||||
|
||||
#! [1]
|
||||
opengl {
|
||||
TARGET = application-gl
|
||||
} else {
|
||||
#! [1] #! [2]
|
||||
TARGET = application
|
||||
#! [2] #! [3]
|
||||
}
|
||||
#! [3]
|
||||
|
||||
#! [4]
|
||||
CONFIG(opengl) {
|
||||
message(Building with OpenGL support.)
|
||||
} else {
|
||||
#! [4] #! [5]
|
||||
message(OpenGL support is not available.)
|
||||
}
|
||||
#! [5]
|
14
qmake/doc/src/snippets/qmake/debug_and_release.pro
Normal file
@ -0,0 +1,14 @@
|
||||
#! [0]
|
||||
CONFIG += debug_and_release
|
||||
|
||||
CONFIG(debug, debug|release) {
|
||||
TARGET = debug_binary
|
||||
} else {
|
||||
#! [0] #! [1]
|
||||
TARGET = release_binary
|
||||
}
|
||||
#! [1]
|
||||
|
||||
#! [2]
|
||||
CONFIG += build_all
|
||||
#! [2]
|
40
qmake/doc/src/snippets/qmake/delegate.h
Normal file
@ -0,0 +1,40 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the documentation of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
|
||||
** of its contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
5
qmake/doc/src/snippets/qmake/dereferencing.pro
Normal file
@ -0,0 +1,5 @@
|
||||
#! [0]
|
||||
TEMP_SOURCES = $$SOURCES
|
||||
#! [0]
|
||||
# Do something with the SOURCES variable then restore its old value.
|
||||
SOURCES = $$TEMP_SOURCES
|
2
qmake/doc/src/snippets/qmake/destdir.pro
Normal file
@ -0,0 +1,2 @@
|
||||
SOURCES = main.cpp
|
||||
DESTDIR = output
|
6
qmake/doc/src/snippets/qmake/dirname.pro
Normal file
@ -0,0 +1,6 @@
|
||||
#! [0]
|
||||
FILE = /etc/X11R6/XF86Config
|
||||
DIRNAME = $$dirname(FILE) #/etc/X11R6
|
||||
#! [0]
|
||||
message($$FILE)
|
||||
message($$DIRNAME)
|
9
qmake/doc/src/snippets/qmake/environment.pro
Normal file
@ -0,0 +1,9 @@
|
||||
#! [0] #! [1]
|
||||
DESTDIR = $$(PWD)
|
||||
message(The project will be installed in $$DESTDIR)
|
||||
#! [0]
|
||||
|
||||
DESTDIR = $(PWD)
|
||||
message(The project will be installed in the value of PWD)
|
||||
message(when the Makefile is processed.)
|
||||
#! [1]
|
34
qmake/doc/src/snippets/qmake/functions.pro
Normal file
@ -0,0 +1,34 @@
|
||||
#! [0]
|
||||
EXTRAS = handlers tests docs
|
||||
for(dir, EXTRAS) {
|
||||
exists($$dir) {
|
||||
SUBDIRS += $$dir
|
||||
}
|
||||
}
|
||||
#! [0]
|
||||
|
||||
SOURCES = paintwidget_mac.cpp paintwidget_unix.cpp paintwidget_win.cpp
|
||||
macx {
|
||||
SOURCES = $$find(SOURCES, "_mac")
|
||||
}
|
||||
|
||||
#! [1]
|
||||
HEADERS = model.h
|
||||
HEADERS += $$OTHER_HEADERS
|
||||
HEADERS = $$unique(HEADERS)
|
||||
#! [1]
|
||||
|
||||
CONFIG += debug
|
||||
#! [2]
|
||||
options = $$find(CONFIG, "debug") $$find(CONFIG, "release")
|
||||
#! [3]
|
||||
count(options, 2) {
|
||||
message(Both release and debug specified.)
|
||||
}
|
||||
#! [2] #! [3]
|
||||
|
||||
#! [4]
|
||||
eval(TARGET = myapp) {
|
||||
message($$TARGET)
|
||||
}
|
||||
#! [4]
|
3
qmake/doc/src/snippets/qmake/include.pro
Normal file
@ -0,0 +1,3 @@
|
||||
#! [0]
|
||||
include(other.pro)
|
||||
#! [0]
|
40
qmake/doc/src/snippets/qmake/main.cpp
Normal file
@ -0,0 +1,40 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the documentation of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
|
||||
** of its contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
40
qmake/doc/src/snippets/qmake/model.cpp
Normal file
@ -0,0 +1,40 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the documentation of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
|
||||
** of its contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
40
qmake/doc/src/snippets/qmake/model.h
Normal file
@ -0,0 +1,40 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the documentation of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
|
||||
** of its contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
0
qmake/doc/src/snippets/qmake/other.pro
Normal file
40
qmake/doc/src/snippets/qmake/paintwidget_mac.cpp
Normal file
@ -0,0 +1,40 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the documentation of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
|
||||
** of its contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
44
qmake/doc/src/snippets/qmake/paintwidget_unix.cpp
Normal file
@ -0,0 +1,44 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the documentation of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
|
||||
** of its contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
return 0;
|
||||
}
|
40
qmake/doc/src/snippets/qmake/paintwidget_win.cpp
Normal file
@ -0,0 +1,40 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the documentation of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
|
||||
** of its contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
52
qmake/doc/src/snippets/qmake/precompile-stable.h
Normal file
@ -0,0 +1,52 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the examples of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
|
||||
** of its contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
//! [0]
|
||||
/* Add C includes here */
|
||||
|
||||
#if defined __cplusplus
|
||||
/* Add C++ includes here */
|
||||
|
||||
# include <iostream>
|
||||
# include <QApplication>
|
||||
# include <QPushButton>
|
||||
# include <QLabel>
|
||||
#endif
|
||||
//! [0]
|
6
qmake/doc/src/snippets/qmake/project_location.pro
Normal file
@ -0,0 +1,6 @@
|
||||
#! [project file]
|
||||
message($$_PRO_FILE_)
|
||||
#! [project file]
|
||||
#! [project file directory]
|
||||
message($$_PRO_FILE_PWD_)
|
||||
#! [project file directory]
|
18
qmake/doc/src/snippets/qmake/qtconfiguration.pro
Normal file
@ -0,0 +1,18 @@
|
||||
# Show information about the Qt installation.
|
||||
#! [0]
|
||||
message(Qt version: $$[QT_VERSION])
|
||||
message(Qt is installed in $$[QT_INSTALL_PREFIX])
|
||||
message(Qt resources can be found in the following locations:)
|
||||
message(Documentation: $$[QT_INSTALL_DOCS])
|
||||
message(Header files: $$[QT_INSTALL_HEADERS])
|
||||
message(Libraries: $$[QT_INSTALL_LIBS])
|
||||
message(Binary files (executables): $$[QT_INSTALL_BINS])
|
||||
message(Plugins: $$[QT_INSTALL_PLUGINS])
|
||||
message(Data files: $$[QT_INSTALL_DATA])
|
||||
message(Translation files: $$[QT_INSTALL_TRANSLATIONS])
|
||||
message(Settings: $$[QT_INSTALL_SETTINGS])
|
||||
message(Examples: $$[QT_INSTALL_EXAMPLES])
|
||||
#! [0]
|
||||
|
||||
# Show configuration information.
|
||||
message(CONFIG = $$CONFIG)
|
8
qmake/doc/src/snippets/qmake/quoting.pro
Normal file
@ -0,0 +1,8 @@
|
||||
#! [0]
|
||||
DEST = "Program Files"
|
||||
#! [0]
|
||||
count(DEST, 1) {
|
||||
message(Only one item found in DEST.)
|
||||
} else {
|
||||
message(More than one item found in DEST.)
|
||||
}
|
4
qmake/doc/src/snippets/qmake/replace.pro
Normal file
@ -0,0 +1,4 @@
|
||||
#! [0]
|
||||
MESSAGE = This is a tent.
|
||||
message($$replace(MESSAGE, tent, test))
|
||||
#! [0]
|
46
qmake/doc/src/snippets/qmake/replacefunction.pro
Normal file
@ -0,0 +1,46 @@
|
||||
#! [0]
|
||||
defineReplace(headersAndSources) {
|
||||
variable = $$1
|
||||
names = $$eval($$variable)
|
||||
headers =
|
||||
sources =
|
||||
|
||||
for(name, names) {
|
||||
header = $${name}.h
|
||||
exists($$header) {
|
||||
headers += $$header
|
||||
}
|
||||
source = $${name}.cpp
|
||||
exists($$source) {
|
||||
sources += $$source
|
||||
}
|
||||
}
|
||||
return($$headers $$sources)
|
||||
}
|
||||
#! [0]
|
||||
|
||||
defineReplace(matchingFiles) {
|
||||
names = $$ARGS
|
||||
files =
|
||||
|
||||
for(name, names) {
|
||||
header = $${name}.h
|
||||
source = $${name}.cpp
|
||||
exists($$header):exists($$source) {
|
||||
files += $$header
|
||||
files += $$source
|
||||
}
|
||||
}
|
||||
return($$files)
|
||||
}
|
||||
|
||||
names = delegate model view main
|
||||
message(Finding all headers and sources from the following list of names:)
|
||||
message($$names)
|
||||
allFiles = $$headersAndSources(names)
|
||||
message(Found: $$allFiles)
|
||||
|
||||
message(Finding only matching headers and sources from the following list of names:)
|
||||
message($$names)
|
||||
matching = $$matchingFiles($$names)
|
||||
message(Found: $$matching)
|
42
qmake/doc/src/snippets/qmake/scopes.pro
Normal file
@ -0,0 +1,42 @@
|
||||
#! [syntax]
|
||||
<condition> {
|
||||
<command or definition>
|
||||
...
|
||||
}
|
||||
#! [syntax]
|
||||
|
||||
#! [0]
|
||||
win32 {
|
||||
SOURCES += paintwidget_win.cpp
|
||||
}
|
||||
#! [0]
|
||||
|
||||
#! [1]
|
||||
!win32 {
|
||||
SOURCES -= paintwidget_win.cpp
|
||||
}
|
||||
#! [1]
|
||||
|
||||
unix {
|
||||
SOURCES += paintwidget_unix.cpp
|
||||
}
|
||||
|
||||
#! [2]
|
||||
macx {
|
||||
CONFIG(debug, debug|release) {
|
||||
HEADERS += debugging.h
|
||||
}
|
||||
}
|
||||
#! [2]
|
||||
|
||||
#! [3]
|
||||
macx:CONFIG(debug, debug|release) {
|
||||
HEADERS += debugging.h
|
||||
}
|
||||
#! [3]
|
||||
|
||||
#! [4]
|
||||
win32|macx {
|
||||
HEADERS += debugging.h
|
||||
}
|
||||
#! [4]
|
8
qmake/doc/src/snippets/qmake/shared_or_static.pro
Normal file
@ -0,0 +1,8 @@
|
||||
TEMPLIBS = $$[QT_INSTALL_LIBS] libQtGui.prl
|
||||
include($$join(TEMPLIBS, "/"))
|
||||
|
||||
contains(QMAKE_PRL_CONFIG, shared) {
|
||||
message(Shared Qt)
|
||||
} else {
|
||||
message(Static Qt)
|
||||
}
|
9
qmake/doc/src/snippets/qmake/spaces.pro
Normal file
@ -0,0 +1,9 @@
|
||||
#! [quoting library paths with spaces]
|
||||
win32:LIBS += "C:/mylibs/extra libs/extra.lib"
|
||||
unix:LIBS += "-L/home/user/extra libs" -lextra
|
||||
#! [quoting library paths with spaces]
|
||||
|
||||
#! [quoting include paths with spaces]
|
||||
win32:INCLUDEPATH += "C:/mylibs/extra headers"
|
||||
unix:INCLUDEPATH += "/home/user/extra headers"
|
||||
#! [quoting include paths with spaces]
|
7
qmake/doc/src/snippets/qmake/specifications.pro
Normal file
@ -0,0 +1,7 @@
|
||||
#! [0]
|
||||
message($$QMAKESPEC)
|
||||
|
||||
linux-g++ {
|
||||
message(Linux)
|
||||
}
|
||||
#! [0]
|
20
qmake/doc/src/snippets/qmake/testfunction.pro
Normal file
@ -0,0 +1,20 @@
|
||||
#! [0]
|
||||
defineTest(allFiles) {
|
||||
files = $$ARGS
|
||||
|
||||
for(file, files) {
|
||||
!exists($$file) {
|
||||
return(false)
|
||||
}
|
||||
}
|
||||
return(true)
|
||||
}
|
||||
#! [0]
|
||||
|
||||
files = delegate.h model.h view.h
|
||||
|
||||
allFiles($$files) {
|
||||
message(All files are present: $$files)
|
||||
} else {
|
||||
message(Not all files are present: $$files)
|
||||
}
|
7
qmake/doc/src/snippets/qmake/variables.pro
Normal file
@ -0,0 +1,7 @@
|
||||
#! [0]
|
||||
HEADERS = mainwindow.h paintwidget.h
|
||||
#! [0] #! [1]
|
||||
SOURCES = main.cpp mainwindow.cpp \
|
||||
paintwidget.cpp
|
||||
CONFIG += console
|
||||
#! [1]
|
40
qmake/doc/src/snippets/qmake/view.h
Normal file
@ -0,0 +1,40 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the documentation of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
|
||||
** of its contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
2
qmake/qmake-docs.pro
Normal file
@ -0,0 +1,2 @@
|
||||
TEMPLATE = aux
|
||||
QMAKE_DOCS = $$PWD/doc/qmake.qdocconf
|
@ -1,7 +1,6 @@
|
||||
#This is a project file for building qmake, of course it presents a problem -
|
||||
# it is very hard to make qmake build this, when qmake is the thing it builds,
|
||||
#once you are boot strapped though, the qmake.pro will offer better coverage of a
|
||||
#platform than either of the generic makefiles
|
||||
# This project is not actually used to build qmake, but to support development
|
||||
# with Qt Creator. The real build system is made up by the Makefile templates
|
||||
# and the configures.
|
||||
|
||||
option(host_build)
|
||||
CONFIG += console bootstrap
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
load(qt_parts)
|
||||
|
||||
SUBDIRS += qmake/qmake-docs.pro
|
||||
|
||||
cross_compile: CONFIG += nostrip
|
||||
|
||||
confclean.depends += clean
|
||||
|
3
src/3rdparty/pcre/patches/README
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
These patches are landed in upstream PCRE (they're marked with
|
||||
their SVN revision number). When upgrading PCRE remember check
|
||||
if the version you're upgrading to already contains them or not.
|
18
src/3rdparty/pcre/patches/r1340_fix_jit_on_android.patch
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
Index: sljit/sljitConfigInternal.h
|
||||
===================================================================
|
||||
--- sljit/sljitConfigInternal.h (revision 1339)
|
||||
+++ sljit/sljitConfigInternal.h (working copy)
|
||||
@@ -221,6 +221,13 @@
|
||||
#define SLJIT_CACHE_FLUSH(from, to) \
|
||||
sys_icache_invalidate((char*)(from), (char*)(to) - (char*)(from))
|
||||
|
||||
+#elif defined __ANDROID__
|
||||
+
|
||||
+/* Android lacks __clear_cache; instead, cacheflush should be used. */
|
||||
+
|
||||
+#define SLJIT_CACHE_FLUSH(from, to) \
|
||||
+ cacheflush((long)(from), (long)(to), 0)
|
||||
+
|
||||
#elif (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
|
||||
|
||||
/* The __clear_cache() implementation of GCC is a dummy function on PowerPC. */
|
@ -217,6 +217,13 @@
|
||||
#define SLJIT_CACHE_FLUSH(from, to) \
|
||||
sys_icache_invalidate((char*)(from), (char*)(to) - (char*)(from))
|
||||
|
||||
#elif defined __ANDROID__
|
||||
|
||||
/* Android lacks __clear_cache; instead, cacheflush should be used. */
|
||||
|
||||
#define SLJIT_CACHE_FLUSH(from, to) \
|
||||
cacheflush((long)(from), (long)(to), 0)
|
||||
|
||||
#elif (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
|
||||
|
||||
/* The __clear_cache() implementation of GCC is a dummy function on PowerPC. */
|
||||
|
2
src/3rdparty/xkbcommon.pri
vendored
@ -1,4 +1,4 @@
|
||||
QMAKE_CFLAGS = -std=gnu99 -w
|
||||
QMAKE_CFLAGS += -std=gnu99 -w
|
||||
INCLUDEPATH += $$PWD/xkbcommon $$PWD/xkbcommon/src $$PWD/xkbcommon/src/xkbcomp
|
||||
|
||||
DEFINES += DFLT_XKB_CONFIG_ROOT='\\"/usr/share/X11/xkb\\"'
|
||||
|
@ -6,5 +6,5 @@ SUBDIRS += src
|
||||
# 2) If we made a 'QtANGLE' module, the include directory would be flattened which won't work since
|
||||
# we need to support "#include <GLES2/gl2.h>"
|
||||
CONFIG += minimal_syncqt
|
||||
QMAKE_SYNCQT_OPTIONS = -module KHR -module EGL -module GLES2 -version none
|
||||
QMAKE_SYNCQT_OPTIONS = -module QtANGLE/KHR -module QtANGLE/EGL -module QtANGLE/GLES2 -version none
|
||||
load(qt_module_headers)
|
||||
|
@ -40,5 +40,5 @@ egl_headers.files = \
|
||||
$$ANGLE_DIR/include/EGL/egl.h \
|
||||
$$ANGLE_DIR/include/EGL/eglext.h \
|
||||
$$ANGLE_DIR/include/EGL/eglplatform.h
|
||||
egl_headers.path = $$[QT_INSTALL_HEADERS]/EGL
|
||||
egl_headers.path = $$[QT_INSTALL_HEADERS]/QtANGLE/EGL
|
||||
INSTALLS += egl_headers
|
||||
|
@ -235,12 +235,12 @@ for (vs, CLEAR_SHADERS) {
|
||||
load(qt_installs)
|
||||
|
||||
khr_headers.files = $$ANGLE_DIR/include/KHR/khrplatform.h
|
||||
khr_headers.path = $$[QT_INSTALL_HEADERS]/KHR
|
||||
khr_headers.path = $$[QT_INSTALL_HEADERS]/QtANGLE/KHR
|
||||
gles2_headers.files = \
|
||||
$$ANGLE_DIR/include/GLES2/gl2.h \
|
||||
$$ANGLE_DIR/include/GLES2/gl2ext.h \
|
||||
$$ANGLE_DIR/include/GLES2/gl2platform.h
|
||||
gles2_headers.path = $$[QT_INSTALL_HEADERS]/GLES2
|
||||
gles2_headers.path = $$[QT_INSTALL_HEADERS]/QtANGLE/GLES2
|
||||
INSTALLS += khr_headers gles2_headers
|
||||
|
||||
|
||||
|
@ -38,10 +38,6 @@ foreach(module ${CMAKE_MODULES_UNDER_TEST})
|
||||
)
|
||||
endforeach()
|
||||
|
||||
if(CMAKE_CROSSCOMPILING AND CMAKE_FIND_ROOT_PATH)
|
||||
list(APPEND BUILD_OPTIONS_LIST "-DCMAKE_CXX_LINK_FLAGS=--sysroot=\"${CMAKE_FIND_ROOT_PATH}\"")
|
||||
endif()
|
||||
|
||||
macro(expect_pass _dir)
|
||||
string(REPLACE "(" "_" testname "${_dir}")
|
||||
string(REPLACE ")" "_" testname "${testname}")
|
||||
|
@ -114,7 +114,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddWaitFree()
|
||||
|
||||
inline bool QBasicAtomicInt::ref()
|
||||
{
|
||||
register int old, tmp;
|
||||
int old, tmp;
|
||||
asm volatile("1:\n"
|
||||
"ldl_l %0,%2\n" /* old=*ptr; */
|
||||
"addl %0,1,%1\n" /* tmp=old+1; */
|
||||
@ -131,7 +131,7 @@ inline bool QBasicAtomicInt::ref()
|
||||
|
||||
inline bool QBasicAtomicInt::deref()
|
||||
{
|
||||
register int old, tmp;
|
||||
int old, tmp;
|
||||
asm volatile("1:\n"
|
||||
"ldl_l %0,%2\n" /* old=*ptr; */
|
||||
"subl %0,1,%1\n" /* tmp=old-1; */
|
||||
@ -148,7 +148,7 @@ inline bool QBasicAtomicInt::deref()
|
||||
|
||||
inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
|
||||
{
|
||||
register int ret;
|
||||
int ret;
|
||||
asm volatile("1:\n"
|
||||
"ldl_l %0,%1\n" /* ret=*ptr; */
|
||||
"cmpeq %0,%2,%0\n"/* if (ret==expected) ret=0; else ret=1; */
|
||||
@ -167,7 +167,7 @@ inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
|
||||
|
||||
inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
|
||||
{
|
||||
register int ret;
|
||||
int ret;
|
||||
asm volatile("1:\n"
|
||||
"ldl_l %0,%1\n" /* ret=*ptr; */
|
||||
"cmpeq %0,%2,%0\n"/* if (ret==expected) ret=0; else ret=1; */
|
||||
@ -187,7 +187,7 @@ inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
|
||||
|
||||
inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
|
||||
{
|
||||
register int ret;
|
||||
int ret;
|
||||
asm volatile("mb\n"
|
||||
"1:\n"
|
||||
"ldl_l %0,%1\n" /* ret=*ptr; */
|
||||
@ -207,7 +207,7 @@ inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
|
||||
{
|
||||
register int old, tmp;
|
||||
int old, tmp;
|
||||
asm volatile("1:\n"
|
||||
"ldl_l %0,%2\n" /* old=*ptr; */
|
||||
"mov %3,%1\n" /* tmp=newval; */
|
||||
@ -224,7 +224,7 @@ inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
|
||||
{
|
||||
register int old, tmp;
|
||||
int old, tmp;
|
||||
asm volatile("1:\n"
|
||||
"ldl_l %0,%2\n" /* old=*ptr; */
|
||||
"mov %3,%1\n" /* tmp=newval; */
|
||||
@ -242,7 +242,7 @@ inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
|
||||
{
|
||||
register int old, tmp;
|
||||
int old, tmp;
|
||||
asm volatile("mb\n"
|
||||
"1:\n"
|
||||
"ldl_l %0,%2\n" /* old=*ptr; */
|
||||
@ -260,7 +260,7 @@ inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
|
||||
{
|
||||
register int old, tmp;
|
||||
int old, tmp;
|
||||
asm volatile("1:\n"
|
||||
"ldl_l %0,%2\n" /* old=*ptr; */
|
||||
"addl %0,%3,%1\n"/* tmp=old+value; */
|
||||
@ -277,7 +277,7 @@ inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
|
||||
{
|
||||
register int old, tmp;
|
||||
int old, tmp;
|
||||
asm volatile("1:\n"
|
||||
"ldl_l %0,%2\n" /* old=*ptr; */
|
||||
"addl %0,%3,%1\n"/* tmp=old+value; */
|
||||
@ -295,7 +295,7 @@ inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
|
||||
{
|
||||
register int old, tmp;
|
||||
int old, tmp;
|
||||
asm volatile("mb\n"
|
||||
"1:\n"
|
||||
"ldl_l %0,%2\n" /* old=*ptr; */
|
||||
@ -314,7 +314,7 @@ inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
|
||||
{
|
||||
register void *ret;
|
||||
void *ret;
|
||||
asm volatile("1:\n"
|
||||
"ldq_l %0,%1\n" /* ret=*ptr; */
|
||||
"cmpeq %0,%2,%0\n"/* if (ret==expected) tmp=0; else tmp=1; */
|
||||
@ -334,7 +334,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValu
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue)
|
||||
{
|
||||
register void *ret;
|
||||
void *ret;
|
||||
asm volatile("1:\n"
|
||||
"ldq_l %0,%1\n" /* ret=*ptr; */
|
||||
"cmpeq %0,%2,%0\n"/* if (ret==expected) tmp=0; else tmp=1; */
|
||||
@ -355,7 +355,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValu
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue)
|
||||
{
|
||||
register void *ret;
|
||||
void *ret;
|
||||
asm volatile("mb\n"
|
||||
"1:\n"
|
||||
"ldq_l %0,%1\n" /* ret=*ptr; */
|
||||
@ -376,7 +376,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValu
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
|
||||
{
|
||||
register T *old, *tmp;
|
||||
T *old, *tmp;
|
||||
asm volatile("1:\n"
|
||||
"ldq_l %0,%2\n" /* old=*ptr; */
|
||||
"mov %3,%1\n" /* tmp=newval; */
|
||||
@ -394,7 +394,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
|
||||
{
|
||||
register T *old, *tmp;
|
||||
T *old, *tmp;
|
||||
asm volatile("1:\n"
|
||||
"ldq_l %0,%2\n" /* old=*ptr; */
|
||||
"mov %3,%1\n" /* tmp=newval; */
|
||||
@ -413,7 +413,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
|
||||
{
|
||||
register T *old, *tmp;
|
||||
T *old, *tmp;
|
||||
asm volatile("mb\n"
|
||||
"1:\n"
|
||||
"ldq_l %0,%2\n" /* old=*ptr; */
|
||||
@ -432,7 +432,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
|
||||
{
|
||||
register T *old, *tmp;
|
||||
T *old, *tmp;
|
||||
asm volatile("1:\n"
|
||||
"ldq_l %0,%2\n" /* old=*ptr; */
|
||||
"addq %0,%3,%1\n"/* tmp=old+value; */
|
||||
@ -450,7 +450,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueTo
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd)
|
||||
{
|
||||
register T *old, *tmp;
|
||||
T *old, *tmp;
|
||||
asm volatile("1:\n"
|
||||
"ldq_l %0,%2\n" /* old=*ptr; */
|
||||
"addq %0,%3,%1\n"/* tmp=old+value; */
|
||||
@ -469,7 +469,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueTo
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd)
|
||||
{
|
||||
register T *old, *tmp;
|
||||
T *old, *tmp;
|
||||
asm volatile("mb\n"
|
||||
"1:\n"
|
||||
"ldq_l %0,%2\n" /* old=*ptr; */
|
||||
|
@ -114,8 +114,8 @@ template <typename T> struct QAtomicOps : QBasicAtomicOps<sizeof(T)>
|
||||
template<> template<typename T> inline
|
||||
bool QBasicAtomicOps<4>::ref(T &_q_value) Q_DECL_NOTHROW
|
||||
{
|
||||
register T originalValue;
|
||||
register T newValue;
|
||||
T originalValue;
|
||||
T newValue;
|
||||
do {
|
||||
originalValue = _q_value;
|
||||
newValue = originalValue + 1;
|
||||
@ -126,8 +126,8 @@ bool QBasicAtomicOps<4>::ref(T &_q_value) Q_DECL_NOTHROW
|
||||
template<> template <typename T> inline
|
||||
bool QBasicAtomicOps<4>::deref(T &_q_value) Q_DECL_NOTHROW
|
||||
{
|
||||
register T originalValue;
|
||||
register T newValue;
|
||||
T originalValue;
|
||||
T newValue;
|
||||
do {
|
||||
originalValue = _q_value;
|
||||
newValue = originalValue - 1;
|
||||
@ -138,7 +138,7 @@ bool QBasicAtomicOps<4>::deref(T &_q_value) Q_DECL_NOTHROW
|
||||
template<> template <typename T> inline
|
||||
bool QBasicAtomicOps<4>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW
|
||||
{
|
||||
register T originalValue;
|
||||
T originalValue;
|
||||
do {
|
||||
originalValue = _q_value;
|
||||
if (originalValue != expectedValue)
|
||||
@ -165,7 +165,7 @@ template<> template <typename T> inline
|
||||
T QBasicAtomicOps<4>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW
|
||||
{
|
||||
#if defined(__thumb__)
|
||||
register T originalValue;
|
||||
T originalValue;
|
||||
do {
|
||||
originalValue = _q_value;
|
||||
} while (_q_cmpxchg(originalValue, newValue, &_q_value) != 0);
|
||||
@ -184,8 +184,8 @@ T QBasicAtomicOps<4>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHR
|
||||
template<> template <typename T> inline
|
||||
T QBasicAtomicOps<4>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
|
||||
{
|
||||
register T originalValue;
|
||||
register T newValue;
|
||||
T originalValue;
|
||||
T newValue;
|
||||
do {
|
||||
originalValue = _q_value;
|
||||
newValue = originalValue + valueToAdd;
|
||||
|
@ -117,8 +117,8 @@ template <typename T> struct QAtomicOps : QBasicAtomicOps<sizeof(T)>
|
||||
template<> template<typename T> inline
|
||||
bool QBasicAtomicOps<4>::ref(T &_q_value) Q_DECL_NOTHROW
|
||||
{
|
||||
register T newValue;
|
||||
register int result;
|
||||
T newValue;
|
||||
int result;
|
||||
asm volatile("0:\n"
|
||||
"ldrex %[newValue], [%[_q_value]]\n"
|
||||
"add %[newValue], %[newValue], #1\n"
|
||||
@ -136,8 +136,8 @@ bool QBasicAtomicOps<4>::ref(T &_q_value) Q_DECL_NOTHROW
|
||||
template<> template <typename T> inline
|
||||
bool QBasicAtomicOps<4>::deref(T &_q_value) Q_DECL_NOTHROW
|
||||
{
|
||||
register T newValue;
|
||||
register int result;
|
||||
T newValue;
|
||||
int result;
|
||||
asm volatile("0:\n"
|
||||
"ldrex %[newValue], [%[_q_value]]\n"
|
||||
"sub %[newValue], %[newValue], #1\n"
|
||||
@ -155,7 +155,7 @@ bool QBasicAtomicOps<4>::deref(T &_q_value) Q_DECL_NOTHROW
|
||||
template<> template <typename T> inline
|
||||
bool QBasicAtomicOps<4>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW
|
||||
{
|
||||
register int result;
|
||||
int result;
|
||||
asm volatile("0:\n"
|
||||
"ldrex %[result], [%[_q_value]]\n"
|
||||
"eors %[result], %[result], %[expectedValue]\n"
|
||||
@ -175,8 +175,8 @@ bool QBasicAtomicOps<4>::testAndSetRelaxed(T &_q_value, T expectedValue, T newVa
|
||||
template<> template <typename T> inline
|
||||
T QBasicAtomicOps<4>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW
|
||||
{
|
||||
register T originalValue;
|
||||
register int result;
|
||||
T originalValue;
|
||||
int result;
|
||||
asm volatile("0:\n"
|
||||
"ldrex %[originalValue], [%[_q_value]]\n"
|
||||
"strex %[result], %[newValue], [%[_q_value]]\n"
|
||||
@ -194,9 +194,9 @@ T QBasicAtomicOps<4>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHR
|
||||
template<> template <typename T> inline
|
||||
T QBasicAtomicOps<4>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
|
||||
{
|
||||
register T originalValue;
|
||||
register T newValue;
|
||||
register int result;
|
||||
T originalValue;
|
||||
T newValue;
|
||||
int result;
|
||||
asm volatile("0:\n"
|
||||
"ldrex %[originalValue], [%[_q_value]]\n"
|
||||
"add %[newValue], %[originalValue], %[valueToAdd]\n"
|
||||
@ -256,8 +256,8 @@ template<> struct QAtomicIntegerTraits<char32_t> { enum { IsInteger = 1 }; };
|
||||
template<> template<typename T> inline
|
||||
bool QBasicAtomicOps<1>::ref(T &_q_value) Q_DECL_NOTHROW
|
||||
{
|
||||
register T newValue;
|
||||
register int result;
|
||||
T newValue;
|
||||
int result;
|
||||
asm volatile("0:\n"
|
||||
"ldrexb %[newValue], [%[_q_value]]\n"
|
||||
"add %[newValue], %[newValue], #1\n"
|
||||
@ -275,8 +275,8 @@ bool QBasicAtomicOps<1>::ref(T &_q_value) Q_DECL_NOTHROW
|
||||
template<> template <typename T> inline
|
||||
bool QBasicAtomicOps<1>::deref(T &_q_value) Q_DECL_NOTHROW
|
||||
{
|
||||
register T newValue;
|
||||
register int result;
|
||||
T newValue;
|
||||
int result;
|
||||
asm volatile("0:\n"
|
||||
"ldrexb %[newValue], [%[_q_value]]\n"
|
||||
"sub %[newValue], %[newValue], #1\n"
|
||||
@ -294,7 +294,7 @@ bool QBasicAtomicOps<1>::deref(T &_q_value) Q_DECL_NOTHROW
|
||||
template<> template <typename T> inline
|
||||
bool QBasicAtomicOps<1>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW
|
||||
{
|
||||
register T result;
|
||||
T result;
|
||||
asm volatile("0:\n"
|
||||
"ldrexb %[result], [%[_q_value]]\n"
|
||||
"eors %[result], %[result], %[expectedValue]\n"
|
||||
@ -314,8 +314,8 @@ bool QBasicAtomicOps<1>::testAndSetRelaxed(T &_q_value, T expectedValue, T newVa
|
||||
template<> template <typename T> inline
|
||||
T QBasicAtomicOps<1>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW
|
||||
{
|
||||
register T originalValue;
|
||||
register int result;
|
||||
T originalValue;
|
||||
int result;
|
||||
asm volatile("0:\n"
|
||||
"ldrexb %[originalValue], [%[_q_value]]\n"
|
||||
"strexb %[result], %[newValue], [%[_q_value]]\n"
|
||||
@ -333,9 +333,9 @@ T QBasicAtomicOps<1>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHR
|
||||
template<> template <typename T> inline
|
||||
T QBasicAtomicOps<1>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
|
||||
{
|
||||
register T originalValue;
|
||||
register T newValue;
|
||||
register int result;
|
||||
T originalValue;
|
||||
T newValue;
|
||||
int result;
|
||||
asm volatile("0:\n"
|
||||
"ldrexb %[originalValue], [%[_q_value]]\n"
|
||||
"add %[newValue], %[originalValue], %[valueToAdd]\n"
|
||||
@ -355,8 +355,8 @@ T QBasicAtomicOps<1>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveTy
|
||||
template<> template<typename T> inline
|
||||
bool QBasicAtomicOps<2>::ref(T &_q_value) Q_DECL_NOTHROW
|
||||
{
|
||||
register T newValue;
|
||||
register int result;
|
||||
T newValue;
|
||||
int result;
|
||||
asm volatile("0:\n"
|
||||
"ldrexh %[newValue], [%[_q_value]]\n"
|
||||
"add %[newValue], %[newValue], #1\n"
|
||||
@ -374,8 +374,8 @@ bool QBasicAtomicOps<2>::ref(T &_q_value) Q_DECL_NOTHROW
|
||||
template<> template <typename T> inline
|
||||
bool QBasicAtomicOps<2>::deref(T &_q_value) Q_DECL_NOTHROW
|
||||
{
|
||||
register T newValue;
|
||||
register int result;
|
||||
T newValue;
|
||||
int result;
|
||||
asm volatile("0:\n"
|
||||
"ldrexh %[newValue], [%[_q_value]]\n"
|
||||
"sub %[newValue], %[newValue], #1\n"
|
||||
@ -393,7 +393,7 @@ bool QBasicAtomicOps<2>::deref(T &_q_value) Q_DECL_NOTHROW
|
||||
template<> template <typename T> inline
|
||||
bool QBasicAtomicOps<2>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW
|
||||
{
|
||||
register T result;
|
||||
T result;
|
||||
asm volatile("0:\n"
|
||||
"ldrexh %[result], [%[_q_value]]\n"
|
||||
"eors %[result], %[result], %[expectedValue]\n"
|
||||
@ -413,8 +413,8 @@ bool QBasicAtomicOps<2>::testAndSetRelaxed(T &_q_value, T expectedValue, T newVa
|
||||
template<> template <typename T> inline
|
||||
T QBasicAtomicOps<2>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW
|
||||
{
|
||||
register T originalValue;
|
||||
register int result;
|
||||
T originalValue;
|
||||
int result;
|
||||
asm volatile("0:\n"
|
||||
"ldrexh %[originalValue], [%[_q_value]]\n"
|
||||
"strexh %[result], %[newValue], [%[_q_value]]\n"
|
||||
@ -432,9 +432,9 @@ T QBasicAtomicOps<2>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHR
|
||||
template<> template <typename T> inline
|
||||
T QBasicAtomicOps<2>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
|
||||
{
|
||||
register T originalValue;
|
||||
register T newValue;
|
||||
register int result;
|
||||
T originalValue;
|
||||
T newValue;
|
||||
int result;
|
||||
asm volatile("0:\n"
|
||||
"ldrexh %[originalValue], [%[_q_value]]\n"
|
||||
"add %[newValue], %[originalValue], %[valueToAdd]\n"
|
||||
@ -462,8 +462,8 @@ T QBasicAtomicOps<2>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveTy
|
||||
template<> template<typename T> inline
|
||||
bool QBasicAtomicOps<8>::ref(T &_q_value) Q_DECL_NOTHROW
|
||||
{
|
||||
register T newValue;
|
||||
register int result;
|
||||
T newValue;
|
||||
int result;
|
||||
asm volatile("0:\n"
|
||||
"ldrexd %[newValue], %H[newValue], [%[_q_value]]\n"
|
||||
"adds %Q[newValue], %Q[newValue], #1\n"
|
||||
@ -482,8 +482,8 @@ bool QBasicAtomicOps<8>::ref(T &_q_value) Q_DECL_NOTHROW
|
||||
template<> template <typename T> inline
|
||||
bool QBasicAtomicOps<8>::deref(T &_q_value) Q_DECL_NOTHROW
|
||||
{
|
||||
register T newValue;
|
||||
register int result;
|
||||
T newValue;
|
||||
int result;
|
||||
asm volatile("0:\n"
|
||||
"ldrexd %[newValue], %H[newValue], [%[_q_value]]\n"
|
||||
"subs %Q[newValue], %Q[newValue], #1\n"
|
||||
@ -502,7 +502,7 @@ bool QBasicAtomicOps<8>::deref(T &_q_value) Q_DECL_NOTHROW
|
||||
template<> template <typename T> inline
|
||||
bool QBasicAtomicOps<8>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW
|
||||
{
|
||||
register T result;
|
||||
T result;
|
||||
asm volatile("0:\n"
|
||||
"ldrexd %[result], %H[result], [%[_q_value]]\n"
|
||||
"eor %[result], %[result], %[expectedValue]\n"
|
||||
@ -524,8 +524,8 @@ bool QBasicAtomicOps<8>::testAndSetRelaxed(T &_q_value, T expectedValue, T newVa
|
||||
template<> template <typename T> inline
|
||||
T QBasicAtomicOps<8>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW
|
||||
{
|
||||
register T originalValue;
|
||||
register int result;
|
||||
T originalValue;
|
||||
int result;
|
||||
asm volatile("0:\n"
|
||||
"ldrexd %[originalValue], %H[originalValue], [%[_q_value]]\n"
|
||||
"strexd %[result], %[newValue], %H[newValue], [%[_q_value]]\n"
|
||||
@ -543,9 +543,9 @@ T QBasicAtomicOps<8>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHR
|
||||
template<> template <typename T> inline
|
||||
T QBasicAtomicOps<8>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
|
||||
{
|
||||
register T originalValue;
|
||||
register T newValue;
|
||||
register int result;
|
||||
T originalValue;
|
||||
T newValue;
|
||||
int result;
|
||||
asm volatile("0:\n"
|
||||
"ldrexd %[originalValue], %H[originalValue], [%[_q_value]]\n"
|
||||
"adds %Q[newValue], %Q[originalValue], %Q[valueToAdd]\n"
|
||||
@ -588,8 +588,8 @@ T QBasicAtomicOps<8>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveTy
|
||||
|
||||
inline bool QBasicAtomicInt::ref() Q_DECL_NOTHROW
|
||||
{
|
||||
register int newValue;
|
||||
register int result;
|
||||
int newValue;
|
||||
int result;
|
||||
retry:
|
||||
__asm {
|
||||
ldrex newValue, [&_q_value]
|
||||
@ -603,8 +603,8 @@ inline bool QBasicAtomicInt::ref() Q_DECL_NOTHROW
|
||||
|
||||
inline bool QBasicAtomicInt::deref() Q_DECL_NOTHROW
|
||||
{
|
||||
register int newValue;
|
||||
register int result;
|
||||
int newValue;
|
||||
int result;
|
||||
retry:
|
||||
__asm {
|
||||
ldrex newValue, [&_q_value]
|
||||
@ -618,7 +618,7 @@ inline bool QBasicAtomicInt::deref() Q_DECL_NOTHROW
|
||||
|
||||
inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue) Q_DECL_NOTHROW
|
||||
{
|
||||
register int result;
|
||||
int result;
|
||||
retry:
|
||||
__asm {
|
||||
ldrex result, [&_q_value]
|
||||
@ -632,8 +632,8 @@ inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue) Q_DECL_NOTHROW
|
||||
{
|
||||
register int originalValue;
|
||||
register int result;
|
||||
int originalValue;
|
||||
int result;
|
||||
retry:
|
||||
__asm {
|
||||
ldrex originalValue, [&_q_value]
|
||||
@ -646,9 +646,9 @@ inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue) Q_DECL_NOTHROW
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd) Q_DECL_NOTHROW
|
||||
{
|
||||
register int originalValue;
|
||||
register int newValue;
|
||||
register int result;
|
||||
int originalValue;
|
||||
int newValue;
|
||||
int result;
|
||||
retry:
|
||||
__asm {
|
||||
ldrex originalValue, [&_q_value]
|
||||
@ -663,7 +663,7 @@ inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd) Q_DECL_NOTHROW
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue) Q_DECL_NOTHROW
|
||||
{
|
||||
register T *result;
|
||||
T *result;
|
||||
retry:
|
||||
__asm {
|
||||
ldrex result, [&_q_value]
|
||||
@ -678,8 +678,8 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValu
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue) Q_DECL_NOTHROW
|
||||
{
|
||||
register T *originalValue;
|
||||
register int result;
|
||||
T *originalValue;
|
||||
int result;
|
||||
retry:
|
||||
__asm {
|
||||
ldrex originalValue, [&_q_value]
|
||||
@ -693,9 +693,9 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue) Q
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd) Q_DECL_NOTHROW
|
||||
{
|
||||
register T *originalValue;
|
||||
register T *newValue;
|
||||
register int result;
|
||||
T *originalValue;
|
||||
T *newValue;
|
||||
int result;
|
||||
retry:
|
||||
__asm {
|
||||
ldrex originalValue, [&_q_value]
|
||||
|
@ -192,7 +192,7 @@ template <typename T> struct QAtomicOps : QBasicAtomicOps<sizeof(T)>
|
||||
typedef T Type;
|
||||
};
|
||||
|
||||
inline bool _q_ia64_fetchadd_immediate(register int value)
|
||||
inline bool _q_ia64_fetchadd_immediate(int value)
|
||||
{
|
||||
return value == 1 || value == -1
|
||||
|| value == 4 || value == -4
|
||||
@ -218,7 +218,7 @@ inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
|
||||
|
||||
inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
|
||||
{
|
||||
register int expectedValueCopy = expectedValue;
|
||||
int expectedValueCopy = expectedValue;
|
||||
return (static_cast<int>(_InterlockedCompareExchange(&_q_value,
|
||||
newValue,
|
||||
expectedValueCopy))
|
||||
@ -227,7 +227,7 @@ inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
|
||||
|
||||
inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
|
||||
{
|
||||
register int expectedValueCopy = expectedValue;
|
||||
int expectedValueCopy = expectedValue;
|
||||
return (static_cast<int>(_InterlockedCompareExchange_acq(reinterpret_cast<volatile uint *>(&_q_value),
|
||||
newValue,
|
||||
expectedValueCopy))
|
||||
@ -236,7 +236,7 @@ inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
|
||||
|
||||
inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
|
||||
{
|
||||
register int expectedValueCopy = expectedValue;
|
||||
int expectedValueCopy = expectedValue;
|
||||
return (static_cast<int>(_InterlockedCompareExchange_rel(reinterpret_cast<volatile uint *>(&_q_value),
|
||||
newValue,
|
||||
expectedValueCopy))
|
||||
@ -285,7 +285,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
|
||||
{
|
||||
register T *expectedValueCopy = expectedValue;
|
||||
T *expectedValueCopy = expectedValue;
|
||||
return (_InterlockedCompareExchangePointer(reinterpret_cast<void * volatile*>(&_q_value),
|
||||
newValue,
|
||||
expectedValueCopy)
|
||||
@ -300,7 +300,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValu
|
||||
volatile unsigned long *p;
|
||||
};
|
||||
x = &_q_value;
|
||||
register T *expectedValueCopy = expectedValue;
|
||||
T *expectedValueCopy = expectedValue;
|
||||
return (_InterlockedCompareExchange64_acq(p, quintptr(newValue), quintptr(expectedValueCopy))
|
||||
== quintptr(expectedValue));
|
||||
}
|
||||
@ -313,7 +313,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValu
|
||||
volatile unsigned long *p;
|
||||
};
|
||||
x = &_q_value;
|
||||
register T *expectedValueCopy = expectedValue;
|
||||
T *expectedValueCopy = expectedValue;
|
||||
return (_InterlockedCompareExchange64_rel(p, quintptr(newValue), quintptr(expectedValueCopy))
|
||||
== quintptr(expectedValue));
|
||||
}
|
||||
@ -912,7 +912,7 @@ T QBasicAtomicOps<1>::fetchAndAddAcquire(T &_q_value, typename QAtomicAdditiveTy
|
||||
{
|
||||
valueToAdd *= QAtomicAdditiveType<T>::AddScale;
|
||||
// implement the test-and-set loop
|
||||
register T old, ret;
|
||||
T old, ret;
|
||||
do {
|
||||
old = _q_value;
|
||||
_Asm_mov_to_ar((_Asm_app_reg)_AREG_CCV, (quint8)old, FENCE);
|
||||
@ -926,7 +926,7 @@ template<> template <typename T> inline
|
||||
T QBasicAtomicOps<1>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
|
||||
{
|
||||
// implement the test-and-set loop
|
||||
register T old, ret;
|
||||
T old, ret;
|
||||
do {
|
||||
old = _q_value;
|
||||
_Asm_mov_to_ar((_Asm_app_reg)_AREG_CCV, (quint8)old, FENCE);
|
||||
@ -941,7 +941,7 @@ T QBasicAtomicOps<2>::fetchAndAddAcquire(T &_q_value, typename QAtomicAdditiveTy
|
||||
{
|
||||
valueToAdd *= QAtomicAdditiveType<T>::AddScale;
|
||||
// implement the test-and-set loop
|
||||
register T old, ret;
|
||||
T old, ret;
|
||||
do {
|
||||
old = _q_value;
|
||||
_Asm_mov_to_ar((_Asm_app_reg)_AREG_CCV, (quint16)old, FENCE);
|
||||
@ -955,7 +955,7 @@ template<> template <typename T> inline
|
||||
T QBasicAtomicOps<2>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
|
||||
{
|
||||
// implement the test-and-set loop
|
||||
register T old, ret;
|
||||
T old, ret;
|
||||
do {
|
||||
old = _q_value;
|
||||
_Asm_mov_to_ar((_Asm_app_reg)_AREG_CCV, (quint16)old, FENCE);
|
||||
@ -970,7 +970,7 @@ T QBasicAtomicOps<4>::fetchAndAddAcquire(T &_q_value, typename QAtomicAdditiveTy
|
||||
{
|
||||
valueToAdd *= QAtomicAdditiveType<T>::AddScale;
|
||||
// implement the test-and-set loop
|
||||
register T old, ret;
|
||||
T old, ret;
|
||||
do {
|
||||
old = _q_value;
|
||||
_Asm_mov_to_ar((_Asm_app_reg)_AREG_CCV, (unsigned)old, FENCE);
|
||||
@ -984,7 +984,7 @@ template<> template <typename T> inline
|
||||
T QBasicAtomicOps<4>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
|
||||
{
|
||||
// implement the test-and-set loop
|
||||
register T old, ret;
|
||||
T old, ret;
|
||||
do {
|
||||
old = _q_value;
|
||||
_Asm_mov_to_ar((_Asm_app_reg)_AREG_CCV, (unsigned)old, FENCE);
|
||||
@ -999,7 +999,7 @@ T QBasicAtomicOps<8>::fetchAndAddAcquire(T &_q_value, typename QAtomicAdditiveTy
|
||||
{
|
||||
valueToAdd *= QAtomicAdditiveType<T>::AddScale;
|
||||
// implement the test-and-set loop
|
||||
register T old, ret;
|
||||
T old, ret;
|
||||
do {
|
||||
old = _q_value;
|
||||
_Asm_mov_to_ar((_Asm_app_reg)_AREG_CCV, (quint64)old, FENCE);
|
||||
@ -1013,7 +1013,7 @@ template<> template <typename T> inline
|
||||
T QBasicAtomicOps<8>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
|
||||
{
|
||||
// implement the test-and-set loop
|
||||
register T old, ret;
|
||||
T old, ret;
|
||||
do {
|
||||
old = _q_value;
|
||||
_Asm_mov_to_ar((_Asm_app_reg)_AREG_CCV, (quint64)old, FENCE);
|
||||
|
@ -137,8 +137,8 @@ void QBasicAtomicOps<size>::orderedMemoryFence(const T &) Q_DECL_NOTHROW
|
||||
template<> template<typename T> inline
|
||||
bool QBasicAtomicOps<4>::ref(T &_q_value) Q_DECL_NOTHROW
|
||||
{
|
||||
register T originalValue;
|
||||
register T newValue;
|
||||
T originalValue;
|
||||
T newValue;
|
||||
asm volatile("0:\n"
|
||||
"ll %[originalValue], %[_q_value]\n"
|
||||
"addiu %[newValue], %[originalValue], %[one]\n"
|
||||
@ -156,8 +156,8 @@ bool QBasicAtomicOps<4>::ref(T &_q_value) Q_DECL_NOTHROW
|
||||
template<> template<typename T> inline
|
||||
bool QBasicAtomicOps<4>::deref(T &_q_value) Q_DECL_NOTHROW
|
||||
{
|
||||
register T originalValue;
|
||||
register T newValue;
|
||||
T originalValue;
|
||||
T newValue;
|
||||
asm volatile("0:\n"
|
||||
"ll %[originalValue], %[_q_value]\n"
|
||||
"addiu %[newValue], %[originalValue], %[minusOne]\n"
|
||||
@ -175,8 +175,8 @@ bool QBasicAtomicOps<4>::deref(T &_q_value) Q_DECL_NOTHROW
|
||||
template<> template <typename T> inline
|
||||
bool QBasicAtomicOps<4>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW
|
||||
{
|
||||
register T result;
|
||||
register T tempValue;
|
||||
T result;
|
||||
T tempValue;
|
||||
asm volatile("0:\n"
|
||||
"ll %[result], %[_q_value]\n"
|
||||
"xor %[result], %[result], %[expectedValue]\n"
|
||||
@ -199,8 +199,8 @@ bool QBasicAtomicOps<4>::testAndSetRelaxed(T &_q_value, T expectedValue, T newVa
|
||||
template<> template <typename T> inline
|
||||
T QBasicAtomicOps<4>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW
|
||||
{
|
||||
register T originalValue;
|
||||
register T tempValue;
|
||||
T originalValue;
|
||||
T tempValue;
|
||||
asm volatile("0:\n"
|
||||
"ll %[originalValue], %[_q_value]\n"
|
||||
"move %[tempValue], %[newValue]\n"
|
||||
@ -218,8 +218,8 @@ T QBasicAtomicOps<4>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHR
|
||||
template<> template <typename T> inline
|
||||
T QBasicAtomicOps<4>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
|
||||
{
|
||||
register T originalValue;
|
||||
register T newValue;
|
||||
T originalValue;
|
||||
T newValue;
|
||||
asm volatile("0:\n"
|
||||
"ll %[originalValue], %[_q_value]\n"
|
||||
"addu %[newValue], %[originalValue], %[valueToAdd]\n"
|
||||
@ -254,8 +254,8 @@ template<> struct QAtomicIntegerTraits<char32_t> { enum { IsInteger = 1 }; };
|
||||
template<> template<typename T> inline
|
||||
bool QBasicAtomicOps<8>::ref(T &_q_value) Q_DECL_NOTHROW
|
||||
{
|
||||
register T originalValue;
|
||||
register T newValue;
|
||||
T originalValue;
|
||||
T newValue;
|
||||
asm volatile("0:\n"
|
||||
"lld %[originalValue], %[_q_value]\n"
|
||||
"addiu %[newValue], %[originalValue], %[one]\n"
|
||||
@ -273,8 +273,8 @@ bool QBasicAtomicOps<8>::ref(T &_q_value) Q_DECL_NOTHROW
|
||||
template<> template<typename T> inline
|
||||
bool QBasicAtomicOps<8>::deref(T &_q_value) Q_DECL_NOTHROW
|
||||
{
|
||||
register T originalValue;
|
||||
register T newValue;
|
||||
T originalValue;
|
||||
T newValue;
|
||||
asm volatile("0:\n"
|
||||
"lld %[originalValue], %[_q_value]\n"
|
||||
"addiu %[newValue], %[originalValue], %[minusOne]\n"
|
||||
@ -292,8 +292,8 @@ bool QBasicAtomicOps<8>::deref(T &_q_value) Q_DECL_NOTHROW
|
||||
template<> template <typename T> inline
|
||||
bool QBasicAtomicOps<8>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW
|
||||
{
|
||||
register T result;
|
||||
register T tempValue;
|
||||
T result;
|
||||
T tempValue;
|
||||
asm volatile("0:\n"
|
||||
"lld %[result], %[_q_value]\n"
|
||||
"xor %[result], %[result], %[expectedValue]\n"
|
||||
@ -316,8 +316,8 @@ bool QBasicAtomicOps<8>::testAndSetRelaxed(T &_q_value, T expectedValue, T newVa
|
||||
template<> template <typename T> inline
|
||||
T QBasicAtomicOps<8>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW
|
||||
{
|
||||
register T originalValue;
|
||||
register T tempValue;
|
||||
T originalValue;
|
||||
T tempValue;
|
||||
asm volatile("0:\n"
|
||||
"lld %[originalValue], %[_q_value]\n"
|
||||
"move %[tempValue], %[newValue]\n"
|
||||
@ -335,8 +335,8 @@ T QBasicAtomicOps<8>::fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHR
|
||||
template<> template <typename T> inline
|
||||
T QBasicAtomicOps<8>::fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW
|
||||
{
|
||||
register T originalValue;
|
||||
register T newValue;
|
||||
T originalValue;
|
||||
T newValue;
|
||||
asm volatile("0:\n"
|
||||
"lld %[originalValue], %[_q_value]\n"
|
||||
"addu %[newValue], %[originalValue], %[valueToAdd]\n"
|
||||
|
@ -124,8 +124,8 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddWaitFree()
|
||||
|
||||
inline bool QBasicAtomicInt::ref()
|
||||
{
|
||||
register int originalValue;
|
||||
register int newValue;
|
||||
int originalValue;
|
||||
int newValue;
|
||||
asm volatile("lwarx %[originalValue]," _Q_VALUE "\n"
|
||||
"addi %[newValue], %[originalValue], %[one]\n"
|
||||
"stwcx. %[newValue]," _Q_VALUE "\n"
|
||||
@ -141,8 +141,8 @@ inline bool QBasicAtomicInt::ref()
|
||||
|
||||
inline bool QBasicAtomicInt::deref()
|
||||
{
|
||||
register int originalValue;
|
||||
register int newValue;
|
||||
int originalValue;
|
||||
int newValue;
|
||||
asm volatile("lwarx %[originalValue]," _Q_VALUE "\n"
|
||||
"addi %[newValue], %[originalValue], %[minusOne]\n"
|
||||
"stwcx. %[newValue]," _Q_VALUE "\n"
|
||||
@ -158,7 +158,7 @@ inline bool QBasicAtomicInt::deref()
|
||||
|
||||
inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
|
||||
{
|
||||
register int result;
|
||||
int result;
|
||||
asm volatile("lwarx %[result]," _Q_VALUE "\n"
|
||||
"xor. %[result], %[result], %[expectedValue]\n"
|
||||
"bne $+12\n"
|
||||
@ -175,7 +175,7 @@ inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
|
||||
|
||||
inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
|
||||
{
|
||||
register int result;
|
||||
int result;
|
||||
asm volatile("lwarx %[result]," _Q_VALUE "\n"
|
||||
"xor. %[result], %[result], %[expectedValue]\n"
|
||||
"bne $+16\n"
|
||||
@ -193,7 +193,7 @@ inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
|
||||
|
||||
inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
|
||||
{
|
||||
register int result;
|
||||
int result;
|
||||
asm volatile("eieio\n"
|
||||
"lwarx %[result]," _Q_VALUE "\n"
|
||||
"xor. %[result], %[result], %[expectedValue]\n"
|
||||
@ -211,7 +211,7 @@ inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
|
||||
{
|
||||
register int originalValue;
|
||||
int originalValue;
|
||||
asm volatile("lwarx %[originalValue]," _Q_VALUE "\n"
|
||||
"stwcx. %[newValue]," _Q_VALUE "\n"
|
||||
"bne- $-8\n"
|
||||
@ -225,7 +225,7 @@ inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
|
||||
{
|
||||
register int originalValue;
|
||||
int originalValue;
|
||||
asm volatile("lwarx %[originalValue]," _Q_VALUE "\n"
|
||||
"stwcx. %[newValue]," _Q_VALUE "\n"
|
||||
"bne- $-8\n"
|
||||
@ -240,7 +240,7 @@ inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
|
||||
{
|
||||
register int originalValue;
|
||||
int originalValue;
|
||||
asm volatile("eieio\n"
|
||||
"lwarx %[originalValue]," _Q_VALUE "\n"
|
||||
"stwcx. %[newValue]," _Q_VALUE "\n"
|
||||
@ -255,8 +255,8 @@ inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
|
||||
{
|
||||
register int originalValue;
|
||||
register int newValue;
|
||||
int originalValue;
|
||||
int newValue;
|
||||
asm volatile("lwarx %[originalValue]," _Q_VALUE "\n"
|
||||
"add %[newValue], %[originalValue], %[valueToAdd]\n"
|
||||
"stwcx. %[newValue]," _Q_VALUE "\n"
|
||||
@ -272,8 +272,8 @@ inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
|
||||
{
|
||||
register int originalValue;
|
||||
register int newValue;
|
||||
int originalValue;
|
||||
int newValue;
|
||||
asm volatile("lwarx %[originalValue]," _Q_VALUE "\n"
|
||||
"add %[newValue], %[originalValue], %[valueToAdd]\n"
|
||||
"stwcx. %[newValue]," _Q_VALUE "\n"
|
||||
@ -290,8 +290,8 @@ inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
|
||||
{
|
||||
register int originalValue;
|
||||
register int newValue;
|
||||
int originalValue;
|
||||
int newValue;
|
||||
asm volatile("eieio\n"
|
||||
"lwarx %[originalValue]," _Q_VALUE "\n"
|
||||
"add %[newValue], %[originalValue], %[valueToAdd]\n"
|
||||
@ -317,7 +317,7 @@ inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
|
||||
{
|
||||
register void *result;
|
||||
void *result;
|
||||
asm volatile(LPARX" %[result]," _Q_VALUE "\n"
|
||||
"xor. %[result], %[result], %[expectedValue]\n"
|
||||
"bne $+12\n"
|
||||
@ -335,7 +335,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValu
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue)
|
||||
{
|
||||
register void *result;
|
||||
void *result;
|
||||
asm volatile(LPARX" %[result]," _Q_VALUE "\n"
|
||||
"xor. %[result], %[result], %[expectedValue]\n"
|
||||
"bne $+16\n"
|
||||
@ -354,7 +354,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValu
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue)
|
||||
{
|
||||
register void *result;
|
||||
void *result;
|
||||
asm volatile("eieio\n"
|
||||
LPARX" %[result]," _Q_VALUE "\n"
|
||||
"xor. %[result], %[result], %[expectedValue]\n"
|
||||
@ -373,7 +373,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValu
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
|
||||
{
|
||||
register T *originalValue;
|
||||
T *originalValue;
|
||||
asm volatile(LPARX" %[originalValue]," _Q_VALUE "\n"
|
||||
STPCX" %[newValue]," _Q_VALUE "\n"
|
||||
"bne- $-8\n"
|
||||
@ -388,7 +388,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
|
||||
{
|
||||
register T *originalValue;
|
||||
T *originalValue;
|
||||
asm volatile(LPARX" %[originalValue]," _Q_VALUE "\n"
|
||||
STPCX" %[newValue]," _Q_VALUE "\n"
|
||||
"bne- $-8\n"
|
||||
@ -404,7 +404,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
|
||||
{
|
||||
register T *originalValue;
|
||||
T *originalValue;
|
||||
asm volatile("eieio\n"
|
||||
LPARX" %[originalValue]," _Q_VALUE "\n"
|
||||
STPCX" %[newValue]," _Q_VALUE "\n"
|
||||
@ -420,8 +420,8 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
|
||||
{
|
||||
register T *originalValue;
|
||||
register T *newValue;
|
||||
T *originalValue;
|
||||
T *newValue;
|
||||
asm volatile(LPARX" %[originalValue]," _Q_VALUE "\n"
|
||||
"add %[newValue], %[originalValue], %[valueToAdd]\n"
|
||||
STPCX" %[newValue]," _Q_VALUE "\n"
|
||||
@ -438,8 +438,8 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueTo
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd)
|
||||
{
|
||||
register T *originalValue;
|
||||
register T *newValue;
|
||||
T *originalValue;
|
||||
T *newValue;
|
||||
asm volatile(LPARX" %[originalValue]," _Q_VALUE "\n"
|
||||
"add %[newValue], %[originalValue], %[valueToAdd]\n"
|
||||
STPCX" %[newValue]," _Q_VALUE "\n"
|
||||
@ -457,8 +457,8 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueTo
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd)
|
||||
{
|
||||
register T *originalValue;
|
||||
register T *newValue;
|
||||
T *originalValue;
|
||||
T *newValue;
|
||||
asm volatile("eieio\n"
|
||||
LPARX" %[originalValue]," _Q_VALUE "\n"
|
||||
"add %[newValue], %[originalValue], %[valueToAdd]\n"
|
||||
|
@ -147,7 +147,7 @@ inline bool QBasicAtomicInt::deref()
|
||||
|
||||
inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
|
||||
{
|
||||
register int result;
|
||||
int result;
|
||||
asm volatile("0:\n"
|
||||
"movli.l @%[_q_value], r0\n"
|
||||
"xor %[expectedValue], r0\n"
|
||||
@ -169,7 +169,7 @@ inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
|
||||
|
||||
inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
|
||||
{
|
||||
register int result;
|
||||
int result;
|
||||
asm volatile("0:\n"
|
||||
"movli.l @%[_q_value], r0\n"
|
||||
"xor %[expectedValue], r0\n"
|
||||
@ -192,7 +192,7 @@ inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
|
||||
|
||||
inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
|
||||
{
|
||||
register int result;
|
||||
int result;
|
||||
asm volatile("synco\n"
|
||||
"0:\n"
|
||||
"movli.l @%[_q_value], r0\n"
|
||||
@ -220,7 +220,7 @@ inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue)
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
|
||||
{
|
||||
register int originalValue;
|
||||
int originalValue;
|
||||
asm volatile("0:\n"
|
||||
"movli.l @%[_q_value], r0\n"
|
||||
"mov r0, %[originalValue]\n"
|
||||
@ -237,7 +237,7 @@ inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
|
||||
{
|
||||
register int originalValue;
|
||||
int originalValue;
|
||||
asm volatile("0:\n"
|
||||
"movli.l @%[_q_value], r0\n"
|
||||
"mov r0, %[originalValue]\n"
|
||||
@ -255,7 +255,7 @@ inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
|
||||
{
|
||||
register int originalValue;
|
||||
int originalValue;
|
||||
asm volatile("synco\n"
|
||||
"0:\n"
|
||||
"movli.l @%[_q_value], r0\n"
|
||||
@ -278,7 +278,7 @@ inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue)
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
|
||||
{
|
||||
register int originalValue;
|
||||
int originalValue;
|
||||
asm volatile("0:\n"
|
||||
"movli.l @%[_q_value], r0\n"
|
||||
"mov r0, %[originalValue]\n"
|
||||
@ -295,7 +295,7 @@ inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
|
||||
{
|
||||
register int originalValue;
|
||||
int originalValue;
|
||||
asm volatile("0:\n"
|
||||
"movli.l @%[_q_value], r0\n"
|
||||
"mov r0, %[originalValue]\n"
|
||||
@ -313,7 +313,7 @@ inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
|
||||
{
|
||||
register int originalValue;
|
||||
int originalValue;
|
||||
asm volatile("synco\n"
|
||||
"0:\n"
|
||||
"movli.l @%[_q_value], r0\n"
|
||||
@ -337,7 +337,7 @@ inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd)
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
|
||||
{
|
||||
register T *result;
|
||||
T *result;
|
||||
asm volatile("0:\n"
|
||||
"movli.l @%[_q_value], r0\n"
|
||||
"xor %[expectedValue], r0\n"
|
||||
@ -360,7 +360,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValu
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue)
|
||||
{
|
||||
register T *result;
|
||||
T *result;
|
||||
asm volatile("0:\n"
|
||||
"movli.l @%[_q_value], r0\n"
|
||||
"xor %[expectedValue], r0\n"
|
||||
@ -384,7 +384,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValu
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue)
|
||||
{
|
||||
register T *result;
|
||||
T *result;
|
||||
asm volatile("synco\n"
|
||||
"0:\n"
|
||||
"movli.l @%[_q_value], r0\n"
|
||||
@ -414,7 +414,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValu
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
|
||||
{
|
||||
register T *originalValue;
|
||||
T *originalValue;
|
||||
asm volatile("0:\n"
|
||||
"movli.l @%[_q_value], r0\n"
|
||||
"mov r0, %[originalValue]\n"
|
||||
@ -432,7 +432,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
|
||||
{
|
||||
register T *originalValue;
|
||||
T *originalValue;
|
||||
asm volatile("0:\n"
|
||||
"movli.l @%[_q_value], r0\n"
|
||||
"mov r0, %[originalValue]\n"
|
||||
@ -451,7 +451,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
|
||||
{
|
||||
register T *originalValue;
|
||||
T *originalValue;
|
||||
asm volatile("synco\n"
|
||||
"0:\n"
|
||||
"movli.l @%[_q_value], r0\n"
|
||||
@ -476,7 +476,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue)
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
|
||||
{
|
||||
register T *originalValue;
|
||||
T *originalValue;
|
||||
asm volatile("0:\n"
|
||||
"movli.l @%[_q_value], r0\n"
|
||||
"mov r0, %[originalValue]\n"
|
||||
@ -494,7 +494,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueTo
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd)
|
||||
{
|
||||
register T *originalValue;
|
||||
T *originalValue;
|
||||
asm volatile("0:\n"
|
||||
"movli.l @%[_q_value], r0\n"
|
||||
"mov r0, %[originalValue]\n"
|
||||
@ -513,7 +513,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueTo
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd)
|
||||
{
|
||||
register T *originalValue;
|
||||
T *originalValue;
|
||||
asm volatile("synco\n"
|
||||
"0:\n"
|
||||
"movli.l @%[_q_value], r0\n"
|
||||
|
@ -99,9 +99,9 @@ Q_GLOBAL_STATIC_WITH_ARGS(QMutex, textCodecsMutex, (QMutex::Recursive));
|
||||
QMutex *qTextCodecsMutex() { return textCodecsMutex(); }
|
||||
|
||||
#if !defined(QT_USE_ICU)
|
||||
static char qtolower(register char c)
|
||||
static char qtolower(char c)
|
||||
{ if (c >= 'A' && c <= 'Z') return c + 0x20; return c; }
|
||||
static bool qisalnum(register char c)
|
||||
static bool qisalnum(char c)
|
||||
{ return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'z'); }
|
||||
|
||||
bool qTextCodecNameMatch(const char *n, const char *h)
|
||||
|
@ -391,11 +391,6 @@
|
||||
#define QT_NO_CONTEXTMENU
|
||||
#endif
|
||||
|
||||
// Qt D-Bus module
|
||||
#if !defined(QT_NO_DBUS) && (defined(QT_NO_PROPERTIES) || defined(QT_NO_DOM))
|
||||
#define QT_NO_DBUS
|
||||
#endif
|
||||
|
||||
// QPrinter
|
||||
#if !defined(QT_NO_PRINTER) && (defined(QT_NO_PICTURE) || defined(QT_NO_TEMPORARYFILE))
|
||||
#define QT_NO_PRINTER
|
||||
@ -451,6 +446,11 @@
|
||||
#define QT_NO_BEARERMANAGEMENT
|
||||
#endif
|
||||
|
||||
// Qt D-Bus module
|
||||
#if !defined(QT_NO_DBUS) && (defined(QT_NO_PROPERTIES) || defined(QT_NO_XMLSTREAMREADER))
|
||||
#define QT_NO_DBUS
|
||||
#endif
|
||||
|
||||
// QGraphicsView
|
||||
#if !defined(QT_NO_GRAPHICSVIEW) && (defined(QT_NO_SCROLLAREA))
|
||||
#define QT_NO_GRAPHICSVIEW
|
||||
|
@ -1102,7 +1102,7 @@ SeeAlso: ???
|
||||
Feature: DBUS
|
||||
Description: Provides classes for D-Bus.
|
||||
Section: D-Bus
|
||||
Requires: PROPERTIES DOM
|
||||
Requires: PROPERTIES XMLSTREAMREADER
|
||||
Name: Qt D-Bus module
|
||||
SeeAlso: ???
|
||||
|
||||
|
@ -511,7 +511,7 @@ Q_CORE_EXPORT void *qMemSet(void *dest, int c, size_t n);
|
||||
the application is compiled using Forte Developer, or Sun Studio
|
||||
C++. The header file also declares a range of macros (Q_OS_*)
|
||||
that are defined for the specified platforms. For example,
|
||||
Q_OS_X11 which is defined for the X Window System.
|
||||
Q_OS_UNIX which is defined for the Unix-based systems.
|
||||
|
||||
The purpose of these macros is to enable programmers to add
|
||||
compiler or platform specific code to their application.
|
||||
@ -1050,9 +1050,9 @@ bool qSharedBuild() Q_DECL_NOTHROW
|
||||
\value MV_10_0 Mac OS X 10.0 (unsupported)
|
||||
\value MV_10_1 Mac OS X 10.1 (unsupported)
|
||||
\value MV_10_2 Mac OS X 10.2 (unsupported)
|
||||
\value MV_10_3 Mac OS X 10.3
|
||||
\value MV_10_4 Mac OS X 10.4
|
||||
\value MV_10_5 Mac OS X 10.5
|
||||
\value MV_10_3 Mac OS X 10.3 (unsupported)
|
||||
\value MV_10_4 Mac OS X 10.4 (unsupported)
|
||||
\value MV_10_5 Mac OS X 10.5 (unsupported)
|
||||
\value MV_10_6 Mac OS X 10.6
|
||||
\value MV_10_7 Mac OS X 10.7
|
||||
\value MV_10_8 Mac OS X 10.8
|
||||
|
@ -501,7 +501,7 @@ Q_AUTOTEST_EXPORT QByteArray qCleanupFuncinfo(QByteArray info)
|
||||
templatecount = 1;
|
||||
--pos;
|
||||
while (pos && templatecount) {
|
||||
register char c = info.at(pos);
|
||||
char c = info.at(pos);
|
||||
if (c == '>')
|
||||
++templatecount;
|
||||
else if (c == '<')
|
||||
|
@ -110,7 +110,7 @@ public:
|
||||
|
||||
To create a proper QTypeInfo specialization for A struct, we have to check
|
||||
all sub-components; B, C and D, then take the lowest common denominator and call
|
||||
Q_DECLATE_TYPEINFO with the resulting flags. An easier and less fragile approach is to
|
||||
Q_DECLARE_TYPEINFO with the resulting flags. An easier and less fragile approach is to
|
||||
use QTypeInfoMerger, which does that automatically. So struct A would have
|
||||
the following QTypeInfo definition:
|
||||
|
||||
|
@ -220,7 +220,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
QInotifyFileSystemWatcherEngine *QInotifyFileSystemWatcherEngine::create(QObject *parent)
|
||||
{
|
||||
register int fd = -1;
|
||||
int fd = -1;
|
||||
#ifdef IN_CLOEXEC
|
||||
fd = inotify_init1(IN_CLOEXEC);
|
||||
#endif
|
||||
|
@ -882,7 +882,7 @@ inline bool QUrlPrivate::setScheme(const QString &value, int len, bool doSetErro
|
||||
// schemes are ASCII only, so we don't need the full Unicode toLower
|
||||
QChar *schemeData = scheme.data(); // force detaching here
|
||||
for (int i = needsLowercasing; i >= 0; --i) {
|
||||
register ushort c = schemeData[i].unicode();
|
||||
ushort c = schemeData[i].unicode();
|
||||
if (c >= 'A' && c <= 'Z')
|
||||
schemeData[i] = c + 0x20;
|
||||
}
|
||||
@ -1244,7 +1244,7 @@ inline void QUrlPrivate::parse(const QString &url, QUrl::ParsingMode parsingMode
|
||||
const ushort *const data = reinterpret_cast<const ushort *>(begin);
|
||||
|
||||
for (int i = 0; i < len; ++i) {
|
||||
register uint uc = data[i];
|
||||
uint uc = data[i];
|
||||
if (uc == '#' && hash == -1) {
|
||||
hash = i;
|
||||
|
||||
@ -1472,7 +1472,7 @@ inline QUrlPrivate::ErrorCode QUrlPrivate::validityError(QString *source, int *p
|
||||
|
||||
// check for a path of "text:text/"
|
||||
for (int i = 0; i < path.length(); ++i) {
|
||||
register ushort c = path.at(i).unicode();
|
||||
ushort c = path.at(i).unicode();
|
||||
if (c == '/') {
|
||||
// found the slash before the colon
|
||||
return NoError;
|
||||
@ -1512,7 +1512,7 @@ bool QUrlPrivate::validateComponent(QUrlPrivate::Section section, const QString
|
||||
|
||||
const ushort *const data = reinterpret_cast<const ushort *>(input.constData());
|
||||
for (uint i = uint(begin); i < uint(end); ++i) {
|
||||
register uint uc = data[i];
|
||||
uint uc = data[i];
|
||||
if (uc >= 0x80)
|
||||
continue;
|
||||
|
||||
|
@ -2028,7 +2028,7 @@ Q_AUTOTEST_EXPORT void qt_nameprep(QString *source, int from)
|
||||
const QChar *e = src + source->size();
|
||||
|
||||
for ( ; out < e; ++out) {
|
||||
register ushort uc = out->unicode();
|
||||
ushort uc = out->unicode();
|
||||
if (uc >= 0x80) {
|
||||
break;
|
||||
} else if (uc >= 'A' && uc <= 'Z') {
|
||||
@ -2121,7 +2121,7 @@ Q_AUTOTEST_EXPORT bool qt_check_std3rules(const QChar *uc, int len)
|
||||
return false;
|
||||
|
||||
for (int i = 0; i < len; ++i) {
|
||||
register ushort c = uc[i].unicode();
|
||||
ushort c = uc[i].unicode();
|
||||
if (c == '-' && (i == 0 || i == len - 1))
|
||||
return false;
|
||||
|
||||
@ -2504,7 +2504,7 @@ QString qt_ACE_do(const QString &domain, AceOperation op)
|
||||
const QChar *in = domain.constData() + lastIdx;
|
||||
const QChar *e = in + labelLength;
|
||||
for (; in < e; ++in, ++out) {
|
||||
register ushort uc = in->unicode();
|
||||
ushort uc = in->unicode();
|
||||
if (uc > 0x7f)
|
||||
simple = false;
|
||||
if (uc >= 'A' && uc <= 'Z')
|
||||
@ -2533,7 +2533,7 @@ QString qt_ACE_do(const QString &domain, AceOperation op)
|
||||
// That means we need one or two temporaries
|
||||
qt_nameprep(&result, prevLen);
|
||||
labelLength = result.length() - prevLen;
|
||||
register int toReserve = labelLength + 4 + 6; // "xn--" plus some extra bytes
|
||||
int toReserve = labelLength + 4 + 6; // "xn--" plus some extra bytes
|
||||
aceForm.resize(0);
|
||||
if (toReserve > aceForm.capacity())
|
||||
aceForm.reserve(toReserve);
|
||||
|
@ -464,7 +464,7 @@ static int recode(QString &result, const ushort *begin, const ushort *end, QUrl:
|
||||
ushort *output = 0;
|
||||
|
||||
for ( ; input != end; ++input) {
|
||||
register ushort c;
|
||||
ushort c;
|
||||
EncodingAction action;
|
||||
|
||||
// try a run where no change is necessary
|
||||
@ -483,7 +483,7 @@ static int recode(QString &result, const ushort *begin, const ushort *end, QUrl:
|
||||
break;
|
||||
|
||||
non_trivial:
|
||||
register uint decoded;
|
||||
uint decoded;
|
||||
if (c == '%' && retryBadEncoding) {
|
||||
// always write "%25"
|
||||
ensureDetached(result, output, begin, input, end);
|
||||
|
@ -79,7 +79,7 @@ int qt_safe_select(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept,
|
||||
{
|
||||
if (!orig_timeout) {
|
||||
// no timeout -> block forever
|
||||
register int ret;
|
||||
int ret;
|
||||
EINTR_LOOP(ret, select(nfds, fdread, fdwrite, fdexcept, 0));
|
||||
return ret;
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ static inline int qt_safe_open(const char *pathname, int flags, mode_t mode = 07
|
||||
#ifdef O_CLOEXEC
|
||||
flags |= O_CLOEXEC;
|
||||
#endif
|
||||
register int fd;
|
||||
int fd;
|
||||
EINTR_LOOP(fd, QT_OPEN(pathname, flags, mode));
|
||||
|
||||
// unknown flags are ignored, so we have no way of verifying if
|
||||
@ -191,7 +191,7 @@ static inline int qt_safe_pipe(int pipefd[2], int flags = 0)
|
||||
Q_ASSERT((flags & ~O_NONBLOCK) == 0);
|
||||
#endif
|
||||
|
||||
register int ret;
|
||||
int ret;
|
||||
#if QT_UNIX_SUPPORTS_THREADSAFE_CLOEXEC && defined(O_CLOEXEC)
|
||||
// use pipe2
|
||||
flags |= O_CLOEXEC;
|
||||
@ -223,7 +223,7 @@ static inline int qt_safe_dup(int oldfd, int atleast = 0, int flags = FD_CLOEXEC
|
||||
{
|
||||
Q_ASSERT(flags == FD_CLOEXEC || flags == 0);
|
||||
|
||||
register int ret;
|
||||
int ret;
|
||||
#ifdef F_DUPFD_CLOEXEC
|
||||
// use this fcntl
|
||||
if (flags & FD_CLOEXEC) {
|
||||
@ -247,7 +247,7 @@ static inline int qt_safe_dup2(int oldfd, int newfd, int flags = FD_CLOEXEC)
|
||||
{
|
||||
Q_ASSERT(flags == FD_CLOEXEC || flags == 0);
|
||||
|
||||
register int ret;
|
||||
int ret;
|
||||
#if QT_UNIX_SUPPORTS_THREADSAFE_CLOEXEC && defined(O_CLOEXEC)
|
||||
// use dup3
|
||||
if (flags & FD_CLOEXEC) {
|
||||
@ -291,7 +291,7 @@ static inline qint64 qt_safe_write_nosignal(int fd, const void *data, qint64 len
|
||||
|
||||
static inline int qt_safe_close(int fd)
|
||||
{
|
||||
register int ret;
|
||||
int ret;
|
||||
EINTR_LOOP(ret, QT_CLOSE(fd));
|
||||
return ret;
|
||||
}
|
||||
@ -303,28 +303,28 @@ static inline int qt_safe_close(int fd)
|
||||
static inline int qt_safe_execve(const char *filename, char *const argv[],
|
||||
char *const envp[])
|
||||
{
|
||||
register int ret;
|
||||
int ret;
|
||||
EINTR_LOOP(ret, ::execve(filename, argv, envp));
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline int qt_safe_execv(const char *path, char *const argv[])
|
||||
{
|
||||
register int ret;
|
||||
int ret;
|
||||
EINTR_LOOP(ret, ::execv(path, argv));
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline int qt_safe_execvp(const char *file, char *const argv[])
|
||||
{
|
||||
register int ret;
|
||||
int ret;
|
||||
EINTR_LOOP(ret, ::execvp(file, argv));
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline pid_t qt_safe_waitpid(pid_t pid, int *status, int options)
|
||||
{
|
||||
register int ret;
|
||||
int ret;
|
||||
EINTR_LOOP(ret, ::waitpid(pid, status, options));
|
||||
return ret;
|
||||
}
|
||||
|
@ -938,7 +938,7 @@ bool QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject *receiv
|
||||
if (receiver->d_func()->threadData == this->threadData && extraData) {
|
||||
// application event filters are only called for objects in the GUI thread
|
||||
for (int i = 0; i < extraData->eventFilters.size(); ++i) {
|
||||
register QObject *obj = extraData->eventFilters.at(i);
|
||||
QObject *obj = extraData->eventFilters.at(i);
|
||||
if (!obj)
|
||||
continue;
|
||||
if (obj->d_func()->threadData != threadData) {
|
||||
@ -957,7 +957,7 @@ bool QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject *receiver, Q
|
||||
Q_Q(QCoreApplication);
|
||||
if (receiver != q && receiver->d_func()->extraData) {
|
||||
for (int i = 0; i < receiver->d_func()->extraData->eventFilters.size(); ++i) {
|
||||
register QObject *obj = receiver->d_func()->extraData->eventFilters.at(i);
|
||||
QObject *obj = receiver->d_func()->extraData->eventFilters.at(i);
|
||||
if (!obj)
|
||||
continue;
|
||||
if (obj->d_func()->threadData != receiver->d_func()->threadData) {
|
||||
|
@ -1678,7 +1678,7 @@ struct QMetaTypeIdQObject<T*, /* isPointerToTypeDerivedFromQObject */ true>
|
||||
template <typename T>
|
||||
inline int qRegisterMetaTypeStreamOperators()
|
||||
{
|
||||
register int id = qMetaTypeId<T>();
|
||||
int id = qMetaTypeId<T>();
|
||||
QMetaType::registerStreamOperators(id, QtMetaTypePrivate::QMetaTypeFunctionHelper<T>::Save,
|
||||
QtMetaTypePrivate::QMetaTypeFunctionHelper<T>::Load);
|
||||
return id;
|
||||
|
@ -212,7 +212,7 @@ bool QSystemSemaphorePrivate::modifySemaphore(int count)
|
||||
operation.sem_op = count;
|
||||
operation.sem_flg = SEM_UNDO;
|
||||
|
||||
register int res;
|
||||
int res;
|
||||
EINTR_LOOP(res, semop(semaphore, &operation, 1));
|
||||
if (-1 == res) {
|
||||
// If the semaphore was removed be nice and create it and then modifySemaphore again
|
||||
|